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
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
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
Fedor Isakov
2dc2191be3
Editor improvement: auto-substitute name from target concept for rule templates.
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
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
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
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
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
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
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
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
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
ed821053ec
Rename concepts for consistency to Term*. Move one more concept to coderules.
2020-04-13 18:00:15 +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
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
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
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
ace1303a96
Fix analysis to support new pseudo constraints.
2020-04-13 17:58:32 +02:00