Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]


A.29 SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/CLANG

Variable: *clang-mutation-types* [sel/sw/clang]

Cumulative distribution of normalized probabilities of weighted mutations.

Constant: +c-arithmetic-assignment-operators+ [sel/sw/clang]

C arithmetic assignment operators.

Constant: +c-arithmetic-binary-operators+ [sel/sw/clang]

C arithmetic operators on two arguments.

Constant: +c-arithmetic-unary-operators+ [sel/sw/clang]

C arithmetic operators on one arguments.

Constant: +c-bitwise-assignment-operators+ [sel/sw/clang]

C bitwise assignment operators.

Constant: +c-bitwise-binary-operators+ [sel/sw/clang]

C bitwise operators on two arguments.

Constant: +c-bitwise-unary-operators+ [sel/sw/clang]

C bitwise operators on one arguments.

Constant: +c-numeric-types+ [sel/sw/clang]

C Numeric type names.

Constant: +c-pointer-unary-operators+ [sel/sw/clang]

C pointer operators on one arguments.

Constant: +c-relational-operators+ [sel/sw/clang]

C Relational operators.

Constant: +c-sign-unary-operators+ [sel/sw/clang]

C sign operators on one arguments.

Constant: +clang-wrapable-parents+ [sel/sw/clang]

Types which can be wrapped.

Generic Function: add-include [sel/sw/clang] software include

Add an #include directive for an include to software.

Generic Function: add-macro [sel/sw/clang] software macro

Add macro to ‘macros’ of software, unique by hash.

Generic Function: add-semicolon [sel/sw/clang] ast semi-position

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.

Generic Function: add-type [sel/sw/clang] software type

Add type to ‘types’ of software, unique by hash.

Generic Function: adjust-stmt-range [sel/sw/clang] software start end

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

Method: adjust-stmt-range [sel/sw/clang] (clang clang) start end

docfixme

Generic Function: ast-referenceddecl [sel/sw/clang] ast

The declaration referenced by AST.

Generic Function: bad-stmts [sel/sw/clang] software

Return a list of all bad statement asts in software.

Method: bad-stmts [sel/sw/clang] (clang clang)

Return a list of all bad statement ASTs in clang.

Generic Function: binding-for-function [sel/sw/clang] obj functions name arity

docfixme

Structure: clang-macro [sel/sw/clang]

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: clang [sel/sw/clang]

Class precedence list: clang, parseable, compilable, software, oid-object, file, standard-object, slot-object, t

Slots:

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: clang-cut [sel/sw/clang]

Class precedence list: clang-cut, clang-mutation, parseable-cut, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a cut operation on a clang software object.

Class: clang-cut-full [sel/sw/clang]

Class precedence list: clang-cut-full, clang-cut, clang-mutation, parseable-cut, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a cut operation on a clang software object, only cutting full statements.

Class: clang-insert [sel/sw/clang]

Class precedence list: clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform an insertion operation on a clang software object.

Class: clang-insert-full [sel/sw/clang]

Class precedence list: clang-insert-full, clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform an insertion operation on a clang software object, only inserting full statements.

Class: clang-insert-full-same [sel/sw/clang]

Class precedence list: clang-insert-full-same, clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform an insertion operation on a clang software object, only inserting full statements of the same AST class as the preceding statement.

Class: clang-insert-same [sel/sw/clang]

Class precedence list: clang-insert-same, clang-insert, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform an insertion operation on a clang software object, only inserting statements of the same AST class as the preceding statement.

Class: clang-move [sel/sw/clang]

Class precedence list: clang-move, clang-mutation, parseable-move, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a move operation on a clang software object.

Class: clang-mutation [sel/sw/clang]

Class precedence list: clang-mutation, mutation, oid-object, standard-object, slot-object, t

Specialization of the mutation interface for clang software objects.

Class: clang-nop [sel/sw/clang]

Class precedence list: clang-nop, clang-mutation, parseable-nop, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a nop on a clang software object.

Class: clang-promote-guarded [sel/sw/clang]

Class precedence list: clang-promote-guarded, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Promote a guarded compound statement in a clang software object.

Class: clang-replace [sel/sw/clang]

Class precedence list: clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a replace operation on a clang software object.

Class: clang-replace-full [sel/sw/clang]

Class precedence list: clang-replace-full, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a replace operation on a clang software object, only replacing full statements.

Class: clang-replace-full-same [sel/sw/clang]

Class precedence list: clang-replace-full-same, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a replace operation on a clang software object, only replacing full statements of the same AST class.

Class: clang-replace-same [sel/sw/clang]

Class precedence list: clang-replace-same, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a replace operation on a clang software object, only replacing statements of the same AST class.

Class: clang-swap [sel/sw/clang]

Class precedence list: clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a swap operation on a clang software object.

Class: clang-swap-full [sel/sw/clang]

