Package-level declarations

Types

Link copied to clipboard

Represents an assignment of a group of expressions (in the simplest case: one) from the right hand side to the left-hand side.

Link copied to clipboard

A binary operation expression, such as "a + b". It consists of a left hand expression (lhs), a right hand expression (rhs) and an operatorCode.

Link copied to clipboard

A statement which contains a list of statements. A common example is a function body within a FunctionDeclaration.

Link copied to clipboard

An expression, which calls another function. It has a list of arguments (list of Expressions) and is connected via the INVOKES edge to its FunctionDeclaration.

Link copied to clipboard

Represent a list/set/map comprehension or similar expression. It contains four major components: The statement, the variable, the iterable and a predicate which are combined to something like [statement(variable) : variable in iterable if predicate(variable)].

Link copied to clipboard

This class holds the variable, iterable and predicate of the CollectionComprehension.

Link copied to clipboard

Represents an expression containing a ternary operator: var x = condition ? valueIfTrue : valueIfFalse;

Link copied to clipboard

Represents a call to a constructor, usually as an initializer.

Link copied to clipboard
Link copied to clipboard
abstract class Expression : Statement, HasType

Represents one expression. It is used as a base class for multiple different types of expressions. The only constraint is, that each expression has a type.

Link copied to clipboard
Link copied to clipboard

This node represents the initialization of an "aggregate" object, such as an array or a struct or object. The actual use can greatly differ by the individual language frontends. In order to be as accurate as possible when propagating types, the InitializerListExpression.type property MUST be set before adding any values to InitializerListExpression.initializers.

Link copied to clipboard

Represents a key / value pair, often found in languages that allow associative arrays or objects, such as Python, Golang or JavaScript.

Link copied to clipboard

This expression denotes the usage of an anonymous / lambda function. It connects the inner anonymous function to the user of a lambda function with an expression.

Link copied to clipboard

Represents a literal value, meaning the value is fixed and not depending on the runtime evaluation of the expression.

Link copied to clipboard

Represents a CallExpression to something which is a member of an object (the base). For example obj.toString(). The type of the callee property should be a MemberExpression (unless a translation error occurred). One notable exception are function pointer calls to class methods in C++, in which the callee is a BinaryOperator with a .* operator.

Link copied to clipboard

Represents access to a member of a RecordDeclaration, such as obj.property. Another common use-case is access of a member function (method) as part of the MemberCallExpression.callee property of a MemberCallExpression.

Link copied to clipboard

Expressions of the form new Type[] that represents the creation of an array, mostly used in combination with a VariableDeclaration.

Link copied to clipboard

Represents the creation of a new object through the new keyword.

Link copied to clipboard

This special call expression is used when an operator (such as a BinaryOperator) is overloaded. In this case, we replace the original BinaryOperator with an OperatorCallExpression, which points to its respective OperatorDeclaration.

Link copied to clipboard
class ProblemExpression(var problem: String = "", var problemType: ProblemNode.ProblemType = ProblemNode.ProblemType.TRANSLATION) : Expression, ProblemNode

A node where the statement could not be translated by the graph. We use ProblemExpressions whenever the CPG library requires an Expression.

Link copied to clipboard

Represents the specification of a range (e.g., of an array). Usually used in combination with an SubscriptExpression as the SubscriptExpression.subscriptExpression.

Link copied to clipboard

An expression, which refers to something which is declared, e.g. a variable. For example, the expression a = b, which itself is an AssignExpression, contains two References, one for the variable a and one for variable b, which have been previously been declared.

Link copied to clipboard
typealias ReferenceTag = Int
Link copied to clipboard

A BinaryOperator which only evaluates BinaryOperator.rhs if BinaryOperator.lhs fulfils some condition. For the operators in de.fraunhofer.aisec.cpg.frontends.HasShortCircuitOperators.conjunctiveOperators, the rhs has to evaluate to "true" or so to continue on the lhs, whereas for the operators in de.fraunhofer.aisec.cpg.frontends.HasShortCircuitOperators.disjunctiveOperators, the lhs has to evaluate to "false" (or similar).

Link copied to clipboard

Represents the subscription or access of an array of the form array[index], where both array (arrayExpression) and index (subscriptExpression) are of type Expression. CPP can overload operators thus changing semantics of array access.

Link copied to clipboard

Represets a Type used as an expression for instance when instantiating templates

Link copied to clipboard

Models C++ operations that inspect types. These are typeof, sizeof, typeid, alignofand are stored as string in their operator code.

Link copied to clipboard

A unary operator expression, involving one expression and an operator, such as a++.

Link copied to clipboard
class ValueConverter : AttributeConverter<Any?, Any?>