Commit Graph

386 Commits

Author SHA1 Message Date
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 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 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 f3ed39c8a6 Refactor a bit program analyses merge code in RuleProcessingSession 2020-05-01 13:38:12 +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 46cc65fd59 Allow passing multi meta logicals to macros as parameters 2020-04-30 15:38:33 +03: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 dae5a63835 Introduce Query interface to replace QueryKind. Explicitly specify query params. 2020-04-21 12:36:19 +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 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 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 eb4862eb48 Force save all models -- update resolve info. 2020-04-14 16:20:05 +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 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 cf77688a71 Replace instances of deprecated ListRole with ChildRole. 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 4a60bc36f6 Migrate test lang to new macro system. 2020-04-13 17:58:33 +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