mps-coderules/reactor
Grigorii Kirgizov 98ee9f4da2 Add new incr stage for rewinding logical unification (MPSCR-67 & MPSCR-21)
For this several notions are introduced.
Logical variable is called "principal" if it is used in principal
occurrences and at some point during evaluation is unified or bound.
Principal occurrence is called "volatile" if it uses principal logicals.

PrincipalObserverDispatcher's task is to track volatile occurrences
by enabling uni observers on all free logicals in principal occ-s.

RewindVolatileOccurrencesStage then on events of incremental usage
of volatile occurrences (e.g. match on it, or continued activation)
resets journal cursor to the position of initial occurrence activation,
where it can be re-evaluated with fresh, unaffected, logicals.
It's the only stage that goes backwards in journal.

So in this way unification is incrementally cancelled.
link to MPSCR-62 (docs)
2021-01-29 13:39:31 +03:00
..
.idea Auto-updated files 2021-01-18 10:59:03 +01:00
Core Add new incr stage for rewinding logical unification (MPSCR-67 & MPSCR-21) 2021-01-29 13:39:31 +03:00
Test Add new incr stage for rewinding logical unification (MPSCR-67 & MPSCR-21) 2021-01-29 13:39:31 +03:00
.gitignore Ignore IDEA's shelf files 2018-09-10 10:54:38 +02:00
.travis.yml Publishing the build artefacts to github releases. 2017-06-07 12:38:47 +02:00
README.md Update readme files. 2018-07-19 15:12:34 +02:00
Reactor.iml Update Kotlin to 1.3.70 for Reactor lib. 2020-06-25 14:30:31 +02:00
pom.xml Update Kotlin to 1.3.70 for Reactor lib. 2020-06-25 14:30:31 +02:00

README.md

Constraints Reactor

An engine for evaluating constraint rules.

Written in Kotlin and Java.

This is an implementation of the Constraint Handling Rules semantics with custom extensions, influenced by JCHR.

The main features are built-in support for terms as the data structure, including terms unification, and logical variables.

The use of terms as constraint parameters enables to implement optimizations for handling multi-head rules. Also, this implementation relies heavily on term unification when matching rules.

Logical variables enable to pass parameters to constraints as indirect references, which may be assigned later. Assigning a value to an unbound logical variable reactivates the constraint in which it serves as a parameter. Two logical variables may be joined to be treated as one.

NOTE: this implementation does not include support for parsing the CHR syntax.

License

Copyright 2014-2017 JetBrains s.r.o.

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.