Commit Graph

38 Commits

Author SHA1 Message Date
Grigorii Kirgizov 53d0bd2060 Add tests for substructural typesystems (MPSCR-65) & reproduce MPSCR-64
These typesystems will probably extensively use discarded constraints.
So need more tests for these cases.
2020-07-22 13:09:52 +03:00
Grigorii Kirgizov a2675351b5 Track justifications for all occurrences, but weaken information they carry.
Now Evidence isn't unique for each Chunk: Occurrence Chunks fully
share evidence and justifications with their activating match.
So, less collections of justifications are created, approx. 2 times less.
2020-03-26 13:40:41 +03:00
Grigorii Kirgizov b10b69545e Refactor: hide mutability of Chunk.entries (both as var and as MutableList). Add a bit of docs. 2020-03-12 18:02:22 +03:00
Grigorii Kirgizov 591865b9cb Small opt: skip traversing journal when there're no rules to invalidate/add 2020-03-10 13:31:34 +03:00
Grigorii Kirgizov 5c4b1f8263 Add test that ensures that justifications invariant is preserved by a fix to MPSCR-47
Invariant ensures that retroactively added justifications
(added on past parent chunk, see fix commit) are propagated
for all relevant children of justified parent chunk.
2020-03-02 22:03:05 +03:00
Grigorii Kirgizov 2b92e5df04 minor: rename test method princConstraint to pconstraint 2020-03-02 17:58:05 +03:00
Grigorii Kirgizov 38924ef64d Add 2 tests on incremental engine, reproduces case of MPSCR-47 2020-03-02 17:11:26 +03:00
Grigorii Kirgizov 8102080809 Refactor: drop unused on MPS level java interfaces 2020-03-01 17:12:15 +03:00
Grigorii Kirgizov 37dd3ee4a8 Refactoring: extract Justified interface and hide lower-level work with Int sets behind it
Make Occurrence a Justified entity and drop .justifications() from
ConstraintOccurrence.java because justifications are used only internally.
A single justification is now called Evidence (typealias to Int),
so Justified entities are justified by Evidence-s.
2020-03-01 17:12:15 +03:00
Grigorii Kirgizov 51ec8973d2 Add test to reproduce MPSCR-35 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
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
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 155266d8ca Abstract java interfaces for incrementality-related classes for interop between reactor and coderules 2019-07-26 17:00:30 +02: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 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 97d36d8d1f Fix corner case in algo stage. Add test for it. 2019-06-12 13:28:05 +03:00
Fedor Isakov bfc4b641bb Refactor constraint occurrence to depend on controller directly.
Drop creating of a frame stack from a store view.
2019-05-13 10:48:10 +02:00
Fedor Isakov cc2774d66d Refactorings in conreactor: better separation of concerns, cleaner interfaces.
Introduce Supervisor, extract evaluation-related stuff from Program, merge with EvaluationFeedbackHandler.
Move implementation of EvaluationFeedback to internal API, reduce number of public interfaces.
Cleaner interface for reporting feedback.
2019-05-05 13:52:26 +02:00
Fedor Isakov 09ca1f1236 Fix the Store implementation and the test harness to support incremental
program launch.
2019-05-03 22:03:17 +02:00
Fedor Isakov 13e8f4a205 Cleanup obsolete code in test helper.
Refactor mock program builder for ease of use.
2019-05-03 22:03:17 +02:00
Fedor Isakov 736e0c2470 Fix compilation. 2019-05-02 15:36:23 +02:00
Fedor Isakov 9db8bfcdca Minor code cleanup and documentation.
Switch Dispatcher to use tag as Rule's unique identifier.
De-couple RuleMatcherImpl from the Rule instance.

Rule instances are externally provided, and in case of incremental
Program update these will be all replaced with new ones.
Better to keep loose coupling between those and  the reactor implementation.
2019-05-01 15:36:59 +02:00