import sys
sys.path.append("wrappers/")
from modelverse import *

init()
login("admin", "admin")

model_add("formalisms/PetriNets", "formalisms/SimpleClassDiagrams", open("models/PetriNets/metamodels/PetriNets.mvc", 'r').read())
model_add("formalisms/Query", "formalisms/SimpleClassDiagrams", open("models/SafetyQuery/metamodels/query.mvc", 'r').read())

model_add("models/PN", "formalisms/PetriNets", open("models/PetriNets/models/critical_section_with_check.mvc", 'r').read())
model_add("models/Query", "formalisms/Query", open("models/SafetyQuery/models/both_criticals_enabled.mvc", 'r').read())

transformation_add_AL({"PN": "formalisms/PetriNets", "Query": "formalisms/Query"}, {}, "models/analyze_lola", open("models/PetriNets/transformations/analyze_lola.alc", 'r').read())

transformation_execute_AL("models/analyze_lola", {"PN": "models/PN", "Query": "models/Query"}, {})
