• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • Repository
    • Load local file
    • Load from HTTP
    • Load from library
    • Remove triples
    • Clear repository
  • Query
    • YASGUI SPARQL Editor
    • Simple Form
    • SWISH Prolog shell
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

4.3.1 Conditional compilation and program transformation
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Built-in Predicates
        • Loading Prolog source files
          • Conditional compilation and program transformation
            • term_expansion/2
            • expand_term/2
            • goal_expansion/2
            • expand_goal/2
            • compile_aux_clauses/1
            • dcg_translate_rule/2
            • var_property/2
            • Program transformation with source layout info
            • Conditional compilation
    • Packages
Availability:built-in
Sourceexpand_term(+Term1, -Term2)
This predicate is normally called by the compiler on terms read from the input to perform preprocessing. It consists of four steps, where each step processes the output of the previous step.

  1. Test conditional compilation directives and translate all input to [] if we are in a `false branch' of the conditional compilation. See section 4.3.1.2.

  2. Call term_expansion/2. This predicate is first tried in the module that is being compiled and then in the module user.

  3. Call DCG expansion (dcg_translate_rule/2).

  4. Call expand_goal/2 on each body term that appears in the output of the previous steps.
ClioPatria (version V3.1.1-21-gb8003bb)