Commit Graph

177 Commits

Author SHA1 Message Date
Fedor Isakov 93b782122a Drop mockito lib, replace with ad-hoc solution, fix the tests. 2020-10-25 00:00:19 +02:00
Fedor Isakov ab31a8fe0d Update mockito lib, fix the tests. 2020-10-23 15:29:40 +02:00
Fedor Isakov 51606b56c7 Rebuild project. 2020-10-23 12:26:31 +02:00
Grigorii Kirgizov b693156229 minor refactoring: few changes in OriginIndex interface for better readability 2020-09-24 11:43:17 +03:00
Fedor Isakov 32b11c0c7f Introduce memo expression to enable memoization of values.
During template application memo can be used to store results
of a computation in the session. The memo will be automatically
cleared on an event that invalidates the caches.
2020-07-30 17:14:40 +02:00
Fedor Isakov a6d671fef8 Refactor TypecheckingService and cache. Enable to use cache w/o tracking.
TypecheckingService has become too overloaded with responsibilities, and
so Strategy class is introduced to extract strategies to.
Cache holder can also be non-tracking, which comes in handy when
implementing purely caching typechecking, not anticipating any change.
2020-07-16 10:33:44 +02:00
Fedor Isakov d5a259bbde Re-apply all re-runnable migrations (one fix). 2020-07-11 15:59:51 +02:00
Fedor Isakov e2aa9fd53f Fix LogicalItemExpression contained in ExpressionItem issue, provide migration.
It's possible to a cycle b/w the two concepts, which is totally unnecessary.
This provides the means for detecting and fixing this problem.
2020-07-11 14:47:53 +02:00
Fedor Isakov 598d6c109d Make incremental test launcher fail on errors during evaluation.
Also provide a method to check that a node has "error type" assigned,
which may come in handy.
2020-06-27 10:35:47 +02:00
Fedor Isakov d2d4578514 Ensure typechecking cache is cleared on reload classes. 2020-06-25 20:48:17 +02:00
Fedor Isakov f6154be66b Refactor Effect to rely on Result for errors collecting.
Result class encapsulates errors collected during step execution.
Simplify CoderulesHelper and callback interface.
2020-06-25 14:30:31 +02:00
Fedor Isakov 9c1d3aad92 Move Result class to commonly-used runtime solution. 2020-06-25 14:30:30 +02:00
Fedor Isakov 44a25ada3a Enable extracting term presentation via delegate.
Provide an instance of NodePresentable that ought
to serve as the delegate proxy for extracting node
presentation.
2020-06-21 23:17:33 +02:00
Fedor Isakov ab99a0245c Introduce runtime support module j.m.coderules.runtime. 2020-06-21 23:17:33 +02:00
Fedor Isakov 82f0229aca Rebuild project. 2020-05-09 15:08:47 +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 f2bcaffccc Revert "Upd coderules buildscript, regen build.xml"
This reverts commit 6b826334
2020-05-07 10:18:16 +02:00
Grigorii Kirgizov 6b82633450 Upd coderules buildscript, regen build.xml 2020-05-07 02:37:35 +03:00
Fedor Isakov ab9a22a013 Rebuild project. 2020-05-05 10:19:38 +02:00
Grigorii Kirgizov f7a9c73199 Refactor out lang dependency on function type analogously to sequence type
As closures typesystem depends on collections due to sequence type,
so collections typesystem depends on closures due to function type.
E.g. consider typechecking of SequenceCreator.
2020-05-04 15:16:47 +03: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 91dda1d85f Move ProgramAnalysis to template model, avoid creating dependency cycle. 2020-04-19 16:30:11 +02:00
Fedor Isakov fd2043e047 Update build scripts. 2020-04-13 18:00:15 +02:00
Fedor Isakov 296b3e9271 Re-apply all rerunnable migrations. 2020-04-13 17:58:33 +02:00
Fedor Isakov 52bca36d32 Rebuild project. 2020-04-13 17:58:33 +02:00
Fedor Isakov 6a431fcb49 Rebuild project. 2020-03-31 18:44:07 +02:00
Fedor Isakov a894b33983 Update to the latest RxJava2 and Swing adapter. 2020-03-05 15:49:04 +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 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 391c9053b5 Apply migrations after switch to MPS 193. Regenerate project. 2020-02-03 11:24:22 +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 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 dbc5154491 Reload and re-generate build scripts. 2019-11-11 15:28:23 +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 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 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 3fb8df4af4 Fix CheckProjectModules test. Drop usages of deprecated API. 2019-10-19 11:03:30 +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
Fedor Isakov 49518e0704 Switch to reactor version 0.9.14. 2019-09-30 16:44:36 +02:00
Grigorii Kirgizov cdfe1f2c0c Update language version after migrations from mps.logic lang 2019-09-11 13:24:02 +03:00
Fedor Isakov 5b5798dcad Switch to reactor lib 0.9.13. 2019-09-10 18:37:11 +02:00
Fedor Isakov 5478b2e070 Rebuild project. 2019-09-06 11:16:07 +02:00
Fedor Isakov 8b82d7ba4d Introduce origin block for specifying the constraint rule origin. 2019-09-02 17:55:46 +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 de2bea67bb Rebuild project. 2019-08-22 15:31:04 +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 98356f25cc rebase on master. remove extra deps in coderules generator 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