[great-users] Externally Invoking the GreAT interpreters

Simon Görke simon.goerke at ils.uni-stuttgart.de
Thu Feb 6 09:01:09 CST 2014


Hi there,

my intention is to (semi-)automate the re-interpretation, code generation
and compilation required after updating the metamodels referred to within a
GreAT rule.
For this purpose, I am trying to invoke the GreAT interpreters from the
command line using the following snippet of python code:

-------
from win32com.client import DispatchEx

project = win32com.client.DispatchEx("Mga.MgaProject")
project.Open("MGA=" + "rule.mga")
launcher = win32com.client.DispatchEx("Mga.MgaLauncher")
interpreter = "Mga.Interpreter.GreAT_CG_VC10"
                           # or "Mga.Interpreter.GenerateConfig",
"Mga.Interpreter.Generate GR", etc.
launcher.RunComponent(interpreter, project, None, None, 0)
-------

This way, the interpreter is invoked, however it fails ('An error has
occoured in component "Mga.Interpreter.GreAT_CG_VC10"'). 
I am not sure how to go on now. Two things which come to mind are:
1. Are there any mandatory parameters I have to pass to the interpreters and
if so, could you kindly point me to the definition in the GreAT sources (or
documentation)?
2. Is it sufficient to simply invoke the "GreAT Master Interpreter" (which
seems to call the other ones) or do I have to call
Mga.Interpreter.GenerateConfig followed by Mga.Interpreter.Generate GR and
so on?
In the latter case: which interpreters are "hidden" behind the checkboxes of
the master interpreter?

Thanks in advance,
Simon



More information about the great-users mailing list