Grigorii Kirgizov
a4b28509a8
Provide additional information about parent principal chunk to Feedback (MPSCR-32)
...
Allows to track connection between invalidated matches and reported feedback.
In future this Journal info can help in simplifying error reporting.
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov
79c31a44ba
Handle journal reset for occurrences: upd their status (eg !alive). Add test for one error caused by it.
...
Occurrences which weren't yet activated (according to current journal position) can't be reactivated.
Test program is an example of such case.
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov
9aaf35561a
Mem opt: store RuleMatchers only for principal rules between sessions. Add a test for incr processing.
...
The number of preserved matchers is around 4-10 times less.
The added test is an example of programs handled incorrectly with this opt. Fails now.
2020-02-05 12:29:33 +03:00
Fedor Isakov
8af582f9b2
Refactoring: simplify contract b/w controller and logical state.
2020-01-14 15:34:54 +01:00
Fedor Isakov
d208e802b9
Remove unnecessary feature: StateFrameStack is no longer used.
...
StateFrameStack adds no functionality but requires too much processing.
Rename StateFrameStack -> LogicalState.
Rename ProcessingStateImpl -> ConstraintsProcessing.
Simplify occurrence's logical observer.
Introduce transient dependency on controller to LogicalState.
Keep logical state as part of session token, avoid re-initializing
all logical observers.
Make replaying of match journal independent of controller.
2020-01-10 13:51:07 +01:00
Grigorii Kirgizov
ecc948c1fc
Add, remove and merge observers on Logical always on their roots. Fixes MPSCR-28
2019-12-23 21:13:07 +03:00
Grigorii Kirgizov
1f69ff7d57
Reproduce MPSCR-28 with a test in Reactor
2019-12-23 18:14:41 +03:00
Fedor Isakov
818d1a4dbc
Fix linked list implementation. Fixes MPSCR-18
...
New implementation enables the previously failing tests to pass.
2019-11-26 23:07:42 +01:00
Fedor Isakov
65daa76c6b
Remove droppedTrail. Optimize operation with consumed signatures. Restore test.
...
It appears the feature that tracks the occurrences that have been
dropped
requires too much memory.
2019-11-26 11:26:42 +01:00
Fedor Isakov
9fab2e9d34
Refactor and redesign ReteRuleMatcher for better memory footprint.
...
Drop layer prototype, make layer mutable.
Keep nodes in a layer in a linked list with fail-safe iterator.
Introduce update queue for update blocks.
Update blocks run incrementally unless reset.
Maintain trail of introduced and dropped occurrences.
Generation iterates over nodes in the last (final) layer incrementally,
unless reset.
Introduce new test.
2019-11-24 13:34:59 +01:00
Grigorii Kirgizov
32a1ef77c9
Add test (fails now) for a new bug MPSCR-17 in Rete Matcher concerned with reactivation
2019-11-19 15:43:15 +03:00
Grigorii Kirgizov
95214fcae9
Rename 'handlers' in Program to 'rulesLists'
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
bfcee33ec9
Modify SessionToken to preserve old rules instead of tags & RulesDiff to also distinguish preserved rules
2019-11-06 19:10:29 +03:00
Fedor Isakov
8ce96ec41e
Introduce an abstraction layer of type aliases for persistent collections.
2019-09-30 16:31:59 +02:00
Fedor Isakov
60c39f2811
Add a test for a peculiar use case. Only triggered in production.
2019-09-30 16:31:59 +02:00
Fedor Isakov
7d308cb0e3
Experimental feature: Rules segmentation.
...
The rules index is extended to observe the segment path a rule belongs to.
An occurrence is bound to the rule that activated it and thus has an
associated segment path.
Rules to be picked for activation can be selected on the basis
of matched segment path.
2019-09-27 21:59:58 +02:00
Fedor Isakov
487df639e5
Drop unused methods from EvaluationSession.
...
Having unused methods is confusing.
2019-09-10 13:17:34 +02:00
Fedor Isakov
af212ca92e
Refactoring EvaluationSession(Ex): drop controller accessor.
...
The inverse reference to controller from Evaluation session considered harmful.
Drop controller from EvaluationSession, drop ask/tell from EvaluationSession, extend InvocationContext with controller and supervisor accessors.
2019-09-10 13:08:53 +02:00
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
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
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
5414fe7e67
Move RulesDiff construction from reactor to coderules runtime.
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
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
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
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
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
ae20c334b4
Discern incremental reactivation from usual one. Fix postponedMatches logic.
2019-06-12 13:28:06 +03:00
Grigorii Kirgizov
a5a46d6c67
Add incrementality test for one nontrivial case in RuleMatchFront.expand
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
767eb057f5
Add helper method in Tests builder, adjust few tests with it
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
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
8b4d98f6e2
Add few more checks in TestIncrementalProgram tests and one test in TestStoreAwareJournal
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
c9b486c170
Fix StoreAwareJournal test given updated journal's iterator starting pos
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
97d36d8d1f
Fix corner case in algo stage. Add test for it.
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
76194a62ae
Refactor tests to make them more readable. Remove unsafe cast from journal's reset.
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
11bec29410
Use journal for aborting execution of alternative branches, fix 'reset' method
...
All tests for Controller pass, but one test from StoreAwareJournal fails, mute for now
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
0fb54fc5ba
Add invariant to Journal that it always has at least initial chunk, with EmptyRuleMatch
...
Also slightly fix tests and add tracking (i.e. using journal) to ProcessingStateImpl
2019-06-12 13:28:05 +03:00