Ascend FD-23R Manual de usuario Pagina 20

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 81
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 19
8 CHAPTER 1. The TOY(FD) System
To load the new definition choose y’; however, if we have redefined a set of func-
tions is useful to choose the option p to avoid the repetitive process of showing
multiple messages as that presented above and load all the new definitions.
/run(< file >) combines both commands showed above and executes in se-
quence the two operations /compile(< file >) + /load(< file >).
It is not possible, in the current version, to compile simultaneously several programs
(observe that compile, load y run admits only one argument), but the same effect can
be reached with the directive include explained further in Section 2.1.
During the compilation of a program, TOY(FD) works as TOY and processes the
entry (i.e., the file) in several stages: initially it checks for the syntax, functional
dependencies and types; then, if there is no error, it generates the Prolog code and
during this process it visualizes useful information to the user.
Once a program is compiled, the user can write goals at the TOY(FD) command
line in a similar form as for Prolog programs. See for instance Section 1.3.5.
1.3.3 Information about Functions
There are also two commands that allow to get information about functions that has
been defined in a program:
/type(< fun >) shows the type of the function < f un >, if this is defined in
the program loaded (currently in memory) in the TOY(FD) session.
/tree(< f ile >,< fun >) provides information about the translation that
TOY(FD) has generated for the function < fun > defined in the file < file >.
Particularly, it shows the definitional tree associated to the function opez-
Fraguas and anchez-Hern´andez, 1999.
1.3.4 Saving the session
Another useful command is /save(< file >) that allows to keep the current state of
a session (with the whole set of predicate definitions, functions, types, etc.) to the file
< f ile >.
To restore the state, we only have to execute the file < f ile > from a command
interpreter level (this have been tested in UNIX).
1.3.5 Activating the Output for FD Constraint Solving
TOY(FD) does not incorporate automatically FD constraints and thus it is necessary
to load the extension for FDs and activate the output in order to visualize the results
of constraint solving.
To show the current state of the constraint store with resp ect to the variables in the
goal, is is necessary to activate the constraint output. This is done with the following
command:
Vista de pagina 19
1 2 ... 15 16 17 18 19 20 21 22 23 24 25 ... 80 81

Comentarios a estos manuales

Sin comentarios