This module loads the preprocessing unit of a file to be preprocessed and serves all the information related to it to the rest of CiaoPP, including (but not limited to) the source code.
Usage 1:preprocessing_unit(Fs,Ms,E)
Loads the preprocessing unit of Fs defining Ms.
Usage 2:preprocessing_unit(F,M,E)
Loads the preprocessing unit of F defining M.
Usage:program(P,D)
P are the clauses (no directives) of the current module and D their dictionaries.
Usage:filtered_program_clauses(Mods,P,D)
P are the clauses of module Mod and D their dictionaries.
Usage:replace_program(P,D)
The database holding the program is updated by first deleting its contents and then adding the clauses in P and dictionaries in D.
Usage:entry_assertion(Goal,Call,Name)
There is an entry assertion for Goal with call pattern Call, uniquely identifiable by Name.
Usage:dynamic_or_unknown_predicate(Goal)
Goal is an atom for a predicate such that all its clauses might not be available or may change in the program unit.
Usage:add_assertions(AssrtList)
Add assertions list AssrtList to internal DB.
Usage:add_assertion(Assrt)
Add assertion Assrt to internal DB.
Usage:add_directive(C)
The directive C is added to the program data base. This directive will be considered as read from the program, i.e., analizers, transformations and output will use/show it.
Usage:erase_directive(D)
Erase directive D (previously added with add_directive/1
Usage:type_of_directive(Type,Body)
There is a directive of the form :- Type Body (of arity one).
Usage:
Removes all information about predicate order.
Usage:add_defined_pred(ClKey,M)
Add the necessary data in itf_db (and pr_key/1) to define the predicate ClKey in the module M.
Usage:new_predicate(F,A,NewF)
Checks wether there is a predicate F/A in the program and returns NewF so that there is no predicate NewF/A in the program.
Usage:push_history(X)
Push history item X.
Usage:pop_history(X)
Pop history item X.
Usage:inject_output_package(A)
Inject the package A in the current program database (including the output package list). The necesary information from these packages is loaded for correct treatment and unexpansion.
Usage:add_output_package(A)
Add the package A to the output packages list
Usage:get_output_package(X)
X is a package that will be included in the output (module directive).
Usage:add_output_operator(Prec,Type,OP)
Define an operator for output (same arguments as in op/3).
Usage:get_output_operator(Pred,Type,OP)
Enumerate output operators (same arguments as in op/3).
Usage:add_comment(Comment)
Add comment to the comment db
Usage:get_comment(Comment)
Retrieves comments from the comment db
Usage:
Cleans up the comment db
Usage:add_commented_assertions(A)
Add the assertions list A to the commented assertions DB.
Usage:add_commented_assertion(A)
Add assertion A to the commented assertions DB.
Usage:
Clean up all facts that p_unit asserts.
Usage:get_call_from_call_assrt(Sg,M,Status,Call,Source,LB,LE)
Returns in Call, upon backtracking call patterns from calls assertions related to Sg, in module M. Also takes care of disjunctions.
Usage:get_pred_mod_defined(Sg,Mod)
Returns the module where a predicate given by goal Sg is defined. If the Sg is multifile, the modules where it is defined are enumerated.