YAP 7.1.0
Creating and Using a saved state

Detailed Description

Modules

 C-support for saved states.
 

Class Documentation

◆ save_program/1

class 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

◆ save_program/2

class save_program/2

save_program(+ F, : G)

Saves an image of the current state of the YAP database in file F, and guarantee that execution of the restored code will start by trying goal G

◆ qsave_program/2

class qsave_program/2

qsave_program(+ F, Opts)

Saves an image of the current state of the YAP database in file F, currently the options in Opts are ignored:

  • stack(+ KBytes) Limit for the local and global stack
  • trail(+ KBytes) Limit for the trail stack
  • goal(: Callable) Initialization goal for the new executable (see -g)
  • init_file(+ Atom) Default initialization file for the new executable See -f

◆ qsave_file/2

class qsave_file/2

'$cvt_qsave_flag'(autoload(_B), G, autoload(_B))

'$cvt_qsave_flag'(op(_B), G, op(_B)) '$cvt_qsave_flag'(stand_alone(_B), G, stand_alone(_B)) '$cvt_qsave_flag'(emulator(_B), G, emulator(_B)) '$cvt_qsave_flag'(foreign(_B), G, foreign(_B))

qsave_file(+ File, +_State_)

Saves an image of all the information compiled by the system from file F to State This includes modules and predicates eventually including multi-predicates

Definition at line 1 of file qly.yap.

◆ qsave_module/2

class qsave_module/2

qsave_module(+ Module, +_State_)

Saves an image of all the information compiled by the systemm on module F to State

◆ qsave_module/1

class qsave_module/1

qsave_module(+ Module x)

Saves an image of all the information compiled by the systemm on module F to a file State.qly in the current directory

◆ restore/1

class restore/1

restore(+ F)

Restores a previously saved state of YAP from file F

◆ qload_module/1

class qload_module/1

qload_module(+ M)

Restores a previously save image of module M This built-in searches for a file M.qly or M according to the rules for qly files

The q_load_module/1 built-in tries to reload any modules it imports from and any foreign files that had been loaded with the original module It tries first reloading from qly images, but if they are not available it tries reconsulting the source file

◆ qload_file/1

class qload_file/1

qload_file(+ F)

Restores a previously saved state of YAP contaianing a qly file F