Commit Graph

33 Commits

Author SHA1 Message Date
Fedor Isakov 53ab46fba7 Apply migrations and rebuild 2025-11-03 12:33:34 +01:00
Fedor Isakov 17dd2a6c01 Appply migrations from MPS 243 branch 2024-12-11 11:57:18 +01:00
Fedor Isakov f3010743c1 Migration: FixExpandMacroTemplate 2023-10-13 18:13:08 +02:00
Fedor Isakov 338ea4109e Limit LogicalItemValueExpression to contain LogicaVariable 2021-05-04 18:24:30 +02:00
Fedor Isakov 29f5992ff9 Fix logical type's conversion to classifier; fix generation.
Specifically treat convertsTo of LogicalType to ClassifierType, support
convertsTo classifier type w/o specified classifier.
Fix typeOf LogicalItemValueExpression by to rely on logical's type.
Accept LogicalItem in LogicalItemValueExpression's logical slot to enable
replacement of it with an expression at generation time.
2020-11-24 13:41:24 +01:00
Fedor Isakov 2bf415e8af Deprecate obsolete interface. 2020-06-18 13:05:24 +02:00
Fedor Isakov cbb9ac919e Rename LogicalDataForm to LogicalVariableDataForm. Fix generator to not rely on type.
LogicalVariableDataForm generates to either a list node or a term.
This choice can be made based on the structure alone.
Logical variable "array" corresponds to list node, everything else to a term.
2020-04-14 16:17:15 +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 0ce5e4813c Drop all deprecated concepts from j.m.logic lang. 2020-04-13 17:58:33 +02:00
Fedor Isakov 296b3e9271 Re-apply all rerunnable migrations. 2020-04-13 17:58:33 +02:00
Fedor Isakov 4845e120e9 Introduce termlist type, rename multilogical type to logical[]. 2020-04-13 17:58:33 +02:00
Fedor Isakov e8a19249e6 Migration to replace spliced LogicalItemExpression on a list node.
Usually one uses Splice with LogicalItemExpression wrapping a logical variable.
Using LogicalDataForm wrapping same variable makes Splice unnecessary.
In order to keep code readable these are wrapped again in a cons list.
In general, one should avoid using bare LogicalDataForm, as these are
indistiguishable from normal LogicalVariable.
2020-04-13 17:58:33 +02:00
Fedor Isakov 065aac819c Introduce construct to directly insert term constructor in data form.
Usually one uses Splice with LogicalItemExpression wrapping a constructor.
The new TermConstructorDataForm provides a shortcut.
2020-04-13 17:58:33 +02:00
Fedor Isakov 2af087428d Document j.m.logic language. Rearrange virtual packages. 2020-04-13 17:58:33 +02:00
Fedor Isakov 73beb56834 Introduce ConsListNode to replace a deprecated concept. Migration.
Prefer aggregation over inheritance: ListNodeCons extending ListNode
is not a good design.
Also drop LogicalUnrapContext, as it has no real use.
2020-04-13 17:58:33 +02: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 630fd33629 Introduce logical var reference expression.
This expression is to be used in those rare cases
when a logical var is to be passed to an external method.
Not available within EvaluationSetting (new marker interface).
Normally logical variable (as an instance of LogicalItem)
is only to be used within a logical context.
Logical item value expr only to contain a logical variable.
2020-02-24 22:56:54 +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 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 9403087c11 Drop RepositoryProvider interface (unused). 2020-02-04 11:43:20 +01:00
Fedor Isakov c66e746e77 Introduce open terms, support ad-hoc polymorphism.
A term may indicate that it "extends" another open term.
An extended term has essentially the same form as the one
being extended, so that they can be unified.
2020-01-20 10:52:39 +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 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
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 bcb8efa653 Make editor for DataForm more usable, get rid of hacks in the layout. Introduce NewLineAttribute to manually insert new lines. Deprecate ListRole. 2019-01-09 13:01:37 +01:00
Fedor Isakov c5daa24ee8 Deprecate ListLiteral and ListExpression concepts (only used in BL typesystem) 2019-01-04 17:44:32 +01:00
Fedor Isakov 19ce84f7ef Switch to 2018.3 RC. Apply all migrations. 2018-11-28 16:48:59 +01: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 92c6ba3e12 Restructuring the project: consolidate code, moving samples away. 2018-07-14 17:22:07 +02:00