Tutorial

Generality about Plinxl

Editor

Prolog clauses are written inside Excel cells. The way a clause can be written in one ore several cells is versatile. Few examples:

The rules are:

  • A clause can be written in a single cell.
  • A clause can be split in several cells.
  • A clause can be split in several rows.
  • A term can not be split.
  • A functor and it’s relevant open parenthesis can not be split.
  • A prolog keyword can not be split (such as :     ?-    :-     ==\==   ).
  • A /* block comment */ must not be inserted between the beginning and the end of a clause.

Consult() and scope of programs

The scope of a program is the whole workbook (with multiple worksheets).

The consult() button, in the Plinxl ribbon:

    • delete all the existing clauses in plinxl,
    • launches consultation of the current worksheet only.

Queries can be written before or after consultation.

The reset() button, in the Plinxl ribbon, delete the whole program and any previous actions. It makes everything ready for a new consultation.

Console output/input

Plinxl displays its outputs in a console-like area.
In the Plinxl ribbon, thick the console button:

At the bottom of the console area, there is an input area. You can type your query here. This area then accepts keyboard actions:

  • the key “;” ask to backtrack to the next answer (if any)
  • the key “return” ask to backtrack to the next answer (if any)
  • the key “.” ask to end the query
  • the key “escape” ask to end the query

These actions can also be performed with the relevant buttons in the ribbon : “next” and “end”.