as2fm.as2fm_common.common

Common functionalities used throughout the toolchain.

Functions

convert_string_to_int_array(value)

Convert a string to a list of integers.

get_array_type_and_sizes(in_sequence)

Extract the type and size(s) of the provided multi-dimensional array.

get_default_expression_for_type(field_type)

Generate a default expression for a field type.

get_padded_array(array_to_pad, ...)

Given a N-Dimensional list, add padding for each level, depending on the provided sizes.

is_array_type(field_type)

Check if the field type is an array type.

is_comment(element)

Check if an element is a comment.

is_valid_array(in_sequence)

Check that the array is composed by a list of (int, float, list).

is_valid_variable_name(var_name)

Check if a string can represent a variable name in JANI and SCXML.

remove_namespace(tag)

If a tag has a namespace, remove it.

string_as_bool(value_str)

Special case for boolean conversion for configuration parameters.

value_to_string_expr(value)

Return a python object (to be a jani value) as a string.

value_to_type(value)

Return the type of a python object (to be a jani value).