save_program/1

YAP can save and read images of its current state to files, known as saved states.

It is possible to save the entire state or just a module or a file. Notice that saved states in YAP depend on the architecture where they were made, and may also depend on the version of YAP being saved.

YAP always tries to find saved states from the current directory first. If it cannot it will use the environment variable YAPLIBDIR, if defined, or search the default library directory.

save_program(+ F)* Saves the current state of the data-base in file F .

The result is a resource archive containing a saved state that expresses all Prolog data from the running program and all user-defined resources. Depending on the stand_alone option, the resource is headed by the emulator, a Unix shell script or nothing.