Class precedence list: clang-swap-full, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a swap operation on a clang software object, only swapping full statements.

Class: clang-swap-full-same [sel/sw/clang]

Class precedence list: clang-swap-full-same, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a swap operation on a clang software object, only full statements of the same AST class.

Class: clang-swap-same [sel/sw/clang]

Class precedence list: clang-swap-same, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a swap operation on a clang software object, only swapping statements of the same AST class.

Class: clang-type [sel/sw/clang]

Class precedence list: clang-type, standard-object, slot-object, t

Slots:

Objects representing c/c++ types. Canonicalized on qual and desugared slots.

Class: coalesce-while-loop [sel/sw/clang]

Class precedence list: coalesce-while-loop, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

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: ct+ [sel/sw/clang]

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: cut-decl [sel/sw/clang]

Class precedence list: cut-decl, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Perform a cut operation on a DeclStmt AST in a clang software object.

Variable: *free-var-decay-rate* [sel/sw/clang]

The decay rate for choosing variable bindings.

Variable: *matching-free-function-retains-name-bias* [sel/sw/clang]

The probability that if a free functions’s original name matches a name already in scope, it will keep that name.

Variable: *matching-free-var-retains-name-bias* [sel/sw/clang]

The probability that if a free variable’s original name matches a name already in scope, it will keep that name.

Function: ast-args-equal [sel/sw/clang] args1 args2

Compare two lists as returned by ast-args

Function: ast-i-file [sel/sw/clang] obj ast

Return the file AST is located within in a format suitable for use in a #include.

Function: binding-for-var [sel/sw/clang] obj in-scope name

docfixme

Generic Function: block-p [sel/sw/clang] statement

Check if statement is a block.

Method: block-p [sel/sw/clang] (stmt clang-ast)

docfixme

Function: cpp-scan [sel/sw/clang] str until-fn &key start end skip-first angle-brackets

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 >.

Generic Function: delete-decl-stmts [sel/sw/clang] software block replacements

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.

Method: delete-decl-stmts [sel/sw/clang] (obj clang) (block clang-ast) (replacements list)

docfixme

Generic Function: enclosing-full-stmt [sel/sw/clang] software stmt

Return the first full statement in software holding stmt.

Method: enclosing-full-stmt [sel/sw/clang] (obj clang) (stmt clang-ast)

docfixme

Class: expand-arithmatic-op [sel/sw/clang]

Class precedence list: expand-arithmatic-op, clang-replace, clang-mutation, parseable-replace, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Expand a compound assignment or increment/decrement operation in a clang software object.

Class: explode-for-loop [sel/sw/clang]

Class precedence list: explode-for-loop, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

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’.

Function: ast-range-str [sel/sw/clang] range

Return a short string-rep for the supplied range.

Generic Function: find-or-add-type [sel/sw/clang] obj trace-name &rest args &key &allow-other-keys

Find the type with the given trace-name representation in a execution trace in obj.

Generic Function: find-var-type [sel/sw/clang] software variable

Return the type of variable in software.

Method: find-var-type [sel/sw/clang] (obj clang) (variable list)

Return the type of variable in software

Generic Function: force-include [sel/sw/clang] obj include

Add an #include directive for an include to obj even if such an include already exists in obj.

Function: full-stmt-filter [sel/sw/clang] ast &optional first-pick

Targeting filter returning true if AST is a full statement.

Generic Function: function-body [sel/sw/clang] ast

If AST is a function, return the AST representing its body. * AST potential function AST to query for its body

Generic Function: function-containing-ast [sel/sw/clang] object ast

Return the ast for the function containing AST in object.

Method: function-containing-ast [sel/sw/clang] (clang clang) (ast clang-ast)

Return the function in clang containing AST.

Generic Function: function-decl-p [sel/sw/clang] ast

Is AST a function (or method/constructor/destructor) decl?

Generic Function: get-entry [sel/sw/clang] software

Return the AST of the entry point (main function) in software, or nil if there is no entry point.

Generic Function: good-stmts [sel/sw/clang] software

Return a list of all good statement asts in software.

Method: good-stmts [sel/sw/clang] (clang clang)

Return a list of all good statement ASTs in clang.

Class: rename-variable [sel/sw/clang]

Class precedence list: rename-variable, clang-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Replace a variable in a statement with another in scope variable name.

Function: make-array-subscript-expr [sel/sw/clang] array-expr subscript-expr &rest rest

Create a array subscript expression AST.

Function: make-block [sel/sw/clang] children &rest rest

Create a compount statement AST.

Function: make-break-stmt [sel/sw/clang] &rest rest

Create a break statement AST. * REST additional arguments to ‘make-statement’

Function: make-call-expr [sel/sw/clang] name args syn-ctx &rest rest

Create a call expression AST.

Function: make-cast-expr [sel/sw/clang] type child &rest rest

Create a c-style cast expression AST.

