Commit Graph

2011 Commits

Author SHA1 Message Date
Grigorii Kirgizov 9b61c6a2d3 Move RulesListIImpl out of RulesListBuilder
For later Program modification by RulesDiff and preserved rules from prev Program
2019-11-06 19:10:29 +03:00
Fedor Isakov 3f1b65ada2 Fix the structural errors introduced by a badly run migration. 2019-11-06 12:05:18 +01:00
Fedor Isakov ad90a4cb77 Apply migration that replaces all instances of NodeAnchor with .pointer op. 2019-11-06 11:21:57 +01:00
Grigorii Kirgizov 3caeddcb63 Upd docs for StateFrame & add docs for StateFrameStack 2019-11-06 12:43:03 +03:00
Grigorii Kirgizov 510c3cd479 MPSCR-5: Clear all logicals from current StateFrameStack observer on incremental session teardown. 2019-11-06 12:16:11 +03:00
Fedor Isakov daa1bdceb6 Update default jvm options for running tests to "-Xmx2048m". 2019-11-05 20:53:01 +01:00
Fedor Isakov 15a7dece1b Move error annotation to the correct place in test samples. 2019-11-05 18:55:08 +01:00
Fedor Isakov 9f3301f1c2 Typechecking BL: Use origin block to suppress target for dpromote solvers. 2019-11-05 18:54:38 +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 76739d20d9 Minor refactoring and renaming in coderules runtime. Documentation.
Rename classes and methods to better reflect the intent.
Move test-related stuff to test util model.
2019-11-05 18:46:02 +01:00
Fedor Isakov 8d21b056fa Typechecking BL: drop calls to node-ptr.resolve where not necessary.
Replace expand macro with plain term constructors for String and Object.
2019-11-04 17:16:45 +01:00
Fedor Isakov e32ff36d1b Allow node-ptr<> to be specified in require statement. 2019-11-04 17:10:34 +01:00
Fedor Isakov 0585f88496 Suppress a scope error in a "bad" sample. 2019-11-04 16:20:57 +01:00
Fedor Isakov 48375c4d14 Extend RuleBuilder with template app session: automatically require node ponters passed as args to constraints.
Every node pointer (SNodeReference) specified as an arg to a constraint causes the (resolved) target to be included
into template application session (required).
Reduce NodeAnchor to .pointer call.
Deprecate Reporting interface and context repository in rule definitions.
2019-11-04 16:20:57 +01:00
Fedor Isakov cc8cf72819 Minor code cleanup: get rid of MacroTemplate.ID, simplify templates. Systemize RuleBuilder usages. 2019-11-04 16:20:57 +01:00
Fedor Isakov 4396adc9ff Fix error being reported on another location. 2019-11-04 16:20:57 +01:00
Fedor Isakov 84162b9097 Deprecate NodeAnchor, provide migration to .pointer operation.
A usage of .pointer op as an argument to a constraint invokes require() on template application session.
2019-11-04 16:20:38 +01:00
Fedor Isakov a0b2af95c9 Revert "MPSCR-4: Upd refs to new RuleIndex on Dispatcher construction in incremental case."
This reverts commit 0dd7f8c70f.
2019-11-04 15:58:54 +01:00
Grigorii Kirgizov 0dd7f8c70f MPSCR-4: Upd refs to new RuleIndex on Dispatcher construction in incremental case.
Slightly extend RuleMatcher interface.
Store RuleMatcher instances instead of RuleMatcherProbe in SessionToken.
2019-10-31 22:20:19 +03:00
Grigorii Kirgizov 320a19af93 Add test checking precondition for other tests on incrementality
The test is concerned with correct computation of RulesDiff and correct work of ArgumentsCollector
2019-10-31 19:33:17 +03:00
Grigorii Kirgizov 1a720dd76e Fix RuleBuilder.uniqueTag computation: consider SNodeReference not only inside DataNode but also raw 2019-10-31 18:07:31 +03:00
Grigorii Kirgizov 224d998c9a Temporarily comment out a failing line in Samples_bad3 2019-10-28 20:56:56 +03:00
Grigorii Kirgizov 530dfd8719 Fix incorrect vis scopes due to failing coerceTo queries. Assign 'fallback' type in classifierType macro on error to continue typechecking besides returning error.
The problem is concerned from incorrect recover of captureType given recent changes to its handling.
Essentially, recover was losing information about inferred type var bounds.
Also, necessary rule for convertsTo for upperBpundType was missing.
2019-10-28 20:55:24 +03:00
Grigorii Kirgizov 3016ffd904 Remove dependency on lang.text to enable experimental typechecker for Samples:bounds.bad 2019-10-28 18:33:00 +03:00
Grigorii Kirgizov 223b243e7f MPSCR-2: Fix capture of lowerBoundType on type variables with bounds 2019-10-26 21:44:09 +03:00
Grigorii Kirgizov 820066cf4d Set "do not generate" flags again on some examples in bl tests 2019-10-26 17:11:47 +03:00
Grigorii Kirgizov bc46a8e5ce Upd broken refs to logical vars 2019-10-26 17:01:07 +03:00
Grigorii Kirgizov c16801a928 Remove unnecessary accidental test root for BL 2019-10-26 16:17:41 +03:00
Grigorii Kirgizov 10a4b9ac70 Extend Lub test a bit with intersection type consumer 2019-10-26 16:17:41 +03:00
Grigorii Kirgizov 1b4a5ce55d Add check that all aux boudns in type var decl are interfaces. Add test for such error. 2019-10-26 16:17:37 +03:00
Grigorii Kirgizov 0e33bffa96 Handle additional case of constructing ListNodeCons 2019-10-26 16:17:37 +03:00
Grigorii Kirgizov 122917cc42 Fix: clean up lub() constraint in one case. Caused typechecker errors. 2019-10-26 16:17:37 +03:00
Grigorii Kirgizov 03702da2f0 Add handling of aux bounds in type variable macros 2019-10-26 16:17:37 +03:00
Grigorii Kirgizov b4d61ecb91 Add two more lub examples in LUB test 2019-10-26 16:17:37 +03:00
Grigorii Kirgizov dfa53a265f Add static field access to Sample typechecking test in BL 2019-10-26 16:16:59 +03:00
Grigorii Kirgizov 8e1633b0fb Fix typing rule for FieldReferenceOperation 2019-10-26 16:16:59 +03:00
Grigorii Kirgizov 9ec95421bf MPSCR-1: Remove unsound rule from containedIn relation. Add test for that case. Restructure Lub tests.
Now another test for suspicious rule for fieldReferenceOperation fails.
2019-10-26 16:16:59 +03:00
Grigorii Kirgizov 223cbeaabe Add incremental test for BL plus operator overload for String type 2019-10-26 16:14:43 +03:00
Fedor Isakov 742adef5f9 Completing BL typesystem: [ClassifierClass,Mul,Div,LT,GT,NEQ]Expression, UnaryMinus. 2019-10-25 22:45:55 +02:00
Fedor Isakov 3092fa3635 Fix all templates with broken scopes for logical variables. 2019-10-25 22:45:55 +02:00
Fedor Isakov c797b5d2ad Breaking change: logical vars must be declared by constraint rule that uses them.
Stronger rules for logical variables scope: constraint rule can't reference logical variable defined in another constraint rule. Logical variable definitions are localized to ConstraintRule template.
Simplify/cleanup the logic of searching for available logical variables.
2019-10-25 22:45:55 +02:00
Fedor Isakov a117f52ad5 Various improvements in j.m.baseLanguageExt typesystem.
Introduce generic way of handing recover/2 for ClassifierType.
Extract handling of expectType/2 constraint into a separate ruleslist.
Add lub/3 handler for char type.
2019-10-24 16:29:22 +02:00
Fedor Isakov 2e2cfd5194 Enable generation of samples known to be valid. 2019-10-24 13:29:55 +02:00
Fedor Isakov 4160c186e1 Introduce dependency to Config in typechecking options and service. Avoid relying on static getInstance() method to access Config.
Config is an application-level "component" initialized from an application plugin.
All usages on application/project-level should declare explicit dependency on it.
Tests can either create a new instance or access the shared one.
2019-10-23 15:39:17 +02:00
Fedor Isakov c81b88f636 Fix Lub test: proove that the result of ternary operation is correct. Enable compilation of "bounds" model. 2019-10-22 21:20:20 +02:00
Fedor Isakov fdd7c7fb19 New language j.m.bl.javadocExt to contain types aspect for javadoc. 2019-10-22 21:20:20 +02:00
Fedor Isakov 1534864ffb Separately register USER-level typechecking options, drop synch barrier. Keep it simple and stupid.
Options providers are registed in application plugin and project plugin.
Application plugin registers the USER level options, project plugin
is responsible for UI level.
Option providers are cleard on closing project/closing app.
2019-10-22 21:20:15 +02:00
Fedor Isakov b2139c4648 Fix typechecking in incremental mode. Cache type collector and smartly cache session token.
Keep cached session token with regard to aspect clique.
Keep type collector object in the typechecking cache.
The rationale: in incremental mode the parameters passed to query template are ignored, and essentially the parameters passed to the original query are re-used.
2019-10-19 22:19:53 +02:00
Fedor Isakov 6af78d1b94 Make CoderulesHelper reference the relevant aspect clique.
It's important to keep reference to the aspect clique that used to instantiate
a particular helper. Later it can be used to identify the correct session token.
2019-10-19 22:15:52 +02:00
Fedor Isakov 6eb1e06013 Add a unique key to identify an aspect clique. 2019-10-19 22:12:34 +02:00