Commit Graph

172 Commits

Author SHA1 Message Date
Fedor Isakov e87d47f6d2 Avoid duplication of template trace events 2024-09-30 12:59:43 +02:00
Fedor Isakov 11c78cad96 Fix processing of auxiliary templates 2024-09-30 10:27:10 +02:00
Fedor Isakov 7e00d55add Fix template trace view
- reimplement template trace model builder
 - drop dependency on recursive source tree walking
 - ensure cached template application are visualized
2024-09-30 10:27:10 +02:00
Fedor Isakov 0e86456afd Keep required nodes directly instead of node-ptr
Transient models don't allow resolving of node-ptr
2024-09-24 12:25:22 +02:00
Fedor Isakov e32e7cdbe4 Refactoring and optimizing incremental typechecking
- left only "required" -- the only kind of dependency that is relevant
 - drop the old two-stage scheme of incremental processing
 - implement a heuristic to detect if an update has caused any change,
   and only propagate the update further the inverse requirements graph
   in case there were real changes
 - drop cached memo
 - various code simplifications and refactorings
2024-09-24 10:39:14 +02:00
Fedor Isakov a4f4081162 Fix broken trace functionality 2024-08-29 16:49:52 +02:00
Fedor Isakov 1cdc8a1586 Refactor and simplify feedback processing; drop obsolete code 2024-08-29 13:09:21 +02:00
Fedor Isakov 5fd41a99e1 Consolidate related classes; drop obsolete model 2024-08-29 13:08:28 +02:00
Fedor Isakov d8bc7fdfb5 Refactor Effect API and usages: drop any access to values; ensure cleaner contract
- interface Effect becomes a class AbstractEffect
 - hasValue dropped
 - getValue/allValueKeys have been made protected
 - withValue(s) defines clear contract for using the values in effects
2024-08-21 18:17:27 +02:00
Fedor Isakov 300c569dff Consistently use "origin" instead of "target" 2024-08-05 17:35:39 +02:00
Fedor Isakov c63f0479d1 Refactor code to simplify and cleanup; drop obsolete stuff 2024-08-05 17:35:38 +02:00
Fedor Isakov 0debee556c Switch to new conreactor API; minor code cleanup 2024-08-05 17:35:38 +02:00
Fedor Isakov 1146935e8d Simplify code: drop InvocationContext from LateExpression 2024-08-02 14:02:14 +02:00
Fedor Isakov 95a78a3474 Deprecate CopyItem and CopyUtil 2024-08-02 13:43:37 +02:00
Fedor Isakov b2c0474afc Simplify code: drop LogicalContext from SubstituteUtil 2024-08-02 13:36:06 +02:00
Fedor Isakov 097ca5aed5 Run all user predicates from a read action 2024-07-31 13:18:52 +02:00
Fedor Isakov e64677041e Cleanup code and drop deprecated stuff 2024-07-18 11:01:24 +02:00
Fedor Isakov 4ce08f4b99 Refactor project structure and reduce the number of modules 2024-07-04 18:17:56 +02:00
Fedor Isakov 87bb67cee3 Drop usages of SessionToken 2024-06-21 22:44:23 +02:00
Fedor Isakov a19d02b8ae Switch initialization to use ModuleActivator; drop unused imports 2024-06-16 16:11:38 +02:00
Fedor Isakov 5fafd1b0dc Code review: mark things to be done 2023-10-13 18:13:08 +02:00
Fedor Isakov f3010743c1 Migration: FixExpandMacroTemplate 2023-10-13 18:13:08 +02:00
Fedor Isakov 3cf666e633 Apply migrations and make project 2023-07-31 12:57:24 +02:00
Fedor Isakov e5538bc39f A bunch of refactorings and cleanups in trace view
- cleanup the code, rename symbols for better readability
 - drop dead code
 - support for optionally showing empty template trace nodes
 - display node path for source nodes
2023-06-21 15:27:05 +02:00
Fedor Isakov 6a849f82f2 Apply migrations and rebuild project 2023-06-12 12:01:02 +02:00
Fedor Isakov 08733317ef Null guard. MPSCR-126 2023-02-23 17:29:02 +01:00
Fedor Isakov ad3ea9d63d Apply all migrations from 2022.2 2022-11-21 11:25:13 +01:00
Fedor Isakov 8f42a025bc Rewrite topo sorting of macro tables 2022-09-08 14:07:06 +02:00
Fedor Isakov 6030332107 Introduce profiling into program produce/evaluation steps 2022-09-02 15:49:30 +02:00
Fedor Isakov 33b472f560 Switch to using plain FQN strings to identify templates
SNodeReference are too unreliable to be used.
2022-07-28 10:30:38 +02:00
Fedor Isakov b46373701f WIP Reorganizing code 2022-06-08 10:23:43 +02:00
Fedor Isakov c112a59116 Switch to collection of QueryTemplate instead of single instance
The deisgn decision to have only one instance of QueryTemplate
leads to the necessity to keep AspectClique separated for
every "typesystem". Whereas QueryTemplate are really perfectly
composable, and thus only one AspectClique is neeeded.

