Grigorii Kirgizov
894c727e70
Fix minor bug concerned with CopyUtil
...
CopyUtil didn't correctly map logicals nested inside DataForms which are bound to Logicals.
That's because CopyUtil relies on DataForm:variablesCount() and
LogicalDataForm:variablesCount didn't consider the case when bound value is itself DataForm.
2019-12-18 21:47:06 +03:00
Fedor Isakov
e926b86bcd
Minor refactoring in program producing code.
...
Reorganize and cleanup code.
2019-12-10 11:58:26 +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
f92148094a
Drop long deprecated concepts with zero instances.
2019-11-11 13:53:41 +01:00
Grigorii Kirgizov
53ddcb8492
Small cleanup of TraceTool for incremental processing
2019-11-07 17:15:56 +03:00
Grigorii Kirgizov
ea309d05e7
MPSCR-14: Remove unnecessary & failing call to tracer.restored() for incrementally preserved occurrences
2019-11-07 15:43:02 +03:00
Grigorii Kirgizov
cd25087ef9
Rename 'handlers' in CodeRulesProgram to 'rulesLists'
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
e4017b0b16
Preserve still valid Rules from previous incremental sessions with a help of RulesDiff
2019-11-06 19:10:29 +03:00
Grigorii Kirgizov
f343ba0d3b
Adjust to changes in SessionToken & RulesDiff interfaces
2019-11-06 19:10:29 +03:00
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
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
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
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
0e33bffa96
Handle additional case of constructing ListNodeCons
2019-10-26 16:17:37 +03: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
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
06076860ed
Deprecate SNodeSetType operation in typechecking lang. This lang exists now only for the sake of "types" aspect.
2019-10-12 09:35:09 +02: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
Fedor Isakov
f8dcf127db
Extend typechecking query TYPECHECK with a parameter to report types.
...
Reporting of calculated types is to be more explicit.
The not-so-obvious _type_.set() operation is to be phased out.
2019-10-10 17:30:11 +02:00
Fedor Isakov
a0405839b3
Necessary plumbing for rules segmentation. Off for now.
...
Turns out this feature actuall worsens the performance.
2019-09-30 16:44:36 +02:00
Fedor Isakov
1cbd5defff
Drop PrintDelegate stack, avoid memory leaks.
2019-09-13 13:44:23 +02:00
Fedor Isakov
068ce227c3
Avoid propagating runtime exception from program evaluation.
2019-09-12 17:08:02 +02:00
Fedor Isakov
8b73b66e34
Introduce RepositoryProvider interface to provide access to context repository.
...
TemplateApplicationSession to provide repository to templates.
Supervisor subclasses to provide repository to predicates.
2019-09-12 17:08:02 +02:00
Grigorii Kirgizov
332735e770
Remove unneded handler
2019-09-12 15:29:14 +03:00
Grigorii Kirgizov
cdfe1f2c0c
Update language version after migrations from mps.logic lang
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
85b074d189
Make ListNodeCons migration a bit more restrictive
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
135724a481
Fix use case of list matching with any list
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
7242e832b1
Upd mps.logic lang version
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
fc1caf1238
Fix Remove_Splice_from_ListNode migration
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
163e339436
Add migration for replacing List usages for ConsList constructor usages
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
3ff9ccb0c6
Add wrapping substitute menu for LogicalDataForm concept
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
cfe0b1b648
Add ListNodeCons DataForm: another constructor for ListNode similar to Haskell's `head:tail` constructor
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
edbd77c748
Prepare for migration from spliced Logicals in ListNode to LogicalDataForm
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
6a02be6f6e
Avoid nested empty lists in mapped ListNode.Alias. Fix capture in lcta helper for lub. Add test for lub.
...
The problem with empty lists showed up at least in printing lists.
2019-09-11 13:24:02 +03:00
Grigorii Kirgizov
37be72d9cf
Refactor generation of ListFeature & 'spliced' MultiMetaLogical. Fix BL typesystem to accomodate these changes.
...
ListRole in DataForms is stricter and doesn't allow non-list values.
Spliced MultiMetaLogical is always generated to ListNode without intermediate step of Variable[].
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
e2e531f13c
Add few utilities and extend logic of subtypePaths for LUB impl
...
subtypePaths constraint now has an extended version subtypePathsRaw that returns
extended 'classifierType' dataforms with type parameters (no only classifiers).
2019-09-11 13:24:01 +03:00
Grigorii Kirgizov
924d07c8ed
Return 'tagDetail' logic in RuleBuilder to handle duplicate tags of rules generated in loops
2019-09-11 13:24:01 +03:00
Fedor Isakov
adc115b164
Avoid failure on exception thrown from a template.
...
Produce a program even in case some of applied rules failed.
Allow to recover from failure in apply templates.
2019-09-10 18:37:12 +02:00
Fedor Isakov
b842fb6b9d
Avoid unnecessarily throwing exception on failure.
...
EvaluationFailureException is meant to be only thrown from predicate solvers.
It is specially processed in the reactor engine.
2019-09-10 18:37:12 +02:00
Fedor Isakov
d3a555c3a4
Ensure correct nodeRef is passed as a feedback template
...
.
2019-09-05 22:56:11 +02:00
Fedor Isakov
fc3b69f06e
Make sure the "annotation" lang has a types aspect.
2019-09-05 18:53:52 +02:00