Building a Runtime Application

Typically we develop an application using the interpreter for experimenting and testing. Often we subsequently want to deploy the application as a runtime application - i.e. it can be started from the command line and does not require the interpreter.

The bin folder contains the Python program qulogc that takes a .qlg file and translates the file to the corresponding .ql file and then, if requested, compile the program to a runtime application.

The default call is

qulogc application

that will, assuming the program type checks, translate the program application.qlg to application.ql and then compiles that to a runtime application.

The default is that the program is a Teleor program and is to be used as a runtime application and so needs a definition of qmain - the same as the Qu-Prolog main definition. If the application is not a Teleor application but instead is a QuLog application then a -Q switch can be used. If the translated code is intended to be used as library code for a Qu-Prolog application then a -L switch should be used and qmain should not be defined.

So, for example, if we wanted to translate the QuLog program qapp.qlg and compile it as a runtime application we would use

qulogc -Q qapp

On the other hand, if we wanted to translate the QuLog program lib.qlg as a library file (but not compile it) we would use

qulogc -Q -L lib