as2fm.jani_generator.jani_entries.jani_constant.JaniConstant
- class as2fm.jani_generator.jani_entries.jani_constant.JaniConstant(c_name: str, c_type: Type, c_value: JaniExpression | None)
Bases:
object
- __init__(c_name: str, c_type: Type, c_value: JaniExpression | None)
Methods
__init__
(c_name, c_type, c_value)as_dict
()from_dict
(constant_dict)jani_type_from_string
(str_type)Translate a (Jani) type string to a Python type.
jani_type_to_string
(c_type)Translate a Python type to the name of the type in Jani.
name
()value
()- static jani_type_from_string(str_type: str) Type[bool | int | float]
Translate a (Jani) type string to a Python type.
- static jani_type_to_string(c_type: Type[bool | int | float]) str
Translate a Python type to the name of the type in Jani.
// Types // We cover only the most basic types at the moment. // In the remainder of the specification, all requirements like “y must be of type x” are // to be interpreted as “type x must be assignable from y’s type”. var BasicType = schema([ “bool”, // assignable from bool “int”, // numeric; assignable from int and bounded int “real” // numeric; assignable from all numeric types ]); src https://docs.google.com/document/d/ 1BDQIzPBtscxJFFlDUEPIo8ivKHgXT8_X6hz5quq7jK0/edit