Interactors (engines) for SWI-Prolog
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitignore
Makefile
README.md
demo.pl
engines.c
engines.pl
game_lean_prolog.pl

README.md

Paul Tarau style interactors for SWI-Prolog

This repo builds on the SWI-Prolog engine API to realise interactors. An interactor is a Prolog engine with, like a thread, its own stack. Unlike a thread however, it is not associated with an operating system thread.

This library allows for creating an engine from Prolog and ask this engine to perform some action. The action is performed by temporary associating the calling thread with the engine and to make it perform the action. After completion control is returned to the calling thread.

Interactors allow for implementing coroutines. As no OS thread is involved, interactors require less resources and are better suited for e.g., large agent simulations.

This is a temporary repository interactors will most likely end up in the core.

Installation

  • Get SWI-Prolog (swipl-devel.git) from the git version
  • Run make
  • Run swipl demo.pl and play with the demos.