The library permits the execution of certain Prolog goals in a
π-WAM backend. The concept of a π-WAM embraces a fusion of a
processs (π) calculus a Warren Abstract Machine (WAM). Optimized
for speed the WAM is very primitive and currently only supports
the ‘$SEQ’/2 control construct, plus rudimentary 32-bit integer
arithmethic and between/3.
The predicate emulate/1 allows to run a Prolog goal inside a 100% Prolog emulation of the π-WAM. The predicate execute/[1,2] on the other hand delegates to a virtual machine on the corresponding targets JavaScript, Python and Java. To speed up execution logical threads can be grouped and then run on physical threads.
The following brainfog predicates are provided: