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
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
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
5995b3a2f9
Simplify last test in TestStoreAwareJournal
2019-06-17 19:31:43 +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
8b4d98f6e2
Add few more checks in TestIncrementalProgram tests and one test in TestStoreAwareJournal
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
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
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
Grigorii Kirgizov
225bd9861e
Separate concerns b/w ProcessingStateImpl and StateAwareJournal, construct in a new way
...
ProcessingStateImpl has only processing logic and inherits frame stack logic from StateAwareJournal
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
77bc7538a4
Prepare before merging StoreAwareJournal & ProcessingStateImpl: extract FrameStack from ProcState, inherit StoreAwareJ from MatchJ by delegation
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
799b57c74e
minor: remove usages of rule.tag() in tests
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
52fd54afce
Hide use of TIntSet from trove behind typealias; one usage in ConstraintOccurrence.java is left
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
f8b7ac1d50
Few renames in MatchJournal; throw exceptions at invalid iteration states
2019-06-12 13:28:05 +03:00
Grigorii Kirgizov
d3883effaf
Extract frame-independent logic from MatchHistory to its base class MatchJournal
...
Small changes: rename MatchHistory -> StateAwareJournal; use referential
eq when iterating through chunks; provide only Pos, not Chunk from
current()/currentPos(); fix tests according to all this.
2019-06-12 13:28:05 +03:00