• 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.5 Status and known problems

The clpq and clpr libraries are ‘orphaned’, i.e., they currently have no maintainer.

  • Answers are projected onto a component, not onto a term
    An answer is projected onto the variables the user wrote down, so it does not mention the slack variables the solver uses internally. It can still mention a variable that does not occur in the query, namely one that a called predicate connected to the query variables by a constraint.

    copy_term/3 is projected the same way, onto the user-level variables of the constraint store that is reachable from the copied term rather than onto the term itself. It therefore reports constraints in which the copy takes part, together with a fresh variable for each partner that was not copied:

    ?- {X+Y>=1}, copy_term(X, C, Gs).
    Gs = [{C+_>=1}],
    {X+Y>=1}.

    Use dump/3 to project onto a chosen list of variables. Here it says that X by itself is unconstrained:

    ?- {X+Y>=1}, dump([X], [x], L).
    L = [],
    {X+Y>=1}.

  • Dumping constraints
    The first argument of dump/3 has to be a list of free variables at call-time:
    ?- {X=1}, dump([X],[Y],L).
    ERROR: Uninstantiated argument expected, found 1

ClioPatria (version V3.1.1-59-g7b9a7a3)