Today's model generation code + Running ELPI in Jupyter

Disclaimer: Dieser Thread wurde aus dem alten Forum importiert. Daher werden eventuell nicht alle Formatierungen richtig angezeigt. Der ursprüngliche Thread beginnt im zweiten Post dieses Threads.

Today’s model generation code + Running ELPI in Jupyter
Dear all,

the model generation code we’ve implemented today can be found here: https://gl.mathhub.info/Teaching/LBS2021/-/blob/main/elpi/modgen.elpi

I found a hack to run ELPI code in the Jupyter web interface (https://mybinder.org/v2/gh/jfschaefer/GlifBinder/master).
You have to create two code cells. The first one contains the ELPI code:

elpi: modgen

% ...

type main int -> prop.
main _ :- print "Hello world".     % This is what's gonna be called. Ignore the `int` argument.
% example:   `main _ :- modgen [...] [...] R, print R, fail.`

And then another cell for calling the code:

ps "0" | elpi filter modgen main

The reason it’s so messy is that the interface was only designed to run ELPI code on the results of the semantics construction. (I see now that it was a bad assumption :slight_smile: )
In the long term we’d of course want to run the model generation on logical expressions that we obtain from parsing and “semantics constructing” natural language sentence.