Commit Graph

553 Commits

Author SHA1 Message Date
Fedor Isakov 0eac1c2f4f Code review: fixme comments 2023-10-13 18:13:09 +02:00
Fedor Isakov 2ce182c785 Auto-updated IDEA project files 2023-10-13 18:13:08 +02:00
Fedor Isakov 6d4001e175 Auto-updated files in IDEA project 2023-05-03 10:31:55 +02:00
Fedor Isakov 0e417646c2 Fix Logical union not merging value observers correctly
A recursive call to union() would interfere and prevent value observers
to be propagated to the new root. This causes, among other things, a failure
to reactivate certain constraints.
2023-05-03 10:31:55 +02:00
Fedor Isakov e881bccfca Switch to Kotlin 1.7.0 2022-09-02 16:11:00 +02:00
Fedor Isakov 2730c02f4c Update JDK in conreactor 2022-09-02 15:50:00 +02:00
Fedor Isakov 1b550cbd32 Change how profiler data is transferred from constraints reactor 2022-09-02 15:49:30 +02:00
Fedor Isakov f5536a472a Enforce non-null contract on failureCause and message 2022-07-28 10:30:37 +02:00
Fedor Isakov be1e4bac18 Bump up version of Kotlin and JUnit 2022-07-12 11:18:42 +02:00
Fedor Isakov 05adef15f9 Respect the template (group) name in rule tag 2022-05-25 12:47:27 +02:00
Fedor Isakov f91170aec0 Fix invalid reporting of trace events 2022-05-25 12:46:19 +02:00
Fedor Isakov a6f56d4193 Use EvaluationFailureException to indicate failure 2022-05-09 13:33:33 +02:00
Fedor Isakov 8af9467831 Deprecate obsolete methods 2022-05-09 13:32:49 +02:00
Fedor Isakov 3b7eb7c210 Ensure failures has non-null message 2022-05-03 10:26:43 +02:00
Fedor Isakov a2dacdd75a Update reactor version to reflect major changes
Dropped all "incremental" stuff.
Occurrences and rules are no longer divided into "principal"
and others.
2022-04-25 12:14:22 +02:00
Fedor Isakov f965c6636d Drop obsolete incremental and principal stuff 2022-04-20 12:42:20 +02:00
Fedor Isakov 735c88cdba Drop unused code, cleanup and simplify code 2022-04-19 14:36:08 +02:00
Fedor Isakov e1f285ed35 Bump up reactor version 2022-03-15 12:10:48 +01:00
Fedor Isakov bcad14d2a5 Introduce support for undo activate/discard trace events
In case evaluation fails and the state of activated occurrences is
reset to some previously stored state, the trace view does not
get updated and contains some stale information. This patch fixes it.
2022-03-14 18:35:17 +01:00
Fedor Isakov c90382ec8f Cleanup code, drop obsolete classes 2022-03-14 18:10:43 +01:00
Fedor Isakov ef3aec13d5 Drop obsolete features, cleanup code 2022-03-14 11:24:22 +01:00
Fedor Isakov c4a55446b5 Refactor and cleanup code for better readability 2022-03-12 16:50:12 +01:00
Fedor Isakov d8eedd0c44 Cleanup code 2022-03-12 12:49:55 +01:00
Fedor Isakov 357560f11f Drop unused obsolete stuff 2022-03-08 15:44:18 +01:00
Fedor Isakov 945088f72e Drop obsolete deprecated class, simplify code 2022-03-07 19:16:05 +01:00
Fedor Isakov cf4e9b2b33 Drop obsolete interface and its usages 2022-03-05 15:44:29 +01:00
Fedor Isakov f30a560073 Revert accidentally committed change
TMP Reuse Profiler instance to collect statistics

