Next: SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/SUPER-MUTANT, Previous: SOFTWARE-EVOLUTION-LIBRARY/SOFTWARE/SIMPLE, Up: Software Evolution Library Index [Contents][Index]
List of clang C ast-class types.
List of clang C keywords
List of feature-extractors to use as the default set during feature extraction.
Return a list of all possible types of AST nodes for ASTs in software.
Return a list of all possible types of AST nodes for ASTs in clang.
Uses ‘*clang-c-ast-classes*’.
Return the list of possible keywords that may appear in software.
Return the list of possible keywords that may appear in clang.
Uses ‘*clang-c-keywords*’.
Update and return data structure bi-grams with counts of
bi-grams in the ASTs of all statements in software.
Update and return hash-table bi-grams-ht with counts of bi-grams in the
ASTs of all statements in clang.
clang a clang software object
bi-grams-ht a hash-table for storing counts
Return a feature vector counting AST node type bi-grams.
Number of occurrences of AST node type bi-grams in an AST.
Depth of AST in software. The root node has a depth of 0.
Depth of AST in clang. The root node has a depth of 0
clang software object
clang
Update and return data structure bi-grams with counts of
bi-grams in the ASTs of full statements in software.
Update and return hash-table bi-grams-ht with counts of bi-grams in the
ASTs of full statements in clang.
clang a clang software object
bi-grams-ht a hash-table for storing counts
Return a feature vector counting AST node type bi-grams for full statements.
Number of occurrences of AST node type bi-grams in each full statement in an AST.
Count term frequency of keyword in an AST.
Count term frequency of keyword in an AST of clang. Uses ‘auto-count-keyword’
and ‘search-keyword’.
keyword a string whose frequency in the AST is to be counted
clang to search for keyword
Return a vector containing term frequencies for all possible
keywords in software (see also ‘all-keywords’).
The returned feature vector will have one entry for each keyword listed in ‘*clang-c-keywords*’.
Term frequency of keywords in an AST.
Average depth of nodes with type node-type in the ASTs in software.
Average depth of nodes with type node-type in the ASTs in clang.
clang a clang software object
node-type a value to be compared against the ‘ast-class’ of the ASTs in clang
Returns a feature vector of average depth of AST nodes by type.
The length is the number of possible AST node tyes (as determined by
‘all-ast-node-types’). Each element is the average depth of nodes of the
corresponding type in the AST of software.
Average depth of each possible node type in the AST.
Return a vector with counts of occurrences of each possible AST node type.
The returned vector will have one entry for each ast class listed in ‘clang-c-ast-classes’.
Term frequency of AST node types.
Return a list of the node types present in the ASTs in software.
Return a list of the ast classes that occur in clang
Return 1 if AST is a statement matching keyword, 0 otherwise.
Return 1 if AST is a statement matching keyword, 0 otherwise.
* keyword a string, to be compared against the ‘ast-class’ of AST. See
also ‘*clang-c-ast-keywords-auto-count*’.
* AST a clang ast
Return 1-element feature vector of the average depth of ASTs in software.
Average depth of nodes in the AST.
Update and return bi-grams-ht of counts of bi-gram occurrences in items.
Use key to specify a function applied to each item to get a value which will be
paired with another such value to create a key.
Update and return hash table bi-grams-ht with counts of bi-gram occurrences
in items. Use key to specify a function applied to each item to get a value
which will be paired with another such value to create a key.
items a list of elements
key a function applied to items in items to generate values paired up and
used as keys in the hash-table
* bi-grams-ht a hash table mapping pairs of keys to numbers of occurrences
Return a feature-vector containing counts of bi-grams in
software stored in bi-grams.
Return a feature-vector containing counts of bi-grams in clang stored in
hash-table bi-grams.
clang a clang software object
bi-grams a hash-table containing bi-grams counts
Return a vector of the absolute differences between items in VEC1 and VEC2.
For a styleable, extract features to establish baseline feature vectors.
Returns two values: a vector of feature vectors and a vector of metadata.
For a styleable style, extract features to establish baseline feature vectors.
Return two values: a vector of feature vectors and a vector of metadata.
style a styleable software object
features a list of style-features to extract (default: ‘*feature-extractors*’)
For a styleable object, extract a single style-feature.
Updates the corresponding feature-vector and feature-vec-meta data in styleable
and returns two values: the extracted feature vector and its metadata.
For a styleable style object, extract a single style-feature feature.
Updates the corresponding feature-vector and feature-vec-meta data in style and
returns two values: the extracted feature vector and its metadata.
style a styleable software object
feature a style-feature to extract
For a software object, extract a set of features.
Returns two values: a vector of feature vectors and a vector of metadata (used
by feature merge functions).
For a project object, extract a set of features for each software object in
the project and merge the results. Return two values: a vector of feature vectors
and a vector of metadata (used by feature merge functions).
project a project software object
features a list of features to be extracted (default: ‘*feature-extractors*’)
files a list of files on which to extract features (default: ‘all-files’)
For a styleable style, extract a list of style-features features.
Returns two values: a vector of feature vectors and a vector of metadata (used
by feature merge functions).
style a styleable software object
features a list of style-features
Return the maximum depth of the asts in software.
Return the maximum depth of the asts in clang.
All depths are relative to the top-level of the clang software object (not
relative to elements in the list of ASTs).
clang software object
asts list of ASTs for which to determine the depth
Return 1-element feature vector of the max depth of any AST in software.
Return a new vector of the pair-wise maximums for values in VEC1 and VEC2. Metadata, META1 and META2 is ignored.
Return a new vector merging vectors MEANS1 and MEANS2 whose elements are means. Each element of MEANS1 and MEANS2 represents the mean of a set whose size is the corresponding element in vector LENS1 or LENS2, respectively. The result is two values: a vector of the combined means, and a vector of the pair-wise sums of LENS1 and LENS2 (i.e., the sizes of the combined sets each combined mean represents).
Merge two vectors VEC1 and VEC2 which have been normalized using the denominators DENOM1 and DENOM2, respectively
Merge all feature vectors from STYLEABLE1 and STYLEABLE2.
Update and return result to be a ‘styleable’ object containing the merged
feature vectors and metadata.
Merge all feature vectors from STYLE1 and STYLE2. Update and return result
to be a ‘styleable’ object containing the merged feature vectors and metadata.
result a styleable software object in which to save merged vectors. May be
‘eq’ to STYLE1 or STYLE2.
Return 1 if keyword occurs anywhere in the text of an AST in
software, 0 otherwise.
Return 1 if keyword occurs anywhere in the source text of an AST in clang, 0
otherwise. Only searches ASTs whose ‘ast-class’ is in
‘*clang-c-ast-keywords-search-count*’.
keyword a string to be searched for in the ‘source-text’ of AST
clang
Class precedence list: style-feature, standard-object, slot-object, t
Slots:
feature-name — initarg: :feature-name; reader: software-evolution-library/software/styleable:feature-name; writer: (setf software-evolution-library/software/styleable:feature-name)
Name of style feature.
extractor-fn — initarg: :extractor-fn; reader: software-evolution-library/software/styleable:extractor-fn
Feature extractor function, takes a software object and returns a feature vector and metadata necessary to merge feature vectors.
merge-fn — initarg: :merge-fn; reader: software-evolution-library/software/styleable:merge-fn
Function to merge two feature vectors. Takes as input a two feature vectors and their metadata (as returned by the extractor) and returns a new feature vector and updated metadata.
Type of style feature, including a feature extractor and an accompanying merge function for combining feature vectors.
Class precedence list: style-project, styleable, project, software, oid-object, standard-object, slot-object, t
A project with style-features.
Class precedence list: styleable, software, oid-object, standard-object, slot-object, t
Slots:
features — initarg: :features; reader: software-evolution-library/software/styleable:features; writer: (setf software-evolution-library/software/styleable:features)
Ordered list of style features.
feature-vecs — initarg: :feature-vecs; reader: software-evolution-library/software/styleable:feature-vecs; writer: (setf software-evolution-library/software/styleable:feature-vecs)
Vector of feature vectors, same length as features list.
feature-vec-meta — initarg: :feature-vec-meta; reader: software-evolution-library/software/styleable:feature-vec-meta; writer: (setf software-evolution-library/software/styleable:feature-vec-meta)
Vector of feature vector metadata.
Type of software objects that can have style features extracted.
Maximum depth of any node in the AST.
A macro for defining feature extractors.
feature-name a new variable of this name will hold the style-feature object
feature-desc a docstring for the variable feature-name
extractor-fn the name for the function to perform feature extraction
eargs argument to extractor-fn (should just be one, a software object)
extractor-desc a docstring for extractor-fn
ebody function body of extractor-fn
merge-fn the merge function to merge two feature vectors for this feature.
If the function doesn’t exist, margs and mbody should be provided. Otherwise,
they should not be provided.
* margs arguments to the merge function (should be 4: vector1, metadata1,
vector2, metadata2). Not required if merge-fn is already a defined function.
* mbody body of the merge function. Not required if merge-fn is already a
defined function.
Return a copy of vec whose elements have been normalized to sum to 1.
* vec a vector of numeric values.
Convert a set of feature-values into a feature vector.
The elements of the vector are the values corresponding to sorted-keys.
Convert a set of feature-values into a feature vector.
Return a vector whose elements are the values from feature-values that are
mapped to the keys in sorted-keys.
feature-values a hash-table
sorted-keys a list of keys from hash table whose values will be
added to the resulting feature vector
Update uni-grams-ht with counts of uni-gram occurrences in items.
Use key to specify a function applied to each item to generate a value used as
a key. The data structure uni-grams-ht is both updated and returned as
the result.
Update uni-grams-ht with counts of uni-gram occurrences in items.
Use key to specify a function applied to each item to generate a value used as
the hash-table key. The hash-table uni-grams-ht is both updated and returned as
the result
items a list of elements
key a function applied to each item in items to generate a hash-table key
uni-grams-ht a hash table mapping keys to numbers of occurrences
Update feature values for features in project by re-merging feature-vectors
and metadata for all software objects in the project.
project a project object
features a list of style-features whose values are to be re-computed.
May be a subset of the features tracked in project.
* files a list of files on which to extract features (default: ‘all-files’)