Fedor Isakov
68c2d212a5
Fix presumable memleaks in activation trace view.
...
The leak may have been caused by TabContentLayout's
myLastLayout keeping a live reference to the component.
2020-06-04 11:44:07 +02:00
Fedor Isakov
b8f2d63353
Access NavigationManager as service, fix memleak. MPSCR-56
2020-05-25 11:03:39 +02:00
Fedor Isakov
5f6ea9e6c1
Fix NPE in checking rule.
2020-05-25 11:03:39 +02:00
Fedor Isakov
d4c2e6f303
Fix property constraint for when splice is present.
2020-05-25 11:03:39 +02:00
Grigorii Kirgizov
400198f965
Adjust principal constraints analysis to not consider node refs wrapped in terms
...
It makes definition of principal constraint clearer:
principal constraint is a constraint that has at least one arg
of type node<> and passes to it ruleOrigin in at least one rule.
Such constraints are most likely meant to define relations
of nodes to terms, e.g. `typeOf` -- which is what we're interested in.
At the same time semantics of values inside terms is less defined.
TermFeatures are also untyped, and so complete analysis of
ValueFeatures would require full code traversal of coderules program
to find out whether a value feature is used to carry smth of `node` type.
Relevant to MPSCR-62.
2020-05-22 21:40:03 +03:00
Grigorii Kirgizov
e2b3c21b2f
Change semantics of implicit ListFeature: treat as wildcard, not as empty list
...
Motivation is that implicit (non-overriden) list features must unify
with list of any length. Consider an example:
`classifier(cls: node-ptr/A/) = classifier(cls: node-ptr/A/ param: [B,C])`
With previous approach it would fail, which seems counter-intuitive to me.
So, if empty list (e.g. of type parameters) is meant, then it must be
specified explicitly.
There's one thing to remember, though: such wildcard list features
won't match with MetaLogicalArrays in rule heads.
(e.g. see dpromote_* rules and consider what happens when
a classifier with unbound `parameter` feature comes in)
2020-05-21 16:38:36 +03:00
Grigorii Kirgizov
9bbcf6ecef
Allow terms to inherit features from ancestor terms
...
Avoides the need to exactly duplicate features of ancestors.
Opens possibility to match on super-terms
with partially provided (overriden) features.
For example, suppose there's `typeParameterized(child: param)`
term which is extended by `classifier` and `methodSignature`.
Then it becomes possible to write a common rule for both terms,
matching on `typeParameterized(param=[Smth])`.
2020-05-21 16:31:36 +03:00
Grigorii Kirgizov
36606e5740
Add a test for AspectClique for the case of asepct with branches
2020-05-11 15:20:37 +03:00
Fedor Isakov
da43822154
Manually migrate try statements that were not auto-migrated.
2020-05-09 15:07:06 +02:00
Fedor Isakov
14780b5561
Apply automatic migrations.
2020-05-09 15:04:25 +02:00
Fedor Isakov
d1163fc883
Open and rebuild the project with MPS 2020.1.
2020-05-09 15:02:20 +02:00
Fedor Isakov
f3b16186e6
Fix build scripts and regenerate.
2020-05-09 10:54:18 +02:00
Fedor Isakov
c4fc687f76
Refactor and simplify code in AspectClique. Write tests.
...
Treat a language and its sidekick (if any) as a single vertex.
Add all extended languages to the pool before building the graph.
Drop dubious invariant check.
Fix the second pass in findAspectCliques ingnoring the fact
that there might be leafs without aspects.
2020-05-09 10:53:40 +02:00
Fedor Isakov
5bac140e61
Drop unnecessary test languages.
2020-05-07 10:23:04 +02:00
Fedor Isakov
f2bcaffccc
Revert "Upd coderules buildscript, regen build.xml"
...
This reverts commit 6b826334
2020-05-07 10:18:16 +02:00
Fedor Isakov
65429c800e
Test for AspectClique. Use test model instead of real languages.
2020-05-07 10:16:55 +02:00
Fedor Isakov
4744081e36
Refactor AspectLookup and related interfaces for testability.
...
Simplify interfaces, abstract away the direct dependency
on LanguageRutime, make the code in AspectClique testable.
2020-05-07 10:16:53 +02:00
Grigorii Kirgizov
6b82633450
Upd coderules buildscript, regen build.xml
2020-05-07 02:37:35 +03:00
Grigorii Kirgizov
cd3e56c16a
Handle case of language cycles in AspectClique, add simple test with lang cycle (MPSCR-60)
2020-05-07 02:21:26 +03:00
Grigorii Kirgizov
e7d23f9b6d
Redefine how Aspect Cliques are found (fixes MPSCR-60)
...
Now algorithm for finding aspect cliques includes 3 stages:
1) topological sort (as before)
2) bottom-up pass with initial assignment of clique ids (as before)
3) top-down pass (i.e. in reverse topo sort order) (added stage)
The 3rd stage handles case when hierarchy of langs with
required aspect include branching point (with no join further down),
as in the case of closuresExt & collectionsExt both extending blExt,
but unrelated to each other (neither extends the other).
2020-05-07 01:28:14 +03:00
Grigorii Kirgizov
bb5412230a
Fix topo sort in Aspect Clique and add check for graph acyclicity (MPSCR-60)
2020-05-07 01:28:14 +03:00
Fedor Isakov
587711a3e8
Drop deprecated class and its usages.
2020-05-05 15:58:48 +02:00
Fedor Isakov
d3a72049e8
Drop deprecated stuff from coderules lang.
2020-05-05 15:58:48 +02:00
Grigorii Kirgizov
f13b5b3176
Fix a way to get needed clique in incremental tests
2020-05-05 16:45:27 +03:00
Fedor Isakov
56c341f615
Fix apparent memory leak in coderules messages view.
...
Use SoftReference wrapping TraceObject to avoid out of memory
error.
2020-05-05 11:42:25 +02:00
Fedor Isakov
2dc2191be3
Editor improvement: auto-substitute name from target concept for rule templates.
2020-05-05 10:19:38 +02:00
Fedor Isakov
2f9c23581f
Fix substitution menu for LogicalItemExpression.
...
Prevent LogicalItemExpression from wrapping ExpressionItem.
2020-05-05 10:19:38 +02:00
Fedor Isakov
4666ca5349
Deprecate an obsolete concept.
2020-05-05 10:19:38 +02:00
Fedor Isakov
f43b262e7f
Introduce helper behaivour methods to be used from typesystem.
2020-05-05 10:19:38 +02:00
Fedor Isakov
ea687efb21
Types for j.m.logic language.
2020-05-05 10:19:32 +02:00
Grigorii Kirgizov
f75f87f13f
Fix TypecheckingTestHelper to handle case of error types appearing with a reason
...
Error types can appear in cases similar to those of "no type"
because of addittion of "error()" term to typesystem.
2020-05-04 15:16:47 +03:00
Grigorii Kirgizov
f6ebd46cb6
Disallow using OriginSpec inside rule bodies (such use case isn't handled)
2020-05-04 15:16:47 +03:00
Grigorii Kirgizov
5305e5d82f
Fix generator of macros for case of applying them in alt body blocks
...
Previously body parts from macros applied in alt body branches
were merged into original, first body branch.
2020-05-02 13:43:03 +03:00
Grigorii Kirgizov
1ba46cef88
Fix analysis tests
...
Test model didn't containe needed nodes (RulesList-s) as roots
2020-05-01 18:15:15 +03:00
Grigorii Kirgizov
aaa4d46655
Fix principal constraints/rules analysis to handle extended langs
...
Before it incremental typechecking for extending langs was failing
2020-05-01 13:38:12 +03:00
Grigorii Kirgizov
f3ed39c8a6
Refactor a bit program analyses merge code in RuleProcessingSession
2020-05-01 13:38:12 +03:00
Grigorii Kirgizov
0569a96b6a
Fix ExpressionStatement causing testa failure
2020-04-30 18:59:42 +03:00
Grigorii Kirgizov
09f4a54943
Fix AspectClique lookup for relevant langs: also add langs extended by sidekicked langs
...
Consider a case when j.m.bl.closuresExt is added as a sidekick,
then extended by it langs (e.g. j.m.baseLanguageExt) must be added also,
because they can contain crucial parts of extended aspects.
2020-04-30 15:38:33 +03:00
Grigorii Kirgizov
5894510797
Fix infinite loop on error of extended macro table not found
2020-04-30 15:38:33 +03:00
Grigorii Kirgizov
46cc65fd59
Allow passing multi meta logicals to macros as parameters
2020-04-30 15:38:33 +03:00
Fedor Isakov
866cd3fb04
Support extends relation between term tables.
...
A term table is now allowed to extend another term table.
Term prototypes can be imported through extends relation.
2020-04-28 12:54:35 +02:00
Fedor Isakov
25b08b627b
Change root concept aliases for consistency. MPSCR-52.
...
Use "rule table" and "term table".
2020-04-24 10:43:46 +02:00
Fedor Isakov
39cfafb343
Fix analysis to analyze query tables also.
2020-04-23 10:15:39 +02:00
Fedor Isakov
77d35bfaa2
Manually migrate all queries to new table format.
2020-04-23 10:15:39 +02:00
Fedor Isakov
33739d7303
Support query table in generator templates.
...
Runtime switched to use newly generated query table definitions.
2020-04-23 10:15:39 +02:00
Fedor Isakov
6e7d4c3ae0
Minor refactoring: prefer interfaces over abstract classes.
2020-04-23 10:15:39 +02:00
Fedor Isakov
a36369f002
Consistently use unified name RuleTable across all runtime.
2020-04-22 16:00:41 +02:00
Fedor Isakov
78a753a872
Refactor coderules aspect runtime: consolidate manifests.
...
Have single manifest for all assets instead of separate ones.
QueryTable is declared but not implemented yet.
2020-04-22 16:00:41 +02:00
Fedor Isakov
3e65376561
Drop deprecated stuff from coderules lang and runtime.
2020-04-22 12:07:50 +02:00
Fedor Isakov
f23ea05b65
Update query templates to not use QueryParameterReference.
...
QueryParameter is always referring to Query instance passed
to the template.
Drop QueryKind and parameter declarations from query templates.
2020-04-22 11:43:37 +02:00
Fedor Isakov
767a41ad24
Switch runtime and generator templates to use Query interface.
...
Previously used contract with QueryKind/Object[] parameters is
replaced with Query object.
2020-04-22 11:43:37 +02:00
Fedor Isakov
46fe463118
Update instances of query templates to include reference to Query type.
2020-04-22 11:25:14 +02:00
Fedor Isakov
71dadaff0f
Redesign query template to accept Query as parameter
...
Introduce QueryParameter as the way to refer to Query instance
in templates.
Introduce QueryTable.
2020-04-22 11:24:19 +02:00
Fedor Isakov
dae5a63835
Introduce Query interface to replace QueryKind. Explicitly specify query params.
2020-04-21 12:36:19 +02:00
Fedor Isakov
9037b17516
Fix FeedbackConsumer's only method definition.
...
The method would generate to 'protected void...' with MPS 2020.1.
No idea why.
2020-04-19 17:32:29 +02:00
Fedor Isakov
91dda1d85f
Move ProgramAnalysis to template model, avoid creating dependency cycle.
2020-04-19 16:30:11 +02:00
Fedor Isakov
1bb158d50b
Consolidate models in template runtime solution.
2020-04-19 16:30:11 +02:00
Fedor Isakov
9bbf86cb8d
Optimize coderules templates runtime and generator.
...
Drop obsolete code from runtime.
Consolidate and reconcile different templates for consistency.
Simplify generated code.
2020-04-19 16:30:11 +02:00
Fedor Isakov
cfcbee9d6f
Cleanup the runtime: drop unused/obsolete methods.
2020-04-19 16:30:11 +02:00
Fedor Isakov
20263ea520
Delete a bunch of deprecated/unused/obsolete concepts.
...
The API calls are deprecated and result in UnsupportedOperationException.
2020-04-19 16:30:11 +02:00
Grigorii Kirgizov
634bd053cc
minor: fix generated rule names: add prefix to their sequential number
2020-04-19 13:43:05 +03:00
Grigorii Kirgizov
be89545202
Adapt to method rename in EvaluationTrace interface
2020-04-19 13:43:05 +03:00
Grigorii Kirgizov
152e6fcfa3
refactor: move another version of ReportingSupervisor from test model to the model it belongs
2020-04-19 13:43:01 +03:00
Grigorii Kirgizov
43297ce5c6
Separate logic of being able to report feedback from handling it (i.e. recovering from failure), fixes MPSCR-57
...
Also rename ruleTag param in feedback methods to 'feedbackKey', what it really is.
feedbackKey is used in TypesCache internal ReportItem map as a key.
2020-04-19 13:42:58 +03:00
Grigorii Kirgizov
4d2658ee3f
minor: Add doc comment on new method in AspectClique
2020-04-19 13:42:53 +03:00
Grigorii Kirgizov
4bb1b9d3d8
Apply some migrations after rebase on master
2020-04-19 13:42:53 +03:00
Fedor Isakov
3f4f9d35cb
Fix macro templates in testlang.
2020-04-16 12:26:17 +02:00
Fedor Isakov
7b1764548c
Fix runtime and generator for macro templates processing. MPSCR-53
...
Support matching expand macro template on subconcepts.
Respect topological order of macro tables.
Respect the order of macro templates in macro table.
2020-04-16 12:24:46 +02:00
Fedor Isakov
0d00d84b91
Update helper methods in tests to conform to LogicalUtil changes.
2020-04-15 10:41:33 +02:00
Fedor Isakov
9b8a560edc
Simplify generator template for Splice, rely on java method overloading.
...
LogicalUtil defines a bunch of overloaded methods that help dispatch
data form construction based on runtime class of logical variable.
This eliminates the need to use coerce in generator template.
2020-04-15 10:40:59 +02:00
Fedor Isakov
eb4862eb48
Force save all models -- update resolve info.
2020-04-14 16:20:05 +02:00
Fedor Isakov
cbb9ac919e
Rename LogicalDataForm to LogicalVariableDataForm. Fix generator to not rely on type.
...
LogicalVariableDataForm generates to either a list node or a term.
This choice can be made based on the structure alone.
Logical variable "array" corresponds to list node, everything else to a term.
2020-04-14 16:17:15 +02:00
Fedor Isakov
ed821053ec
Rename concepts for consistency to Term*. Move one more concept to coderules.
2020-04-13 18:00:15 +02:00
Fedor Isakov
fd2043e047
Update build scripts.
2020-04-13 18:00:15 +02:00
Fedor Isakov
5b1449fa82
Update all usages of moved concepts.
2020-04-13 17:58:34 +02:00
Fedor Isakov
a0bc96b3e0
Move all concepts related to term to j.m.coderules.
2020-04-13 17:58:34 +02:00
Fedor Isakov
204d1ff7e4
Move migration to termlist type to j.m.coderules.
2020-04-13 17:58:33 +02:00
Fedor Isakov
2ccee6e805
Move all term-related generator templates to j.m.coderules.
2020-04-13 17:58:33 +02:00
Fedor Isakov
0ce5e4813c
Drop all deprecated concepts from j.m.logic lang.
2020-04-13 17:58:33 +02:00
Fedor Isakov
f55a377528
Truncate migrations that are using deprecated stuff.
...
All deprecated concepts from j.m.logic are to be deleted.
Concepts related to terms are to be moved to j.m.closures.
2020-04-13 17:58:33 +02:00
Fedor Isakov
296b3e9271
Re-apply all rerunnable migrations.
2020-04-13 17:58:33 +02:00
Fedor Isakov
a1c98b5bf0
Apply all outstanding migrations.
2020-04-13 17:58:33 +02:00
Fedor Isakov
4845e120e9
Introduce termlist type, rename multilogical type to logical[].
2020-04-13 17:58:33 +02:00
Fedor Isakov
e8a19249e6
Migration to replace spliced LogicalItemExpression on a list node.
...
Usually one uses Splice with LogicalItemExpression wrapping a logical variable.
Using LogicalDataForm wrapping same variable makes Splice unnecessary.
In order to keep code readable these are wrapped again in a cons list.
In general, one should avoid using bare LogicalDataForm, as these are
indistiguishable from normal LogicalVariable.
2020-04-13 17:58:33 +02:00
Fedor Isakov
065aac819c
Introduce construct to directly insert term constructor in data form.
...
Usually one uses Splice with LogicalItemExpression wrapping a constructor.
The new TermConstructorDataForm provides a shortcut.
2020-04-13 17:58:33 +02:00
Fedor Isakov
2af087428d
Document j.m.logic language. Rearrange virtual packages.
2020-04-13 17:58:33 +02:00
Fedor Isakov
922fe7ef2e
Prevent bad migrations from being re-applied.
...
Replacing of == with = is not always justified.
ListNodeCons is now deprecated and already replaced with
new concept.
2020-04-13 17:58:33 +02:00
Fedor Isakov
1109471f9a
Replace usages of MultiMetaLogical with MetaLogicalArray.
...
The new class MetaLogicalArray does not inherit from MetaLogical,
which should help catch subtle bugs related to errors in
generator code.
2020-04-13 17:58:33 +02:00
Fedor Isakov
73beb56834
Introduce ConsListNode to replace a deprecated concept. Migration.
...
Prefer aggregation over inheritance: ListNodeCons extending ListNode
is not a good design.
Also drop LogicalUnrapContext, as it has no real use.
2020-04-13 17:58:33 +02:00
Fedor Isakov
cf77688a71
Replace instances of deprecated ListRole with ChildRole.
2020-04-13 17:58:33 +02:00
Fedor Isakov
def1d9fbc6
Optimize generator, drop usages of ListRole.
2020-04-13 17:58:33 +02:00
Fedor Isakov
b3d71ad13d
Drop unused method from ListNode, simplify dataform-logical bridging.
2020-04-13 17:58:33 +02:00
Fedor Isakov
021853b996
Documenting LogicalUtil, minor refactorings.
...
MetaLogical are accessed through MetaLogicalFactory in generated code.
2020-04-13 17:58:33 +02:00
Fedor Isakov
749f60e665
Deprecate a bunch of obsolete concepts.
2020-04-13 17:58:33 +02:00
Fedor Isakov
4a60bc36f6
Migrate test lang to new macro system.
2020-04-13 17:58:33 +02:00
Fedor Isakov
ace1303a96
Fix analysis to support new pseudo constraints.
2020-04-13 17:58:32 +02:00
Grigorii Kirgizov
d00b55e679
Provide more robust way to discover a single aspect clique for nodes in TypecheckingActions
...
Several aspect licques can be found, some irrelevant
(e.g. for typechecking.annotation lang), so a relevant
clique must be chosen.
2020-04-13 12:41:12 +03:00
Grigorii Kirgizov
6348f89d34
Achieve regeneration of rules from deep changes to "imported" data
...
requiredHash of a rule now includes hashes not only of SNode & SNodeRef
but also of anything except Coderules rt types (e.g. MetaLogical & DataForm).
The motivation is that if something else is used -- then it must come
from AST, so the rule must be regenerated on any changes to that data.
requiredHash is renamed to usedDataHash to reflect that fact.
In particular, fixes dependence of IndexedTupleAccess rule on idx
from `idx = tuple.index.getCompileTimeConstant()`.
2020-04-12 16:11:44 +03:00
Grigorii Kirgizov
27f26047d3
Fix aspect lookup for typechecking actions and coerceTo query
...
Not all used languages were collected in case of buliding
aspect clique by nodes -- use model of nodes instead.
2020-04-08 19:55:25 +03:00
Fedor Isakov
9a8b3585d7
Fix runtime and generator to support queries and call macros.
...
Expand macro supports dispatching by concept.
Logical variables declared on macro's body are init'ed in apply method.
Enable the hack to ensure dependencies on macro input are tracked.
2020-03-31 18:43:22 +02:00
Fedor Isakov
f261002feb
Introduce extends clause in macro table. Drop name from expand macro.
...
Macro table can extend another macro table. All prototype template
declarations are imported automatically.
The editor now substitutes default values when entering new
expand macro/constraint filling the slots provided by the prototype.
Expand macro does not require name.
Minor editor improvements.
2020-03-31 11:27:09 +02:00
Fedor Isakov
a2b369b9c3
Specify logicals on every expand template. Minor editor improvements.
...
Expand macro template must have declaration of logicals matching
exactly the logical declarations in the prototype.
Can't refer to logicals declared directly in the prototype.
2020-03-31 11:27:09 +02:00
Fedor Isakov
28d21f5349
Cleanup in macro runtime, expand macro parameter access.
...
Parameters can be specified for call macro only.
Logicals can be specified for expand and call macro.
Expand macro params are treated exactly as "context"
parameters.
2020-03-31 11:27:09 +02:00
Fedor Isakov
4260346cb9
Introduce expand/call macro pseudo constraints.
...
The old expand/call constructs are to be replaced by these.
Expand macro constraint refers to a named prototype, which
is specified in a macro table for matching concept.
Call macro constraint refers directly to a macro template.
Contex parameters are to be retired and explicit
parameters to expand macro constraint are to be used instead.
2020-03-31 11:27:09 +02:00
Fedor Isakov
6672ab21e8
Runtime support for new expand and call macro constraints.
2020-03-31 11:27:09 +02:00
Fedor Isakov
a72327630e
Implement runtime support for call and expand macro templates.
2020-03-31 11:27:09 +02:00
Fedor Isakov
ea670422f1
Introduce ExpandMacro template and prototype.
...
ExpandMacroTemplate to be used for dispatching macro invocations
based on the concept of the specified node.
Prototype is an abstraction to be implemented by
specific templates.
2020-03-31 11:27:09 +02:00
Fedor Isakov
d5ea8e8006
Introduce CallMacroTemplate, necessary refactorings. MPSCR-25
...
Call macros are to be parameterized with logicals and other parameters.
To replace combined expand/call macros causing confusion.
Context parameters to be passed explicitly.
2020-03-31 11:27:09 +02:00
Grigorii Kirgizov
b6aaec8870
Revert temporary workaround for MPSCR-51 from 16e39a93
2020-03-23 14:39:54 +03:00
Grigorii Kirgizov
91e4d2b582
Revive 'principal' rule feature for MPSCR-51. Mark those rules in BL typesystem.
...
Introduce 'auxiliary/essential' notions instead of 'principal/not principal'.
2020-03-23 14:28:14 +03:00
Grigorii Kirgizov
16e39a9345
Check applicable scope for certain checking rules in BL (workaround for BL for MPSCR-51). Fix SubclassingUtil.
...
Modified TYPECHECK query to include "checkingScope" query parameter:
it is a root node for which program is generated (for local typechecking it's local node).
Rules additionally match on a constraint `checkDecls(node<>)` bearing this node,
so while rules will be generated for all scopes, only those in applicable scopes will run.
Also split rule for EnumConstantDeclaration on declration checking and just typing rule.
2020-03-17 17:54:38 +03:00
Grigorii Kirgizov
831871a81b
minor refactor: drop few usages of LogicalDataForm.logical() which were used for checking equality, use appropriate .symbol() instead
2020-03-06 14:04:18 +03:00
Grigorii Kirgizov
7f840e2899
Refactor: drop deprecated Path class and DataForm.attached() method operating on it
2020-03-06 14:04:18 +03:00
Grigorii Kirgizov
92f95674b3
Refactor: drop meaningless DataForm.asRoot (used symbolPath which is deprecated)
2020-03-06 14:04:18 +03:00
Grigorii Kirgizov
f5f1fe3916
Reproduce cause of MPSCR-45 in unification solver
2020-03-06 14:04:18 +03:00
Fedor Isakov
485eedea5e
Ensure no infinite recursion is possible in toString.
...
Scheduler in rxjava2-swing seems to cause a peculiar bug
that is difficult to reproduce.
Seems like AtomicReference or one of its subclasses
gets itself as the value, which triggers infinite recursion.
2020-03-05 22:18:13 +01:00
Fedor Isakov
77c44e9066
Ensure RxSwingPlugins is unset and scheduler initialized.
2020-03-05 18:18:20 +01:00
Fedor Isakov
5a16c4d23b
Drop ModelPropertiesChecker temporarily from CheckProjectModules test.
2020-03-05 16:48:04 +01:00
Fedor Isakov
8328467a54
Fix java stub locations for RxJava.
2020-03-05 16:23:47 +01:00
Fedor Isakov
a894b33983
Update to the latest RxJava2 and Swing adapter.
2020-03-05 15:49:04 +01:00
Fedor Isakov
719956007a
Increase timeout to 10 sec, try to fix the test.
2020-03-05 10:11:37 +01:00
Fedor Isakov
fec446f006
Drop wrapping substitutions in favour of regular actions.
...
The editor for evaluating late expression inserts $() construct
first, then allows to enter the expression.
A couple of minor fixes and a workaround.
2020-02-27 14:48:37 +01:00
Grigorii Kirgizov
a619b017ec
Fix NPE in UpdatesRecorder on roots move/remove
...
In such cases typechecking was failing on the point of computing changeSetClosure,
because changeSet got null nodes from SNodeChangeEvents
2020-02-26 18:58:05 +03:00
Grigorii Kirgizov
707982fbe9
Include changed nodes from different roots in invalidated set for incremental program update. (MPSCR-46)
...
The core chang in is InvalidateAndApplyTemplatesStep.
Also rename SNodeEventsFilter to RelevantNodesTracker.
2020-02-26 18:58:05 +03:00
Grigorii Kirgizov
025232969d
Track change events from all referred models (MPSCR-46)
...
UnitTypecheckingCacheHolder now holds the data needed for ChangesTrackers.
This data is updated by UpdatesRecorder: different models and nodes from different roots are tracked.
2020-02-26 18:58:05 +03:00
Fedor Isakov
2e9a1e8dbf
Support deleting pattern from logical variable in head.
2020-02-26 16:08:50 +01:00
Fedor Isakov
f2bb87e1b0
Apply migration to replace deprecated concept.
2020-02-26 15:03:31 +01:00
Fedor Isakov
c064972266
Deprecate obsolete concept, provide migration. Minor editor fixes.
...
ExpressionLogicalVariable is replaced with ExpressionItem wrapping
the same expression.
Fixes ensure correct application of transformations.
Late expression can't be used as "placeholder" logical item.
2020-02-26 15:01:29 +01:00
Fedor Isakov
2a5b3661b8
Use EvaluationSetting tag for constraint context.
...
Concepts supposed to contain constraints are
effectively implementing evaluation setting.
2020-02-24 22:57:05 +01:00
Fedor Isakov
7ba7c983cb
Apply migration to use logical variable ref expression.
2020-02-24 22:57:05 +01:00
Fedor Isakov
630fd33629
Introduce logical var reference expression.
...
This expression is to be used in those rare cases
when a logical var is to be passed to an external method.
Not available within EvaluationSetting (new marker interface).
Normally logical variable (as an instance of LogicalItem)
is only to be used within a logical context.
Logical item value expr only to contain a logical variable.
2020-02-24 22:56:54 +01:00
Fedor Isakov
2c43762f93
Replace all instances of .pointer in constraints to node reference.
...
SNode is supported now directly as an argument to constraint/predicate.
Pointer operation is no longer necessary, as is node-ptr<> type for logical vars.
2020-02-20 11:59:28 +01:00
Fedor Isakov
8ec26b4e94
Support node<> argument in constraints. Prepare to get rid of node-ptr<>. Minor refactoring.
2020-02-20 11:59:28 +01:00
Fedor Isakov
ee36d879b3
Make better editor for provide feedback and fail constraints.
2020-02-20 11:59:28 +01:00
Grigorii Kirgizov
6a67865554
Fix NPE in new ChangesTracker in UpdatesRecorder on broken references (relates to MPSCR-44)
2020-02-19 01:04:55 +03:00
Grigorii Kirgizov
725a438bca
Use same information for incremental program update and types cache invalidation (fixes MPSCR-44)
...
Previously there were two independent ChangeTracker-s in UpdatesRecorder and UnitTypecheckingCacheHolder.
Now, given more elaborate logic for tracking changes to types (which includes changes in different roots)
this information must be propagated from UpdatesRecorder to cache holder,
so that if there're changes relevant for recomputing types then types cache is also invalidated.
2020-02-18 23:39:26 +03:00
Grigorii Kirgizov
5abbccf511
Collect changes in UpdatesRecorder in referred-to roots (MPSCR-44)
2020-02-18 23:35:23 +03:00
Fedor Isakov
417fc45933
Restore origin ref in RuleEx interface, fix terminology in templates API.
...
To avoid confusion, a rule defines "target ref", which is supposed
to indicate the source code location for possible errors.
The origin node is to be referred as "origin" as before.
Temporarily rename OriginSpec's alias to "target" to reflect change
in semantics.
2020-02-17 11:57:14 +01:00
Grigorii Kirgizov
a8f3ed8d9a
Store reversedRequirements in UpdateRecorder by SNodeId, not by SNodes themselves (fixes MPSCR-42)
...
Sometimes UpdatesRecorder can log changes of SNodes which have same SNodeId, but different identity.
Thus reversedRequirements map returned nothing on such nodes and these require-dependencies were not handled.
Such case is described in MPSCR-42 ticket.
2020-02-13 17:12:33 +03:00
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
Grigorii Kirgizov
894c727e70
Fix minor bug concerned with CopyUtil
...
CopyUtil didn't correctly map logicals nested inside DataForms which are bound to Logicals.
That's because CopyUtil relies on DataForm:variablesCount() and
LogicalDataForm:variablesCount didn't consider the case when bound value is itself DataForm.
2019-12-18 21:47:06 +03:00
Fedor Isakov
603dab6797
Refactor RuleBuilder: extract RuleImpl as standalone class.
2019-12-11 11:42:31 +01:00
Fedor Isakov
f83ac4b692
Clearer contract for building rule's uniqueTag. Drop ArgumentsCollector.
...
ArgumentsCollector used in tests only, move it there.
2019-12-10 17:21:33 +01:00
Fedor Isakov
e926b86bcd
Minor refactoring in program producing code.
...
Reorganize and cleanup code.
2019-12-10 11:58:26 +01:00
Fedor Isakov
0af0d0152d
Ensure typechecking cache is cleared on closing session. Closes MPSCR-23
2019-12-09 14:15:16 +01:00
Fedor Isakov
1f621bfda8
Refactor query-running code in typechecking provider. Show time spent in query.
...
Only show messages for queries that took more than 10 ms. to complete.
2019-12-02 11:33:49 +01:00
Fedor Isakov
85674ef077
Add explicit "test" facets to test solutions.
2019-11-24 17:58:15 +01:00
Fedor Isakov
bfbf4840fa
Fix language imports.
2019-11-11 14:49:07 +01:00
Fedor Isakov
5bce04eb71
Fix language imports.
2019-11-11 14:49:01 +01:00
Fedor Isakov
69bc34e8f9
Drop language j.m.l.smodel.types containing SNodeTypeOp that is no longer used.
2019-11-11 14:37:41 +01:00
Fedor Isakov
de84b88b2c
Replace instances of SNodeTypeOp with regular method invocation.
2019-11-11 14:27:57 +01:00
Fedor Isakov
ecd2594fed
Drop deprecated Reporting interface and all its usages.
...
Remove runtime solution that contained only Reporting.
2019-11-11 13:53:41 +01:00
Fedor Isakov
f92148094a
Drop long deprecated concepts with zero instances.
2019-11-11 13:53:41 +01:00
Fedor Isakov
fb8e995c88
Fix NPE in event processing, closes MPSCR-12.
2019-11-11 11:11:55 +01:00
Fedor Isakov
036f8393b5
Avoid null-ifying Config fields on dispose. Fix stupid bug in TypecheckingOptions. Fixes MPSCR-8.
2019-11-11 10:58:49 +01:00
Grigorii Kirgizov
53ddcb8492
Small cleanup of TraceTool for incremental processing
2019-11-07 17:15:56 +03:00
Grigorii Kirgizov
ea309d05e7
MPSCR-14: Remove unnecessary & failing call to tracer.restored() for incrementally preserved occurrences
2019-11-07 15:43:02 +03:00
Grigorii Kirgizov
7b33e0e31f
Minor cleanup: remove usages of DependentRulesSpec
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
cd25087ef9
Rename 'handlers' in CodeRulesProgram to 'rulesLists'
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
e4017b0b16
Preserve still valid Rules from previous incremental sessions with a help of RulesDiff
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
f343ba0d3b
Adjust to changes in SessionToken & RulesDiff interfaces
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
9b61c6a2d3
Move RulesListIImpl out of RulesListBuilder
...
For later Program modification by RulesDiff and preserved rules from prev Program
2019-11-06 19:10:29 +03:00
Fedor Isakov
3f1b65ada2
Fix the structural errors introduced by a badly run migration.
2019-11-06 12:05:18 +01:00
Fedor Isakov
ad90a4cb77
Apply migration that replaces all instances of NodeAnchor with .pointer op.
2019-11-06 11:21:57 +01:00
Fedor Isakov
daa1bdceb6
Update default jvm options for running tests to "-Xmx2048m".
2019-11-05 20:53:01 +01:00
Fedor Isakov
bb8fffc7ea
Enable to use origin{} block to specify no origin.
...
Rules that are used only as auxiliary resolvers don't have an associated
origin node, even though they are produced from a specific location.
To enable tracking of correct origin to report errors to one can use
origin(no origin){} to override the default behaviour.
2019-11-05 18:46:02 +01:00
Fedor Isakov
76739d20d9
Minor refactoring and renaming in coderules runtime. Documentation.
...
Rename classes and methods to better reflect the intent.
Move test-related stuff to test util model.
2019-11-05 18:46:02 +01:00
Fedor Isakov
e32ff36d1b
Allow node-ptr<> to be specified in require statement.
2019-11-04 17:10:34 +01:00
Fedor Isakov
48375c4d14
Extend RuleBuilder with template app session: automatically require node ponters passed as args to constraints.
...
Every node pointer (SNodeReference) specified as an arg to a constraint causes the (resolved) target to be included
into template application session (required).
Reduce NodeAnchor to .pointer call.
Deprecate Reporting interface and context repository in rule definitions.
2019-11-04 16:20:57 +01:00
Fedor Isakov
cc8cf72819
Minor code cleanup: get rid of MacroTemplate.ID, simplify templates. Systemize RuleBuilder usages.
2019-11-04 16:20:57 +01:00
Fedor Isakov
84162b9097
Deprecate NodeAnchor, provide migration to .pointer operation.
...
A usage of .pointer op as an argument to a constraint invokes require() on template application session.
2019-11-04 16:20:38 +01:00
Fedor Isakov
a0b2af95c9
Revert "MPSCR-4: Upd refs to new RuleIndex on Dispatcher construction in incremental case."
...
This reverts commit 0dd7f8c70f .
2019-11-04 15:58:54 +01:00
Grigorii Kirgizov
0dd7f8c70f
MPSCR-4: Upd refs to new RuleIndex on Dispatcher construction in incremental case.
...
Slightly extend RuleMatcher interface.
Store RuleMatcher instances instead of RuleMatcherProbe in SessionToken.
2019-10-31 22:20:19 +03:00
Grigorii Kirgizov
1a720dd76e
Fix RuleBuilder.uniqueTag computation: consider SNodeReference not only inside DataNode but also raw
2019-10-31 18:07:31 +03:00
Grigorii Kirgizov
0e33bffa96
Handle additional case of constructing ListNodeCons
2019-10-26 16:17:37 +03:00
Fedor Isakov
3092fa3635
Fix all templates with broken scopes for logical variables.
2019-10-25 22:45:55 +02:00
Fedor Isakov
c797b5d2ad
Breaking change: logical vars must be declared by constraint rule that uses them.
...
Stronger rules for logical variables scope: constraint rule can't reference logical variable defined in another constraint rule. Logical variable definitions are localized to ConstraintRule template.
Simplify/cleanup the logic of searching for available logical variables.
2019-10-25 22:45:55 +02:00
Fedor Isakov
4160c186e1
Introduce dependency to Config in typechecking options and service. Avoid relying on static getInstance() method to access Config.
...
Config is an application-level "component" initialized from an application plugin.
All usages on application/project-level should declare explicit dependency on it.
Tests can either create a new instance or access the shared one.
2019-10-23 15:39:17 +02:00
Fedor Isakov
1534864ffb
Separately register USER-level typechecking options, drop synch barrier. Keep it simple and stupid.
...
Options providers are registed in application plugin and project plugin.
Application plugin registers the USER level options, project plugin
is responsible for UI level.
Option providers are cleard on closing project/closing app.
2019-10-22 21:20:15 +02:00
Fedor Isakov
b2139c4648
Fix typechecking in incremental mode. Cache type collector and smartly cache session token.
...
Keep cached session token with regard to aspect clique.
Keep type collector object in the typechecking cache.
The rationale: in incremental mode the parameters passed to query template are ignored, and essentially the parameters passed to the original query are re-used.
2019-10-19 22:19:53 +02:00
Fedor Isakov
6af78d1b94
Make CoderulesHelper reference the relevant aspect clique.
...
It's important to keep reference to the aspect clique that used to instantiate
a particular helper. Later it can be used to identify the correct session token.
2019-10-19 22:15:52 +02:00
Fedor Isakov
6eb1e06013
Add a unique key to identify an aspect clique.
2019-10-19 22:12:34 +02:00
Fedor Isakov
4e892ea5aa
Drop additional "enabled" flag, superceded by Config.
2019-10-19 11:04:14 +02:00
Fedor Isakov
3fb8df4af4
Fix CheckProjectModules test. Drop usages of deprecated API.
2019-10-19 11:03:30 +02:00
Fedor Isakov
fc4ff2875c
Implement more fine-grained Config reset: drop all levels >= given.
2019-10-19 10:22:17 +02:00
Fedor Isakov
44d9d9e6b2
Avoid processing empty aspect clique.
2019-10-19 09:54:15 +02:00
Fedor Isakov
7705e911c5
Avoid failure on missing effect value.
2019-10-18 21:18:00 +02:00
Fedor Isakov
d8243a5bf4
Fix the typechecking cache: avoid clearing all type assignments, ensure incremental update.
2019-10-18 18:22:07 +02:00
Fedor Isakov
51cc3a7afc
Simplify working with SessionToken, drop a supefluous step.
2019-10-18 18:22:07 +02:00
Fedor Isakov
1e5c83dd93
Avoid failing with NPE if a project pref component is not available.
2019-10-18 17:03:56 +02:00
Fedor Isakov
2c514f08fd
Fix Config initialization from tests. Replace init/deinit with single reset method.
2019-10-18 17:03:18 +02:00
Fedor Isakov
6c63cb409f
Introduce Config component. Make typechecker pref page nicer. Consolidate all typechecking options.
...
A reusable Config app component to be responsible for all level of configurations: default/system/user/ui.
Swith to Config interface instead of map<string,Object> for options.
Add an UI option to control whether trace is enabled.
2019-10-18 11:58:51 +02:00
Grigorii Kirgizov
439599d726
Fix Analyses test (fix recover constraint signature)
2019-10-15 21:30:00 +03:00
Grigorii Kirgizov
bc06bf39cc
Handle one more case of finding principal constraints in Query rules with an additional heuristic.
2019-10-15 21:15:38 +03:00
Grigorii Kirgizov
28a82fd443
Revert "Temporarily disable failing tests in BLIncrTypecheck test case."
...
This reverts commit 1c1ddd6e
2019-10-15 18:01:21 +03:00
Fedor Isakov
6372f5a4a4
Experimental: cache the results of convertsTo/coerceTo queries.
...
The cache is repository-local and is invalidated on every command in that repository.
2019-10-12 09:35:09 +02:00
Fedor Isakov
0b037d9702
Code cleanup: remove unused effect values, ensure Reporting.assignType() throws an UOE.
...
Reporting interface is to be phased out.
2019-10-12 09:35:09 +02:00
Fedor Isakov
54c9ff4698
Switch "show type" action's implementation to use TypecheckingService.
...
Tried also to register TypesModule with the repository, in vain.
2019-10-12 09:35:09 +02:00
Fedor Isakov
06076860ed
Deprecate SNodeSetType operation in typechecking lang. This lang exists now only for the sake of "types" aspect.
2019-10-12 09:35:09 +02:00
Fedor Isakov
1c1ddd6e5d
Temporarily disable failing tests in BLIncrTypecheck test case.
...
Tests started to fail after an argument was introduced to a constraint that is being
activated from a query -- recoverAll/1 now has a parameter.
2019-10-12 09:35:09 +02:00
Fedor Isakov
5258a9343f
Switch to collecting types during typechecking using the explicit type collector.
...
Use the parameter to typechecking query TYPECHECK to collect types.
Stop highlighting every expression with its type.
2019-10-10 17:30:11 +02:00
Fedor Isakov
f8dcf127db
Extend typechecking query TYPECHECK with a parameter to report types.
...
Reporting of calculated types is to be more explicit.
The not-so-obvious _type_.set() operation is to be phased out.
2019-10-10 17:30:11 +02:00
Fedor Isakov
8e4daab3c7
Stop using IMakeService.INSTANCE.
2019-10-07 11:27:32 +02:00
Fedor Isakov
50c0130138
Fix memory leak: leaked through toolbar actions.
2019-09-30 16:44:36 +02:00
Fedor Isakov
a0405839b3
Necessary plumbing for rules segmentation. Off for now.
...
Turns out this feature actuall worsens the performance.
2019-09-30 16:44:36 +02:00
Fedor Isakov
49518e0704
Switch to reactor version 0.9.14.
2019-09-30 16:44:36 +02:00
Fedor Isakov
30e3400859
Implement isUpToDate check for types index cache.
2019-09-16 11:02:59 +02:00
Fedor Isakov
b46c394aba
Minor refactoring: consolidate trace events and report items together.
2019-09-15 14:12:47 +02:00
Fedor Isakov
9f7b14ef8b
Refactorings in coderules helper to better handle effects.
...
Introduce failure as effect value.
Avoid throwing exceptions on normal evaluation completion.
Drop ResumeNextStepException.
2019-09-15 10:14:04 +02:00
Fedor Isakov
0b917fea92
Fix memory leak in Action Trace. Closing the tool itself closes all tabs.
...
The default functionality of "Close" action provided for tools is not enough to implement
a close action: the contents are still registered in the Disposer and the memory is leaked
as a result.
2019-09-13 15:56:11 +02:00
Fedor Isakov
1cbd5defff
Drop PrintDelegate stack, avoid memory leaks.
2019-09-13 13:44:23 +02:00
Fedor Isakov
ad6864cfda
Various refactorings in Step/Effect apis: simplifying the code.
...
Refactor Effect: drop type parameter, simplify usage.
Redesign the way values are provided by an Effect.
Simplify schedule method signature.
Drop scheduleWithTrace from Step interface.
Introduce ConfigureEvalStep.
Drop Step.Options.
Drop LocalEffect's.
2019-09-12 17:12:34 +02:00
Fedor Isakov
068ce227c3
Avoid propagating runtime exception from program evaluation.
2019-09-12 17:08:02 +02:00
Fedor Isakov
8b73b66e34
Introduce RepositoryProvider interface to provide access to context repository.
...
TemplateApplicationSession to provide repository to templates.
Supervisor subclasses to provide repository to predicates.
2019-09-12 17:08:02 +02:00
Grigorii Kirgizov
332735e770
Remove unneded handler
2019-09-12 15:29:14 +03:00
Grigorii Kirgizov
cdfe1f2c0c
Update language version after migrations from mps.logic lang
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
85b074d189
Make ListNodeCons migration a bit more restrictive
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
135724a481
Fix use case of list matching with any list
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
7242e832b1
Upd mps.logic lang version
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
fc1caf1238
Fix Remove_Splice_from_ListNode migration
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
163e339436
Add migration for replacing List usages for ConsList constructor usages
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
3ff9ccb0c6
Add wrapping substitute menu for LogicalDataForm concept
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
cfe0b1b648
Add ListNodeCons DataForm: another constructor for ListNode similar to Haskell's `head:tail` constructor
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
edbd77c748
Prepare for migration from spliced Logicals in ListNode to LogicalDataForm
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
6a02be6f6e
Avoid nested empty lists in mapped ListNode.Alias. Fix capture in lcta helper for lub. Add test for lub.
...
The problem with empty lists showed up at least in printing lists.
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
37be72d9cf
Refactor generation of ListFeature & 'spliced' MultiMetaLogical. Fix BL typesystem to accomodate these changes.
...
ListRole in DataForms is stricter and doesn't allow non-list values.
Spliced MultiMetaLogical is always generated to ListNode without intermediate step of Variable[].
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
e2e531f13c
Add few utilities and extend logic of subtypePaths for LUB impl
...
subtypePaths constraint now has an extended version subtypePathsRaw that returns
extended 'classifierType' dataforms with type parameters (no only classifiers).
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
9480bc98fe
Fix var ref in closure
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
a0b73f9f1b
Silence BL analysis check for a while
...
The test can fail in temporary states of BL typesystem while it is being extended
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
aa96197085
Use Effect for passing SessionToken from EvaluateRulesStep. Use Step.Options for "is with incrementality" option.
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
924d07c8ed
Return 'tagDetail' logic in RuleBuilder to handle duplicate tags of rules generated in loops
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
4ea72e6d4f
Allow checking for "no type" TypecheckingReportItems in typechecking tests
2019-09-11 13:24:01 +03:00
Fedor Isakov
adc115b164
Avoid failure on exception thrown from a template.
...
Produce a program even in case some of applied rules failed.
Allow to recover from failure in apply templates.
2019-09-10 18:37:12 +02:00
Fedor Isakov
b842fb6b9d
Avoid unnecessarily throwing exception on failure.
...
EvaluationFailureException is meant to be only thrown from predicate solvers.
It is specially processed in the reactor engine.
2019-09-10 18:37:12 +02:00
Fedor Isakov
c016ffc01b
Fix a race condition.
...
Instead of an ad-hoc synchronization in implementation use a more broad synchronization in a public method.
2019-09-10 18:37:12 +02:00
Fedor Isakov
51860132b7
Remove overlooked debug output.
2019-09-10 18:37:12 +02:00
Fedor Isakov
5b5798dcad
Switch to reactor lib 0.9.13.
2019-09-10 18:37:11 +02:00
Fedor Isakov
f583c62d93
Drop overrides of removed methods.
2019-09-10 18:37:11 +02:00
Fedor Isakov
d3a555c3a4
Ensure correct nodeRef is passed as a feedback template
...
.
2019-09-05 22:56:11 +02:00
Fedor Isakov
cdac933b0c
Refactor TraceObject to contain all traces from all evaluation sesssion.
...
If multiple aspect cliques are used in a model, multiple sessions are launched,
which results in multiple traces.
2019-09-05 22:56:11 +02:00
Fedor Isakov
67284c802e
Drop baseLanguage from imports in a sandbox model.
2019-09-05 22:56:11 +02:00
Fedor Isakov
fc3b69f06e
Make sure the "annotation" lang has a types aspect.
2019-09-05 18:53:52 +02:00
Fedor Isakov
43e34bd14e
Redesing the way aspect cliques are processed.
...
An empty clique singifies that either none of the languages in the clique have the necessary aspects,
or that the "leaf" languages don't.
2019-09-05 18:53:27 +02:00
Fedor Isakov
1636f18f73
Support navigating to rule from editor. Drop implementations of Reporting.report.
2019-09-04 16:53:03 +02:00
Fedor Isakov
e628ea350b
Collect and index all feedback nodes. Support navigating to next/prev feedback.
2019-09-03 16:19:16 +02:00
Fedor Isakov
ab8ec75878
Rewrite feedback handling without Reporting interface.
...
Instead of using the (deprecated) Reporting interface when handling
feedback, use the more straightforward abstract method.
2019-09-02 17:55:46 +02:00
Fedor Isakov
77be3869a4
Introduce target specification to provide feedback constraint.
...
One should be able to report issues with a target.
The target is normally inferred from the rule's origin, but sometimes it is
necessary to specify the issue's target explicitly.
2019-09-02 17:55:46 +02:00
Fedor Isakov
8b82d7ba4d
Introduce origin block for specifying the constraint rule origin.
2019-09-02 17:55:46 +02:00
Fedor Isakov
d279cc64ba
Deprecate report operation and API.
2019-09-02 17:55:46 +02:00
Fedor Isakov
41c4c7e0a3
Fix provide feedback predicate to use the updated API.
2019-09-02 17:55:46 +02:00
Fedor Isakov
130c273980
Swith to using reactor lib 0.9.12.
2019-09-02 17:37:55 +02:00
Fedor Isakov
84d07ef5f4
Another strategy to deal with deadlocks: drop requirement to use EDT.
...
Typechecking needs a synch point to update its "types model".
Using either EDT or the sequential scheduler is unfeasible beacause
of possible deadlocks.
2019-08-29 13:19:22 +02:00
Fedor Isakov
46406f8917
Straighten up error processing when launching coderules.
2019-08-29 11:36:54 +02:00
Fedor Isakov
355a503f5e
Various refactorings in trace and reporting.
...
Replace ReportSink with Consumer.
Rename TraceEventsCollector -> TraceEvents.
Collect report items in TraceObject.
Ensure messages view tabs stay pinned.
Enable navigation from messages view to source nodes.
Respect report item's severity.
2019-08-28 21:27:09 +02:00
Fedor Isakov
7956b8c89c
Ensure type index update is run in EDT, avoid race condition.
2019-08-28 17:46:34 +02:00
Fedor Isakov
91f317b307
Ensure message view tab is disposed, avoid memory leak.
2019-08-27 11:55:35 +02:00
Fedor Isakov
5c239fb4b9
Fix Memoizer race condition.
2019-08-27 11:22:39 +02:00
Fedor Isakov
8d289021d1
Remove toxic imports.
2019-08-26 19:01:26 +02:00
Fedor Isakov
899d6b5208
Avoid producing NPE on missing template.
2019-08-26 17:14:39 +02:00
Fedor Isakov
17cb4654cf
Introduce message handler parameter to rule application session.
...
In some situations it is unreasonable to fail on missing templates,
it's better to produce a working but perhaps incomplete program
than not to produce anything.
2019-08-26 16:53:04 +02:00
Fedor Isakov
b79d174753
More fine-grained reporting of errors during coderules evaluation.
2019-08-26 15:27:04 +02:00
Fedor Isakov
388ea7e268
Minor refactorings in typechecking service. Display number of reported items with query.
2019-08-26 13:06:58 +02:00
Fedor Isakov
c7ed81bd51
Switch to using MessageLog instead of the default message log. Minor fixes.
...
Collect coderules messages in "Messages" tab by default.
2019-08-26 13:06:58 +02:00
Fedor Isakov
e60a2151c0
Avoid using executeCommand to schedule a message view update.
2019-08-23 12:48:43 +02:00
Grigorii Kirgizov
a3451cb714
Use Effect for passing SessionToken from EvaluateRulesStep. Use Step.Options for "is with incrementality" option.
2019-08-22 23:04:05 +03:00
Fedor Isakov
279a048acd
Fix reference to an API class.
2019-08-22 16:55:29 +02:00
Grigorii Kirgizov
224900fc88
Add option to Queries for enabling incrementality
2019-08-22 17:29:54 +03:00
Grigorii Kirgizov
e7c0c0e3a0
Enable incrementality in TypecheckingStep
2019-08-22 17:15:15 +03:00
Grigorii Kirgizov
dc32a149da
Add preference for enabling incrementality
2019-08-22 17:14:44 +03:00
Grigorii Kirgizov
654e8b60cc
Resolve rebase conflicts concenred with enabling incrementality in CoderulesTypecheckingProvider
2019-08-22 17:14:12 +03:00
Fedor Isakov
f698d7dbdd
Fix incremental evaluate step -- adapt to the changed API.
2019-08-22 15:30:55 +02:00
Grigorii Kirgizov
cc20e9735b
Extend TypesIndexCache & EvaluateRulesStep with storing and retrieving SessionToken
2019-08-22 15:19:58 +02:00
Grigorii Kirgizov
af2faeb077
Remove dependencies on samples.baseLanguageExt and samples.lambdacalc from tests, fix build. Rebase onto master.
2019-08-22 15:16:18 +02:00
Grigorii Kirgizov
2b1ec4a4a6
Remove interprocedural version of analysis
2019-08-22 15:16:18 +02:00
Grigorii Kirgizov
944a181685
Switch basic principals analysis to fully gen-time impl
2019-08-22 15:16:18 +02:00
Grigorii Kirgizov
9843669f79
Remove old runtime coderules analyses
2019-08-22 15:16:18 +02:00
Grigorii Kirgizov
37a6a4e1b7
Two more tests on FreeVarEscapeAnalysis for more complex cases. Extend checker logic for them.
2019-08-22 15:16:18 +02:00
Grigorii Kirgizov
c6fc2c3f96
Test FreeVarEscapeAnalysis on full languages. Passes for BL, fails for lambdacalc as intended.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
1c9060b769
Add simpler analysis to answer a question "Is incrementality allowed for this Coderules aspect?". Add initial tests for it.
...
It is a rule-local, non-interprocedural analysis and it also uses VarAnalysisUtil.
New analysis checks whether free variables can "escape" principal constraint rules inside principal constraints.
If there is such escaped variable, then it is a signal that this type system is designed with non-local type inference in mind.
Otherwise there's no need to produce principal constraints with free logicals as arguments.
So, no principal constraints with free vars -- no type inference is possible.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
ae993f6868
Separate VarAnalysisUtil into base and impl part that handles impl of involved relations ("isAffected").
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
87fb26b95b
Fix NPE in access to hashmap in VarModificationAnalysis
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
e41589cd4a
Fix few places in VarModificationAnalysis. Add tests for it (found some problems).
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
f1aa5cb923
Finish interprocedural part of VarModificationAnalysis. Add one more test for Var..Util.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
4ab877e822
Refine isAffected relation in VarAnalysisUtil: handle dep-s through composite logicals
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
62b08720cd
Fix finding isAffected relation in var2notvar case by more carefully handling aliasing with "non-local" vars. Few more tests.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
f7040b1d8d
Add metalogical aliasing in VarAnalysisUtil. Rewrite older analyses fully in BL and not template macros.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
8a2942c42b
Move VarModificationAnalysisUtil to new model for analysis-related code
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
64230b0412
Add tests for VarAnalysisUtil. Update its semantics.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
5f2b010e5b
Add checking analysis for non-trivial var modification (e.g. unification)
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
5ba57b0b61
Refine notion of principal rule: discern between different kinds of rules from queries. Resolves slowdown.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
98356f25cc
rebase on master. remove extra deps in coderules generator
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
475ed7d023
Adjust border between abstract analyses classes and their generation-time impls
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov
906f919e16
Run coderules program analyses at generation stage. Extend Rule with basetag(). Adjust how rule_tag is generated for reuse in generator.
...
basetag() returns name of ConstraintRule without node id.
Check on whether Rule is principal are now done through basetag(), it's sufficient.
Add part of future analysis: CallerTableBuilder.
2019-08-22 15:16:17 +02:00
Fedor Isakov
1b1de4af47
Introduce options to coderules helper. Only turn on typechecking trace in UI.
2019-08-22 13:47:51 +02:00
Fedor Isakov
6290cbe152
Enable to open typechecking trace from message view; other changes.
...
Collect trace on every invocation of typechecking.
Drop usages of editor component from trace view.
2019-08-22 11:39:07 +02:00
Fedor Isakov
028683f394
Introduce combinable effects, refactor Step hierarchy to produce effects.
...
Step subclasses are meant to be immutable and stateless.
The state is now encapsulated in Effect subclasses, which can be combined.
Correspondingly, schedule now produces streams of effects.
2019-08-21 11:44:26 +02:00
Fedor Isakov
aef7e4c2ee
Extract the non-UI part of trace view to j.m.coderules solution.
2019-08-20 23:11:19 +02:00
Fedor Isakov
d786ff43b9
Re-save all models, language name updated in .mpl files.
2019-08-20 23:11:19 +02:00
Fedor Isakov
c3d20db0e3
Refactor away messages and trace collection from trace view component.
...
The UI component TraceComponent serves as a visualization tool for a trace collected independently.
Messages are likewise collected elsewhere and shown via message log.
2019-08-20 23:11:19 +02:00
Fedor Isakov
901bf5ad20
Fix type index cache: impossible to attach back an unattached model.
...
Index must never be updated once registered (published) with a repo.
A new index is always created and all contents is copied from the old one.
2019-08-20 23:11:19 +02:00
Fedor Isakov
59bdd8a3da
Fix the "isRelevant" logic in coderules typechecker.
2019-08-20 23:11:19 +02:00
Fedor Isakov
9178e8c913
Coderules-specific MessageViewTool and MessageLog for providing feedback.
...
Certain compromises have to be made: for one, it is assumed there is only one
project open and it is a MPSProject. Feedback is only reported to the messages
view and the view itself is not yet integrated into the main messages view.
2019-08-20 23:11:19 +02:00
Fedor Isakov
8017a97327
Adapt to changes in typechecking facade.
2019-08-14 13:29:12 +02:00
Fedor Isakov
684c218003
Flip "disabled" option to "enabled", false by default. Introduce property-controlled static flag.
2019-08-12 18:21:38 +02:00
Fedor Isakov
a26ab6541b
Disable coderules typechecker during model check test.
2019-08-12 18:21:38 +02:00
Fedor Isakov
45ae7a6a24
Fix build script imports and rebuild project.
2019-08-12 18:21:38 +02:00
Fedor Isakov
39c4499585
Refactor aspect lookup, introduce aspect clique to support multiple typesystems.
...
There might be several unrelated typesystems defined by languages imported into
a single model. A way to handle this is to use aspect cliques that correspond
to a collection of related aspects, which build a single typesystem.
2019-08-12 18:21:38 +02:00
Fedor Isakov
17544576ac
Introduce "disable typechecker" properties page. Implement typechecking coerce query.
2019-08-12 16:45:00 +02:00
Fedor Isakov
696d7dc226
Introduce coerce query kind.
2019-08-12 16:45:00 +02:00
Fedor Isakov
1e3917e787
Make dataform printer reusable.
2019-08-12 16:45:00 +02:00
Fedor Isakov
4c4c610531
Enable macro expansion on concept; null input produces empty builder.
2019-08-10 16:25:36 +02:00
Fedor Isakov
12acc300dc
Provisional implementation of typechecking queries over coderules.
2019-07-30 17:56:50 +02:00
Fedor Isakov
2ef8adfe5e
Switch to reactor 0.9.11
2019-07-30 13:48:08 +02:00
Fedor Isakov
9f2cc61cc4
Implement missing methods in TypecheckingQueries interface.
2019-07-30 12:22:52 +02:00
Fedor Isakov
3a48c47880
Migration: "update versions in descriptors".
2019-07-30 11:49:26 +02:00
Grigorii Kirgizov
b7b5ece832
Adjust notion of principal rule in analysis. Reenable assert in ProcessingStateImpl.
...
Now any rule matching on or activating principal constraints counts as principal.
2019-07-29 20:25:25 +03:00
Fedor Isakov
3132a8fa1d
Disable printing debug/trace info during tests execution.
...
Tests must not generate more info than is absolutely necessary.
Use "-Dcoderules.debug=true" and "-Dcoderules.inc.debug" when launching tests to enable debug output.
2019-07-29 17:48:20 +02:00
Fedor Isakov
ef7e3fa1a6
Drop "tagDetail" hack, use again string as a unique rule's tag.
2019-07-29 17:16:43 +02:00
Fedor Isakov
66c9222a95
Run migrations with MPS 2019.2 EAP3.
2019-07-26 17:27:18 +02:00
Fedor Isakov
745a20b572
Fix tests (all types in demo lang to be String).
2019-07-26 17:22:42 +02:00
Fedor Isakov
0f8d858748
Remove unnecessary calls to reactor lifecycle.
2019-07-26 17:18:37 +02:00
Fedor Isakov
ca894c9030
Move control over reactor lifecycle to app plugin.
2019-07-26 17:17:07 +02:00
Fedor Isakov
aec1bd1a2d
Refactor changes tracking, avoid NPE on already removed nodes.
2019-07-26 17:16:02 +02:00
Fedor Isakov
4e4e1f68ef
Fix buildscript dependencies.
2019-07-26 17:14:48 +02:00
Grigorii Kirgizov
11712c7069
Restrict the notion of principal rule (as effect, match journal is shorter now). It also positively affected reporting, so switch reporting to the new way.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
9b49c3f053
Fix tests for incremental tc of BL. Add more tests for types with bounds. Temporarily revert reporting method to the old one.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
0ab4e48da1
Fix hash collision in tests. Rename few usages of 'handler' to 'rulesList'.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
ca84b0ae02
Add few more tests on wildcards.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
3d80841639
Switch ReportingSupervisor to handle RuleMatch. Add Supervisor using ProgramSpec instead of PrincipalOriginIndex.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
78c0cc1559
Setup code for failing typechecking tests, add one. Extract Supervisor impl from ProgramEvaluator.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
b9309e6369
Add several tests of incr typecheck on BL. ProgramEvaluator now depends on ProgramProducer.
2019-07-26 17:00:31 +02:00
Grigorii Kirgizov
a2672ad20a
Include into ProgramGenInfo info about node parents.
...
This info about AST deps between nodes is needed to find
additional rule matches that must be also invalidated.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
43a8838c5a
Handle the case of pattern logicals for finding principal constraints. Add rules from queries as principals too.
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
384782e708
Make Rule.uniqueTag() depend on snodes used inside rule template.
...
When data used in a rule changes, it must get to the RulesDiff.
RulesDiff works using tags, so tags must change when snode data changes.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
9a22149a5c
Add some debugging info for incremental lang typecheck tests
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
46b9435204
Add basic test for incrementality & rename test model
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
ce9b91c4a5
Add basic tests for simple program analysis, add test helpers.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov
6c4667e066
Add basic coderules program analysis for determining principal constraints
2019-07-26 17:00:30 +02:00
Fedor Isakov
79b08c6f83
Revert "Apply migrations from EAP3 and rebuild project."
...
This reverts commit 9c5bf858c3 .
2019-07-26 15:30:30 +02:00
Fedor Isakov
274f1f5a8d
Fix tests: use only string value for properties for now.
2019-07-19 12:28:27 +02:00
Fedor Isakov
9c5bf858c3
Apply migrations from EAP3 and rebuild project.
2019-07-19 12:28:27 +02:00
Fedor Isakov
58db91822b
Adapt to changes in typechecking facade API.
2019-07-19 12:28:25 +02:00
Fedor Isakov
80b078491d
Implement new method defined in TypecheckingQueries.
2019-07-19 12:28:25 +02:00
Fedor Isakov
edf3071bce
Add SuppressErrorsChecker to the list of checkers used during build.
2019-06-25 11:20:45 +02:00
Fedor Isakov
9bd793c8ec
Move the logic of updating TypesIndex to TypecheckingStep.
2019-06-07 09:16:21 +02:00
Fedor Isakov
86821af258
Fix incorrect model name saved inside the model itself.
2019-06-07 09:16:21 +02:00
Fedor Isakov
b827c509e7
Drop requirement to invoke TypesIndexCache.dispose() in a read action.
2019-06-07 09:16:21 +02:00
Fedor Isakov
cd37daaa07
Apply migrations after switching to the latest EAP build of MPS.
2019-06-07 09:16:21 +02:00
Fedor Isakov
e19a66f512
Fix implementation of typechecking provider interfaces.
2019-06-07 09:16:20 +02:00
Fedor Isakov
7061fff775
Update TypesIndex as a reactive step.
2019-06-05 16:16:00 +02:00
Fedor Isakov
17ed4642ae
Apply all available automatic migrations.
2019-06-05 16:16:00 +02:00
Fedor Isakov
57de11c3fe
Rename all modules/models having prefix j.m.typechecking to j.m.coderules.typechecking. The former is reserved.
2019-06-05 16:15:59 +02:00
Fedor Isakov
fe505792c6
A bunch of refactorings and renames in typechecking plugin.
...
Remove unused interfaces, merge classes with similar functionality, reduce the number of used classes.
2019-06-05 16:14:27 +02:00
Fedor Isakov
65e123f700
Implement typechecking provider interface.
2019-06-05 16:09:20 +02:00
Fedor Isakov
450ac6589a
Drop dependency on Kontlin stdlib -- provided by the platform.
2019-06-05 15:18:47 +02:00
Fedor Isakov
89491a1c79
Switch to using conreactor 0.9.10
2019-06-04 18:59:53 +02:00
Fedor Isakov
3b638b2d08
Drop usages of Rule.tag(), replace with Rule.uniqueTag().
...
Switch to using long as a rule's unique tag.
Rename all entities using "handler" to "rulesList".
2019-05-17 18:01:34 +02:00
Fedor Isakov
61b60938d0
Fix heuristic for determining the rule with origin that should serve
...
as a failure recovery point.
2019-05-16 12:36:47 +02:00
Fedor Isakov
b482de1ce5
Rename reactor classes: Handler -> RulesList, IdWrapper -> Id
2019-05-10 12:00:02 +02:00
Fedor Isakov
eb5b38384f
Rename Handler class in reactor API to RulesList.
2019-05-09 17:30:14 +02:00
Fedor Isakov
bd1c56d9d0
Rename concept Handler -> RulesList
2019-05-09 17:30:14 +02:00
Fedor Isakov
aaec11de9b
Adapt to the changes in reactor API.
2019-05-05 14:29:08 +02:00
Fedor Isakov
4389b349d7
Adapt to the changes in reactor API.
2019-05-02 14:59:57 +02:00
Fedor Isakov
b1f7ba4ecf
Drop usages of deprecated symbols in reactor API.
2019-05-02 14:46:57 +02:00
Fedor Isakov
478b43ce16
Drop usages of deprecated interfaces.
2019-04-26 00:22:02 +02:00
Fedor Isakov
ed6f7a07c2
Remove instances of obsolete concept containingLink, replace with link.
2019-04-24 22:14:24 +02:00
Fedor Isakov
f7b1b96bcc
Remove usages of deprecated log statements, migrate to message warn.
2019-04-24 21:21:03 +02:00
Fedor Isakov
99ea2a7b71
Switch to the latest revision of reactor lib (0.9.9).
2019-04-24 21:21:03 +02:00
Fedor Isakov
2480615b28
Fix instability of activation trace view's scroll position when changing filters.
2019-04-19 18:16:10 +02:00
Fedor Isakov
ceb721e501
Fix reexport dependency in build script.
2019-04-19 12:08:57 +02:00
Fedor Isakov
ccb5410ba6
Make ActivationTrace remember the position and column widths on changing filter state.
...
Save the first visible row before the change and restore the view after the
the change, so that the same row is displayed at the top of viewport.
2019-04-19 11:50:03 +02:00
Fedor Isakov
15dce5cf43
Activation trace: ensure the tree can be copied to clipboard, including identation.
2019-04-19 11:50:03 +02:00
Fedor Isakov
55940d2e16
Remove Kotlin libs from reactor module and from distrib. Rebuild project.
...
Kotlin runtime is available from the platform.
2019-04-11 11:10:00 +02:00
Fedor Isakov
ab006cc8d9
Fix missing dependency.
2019-04-10 09:45:47 +02:00
Fedor Isakov
396b1fdad3
Move all classes from j.m.typechecking to j.m.typechecking.service. This package name is reserved.
2019-03-22 11:40:32 +01:00
Fedor Isakov
36be0a8e6d
Rename TypecheckingFacade to Typechecking to avoid name collisions.
2019-03-22 11:28:58 +01:00
Fedor Isakov
671194c9c3
Switch to the latest EAP of MPS 2019.1. Re-save all models.
2019-03-22 11:09:39 +01:00
Fedor Isakov
adcfba5e9a
Introduce two built-in predicates to be used instead of eval(false) etc.: fail and report message (debug/info/warning/error/fatal).
2019-02-18 11:49:11 +01:00
Fedor Isakov
b102237bb8
Drop static collection of predicate symbols. Adapt to the latest reactor API. Drop DefaultSessionSolver
2019-02-17 11:39:56 +01:00
Fedor Isakov
a97c33a256
Collect all solvers when building a program. These to replace "solver registration" procedure.
2019-02-15 17:47:06 +01:00
Fedor Isakov
9f8539bfd8
Drop unused and long deprecated feature.
2019-02-15 17:46:10 +01:00
Fedor Isakov
5f068c1ac0
Extract stuff related to program producing to separate model.
2019-02-15 17:15:17 +01:00
Fedor Isakov
255b7061f7
Reorganize models/packages, restructure code components responsible for program building/evaluation.
2019-02-15 17:15:17 +01:00
Fedor Isakov
2f8ff698b3
Minor refactorings in program producing code. Consolidating everything related to program producing into a single package.
2019-02-15 17:15:16 +01:00
Fedor Isakov
83e5ce8c26
Switch to the latest conreactor version.
2019-02-15 17:15:16 +01:00
Fedor Isakov
a240246daa
Ensure failures don't stop program evaluation, recover failure always at top level (when processing "main/0" constraint).
...
Keep track of principal origins to be used as points of failure.
Minor code cleanup/refactoring.
2019-02-06 12:57:47 +01:00
Fedor Isakov
49a381936d
Enable to specify custom matching strategy when asserting that locally inferred types are the same.
2019-02-02 16:09:39 +01:00
Fedor Isakov
5b255f2a02
Fix references and introduce languages engaged on generation to keep compat. w/191 EAP.
2019-02-01 11:31:35 +01:00
Fedor Isakov
92faa816f8
Drop superfluous log statements.
2019-01-31 23:47:11 +01:00
Fedor Isakov
24ac5447b3
Make ErrorAnnotation able to suppress errors.
2019-01-31 11:44:07 +01:00
Fedor Isakov
9243c00c65
Fix issues found by model checker (ex typesystem).
2019-01-31 11:30:02 +01:00
Fedor Isakov
dc1965fdc9
Introduce a test for running model checker on all models in the project as a part of CI.
2019-01-31 11:30:02 +01:00
Fedor Isakov
52348b2b38
Make comment look nicer with standard C-style representation.
...
Make Handler, MacroTable and their contents commentable.
2019-01-27 23:33:02 +01:00
Fedor Isakov
613e895d17
Fix constraint rules editor to display "activate" section always.
...
Constraint rule to be entered with "on" keyword.
2019-01-27 22:56:07 +01:00
Fedor Isakov
551a015ada
Fix unification predicate not doing occurrs check on tell.
2019-01-26 13:52:10 +01:00
Fedor Isakov
934f98b717
Fix UnificationPredicate to delegate logical union logic to the underlying implementation.
...
Test unification failure on cycle detected.
2019-01-25 15:02:03 +01:00
Fedor Isakov
e2ea78ef9e
Improve layout of constraints and dataforms. Get rid of unnecessary anchors and hacks.
2019-01-21 11:20:30 +01:00
Fedor Isakov
27681ef80c
Switch substitution to work using equals predicate instead of equals() java method. Testing substitution on tricky cases.
2019-01-15 20:09:16 +01:00
Fedor Isakov
0b9fc55817
Make equals predicate respect trivial bindings: [X -> Y] where X is unified with Y. Tests.
2019-01-15 19:04:07 +01:00
Fedor Isakov
161f00355d
Fix equals predicate: make it conform to general contract of unification without additional bindings. Testing ask/tell eq.
2019-01-14 12:25:27 +01:00