This module infers meta-predicate properties by inspecting the clauses
of predicates that call other predicates. This is extremely useful for
program analysis and refactoring because many programs `in the wild'
have incomplete or incorrect meta-predicate information.
- See also
- - This library is used by prolog_walk_code/1 to improve the
accuracy of this analysis.
- To be done
- - Re-introduce some alias-analysis
- - Not all missing meta-declarations are interesting. Notably,
meta-predicates that are private and only pass meta-arguments
on behalve of a public meta-predicates do not need a declaration.
- inferred_meta(:Head, ?MetaSpec) is nondet
- True when MetaSpec is an inferred meta-predicate specification
for Head.
- infer_meta(:Head, -MetaSpec) is semidet
- True when MetaSpec is a meta-predicate specifier for the
predicate Head. Derived meta-predicates are collected and made
available through inferred_meta_predicate/2.
Undocumented predicates
The following predicates are exported, but not or incorrectly documented.
- infer_meta(Arg1, Arg2, Arg3)