include "primitives.alh"
include "modelling.alh"

Boolean function main(model : Element):
	Element keys
	String key
	Element split

	keys = dict_keys(model["model"])
	while (set_len(keys) > 0):
		key = set_pop(keys)
		split = string_split(read_type(model, key), "/")
		retype(model, key, string_join("Encapsulated_PetriNet/", split[1]))

	//log("merge_EPN has seen # elements: " + cast_value(dict_len(model["model"])))
	return True!
