Fedor Isakov
ed79a8b9b9
Fix TermTrie not processing correctly ref to a Nil.
...
The code in ClassicTermTrie that is responsible for recursion guarding
when processing cyclic terms, used to mismatch valid pattern term
containing ref to a Nil term, which is a constant.
2019-08-10 15:18:04 +02:00
Fedor Isakov
a74831ad95
Bump up reactor version to 0.9.11.
2019-07-30 13:28:31 +02:00
Fedor Isakov
d647a31e1d
Switch reactor to JDK 11, kotlin lib to 1.3.31.
2019-07-30 13:27:27 +02:00
Grigorii Kirgizov
b7b5ece832
Adjust notion of principal rule in analysis. Reenable assert in ProcessingStateImpl.
...
Now any rule matching on or activating principal constraints counts as principal.
2019-07-29 20:25:25 +03:00
Fedor Isakov
9a5b9f0b51
Temporarily disable failing assertion.
2019-07-29 13:42:33 +02:00
Fedor Isakov
ba604c2f80
Use ArrayList for history, avoid linear time for last() method.
2019-07-29 13:42:33 +02:00
Grigorii Kirgizov
cf5d2ae712
Fix incorrect behavior in journal.reset() in some cases, reenable tests for that.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
fb384dab39
Use embedded profiling for incremental passes
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
8ed7eb3c02
Change signature of Supervisor to handle RuleMatch instead of Rule
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
be7283190f
Propagate FeedbackStatus out of reactivate for incremental execution.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
f7ea5f7a0d
Add entries to ExecutionQueue only once
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
2dba8890f3
Refactor ProcessingStateImpl: move logic related to execution queue to its own class
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
577662e202
Fix problem with some recovering rules not being reexecuted
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
5414fe7e67
Move RulesDiff construction from reactor to coderules runtime.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
d96ef01f98
Extend ProcessingStateImpl & RulesDiff for additional part of invalidation stage
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
769e7fd2ba
Fix small issue related to mutable justifications in Occurrence. Upd tests with latest changes.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
ef2627cab4
MatchJournal now adds chunks for principal occurrences: search is simplified, case of several principal occs in rule is handled.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
b560bbbd30
Separate incremental tests on testlang and baselang into their own models.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
ed93865359
Refactor MatchJournal.Pos. Make RulesDiff usable in coderules mps code. Extend EvaluationTrace.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
49aa913556
Move MatchJournalImpl to its own file. Some docs for it. Hide underlying mutable history behind immutable List. Add string tag() to Rule.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
6c4667e066
Add basic coderules program analysis for determining principal constraints
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
155266d8ca
Abstract java interfaces for incrementality-related classes for interop between reactor and coderules
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
5995b3a2f9
Simplify last test in TestStoreAwareJournal
2019-06-17 19:31:43 +03:00
Grigorii Kirgizov
022a9c372e
Avoid searches of principal occurrence by utilizing MatchJournal.Index
2019-06-13 21:30:20 +03:00
Grigorii Kirgizov
65f1198a60
Prune the whole related state in RuleMatchers on removal-phase. Add test case.
2019-06-13 20:10:08 +03:00
Grigorii Kirgizov
7acbbc3988
Fix tests
2019-06-13 18:01:35 +03:00
Grigorii Kirgizov
d1152128da
Remove kotlin imports
2019-06-13 18:00:04 +03:00
Grigorii Kirgizov
9863569323
Tests for incrementally removing and removing+adding rules
2019-06-12 19:09:06 +03:00
Grigorii Kirgizov
d7b7d40f8a
Don't expose InitialRule to RuleDiff. Add first test for rm algo stage.
2019-06-12 14:56:57 +03:00
Grigorii Kirgizov
0bfe9e8a47
minor: remove usages of Constraint.isPrincipal in ProcessingStateImpl, use IncrementalProgramSpec instead
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
ae20c334b4
Discern incremental reactivation from usual one. Fix postponedMatches logic.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
b3e0770939
minor: slightly rearrange code in ProcessingStateImpl
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
db80dc7ab6
Extract rule ordering logic from ProcessingStateImpl
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
175d9f7623
Move StateFrameStack class to its own file
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
a2d55e92b9
Remove accidental line duplication
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
2a5f9e28dc
Fix handling of postponed matches (match order comparison was slightly wrong)
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
5a9019e85c
Fix bits of logic responsible for launching 'at-start' rules through 'main'. Fix handling of discarded occs
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
50fcfd0d8a
Add initial version of logic for handling future matches in processActivated()
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
fa380c9f36
Fix failing build of coderules because of changed interfaces
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
3e50f47f73
Add MatchJournal.Index for additional queries and operations involving ordering of occurrences
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
eec343f902
Add stub code for handling case of adding headless ('at-start') rules
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
c0cb26d598
Add two more tests for addition phase. Handle one additional case and make one test pass.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
ddb67690f4
Add partial sketch of removal phase of incremental algorithm.
...
For that: Extend DispatchingFront and RuleMatcherImpl interface with
'forget' methods which completely drops related matches from matchers' state;
Extend MatchJournal & Chunk interfaces with helper methods.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
5b500340e5
Make StoreAwareJournal a pure interface, move delegated inheritance to StoreAwareJournalImpl (hide journal)
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
71eac08775
Move replayOccurrences back to MatchJournal again, fix tests
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
8d615852c6
Remove Controller from Occurrence and instead pass a new one each time through OccurrenceObserver
...
It caused a situation when on the very next incremental evaluation session
occurrences carried a stale Controller along with all the state from previous session.
As a result, incorrect logic of program evaluation.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
4e60ef9909
Add tests for incremental additions (one fails for now). Don't log reactivations in journal.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
95b5f97869
Add equals() to MatchJournal.Pos. Handle corner case in 'replay', when it happens to the same pos. Same for 'reset'.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
e33df7aac2
Hide mutable collection of occurrences in Chunk and add 'principleConstraint' fun to its interface
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
97d36d8d1f
Fix corner case in algo stage. Add test for it.
2019-06-12 13:28:05 +03:00