X-Prolog Icon

X-Prolog

Version: 1.0.16
Package: org.xprolog.xp

Size: 2.86 MB

Rating: 0/5

Last Updated: 2023-01-05 02:09:41

X-Prolog is a lightweight Prolog implementation.

Changes 1.0.16 : Initial release

APK Description:

X-Prolog is a lightweight Prolog implementation intended to facilitate programming in logic on Android. This app runs Prolog programs in a console view or as a bound service to a client app. A sample client is available at https://github.com/xprolog/sample-client.
Prolog programs may be developed using any main-stream Prolog system, including SICStus, SWI-Prolog, YAP, etc. The advantage of using X-Prolog is the ability to export programs in a quick-load format.
Code snippets may be shared with X-Prolog app. A shared snippet is either consulted into a running meta-interpreter or run as a standalone program.
A program may be associated with a run configuration, which describes how the program is run, including the top-level goal and whether the program is thread-safe.
A thread-safe program runs in a console view on first launch like any other program; however, any subsequent launch of the program runs in a terminal view, sharing the database of the console view.
X-Prolog benefited from works by Richard O'Keefe, Jan Wielemaker, Jack Palevich and others.
Known issues include occurs check, logical-update view, module-sensitive built-ins and so forth.
Got Tool? The app depends on user-defined tools for editing and building projects. The tools are written in Prolog and are visible on devices with developer options. The app and tools exchange data through transfer variables and formatted output. This app release includes trivial tools intended to demonstrate the app's tooling feature.
The app defines extension points at which transfer variables are available (to tools) and formatted output (from tools) is recognized. A tool may be configured to contribute to one or more extension points by specifying a context term.
A context term is read-term of the form
, where
is the name of an extension point,
is a list of acceptable file types and
is an integer not less than zero, the effective meaning of which varies depending on the extension point.
This release defines three extension points:
and
, which allow tools to contribute to, respectively, building projects, editing source files and reconciling source models.
To build a project, open a file in the top directory of the project and select menu option
. To export the project into a runnable object file on the local file system, select menu option
. To run the object file, select menu option
.
A file is considered source-file if there exists one or more tools that build the file, possibly transforming it into another source file.
This release includes three build tools: Compile, Expand and Test. Compile translates a Prolog source file (.pl) into a quick-load file (.ql). Expand translates a definite-clause grammar file (.dcg) into a Prolog source file. Test runs unit and integration tests contained in designated files (.plt).

Download APK Google Play
Download org.xprolog.xp.apk: