save_predicates(+PredSpecs, +File)

Saves the predicates specified by the PredSpecs in QOF format to File.


PredSpecs pred_spec_tree [MOD]
A list of predicate specifications.
File file_spec
An atom representing a filename


save_predicates/2 saves the current definitions of all the predicates specified by the list of predicate specifications in QOF format into a file. The exported and meta_predicate properties of the predicates are not stored in the QOF file. The module of the predicates saved in the QOF file is fixed, so it is not possible to save a predicate from any module foo, and reload it into module bar. Likewise, the module dependencies or foreign file dependencies of these predicates are not saved into the QOF file. A typical use of this would be to take a snapshot of a table of dynamic facts. The QOF file that is written out can be loaded into a development system (using load_files/1) or it can be linked with other QOF files using qld.


the list of predicate specifications or the filename is not ground.
in the list of predicate specifications or in the filename.
the file is not writable, or a predicate is built-in.
A predicate is undefined.

See Also:

load_files/1, save_modules/2, save_program/1, volatile/1