A quick start using Terzo under Windows --------------------------------------- This is a short tutorial describing how to start the Terzo lambda-prolog interpreter, enter a module, and how to execute a query. The directory which contains the Terzo executable (C:\Programme\Terzo\bin) should be in your path and an environment variable for the home directory for Terzo should be setted (SET TERZO_BASE = C:\Programme\Terzo). To start Terzo with mouseclicks go to: Start/Programme/Terzo: Terzo (this starts a batch file with the command sml-cm @SMLload="%bin_dir%/.lpsml.x86-win32" for the Standard ML interpreter of New Jersey where %bin_dir%= %TERZO_BASE%/bin (UNIX-like)) Once the interpreter 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 la. la| type append list A -> list A -> list A -> o. la| la| append nil K K. la| append (X::XS) YS (X::ZS) :- append XS YS ZS. la| #end. module la. Terzo> or Terzo>#load "la.mod". (it loads the text file la.mod) The interpreter should now have the module la available to it. To execute a single query q against this module, from the loader prompt ("Terzo> ") type "#query la q". For example: Terzo> #query la append (1::2::nil) (1000::nil) X. X = 1 :: 2 :: 1000 :: nil To enter the interactive query interpreter, type "#query la." at the loader prompt. Terzo> #query la. ?- 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. The "#end." (not quit. - like in the original documentation written) command exits the interactive query interpreter, while the "#quit." command exits the loader. Terzo> #quit.