速報APP / 教育 / X-Prolog

X-Prolog

價格:免費

更新日期:2018-09-26

檔案大小:2.9M

目前版本:1.0.25

版本需求:Android 4.0.3 以上版本

官方網站:mailto:info.xprolog@gmail.com

X-Prolog(圖1)-速報App

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.

X-Prolog(圖2)-速報App

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 context(Name, FileTypes, Priority), where Name is the name of an extension point, FileTypes is a list of acceptable file types and Priority is an integer not less than zero, the effective meaning of which varies depending on the extension point.

This release defines three extension points: build, edit and reconcile, 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 Build. To export the project into a runnable object file on the local file system, select menu option Export. To run the object file, select menu option Run.

X-Prolog(圖3)-速報App

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).

X-Prolog(圖4)-速報App