Types#

JANI-model defines a type system for expressions.

class momba.model.Type[source]#

A type.

property is_numeric#

Indicates whether the type is numeric or not.

abstract is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

types.INT = IntegerType()#
types.REAL = RealType()#
types.BOOL = BoolType()#
types.CLOCK = ClockType()#
types.CONTINUOUS = ContinuousType()#
momba.model.types.array_of(element)[source]#

Constructs an array type with the given element type.

momba.model.types.set_of(element)[source]#

Constructs a set type with the given element type.

Class Hierarchy#

class momba.model.types.NumericType[source]#
property is_numeric#

Indicates whether the type is numeric or not.

bound(lower, upper)[source]#

Bounds the numeric type with the given bounds.

class momba.model.types.IntegerType[source]#

The integer type.

Hint

Instead of instantiating new objects of this class use INT.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.RealType[source]#

The real type.

Hint

Instead of instantiating new objects of this class use REAL.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.BoolType[source]#

The boolean type.

Hint

Instead of instantiating new objects of this class use BOOL.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.ClockType[source]#

The clock type.

Hint

Instead of instantiating new objects of this class use CLOCK.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.ContinuousType[source]#

The continuous type.

Hint

Instead of instantiating new objects of this class use CONTINUOUS.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.BoundedType(base, lower_bound, upper_bound)[source]#

A bounded numeric type.

base#

The numeric base type.

lower_bound#

The optional lower bound for values of the type.

upper_bound#

The optional upper bound for values of the type.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.ArrayType(element)[source]#

An array type.

element#

The type of the elements of the array.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.

class momba.model.types.SetType(element)[source]#

An set type.

element#

The type of the elements of the set.

is_assignable_from(typ)[source]#

Checks whether values of the other type can be assigned to targets of this type.