Commit Graph

127 Commits

Author SHA1 Message Date
Grigorii Kirgizov cc20e9735b Extend TypesIndexCache & EvaluateRulesStep with storing and retrieving SessionToken 2019-08-22 15:19:58 +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 2b1ec4a4a6 Remove interprocedural version of analysis 2019-08-22 15:16:18 +02:00
Grigorii Kirgizov 944a181685 Switch basic principals analysis to fully gen-time impl 2019-08-22 15:16:18 +02:00
Grigorii Kirgizov 9843669f79 Remove old runtime coderules analyses 2019-08-22 15:16:18 +02:00
Grigorii Kirgizov 37a6a4e1b7 Two more tests on FreeVarEscapeAnalysis for more complex cases. Extend checker logic for them. 2019-08-22 15:16:18 +02:00
Grigorii Kirgizov c6fc2c3f96 Test FreeVarEscapeAnalysis on full languages. Passes for BL, fails for lambdacalc as intended. 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 1c9060b769 Add simpler analysis to answer a question "Is incrementality allowed for this Coderules aspect?". Add initial tests for it.
It is a rule-local, non-interprocedural analysis and it also uses VarAnalysisUtil.
New analysis checks whether free variables can "escape" principal constraint rules inside principal constraints.
If there is such escaped variable, then it is a signal that this type system is designed with non-local type inference in mind.
Otherwise there's no need to produce principal constraints with free logicals as arguments.
So, no principal constraints with free vars -- no type inference is possible.
2019-08-22 15:16:17 +02:00
Grigorii Kirgizov ae993f6868 Separate VarAnalysisUtil into base and impl part that handles impl of involved relations ("isAffected"). 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 87fb26b95b Fix NPE in access to hashmap in VarModificationAnalysis 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov e41589cd4a Fix few places in VarModificationAnalysis. Add tests for it (found some problems). 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov f1aa5cb923 Finish interprocedural part of VarModificationAnalysis. Add one more test for Var..Util. 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 4ab877e822 Refine isAffected relation in VarAnalysisUtil: handle dep-s through composite logicals 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 62b08720cd Fix finding isAffected relation in var2notvar case by more carefully handling aliasing with "non-local" vars. Few more tests. 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov f7040b1d8d Add metalogical aliasing in VarAnalysisUtil. Rewrite older analyses fully in BL and not template macros. 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 8a2942c42b Move VarModificationAnalysisUtil to new model for analysis-related code 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 64230b0412 Add tests for VarAnalysisUtil. Update its semantics. 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 5f2b010e5b Add checking analysis for non-trivial var modification (e.g. unification) 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 5ba57b0b61 Refine notion of principal rule: discern between different kinds of rules from queries. Resolves slowdown. 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 98356f25cc rebase on master. remove extra deps in coderules generator 2019-08-22 15:16:17 +02:00
Grigorii Kirgizov 475ed7d023 Adjust border between abstract analyses classes and their generation-time impls 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
Fedor Isakov d786ff43b9 Re-save all models, language name updated in .mpl files. 2019-08-20 23:11:19 +02:00
Fedor Isakov 1e3917e787 Make dataform printer reusable. 2019-08-12 16:45:00 +02:00
Fedor Isakov 4c4c610531 Enable macro expansion on concept; null input produces empty builder. 2019-08-10 16:25:36 +02:00
Fedor Isakov 3a48c47880 Migration: "update versions in descriptors". 2019-07-30 11:49:26 +02:00
Grigorii Kirgizov b7b5ece832 Adjust notion of principal rule in analysis. Reenable assert in ProcessingStateImpl.
Now any rule matching on or activating principal constraints counts as principal.
2019-07-29 20:25:25 +03:00
Fedor Isakov ef7e3fa1a6 Drop "tagDetail" hack, use again string as a unique rule's tag. 2019-07-29 17:16:43 +02:00
Fedor Isakov 66c9222a95 Run migrations with MPS 2019.2 EAP3. 2019-07-26 17:27:18 +02:00
Grigorii Kirgizov 11712c7069 Restrict the notion of principal rule (as effect, match journal is shorter now). It also positively affected reporting, so switch reporting to the new way. 2019-07-26 17:00:31 +02:00
Grigorii Kirgizov 0ab4e48da1 Fix hash collision in tests. Rename few usages of 'handler' to 'rulesList'. 2019-07-26 17:00:31 +02:00
Grigorii Kirgizov 3d80841639 Switch ReportingSupervisor to handle RuleMatch. Add Supervisor using ProgramSpec instead of PrincipalOriginIndex. 2019-07-26 17:00:31 +02:00
Grigorii Kirgizov 78c0cc1559 Setup code for failing typechecking tests, add one. Extract Supervisor impl from ProgramEvaluator. 2019-07-26 17:00:31 +02:00
Grigorii Kirgizov b9309e6369 Add several tests of incr typecheck on BL. ProgramEvaluator now depends on ProgramProducer. 2019-07-26 17:00:31 +02:00
Grigorii Kirgizov a2672ad20a Include into ProgramGenInfo info about node parents.
This info about AST deps between nodes is needed to find
additional rule matches that must be also invalidated.
2019-07-26 17:00:30 +02:00
Grigorii Kirgizov 43a8838c5a Handle the case of pattern logicals for finding principal constraints. Add rules from queries as principals too. 2019-07-26 17:00:30 +02:00
Grigorii Kirgizov 9a22149a5c Add some debugging info for incremental lang typecheck tests 2019-07-26 17:00:30 +02:00
Grigorii Kirgizov ce9b91c4a5 Add basic tests for simple program analysis, add test helpers. 2019-07-26 17:00:30 +02:00
Grigorii Kirgizov 6c4667e066 Add basic coderules program analysis for determining principal constraints 2019-07-26 17:00:30 +02:00
Fedor Isakov 79b08c6f83 Revert "Apply migrations from EAP3 and rebuild project."
This reverts commit 9c5bf858c3.
2019-07-26 15:30:30 +02:00
Fedor Isakov 274f1f5a8d Fix tests: use only string value for properties for now. 2019-07-19 12:28:27 +02:00
Fedor Isakov 9c5bf858c3 Apply migrations from EAP3 and rebuild project. 2019-07-19 12:28:27 +02:00
Fedor Isakov cd37daaa07 Apply migrations after switching to the latest EAP build of MPS. 2019-06-07 09:16:21 +02:00
Fedor Isakov 17ed4642ae Apply all available automatic migrations. 2019-06-05 16:16:00 +02:00
Fedor Isakov 57de11c3fe Rename all modules/models having prefix j.m.typechecking to j.m.coderules.typechecking. The former is reserved. 2019-06-05 16:15:59 +02:00
Fedor Isakov 3b638b2d08 Drop usages of Rule.tag(), replace with Rule.uniqueTag().
Switch to using long as a rule's unique tag.
Rename all entities using "handler" to "rulesList".
2019-05-17 18:01:34 +02:00
Fedor Isakov 61b60938d0 Fix heuristic for determining the rule with origin that should serve
as a failure recovery point.
2019-05-16 12:36:47 +02:00
Fedor Isakov eb5b38384f Rename Handler class in reactor API to RulesList. 2019-05-09 17:30:14 +02:00
Fedor Isakov bd1c56d9d0 Rename concept Handler -> RulesList 2019-05-09 17:30:14 +02:00
Fedor Isakov aaec11de9b Adapt to the changes in reactor API. 2019-05-05 14:29:08 +02:00