Next: SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/PARSEABLE-PROJECT, Previous: SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/LLVM, Up: Software Evolution Library Index [Contents][Index]
Returns t if ancestor is an ancestor of target-ast in obj.
Append non-AST text to obj genome.
obj object to modify with text
text text to append to the genome
Append non-AST text to OBJ’s genome preamble.
obj object to modify with text
text text to append to the genome preamble
Return (ast . source-range) for each AST in obj.
Return a list of ASTs in software contained in range.
Return a list of all bad asts in software.
Return a list of all bad asts in obj
Replace parent with a conflict node obtained by
combining the conflict nodes of child-list, and whose elements are
version of parent with those various combinations.
Class precedence list: conflict-ast, functional-tree-ast, node, identity-ordering-mixin, ast, stored-hash, standard-object, slot-object, t
Slots:
child-alist — initarg: :child-alist; reader: software-evolution-library/software/parseable:conflict-ast-child-alist
Child-Alist of the AST.
default-children — initarg: :default-children; reader: software-evolution-library/software/parseable:conflict-ast-default-children
Default-Children of the AST.
Node representing several possibilities for an AST. The mapping from a conflicted AST into a regular AST is as follows: for a given conflict key, and for each conflict node, get the list of children corresponding to that key (default if the key is not present), and splice that list of children in place of the conflict node in its parent’s children list.
A boolean value that indicates whether tabs should be used instead of spaces. This can be set to modify the behavior of #’source-text and #’convert
Return given AST annotation.
Set the given AST annotation to v.
Invoke ‘ast-combine-list-hash-values’ on args.
Return the path to AST in obj.
Return the start and end of AST in software (if any) as source
locations.
Deprecated: Return a list of all non-root ASTs in obj.
Ensure the ‘asts‘ field is set on obj prior to access.
Deprecated: List of all ASTs.
Return a list of all ASTs in the project obj.
Return a list of ASTs in software containing loc.
Return a list of all bad mutation targets in
software matching filter.
Return a list of all bad mutation targets in obj matching filter.
obj software object to query for bad mutation targets
filter predicate taking an AST parameter to allow for filtering
Return a list of all bad statement ASTs in clang matching filter.
clang software object to query for bad statements
filter predicate taking an AST parameter to allow for filtering
Returns enclosing scope of AST.
Return the enclosing scope of AST in obj.
obj tree-sitter software object
Return the enclosing scope of AST in obj.
obj javascript software object
AST ast to return the enclosing scope for
Return the enclosing scope of AST in obj.
obj python software object
AST ast to return the enclosing scope for
docfixme
software docfixme
docfixme
Find the deepest node in AST satisfying function.
Search through the parents of AST for the first one that
satisfies predicate.
Convert alist to struct representation.
Class precedence list: functional-tree-ast, node, identity-ordering-mixin, ast, stored-hash, standard-object, slot-object, t
Slots:
annotations — initarg: :annotations; reader: software-evolution-library/software/parseable:ast-annotations
A-list of annotations.
Base class for sel functional tree ASTs.
An applicative tree structure is used to hold the ASTs.
Types directly referenced within AST.
Compute all the types mentioned in AST. ast-types is
the types used at a node; this function closes over all the nodes
in the AST. software is the software object to which AST belongs.
Get a sane indent-children default for AST.
Return the function ast associated with the
funcall-ast if it exists in obj.
Given a c software object and a call-expression, return the function definition.
Return the parent node of AST in obj
Return the parent nodes of AST in obj not including AST.
Return the first ancestor of AST in software which is a full statement.
Returns nil if no full statement parent is found.
Return the first ancestor of AST in software which is a full stmt.
Returns nil if no full-stmt is found.
clang software object containing AST and its parents
Functions used (but not defined) within the AST.
Return all functions used (but not defined) within AST.
obj javascript software object containing AST
Return all functions used (but not defined) within AST. The returned
value will be of the form (list FUNCTION-ATTRS) where function-attrs is a
list of form (function-name unused unused num-params).
obj python software object containing AST
Compute all the unbound funs in AST. ast-unbound-funs is
the unbound funs at a node; this function closes over all the nodes
in the AST. software is the software object to which AST belongs.
Variables used (but not defined) within the AST.
Return all variables used (but not defined) within AST.
obj javascript software object containing AST
Return all variables used (but not defined) within AST.
obj python software object containing AST
docfixme
software docfixme
docfixme
Return all variables in enclosing scopes.
Return all variables in enclosing scopes.
obj software object containing AST and its enclosing scopes
Return all variables in enclosing scopes.
obj clang software object containing AST and its enclosing scopes
Return a list of all good mutation targets in
software matching filter.
Return a list of all good mutation targets in obj matching filter.
obj software object to query for good mutation targets
filter predicate taking an AST parameter to allow for filtering
Return a list of all good statement ASTs in clang matching filter.
clang software object to query for good statements
filter predicate taking an AST parameter to allow for filtering
Return t if AST is indentable. This
is useful for ASTs that may have newline literals.
Returns t if the AST is a full statement, nil otherwise.
Return true if possible-parent-ast is a parent of AST in obj, nil
otherwise.
obj software object containing AST and its parents
possible-parent-ast node to find as a parent of AST
Parse genome of software into an AST representation.
There are some requirements for the ASTs constructed by this method:
ast-node will be ignored.
Other methods in on parseable objects, specifically ‘ast-can-recurse’
and ‘equal?' depend on these invariants.
Optional argument source-text holds the source code string to parse
into ASTs. If not supplied it is generally assumed to already be set
in the software’s genome.
Class precedence list: parseable, software, oid-object, file, standard-object, slot-object, t
Slots:
genome — initarg: :genome; reader: software-evolution-library/software-evolution-library:genome; writer: (setf software-evolution-library/software-evolution-library:genome)
Lazily parsed AST representation of the code.
Parsed AST tree software representation.
Class precedence list: 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 parseable software object.
Class precedence list: 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 parseable software object.
Class precedence list: parseable-mutation, mutation, oid-object, standard-object, slot-object, t
Specialization of the mutation interface for parseable software objects.
Class precedence list: 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 parseable software object.
Class precedence list: 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 parseable software object.
The number of spaces per tab. This can be set to modify the behavior of #’source-text and #’convert
Return true if AST represents an assignment to var.
Class precedence list: ast, standard-object, slot-object, t
Base class for all ASTs in sel. This class acts as a tag
for objects to allow method dispatch on generic AST objects regardless of
whether they inherit from the functional trees library.
Return the end of AST in software, as a source location.
Return the start of AST in software, as a source location.
Combine a list of conflict-asts and other things into the components of a single conflict-ast
Return a list of all good asts in software.
Return a list of all good asts in obj
Replace variable and function references, returning a new AST.
Replace variable and function references, returning a new AST.
var-replacements list of old-name, new-name pairs defining the rebinding
fun-replacements list of old-function-info, new-function-info pairs defining
the rebinding
Perform any modifications to AST (e.g. variable rebinding)
to allow for successful mutation of software at pt.
Perform any modifications to AST (e.g. variable rebinding)
to allow for successful mutation of software at pt.
Bind free variables and function in AST to concrete values
required for successful mutation in clang at pt
clang object to be mutated
clang
pt node where mutation is to occur
Return all top-level ASTs in obj.
Return all top-level ASTs in obj.
* obj software object to search for roots
Return lists of variables in each enclosing scope.
Each variable is represented by an alist containing :name, :decl, :type,
and :scope.
Scopes are returned innermost-first.
Return lists of variables in each enclosing scope of AST.
Each variable is represented by an alist containing :name, :decl, and :scope.
obj python software object
AST ast to return the scopes for
docfixme
software docfixme
docfixme
Select suitable crossover point in A and b. The point is
represented as a path which refers to a node in both software objects.
If no suitable point is found the returned point may be nil.
docfixme
docfixme
b docfixme
Returns t if target-ast has the same path or a super-path
of SHARED-PATH-AST’s path in obj.
Return the children of AST sorted in textual order.
Return the source code corresponding to an AST,
optionally writing to stream.
Class precedence list: stored-hash, standard-object, slot-object, t
Slots:
stored-hash — initarg: :stored-hash
A cached hash.
Mixin for stored-hash slot
Cumulative distribution of normalized probabilities of weighted mutations.
Deprecated: Return the AST in obj at index.
If possible, only use when dealing with legacy code.
obj object to retrieve ASTs for
index nth AST to retrieve
A hash value for the AST, which is a nonnegative integer. It should be the case that (equal? x y) implies (eql (ast-hash x) (ast-hash y)), and that if (not (equal? x y)) then the equality of the hashes is unlikely.
Return a list of ASTs in obj intersecting range.
Return a list of built-in identifiers available in software.
Return the AST children of AST. If the keyword
recursive is passed, recursive AST children will also be returned.
Traverse tree collecting every node that satisfies predicate.
Merge conflict ast nodes CA1 and CA2, their alists and default values.
Walk up the genome in obj starting at AST, searching for
an AST that satisfies predicate that occurs before reference-ast.
Get the indentation for AST given parents.
Get the indentation at AST when it is an inner-whitespace AST. This is handled differently than other ASTs because it should be considered part of the parent.
Return the parent nodes of AST in obj including AST.
Deprecated: Return the index of AST in obj.
If possible, only use when dealing with legacy code.
obj object to query for the index of AST
Get the interleaved text for obj.
Return an alist mapping parameters of a function
in obj to its arguments in funcall-ast.
Map the arguments of funcall-ast to its relevant function call in obj.
The mapping will be from argument ast to parameter ast in an alist.
Class precedence list: parseable-insert, 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 an insertion operation on a parseable software object.
Class precedence list: 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 parseable software object.
Pick ASTs from first-pool and optionally second-pool.
first-pool and second-pool are methods on software which return a list
of ASTs. An optional filter function having the signature ’f ast
&optional first-pick’, may be passed, returning true if the given AST
should be included as a possible pick or false (nil) otherwise.
Prepend non-AST text to obj genome.
obj object to modify with text
text text to prepend to the genome
Bind free variables and functions in the mutation to concrete values. Additionally perform any updates to the software object required for successful mutation.
Bind free variables and functions in the mutation to concrete values. Additionally perform any updates to the software object required for successful mutation (e.g. adding includes/types/macros), returning the mutation operations to be performed as an association list.
obj object to be mutated
mut mutation to be applied
Bind free variables and functions in the mutation to concrete values. Additionally perform any updates to the software object required for successful mutation (e.g. adding includes/types/macros), returning the mutation operations to be performed as an association list.
obj object to be mutated
mut mutation to be applied
Wrapper around ‘recontextualize-mutation’ to allow for parsing and rebinding of variables and functions in fodder snippets prior to fodder mutations.
obj clang software object to be modified
mutation operations to be performed
Convert struct to alist representation.