Elpi-api This file provide a small api to communicate with elpi-worker to run lambda-prolog programs in the browser
Parameters
loggerCB
answerCB
path
(optional, default""
)
Starts the Elpi Worker
Sends the query to the worker. The worker will then send successivley all the answers to that query.
Parameters
files
Sends the query to the worker. The worker will then send successivley all the answers to that query.
Parameters
code
string The code of the query. It must end by a dot. For example "plus 2 4 Res."
Stop and restart the Elpi Worker
The main class, handling the lifecycle of the Elpi Worker.
Parameters
loggerCB
answerCB
path
string = "" The path of the directory containing the elpi-worker.js file. Must be "" or a path enfind by "\" like "some/path/". Defaults to "". (optional, default""
)The
loggerCB callback used when the Worker asks for loggingThe
answerCB callback used when the Worker gives an answer
Starts the Elpi Worker
Sends the query to the worker. The worker will then send successivley all the answers to that query.
Parameters
files
Sends the query to the worker. The worker will then send successivley all the answers to that query.
Parameters
code
string The code of the query. It must end by a dot. For example "plus 2 4 Res."
Stop and restart the Elpi Worker