• Places
    • Home
    • Graphs
    • Prefixes
  • Admin
    • Users
    • Settings
    • Plugins
    • Statistics
  • CPACK
    • Home
    • List packs
    • Submit pack
  • 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

5.6 Single Sided Unification rules
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • SWI-Prolog extensions
        • Single Sided Unification rules
          • Single Sided Unification Guards
          • Consequenses of => single sided unification rules
            • rule/2
            • rule/3
          • Single sided unification for Definite Clause Grammars
          • SSU: Future considerations
    • Packages

5.6.2 Consequenses of => single sided unification rules

The =>/2 construct is handled by the low-level compiler if no guard is present. If a guard is present it is currently compiled into the construct below. The Picat ?=>/2 neck operator is like =>/2, but does not commit to this rule. We are not yet sure whether or not SWI-Prolog will remain supporting ?=>/2.184?=>/2 is currently implemented but not defined as an operator.

Head ?=> Guard, !, Body.

The main consequence is that clause/2 cannot distinguish between a normal clause and a =>/2 clause. In the current implementation it operates on both without distinguishing the two. This implies e.g., cross referencing still works. Meta interpretation however does not work. In future versions clause/2 may fail on these rules. As an alternative we provide rule/2,3.

rule(:Head, -Rule)
rule(:Head, -Rule, -Ref)
True when Rule is a rule/clause that implements Head. Rule is a complete rule term. For a normal clause this is a term Head :- Body and for a single sided unification rule it is a term Head => Body.

ClioPatria (version V3.1.1-51-ga0b30a5)