Expression¶
- class Expression(self: stormpy.expressions.Expression, other_expression: stormpy.expressions.Expression)¶
Bases:
pybind11_objectHolds an expression
- static And(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Conjunction(
- arg0: collections.abc.Sequence[stormpy.expressions.Expression],
- static Disjunction(
- arg0: collections.abc.Sequence[stormpy.expressions.Expression],
- static Divide(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Eq(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Geq(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Greater(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Iff(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Implies(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Leq(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Less(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Minus(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Modulo(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Multiply(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Neq(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Or(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- static Plus(
- arg0: stormpy.expressions.Expression,
- arg1: stormpy.expressions.Expression,
- property arity¶
The arity of the expression
- contains_variable(
- self: stormpy.expressions.Expression,
- variables: collections.abc.Set[stormpy.expressions.Variable],
Check if the expression contains any of the given variables.
- contains_variables(self: stormpy.expressions.Expression) bool¶
Check if the expression contains variables.
- evaluate_as_bool(self: stormpy.expressions.Expression) bool¶
Get the boolean value this expression evaluates to
- evaluate_as_double(self: stormpy.expressions.Expression) float¶
Get the double value this expression evaluates to
- evaluate_as_int(self: stormpy.expressions.Expression) int¶
Get the integer value this expression evaluates to
- evaluate_as_rational(self: stormpy.expressions.Expression) stormpy.numbers.Rational¶
Get the rational number this expression evaluates to
- get_identifier(self: stormpy.expressions.Expression) str¶
Retrieves the identifier associated with this expression if this expression is a variable
- get_operand(
- self: stormpy.expressions.Expression,
- operand_index: SupportsInt | SupportsIndex,
Get the operand at the given index
- get_variables(self: stormpy.expressions.Expression) set[stormpy.expressions.Variable]¶
Get the variables
- has_boolean_type(self: stormpy.expressions.Expression) bool¶
Check if the expression is a boolean
- has_integer_type(self: stormpy.expressions.Expression) bool¶
Check if the expression is an integer
- has_rational_type(self: stormpy.expressions.Expression) bool¶
Check if the expression is a rational
- property is_function_application¶
True iff the expression is a function application (of any sort
- is_literal(self: stormpy.expressions.Expression) bool¶
Check if the expression is a literal
- is_variable(self: stormpy.expressions.Expression) bool¶
Check if the expression is a variable
- property manager¶
Get the manager
- property operator¶
The operator of the expression (if it is a function application)
- simplify(self: stormpy.expressions.Expression) stormpy.expressions.Expression¶
Simplify expression
- substitute(
- self: stormpy.expressions.Expression,
- substitution_map: collections.abc.Mapping[stormpy.expressions.Variable, stormpy.expressions.Expression],
- property type¶
Get the Type