4.15 Declaring predicate properties
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Declaring predicate properties
          • dynamic/1
          • dynamic/2
          • compile_predicates/1
          • multifile/1
          • discontiguous/1
          • public/1
          • non_terminal/1
    • Packages
Availability:built-in
Sourcepublic :PredicateIndicator, ...
Instructs the cross-referencer that the predicate can be called. It has no semantics.93This declaration is compatible with SICStus. In YAP, public/1 instructs the compiler to keep the source. As the source is always available in SWI-Prolog, our current interpretation also enhances the compatibility with YAP. The public declaration can be queried using predicate_property/2. The public/1 directive does not export the predicate (see module/1 and export/1). The public directive is used for (1) direct calls into the module from, e.g., foreign code, (2) direct calls into the module from other modules, or (3) flag a predicate as being called if the call is generated by meta-calling constructs that are not analysed by the cross-referencer.