The Boa Programming Guide - Domain-Specific Types

Custom domain-specific types for Boa are described in this section. Note that when a type is shown for an attribute, the type might contain a question mark ("?"). This indicates that field may or may not be defined. When accessing these fields, be sure to first check if the given attr exists for a given object o: if (def(o.attr))

Project Top-level type, represents a single project on the forge
AttributeTypeDescription
audiencesarray of stringA list of the target audiences for the project
code_repositoriesarray of CodeRepositoryA list of all code repositories associated with this project
created_datetime?The time the project was created
databasesarray of stringA list of all databases used by the project
descriptionstring?A description of the project
developersarray of PersonA list of all software developers currently on the project
donationsbool?If true, this project explicitly states it accepts donations
homepage_urlstring?A URL to the project's homepage
idstringUnique identifier for the project
interfacesarray of stringA list of all interfaces supported by the project
licensesarray of stringA list of all licenses used by the project
maintainersarray of PersonA list of all people currently maintaining the project
namestringThe name of the project
operating_systemsarray of stringA list of all OSes supported by the project
programming_languagesarray of stringA list of all programming languages used by the project
project_urlstringA URL to the project's page on the forge
topicsarray of stringA list of self-categorized topics the project belongs to
enum ForgeKind Describes the kind of forge
AttributeDescription
APACHEApache
GITHUBGitHub.com
OTHERAny other kind of forge
QUALITASQualitas Corpus
SOURCEFORGESourceForge.net
CodeRepository A source code repository (SVN, CVS, Git, etc)
AttributeTypeDescription
kindRepositoryKindThe kind of code repository (SVN, GIT, etc)
revisionsarray of RevisionAll of the revisions contained in the code repository
urlstringThe URL to access the code repository
Revision A single revision inside a CodeRepository
AttributeTypeDescription
authorPersonThe person who authored the revision, if known, otherwise the same as committer
commit_datetimeThe time the revision was committed
committerPersonThe person who committed the revision
filesarray of ChangedFileA list of all files committed in the revision
idstringA unique identifier for the revision
logstringThe log message attached to the revision
enum RepositoryKind Describes the kind of code repository
AttributeDescription
BZRFor Bazaar code repositories
CVSFor CVS code repositories
GITFor Git code repositories
HGFor Mercurial code repositories
OTHERAny other code repository
SVNFor Subversion code repositories
ChangedFile A file committed in a Revision
AttributeTypeDescription
changeChangeKindThe kind of change for this file
kindFileKindThe kind of file
namestringThe full name and path of the file
enum FileKind Describes the kind of the file
AttributeDescription
BINARYThe file represents a binary file
OTHERThe file's type was unknown
SOURCE_JAVA_ERRORThe file represents a Java source file that had a parse error
SOURCE_JAVA_JLS2The file represents a Java source file that parsed without error as JLS2
SOURCE_JAVA_JLS3The file represents a Java source file that parsed without error as JLS3
SOURCE_JAVA_JLS4The file represents a Java source file that parsed without error as JLS4
SOURCE_JAVA_JLS8The file represents a Java source file that parsed without error as JLS8
TEXTThe file represents a text file
XMLThe file represents an XML file
ASTRoot Container class that holds a file's parsed AST
AttributeTypeDescription
importsarray of stringThe imported namespaces and types
namespacesarray of NamespaceThe top-level namespaces in the file
Namespace A namespace (aka, package) in a source file
AttributeTypeDescription
declarationsarray of DeclarationDeclarations contained in this namespace
modifiersarray of ModifierAny modifiers/annotations on the namespace
namestringThe name of the namespace
Declaration A type declaration, such as a class or interface
AttributeTypeDescription
fieldsarray of VariableThe fields in the declaration
generic_parametersarray of TypeAny generic parameters to this declaration
kindTypeKindThe kind of this declaration
methodsarray of MethodThe methods in the declaration
modifiersarray of ModifierThe modifiers/annotations on this declaration
namestringThe name of this declaration
nested_declarationsarray of DeclarationAny nested declarations
parentsarray of TypeThe explicitly named parent type(s) of this declaration
Type A type in an AST
AttributeTypeDescription
kindTypeKindThe kind of the type
namestringThe name of the type
Method A method declaration
AttributeTypeDescription
argumentsarray of VariableThe arguments the method takes
exception_typesarray of TypeThe list of exceptions thrown by this method
generic_parametersarray of TypeThe list of generic parameters for this method
modifiersarray of ModifierA list of all modifiers on the variable
namestring?The name of the method
return_typeTypeThe type returned from the method; if the method returns nothing, this type will be void
statementsarray of StatementThe statements in the method body. Note that most methods (in C-like languages, such as Java) contain a single statement of type BLOCK, which contains the list of statements within it!
Variable A variable declaration - can be a field, local, parameter, etc
AttributeTypeDescription
initializerExpression?If the variable has an initial assignment, the expression is stored here
modifiersarray of ModifierA list of all modifiers on the variable
namestringThe name of the variable
variable_typeTypeThe type of the variable
Statement A single statement
AttributeTypeDescription
conditionExpression?
expressionExpression?
initializationsarray of Expression
kindStatementKindThe kind of statement
statementsarray of Statement
type_declarationDeclaration?
updatesarray of Expression
variable_declarationVariable?
Expression A single expression
AttributeTypeDescription
annotationModifier?
anon_declarationDeclaration?
expressionsarray of Expression
generic_parametersarray of Type
is_postfixbool?
kindExpressionKindThe kind of expression
literalstring?
methodstring?
method_argsarray of Expression
new_typeType?
variablestring?
variable_declsarray of Variable
Modifier A single modifier
AttributeTypeDescription
annotation_membersarray of stringIf the kind is ANNOTATION, then a list of all members explicitly assigned values
annotation_namestring?If the kind is ANNOTATION, then the name of the annotation
annotation_valuesarray of ExpressionIf the kind is ANNOTATION, then a list of all values that were assigned to members
kindModifierKindThe kind of modifier
otherstring?If the kind is OTHER, the modifier string from the source code
visibilityVisibility?A kind of visibility modifier
enum StatementKind The kind of statement
AttributeDescription
ASSERT
BLOCK
BREAK
CASE
CATCH
CONTINUE
DO
EMPTY
EXPRESSION
FOR
IF
LABEL
OTHERAny other statement
RETURN
SWITCH
SYNCHRONIZED
THROW
TRY
TYPEDECL
WHILE
enum ExpressionKind The kind of expression
AttributeDescription
ANNOTATION
ARRAYINDEX
ARRAYINIT
ASSIGN
ASSIGN_ADD
ASSIGN_BITAND
ASSIGN_BITOR
ASSIGN_BITXOR
ASSIGN_DIV
ASSIGN_LSHIFT
ASSIGN_MOD
ASSIGN_MULT
ASSIGN_RSHIFT
ASSIGN_SUB
ASSIGN_UNSIGNEDRSHIFT
BIT_AND
BIT_LSHIFT
BIT_NOT
BIT_OR
BIT_RSHIFT
BIT_UNSIGNEDRSHIFT
BIT_XOR
CAST
CONDITIONAL
EQ
GT
GTEQ
LITERAL
LOGICAL_AND
LOGICAL_NOT
LOGICAL_OR
LT
LTEQ
METHODCALL
NEQ
NEW
NEWARRAY
NULLCOALESCE
OP_ADD
OP_DEC
OP_DIV
OP_INC
OP_MOD
OP_MULT
OP_SUB
OTHERAny other expression
PAREN
TYPECOMPARE
VARACCESS
VARDECL
enum ModifierKind The kind of modifier
AttributeDescription
ABSTRACTAn abstract modifier
ANNOTATIONAn annotation modifier
FINALA final modifier
OTHERAny other modifier - the value is in the Modifier's other attribute
STATICA static modifier
SYNCHRONIZEDA synchronized modifier
VISIBILITYA Visibility modifier - the value is in the Modifier's visibility attribute
enum Visibility A visibility modifier
AttributeDescription
NAMESPACEA namespace (aka, default, aka package) visibility modifier
PRIVATEA private modifier
PROTECTEDA protected modifier
PUBLICA public modifier
enum TypeKind The kinds of types in an AST
AttributeDescription
ANNOTATIONAn annotation type
ANONYMOUSAn anonymous type
CLASSA class type
DELEGATEA delegate type
ENUMAn enumerated type
GENERICA generic type
INTERFACEAn interface type
OTHERAny other kind of Type
STRUCTA C-style struct
Person A unique person's information
AttributeTypeDescription
emailstringThe person's email address, if known
real_namestringThe person's real name, if known, otherwise the same as username
usernamestringThe person's username
enum ChangeKind Describes the kind of change for the file
AttributeDescription
ADDEDThe file did not already exist and was added
DELETEDThe file was deleted
MODIFIEDThe file already existed and was modified
CFG @since 2019-10 - A control-flow graph
AttributeTypeDescription
nodesset of CFGNodeThe set of nodes in the graph
CDG @since 2019-10 - A control-dependence graph
AttributeTypeDescription
nodesset of CDGNodeThe set of nodes in the graph
DDG @since 2019-10 - A data-dependence graph
AttributeTypeDescription
nodesset of DDGNodeThe set of nodes in the graph
PDG @since 2019-10 - A program-dependence graph
AttributeTypeDescription
nodesset of PDGNodeThe set of nodes in the graph
CFGNode @since 2019-10 - A single node in a control-flow graph
AttributeTypeDescription
kindNodeTypeThe kind of node
idintThe node's unique ID in the graph
namestringA name for the node, derived from the statement/expression it represents
stmtStatement?The statement, if any, this ndoe is associated with in the original AST.
exprExpression?The expression, if any, this ndoe is associated with in the original AST.
predecessorsarray of CFGNodeA list of all predecessor nodes - nodes with an out edge to the curernt node
successorsarary of CFGNodeA list of all successor nodes - nodes with an in edge from the current node
useVariablesset of stringThe set of all variables used by this node
defVariablesstringThe variables defined by this node
CDGNode @since 2019-10 - A single node in a control-dependence graph
AttributeTypeDescription
kindNodeTypeThe kind of node
idintThe node's unique ID in the graph
stmtStatement?The statement, if any, this ndoe is associated with in the original AST.
exprExpression?The expression, if any, this ndoe is associated with in the original AST.
predecessorsarray of CDGNodeA list of all predecessor nodes - nodes with an out edge to the curernt node
successorsarary of CDGNodeA list of all successor nodes - nodes with an in edge from the current node
cfg_nodeCFGNode?The CFGNode related to this CDGNode, if any
DDGNode @since 2019-10 - A single node in a data-dependence graph
AttributeTypeDescription
kindNodeTypeThe kind of node
idintThe node's unique ID in the graph
stmtStatement?The statement, if any, this ndoe is associated with in the original AST.
exprExpression?The expression, if any, this ndoe is associated with in the original AST.
predecessorsarray of DDGNodeA list of all predecessor nodes - nodes with an out edge to the curernt node
successorsarary of DDGNodeA list of all successor nodes - nodes with an in edge from the current node
PDGNode @since 2019-10 - A single node in a program-dependence graph
AttributeTypeDescription
kindNodeTypeThe kind of node
idintThe node's unique ID in the graph
stmtStatement?The statement, if any, this ndoe is associated with in the original AST.
exprExpression?The expression, if any, this ndoe is associated with in the original AST.
predecessorsarray of PDGNodeA list of all predecessor nodes - nodes with an out edge to the curernt node
successorsarary of PDGNodeA list of all successor nodes - nodes with an in edge from the current node
CFGEdge @since 2019-10 - A single edge in a control-flow graph
AttributeTypeDescription
labelEdgeLabelThe edge's label, indicating what kind of edge it is
srcCFGNodeThe edge's source node
destCFGNodeThe edge's destination node
CDGEdge @since 2019-10 - A single edge in a control-dependence graph
AttributeTypeDescription
labelEdgeLabelThe edge's label, indicating what kind of edge it is
srcCDGNodeThe edge's source node
destCDGNodeThe edge's destination node
DDGEdge @since 2019-10 - A single edge in a data-dependence graph
AttributeTypeDescription
labelEdgeLabelThe edge's label, indicating what kind of edge it is
srcDDGNodeThe edge's source node
destDDGNodeThe edge's destination node
PDGEdge @since 2019-10 - A single edge in a program-dependence graph
AttributeTypeDescription
labelEdgeLabelThe edge's label, indicating what kind of edge it is
srcPDGNodeThe edge's source node
destPDGNodeThe edge's destination node
enum NodeType @since 2019-10 - The type of a graph node
AttributeDescription
CONTROLA node with a control statement (such as if or loops)
ENTRYNodes added to the graph to indicate entry or exit
METHODIncludes a method call (may lead to external graphs)
OTHERA normal/sequential node
enum EdgeType @since 2019-10 - The type of a graph edge
AttributeDescription
CONTROLA control dependency edge
DATAA data dependency edge
enum EdgeLabel @since 2019-10 - The label added to a graph edge
AttributeDescription
NILNo label - a normal edge
DEFAULTA normal, sequential edge
TRUEIndicates a true branch from a control node
FALSEIndicates a false branch from a control node
BACKEDGEA loop back-edge
EXITEDGEAn exit edge from a loop
VARDEFA variable definition edge
enum TraversalDirection @since 2019-10 - The direction data flows in a program analysis traversal
AttributeDescription
FORWARDData flows forwards in the graph
BACKWARDData flows backwards in the graph
enum TraversalKind @since 2019-10 - The kind of graph traversal to perform
AttributeDescription
DFS
POSTORDER
REVERSEPOSTORDER
WORKLIST_POSTORDER
WORKLIST_REVERSEPOSTORDER
ITERATIVE
RANDOM
HYBRID