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

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

model_add("formalisms/FSA/MM", "formalisms/SimpleClassDiagrams", open("models/FiniteStateAutomata/metamodels/simple.mvc", 'r').read())
transformation_add_AL({"FSA": "formalisms/FSA/MM"}, {}, "formalisms/FSA/simulate", open("models/FiniteStateAutomata/transformations/simple_simulate.alc", 'r').read())

model_add("formalisms/DTCBD/MM", "formalisms/SimpleClassDiagrams", open("models/DTCBD/metamodels/DTCBD_MM.mvc", 'r').read())
transformation_add_AL({"DTCBD": "formalisms/DTCBD/MM"}, {}, "formalisms/DTCBD/simulate", open("models/DTCBD/transformations/simple_simulate.alc", 'r').read())

model_add("formalisms/CTCBD/MM", "formalisms/SimpleClassDiagrams", open("models/CTCBD/metamodels/CTCBD_MM.mvc", 'r').read())
transformation_add_MT({"Design": "formalisms/CTCBD/MM"}, {"PartialRuntime": "formalisms/DTCBD/MM"}, "formalisms/CTCBD/discretize", open("models/CTCBD/transformations/to_partial_runtime.mvc", 'r').read())

model_add("formalisms/PN/MM", "formalisms/SimpleClassDiagrams", open("models/PetriNets/metamodels/PetriNets.mvc", 'r').read())
transformation_add_AL({"PN": "formalisms/PN/MM"}, {"PN": "formalisms/PN/MM"}, "formalisms/PN/simulate", open("models/PetriNets/transformations/simple_simulate.alc", 'r').read())

model_add("formalisms/Query", "formalisms/SimpleClassDiagrams", open("models/SafetyQuery/metamodels/query.mvc", 'r').read())
model_add("formalisms/PNPath", "formalisms/SimpleClassDiagrams", open("models/PNPath/metamodels/PNPath.mvc", 'r').read())
transformation_add_AL({"PN": "formalisms/PN/MM", "Query": "formalisms/Query"}, {"Path": "formalisms/PNPath"}, "models/analyze_lola", open("models/PetriNets/transformations/analyze_lola.alc", 'r').read())
