Lucianpedia Wiki
Advertisement

The State Saving Interpreter (SSI) is different from List Prolog Interpreter (LPI). However, both run List Prolog code because SSI saves variable and recursive states in memory.

SSI features[]

  • SSI converts List Prolog algorithms to a state machine (including a line numbering algorithm) for "game board"-style running of code, including -2 (true) and -3 (false) return values.
  • The state machine includes directions such as "on true", "go after", "on false", and "go to predicates".
  • Global variables, also included in the saved state, include predicate number (from the code) and predicate ID (from running the program) correspondences, skip states, and consist of interpreter globals.
  • SSI includes some of the List Prolog Interpreter commands and its own (such as member2 and stringconcat).
  • As against LPI, predicates with no arguments are converted from [[n, predicate]] to [[n, predicate], []], and can be called either way.
  • SSI includes if-then//2 and 3 - [[n, "->"]], not - [[n, not], Statement], findall - [[n, findall], Format_variables, Statements, Result_variables] and brackets - [[n, "[]"], Statements] commands.
  • The SSI Web Service allows non-deterministic List Prolog algorithms to be run in a web browser across several pages. It features text and a text form box written to the web page. The application to run, the web page title and background colour, etc. may be customised. With the curl command and the get, not post form method, the feature may be used to write an API in List Prolog. Prolog may be converted to List Prolog using one of Lucian Green’s converters on Github.


Advertisement