Grigorii Kirgizov
119daf05d9
Restrict notion of a principal rule to not track unnecessary matches in journal
...
Now principal rule head must include only principal constraints or be empty.
Without this restriction journal may include stale chunks which have no information to invalidate them.
2020-02-05 12:29:33 +03:00
Fedor Isakov
b6e4e80010
Coderules/logic editor: support entering standalone item as logical clause, allow to type = and == naturally.
2020-02-04 17:34:38 +01:00
Fedor Isakov
9403087c11
Drop RepositoryProvider interface (unused).
2020-02-04 11:43:20 +01:00
Fedor Isakov
391c9053b5
Apply migrations after switch to MPS 193. Regenerate project.
2020-02-03 11:24:22 +01:00
Fedor Isakov
f92148094a
Drop long deprecated concepts with zero instances.
2019-11-11 13:53:41 +01:00
Fedor Isakov
3f1b65ada2
Fix the structural errors introduced by a badly run migration.
2019-11-06 12:05:18 +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
e32ff36d1b
Allow node-ptr<> to be specified in require statement.
2019-11-04 17:10:34 +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
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
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
Grigorii Kirgizov
bc06bf39cc
Handle one more case of finding principal constraints in Query rules with an additional heuristic.
2019-10-15 21:15:38 +03:00
Fedor Isakov
5258a9343f
Switch to collecting types during typechecking using the explicit type collector.
...
Use the parameter to typechecking query TYPECHECK to collect types.
Stop highlighting every expression with its type.
2019-10-10 17:30:11 +02:00
Grigorii Kirgizov
cdfe1f2c0c
Update language version after migrations from mps.logic lang
2019-09-11 13:24:02 +03:00
Fedor Isakov
77be3869a4
Introduce target specification to provide feedback constraint.
...
One should be able to report issues with a target.
The target is normally inferred from the rule's origin, but sometimes it is
necessary to specify the issue's target explicitly.
2019-09-02 17:55:46 +02:00
Fedor Isakov
8b82d7ba4d
Introduce origin block for specifying the constraint rule origin.
2019-09-02 17:55:46 +02:00
Fedor Isakov
d279cc64ba
Deprecate report operation and API.
2019-09-02 17:55:46 +02:00
Fedor Isakov
41c4c7e0a3
Fix provide feedback predicate to use the updated API.
2019-09-02 17:55:46 +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
Fedor Isakov
66c9222a95
Run migrations with MPS 2019.2 EAP3.
2019-07-26 17:27:18 +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
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
bd1c56d9d0
Rename concept Handler -> RulesList
2019-05-09 17:30:14 +02:00
Fedor Isakov
adcfba5e9a
Introduce two built-in predicates to be used instead of eval(false) etc.: fail and report message (debug/info/warning/error/fatal).
2019-02-18 11:49:11 +01:00
Fedor Isakov
255b7061f7
Reorganize models/packages, restructure code components responsible for program building/evaluation.
2019-02-15 17:15:17 +01:00
Fedor Isakov
52348b2b38
Make comment look nicer with standard C-style representation.
...
Make Handler, MacroTable and their contents commentable.
2019-01-27 23:33:02 +01:00
Fedor Isakov
613e895d17
Fix constraint rules editor to display "activate" section always.
...
Constraint rule to be entered with "on" keyword.
2019-01-27 22:56:07 +01:00
Fedor Isakov
e2ea78ef9e
Improve layout of constraints and dataforms. Get rid of unnecessary anchors and hacks.
2019-01-21 11:20:30 +01:00
Fedor Isakov
29a44eac5d
Introduce automatic migration from eq to uni for basic scenario: logical on the left
2019-01-13 14:26:35 +01:00
Fedor Isakov
19ce84f7ef
Switch to 2018.3 RC. Apply all migrations.
2018-11-28 16:48:59 +01:00
Fedor Isakov
f095c64abe
Rename 'isBound' predicate to 'isAssigned' (alias only, concept to be renamed still).
2018-11-27 15:10:48 +01:00
Fedor Isakov
9c4dad3e91
Enable use of input node in macro body. Allow specifying a subset of macro parameters in macro call.
2018-11-20 22:39:30 +01:00