Commit Graph

85 Commits

Author SHA1 Message Date
Fedor Isakov 1a1cb13621 Apply migrations from 251 2025-04-09 11:34:06 +02:00
Fedor Isakov 4ce08f4b99 Refactor project structure and reduce the number of modules 2024-07-04 18:17:56 +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 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 3cf666e633 Apply migrations and make project 2023-07-31 12:57:24 +02:00
Fedor Isakov 6a849f82f2 Apply migrations and rebuild project 2023-06-12 12:01:02 +02:00
Fedor Isakov ad3ea9d63d Apply all migrations from 2022.2 2022-11-21 11:25:13 +01:00
Fedor Isakov d7f54a35fb Minor editor fixes 2021-11-25 12:07:43 +01:00
Fedor Isakov 2d48fb57f2 Fix editor: ensure correct constraints in head/guard/body 2021-11-25 12:07:43 +01:00
Fedor Isakov c27cafdf30 Fix editor: support changing isFree <-> isNonfree 2021-11-24 16:22:17 +01:00
Fedor Isakov d0d44b98c5 Minor editor fixes 2021-11-24 16:22:17 +01:00
Fedor Isakov 690e8e919c Fix editor: caret position and first argument to constraint 2021-11-24 16:22:17 +01:00
Fedor Isakov 9b59925e4f Fix editor: editable=false for keywords, focus attraction 2021-11-24 16:22:17 +01:00
Fedor Isakov 257bc196c3 Re-save all models 2021-10-26 17:46:40 +02:00
Fedor Isakov 2d52921561 Fix and optimize dependencies 2021-09-22 17:08:25 +02: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 5bd41f1098 Introduce typechecking term table 2021-08-17 09:30:35 +02:00
Fedor Isakov 4ea1d0cadd Feature: isGround and isNonground predicates, MPSCR-94 2021-07-22 13:59:19 +02:00
Fedor Isakov e03a65760c Adjust style for fail constraint 2021-06-18 18:41:00 +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 4991536db1 Fix diff view showing insertion wrongly, dont assume vertical layout 2021-01-23 16:59:42 +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 d5a259bbde Re-apply all re-runnable migrations (one fix). 2020-07-11 15:59:51 +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 14780b5561 Apply automatic migrations. 2020-05-09 15:04:25 +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 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 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 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 fec446f006 Drop wrapping substitutions in favour of regular actions.
The editor for evaluating late expression inserts $() construct
first, then allows to enter the expression.
A couple of minor fixes and a workaround.
2020-02-27 14:48:37 +01:00
Fedor Isakov 2e9a1e8dbf Support deleting pattern from logical variable in head. 2020-02-26 16:08:50 +01:00