Also drop a rudimentary unused feature.
2022-05-26 09:58:31 +02:00
Fedor Isakov bd249c5d0c Drop obsolete feature: incremental specification 2022-04-21 16:05:31 +02:00
Fedor Isakov 2d52921561 Fix and optimize dependencies 2021-09-22 17:08:25 +02:00
Fedor Isakov 17c2c73aeb Minor code cleanup 2021-09-22 17:08:25 +02:00
Fedor Isakov cff18e7ca5 Optimize RulePlanHandler
Avoid iterating over LinkedHashMap (ineffective).
Do topo-sort only once on creating the object.
2021-04-21 10:40:51 +02:00
Fedor Isakov ff6b5ec6ae Apply migrations and rebuild project 2021-04-14 13:19:50 +02:00
Fedor Isakov 49357ab87a Drop all usages of "principal store" and "preamble" feature 2021-04-13 22:57:06 +02:00
Fedor Isakov 1d1db7cba5 Disable all preamble-related stuff 2021-04-12 12:47:44 +02:00
Fedor Isakov 28dd6c7a12 Implement feedback invalidation based on (in)validated rules
Refactor supervisor/feedback consumer to support feedback basis.
Track (in)validated rules tags in RulePlanHandler.
Both (in)- and validated rules cause associated feedback to be cleared.

Disable passing SessionToken in WatchingIncremental strategy;
this forces the correct journal recording but turns off incrementality.
2021-04-08 08:51:40 +02:00
Fedor Isakov 99e248c5b3 Fix incremental update of reported feedback
Correctly detect cache up-to-date.
Refactor feedback reporting, provide origin node as the key.
Drop invalidated feedback correctly.
Code cleanup.
2021-03-23 12:48:06 +01:00
Fedor Isakov 89ae2d2003 Use UpdatesRecorder to control whether to apply templates
Invalidated and introduced nodes are collected by UpdatesRecorder.
If either set is not empty, a walk of the input is triggered.
Also, drop invalidated flag in RulesPlanHandler.
2021-01-18 10:58:58 +01:00
Fedor Isakov baae5c5bf0 Several interconnected changes to optimize performance in incremental mode
Introduce invalidated flag to program producer to control whether to
only process invalidated nodes in incremental mode.

Update validated flag in RulesPlanHandler to reflect the finalized
state, after the plan has been built.

Refactor ProgramProducer/Factory to avoid enumerating the source
root in case no changes have been detected (in incremental mode).

Avoid relaunching program in case the producer did nothing.
2021-01-12 22:55:42 +01:00
Fedor Isakov 62e8e7d013 Switch to MPS 2020.3 release. 2021-01-08 11:00:02 +01:00
Fedor Isakov 7570d050c9 Fix type declaration: replace linkedlist with list
A problem with collections language is that linkedlist type
gets generated into a Deque. There is a workaround for this,
which fails to work because of another problem in collections
language: linkedlist not being a direct subtype of LinkedList.
Probably a legacy code issue.
2020-12-27 16:04:06 +01:00
Fedor Isakov 64b33d1a88 Refactor RulesPlanHandler to not depend on AspectClique 2020-12-27 10:36:04 +01:00
Fedor Isakov 43ad19494b Refactor rule processing: straightforward dependencies, simplify code
Enable rule index to be updated during rules application.
Make RuleProcessingSession depend on AspectClique.
Enable updating of rule/macro/query indices.
2020-12-27 10:36:00 +01:00
Fedor Isakov 07a6b722c7 Drop unnecessary computations, simplify rules/query template index. 2020-12-27 10:36:00 +01:00
Grigorii Kirgizov 3eccaf81a1 Introduce occurrence store as cache for their reuse in Queries strategy
It's important that program that uses occurrences from cache
shouldn't include rules that could produce their duplicates.
So implementation of occurence cache includes 2 parts:
on reactor level & in ProrgramFactory.

When RuleBuilders are produced, cache is queried whether
there're already  occurrences associated with the rule template
in question. If so -- then those RuleBuilders are not included
into the program (as well as all RuleBuilders required by it).
2020-12-15 17:59:05 +03:00
Grigorii Kirgizov c455514325 Get more precise info on invalidated nodes (fixes MPSCR-82)
Get information on invalidated nodes from EvaluateStep & incr processing
instead of UpdatesRecorder, which has only partial info and can't handle
all cases.
2020-12-15 17:51:23 +03:00