The Boa Programming Guide - Domain-Specific Functions
Boa provides several useful built-in functions designed to ease common software repository mining tasks. For reference, these functions are described in this section.
Basic Functions
Returns a snapshot of ChangedFiles. A snapshot is the last version of a file before a given time t
(if no time is given, now()
is used). If any filters
are given, they are used to filter out files. The file kind is checked against each string and must match one or more filters. Matches are performed by comparing the filter against the start of the file kind.
Does the data
contain a file of the specified type? This compares based on the given file extension
. Valid dsl_type
s are: Project, CodeRepository, and Revision.
Is the given log
message indicating it is a fixing revision? A message is considered indicating a bug fix if it matches a set of regular expressions.
Is the given revision rev
's log message indicating it is a fixing revision? A message is considered indicating a bug fix if it matches a set of regular expressions.
Returns true
if the kind k
starts with the string s
. Valid dsl_type
s are: FileKind.
Returns true
if the expression e
is of kind LITERAL and the literal matches the string s
.
Graph Functions
@since 2019-10
Returns a string representation of the graph g
, in Graphviz DOT format.
@since 2019-10
Returns a control-dependence graph (CDG) for the given Method m
.
@since 2019-10
Returns a data-dependence graph (DDG) for the given Method m
.
@since 2019-10
Returns a program-dependence graph (PDG) for the given Method m
.
@since 2019-10
Returns the value associated with the graph node n
for the current traversal, or the optional traversal t
. The type of the value returned depends on the return type of the traversal.