|
@@ -21,7 +21,7 @@ Boolean function lola_format(model : Element):
|
|
|
|
|
|
all_places = allInstances(model, "PN/Place")
|
|
|
log("ALL PLACES")
|
|
|
- log(cast_i2s(list_len(all_places)))
|
|
|
+ log(cast_string(list_len(all_places)))
|
|
|
place_output = "PLACE "
|
|
|
marking_output = "MARKING "
|
|
|
while (set_len(all_places) > 0):
|
|
@@ -36,7 +36,7 @@ Boolean function lola_format(model : Element):
|
|
|
marking_output = string_join(marking_output, ", ")
|
|
|
marking_output = string_join(marking_output, name)
|
|
|
marking_output = string_join(marking_output, ": ")
|
|
|
- marking_output = string_join(marking_output, cast_i2s(tokens))
|
|
|
+ marking_output = string_join(marking_output, cast_string(tokens))
|
|
|
|
|
|
if list_len(all_places) == 0:
|
|
|
place_output = string_join(place_output, ";")
|
|
@@ -61,7 +61,7 @@ Boolean function lola_format(model : Element):
|
|
|
association = set_pop(associations)
|
|
|
place = readAssociationSource(model, association)
|
|
|
weight = read_attribute(model, association, "weight")
|
|
|
- if cast_s2i(weight) > 0:
|
|
|
+ if cast_integer(weight) > 0:
|
|
|
transition_output = string_join(transition_output, read_attribute(model, place, "name"))
|
|
|
transition_output = string_join(transition_output, ": ")
|
|
|
transition_output = string_join(transition_output, weight)
|
|
@@ -78,7 +78,7 @@ Boolean function lola_format(model : Element):
|
|
|
association = set_pop(associations)
|
|
|
place = readAssociationDestination(model, association)
|
|
|
weight = read_attribute(model, association, "weight")
|
|
|
- if cast_s2i(weight) > 0:
|
|
|
+ if cast_integer(weight) > 0:
|
|
|
transition_output = string_join(transition_output, read_attribute(model, place, "name"))
|
|
|
transition_output = string_join(transition_output, ": ")
|
|
|
transition_output = string_join(transition_output, weight)
|
|
@@ -96,23 +96,23 @@ Boolean function lola_format(model : Element):
|
|
|
name = read_attribute(model, place, "name")
|
|
|
tokens = read_attribute(model, place, "tokens")
|
|
|
query = string_join(name, ' = ')
|
|
|
- query = string_join(query, cast_i2s(tokens))
|
|
|
+ query = string_join(query, cast_string(tokens))
|
|
|
|
|
|
log("PETRINET OUTPUT")
|
|
|
log(lola_net)
|
|
|
log("\n QUERY OUTPUT")
|
|
|
log(query)
|
|
|
- output = string_join("{\"petrinet\":\"", lola_net)
|
|
|
- output = string_join(output, "\" , \"query\":\"")
|
|
|
- output = string_join(output, query)
|
|
|
- output = string_join(output, "\"}")
|
|
|
+ outp = string_join("{\"petrinet\":\"", lola_net)
|
|
|
+ outp = string_join(outp, "\" , \"query\":\"")
|
|
|
+ outp = string_join(outp, query)
|
|
|
+ outp = string_join(outp, "\"}")
|
|
|
|
|
|
log("\n JSON OUTPUT")
|
|
|
- log(output)
|
|
|
+ log(outp)
|
|
|
|
|
|
String port
|
|
|
port = comm_connect("lola")
|
|
|
- comm_set(port, output)
|
|
|
+ comm_set(port, outp)
|
|
|
|
|
|
String result
|
|
|
String path
|