This reverts commit 56267a68955fd94ba36f79ce526fd198a8c630a2.
2022-02-17 17:17:17 +01:00
Fedor Isakov c44e4b2080 Update coderules plugin desc, fix release number 2022-02-16 12:23:38 +01:00
Fedor Isakov dc4f046510 Cleanup and optimize Rule.Tag, drop unused methods 2021-05-18 12:32:03 +02:00
Fedor Isakov f76f81af50 Switch RuleIndex to IndexedTermTrie 2021-05-13 15:54:43 +02:00
Fedor Isakov 4573764bb4 Reactor: introduce indexed term trie 2021-05-13 15:54:43 +02:00
Fedor Isakov 16e0fdf9dd Reactor: fix wrong match on reactivation in propagation rule
A propagaition rule must ignore reactivated occurrence.
Although it is possible that other occurrences are waiting,
and they can be erroneously selected if precautions are not taken.
2021-05-04 11:07:14 +02:00
Fedor Isakov dbbb37384f Fix and optimizate ClassicTermTrie
Implement cleanup on removing value.
2021-04-28 08:54:25 +02:00
Fedor Isakov a812e2a9bb Make InvalidConstraintException a RuntimeException 2021-04-19 22:55:09 +02:00
Fedor Isakov 7722327958 Reactor: fix session token not being used 2021-04-19 22:46:45 +02:00
Fedor Isakov 19da8e26eb Reactor: optimize Dispatcher
Switch to lazy initialization of RuleMatcher and RuleMatchingProbe.
2021-04-19 22:41:56 +02:00
Fedor Isakov 205c01ae45 Reactor: optimize and cleanup ClassicTermTrie
Also drop obsolete implementation of TermTrie.
2021-04-19 22:37:23 +02:00
Fedor Isakov 96ac2b3160 Reactor: optimize and fix RuleIndex
Implement missing method ArgumentRuleIndex.clear().
General code cleanup and optimization.
2021-04-19 10:27:24 +02:00
Fedor Isakov 4d1511d794 Reactor: drop most of incrementality- and preamble-related stuff
Neither incremental evaluation of program or "preamble" features
are useful, but they complicate things and cause major bugs.
2021-04-13 22:57:06 +02:00
Fedor Isakov 54b8d42e52 Drop obsolete RuleMatcher implementation 2021-04-13 12:23:17 +02:00
Fedor Isakov db7fbfc748 Minor optimization: precompute hash value 2021-04-12 12:50:31 +02:00
Fedor Isakov 8a00024658 Turn back on incremental rebuilding of RuleIndex 2021-04-12 12:49:58 +02:00
Fedor Isakov 0cef5ad298 Introduce method isBasis to Rule class, use that for feedback
Feedback basis are calculated for rules in history that
are marked as "basis" instead of "principal".
2021-04-12 12:47:44 +02:00
Fedor Isakov 207be07df9 Introduce try-tell protocol for invoking predicates
The default tell protocol assumes an exception is to be thrown
in case predicate is not satisfied. This may lead to unnecessary
exceptions being thrown in a situation where a simple failure
status would have been sufficient.
2021-04-08 11:31:29 +02:00
Fedor Isakov c51a984648 Alternative solution for invalidating feedback
Introduce feedback basis to track dependencies on rules.
Index journal chunks by evidence for quick lookup.

The feedback basis is the collection of principal rules tags
from the justifications of the current match.
2021-04-08 08:51:39 +02:00
Grigorii Kirgizov aaa6e5e2f9 Refactoring: simplify RewindStage & related logic (MPSCR-21). Add docs, some renames.
ProcessingSession -> SessionManager
RewindVolatileOccurrencesStage -> RewindStage
2021-01-29 13:39:35 +03:00
Grigorii Kirgizov 2504b354f0 Implement fallback from incremental to default processing on unhandled cases (MPSCR-67) 2021-01-29 13:39:31 +03:00
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
Grigorii Kirgizov eb1e646cd4 Minor refactoring: move OccurrenceContractObserver from ConstraintsProcessing into ProcessingStrategy
Rename NonIncrementalProcessing -> DefaultProcessing
Add GroundProcessing as common superclass to handle OccurrenceContractObserver
Add another test for this occurrence contract logic.
2021-01-29 13:39:31 +03:00
Grigorii Kirgizov 273d4dc4db Change a bit behavior of MatchJournal.reset* methods
Now after MatchJournal.reset(pos) cursor points before
the `pos`, not at it. So cursor.next will return 'pos'
It's required for MPSCR-67
2021-01-29 13:39:31 +03:00