Data Mutation Program in java

Discussion in 'Java' started by AnetaKvel, Feb 15, 2007.

  1. AnetaKvel

    AnetaKvel Guest

    Hi,
    As part of my software testing course I need to submit a program that
    generates automatic seed(data mutation) for the given input source
    code(in java) and produce the mutation output(with number of dead and
    alive mutants).is there any particular automated seed generating
    program pattern that I could refer too. I searched online but there
    are only tools that are available to generate and test the source
    code. Please provide me the links to the URL and any pseudo code
    suggestion.
    sorry for multiposting.
    Thank you in advance,
    AnetaKvel, Feb 15, 2007
    #1
    1. Advertising

  2. AnetaKvel

    Daniel Dyer Guest

    On Thu, 15 Feb 2007 17:47:45 -0000, AnetaKvel <>
    wrote:

    > Hi,
    > As part of my software testing course I need to submit a program that
    > generates automatic seed(data mutation) for the given input source
    > code(in java) and produce the mutation output(with number of dead and
    > alive mutants).is there any particular automated seed generating
    > program pattern that I could refer too. I searched online but there
    > are only tools that are available to generate and test the source
    > code. Please provide me the links to the URL and any pseudo code
    > suggestion.


    I gather you are referring to "Mutation Testing". Now I know nothing
    about that topic, but I just read about it on the web, so correct me if I
    am wrong. My understanding is that you take one program and a suite of
    tests for that program then generate a whole load of minor mutations of
    the program in an attempt to find deficiencies in the test suite (i.e.
    incorrect programs that pass the tests).

    I'm not sure exactly what you mean by seed. I assume you don't mean the
    seed for a random number generator. It's also not clear to me how you
    would distinguish between a mutant that passes the tests because it is
    functionally-equivalent mutation of the correct program and a buggy mutant
    that passes the tests because the tests suck. But anyway...

    Writing a program to mutate Java source doesn't sound like fun. Any naive
    approach is going to generate invalid programs more often than not. This
    is not my area of expertise but I guess you would have to parse the source
    into an abstract syntax tree and mutate that. Is it sufficient to simply
    re-order a few statements and adjust a few values, or do the mutations
    need to be more elaborate?

    There seems to be some overlap here with methods used for genetic
    programming, so it might be worth looking at GP tools. However, because
    of the problems with generating invalid programs, GP usually uses Lisp or
    domain-specific languages that are easy to mutate. Languages like Java
    and C++ are generally too much hassle.

    Dan.

    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
    Daniel Dyer, Feb 15, 2007
    #2
    1. Advertising

  3. AnetaKvel

    Daniel Dyer Guest

    On Thu, 15 Feb 2007 23:05:33 -0000, Daniel Dyer <"You don't need it">
    wrote:

    > On Thu, 15 Feb 2007 17:47:45 -0000, AnetaKvel
    > <> wrote:
    >
    >> Hi,
    >> As part of my software testing course I need to submit a program that
    >> generates automatic seed(data mutation) for the given input source
    >> code(in java) and produce the mutation output(with number of dead and
    >> alive mutants).is there any particular automated seed generating
    >> program pattern that I could refer too. I searched online but there
    >> are only tools that are available to generate and test the source
    >> code. Please provide me the links to the URL and any pseudo code
    >> suggestion.


    ....

    > Writing a program to mutate Java source doesn't sound like fun. Any
    > naive approach is going to generate invalid programs more often than
    > not. This is not my area of expertise but I guess you would have to
    > parse the source into an abstract syntax tree and mutate that. Is it
    > sufficient to simply re-order a few statements and adjust a few values,
    > or do the mutations need to be more elaborate?
    >


    We both should have tried Google. I found this pretty easily:

    http://ise.gmu.edu/~ofut/mujava/


    --
    Daniel Dyer
    https://watchmaker.dev.java.net - Evolutionary Algorithm Framework for Java
    Daniel Dyer, Feb 15, 2007
    #3
  4. AnetaKvel

    Chris Uppal Guest

    Daniel Dyer" <"You don't need it wrote:

    > We both should have tried Google. I found this pretty easily:
    >
    > http://ise.gmu.edu/~ofut/mujava/


    Interesting...

    "Who shall test the testers ?" indeed.

    -- chris
    Chris Uppal, Feb 16, 2007
    #4
  5. AnetaKvel

    AnetaKvel Guest

    thank you for the sugestion
    AnetaKvel, Feb 20, 2007
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. cppaddict

    Self-Mutation with Strategy Object

    cppaddict, Sep 2, 2004, in forum: Java
    Replies:
    3
    Views:
    420
    Michiel Konstapel
    Sep 2, 2004
  2. Cagdas Ozgenc
    Replies:
    5
    Views:
    430
    Attila Feher
    Sep 1, 2003
  3. Replies:
    5
    Views:
    359
    Richard Heathfield
    Feb 9, 2006
  4. Turner, GS \(Geoff\)

    Re: Password changing using mutation strings

    Turner, GS \(Geoff\), Feb 9, 2006, in forum: C Programming
    Replies:
    2
    Views:
    1,103
    Keith Thompson
    Feb 9, 2006
  5. Hendrik van Rooyen

    List mutation method gotcha - How well known?

    Hendrik van Rooyen, Mar 13, 2008, in forum: Python
    Replies:
    20
    Views:
    597
Loading...

Share This Page