Commit Graph

2686 Commits

Author SHA1 Message Date
Fedor Isakov ab31a8fe0d Update mockito lib, fix the tests. 2020-10-23 15:29:40 +02:00
Fedor Isakov 51606b56c7 Rebuild project. 2020-10-23 12:26:31 +02:00
Fedor Isakov 930100a47b Several fixes that guarantee stable order of rules in the program.
Ensure the order of rules in the resulting plan follows the priorities
set forward by extends relationship b/w languages. So that even if
rule template tables are unrelated, they are still ordered according to
language extension graph.
Ensure the order of rule lists in the resulting plan is stable b/w invocations of
RulesPlanHandler.allPlans().
Ensure the order of aspects in AspectClique is stable b/w invocations
of buildClique().

Associate RuleTemplatesTable with Manifest, and Manifest with CoderulesAspect.
Tentatively rename RulesList (the runtime object) to RulesPlan,
RulesListTable to RulesPlanHandler.
2020-10-23 12:26:30 +02:00
Grigorii Kirgizov 8bd1ba6590 Fix require statements given restriction of their semantics
Also explicitly require classifiers in Hierarchy rule table
2020-10-23 12:26:30 +02:00
Grigorii Kirgizov 9476f4bba5 Revert introduction of 'runtimeType" superterm (fixes MPSCR-74) 2020-10-23 12:26:30 +02:00
Grigorii Kirgizov 544e630ecb minor fixes in bl typesystem rules
Remove spurious input oriigin in dpromote_induction rule.
Remove unneeded CheckAll extends TypeBound.
Drop several unused rules.
2020-10-23 12:26:30 +02:00
Grigorii Kirgizov cc9c4c54b3 Specify notion of required nodes: separately for tmpl application & for UpdatesRecorder
Too many nodes get into tmpl application process, which is unnecessary.
Many of those nodes are required actually only for correctly tracking
changes to nodes with WatchingTypecheckingStrategy.

