• 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
  • Help
    • Documentation
    • Tutorial
    • Roadmap
    • HTTP Services
  • Login

7.1.2 Attributed variable hooks
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
      • Constraint Logic Programming
        • Attributed variables
          • Attributed variable hooks
            • attr_unify_hook/2
            • attribute_goals/1
            • project_attributes/2
            • attr_portray_hook/2
    • Packages
Sourceattr_unify_hook(+AttValue, +VarValue)
A hook that must be defined in the module to which an attributed variable refers. It is called after the attributed variable has been unified with a non-var term, possibly another attributed variable. AttValue is the attribute that was associated to the variable in this module and VarValue is the new value of the variable. If this predicate fails, the unification fails. If VarValue is another attributed variable the hook often combines the two attributes and associates the combined attribute with VarValue using put_attr/3.
To be done
The way in which this hook currently works makes the implementation of important classes of constraint solvers impossible or at least extremely impractical. For increased generality and convenience, simultaneous unifications as in [X,Y]=[0,1] should be processed sequentially by the Prolog engine, or a more general hook should be provided in the future. See Triska, 2016 for more information.
ClioPatria (version V3.1.1-51-ga0b30a5)