Commit Graph

50 Commits

Author SHA1 Message Date
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
Fedor Isakov c064972266 Deprecate obsolete concept, provide migration. Minor editor fixes.
ExpressionLogicalVariable is replaced with ExpressionItem wrapping
the same expression.
Fixes ensure correct application of transformations.
Late expression can't be used as "placeholder" logical item.
2020-02-26 15:01:29 +01: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 ee36d879b3 Make better editor for provide feedback and fail constraints. 2020-02-20 11:59:28 +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
Fedor Isakov b76ed3d3e0 Add folding to rule list editor, fix constraint rule editor. 2020-02-07 11:58:11 +01:00
Fedor Isakov 3ae40153a2 Un-deprecate local logical var declaration, drop MITM concept. 2020-02-07 11:33:26 +01:00
Fedor Isakov fa4537dbc3 Introduce BodyBlock to contain multiple body clause lists. Support multi-line body. Migration. 2020-02-06 12:50:26 +01:00
Fedor Isakov c15c6694de Ensure all rule parameters of same type are displayed on separate lines. Deprecte ParameterContainer. Migration. 2020-02-05 17:02:31 +01:00
Fedor Isakov 58a1cf16fe Introduce TermType (term) to be represented as "DataForm" in runtime. Migration to specify term type where expected. 2020-02-05 12:24:40 +01: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 f92148094a Drop long deprecated concepts with zero instances. 2019-11-11 13:53:41 +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 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 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 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 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 19ce84f7ef Switch to 2018.3 RC. Apply all migrations. 2018-11-28 16:48:59 +01:00
Fedor Isakov 4ec1656b1b Introduce repository expression to provide context repository in rules. 2018-09-11 15:36:12 +02:00
Fedor Isakov 0bacffb611 Move type setting operation to typechecking lang. 2018-07-22 11:09:49 +02:00
Fedor Isakov ea9919f38a Bring the hierarchy of DataForm concepts in line with the runtime.
Merge DataForm constructors into logic language.
Repackaging logic runtime.
Drop obsolete code.
2018-07-21 13:29:22 +02:00
Fedor Isakov 79c02d2b00 Cleaning up dependencies in an attempt to produce a workable build.xml that doesn't break gradle. 2018-07-14 17:22:14 +02:00
Fedor Isakov fb27f1ddf2 Ensure eval() supports void and non-boolean expressions. Allow eval in guard. Fix generation of operations from collections lang. 2018-07-10 14:14:08 +02:00
Fedor Isakov 0ddd0fcaa1 Introduce "principal" flag for rule templates. A principal template is excluded from processing as "required". 2018-07-02 11:27:55 +02:00
Fedor Isakov ab5e641c6b Beautifying coderules editor. 2018-06-21 13:45:20 +02:00
Fedor Isakov a8e6c565b5 Rename the language and runtime solution: typesystem2 -> coderules. Move typechecking-related stuff to typechecking solution. Reorganize modules, delete obsolete stuck files. 2018-06-12 18:00:30 +02:00