Commit Graph

82 Commits

Author SHA1 Message Date
Fedor Isakov 17dd2a6c01 Appply migrations from MPS 243 branch 2024-12-11 11:57:18 +01:00
Fedor Isakov 95a78a3474 Deprecate CopyItem and CopyUtil 2024-08-02 13:43:37 +02:00
Clement de La Bourdonnaye c96f65ec64 NewUI - restore old ui icons for usage when new UI disabled 2024-01-11 14:38:03 +01:00
Vaclav 5114fd8f7c NewUI - add new svg icons replacing the old png ones. Update the icon resources using these icons. 2023-12-14 16:10:32 +01:00
Fedor Isakov fc8451e63d Run migration 2023-10-13 18:13:09 +02:00
Fedor Isakov 20a0bedd81 Refactor call macro cstr: keep arguments in binding list
The idea is to have default parameters in (regular) macro definition.
Refactoring and corresponding migration.
2023-10-13 18:13:09 +02:00
Fedor Isakov fd0430a6eb Better editors and substitute actions for macroses
Now all invocations of a macro start with "apply" keyword.
An "expand" macro has an additional parameter after "with" -- the input.
2023-10-13 18:13:09 +02:00
Fedor Isakov 4e77530d20 Drop usages of deprecated feature: ApplicableConcept 2023-10-13 18:13:08 +02:00
Fedor Isakov f3010743c1 Migration: FixExpandMacroTemplate 2023-10-13 18:13:08 +02:00
Fedor Isakov 530ace6399 Rework editor for expand macro template and prototype
Expand macro prototype: "virtual macro".
Expand macro template: "override".
Override macro displays parameters declared in the prototype as R/O.
Introduce "usages" of prototype parameters to serve as local anchors;
this avoids problems with generation.
The existing code is going to work as before, but marked as erroneous
until migrated.
2023-10-04 12:52:09 +02:00
Fedor Isakov ad3ea9d63d Apply all migrations from 2022.2 2022-11-21 11:25:13 +01:00
Fedor Isakov 2e5d73b31e Add icons for typechecking roots and the aspect 2021-11-25 18:09:22 +01:00
Fedor Isakov 2d48fb57f2 Fix editor: ensure correct constraints in head/guard/body 2021-11-25 12:07:43 +01:00
Fedor Isakov 3f606ba63c Refactor the way parameters are passed to expand macro
Instead of the hack that that uses session parameters to pass
parameters to expandMacro, use directly `withParams` method
on macro token. All parameters are mapped to corresponding fields.