Function: make-for-stmt [sel/sw/clang] syn-ctx initialization condition update body &rest rest

Create a for loop AST.

Function: make-label [sel/sw/clang] name child &rest rest

Create a label AST.

Generic Function: make-literal [sel/sw/clang] value &optional kind &rest rest

Create a literal AST of value.

Class: swap-decls [sel/sw/clang]

Class precedence list: swap-decls, clang-swap, clang-mutation, parseable-swap, parseable-mutation, mutation, oid-object, standard-object, slot-object, t

Slots:

Swap two DeclStmt ASTs in a clang software object.

Function: make-if-stmt [sel/sw/clang] condition then &optional else &rest rest

Create an if statement AST.

Function: make-operator [sel/sw/clang] syn-ctx opcode child-asts &rest rest &key full-stmt &allow-other-keys

Create a unary or binary operator AST.

Function: make-parens [sel/sw/clang] children &rest rest

Create a parenthesis expression AST.

Function: make-statement [sel/sw/clang] class syn-ctx children &key full-stmt guard-stmt opcode declares annotations &allow-other-keys

Create a statement AST of the new-clang type.

Other keys are allowed but are silently ignored.

Function: make-switch-stmt [sel/sw/clang] value cases &rest rest

Create a switch statement AST.

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.

Function: make-var-decl [sel/sw/clang] name type &optional initializer &rest rest

Create a variable declaration AST.

Function: make-var-reference [sel/sw/clang] name type &rest rest

Create a variable reference AST.

Function: make-while-stmt [sel/sw/clang] syn-ctx condition body &rest rest

Create a while loop AST.

Generic Function: name-emptyp [sel/sw/clang] n

Generalized name emptiness check

Generic Function: name= [sel/sw/clang] n1 n2

Generalized name equality for AST names

Function: normalize-flags [sel/sw/clang] dir flags

Normalize the list of compiler flags so all search paths are fully expanded relative to dir.

Function: pick-cut-decl [sel/sw/clang] clang

Return a DeclStmt AST in clang from the ‘bad-stmts’ pool. * clang software object to pick from

Generic Function: pick-for-loop [sel/sw/clang] software

Pick and return a ’for’ loop in software.

Method: pick-for-loop [sel/sw/clang] (obj clang)

Return a for loop in obj from the ‘bad-stmts’ pool. * obj software object to pick from

Generic Function: pick-guarded-compound [sel/sw/clang] software

Pick a guarded compound statement in software.

Method: pick-guarded-compound [sel/sw/clang] (obj clang)

Return a guarded statement in obj from the ‘bad-stmts’ pool. * obj software object to pick from

Function: pick-rename-variable [sel/sw/clang] clang

Pick a statement in clang with a variable and replace with another in scope.

Function: pick-swap-decls [sel/sw/clang] clang

Return two DeclStmt AST in clang from the ‘bad-stmts’ pool. * clang software object to pick from

Generic Function: pick-while-loop [sel/sw/clang] software

Pick and return a ’while’ loop in software.

Method: pick-while-loop [sel/sw/clang] (obj clang)

Return a while loop statement in obj from the ‘bad-stmts’ pool. * obj software object to pick from

Function: random-function-name [sel/sw/clang] protos &key original-name arity

docfixme

Generic Function: random-point-in-function [sel/sw/clang] software prototype

Return the index of a random point in prototype in software. If prototype has an empty function body in software return nil.

Method: random-point-in-function [sel/sw/clang] (clang clang) (function clang-ast)

docfixme

Function: same-class-filter [sel/sw/clang] ast &optional first-pick

Targeting filter returning true if AST and first-pick have the same AST class.

Generic Function: select-intraprocedural-pair [sel/sw/clang] software

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.

Method: select-intraprocedural-pair [sel/sw/clang] (clang clang)

docfixme * clang docfixme

Generic Function: stmt-range [sel/sw/clang] software function

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).

Generic Function: type-decl-string [sel/sw/clang] type

The source text used to declare variables of type. This will have stars on the right, e.g. char**.

Generic Function: type-from-trace-string [sel/sw/clang] trace-string

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.

Generic Function: type-trace-string [sel/sw/clang] type &key qualified

The text used to describe type in an execution trace.

This will have stars on the left, e.g **char.

Generic Function: typedef-type [sel/sw/clang] software type

Return the underlying type if type is a typedef

Function: within-ast-range [sel/sw/clang] range line

Test whether the supplied line is within a range.

Generic Function: wrap-ast [sel/sw/clang] software ast

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.
    }
Method: wrap-ast [sel/sw/clang] (obj clang) (ast clang-ast)

docfixme

Generic Function: wrap-child [sel/sw/clang] software ast index

Wrap index child of AST in software in a compound stmt.

Method: wrap-child [sel/sw/clang] (obj clang) (ast clang-ast) (index integer)

docfixme


Next: , Previous: , Up: Software Evolution Library Index   [Contents][Index]