|
@@ -282,127 +282,119 @@ Apart from the minimal syntax, the Modelverse supports a wide library of functio
|
|
|
These functions are all built on top of the previously defined constructs.
|
|
|
A list of these functions is shown below.
|
|
|
|
|
|
-* Boolean function value_eq(a: Element, b: Element)
|
|
|
-* Boolean function value_neq(a: Element, b: Element)
|
|
|
-* Boolean function bool_and(a: Boolean, b: Boolean)
|
|
|
-* Boolean function bool_or(a: Boolean, b: Boolean)
|
|
|
-* Boolean function bool_not(a: Boolean)
|
|
|
-* Element function create_node()
|
|
|
-* Element function create_edge(a: Element, b: Element)
|
|
|
-* Element function create_value(a: Element)
|
|
|
-* Boolean function is_edge(a: Element)
|
|
|
-* Integer function read_nr_out(a: Element)
|
|
|
-* Element function read_out(a: Element, b: Integer)
|
|
|
-* Integer function read_nr_in(a: Element)
|
|
|
-* Element function read_in(a: Element, b: Integer)
|
|
|
-* Element function read_edge_src(a: Element)
|
|
|
-* Element function read_edge_dst(a: Element)
|
|
|
-* Boolean function delete_element(a: Element)
|
|
|
-* Boolean function element_eq(a: Element, b: Element)
|
|
|
-* Boolean function element_neq(a: Element, b: Element)
|
|
|
-* Float function cast_i2f(a: Integer)
|
|
|
-* String function cast_i2s(a: Integer)
|
|
|
-* Boolean function cast_i2b(a: Integer)
|
|
|
-* Integer function cast_f2i(a: Float)
|
|
|
-* Boolean function cast_f2b(a: Float)
|
|
|
-* String function cast_f2s(a: Float)
|
|
|
-* Integer function cast_s2i(a: String)
|
|
|
-* Float function cast_s2f(a: String)
|
|
|
-* Boolean function cast_s2b(a: String)
|
|
|
-* Integer function cast_b2i(a: Boolean)
|
|
|
-* Float function cast_b2f(a: Boolean)
|
|
|
-* String function cast_b2s(a: Boolean)
|
|
|
-* String function cast_e2s(a: Element)
|
|
|
-* String function cast_a2s(a: Action)
|
|
|
-* String function cast_v2s(a: Element)
|
|
|
-* String function cast_id2s(a: Element)
|
|
|
-* Element function dict_add(a: Element, b: Element, c: Element)
|
|
|
-* Element function dict_add_fast(a: Element, b: Element, c: Element)
|
|
|
-* Element function dict_delete(a: Element, b: Element)
|
|
|
-* Element function dict_delete_node(a: Element, b: Element)
|
|
|
-* Element function dict_read(a: Element, b: Element)
|
|
|
-* Element function dict_read_edge(a: Element, b: Element)
|
|
|
-* Element function dict_read_node(a: Element, b: Element)
|
|
|
-* Integer function dict_len(a: Element)
|
|
|
-* Boolean function dict_in(a: Element, b: Element)
|
|
|
-* Boolean function dict_in_node(a: Element, b: Element)
|
|
|
-* Element function dict_keys(a: Element)
|
|
|
-* Float function float_addition(a: Float, b: Float)
|
|
|
-* Float function float_subtraction(a: Float, b: Float)
|
|
|
-* Float function float_multiplication(a: Float, b: Float)
|
|
|
-* Float function float_division(a: Float, b: Float)
|
|
|
-* Float function float_neg(a: Float)
|
|
|
-* Boolean function float_gt(a: Float, b: Float)
|
|
|
-* Boolean function float_gte(a: Float, b: Float)
|
|
|
-* Boolean function float_lt(a: Float, b: Float)
|
|
|
-* Boolean function float_lte(a: Float, b: Float)
|
|
|
-* Integer function integer_addition(a: Integer, b: Integer)
|
|
|
-* Integer function integer_subtraction(a: Integer, b: Integer)
|
|
|
-* Integer function integer_multiplication(a: Integer, b: Integer)
|
|
|
-* Integer function integer_division(a: Integer, b: Integer)
|
|
|
-* Integer function integer_modulo(a: Integer, b: Integer)
|
|
|
-* Boolean function integer_gt(a: Integer, b: Integer)
|
|
|
-* Boolean function integer_gte(a: Integer, b: Integer)
|
|
|
-* Boolean function integer_lt(a: Integer, b: Integer)
|
|
|
-* Boolean function integer_lte(a: Integer, b: Integer)
|
|
|
-* Boolean function integer_neg(a: Integer)
|
|
|
-* Element function list_read(a: Element, b: Integer)
|
|
|
-* Element function list_append(a: Element, b: Element)
|
|
|
-* Element function list_insert(a: Element, b: Element, c: Integer)
|
|
|
-* Element function list_delete(a: Element, b: Integer)
|
|
|
-* Integer function list_len(a: Element)
|
|
|
-* Boolean function list_in(a : Element, b : Element)
|
|
|
-* Element function set_add(a: Element, b: Element)
|
|
|
-* Element function set_add_node(a: Element, b: Element)
|
|
|
-* Element function set_pop(a: Element)
|
|
|
-* Element function set_read(a : Element)
|
|
|
-* Element function set_remove(a: Element, b: Element)
|
|
|
-* Boolean function set_in(a: Element, b: Element)
|
|
|
-* Element function set_remove_node(a: Element, b: Element)
|
|
|
-* Element function set_in_node(a: Element, b: Element)
|
|
|
-* Integer function set_len(a: Element)
|
|
|
-* String function string_join(a: String, b: String)
|
|
|
-* String function string_get(a: String, b: Integer)
|
|
|
-* String function string_substr(a: String, b: Integer, c: Integer)
|
|
|
-* Integer function string_len(a: String)
|
|
|
-* Element function string_split(a: String, b: String)
|
|
|
-* Boolean function string_startswith(a: String, b: String)
|
|
|
-* String function log(a: String)
|
|
|
-* Element function read_root()
|
|
|
-* Element function read_taskroot()
|
|
|
-* Element function input()
|
|
|
-* Element function output(a : Element)
|
|
|
-* Boolean function is_physical_int(a : Element)
|
|
|
-* Boolean function is_physical_float(a : Element)
|
|
|
-* Boolean function is_physical_string(a : Element)
|
|
|
-* Boolean function is_physical_action(a : Element)
|
|
|
-* Boolean function is_physical_boolean(a : Element)
|
|
|
-* Boolean function has_value(a : Element)
|
|
|
-* Float function time()
|
|
|
-* String function hash(a : String)
|
|
|
-* Void function sleep(a : Float)
|
|
|
-* Void function interruptable_sleep(a : Float)
|
|
|
-* Element function exec(a : Element)
|
|
|
-* Element function resolve(var_name : String)
|
|
|
-* Boolean function has_input()
|
|
|
-* Element function list_pop(lst : Element, index : Integer)
|
|
|
-* Element function list_pop_final(lst : Element)
|
|
|
-* Element function set_copy(set : Element)
|
|
|
-* String function set_to_string(set : Element)
|
|
|
-* String function list_to_string(set : Element)
|
|
|
-* String function dict_to_string(dict : Element)
|
|
|
-* Element function set_overlap(sa : Element, sb : Element)
|
|
|
-* Element function set_equality(sa : Element, sb : Element)
|
|
|
-* Element function dict_eq(da : Element, db : Element)
|
|
|
-* Element function dict_copy(dict : Element)
|
|
|
-* Element function set_to_list(s : Element)
|
|
|
-* Element function create_tuple(a : Element, b : Element)
|
|
|
-* Void function dict_overwrite(a : Element, b : Element, c : Element)
|
|
|
-* Void function set_merge(sa : Element, sb : Element)
|
|
|
-* Element function make_reverse_dictionary(dict : Element)
|
|
|
-* Element function set_create()
|
|
|
-* Element function list_create()
|
|
|
-* Element function dict_create()
|
|
|
-* String function reverseKeyLookup(a: Element, b: Element)
|
|
|
-* Element function reverseKeyLookupMulti(a: Element, b: Element)
|
|
|
-* Element function dict_values(dict : Element)
|
|
|
+* *Boolean function value_eq(a: Element, b: Element)*
|
|
|
+* *Boolean function value_neq(a: Element, b: Element)*
|
|
|
+* *Boolean function bool_and(a: Boolean, b: Boolean)*
|
|
|
+* *Boolean function bool_or(a: Boolean, b: Boolean)*
|
|
|
+* *Boolean function bool_not(a: Boolean)*
|
|
|
+* *Element function create_node()*
|
|
|
+* *Element function create_edge(a: Element, b: Element)*
|
|
|
+* *Element function create_value(a: Element)*
|
|
|
+* *Boolean function is_edge(a: Element)*
|
|
|
+* *Integer function read_nr_out(a: Element)*
|
|
|
+* *Element function read_out(a: Element, b: Integer)*
|
|
|
+* *Integer function read_nr_in(a: Element)*
|
|
|
+* *Element function read_in(a: Element, b: Integer)*
|
|
|
+* *Element function read_edge_src(a: Element)*
|
|
|
+* *Element function read_edge_dst(a: Element)*
|
|
|
+* *Boolean function delete_element(a: Element)*
|
|
|
+* *Boolean function element_eq(a: Element, b: Element)*
|
|
|
+* *Boolean function element_neq(a: Element, b: Element)*
|
|
|
+* *Float function cast_float(a: Element)*
|
|
|
+* *String function cast_string(a: Element)*
|
|
|
+* *Boolean function cast_boolean(a: Element)*
|
|
|
+* *Integer function cast_integer(a: Element)*
|
|
|
+* *String function cast_id(a: Element)*
|
|
|
+* *String function cast_value(a: Element)*
|
|
|
+* *Element function dict_add(a: Element, b: Element, c: Element)*
|
|
|
+* *Element function dict_add_fast(a: Element, b: Element, c: Element)*
|
|
|
+* *Element function dict_delete(a: Element, b: Element)*
|
|
|
+* *Element function dict_delete_node(a: Element, b: Element)*
|
|
|
+* *Element function dict_read(a: Element, b: Element)*
|
|
|
+* *Element function dict_read_edge(a: Element, b: Element)*
|
|
|
+* *Element function dict_read_node(a: Element, b: Element)*
|
|
|
+* *Integer function dict_len(a: Element)*
|
|
|
+* *Boolean function dict_in(a: Element, b: Element)*
|
|
|
+* *Boolean function dict_in_node(a: Element, b: Element)*
|
|
|
+* *Element function dict_keys(a: Element)*
|
|
|
+* *Float function float_addition(a: Float, b: Float)*
|
|
|
+* *Float function float_subtraction(a: Float, b: Float)*
|
|
|
+* *Float function float_multiplication(a: Float, b: Float)*
|
|
|
+* *Float function float_division(a: Float, b: Float)*
|
|
|
+* *Float function float_neg(a: Float)*
|
|
|
+* *Boolean function float_gt(a: Float, b: Float)*
|
|
|
+* *Boolean function float_gte(a: Float, b: Float)*
|
|
|
+* *Boolean function float_lt(a: Float, b: Float)*
|
|
|
+* *Boolean function float_lte(a: Float, b: Float)*
|
|
|
+* *Integer function integer_addition(a: Integer, b: Integer)*
|
|
|
+* *Integer function integer_subtraction(a: Integer, b: Integer)*
|
|
|
+* *Integer function integer_multiplication(a: Integer, b: Integer)*
|
|
|
+* *Integer function integer_division(a: Integer, b: Integer)*
|
|
|
+* *Integer function integer_modulo(a: Integer, b: Integer)*
|
|
|
+* *Boolean function integer_gt(a: Integer, b: Integer)*
|
|
|
+* *Boolean function integer_gte(a: Integer, b: Integer)*
|
|
|
+* *Boolean function integer_lt(a: Integer, b: Integer)*
|
|
|
+* *Boolean function integer_lte(a: Integer, b: Integer)*
|
|
|
+* *Boolean function integer_neg(a: Integer)*
|
|
|
+* *Element function list_read(a: Element, b: Integer)*
|
|
|
+* *Element function list_append(a: Element, b: Element)*
|
|
|
+* *Element function list_insert(a: Element, b: Element, c: Integer)*
|
|
|
+* *Element function list_delete(a: Element, b: Integer)*
|
|
|
+* *Integer function list_len(a: Element)*
|
|
|
+* *Boolean function list_in(a : Element, b : Element)*
|
|
|
+* *Element function set_add(a: Element, b: Element)*
|
|
|
+* *Element function set_add_node(a: Element, b: Element)*
|
|
|
+* *Element function set_pop(a: Element)*
|
|
|
+* *Element function set_read(a : Element)*
|
|
|
+* *Element function set_remove(a: Element, b: Element)*
|
|
|
+* *Boolean function set_in(a: Element, b: Element)*
|
|
|
+* *Element function set_remove_node(a: Element, b: Element)*
|
|
|
+* *Element function set_in_node(a: Element, b: Element)*
|
|
|
+* *Integer function set_len(a: Element)*
|
|
|
+* *String function string_join(a: String, b: String)*
|
|
|
+* *String function string_get(a: String, b: Integer)*
|
|
|
+* *String function string_substr(a: String, b: Integer, c: Integer)*
|
|
|
+* *Integer function string_len(a: String)*
|
|
|
+* *Element function string_split(a: String, b: String)*
|
|
|
+* *Boolean function string_startswith(a: String, b: String)*
|
|
|
+* *String function log(a: String)*
|
|
|
+* *Element function read_root()*
|
|
|
+* *Element function read_taskroot()*
|
|
|
+* *Element function input()*
|
|
|
+* *Element function output(a : Element)*
|
|
|
+* *Boolean function is_physical_int(a : Element)*
|
|
|
+* *Boolean function is_physical_float(a : Element)*
|
|
|
+* *Boolean function is_physical_string(a : Element)*
|
|
|
+* *Boolean function is_physical_action(a : Element)*
|
|
|
+* *Boolean function is_physical_boolean(a : Element)*
|
|
|
+* *Boolean function is_physical_none(a : Element)*
|
|
|
+* *Boolean function is_error(a : Element)*
|
|
|
+* *Boolean function has_value(a : Element)*
|
|
|
+* *Float function time()*
|
|
|
+* *String function hash(a : String)*
|
|
|
+* *Void function sleep(a : Float)*
|
|
|
+* *Void function interruptable_sleep(a : Float)*
|
|
|
+* *Element function exec(a : Element)*
|
|
|
+* *Element function resolve(var_name : String)*
|
|
|
+* *Boolean function has_input()*
|
|
|
+* *Element function list_pop(lst : Element, index : Integer)*
|
|
|
+* *Element function list_pop_final(lst : Element)*
|
|
|
+* *Element function set_copy(set : Element)*
|
|
|
+* *String function set_to_string(set : Element)*
|
|
|
+* *String function list_to_string(set : Element)*
|
|
|
+* *String function dict_to_string(dict : Element)*
|
|
|
+* *Element function set_overlap(sa : Element, sb : Element)*
|
|
|
+* *Element function set_equality(sa : Element, sb : Element)*
|
|
|
+* *Element function dict_eq(da : Element, db : Element)*
|
|
|
+* *Element function dict_copy(dict : Element)*
|
|
|
+* *Element function set_to_list(s : Element)*
|
|
|
+* *Element function create_tuple(a : Element, b : Element)*
|
|
|
+* *Void function dict_overwrite(a : Element, b : Element, c : Element)*
|
|
|
+* *Void function set_merge(sa : Element, sb : Element)*
|
|
|
+* *Element function make_reverse_dictionary(dict : Element)*
|
|
|
+* *Element function set_create()*
|
|
|
+* *Element function list_create()*
|
|
|
+* *Element function dict_create()*
|
|
|
+* *String function reverseKeyLookup(a: Element, b: Element)*
|
|
|
+* *Element function reverseKeyLookupMulti(a: Element, b: Element)*
|
|
|
+* *Element function dict_values(dict : Element)*
|