PublicShow sourcepr_rules.pl -- Output formatting and printing.

Predicates related to formatting and printing output. This includes predicates that may be used for warning and error output.

author
- Kyle Marple
version
- 20170510
license
- BSD-3
Source generate_pr_rules(:Sources, +Options)
Translate the sCASP program from the defined_* predicates into pr_* predicates for sCASP. It creates clauses for the following predicates in the target module:
Source process_pr_pred(+Spec, -Atom, -Children, -Condition, -Human) is det
Process a #pred Spec :: Template. directive.
Arguments:
Spec- is a term Head::Template, where Head is an sCASP atom where the variables are represented as $(Name) and Template is a string that embeds "@(Var)", "@(Var:Type)", "{{Var}}" or "{{Var:Type}}"
Pred- is a term `Head::format(Fmt, Args)`, where Fmt contains ~p and the arguments are of the shape @($(Var):Type), which is printed as "<Var>, a <Type>"
Source clean_pr_program(+Module) is det
Prepare Module to receive a compiled sCASP program. This wipes a possibly existing sCASP program. It also relies on the side effect of retractall/1 to create a non-existing predicate as dynamic.