Now implicitly required only nodes which are mentioned inside
constraint arguments. In other cases user must require them explicitly.
2020-10-23 12:26:30 +02:00
Fedor Isakov a403b1a252 Update Idea project in reactor. 2020-10-23 12:26:30 +02:00
dependabot[bot] 7971353f31
Bump junit from 4.12 to 4.13.1 in /reactor/Test
Bumps [junit](https://github.com/junit-team/junit4) from 4.12 to 4.13.1.
- [Release notes](https://github.com/junit-team/junit4/releases)
- [Changelog](https://github.com/junit-team/junit4/blob/main/doc/ReleaseNotes4.12.md)
- [Commits](https://github.com/junit-team/junit4/compare/r4.12...r4.13.1)

Signed-off-by: dependabot[bot] <support@github.com>
2020-10-13 07:03:23 +00:00
Grigorii Kirgizov 99c823d4f7 Integrate tmpl trace in ApplyTemplatesStep with TypecheckingOptions
Introduce TraceReport object for passing program results
(traces+report items) instead of using tuples.
2020-10-08 17:34:43 +03:00
Grigorii Kirgizov 1de365de9c Introduce trace tool for rule template application 2020-10-08 17:34:42 +03:00
Grigorii Kirgizov d9a35005e2 Fix cycle in coersion of functional type to unknown classifier (fixes MPSCR-72)
Use statically built FunctionTypes table in closures for
finding canonical functional type for a given closure.
2020-09-24 11:43:17 +03:00
Grigorii Kirgizov b693156229 minor refactoring: few changes in OriginIndex interface for better readability 2020-09-24 11:43:17 +03:00
Fedor Isakov 25e8e5fd78 Clear shared caches on releasing queries for generator. 2020-09-15 13:32:43 +02:00
Fedor Isakov 613b981977 Refactor UpdatesRecorder for better handling of nodes invalidation.
Alter the way invalidated nodes are handled by UpdatesRecorder.
A set of "source" nodes is now maintained, which helps to
detect the appropriate input for a changed node.
Templates are applied only to "new" or "invalidated" nodes.
2020-09-13 13:31:03 +02:00
Fedor Isakov 9886f0ec25 Re-saved models -- update resolve info. 2020-09-10 09:59:42 +02:00
Fedor Isakov 534c4832ce Re-saved models -- update resolve info. 2020-09-10 09:59:42 +02:00
Fedor Isakov 2d9e3547b6 Refactoring: simplify RelevantNodes[Tracker -> Monitor], drop interface and stub impl.
Rename TypeDependenciesNodeTracker to RelevantNodesMonitor and
have it the only implementation.
The "stub" implementation was never really used.
Simplify creation of and access to the monitor.
2020-09-10 09:57:53 +02:00
Fedor Isakov 9c7307286b Minor refactoring of UpdatesRecorder: straighten up API, better encapsulation. 2020-09-10 09:53:01 +02:00
Fedor Isakov 74e8eb86b1 Drop unused method in TemplateApplicationSession 2020-09-10 09:53:01 +02:00
Fedor Isakov ab59a76fa0 Drop usage of and drop UpdateRecorder.forAllFresh(): method has no effect 2020-09-10 09:53:01 +02:00
Fedor Isakov 2d9861e8a2 Avoid triggering NPE on calling ProviderInitToken.deactivate. 2020-09-10 09:53:01 +02:00
Grigorii Kirgizov 0df40a65f1 Refactor incremental logic in ConstraintsProcessing into separate facade (MPSCR-71)
Relations between stages and entry points into incremental
algorithm are now much clearer.
2020-09-01 17:01:06 +03:00
Grigorii Kirgizov da27c7ccd4 Fix some tests given changes in Journal
Also enable old incr tests that failed b/of missing features.
Remove old flaky disabled test.
2020-09-01 17:01:06 +03:00
Grigorii Kirgizov 5790a83471 Refactor MatchJournal traverse & modification logic (MPSCR-71)
Now journal's internal class Cursor is responsible for it.
2020-09-01 17:01:06 +03:00
Grigorii Kirgizov 1bcf80a9b2 Introduce IncrementalStage-s (MPSCR-71)
Incremental algorithm is stricter now in relation to
how it reads MatchJournal and operates on it.
Previously each incremental stage required full traversal.
Now all stages run on each chunk in a single traversal.

Separate journal traversal from incremental logic required for each Chunk.
2020-09-01 17:01:06 +03:00
Grigorii Kirgizov 19fa16c731 minor: disable excessive traverse in Journal made for MPSCR-65. breaks 2 tests 2020-09-01 16:20:08 +03:00
Grigorii Kirgizov 96f0a2e037 Provide correct journal position for re-exec in continueReplacedHeads (fixes MPSCR-68)
Also completes MPSCR-65. Another test for it now passes.
2020-09-01 13:37:45 +03:00
Grigorii Kirgizov 3a8bff821f Don't process macro args in 'usedDataHash' in RuleBuilder: it's unnecessary
Commit f9ca9f27 handles hash of macro bodies, making this functionality unnecessary.
Potentially less nodes can pass into 'required'.
2020-09-01 13:37:45 +03:00
Fedor Isakov 6da0ebee3f Update coderules/logic type templates (unfinished). 2020-08-20 15:02:54 +02:00
Fedor Isakov caa13a3533 Minor update: smodel type templates (unfinished). 2020-08-20 15:02:54 +02:00
Fedor Isakov e4a23ee50f Keep "types" model from deletion with a placeholder. 2020-08-20 15:02:54 +02:00
Fedor Isakov 394459b17b Refactor typechecking cache to avoid updating model roots.
Instead of copying cached data just re-plant the fields to the new cache.
The new types-model to contain only the newly reported types. Types reported on earlier invocations are retained
in previously created models.
2020-08-20 14:20:52 +02:00
Fedor Isakov ca62bb0781 Ensure queries cache gets cleared even with no root node. 2020-08-20 14:20:52 +02:00
Fedor Isakov 248f71bb1d Drop unused overridden methods. 2020-08-20 14:20:52 +02:00
Fedor Isakov 2ea58960af Stop walking all references of a required node. 2020-08-20 14:20:52 +02:00
Fedor Isakov 4cf9821bc2 Optimize RuleTemplateIndex: cache matching rules per concept. 2020-08-20 14:20:52 +02:00
Fedor Isakov 38e34b4431 Reinforce RuleIndex.update() to be independent of RuleDiff.
RuleDiff may not be in sync with RuleIndex's state.
2020-08-20 14:20:52 +02:00
Fedor Isakov 4e89325d47 Reactor: enable to reuse RuleIndex from token in non-incremental mode. 2020-08-20 14:20:51 +02:00
Fedor Isakov 89843bfac4 Fix build script for mpscore sample. 2020-08-17 20:30:01 +02:00
Fedor Isakov c9e4ddccbf Initial support for baseLanguageInternal types. 2020-08-17 17:19:34 +02:00
Fedor Isakov 8df7783b5b Typechecking BL: introduce templates for GenericLValueExpression. 2020-08-17 17:19:34 +02:00
Fedor Isakov f085d10369 Temporary fix for tests: set tracking=true in TypecheckingTesetHelper.checkTypes(). 2020-08-14 17:42:19 +02:00
Fedor Isakov 54439e255e Refactor typechecking state/cache subsystem.
Refactor whe way TypecheckingResultsCache is updated:
all mutatiting methods extracted to Update subclass, which is
only available to the updater.

Make TypecheckingState a regular container for (unit) caches.
Make TypecheckingService responsible for managing caches.

Extract TypeModuleOwner and TypeModelHandler classes.
Get rid of QueryResultsCache, merge into TypecheckingResultsCache.
TypeModuleOwner to manage "repository" cache.
2020-08-14 16:57:36 +02:00
Fedor Isakov 905e11ac33 Refactor TypecheckingService API: simplify usage, extract Request.
Request is to keep all the parameters of a given API call,
whereas TypecheckingService is to handle the state between
calls.
2020-08-14 16:17:23 +02:00
Fedor Isakov 02182f4f2f Closures lang types: add template for ClosureArgReference concept. 2020-08-12 12:38:51 +02:00
Fedor Isakov d07b1d1517 Add option to report evaluation results. Reorganize options in pref pane.
When running typechecking with trace=on too much memory is taken up
by the traces, the new option enables to see the evaluation results
without collecting the traces.
2020-08-12 12:38:51 +02:00
Fedor Isakov 1bc6611a65 Use NPE guard in deactivate(). 2020-08-12 12:38:51 +02:00
Fedor Isakov 3bac60215e Rebuild samples. 2020-08-06 17:53:20 +02:00
Fedor Isakov b8798f0523 Ensure rules are created in predictable order, minor refactoring in ProgramFactory.
Before generating a rules list, all rules produced by a given template
are sorted to produce the same order of rules every time program is created.
2020-08-06 17:45:47 +02:00