A quick start using Terzo. -------------------------- This is a short tutorial describing how to start the Terzo lambda-prolog interpreter, enter a module, and how to execute a query. On Unix systems, the directory which contains the Terzo executable should be in your path, if it is, typing % Terzo (or whatever the executable is named - ask your system administrator) and a carriage return should invoke the interpreter. Once the iterpreter has started, you should be greeted with the "Terzo> " prompt. You are now at the "loader" level of the interpreter, which means that commands entered will be interpreted and executed by the loader (see ???) until a command is entered which invokes one of the other two levels of the interpreter. The other levels are the module entry loop and the interactive query interpreter. The module entry loop is started with a "#begin." statement. Unless an error occurs, all following statements are read as module declaration statements, until a matching "#end." statement is read of end of file is reached. For instance: Terzo> #begin. module list_append. list_append| type append list A -> list A -> list A -> o. list_append| list_append| append nil K K. list_append| append (X::XS) YS (X::ZS) :- append XS YS ZS. list_append| #end. module list_append. type append list A -> list A -> list A -> o. Terzo> The interpreter should now have the module list_append available to it. To execute a single query q against the this module, from the loader prompt ("Terzo> ") type "#query list_append q". For example: Terzo> #query list_append append (1::2::nil) (1000::nil) X. X = 1 :: 2 :: 1000 :: nil Terzo> To enter the interactive query interpreter, type "#query list_append." at the loader prompt. Terzo> #query list_append. ?- append X Y Z. X = nil Y = Z Z = Z ; X = X1 :: nil Y = Y Z = X1 :: Y ; X = X1 :: X2 :: nil Y = Y Z = X1 :: X2 :: Y ?- #end. Terzo> The "#end." command exits the interactive query interpreter, while the "#quit." command exits the loader. ?- quit. Terzo> #quit. %