Introduce CustomSessionParameter to access parameters in
TemplateApplicationSession.
2021-09-21 17:54:51 +02:00
Fedor Isakov 42d9970172 Extend ValueFeature with type, deprecate getter 2021-09-21 17:54:50 +02:00
Fedor Isakov 4d06adf85b Rename isAssigned to isNonfree for consistency 2021-07-22 15:46:21 +02:00
Fedor Isakov 4ea1d0cadd Feature: isGround and isNonground predicates, MPSCR-94 2021-07-22 13:59:19 +02:00
Fedor Isakov 4ee3869b45 Introduce a means to use direct reference to INamedConcept in rules 2021-05-13 15:54:42 +02:00
Fedor Isakov a9fc3db841 Migrate to TermFeatureOverrid to LogicalItem
Deprecate TFO.getter
Disable entering LogicalItemExpression
2021-05-04 18:24:29 +02:00
Fedor Isakov ff6b5ec6ae Apply migrations and rebuild project 2021-04-14 13:19:50 +02:00
Fedor Isakov c450462fa5 Drop "final" flag on term feature: unused 2021-01-23 16:59:45 +01: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 29ffc46fa4 Introduce ProvideFeedbackOperation: enable providing feedback from templates.
Operations such as 'error' and 'warning' are available on input
node in templates and serve to report issues found during
template application, in contrast with those found during evaluation.
2020-07-13 18:14:12 +02:00
Fedor Isakov 5c376168b4 Introduce match constraint.
Match constraint is provided for use cases where the intention
is to pattern-match a term capturing features into logical
variables.
A term constructor in the right-hand side of match constraint
is a pattern, and all its non-overridden features are
to be defined as wildcards.
2020-06-18 13:05:24 +02:00
Fedor Isakov d3a72049e8 Drop deprecated stuff from coderules lang. 2020-05-05 15:58:48 +02:00
Fedor Isakov 2dc2191be3 Editor improvement: auto-substitute name from target concept for rule templates. 2020-05-05 10:19:38 +02:00
Fedor Isakov 4666ca5349 Deprecate an obsolete concept. 2020-05-05 10:19:38 +02:00
Fedor Isakov 866cd3fb04 Support extends relation between term tables.
A term table is now allowed to extend another term table.
Term prototypes can be imported through extends relation.
2020-04-28 12:54:35 +02:00
Fedor Isakov 25b08b627b Change root concept aliases for consistency. MPSCR-52.
Use "rule table" and "term table".
2020-04-24 10:43:46 +02:00
Fedor Isakov 33739d7303 Support query table in generator templates.
Runtime switched to use newly generated query table definitions.
2020-04-23 10:15:39 +02:00
Fedor Isakov 3e65376561 Drop deprecated stuff from coderules lang and runtime. 2020-04-22 12:07:50 +02:00
Fedor Isakov 71dadaff0f Redesign query template to accept Query as parameter
Introduce QueryParameter as the way to refer to Query instance
in templates.
Introduce QueryTable.
2020-04-22 11:24:19 +02:00
Fedor Isakov 20263ea520 Delete a bunch of deprecated/unused/obsolete concepts.
The API calls are deprecated and result in UnsupportedOperationException.
2020-04-19 16:30:11 +02:00
Fedor Isakov ed821053ec Rename concepts for consistency to Term*. Move one more concept to coderules. 2020-04-13 18:00:15 +02:00
Fedor Isakov a0bc96b3e0 Move all concepts related to term to j.m.coderules. 2020-04-13 17:58:34 +02:00
Fedor Isakov 296b3e9271 Re-apply all rerunnable migrations. 2020-04-13 17:58:33 +02:00
Fedor Isakov 749f60e665 Deprecate a bunch of obsolete concepts. 2020-04-13 17:58:33 +02:00
Fedor Isakov f261002feb Introduce extends clause in macro table. Drop name from expand macro.
Macro table can extend another macro table. All prototype template
declarations are imported automatically.
The editor now substitutes default values when entering new
expand macro/constraint filling the slots provided by the prototype.
Expand macro does not require name.
Minor editor improvements.
2020-03-31 11:27:09 +02:00
Fedor Isakov a2b369b9c3 Specify logicals on every expand template. Minor editor improvements.
Expand macro template must have declaration of logicals matching
exactly the logical declarations in the prototype.
Can't refer to logicals declared directly in the prototype.
2020-03-31 11:27:09 +02:00
Fedor Isakov 4260346cb9 Introduce expand/call macro pseudo constraints.
The old expand/call constructs are to be replaced by these.
Expand macro constraint refers to a named prototype, which
is specified in a macro table for matching concept.
Call macro constraint refers directly to a macro template.
Contex parameters are to be retired and explicit
parameters to expand macro constraint are to be used instead.
2020-03-31 11:27:09 +02:00
Fedor Isakov ea670422f1 Introduce ExpandMacro template and prototype.
ExpandMacroTemplate to be used for dispatching macro invocations
based on the concept of the specified node.
Prototype is an abstraction to be implemented by
specific templates.
2020-03-31 11:27:09 +02:00
Fedor Isakov d5ea8e8006 Introduce CallMacroTemplate, necessary refactorings. MPSCR-25
Call macros are to be parameterized with logicals and other parameters.
To replace combined expand/call macros causing confusion.
Context parameters to be passed explicitly.
2020-03-31 11:27:09 +02:00
Grigorii Kirgizov 91e4d2b582 Revive 'principal' rule feature for MPSCR-51. Mark those rules in BL typesystem.
Introduce 'auxiliary/essential' notions instead of 'principal/not principal'.
2020-03-23 14:28:14 +03:00
Fedor Isakov 2a5b3661b8 Use EvaluationSetting tag for constraint context.
Concepts supposed to contain constraints are
effectively implementing evaluation setting.
2020-02-24 22:57:05 +01:00
Fedor Isakov 417fc45933 Restore origin ref in RuleEx interface, fix terminology in templates API.
To avoid confusion, a rule defines "target ref", which is supposed
to indicate the source code location for possible errors.
The origin node is to be referred as "origin" as before.
Temporarily rename OriginSpec's alias to "target" to reflect change
in semantics.
2020-02-17 11:57:14 +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 25585f9166 Deprecate assert constraint: a simple $() should serve. 2020-02-12 10:53:40 +01:00
Fedor Isakov 115c368a2f Reconcile different syntaxes for ExpressionConstraint and LateExpression. Use $() for both.
This is an important change in coderules syntax: all expressions to be evaluated from
constraints/predicates are to be wrapped in parentheses and preceded by dollar sign.
So, instead of eval/backticks the new syntax is to be used: $(<expression>).
Also the expressions to be passed to "feedback reporting" predicates are to be wrapped similarly.
2020-02-12 10:53:40 +01:00
Fedor Isakov a35b5b46ec Deprecated condition block in rule template, isApplicable method in API. Migration to use if statement instead. 2020-02-07 13:14:24 +01:00
Fedor Isakov 73219399f4 Deprecate unused flag "principal" in rule template, drop usages. 2020-02-07 12:05:45 +01:00