muJava++ 1.6.2 mujava2 framework prototype and hotfixes
mujava2 framework
This release contains the first prototype of the new mujava2 framework.
This new framework is located in package mujava2 and a main class can be used as a playground to test the new functionalities (this class is found in mujava2.api.TestMJ2). This new framework also offers an Api class but it's not tested yet.
Some of the features that offer this new framework are:
- A way to represent mutants as an AST and a set of mutations instead of a mutated AST or just a (original node, mutated node) tuple. This representation is defined by the class
mujava2.api.program.MutatedASTand the AST is represented by the classmujava2.api.program.JavaAST - Given a MutatedAST instance a mutant can be written without modifying the ast.
- Mutations in a MutatedAST can be applied and restored (undo the applied mutations) per class, method and/or method and line.
- MutatedAST supports many mutations and every instance can have a MutatedAST as a parent to represent generations.
Bug fixes
- When defining a method to mutate using it's signature instead of using comma to separate the type now the separator will be ";" for example : foo(String;int;List)
- Type checking in PRVO operators regarding primitive to Object assignment (this checking also involves operations like comparisons).
- The code necessary in PRVO_WRITER to write wrapped primitive type expressions mutants (obj == true => obj == new Boolean(true)) was missing.
- mujava.op.util.Mutator#compatibleAssignType(OJClass, OJClass, boolean) when called with Object, a primitive type and false should've returned false. Instead it was evaluating Object, the wrapper type of the primitive type and returning true.
- When running mutations score, mutant information will be showed before compiling the mutant (this information was being shown only for compiling mutants).
- A wrong parameter was being used when checking compatible types in the sameLenght PRVO method.