Next: SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/CLANG-EXPRESSION, Previous: SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/CIL, Up: Software Evolution Library Index [Contents][Index]
Cumulative distribution of normalized probabilities of weighted mutations.
C arithmetic assignment operators.
C arithmetic operators on two arguments.
C arithmetic operators on one arguments.
C bitwise assignment operators.
C bitwise operators on two arguments.
C bitwise operators on one arguments.
C Numeric type names.
C pointer operators on one arguments.
C Relational operators.
C sign operators on one arguments.
Types which can be wrapped.
Add an #include directive for an include
to software
.
Add macro
to ‘macros’ of software
, unique by hash.
Nondestructuvely add a semicolon before, after or
on both sides of AST. AST is a string or ast node. semi-position
is
:before
, :after
, :both
, or some other value (which means no change.
Add type
to ‘types’ of software
, unique by hash.
Adjust start
and end
so that they represent a valid range for set-range.
The values returned will be STMT1 and STMT2, where STMT1 and STMT2 are both
full statements
docfixme
clang
docfixme
start
docfixme
end
docfixme
The declaration referenced by AST.
Return a list of all bad statement asts in software
.
Return a list of all bad statement ASTs in clang
.
docfixme
obj
docfixme
functions
docfixme
name
docfixme
arity
docfixme
Class precedence list: clang-macro, structure-object, slot-object, t
Representation of a macro in software object including the header the macro is defined within.
Class precedence list: clang, parseable, compilable, software, oid-object, file, standard-object, slot-object, t
Slots:
asts
— initarg: :asts
; reader: software-evolution-library/software/parseable:asts
Deprecated: List of all ASTs.
includes
— initarg: :includes
; reader: software-evolution-library/software/clang:includes
; writer: (setf software-evolution-library/software/clang:includes)
Names of headers included.
types
— initarg: :types
; reader: software-evolution-library/software/clang:types
Hash table of types keyed by hash
id.
macros
— initarg: :macros
; reader: software-evolution-library/software/clang:macros
; writer: (setf software-evolution-library/software/clang:macros)
List of macros.
stmt-asts
— initarg: :stmt-asts
; reader: software-evolution-library/software/clang:stmt-asts
List of statement ASTs which exist within a function body.
non-stmt-asts
— initarg: :non-stmt-asts
; reader: software-evolution-library/software/clang:non-stmt-asts
List of global AST which live outside of any function.
functions
— initarg: :functions
; reader: software-evolution-library/software/clang:functions
Complete functions with bodies.
prototypes
— initarg: :prototypes
; reader: software-evolution-library/software/clang:prototypes
Function prototypes.
symbol-table
— initarg: :symbol-table
; reader: software-evolution-library/software/clang:symbol-table
Map from IDs to objects
name-symbol-table
— initarg: :name-symbol-table
; reader: software-evolution-library/software/clang:name-symbol-table
Map from name strings to declaration objects.
C language (C, C++, c#
, etc...) ASTs using Clang, C language frontend
for llvm
. See http://clang.llvm.org/. This is for ASTs from Clang 9+.
Class precedence list: clang-cut, clang-mutation, parseable-cut, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a cut operation on a clang software object.
Class precedence list: clang-cut-full, clang-cut, clang-mutation, parseable-cut, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a cut operation on a clang software object, only cutting full statements.
Class precedence list: clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform an insertion operation on a clang software object.
Class precedence list: clang-insert-full, clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform an insertion operation on a clang software object, only inserting full statements.
Class precedence list: clang-insert-full-same, clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform an insertion operation on a clang software object, only inserting full statements of the same AST class as the preceding statement.
Class precedence list: clang-insert-same, clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform an insertion operation on a clang software object, only inserting statements of the same AST class as the preceding statement.
Class precedence list: clang-move, clang-mutation, parseable-move, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a move operation on a clang software object.
Class precedence list: clang-mutation, mutation, oid-object, standard-object, slot-object, t
Specialization of the mutation interface for clang software objects.
Class precedence list: clang-nop, clang-mutation, parseable-nop, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a nop on a clang software object.
Class precedence list: clang-promote-guarded, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Promote a guarded compound statement in a clang software object.
Class precedence list: clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a replace operation on a clang software object.
Class precedence list: clang-replace-full, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a replace operation on a clang software object, only replacing full statements.
Class precedence list: clang-replace-full-same, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a replace operation on a clang software object, only replacing full statements of the same AST class.
Class precedence list: clang-replace-same, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a replace operation on a clang software object, only replacing statements of the same AST class.
Class precedence list: clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a swap operation on a clang software object.
Class precedence list: clang-swap-full, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a swap operation on a clang software object, only swapping full statements.
Class precedence list: clang-swap-full-same, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a swap operation on a clang software object, only full statements of the same AST class.
Class precedence list: clang-swap-same, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a swap operation on a clang software object, only swapping statements of the same AST class.
Class precedence list: clang-type, standard-object, slot-object, t
Slots:
qual
— initarg: :qual
; reader: software-evolution-library/software/clang:type-qual
Translation of the qualType attribute of clang json type objects
desugared
— initarg: :desugared
; reader: software-evolution-library/software/clang:type-desugared
Translation of the desugaredQualType attribute of clang json objects
i-file
— initarg: :i-file
; reader: software-evolution-library/software/clang:type-i-file
Header file where the type is located.
reqs
— initarg: :reqs
; reader: software-evolution-library/software/clang:type-reqs
List of types that are required to understand this type.
decl
— initarg: :decl
; reader: software-evolution-library/software/clang:type-decl
Source text of the type declaration.
Objects representing c/c++
types. Canonicalized
on qual
and desugared
slots.
Class precedence list: coalesce-while-loop, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Select a ’while’ loop and coalesce it into a ’for’ loop.
This mutation will transform 'a
;while(b)
;C’ into ’for(A;b
;C)’.
Class precedence list: ct-plus, standard-object, slot-object, t
Wrapper object that is intended to behave like
sel/sw/clang:clang-type
. This means it must have some information
that is not strictly speaking about types at all (storage class).
Class precedence list: cut-decl, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Perform a cut operation on a DeclStmt AST in a clang software object.
The decay rate for choosing variable bindings.
The probability that if a free functions’s original name matches a name already in scope, it will keep that name.
The probability that if a free variable’s original name matches a name already in scope, it will keep that name.
Compare two lists as returned by ast-args
Return the file AST is located within in a format suitable for use in a #include.
docfixme
obj
docfixme
in-scope
docfixme
name
docfixme
Check if statement
is a block.
docfixme
obj
docfixme
stmt
docfixme
Scan string str
from start
to end
, skipping over parenthesized
c/c++
things, and respecting c/c++
comments and tokens, until
either the end is reached, or a substring satisfying until-fn
is found. Returns nil
on no match, or the satisfying position
of the match. If angle-brackets
is true then try to handle
template brackets <
and >
.
Return mutation ops applying replacements
to block
in software
.
replacements
is a list holding lists of an id
to replace, and the new
variables to replace use of the variables declared in stmt id
.
docfixme
obj
docfixme
block
docfixme
replacements
docfixme
Return the first full statement in software
holding stmt
.
docfixme
obj
docfixme
stmt
docfixme
Class precedence list: expand-arithmatic-op, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Expand a compound assignment or increment/decrement operation in a clang software object.
Class precedence list: explode-for-loop, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Select a ’for’ loop and explode it into it’s component parts.
This mutation will transform ’for(A;b
;C)’ into 'a
;while(b)
;C’.
Return a short string-rep for the supplied range.
Find the type with the given trace-name
representation in
a execution trace in obj
.
Return the type of variable
in software
.
Return the type of variable
in software
Add an #include directive for an include
to obj
even if such an include
already exists in obj
.
Targeting filter returning true if AST is a full statement.
first-pick
first targeting function pick
If AST is a function, return the AST representing its body. * AST potential function AST to query for its body
Return the ast for the function containing AST in object
.
Return the function in clang
containing AST.
clang
software object containing AST and its parent function
Is AST a function (or method/constructor/destructor) decl?
Return the AST of the entry point (main function) in software
,
or nil
if there is no entry point.
Return a list of all good statement asts in software
.
Return a list of all good statement ASTs in clang
.
Class precedence list: rename-variable, clang-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Replace a variable in a statement with another in scope variable name.
Create a array subscript expression AST.
array-expr
AST expression with an array type
subscript-expr
AST expression with an integer type to be used as array
subscript
Create a compount statement AST.
children
children of the AST node
Create a break statement AST. * REST additional arguments to ‘make-statement’
Create a call expression AST.
name
Name of the function
args
list of ast arguments to the function
syn-ctx
surrounding syntactic context of the AST node
Create a c-style cast expression AST.
type
clang-type to cast the expression to
child
ast to be cast
Create a for loop AST.
syn-ctx
surrounding syntactic context of the AST node
initialization
ast for the initialization of the loop
condition
ast for the loop conditional
update
ast for the loop update
body
ast for the loop body
Create a label AST.
name
name of the label
child
ast to be labeled
Create a literal AST of value
.
kind
specified the type of literal to
create (:integer, :unsigned, :float, :string, :quoated-string).
Defaults based on the type of value
value
value for the literal AST to have
Class precedence list: swap-decls, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Slots:
targeter
— initarg: :targeter
; reader: software-evolution-library/software-evolution-library:targeter
A function from software ->
targets.
picker
— initarg: :picker
; reader: software-evolution-library/software-evolution-library:picker
A function from software ->
random target.
Swap two DeclStmt ASTs in a clang software object.
Create an if statement AST.
condition
ast for the if statement conditional
then
ast for the if statement then body
else
optional ast for the if statement else
Create a unary or binary operator AST.
syn-ctx
surrounding syntactic context of the AST node
opcode
name of the operation for Unary/BinaryOp AST nodes
child-asts
children of the AST node
Create a parenthesis expression AST.
children
children of the AST node
Create a statement AST of the new-clang
type.
class
class name of the AST node
syn-ctx
surrounding syntactic context of the AST node
children
children of the AST node
full-stmt
boolean indicating if the AST represents a complete statement
guard-stmt
boolean indicating if the AST is a control-flow predicate
opcode
name of the operation for Unary/BinaryOp AST nodes
declares
identifiers declared by the AST node
Other keys are allowed but are silently ignored.
Create a switch statement AST.
value
the AST of the expression to switch on
cases
list of cases
syn-ctx
surrounding syntactic context of the AST node
Each element of cases
has the form ((values ...) stmts ), where each
value is an integer (or t
for the default case) and each stmt is a
full-statement AST. Don’t forget to include BreakStmt ASTs as they
will not be generated automatically.
Create a variable declaration AST.
name
name of the variable to declare
type
type of the variable
initializer
optional AST to initialize the variable
Create a variable reference AST.
name
name of the variable to reference
type
type of the variable to reference
Create a while loop AST.
syn-ctx
surrounding syntactic context of the AST node
condition
ast conditional for the while statement
body
ast body for the while statement
Generalized name emptiness check
Generalized name equality for AST names
Normalize the list of compiler flags
so all search paths are fully
expanded relative to dir
.
dir
base directory for all relative paths
flags
list of compiler flags
Return a DeclStmt AST in clang
from the ‘bad-stmts’ pool.
* clang
software object to pick from
Pick and return a ’for’ loop in software
.
Return a for loop in obj
from the ‘bad-stmts’ pool.
* obj
software object to pick from
Pick a guarded compound statement in software
.
Return a guarded statement in obj
from the ‘bad-stmts’ pool.
* obj
software object to pick from
Pick a statement in clang
with a variable and replace with another in scope.
Return two DeclStmt AST in clang
from the ‘bad-stmts’ pool.
* clang
software object to pick from
Pick and return a ’while’ loop in software
.
Return a while loop statement in obj
from the ‘bad-stmts’ pool.
* obj
software object to pick from
docfixme
protos
docfixme
original-name
docfixme
arity
docfixme
Return the index of a random point in prototype
in software
.
If prototype
has an empty function body in software
return nil.
docfixme
clang
docfixme
function
docfixme
Targeting filter returning true if AST and first-pick
have the same AST class.
first-pick
first targeting function pick
Randomly select an AST within a function body and then select another point within the same function. If there are no ASTs within a function body, return null.
docfixme
* clang
docfixme
The indices of the first and last statements in a function. Return as a list of (first-index last-index). Indices are positions in the list returned by (asts software).
The source text used to declare variables of type
.
This will have stars on the right, e.g. char**.
Create a clang-type from a name used in an execution trace.
The resulting type will not be added to any clang object and will not have a
valid hash.
* trace-string
type name as expressed in an execution trace.
The text used to describe type
in an execution trace.
This will have stars on the left, e.g **char.
Return the underlying type if type
is a typedef
Test whether the supplied line is within a range.
Wrap AST in software
in a compound statement.
Known issue with ifdefs --
consider this snippet:
if (x) { var=1; #ifdef SOMETHING } else if (y) { var=2; #endif } |
it will transform this into:
if (x) { var=1; #ifdef SOMETHING } else { if (y) { var=2; #endif } // spurious -- now won't compile. } |
docfixme
obj
docfixme
docfixme
Wrap index
child of AST in software
in a compound stmt.
docfixme
obj
docfixme
docfixme
index
docfixme