Next: mpg-ref-retract, Previous: mpg-ref-repeat, Up: mpg-bpr [Contents][Index]
restore/1
restore(+FileSpec)
Restores a saved state.
file_spec, must be ground
The name of a saved state, ‘.sav’ extension optional.
The system is returned to the program state previously saved to
the file denoted by FileSpec with start-up goal Goal.
restore/1
may succeed, fail or raise an exception depending on
Goal.
instantiation_error
type_error
In FileSpec.
existence_error
The specified file does not exist. If the fileerrors
Prolog
flag is off
, then the predicate fails instead of raising this
exception.
permission_error
A specified file is not readable. If the fileerrors
Prolog flag
is off
, then the predicate fails instead of raising this exception.
| ?- save_program(state, format('Restored!\n',[])). % /home/matsc/sicstus4/Bips/state.sav created in 0 msec yes | ?- restore(state). % restoring /home/matsc/sicstus4/Bips/state.sav... % /home/matsc/sicstus4/Bips/state.sav restored in 10 msec 16 bytes Restored! yes
save_program/[1,2]
, Saving,
ref-sls, ref-sls-sst, ref-lps-flg.