Fedor Isakov
796ad9ad2c
Apply migration to drop ValueOfExpression.
2020-02-12 12:26:09 +01:00
Fedor Isakov
0d7316adf4
Introduce LogicalItemValueExpr, deprecate ValueOfExpr, migration.
...
LogicalItemValueExpression is to play the same role as valueOf(logical)
within an instance of EvaluationSubject.
LogicalItemExpression is to represent the logical variable itself.
2020-02-12 12:18:30 +01:00
Fedor Isakov
25585f9166
Deprecate assert constraint: a simple $() should serve.
2020-02-12 10:53:40 +01:00
Fedor Isakov
115c368a2f
Reconcile different syntaxes for ExpressionConstraint and LateExpression. Use $() for both.
...
This is an important change in coderules syntax: all expressions to be evaluated from
constraints/predicates are to be wrapped in parentheses and preceded by dollar sign.
So, instead of eval/backticks the new syntax is to be used: $(<expression>).
Also the expressions to be passed to "feedback reporting" predicates are to be wrapped similarly.
2020-02-12 10:53:40 +01:00
Grigorii Kirgizov
820edb8e5a
Distinguish between origin and reportOrigin in generator to track changes for regenerating rules (fixes MPSCR-36)
2020-02-11 15:52:30 +03:00
Grigorii Kirgizov
c87a2741fe
Add test for incrementality in BL to reproduce MPSCR-36
2020-02-11 15:52:30 +03:00
Fedor Isakov
1a6b107a76
Apply migration to replace condition block with if statement.
2020-02-07 13:14:46 +01:00
Fedor Isakov
a35b5b46ec
Deprecated condition block in rule template, isApplicable method in API. Migration to use if statement instead.
2020-02-07 13:14:24 +01:00
Fedor Isakov
73219399f4
Deprecate unused flag "principal" in rule template, drop usages.
2020-02-07 12:05:45 +01:00
Fedor Isakov
b76ed3d3e0
Add folding to rule list editor, fix constraint rule editor.
2020-02-07 11:58:11 +01:00
Fedor Isakov
3ae40153a2
Un-deprecate local logical var declaration, drop MITM concept.
2020-02-07 11:33:26 +01:00
Fedor Isakov
4a84ebce5f
Apply migration to switch to BodyBlock.
2020-02-06 12:55:32 +01:00
Fedor Isakov
fa4537dbc3
Introduce BodyBlock to contain multiple body clause lists. Support multi-line body. Migration.
2020-02-06 12:50:26 +01:00
Grigorii Kirgizov
c6889be4e7
Consider possible errors at rule generation stage as non fatal and produce Program with some rules dropped (fixes MPSCR-38)
...
New Result.RECOVERED case-class is added which collects errors but doesn't fail.
Currently errors are collected but not reported.
2020-02-06 01:02:50 +03:00
Grigorii Kirgizov
7b168e40c7
Provide failure cause in ouput Effect to get more informative failures of Coderules on ApplyTemplatesStep (related to MPSCR-38)
2020-02-05 23:29:05 +03:00
Fedor Isakov
c353f89ea0
Apply migration to drop ParameterContainer.
2020-02-05 17:02:32 +01:00
Fedor Isakov
c15c6694de
Ensure all rule parameters of same type are displayed on separate lines. Deprecte ParameterContainer. Migration.
2020-02-05 17:02:31 +01:00
Fedor Isakov
3f51c1e5c1
Apply migration that replaces empty logical type with term type.
2020-02-05 12:34:20 +01:00
Fedor Isakov
58a1cf16fe
Introduce TermType (term) to be represented as "DataForm" in runtime. Migration to specify term type where expected.
2020-02-05 12:24:40 +01:00
Grigorii Kirgizov
73ebfbe7d1
Use invalidatedTags info in TypeIndex to invalidate ReportItems
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov
3a15d40625
Update Supervisor and TypesIndex to incorporate changes in feedback reporting (MPSCR-32)
...
TypesIndex now invalidates report items from previous sessions not by node refs,
but by tags of rules which produced them. Set of invalidated tags is an addiitonal
output from incremental engine.
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov
119daf05d9
Restrict notion of a principal rule to not track unnecessary matches in journal
...
Now principal rule head must include only principal constraints or be empty.
Without this restriction journal may include stale chunks which have no information to invalidate them.
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov
1334c7c7a1
Fix missed dependencies when computing rule's uniqueTag (from nodes in macro expand)
2020-02-05 12:29:33 +03:00
Grigorii Kirgizov
046f4969e1
Remove unnecessary calls to EvaluationResult.storeView() to save some time
2020-02-05 12:29:33 +03:00
Fedor Isakov
b6e4e80010
Coderules/logic editor: support entering standalone item as logical clause, allow to type = and == naturally.
2020-02-04 17:34:38 +01:00
Fedor Isakov
9403087c11
Drop RepositoryProvider interface (unused).
2020-02-04 11:43:20 +01:00
Fedor Isakov
5a20630f3d
Suppress errors reported by constraints on ProjectExpression.
...
This enables check project to succeed without breaking the build.
2020-02-03 12:11:49 +01:00
Fedor Isakov
391c9053b5
Apply migrations after switch to MPS 193. Regenerate project.
2020-02-03 11:24:22 +01:00
Fedor Isakov
97353bfd89
Ensure collected report items are always forwarded from checkRecursively query.
2020-01-24 15:03:44 +01:00
Fedor Isakov
73f8179db7
Implement watching and incremental strategies in typechecking service.
...
Fix errors not always being reported to checkRecursively.
2020-01-24 15:02:34 +01:00
Fedor Isakov
a5171cbffd
Add an option to turn watch for model changes on/off.
2020-01-23 14:45:52 +01:00
Fedor Isakov
22c09152d5
Ensure TypesIndex keeps unique node report items.
2020-01-23 12:50:19 +01:00
Fedor Isakov
28355b99f4
Document/refactor/cleanup UpdatesRecorder for better code readability.
2020-01-22 18:00:57 +01:00
Fedor Isakov
612b1aa098
Make Factory instance in TypecheckingService volatile, fix MPSCR-26.
2020-01-21 17:50:06 +01:00
Fedor Isakov
fd300e3e07
Add null guard before invoking pattern match, avoid NPE.
2020-01-21 15:32:46 +01:00
Fedor Isakov
4748387e54
Ensure node/node-ptr objects in activation trace are navigatable.
2020-01-20 10:52:40 +01:00
Fedor Isakov
dfd8e97ce8
Ensure rule's unique tag is printed when debugging incremental launcher.
2020-01-20 10:52:40 +01:00
Fedor Isakov
c66e746e77
Introduce open terms, support ad-hoc polymorphism.
...
A term may indicate that it "extends" another open term.
An extended term has essentially the same form as the one
being extended, so that they can be unified.
2020-01-20 10:52:39 +01:00
Fedor Isakov
70969dfa5c
Implement coerce to type using pattern (ad-hoc for now).
2020-01-15 12:57:01 +01:00
Fedor Isakov
858d43831c
Optimize analysis of constraints when building program. Drop ConstraintRegistry.
2020-01-14 15:34:54 +01:00
Fedor Isakov
0fbc7f6571
Ensure typechecking can't run two coderules sessions with same session data.
...
Avoid sharing mutable state b/w two invocations of typechecking
initiated from different threads (race condition).
2020-01-14 12:48:24 +01:00
Fedor Isakov
fa7532f34f
Include origin features's hash to requiredHash when building rules.
...
This enables to adequately reflect changes in the model when it is updated
by editor actions, such as "side transform".
Three tests was broken as the result of this fix and are disabled
http://127.0.0.1:63320/node?ref=r%3A8d22f6d9-72f0-49ec-92ee-027a87fbedd4%28jetbrains.mps.baseLanguageExt.test.incremental%40tests%29%2F3095008005741803340
2020-01-02 17:42:38 +01:00
Fedor Isakov
662d65bcbb
Ensure types index is only updated once per query execution.
2020-01-02 17:20:13 +01:00
Fedor Isakov
d50d3cf9f6
Fix incremental program update not triggered in some cases.
...
Track invalidated set of nodes and update program correspondingly.
Use node instances as keys instead of node pointers.
2020-01-02 17:20:13 +01:00
Fedor Isakov
52d05e4953
Ensure only really evaluated queries are logged.
2020-01-02 17:20:13 +01:00
Fedor Isakov
3068ee8efb
Rework support for cached types index. Cache also the reported issues.
...
TypecheckingQueries must track the types index used for reporting
the state of cache, since the index itself is built independently
of whether or not 'checkRecursively' is invoked.
2020-01-02 17:20:13 +01:00
Fedor Isakov
efd19aa45b
Implement incremental generation of coderules program.
...
Introduce SessionData, allow to keep arbitrary data with the session.
Extend RulesListTable with support for invalidation based on rule unique tags.
Introduce UpdatesRecorder to keep track of invalidated nodes.
Extend ApplyTemplatesStep with invalidate logic for typechecking.
Simplify design, drop unnecessary fields, minor refactorings.
2020-01-02 17:20:13 +01:00
Fedor Isakov
1e9e41601a
Add method to RuleEx that had been removed from the superclass.
2020-01-02 17:20:13 +01:00
Grigorii Kirgizov
b672778235
Fix build, add impl in plugin code of observers methods in Logical interface
2019-12-24 02:41:46 +03:00
Grigorii Kirgizov
e8cb6f9ad2
Add rule for determining correct type to bind inference variable to. Fixes MPSCR-13.
...
The inferred type can be either capture or type variable.
This logic is covered by a new rule 'inferFromCapture'.
For examples see 'Bounds' test sample.
This inference is used in call arguments type inference.
It happens on cases when bounds arise from several places:
(a) bounds for inference variables from type vars declared in method signature (hasBound constraint)
(b) bounds of type vars used as arguments to call (typeVariableType term wiht bounds inside)
(c) bounds from captures on type variables from case (b), which come in the form of 'captureOf' term
2019-12-18 21:47:07 +03:00