Grigorii Kirgizov
898087f427
Fix term table in closuresExt to extend blExt term table and use imported sequence type
2020-05-04 15:15:35 +03:00
Grigorii Kirgizov
72d48d76e3
Add typechecking for recursive closure invoke expression, add tests & fix older ones
2020-05-04 15:15:28 +03:00
Grigorii Kirgizov
3284d2c331
Add typechecking of ClosureLiteral and invoke expressions
2020-05-02 14:04:34 +03:00
Grigorii Kirgizov
19ab82586f
Add function type subtyping
2020-05-02 14:04:34 +03:00
Grigorii Kirgizov
b9fe7439bb
Add empty closuresExt files for lang and test solution, upd bulid script
2020-05-02 14:04:34 +03:00
Grigorii Kirgizov
3101d22a5b
Upd mpscore build script and build.xml
2020-05-02 13:44:19 +03:00
Grigorii Kirgizov
735276d2a2
Add import/export constructs for sequence type in collectionsExt to enable basic tests
2020-05-02 13:43:03 +03:00
Grigorii Kirgizov
8921c44a8e
Add first tests for sequence type conversions
2020-05-02 13:43:03 +03:00
Grigorii Kirgizov
451b892b9f
Add empty models for collectionsExt lang and tests
2020-05-02 13:43:03 +03:00
Grigorii Kirgizov
625ea8c049
Add j.m.bl.sequenceBase language with basic sequence typing rules
...
This lang doesn't depend on collections lang and extracts
common dependencies of closures and collections langs:
sequence term and its basic typing rules.
2020-05-02 13:43:03 +03:00
Grigorii Kirgizov
69457dc747
minor fix: extend term tabl from blExt in tuplesExt
2020-05-02 13:43:03 +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
bd1e0b61e5
minor: rewrite errorType constraint in blExt as call macro
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
a2f3a5b824
Avoid leaving logicals unassigned in case of error: assign error type explicitly
...
Needed to disambiguate free variables that are not yet inferred
from those which has been already processed with error.
Also more properly handle case of trivial return type inference
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
aca2b3b8d9
BL typesystem: forbid conversion to/from void type
...
There's special constraint 'isCompatbile' to handle void.
Conversions with void can arise from closure types returning nothing.
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
125d051534
Fix check for return statements given possibility of nested method-like decls
...
Also fuse two bl rules for return statement and last expr.
Output feedback on return stmt, not returned expr,
because it also handles case of erroneous void return
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
5dcc71d2a5
Separate typing or return statement from checking its compatibility with method type
...
For convenience: to always get typeOf(return)
to unconditionally match on it (eg in closures lang)
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
e1ff37b815
Document RuleMatchingProbe (most importantly, its matches() contract).
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
8447081b26
Return from Probe only matches relevant to last expanded Occurrence. Fixes MPSCR-59
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
4928daf3fc
Add tests related to program execution pattern exhibited by MPSCR-59
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
49d8507eed
Avoid duplicate subscription of Occurrences on LogicalState
...
Previously it was done twice: at Occurence creation
and in ConstraintsProcessing.processActivated.
Occurrences now constructed in 'dead' state (without observers).
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
17de7bf9fe
Fix tracking of logical observers: avoid duplicates & clear observers correctly
...
Commit also aligns Observable/Observer interfaces a bit.
Side note: the current role of LogicalState is to only
forward events from Logical to Observers with augmented
information (i.e. providing Controller to handle event).
2020-04-30 15:38:34 +03:00
Grigorii Kirgizov
3f2b7df7b4
Add sanity check that every match has active occurrence in its head (MPSCR-59)
2020-04-30 15:38:33 +03:00
Grigorii Kirgizov
14e4385382
Fix incorrect reset of occurrences that led to invalid occurrences state
...
Resulted in some in fact dead occurrences being reactivated
2020-04-30 15:38:33 +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