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.

as_identifier()

Provide the expression as an identifier, if possible.

as_literal()

Provide the expression as a literal (JaniValue), if possible.

as_operator()

Provide the expression as an operator, if possible.

get_dist_args()

Return the config.

get_dist_type()

Return the distribution type set in the object.

get_expression_type()

Get the type of the expression.

is_valid()

Distribution validity check.

replace_event(_)

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.