include "primitives.alh" include "modelling.alh" include "object_operations.alh" Element function pn_print(params : Element, output_mms : Element): Element model model = params["pn"] Element all_places String place String name Integer tokens log(set_to_string(dict_keys(model["metamodel"]["model"]))) log("Places:") all_places = allInstances(model, "Place") while (read_nr_out(all_places) > 0): place = set_pop(all_places) name = read_attribute(model, place, "name") tokens = read_attribute(model, place, "tokens") log(((" " + name) + ": ") + cast_v2s(tokens)) log("Transitions:") all_places = allInstances(model, "Transition") while (read_nr_out(all_places) > 0): place = set_pop(all_places) name = read_attribute(model, place, "name") log(" " + name) return create_node()!