• 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

A.10 library(clpqr): Constraint Logic Programming over Rationals and Reals
All Application Manual Name SummaryHelp

  • Documentation
    • Reference manual
      • The SWI-Prolog library
        • library(clpqr): Constraint Logic Programming over Rationals and Reals
          • Solver predicates
          • Syntax of the predicate arguments
          • Use of unification
          • Non-linear constraints
          • Status and known problems
    • Packages

A.10.3 Use of unification

Instead of using the {}/1 predicate, you can also use the standard unification mechanism to store constraints. The following code samples are equivalent:

  • Unification with a variable
    {X =:= Y}
    {X = Y}
    X = Y

  • Unification with a number
    {X =:= 5.0}
    {X = 5.0}
    X = 5.0

ClioPatria (version V3.1.1-51-ga0b30a5)