as2fm.jani_generator.jani_entries.jani_expression.JaniDistribution
- class as2fm.jani_generator.jani_entries.jani_expression.JaniDistribution(expression: dict)
Bases:
JaniExpression
A class representing a Jani Distribution (a random variable).
At the moment, this is only meant to support Uniform distributions between 0.0 and 1.0
- __init__(expression: dict)
Methods
__init__
(expression)as_dict
()Convert the distribution to a dictionary, ready to be converted to JSON.
Provide the expression as an identifier, if possible.
Provide the expression as a literal (JaniValue), if possible.
Provide the expression as an operator, if possible.
Return the config.
Return the distribution type set in the object.
Get the type of the expression.
is_valid
()Distribution validity check.
Replace the default SCXML event prefix with the provided replacement.
- as_dict() Dict[str, Any]
Convert the distribution to a dictionary, ready to be converted to JSON.
- as_identifier() None
Provide the expression as an identifier, if possible. None otherwise.
- as_literal() None
Provide the expression as a literal (JaniValue), if possible. None otherwise.
- as_operator() None
Provide the expression as an operator, if possible. None otherwise.
- get_dist_args() List[int | float]
Return the config. arguments of the distribution.
- get_dist_type() str
Return the distribution type set in the object.
- get_expression_type() JaniExpressionType
Get the type of the expression.
- is_valid()
Distribution validity check.
- replace_event(_: str | None) JaniDistribution
Replace the default SCXML event prefix with the provided replacement.