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