
html.pl -- Render s(CASP) justification as HTML
html_justification_tree(:Tree, +Options)// is det- Convert the tree to HTML. The caller should use ovar_analyze_term/1
on Tree to name variables and identify singletons. This is not done
in this predicate as the user may or may not wish to combine the
variable analysis with the bindings and/or model. Options processed:
- pred(Boolean)
- When
false
(default true
), ignore user pred/1 rules.
- justify_nmr(Boolean)
- When
false
(default true
), do not omit a justification for
the global constraints.
- show(Format)
- One of
human
, machine
or both
.
- source(Boolean)
- When
false
(default true
), do not omit source locations.
justification_tree(+Tree, +Options)//[private]- Emit HTML for Tree. Tree is of the format as returned by
justification_tree/3, a term of the shape Atom-ListOfChildren. The
first clause deals with mapping subtrees to human descriptions. The
remainder deals with special cases where there are no global
constraints. normal_justification_tree/2 deals with the general
case.
human_atom(+Tree, +Human, +Options)// is det[private]- Emits an atom handled by a pred/1 rule. Human is a sequence of
actions as produced by human_expression/3.
html_model(:Model, +Options)// is det- Emit the model as HTML terms. We export the model as a dict with
nested model terms.
html_model_term(:Atom, +Options)// is det- Emit a model term.
html_bindings(+Bindings, +Options)//- Print the variable bindings.
html_program(:Dict)
html_program(:Dict)//- Emit the current program in human format using HTML.
html_query(:Query, +Options)//- Emit the query. This rule accepts the query both in
s(CASP)
and
normal Prolog notation.
html_predicate(:Rules, Options)//
html_rule(:Rule, +Options)//
atom(+SCASPAtom, +Options)//[private]- Emit an
s(CASP)
atom with annotations as they appear in the model
and justification.
expr(+Term, +Options)// is det[private]- Render an expression.
- To be done
- - Should deal with parenthesis where needed. Possibly it is a
better option to use term//2 from
library(http/html_term)
and add a
portray hook for that?
- utter(+Expression, +Options)[private]
var(+Var, +Options)//[private]- Handle a variable, optionally with constraints and annotated using
ovar_analyze_term/2.
inlined_var(+Var, +Constraint, +Options)//[private]- Deal with constraints as represented after inline_constraints/2.
clpq(@Var, +Constraints, +Options)//[private]
typed_var(@Var, +Type, +Options)//[private]
- list(+Elements, +Options) is det[private]
- Emit a collection as "a, b, and c"
connector(+Meaning, +Options)//[private]- Emit a logical connector.
machine_atom(+SCASPAtom, +Options)//[private]- Emit an
s(CASP)
atom with annotations as they appear in the model
and justification.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
html_term(Arg1, Arg2, Arg3, Arg4)