@rsconcept/domain 2.3.0 → 3.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{analyzer-fNhkwO-6.d.ts → analyzer-CzFaWR7w.d.ts} +4 -4
- package/dist/{api-Bf0f_uiI.d.ts → api-DgecYHjR.d.ts} +5 -3
- package/dist/{arguments-extractor-ngatANBI.d.ts → arguments-extractor-CXWRT5Ou.d.ts} +4 -4
- package/dist/{ast-C8sIpKdL.d.ts → ast-D-D6Rq3T.d.ts} +2 -3
- package/dist/{ast-annotations-CiIx8qBM.d.ts → ast-annotations-x4PJ_Lhc.d.ts} +4 -4
- package/dist/{calculator-DE89LtIM.d.ts → calculator-uPaTV3hc.d.ts} +5 -5
- package/dist/cctext/language-api.d.ts +0 -1
- package/dist/{diagnostics-CljEzVBV.js → diagnostics-D1Cp21nP.js} +36 -13
- package/dist/diagnostics-D1Cp21nP.js.map +1 -0
- package/dist/{diagnostics-Dac5sJhO.d.ts → diagnostics-DKyMf6q-.d.ts} +24 -8
- package/dist/{expression-generator-CoucLIkE.d.ts → expression-generator-CADzBw-C.d.ts} +3 -2
- package/dist/graph/index.d.ts +1 -0
- package/dist/index-CnuO4w8e.d.ts +13 -0
- package/dist/index-D5RahF1K.d.ts +2 -0
- package/dist/index-DCO4mxiO.d.ts +378 -0
- package/dist/index-DntDUXW1.d.ts +1 -0
- package/dist/index-x0_Y5uPV.d.ts +2 -0
- package/dist/index.d.ts +13 -13
- package/dist/index.js +1 -1
- package/dist/{lezer-tree-iS7LpLBJ.d.ts → lezer-tree-BQZqBT5A.d.ts} +1 -2
- package/dist/library/diagnostics.d.ts +1 -1
- package/dist/library/diagnostics.js +1 -1
- package/dist/library/index.d.ts +5 -5
- package/dist/library/index.js +1 -1
- package/dist/library/index.js.map +1 -1
- package/dist/library/oss-api.d.ts +11 -3
- package/dist/library/oss-api.js +45 -4
- package/dist/library/oss-api.js.map +1 -1
- package/dist/library/oss-layout-api.d.ts +0 -1
- package/dist/library/oss.d.ts +21 -16
- package/dist/library/oss.js +19 -13
- package/dist/library/oss.js.map +1 -1
- package/dist/library/rsengine.d.ts +6 -5
- package/dist/library/rsengine.js +1 -1
- package/dist/library/rsform-api/index.d.ts +2 -299
- package/dist/library/rsform-api/index.js +1 -1
- package/dist/library/rsform.d.ts +1 -1
- package/dist/library/rsmodel-api.d.ts +12 -7
- package/dist/library/rsmodel-api.js +6 -2
- package/dist/library/rsmodel-api.js.map +1 -1
- package/dist/library/rsmodel.d.ts +1 -1
- package/dist/library/structure-planner.d.ts +3 -3
- package/dist/library/structure-planner.js +1 -1
- package/dist/library/structure-planner.js.map +1 -1
- package/dist/{parser-Bwd8LxJ1.d.ts → parser-DkejtiOR.d.ts} +1 -2
- package/dist/parsing/ast.d.ts +1 -1
- package/dist/parsing/index.d.ts +3 -2
- package/dist/parsing/lezer-tree.d.ts +1 -1
- package/dist/rslang/api.d.ts +2 -2
- package/dist/rslang/ast-annotations.d.ts +1 -1
- package/dist/rslang/eval/calculator.d.ts +1 -1
- package/dist/rslang/eval/evaluation-cache.d.ts +3 -3
- package/dist/rslang/eval/evaluator.d.ts +3 -3
- package/dist/rslang/eval/value-api.d.ts +1 -1
- package/dist/rslang/eval/value.d.ts +1 -1
- package/dist/rslang/index.d.ts +11 -10
- package/dist/rslang/labels.d.ts +3 -3
- package/dist/rslang/parser/expression-generator.d.ts +1 -1
- package/dist/rslang/parser/normalize.d.ts +2 -1
- package/dist/rslang/parser/parser.d.ts +1 -1
- package/dist/rslang/parser/parser.terms.d.ts +1 -40
- package/dist/rslang/parser/syntax-errors/index.d.ts +3 -3
- package/dist/rslang/semantic/analyzer.d.ts +1 -1
- package/dist/rslang/semantic/arguments-extractor.d.ts +1 -1
- package/dist/rslang/semantic/type-auditor.d.ts +3 -3
- package/dist/rslang/semantic/typification-api.d.ts +1 -2
- package/dist/rslang/semantic/typification-parser.d.ts +1 -1
- package/dist/rslang/semantic/typification.d.ts +1 -1
- package/dist/rslang/semantic/value-auditor.d.ts +2 -2
- package/dist/rslang/typification-graph.d.ts +1 -1
- package/dist/shared/index.d.ts +1 -0
- package/dist/{typification-graph-BY_oGT82.d.ts → typification-graph-CSxDt18X.d.ts} +2 -3
- package/dist/{typification-9lNu9R4k.d.ts → typification-hWUoWCba.d.ts} +2 -1
- package/dist/{typification-parser-Dytsv9CI.d.ts → typification-parser-DFxj4JiQ.d.ts} +2 -3
- package/dist/{value-BduA_ZGp.d.ts → value-XpJOVzMP.d.ts} +2 -1
- package/dist/{value-api-CXLl_zg0.d.ts → value-api-Dw8UkwCD.d.ts} +3 -4
- package/package.json +8 -8
- package/src/library/diagnostics.ts +36 -11
- package/src/library/oss-api.test.ts +100 -5
- package/src/library/oss-api.ts +76 -6
- package/src/library/oss.ts +22 -16
- package/src/library/rsform-api/alias.ts +8 -8
- package/src/library/rsform-api/cst-type.ts +7 -5
- package/src/library/rsform-api/expression.ts +3 -3
- package/src/library/rsform-api/formal-graph.test.ts +2 -2
- package/src/library/rsform-api/formal-graph.ts +6 -10
- package/src/library/rsform-api/index.ts +18 -3
- package/src/library/rsform-api/semantic-relations.ts +4 -7
- package/src/library/rsform-api/stats.ts +6 -5
- package/src/library/rsform-api/structure.ts +12 -6
- package/src/library/rsform-api/substitution.ts +2 -2
- package/src/library/rsform-api/synthesis.test.ts +33 -2
- package/src/library/rsform-api/synthesis.ts +16 -12
- package/src/library/rsform-api/text-resolution.test.ts +2 -4
- package/src/library/rsform-api/text-resolution.ts +8 -8
- package/src/library/rsform-api/types.ts +89 -8
- package/src/library/rsmodel-api.ts +10 -5
- package/src/library/structure-planner.ts +6 -2
- package/src/library/template-instantiation.ts +11 -9
- package/dist/diagnostics-CljEzVBV.js.map +0 -1
- package/dist/index-BKZ67WMa.d.ts +0 -1
- package/dist/index-BVVgDSdq.d.ts +0 -1
- package/dist/index-DmtQKWjk.d.ts +0 -1
- package/dist/index-_6s0AX1B.d.ts +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as SET_INFINITY, c as VALUE_TRUE, d as ValuePath, f as compare, h as tuple, i as INVALID_ELEMENT, l as Value, m as set, n as CalcInvalidDataError, o as TUPLE_ID, p as makeValuePath, r as EmptySetV, s as VALUE_FALSE, t as BOOL_INFINITY, u as ValueContext } from "../../value-
|
|
1
|
+
import { a as SET_INFINITY, c as VALUE_TRUE, d as ValuePath, f as compare, h as tuple, i as INVALID_ELEMENT, l as Value, m as set, n as CalcInvalidDataError, o as TUPLE_ID, p as makeValuePath, r as EmptySetV, s as VALUE_FALSE, t as BOOL_INFINITY, u as ValueContext } from "../../value-XpJOVzMP.js";
|
|
2
2
|
export { BOOL_INFINITY, CalcInvalidDataError, EmptySetV, INVALID_ELEMENT, SET_INFINITY, TUPLE_ID, VALUE_FALSE, VALUE_TRUE, Value, ValueContext, ValuePath, compare, makeValuePath, set, tuple };
|
package/dist/rslang/index.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { A as makeTypePath, b as Typification, d as EmptySetT, f as ExpressionType, g as TypeClass, m as LogicT, t as AnyTypificationT, v as TypeID, y as TypePath } from "../typification-
|
|
1
|
+
import { A as makeTypePath, b as Typification, d as EmptySetT, f as ExpressionType, g as TypeClass, m as LogicT, t as AnyTypificationT, v as TypeID, y as TypePath } from "../typification-hWUoWCba.js";
|
|
2
2
|
import { i as RSErrorDescription, r as RSErrorCode } from "../error-B0EkIx4K.js";
|
|
3
|
-
import { i as readTypeAnnotation, r as readErrorAnnotation } from "../ast-annotations-
|
|
4
|
-
import { d as ValuePath, l as Value, p as makeValuePath } from "../value-
|
|
5
|
-
import { n as CalculatorResult, r as RSCalculator, t as CalculatorEvaluateOptions } from "../calculator-
|
|
6
|
-
import { d as printValue } from "../value-api-
|
|
7
|
-
import { t as parser } from "../parser-
|
|
3
|
+
import { i as readTypeAnnotation, r as readErrorAnnotation } from "../ast-annotations-x4PJ_Lhc.js";
|
|
4
|
+
import { d as ValuePath, l as Value, p as makeValuePath } from "../value-XpJOVzMP.js";
|
|
5
|
+
import { n as CalculatorResult, r as RSCalculator, t as CalculatorEvaluateOptions } from "../calculator-uPaTV3hc.js";
|
|
6
|
+
import { d as printValue } from "../value-api-Dw8UkwCD.js";
|
|
7
|
+
import { t as parser } from "../parser-DkejtiOR.js";
|
|
8
8
|
import { t as TokenID } from "../token-DeXAmzwr.js";
|
|
9
9
|
import { t as ValueClass } from "../value-class-CNI-lqXJ.js";
|
|
10
|
-
import { a as RSLangAnalyzer, n as AnalysisFast, r as AnalysisFull, t as AnalysisBase } from "../analyzer-
|
|
11
|
-
import { n as ArgumentsType } from "../arguments-extractor-
|
|
12
|
-
import { n as applyAsciiTypeSubstitutions, r as parseTypeText } from "../typification-parser-
|
|
13
|
-
import { n as TypificationNodeData, t as TypificationGraph } from "../typification-graph-
|
|
10
|
+
import { a as RSLangAnalyzer, n as AnalysisFast, r as AnalysisFull, t as AnalysisBase } from "../analyzer-CzFaWR7w.js";
|
|
11
|
+
import { n as ArgumentsType } from "../arguments-extractor-CXWRT5Ou.js";
|
|
12
|
+
import { n as applyAsciiTypeSubstitutions, r as parseTypeText } from "../typification-parser-DFxj4JiQ.js";
|
|
13
|
+
import { n as TypificationNodeData, t as TypificationGraph } from "../typification-graph-CSxDt18X.js";
|
|
14
|
+
import "../index-CnuO4w8e.js";
|
|
14
15
|
export { type AnalysisBase, type AnalysisFast, type AnalysisFull, AnyTypificationT, type ArgumentsType, type CalculatorEvaluateOptions, type CalculatorResult, EmptySetT, type ExpressionType, LogicT, RSCalculator, RSErrorCode, type RSErrorDescription, RSLangAnalyzer, TokenID, TypeClass, TypeID, type TypePath, type Typification, TypificationGraph, type TypificationNodeData, type Value, ValueClass, type ValuePath, applyAsciiTypeSubstitutions, makeTypePath, makeValuePath, parseTypeText, printValue, readErrorAnnotation, readTypeAnnotation, parser as rslangParser };
|
package/dist/rslang/labels.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { n as AstNodeBase } from "../ast-
|
|
2
|
-
import
|
|
1
|
+
import { n as AstNodeBase } from "../ast-D-D6Rq3T.js";
|
|
2
|
+
import "../index-D5RahF1K.js";
|
|
3
|
+
import { f as ExpressionType } from "../typification-hWUoWCba.js";
|
|
3
4
|
import { t as TokenID } from "../token-DeXAmzwr.js";
|
|
4
|
-
|
|
5
5
|
//#region src/rslang/labels.d.ts
|
|
6
6
|
/** Retrieves label for {@link TokenID}. */
|
|
7
7
|
declare function labelToken(id: TokenID): string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as generateExpressionFromAst } from "../../expression-generator-
|
|
1
|
+
import { t as generateExpressionFromAst } from "../../expression-generator-CADzBw-C.js";
|
|
2
2
|
export { generateExpressionFromAst };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as AstNode } from "../../ast-
|
|
1
|
+
import { t as AstNode } from "../../ast-D-D6Rq3T.js";
|
|
2
|
+
import "../../index-D5RahF1K.js";
|
|
2
3
|
//#region src/rslang/parser/normalize.d.ts
|
|
3
4
|
/** Normalizes AST to a simple form. */
|
|
4
5
|
declare function normalizeAST(ast: AstNode, input: string): void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as parser } from "../../parser-
|
|
1
|
+
import { t as parser } from "../../parser-DkejtiOR.js";
|
|
2
2
|
export { parser };
|
|
@@ -1,44 +1,5 @@
|
|
|
1
1
|
//#region src/rslang/parser/parser.terms.d.ts
|
|
2
|
-
declare const Expression = 1,
|
|
3
|
-
Logic = 2,
|
|
4
|
-
Logic_predicates = 3,
|
|
5
|
-
Variable = 4,
|
|
6
|
-
Local = 5,
|
|
7
|
-
Tuple = 8,
|
|
8
|
-
Expr_enum_min2 = 9,
|
|
9
|
-
Logic_unary = 24,
|
|
10
|
-
Predicate = 26,
|
|
11
|
-
Logic_quantor = 29,
|
|
12
|
-
Variable_pack = 31,
|
|
13
|
-
Logic_binary = 33,
|
|
14
|
-
Setexpr = 38,
|
|
15
|
-
Integer = 39,
|
|
16
|
-
EmptySet = 40,
|
|
17
|
-
IntegerSet = 41,
|
|
18
|
-
Global = 42,
|
|
19
|
-
Radical = 43,
|
|
20
|
-
Setexpr_binary = 44,
|
|
21
|
-
Enumeration = 55,
|
|
22
|
-
Boolean = 56,
|
|
23
|
-
Filter_expression = 58,
|
|
24
|
-
Filter = 59,
|
|
25
|
-
Declarative = 60,
|
|
26
|
-
PrefixD = 62,
|
|
27
|
-
PrefixI = 63,
|
|
28
|
-
Imperative = 64,
|
|
29
|
-
Imp_blocks = 65,
|
|
30
|
-
PrefixR = 67,
|
|
31
|
-
Recursion = 68,
|
|
32
|
-
Function = 69,
|
|
33
|
-
BigPr = 70,
|
|
34
|
-
SmallPr = 71,
|
|
35
|
-
Card = 72,
|
|
36
|
-
Bool = 73,
|
|
37
|
-
Debool = 74,
|
|
38
|
-
Red = 75,
|
|
39
|
-
Function_decl = 76,
|
|
40
|
-
Arguments = 77,
|
|
41
|
-
Declaration = 78;
|
|
2
|
+
declare const Expression = 1, Logic = 2, Logic_predicates = 3, Variable = 4, Local = 5, Tuple = 8, Expr_enum_min2 = 9, Logic_unary = 24, Predicate = 26, Logic_quantor = 29, Variable_pack = 31, Logic_binary = 33, Setexpr = 38, Integer = 39, EmptySet = 40, IntegerSet = 41, Global = 42, Radical = 43, Setexpr_binary = 44, Enumeration = 55, Boolean = 56, Filter_expression = 58, Filter = 59, Declarative = 60, PrefixD = 62, PrefixI = 63, Imperative = 64, Imp_blocks = 65, PrefixR = 67, Recursion = 68, Function = 69, BigPr = 70, SmallPr = 71, Card = 72, Bool = 73, Debool = 74, Red = 75, Function_decl = 76, Arguments = 77, Declaration = 78;
|
|
42
3
|
//#endregion
|
|
43
4
|
export { Arguments, BigPr, Bool, Boolean, Card, Debool, Declaration, Declarative, EmptySet, Enumeration, Expr_enum_min2, Expression, Filter, Filter_expression, Function, Function_decl, Global, Imp_blocks, Imperative, Integer, IntegerSet, Local, Logic, Logic_binary, Logic_predicates, Logic_quantor, Logic_unary, Predicate, PrefixD, PrefixI, PrefixR, Radical, Recursion, Red, Setexpr, Setexpr_binary, SmallPr, Tuple, Variable, Variable_pack };
|
|
44
5
|
//# sourceMappingURL=parser.terms.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as AstNode } from "../../../ast-
|
|
2
|
-
import
|
|
1
|
+
import { t as AstNode } from "../../../ast-D-D6Rq3T.js";
|
|
2
|
+
import "../../../index-D5RahF1K.js";
|
|
3
|
+
import { g as TypeClass } from "../../../typification-hWUoWCba.js";
|
|
3
4
|
import { t as ErrorReporter } from "../../../error-B0EkIx4K.js";
|
|
4
|
-
|
|
5
5
|
//#region src/rslang/parser/syntax-errors/index.d.ts
|
|
6
6
|
/** When set, refines incomplete formal headers (`[α∈…]`, quantifiers). */
|
|
7
7
|
interface SyntaxErrorOptions {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as RSLangAnalyzer, i as AnalysisOptions, n as AnalysisFast, r as AnalysisFull, t as AnalysisBase } from "../../analyzer-
|
|
1
|
+
import { a as RSLangAnalyzer, i as AnalysisOptions, n as AnalysisFast, r as AnalysisFull, t as AnalysisBase } from "../../analyzer-CzFaWR7w.js";
|
|
2
2
|
export { AnalysisBase, AnalysisFast, AnalysisFull, AnalysisOptions, RSLangAnalyzer };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ArgumentsType, t as ArgumentsExtractor } from "../../arguments-extractor-
|
|
1
|
+
import { n as ArgumentsType, t as ArgumentsExtractor } from "../../arguments-extractor-CXWRT5Ou.js";
|
|
2
2
|
export { ArgumentsExtractor, ArgumentsType };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as AstNode } from "../../ast-
|
|
2
|
-
import
|
|
1
|
+
import { t as AstNode } from "../../ast-D-D6Rq3T.js";
|
|
2
|
+
import "../../index-D5RahF1K.js";
|
|
3
|
+
import { _ as TypeContext, f as ExpressionType } from "../../typification-hWUoWCba.js";
|
|
3
4
|
import { t as ErrorReporter } from "../../error-B0EkIx4K.js";
|
|
4
|
-
|
|
5
5
|
//#region src/rslang/semantic/type-auditor.d.ts
|
|
6
6
|
/** Type auditor for AST type checking. */
|
|
7
7
|
declare class TypeAuditor {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { b as Typification, f as ExpressionType, g as TypeClass, v as TypeID, y as TypePath } from "../../typification-
|
|
2
|
-
|
|
1
|
+
import { b as Typification, f as ExpressionType, g as TypeClass, v as TypeID, y as TypePath } from "../../typification-hWUoWCba.js";
|
|
3
2
|
//#region src/rslang/semantic/typification-api.d.ts
|
|
4
3
|
/** Returns the TypeClass associated with the given TypeID. */
|
|
5
4
|
declare function getTypeClass(typeID: TypeID): TypeClass;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as applyAsciiTypeSubstitutions, r as parseTypeText, t as TypificationParseResult } from "../../typification-parser-
|
|
1
|
+
import { n as applyAsciiTypeSubstitutions, r as parseTypeText, t as TypificationParseResult } from "../../typification-parser-DFxj4JiQ.js";
|
|
2
2
|
export { TypificationParseResult, applyAsciiTypeSubstitutions, parseTypeText };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as makeTypePath, C as component, D as isRadical, E as isMangledRadical, M as mangleRadicalId, N as tuple, O as isTemplateRadical, S as bool, T as debool, _ as TypeContext, a as EchelonCollection, b as Typification, c as EchelonLogic, d as EmptySetT, f as ExpressionType, g as TypeClass, h as Parametrized, i as EchelonBase, j as mangleParamAlias, k as isTypification, l as EchelonPredicate, m as LogicT, n as Argument, o as EchelonFunctional, p as IntegerT, r as EchelonAnyTyped, s as EchelonInteger, t as AnyTypificationT, u as EchelonTuple, v as TypeID, w as constant, x as basic, y as TypePath } from "../../typification-
|
|
1
|
+
import { A as makeTypePath, C as component, D as isRadical, E as isMangledRadical, M as mangleRadicalId, N as tuple, O as isTemplateRadical, S as bool, T as debool, _ as TypeContext, a as EchelonCollection, b as Typification, c as EchelonLogic, d as EmptySetT, f as ExpressionType, g as TypeClass, h as Parametrized, i as EchelonBase, j as mangleParamAlias, k as isTypification, l as EchelonPredicate, m as LogicT, n as Argument, o as EchelonFunctional, p as IntegerT, r as EchelonAnyTyped, s as EchelonInteger, t as AnyTypificationT, u as EchelonTuple, v as TypeID, w as constant, x as basic, y as TypePath } from "../../typification-hWUoWCba.js";
|
|
2
2
|
export { AnyTypificationT, Argument, EchelonAnyTyped, EchelonBase, EchelonCollection, EchelonFunctional, EchelonInteger, EchelonLogic, EchelonPredicate, EchelonTuple, EmptySetT, ExpressionType, IntegerT, LogicT, Parametrized, TypeClass, TypeContext, TypeID, TypePath, Typification, basic, bool, component, constant, debool, isMangledRadical, isRadical, isTemplateRadical, isTypification, makeTypePath, mangleParamAlias, mangleRadicalId, tuple };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as AstNode } from "../../ast-
|
|
1
|
+
import { t as AstNode } from "../../ast-D-D6Rq3T.js";
|
|
2
|
+
import "../../index-D5RahF1K.js";
|
|
2
3
|
import { t as ErrorReporter } from "../../error-B0EkIx4K.js";
|
|
3
4
|
import { n as ValueClassContext, t as ValueClass } from "../../value-class-CNI-lqXJ.js";
|
|
4
|
-
|
|
5
5
|
//#region src/rslang/semantic/value-auditor.d.ts
|
|
6
6
|
/** Value auditor for AST value class checking. */
|
|
7
7
|
declare class ValueAuditor {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as TypificationNodeData, t as TypificationGraph } from "../typification-graph-
|
|
1
|
+
import { n as TypificationNodeData, t as TypificationGraph } from "../typification-graph-CSxDt18X.js";
|
|
2
2
|
export { TypificationGraph, TypificationNodeData };
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { f as ExpressionType } from "./typification-
|
|
2
|
-
|
|
1
|
+
import { f as ExpressionType } from "./typification-hWUoWCba.js";
|
|
3
2
|
//#region src/rslang/typification-graph.d.ts
|
|
4
3
|
/** Represents a single node of a {@link TypificationGraph}. */
|
|
5
4
|
interface TypificationNodeData extends Record<string, unknown> {
|
|
@@ -27,4 +26,4 @@ declare class TypificationGraph {
|
|
|
27
26
|
}
|
|
28
27
|
//#endregion
|
|
29
28
|
export { TypificationNodeData as n, TypificationGraph as t };
|
|
30
|
-
//# sourceMappingURL=typification-graph-
|
|
29
|
+
//# sourceMappingURL=typification-graph-CSxDt18X.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as Branded } from "./branded-ZlzIcxzu.js";
|
|
2
|
+
import "./index-x0_Y5uPV.js";
|
|
2
3
|
//#region src/rslang/semantic/typification.d.ts
|
|
3
4
|
/** Typification structure enumeration. */
|
|
4
5
|
declare const TypeID: {
|
|
@@ -125,4 +126,4 @@ declare function mangleRadicalId(radical: string, funcName: string): string;
|
|
|
125
126
|
declare function mangleParamAlias(alias: string, funcName: string): string;
|
|
126
127
|
//#endregion
|
|
127
128
|
export { makeTypePath as A, component as C, isRadical as D, isMangledRadical as E, mangleRadicalId as M, tuple as N, isTemplateRadical as O, bool as S, debool as T, TypeContext as _, EchelonCollection as a, Typification as b, EchelonLogic as c, EmptySetT as d, ExpressionType as f, TypeClass as g, Parametrized as h, EchelonBase as i, mangleParamAlias as j, isTypification as k, EchelonPredicate as l, LogicT as m, Argument as n, EchelonFunctional as o, IntegerT as p, EchelonAnyTyped as r, EchelonInteger as s, AnyTypificationT as t, EchelonTuple as u, TypeID as v, constant as w, basic as x, TypePath as y };
|
|
128
|
-
//# sourceMappingURL=typification-
|
|
129
|
+
//# sourceMappingURL=typification-hWUoWCba.d.ts.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { f as ExpressionType } from "./typification-
|
|
2
|
-
|
|
1
|
+
import { f as ExpressionType } from "./typification-hWUoWCba.js";
|
|
3
2
|
//#region src/rslang/semantic/typification-parser.d.ts
|
|
4
3
|
interface TypificationParseResult {
|
|
5
4
|
type: ExpressionType | null;
|
|
@@ -10,4 +9,4 @@ declare function parseTypeText(input: string): TypificationParseResult;
|
|
|
10
9
|
declare function applyAsciiTypeSubstitutions(raw: string): string;
|
|
11
10
|
//#endregion
|
|
12
11
|
export { applyAsciiTypeSubstitutions as n, parseTypeText as r, TypificationParseResult as t };
|
|
13
|
-
//# sourceMappingURL=typification-parser-
|
|
12
|
+
//# sourceMappingURL=typification-parser-DFxj4JiQ.d.ts.map
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { t as Branded } from "./branded-ZlzIcxzu.js";
|
|
2
|
+
import "./index-x0_Y5uPV.js";
|
|
2
3
|
//#region src/rslang/eval/value.d.ts
|
|
3
4
|
/** Tuple ID for array distinction. */
|
|
4
5
|
declare const TUPLE_ID = -111;
|
|
@@ -36,4 +37,4 @@ declare function tuple(components: Value[]): Value;
|
|
|
36
37
|
declare function set(elements: Value[]): Value[];
|
|
37
38
|
//#endregion
|
|
38
39
|
export { SET_INFINITY as a, VALUE_TRUE as c, ValuePath as d, compare as f, tuple as h, INVALID_ELEMENT as i, Value as l, set as m, CalcInvalidDataError as n, TUPLE_ID as o, makeValuePath as p, EmptySetV as r, VALUE_FALSE as s, BOOL_INFINITY as t, ValueContext as u };
|
|
39
|
-
//# sourceMappingURL=value-
|
|
40
|
+
//# sourceMappingURL=value-XpJOVzMP.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { b as Typification, f as ExpressionType, y as TypePath } from "./typification-
|
|
2
|
-
import { d as ValuePath, l as Value, u as ValueContext } from "./value-
|
|
3
|
-
|
|
1
|
+
import { b as Typification, f as ExpressionType, y as TypePath } from "./typification-hWUoWCba.js";
|
|
2
|
+
import { d as ValuePath, l as Value, u as ValueContext } from "./value-XpJOVzMP.js";
|
|
4
3
|
//#region src/rslang/eval/value-api.d.ts
|
|
5
4
|
/** Cartesian product of factor sets. */
|
|
6
5
|
declare function cartesianProduct(factors: Value[][]): Value[] | null;
|
|
@@ -46,4 +45,4 @@ declare function setNestedValue(target: Value | null, path: ValuePath, newVal: V
|
|
|
46
45
|
declare function testInvalid(value: Value): boolean;
|
|
47
46
|
//#endregion
|
|
48
47
|
export { setSymDiff as _, extractValue as a, validateValue as b, isTupleValue as c, printValue as d, projection as f, setNestedValue as g, setIntersection as h, convertPathToType as i, makeDefaultValue as l, setDiff as m, cartesianProduct as n, isSetValue as o, reduce as p, contains as r, isSubsetOrEq as s, boolean as t, normalizeValue as u, setUnion as v, valueStub as x, testInvalid as y };
|
|
49
|
-
//# sourceMappingURL=value-api-
|
|
48
|
+
//# sourceMappingURL=value-api-Dw8UkwCD.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rsconcept/domain",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.1",
|
|
4
4
|
"description": "Shared TypeScript domain for RS language, RSForm, RSModel, RSEngine, OSS, and concept-text helpers.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "IRBorisov",
|
|
@@ -172,17 +172,17 @@
|
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|
|
174
174
|
"@lezer/generator": "^1.8.0",
|
|
175
|
-
"@types/node": "^26.1.
|
|
176
|
-
"@typescript-eslint/parser": "^8.0
|
|
177
|
-
"eslint": "^9.39.
|
|
175
|
+
"@types/node": "^26.1.1",
|
|
176
|
+
"@typescript-eslint/parser": "^8.63.0",
|
|
177
|
+
"eslint": "^9.39.5",
|
|
178
178
|
"eslint-plugin-simple-import-sort": "^13.0.0",
|
|
179
179
|
"globals": "^17.7.0",
|
|
180
|
-
"prettier": "^3.9.
|
|
181
|
-
"tsdown": "^0.22.
|
|
180
|
+
"prettier": "^3.9.5",
|
|
181
|
+
"tsdown": "^0.22.4",
|
|
182
182
|
"typescript": "^6.0.3",
|
|
183
|
-
"typescript-eslint": "^8.
|
|
183
|
+
"typescript-eslint": "^8.63.0",
|
|
184
184
|
"unrun": "^0.3.1",
|
|
185
|
-
"vitest": "^4.1.
|
|
185
|
+
"vitest": "^4.1.10"
|
|
186
186
|
},
|
|
187
187
|
"publishConfig": {
|
|
188
188
|
"access": "public"
|
|
@@ -3,8 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { type Graph } from '../graph';
|
|
6
|
+
import { type ExpressionType } from '../rslang';
|
|
6
7
|
import { labelType } from '../rslang/labels';
|
|
7
8
|
|
|
9
|
+
import { type BasicTextCheckFields } from './rsform-api/types';
|
|
8
10
|
import { type Constituenta, type CstType } from './rsform';
|
|
9
11
|
import { isBasicConcept, isLogical } from './rsform-api';
|
|
10
12
|
import { EvalStatus } from './rsmodel';
|
|
@@ -17,7 +19,7 @@ export const DiagnosticKind = {
|
|
|
17
19
|
} as const;
|
|
18
20
|
export type DiagnosticKind = (typeof DiagnosticKind)[keyof typeof DiagnosticKind];
|
|
19
21
|
|
|
20
|
-
/** Schema and
|
|
22
|
+
/** Schema, model, and substitution-table diagnostic codes (same numeric format as {@link RSErrorCode}). */
|
|
21
23
|
export const RSDiagnosticCode = {
|
|
22
24
|
schemaHomonym: 0x8901,
|
|
23
25
|
schemaFormalDuplicate: 0x8902,
|
|
@@ -29,7 +31,21 @@ export const RSDiagnosticCode = {
|
|
|
29
31
|
modelEmpty: 0x8910,
|
|
30
32
|
modelAxiomFalse: 0x8911,
|
|
31
33
|
modelInvalidData: 0x8912,
|
|
32
|
-
modelEvalFail: 0x8913
|
|
34
|
+
modelEvalFail: 0x8913,
|
|
35
|
+
|
|
36
|
+
substitutionInvalidIDs: 0x8920,
|
|
37
|
+
substitutionIncorrectCst: 0x8921,
|
|
38
|
+
substitutionInvalidClasses: 0x8922,
|
|
39
|
+
substitutionInvalidBasic: 0x8923,
|
|
40
|
+
substitutionInvalidConstant: 0x8924,
|
|
41
|
+
substitutionTypificationCycle: 0x8925,
|
|
42
|
+
substitutionBaseNotSet: 0x8926,
|
|
43
|
+
substitutionUnequalTypification: 0x8927,
|
|
44
|
+
/** Non-blocking warning: formal definitions differ after mapping. */
|
|
45
|
+
substitutionUnequalExpressions: 0x2928,
|
|
46
|
+
substitutionUnequalArgsCount: 0x8929,
|
|
47
|
+
substitutionUnequalArgs: 0x892a,
|
|
48
|
+
substitutionInvalidNominal: 0x892b
|
|
33
49
|
} as const;
|
|
34
50
|
export type RSDiagnosticCode = (typeof RSDiagnosticCode)[keyof typeof RSDiagnosticCode];
|
|
35
51
|
|
|
@@ -41,8 +57,11 @@ export interface CstDiagnostic {
|
|
|
41
57
|
params?: readonly string[];
|
|
42
58
|
}
|
|
43
59
|
|
|
44
|
-
/** Whether
|
|
45
|
-
export function hasCstDiagnostic(
|
|
60
|
+
/** Whether an item has a schema/model diagnostic with the given code. */
|
|
61
|
+
export function hasCstDiagnostic(
|
|
62
|
+
cst: { diagnostics?: readonly CstDiagnostic[] | null },
|
|
63
|
+
code: RSDiagnosticCode
|
|
64
|
+
): boolean {
|
|
46
65
|
return cst.diagnostics?.some(item => item.code === code) ?? false;
|
|
47
66
|
}
|
|
48
67
|
|
|
@@ -160,7 +179,13 @@ export function modelStatusCstDiagnostic(status: EvalStatus, cstType: CstType):
|
|
|
160
179
|
return { kind: DiagnosticKind.MODEL, code, params: [String(status)] };
|
|
161
180
|
}
|
|
162
181
|
|
|
163
|
-
function collectLocalSchemaDiagnostics(
|
|
182
|
+
function collectLocalSchemaDiagnostics(
|
|
183
|
+
cst: BasicTextCheckFields & {
|
|
184
|
+
is_type_mismatch: boolean;
|
|
185
|
+
typification_manual: string;
|
|
186
|
+
analysis: { type: ExpressionType | null };
|
|
187
|
+
}
|
|
188
|
+
): CstDiagnostic[] {
|
|
164
189
|
const result: CstDiagnostic[] = [];
|
|
165
190
|
if (cst.is_type_mismatch) {
|
|
166
191
|
result.push({
|
|
@@ -180,13 +205,13 @@ function collectLocalSchemaDiagnostics(cst: Constituenta): CstDiagnostic[] {
|
|
|
180
205
|
return result;
|
|
181
206
|
}
|
|
182
207
|
|
|
183
|
-
function detectGroupedAliasDiagnostics(
|
|
184
|
-
items:
|
|
208
|
+
function detectGroupedAliasDiagnostics<T extends { id: number }>(
|
|
209
|
+
items: readonly T[],
|
|
185
210
|
resolveAlias: (id: number) => string,
|
|
186
|
-
groupKey: (cst:
|
|
211
|
+
groupKey: (cst: T) => string | undefined,
|
|
187
212
|
code: RSDiagnosticCode
|
|
188
213
|
): Map<number, CstDiagnostic> {
|
|
189
|
-
const groups = new Map<string,
|
|
214
|
+
const groups = new Map<string, T[]>();
|
|
190
215
|
for (const cst of items) {
|
|
191
216
|
const key = groupKey(cst);
|
|
192
217
|
if (!key) {
|
|
@@ -218,7 +243,7 @@ function detectGroupedAliasDiagnostics(
|
|
|
218
243
|
}
|
|
219
244
|
|
|
220
245
|
function detectHomonymDiagnostics(
|
|
221
|
-
items:
|
|
246
|
+
items: readonly { id: number; term_resolved: string }[],
|
|
222
247
|
resolveAlias: (id: number) => string
|
|
223
248
|
): Map<number, CstDiagnostic> {
|
|
224
249
|
return detectGroupedAliasDiagnostics(
|
|
@@ -233,7 +258,7 @@ function detectHomonymDiagnostics(
|
|
|
233
258
|
}
|
|
234
259
|
|
|
235
260
|
function detectFormalDuplicateDiagnostics(
|
|
236
|
-
items:
|
|
261
|
+
items: readonly { id: number }[],
|
|
237
262
|
resolveAlias: (id: number) => string,
|
|
238
263
|
normalizedDefinitions: ReadonlyMap<number, string>
|
|
239
264
|
): Map<number, CstDiagnostic> {
|
|
@@ -2,14 +2,16 @@ import { describe, expect, it } from 'vitest';
|
|
|
2
2
|
|
|
3
3
|
import { Graph } from '../graph';
|
|
4
4
|
|
|
5
|
+
import { SubstitutionErrorType } from './oss';
|
|
5
6
|
import { SubstitutionValidator } from './oss-api';
|
|
6
7
|
import { type Constituenta, CstClass, CstType, type RSForm } from './rsform';
|
|
7
8
|
|
|
8
9
|
function mockConstituenta(
|
|
9
|
-
partial: Pick<Constituenta, 'id' | 'alias' | 'definition_formal' | 'cst_class' | 'cst_type'>
|
|
10
|
+
partial: Pick<Constituenta, 'id' | 'alias' | 'definition_formal' | 'cst_class' | 'cst_type'> &
|
|
11
|
+
Partial<Pick<Constituenta, 'schema'>>
|
|
10
12
|
): Constituenta {
|
|
11
13
|
return {
|
|
12
|
-
schema: 790,
|
|
14
|
+
schema: partial.schema ?? 790,
|
|
13
15
|
crucial: false,
|
|
14
16
|
convention: '',
|
|
15
17
|
definition_raw: '',
|
|
@@ -37,11 +39,16 @@ function mockConstituenta(
|
|
|
37
39
|
};
|
|
38
40
|
}
|
|
39
41
|
|
|
40
|
-
function mockSchema(items: Constituenta[]): RSForm {
|
|
42
|
+
function mockSchema(items: Constituenta[], edges: number[][] = [], id = 790, alias = 'S1'): RSForm {
|
|
41
43
|
const graph = new Graph(items.map(item => [item.id]));
|
|
44
|
+
for (const edge of edges) {
|
|
45
|
+
if (edge.length === 2) {
|
|
46
|
+
graph.addEdge(edge[0], edge[1]);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
42
49
|
return {
|
|
43
|
-
id
|
|
44
|
-
alias
|
|
50
|
+
id,
|
|
51
|
+
alias,
|
|
45
52
|
items,
|
|
46
53
|
graph,
|
|
47
54
|
cstByAlias: new Map(items.map(item => [item.alias, item]))
|
|
@@ -72,4 +79,92 @@ describe('SubstitutionValidator', () => {
|
|
|
72
79
|
expect(() => validator.validate()).not.toThrow();
|
|
73
80
|
expect(validator.validate()).toBe(true);
|
|
74
81
|
});
|
|
82
|
+
|
|
83
|
+
it('reports definitionCycle when identification closes a formal dependency loop', () => {
|
|
84
|
+
// D16 := F2[D15] ⇒ edge D15 → D16; identifying D15 → D16 yields D16 := F2[D16]
|
|
85
|
+
const schema = mockSchema(
|
|
86
|
+
[
|
|
87
|
+
mockConstituenta({
|
|
88
|
+
id: 1,
|
|
89
|
+
alias: 'X1',
|
|
90
|
+
cst_class: CstClass.BASIC,
|
|
91
|
+
cst_type: CstType.BASE,
|
|
92
|
+
definition_formal: ''
|
|
93
|
+
}),
|
|
94
|
+
mockConstituenta({
|
|
95
|
+
id: 2,
|
|
96
|
+
alias: 'F2',
|
|
97
|
+
cst_class: CstClass.DERIVED,
|
|
98
|
+
cst_type: CstType.FUNCTION,
|
|
99
|
+
definition_formal: '[α∈X1] α'
|
|
100
|
+
}),
|
|
101
|
+
mockConstituenta({
|
|
102
|
+
id: 3,
|
|
103
|
+
alias: 'D15',
|
|
104
|
+
cst_class: CstClass.DERIVED,
|
|
105
|
+
cst_type: CstType.TERM,
|
|
106
|
+
definition_formal: 'X1'
|
|
107
|
+
}),
|
|
108
|
+
mockConstituenta({
|
|
109
|
+
id: 4,
|
|
110
|
+
alias: 'D16',
|
|
111
|
+
cst_class: CstClass.DERIVED,
|
|
112
|
+
cst_type: CstType.TERM,
|
|
113
|
+
definition_formal: 'F2[D15]'
|
|
114
|
+
})
|
|
115
|
+
],
|
|
116
|
+
[
|
|
117
|
+
[2, 4],
|
|
118
|
+
[3, 4]
|
|
119
|
+
]
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
const validator = new SubstitutionValidator([schema], [{ original: 3, substitution: 4 }]);
|
|
123
|
+
|
|
124
|
+
expect(validator.validate()).toBe(false);
|
|
125
|
+
expect(validator.errors).toEqual([
|
|
126
|
+
{
|
|
127
|
+
code: SubstitutionErrorType.definitionCycle,
|
|
128
|
+
params: ['D16 → D16']
|
|
129
|
+
}
|
|
130
|
+
]);
|
|
131
|
+
expect(SubstitutionErrorType.definitionCycle).toBe(0x8906);
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
it('allows identification that does not create a definition cycle', () => {
|
|
135
|
+
const schema = mockSchema(
|
|
136
|
+
[
|
|
137
|
+
mockConstituenta({
|
|
138
|
+
id: 1,
|
|
139
|
+
alias: 'X1',
|
|
140
|
+
cst_class: CstClass.BASIC,
|
|
141
|
+
cst_type: CstType.BASE,
|
|
142
|
+
definition_formal: ''
|
|
143
|
+
}),
|
|
144
|
+
mockConstituenta({
|
|
145
|
+
id: 2,
|
|
146
|
+
alias: 'D1',
|
|
147
|
+
cst_class: CstClass.DERIVED,
|
|
148
|
+
cst_type: CstType.TERM,
|
|
149
|
+
definition_formal: 'X1'
|
|
150
|
+
}),
|
|
151
|
+
mockConstituenta({
|
|
152
|
+
id: 3,
|
|
153
|
+
alias: 'D2',
|
|
154
|
+
cst_class: CstClass.DERIVED,
|
|
155
|
+
cst_type: CstType.TERM,
|
|
156
|
+
definition_formal: 'X1'
|
|
157
|
+
})
|
|
158
|
+
],
|
|
159
|
+
[
|
|
160
|
+
[1, 2],
|
|
161
|
+
[1, 3]
|
|
162
|
+
]
|
|
163
|
+
);
|
|
164
|
+
|
|
165
|
+
const validator = new SubstitutionValidator([schema], [{ original: 2, substitution: 3 }]);
|
|
166
|
+
|
|
167
|
+
expect(validator.validate()).toBe(true);
|
|
168
|
+
expect(validator.errors.every(error => error.code !== SubstitutionErrorType.definitionCycle)).toBe(true);
|
|
169
|
+
});
|
|
75
170
|
});
|