concepts.dsl.expression#

Data structures for expressions in a DSL.

All classes extend the basic Expression class. They can be categorized into the following groups:

Under the ValueOutputExpression category, there are a few sub-categories:

Under the ObjectOutputExpression category, there are a few sub-categories:

Under the VariableAssignmentExpression category, there are a few sub-categories:

  • AssignExpression which is the expression that assigns a value to a state variable.

  • ConditionalAssignExpression which is the expression that assigns a value to a state variable conditionally.

  • DeicticAssignExpression which is the expression that assigns values to state variables with deictic expressions (i.e., forall quantifiers).

The most important classes are: VariableExpression, ObjectConstantExpression, ConstantExpression, and FunctionApplicationExpression.

Functions

cvt_expression(expr[, dtype])

Convert an expression compatible object to an expression.

cvt_expression_list(arguments[, dtypes])

Convert a list of expression compatible objects to a list of expressions.

find_free_variables(expr)

get_type(value)

Get the type of the given value.

get_types([args, kwargs])

Get the types of the given arguments and keyword arguments.

is_and_expr(expr)

is_constant_bool_expr(expr)

is_exists_expr(expr)

is_forall_expr(expr)

is_not_expr(expr)

is_object_output_expression(expr)

is_or_expr(expr)

is_value_output_expression(expr)

is_variable_assignment_expression(expr)

iter_exprs(expr)

Iterate over all sub-expressions of the input.

Classes

AndExpression

AssignExpression

BoolExpression

BoolOpType

An enumeration.

ConditionalAssignExpression

ConditionalSelectExpression

Conditional select expression represents the selection of a value based on a condition.

ConstantExpression

Constant expression always returns a constant value.

DeicticAssignExpression

DeicticSelectExpression

ExistsExpression

Expression

Expression is an abstract class for all expressions in the DSL.

ExpressionDefinitionContext

ForallExpression

FunctionApplicationExpression

Function application expression represents the application of a function over a list of arguments.

GeneralizedQuantificationExpression

ListCreationExpression

ListExpansionExpression

ListFunctionApplicationExpression

Function application expression represents the application of a function over a list of arguments.

NotExpression

ObjectConstantExpression

ObjectOutputExpression

OrExpression

PredicateEqualExpression

QuantificationExpression

QuantificationOpType

An enumeration.

ValueOutputExpression

VariableAssignmentExpression

VariableExpression

Exceptions

DSLExpressionError

FunctionApplicationError