@rsconcept/domain 1.0.0 → 1.2.0
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/README.md +3 -3
- package/dist/analyzer-DlSq3Y3r.d.ts +39 -0
- package/dist/arguments-extractor-1acwjQNc.d.ts +38 -0
- package/dist/ast-C8sIpKdL.d.ts +51 -0
- package/dist/ast-annotations-BiMjkKvz.d.ts +16 -0
- package/dist/branded-ZlzIcxzu.d.ts +9 -0
- package/dist/calculator-C9W2jkSx.d.ts +39 -0
- package/dist/cctext/index.d.ts +2 -1
- package/dist/cctext/index.js +2 -42
- package/dist/cctext/language-api.d.ts +10 -12
- package/dist/cctext/language-api.js +157 -227
- package/dist/cctext/language-api.js.map +1 -1
- package/dist/cctext/language.d.ts +24 -22
- package/dist/cctext/language.js +43 -39
- package/dist/cctext/language.js.map +1 -1
- package/dist/error-E1LVq_3w.d.ts +87 -0
- package/dist/graph/graph.d.ts +2 -62
- package/dist/graph/graph.js +339 -382
- package/dist/graph/graph.js.map +1 -1
- package/dist/graph/index.d.ts +2 -1
- package/dist/graph/index.js +2 -384
- package/dist/graph-DR8rL2o3.d.ts +64 -0
- package/dist/hash-Y8I4c6Al.d.ts +8 -0
- package/dist/index-BKZ67WMa.d.ts +1 -0
- package/dist/index-BVVgDSdq.d.ts +1 -0
- package/dist/index-DmtQKWjk.d.ts +1 -0
- package/dist/index-_6s0AX1B.d.ts +1 -0
- package/dist/index.d.ts +27 -28
- package/dist/index.js +23 -5851
- package/dist/lezer-tree-iS7LpLBJ.d.ts +14 -0
- package/dist/library/folder-tree.d.ts +22 -20
- package/dist/library/folder-tree.js +108 -130
- package/dist/library/folder-tree.js.map +1 -1
- package/dist/library/index.d.ts +8 -17
- package/dist/library/index.js +7 -2800
- package/dist/library/library-api.d.ts +3 -1
- package/dist/library/library-api.js +9 -8
- package/dist/library/library-api.js.map +1 -1
- package/dist/library/library.d.ts +2 -56
- package/dist/library/library.js +23 -19
- package/dist/library/library.js.map +1 -1
- package/dist/library/oss-api.d.ts +26 -37
- package/dist/library/oss-api.js +258 -1096
- package/dist/library/oss-api.js.map +1 -1
- package/dist/library/oss-layout-api.d.ts +28 -28
- package/dist/library/oss-layout-api.js +239 -316
- package/dist/library/oss-layout-api.js.map +1 -1
- package/dist/library/oss-layout.d.ts +2 -25
- package/dist/library/oss-layout.js +1 -1
- package/dist/library/oss.d.ts +87 -89
- package/dist/library/oss.js +27 -26
- package/dist/library/oss.js.map +1 -1
- package/dist/library/rsengine.d.ts +100 -106
- package/dist/library/rsengine.js +439 -2599
- package/dist/library/rsengine.js.map +1 -1
- package/dist/library/rsform-api.d.ts +11 -16
- package/dist/library/rsform-api.js +313 -825
- package/dist/library/rsform-api.js.map +1 -1
- package/dist/library/rsform.d.ts +159 -167
- package/dist/library/rsform.js +29 -28
- package/dist/library/rsform.js.map +1 -1
- package/dist/library/rsmodel-api.d.ts +8 -15
- package/dist/library/rsmodel-api.js +172 -813
- package/dist/library/rsmodel-api.js.map +1 -1
- package/dist/library/rsmodel.d.ts +27 -33
- package/dist/library/rsmodel.js +16 -23
- package/dist/library/rsmodel.js.map +1 -1
- package/dist/library/structure-planner.d.ts +20 -26
- package/dist/library/structure-planner.js +106 -474
- package/dist/library/structure-planner.js.map +1 -1
- package/dist/library-CYun28Xz.d.ts +58 -0
- package/dist/oss-layout-3glgAqfn.d.ts +27 -0
- package/dist/parser-Bwd8LxJ1.d.ts +7 -0
- package/dist/parsing/ast.d.ts +2 -49
- package/dist/parsing/ast.js +68 -76
- package/dist/parsing/ast.js.map +1 -1
- package/dist/parsing/index.d.ts +3 -3
- package/dist/parsing/index.js +3 -141
- package/dist/parsing/lezer-tree.d.ts +2 -13
- package/dist/parsing/lezer-tree.js +50 -43
- package/dist/parsing/lezer-tree.js.map +1 -1
- package/dist/rslang/api.d.ts +9 -14
- package/dist/rslang/api.js +114 -827
- package/dist/rslang/api.js.map +1 -1
- package/dist/rslang/ast-annotations.d.ts +2 -18
- package/dist/rslang/ast-annotations.js +34 -45
- package/dist/rslang/ast-annotations.js.map +1 -1
- package/dist/rslang/error.d.ts +2 -85
- package/dist/rslang/error.js +88 -150
- package/dist/rslang/error.js.map +1 -1
- package/dist/rslang/eval/calculator.d.ts +2 -43
- package/dist/rslang/eval/calculator.js +81 -1636
- package/dist/rslang/eval/calculator.js.map +1 -1
- package/dist/rslang/eval/evaluation-cache.d.ts +22 -26
- package/dist/rslang/eval/evaluation-cache.js +168 -287
- package/dist/rslang/eval/evaluation-cache.js.map +1 -1
- package/dist/rslang/eval/evaluator.d.ts +59 -63
- package/dist/rslang/eval/evaluator.js +602 -1509
- package/dist/rslang/eval/evaluator.js.map +1 -1
- package/dist/rslang/eval/value-api.d.ts +2 -48
- package/dist/rslang/eval/value-api.js +2 -490
- package/dist/rslang/eval/value.d.ts +2 -36
- package/dist/rslang/eval/value.js +2 -118
- package/dist/rslang/index.d.ts +14 -17
- package/dist/rslang/index.js +12 -4314
- package/dist/rslang/labels.d.ts +6 -6
- package/dist/rslang/labels.js +139 -305
- package/dist/rslang/labels.js.map +1 -1
- package/dist/rslang/parser/expression-generator.d.ts +5 -5
- package/dist/rslang/parser/expression-generator.js +248 -446
- package/dist/rslang/parser/expression-generator.js.map +1 -1
- package/dist/rslang/parser/normalize.d.ts +4 -8
- package/dist/rslang/parser/normalize.js +286 -481
- package/dist/rslang/parser/normalize.js.map +1 -1
- package/dist/rslang/parser/parser.d.ts +2 -5
- package/dist/rslang/parser/parser.js +30 -21
- package/dist/rslang/parser/parser.js.map +1 -1
- package/dist/rslang/parser/parser.terms.d.ts +43 -41
- package/dist/rslang/parser/parser.terms.js +44 -83
- package/dist/rslang/parser/parser.terms.js.map +1 -1
- package/dist/rslang/parser/syntax-errors.d.ts +5 -8
- package/dist/rslang/parser/syntax-errors.js +113 -382
- package/dist/rslang/parser/syntax-errors.js.map +1 -1
- package/dist/rslang/parser/token.d.ts +2 -79
- package/dist/rslang/parser/token.js +81 -93
- package/dist/rslang/parser/token.js.map +1 -1
- package/dist/rslang/semantic/analyzer.d.ts +2 -39
- package/dist/rslang/semantic/analyzer.js +186 -2600
- package/dist/rslang/semantic/analyzer.js.map +1 -1
- package/dist/rslang/semantic/arguments-extractor.d.ts +2 -42
- package/dist/rslang/semantic/arguments-extractor.js +202 -361
- package/dist/rslang/semantic/arguments-extractor.js.map +1 -1
- package/dist/rslang/semantic/type-auditor.d.ts +64 -68
- package/dist/rslang/semantic/type-auditor.js +594 -1564
- package/dist/rslang/semantic/type-auditor.js.map +1 -1
- package/dist/rslang/semantic/typification-api.d.ts +4 -7
- package/dist/rslang/semantic/typification-api.js +162 -303
- package/dist/rslang/semantic/typification-api.js.map +1 -1
- package/dist/rslang/semantic/typification-parser.d.ts +2 -12
- package/dist/rslang/semantic/typification-parser.js +165 -219
- package/dist/rslang/semantic/typification-parser.js.map +1 -1
- package/dist/rslang/semantic/typification.d.ts +2 -119
- package/dist/rslang/semantic/typification.js +66 -52
- package/dist/rslang/semantic/typification.js.map +1 -1
- package/dist/rslang/semantic/value-auditor.d.ts +32 -38
- package/dist/rslang/semantic/value-auditor.js +206 -518
- package/dist/rslang/semantic/value-auditor.js.map +1 -1
- package/dist/rslang/semantic/value-class.d.ts +2 -10
- package/dist/rslang/semantic/value-class.js +8 -7
- package/dist/rslang/semantic/value-class.js.map +1 -1
- package/dist/rslang/typification-graph.d.ts +2 -33
- package/dist/rslang/typification-graph.js +94 -306
- package/dist/rslang/typification-graph.js.map +1 -1
- package/dist/shared/branded.d.ts +2 -7
- package/dist/shared/branded.js +1 -1
- package/dist/shared/hash.d.ts +2 -6
- package/dist/shared/hash.js +13 -13
- package/dist/shared/hash.js.map +1 -1
- package/dist/shared/index.d.ts +3 -2
- package/dist/shared/index.js +2 -18
- package/dist/token-DeXAmzwr.d.ts +81 -0
- package/dist/typification-Dk-fisgO.d.ts +120 -0
- package/dist/typification-graph-6HcZ-rKH.d.ts +30 -0
- package/dist/typification-parser-BBVx1RxP.d.ts +13 -0
- package/dist/value-B8UtCqaK.js +366 -0
- package/dist/value-B8UtCqaK.js.map +1 -0
- package/dist/value-CTjX6825.d.ts +33 -0
- package/dist/value-api-Bw-SgaYY.d.ts +49 -0
- package/dist/value-class-CNI-lqXJ.d.ts +12 -0
- package/package.json +8 -8
- package/src/library/oss-api.test.ts +76 -0
- package/src/library/oss-api.ts +4 -1
- package/src/library/rsform-api.test.ts +24 -0
- package/src/library/rsform-api.ts +12 -4
- package/dist/cctext/index.js.map +0 -1
- package/dist/graph/index.js.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/library/index.js.map +0 -1
- package/dist/library/oss-layout.js.map +0 -1
- package/dist/parsing/index.js.map +0 -1
- package/dist/rslang/eval/value-api.js.map +0 -1
- package/dist/rslang/eval/value.js.map +0 -1
- package/dist/rslang/index.js.map +0 -1
- package/dist/shared/branded.js.map +0 -1
- package/dist/shared/index.js.map +0 -1
package/dist/library/rsform.d.ts
CHANGED
|
@@ -1,206 +1,198 @@
|
|
|
1
|
-
import { Graph } from
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
import '../parsing/ast.js';
|
|
7
|
-
import '@lezer/common';
|
|
8
|
-
import '../rslang/error.js';
|
|
9
|
-
import '../rslang/semantic/value-class.js';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* Module: Models for formal representation for systems of concepts.
|
|
13
|
-
*/
|
|
14
|
-
|
|
1
|
+
import { t as Graph } from "../graph-DR8rL2o3.js";
|
|
2
|
+
import { i as LibraryItemReference, n as CurrentVersion, r as LibraryItem, s as VersionInfo } from "../library-CYun28Xz.js";
|
|
3
|
+
import { f as ExpressionType, y as TypePath } from "../typification-Dk-fisgO.js";
|
|
4
|
+
import { a as RSLangAnalyzer, t as AnalysisBase } from "../analyzer-DlSq3Y3r.js";
|
|
5
|
+
//#region src/library/rsform.d.ts
|
|
15
6
|
/** Represents {@link Constituenta} type. */
|
|
16
7
|
declare const CstType: {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
readonly NOMINAL: "nominal";
|
|
9
|
+
readonly BASE: "basic";
|
|
10
|
+
readonly STRUCTURED: "structure";
|
|
11
|
+
readonly TERM: "term";
|
|
12
|
+
readonly AXIOM: "axiom";
|
|
13
|
+
readonly FUNCTION: "function";
|
|
14
|
+
readonly PREDICATE: "predicate";
|
|
15
|
+
readonly CONSTANT: "constant";
|
|
16
|
+
readonly STATEMENT: "statement";
|
|
26
17
|
};
|
|
27
18
|
type CstType = (typeof CstType)[keyof typeof CstType];
|
|
28
19
|
/** Represents attribution of a {@link Constituenta} to another {@link Constituenta}. */
|
|
29
20
|
interface Attribution {
|
|
30
|
-
|
|
31
|
-
|
|
21
|
+
container: number;
|
|
22
|
+
attribute: number;
|
|
32
23
|
}
|
|
33
24
|
/** Represents global identifier type info. */
|
|
34
25
|
interface TypeInfo {
|
|
35
|
-
|
|
36
|
-
|
|
26
|
+
alias: string;
|
|
27
|
+
type: ExpressionType;
|
|
37
28
|
}
|
|
38
29
|
/** Represents function argument value. */
|
|
39
30
|
interface ArgumentValue {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
alias: string;
|
|
32
|
+
typification: string;
|
|
33
|
+
value?: string;
|
|
43
34
|
}
|
|
44
35
|
/** Represents Constituenta classification in terms of system of concepts. */
|
|
45
36
|
declare const CstClass: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
37
|
+
readonly NOMINAL: "nominal";
|
|
38
|
+
readonly BASIC: "basic";
|
|
39
|
+
readonly DERIVED: "derived";
|
|
40
|
+
readonly STATEMENT: "statement";
|
|
41
|
+
readonly TEMPLATE: "template";
|
|
51
42
|
};
|
|
52
43
|
type CstClass = (typeof CstClass)[keyof typeof CstClass];
|
|
53
44
|
/** Represents formal expression Status. */
|
|
54
45
|
declare const CstStatus: {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
46
|
+
readonly VERIFIED: "verified";
|
|
47
|
+
readonly INCORRECT: "incorrect";
|
|
48
|
+
readonly INCALCULABLE: "incalculable";
|
|
49
|
+
readonly PROPERTY: "property";
|
|
50
|
+
readonly UNKNOWN: "unknown";
|
|
60
51
|
};
|
|
61
52
|
type CstStatus = (typeof CstStatus)[keyof typeof CstStatus];
|
|
62
53
|
/** Represents substitution of {@link Constituenta}. */
|
|
63
54
|
interface Substitution {
|
|
64
|
-
|
|
65
|
-
|
|
55
|
+
original: number;
|
|
56
|
+
substitution: number;
|
|
66
57
|
}
|
|
67
58
|
/** Represents word form for natural language. */
|
|
68
59
|
interface TermForm {
|
|
69
|
-
|
|
70
|
-
|
|
60
|
+
text: string;
|
|
61
|
+
tags: string;
|
|
71
62
|
}
|
|
72
63
|
/** Represents Constituenta. */
|
|
73
64
|
interface Constituenta {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
65
|
+
id: number;
|
|
66
|
+
crucial: boolean;
|
|
67
|
+
alias: string;
|
|
68
|
+
convention: string;
|
|
69
|
+
cst_type: CstType;
|
|
70
|
+
definition_formal: string;
|
|
71
|
+
definition_raw: string;
|
|
72
|
+
definition_resolved: string;
|
|
73
|
+
term_raw: string;
|
|
74
|
+
term_resolved: string;
|
|
75
|
+
term_forms: TermForm[];
|
|
76
|
+
attributes: number[];
|
|
77
|
+
/** Manual typification of the constituent */
|
|
78
|
+
typification_manual: string;
|
|
79
|
+
/** Controls whether base concepts expose property values or full values */
|
|
80
|
+
value_is_property: boolean;
|
|
81
|
+
homonyms: number[];
|
|
82
|
+
formalDuplicates: number[];
|
|
83
|
+
analysis: AnalysisBase;
|
|
84
|
+
/** Typification used for dependents, model values, and display (manual when it overrides computed). */
|
|
85
|
+
effectiveType: ExpressionType | null;
|
|
86
|
+
/**
|
|
87
|
+
* True when manual typification is non-empty, parses to a type, and its label differs from the
|
|
88
|
+
* typification inferred from the formal definition ({@link Constituenta.analysis}.type).
|
|
89
|
+
*/
|
|
90
|
+
is_type_mismatch: boolean;
|
|
91
|
+
/** Identifier of {@link LibraryItem} containing this {@link Constituenta}. */
|
|
92
|
+
schema: number;
|
|
93
|
+
/** {@link CstClass} of this {@link Constituenta}. */
|
|
94
|
+
cst_class: CstClass;
|
|
95
|
+
/** {@link CstStatus} of this {@link Constituenta}. */
|
|
96
|
+
status: CstStatus;
|
|
97
|
+
/** Indicates if this {@link Constituenta} is a template. */
|
|
98
|
+
is_template: boolean;
|
|
99
|
+
/** Indicates if this {@link Constituenta} has a simple expression. */
|
|
100
|
+
is_simple_expression: boolean;
|
|
101
|
+
/** Index of {@link LibraryItem} that contains this cst (or inheritance parent).
|
|
102
|
+
* 0 - not inherited, 1 - inherited by 1st schema, 2 - inherited by 2nd schema, etc.
|
|
103
|
+
*/
|
|
104
|
+
parent_schema_index: number;
|
|
105
|
+
/** {@link LibraryItem} that contains parent of this inherited {@link Constituenta}. */
|
|
106
|
+
parent_schema: number | null;
|
|
107
|
+
/** Indicates if this {@link Constituenta} is inherited. */
|
|
108
|
+
is_inherited: boolean;
|
|
109
|
+
/** Indicates if this {@link Constituenta} has children that are inherited. */
|
|
110
|
+
has_inherited_children: boolean;
|
|
111
|
+
/** {@link Constituenta} that spawned this one. */
|
|
112
|
+
spawner?: number;
|
|
113
|
+
/** Alias of {@link Constituenta} that spawned this one. */
|
|
114
|
+
spawner_alias?: string;
|
|
115
|
+
/** Structure path that spawned this one. */
|
|
116
|
+
spawner_path?: TypePath;
|
|
117
|
+
/** List of {@link Constituenta} that are spawned by this one. */
|
|
118
|
+
spawn: number[];
|
|
119
|
+
/** List of aliases of {@link Constituenta} that are spawned by this one. */
|
|
120
|
+
spawn_alias: string[];
|
|
130
121
|
}
|
|
131
122
|
/** Represents {@link RSForm} statistics. */
|
|
132
123
|
interface RSFormStats {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
124
|
+
step_complexity: number;
|
|
125
|
+
/** Total number of constituents in the RSForm. */
|
|
126
|
+
count_all: number;
|
|
127
|
+
/** Number of crucial constituents in the RSForm. */
|
|
128
|
+
count_crucial: number;
|
|
129
|
+
count_problematic: number;
|
|
130
|
+
/** Constituents that have same term. */
|
|
131
|
+
count_homonyms: number;
|
|
132
|
+
/** Constituents that have same formal definition and term. */
|
|
133
|
+
count_formal_duplicates: number;
|
|
134
|
+
/** Base constituents with no convention and alias. */
|
|
135
|
+
count_missing_convention: number;
|
|
136
|
+
/** Constituents with non-empty manual typification that disagrees with inferred typification. */
|
|
137
|
+
count_type_mismatch: number;
|
|
138
|
+
count_incorrect: number;
|
|
139
|
+
count_property: number;
|
|
140
|
+
count_incalculable: number;
|
|
141
|
+
count_inherited: number;
|
|
142
|
+
count_text_term: number;
|
|
143
|
+
count_definition: number;
|
|
144
|
+
count_convention: number;
|
|
145
|
+
count_comment: number;
|
|
146
|
+
count_base: number;
|
|
147
|
+
count_constant: number;
|
|
148
|
+
count_structured: number;
|
|
149
|
+
count_axiom: number;
|
|
150
|
+
count_term: number;
|
|
151
|
+
count_function: number;
|
|
152
|
+
count_predicate: number;
|
|
153
|
+
count_statement: number;
|
|
154
|
+
count_nominal: number;
|
|
164
155
|
}
|
|
165
156
|
/** Represents inheritance data for {@link RSForm}. */
|
|
166
157
|
interface InheritanceInfo {
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
158
|
+
child: number;
|
|
159
|
+
child_source: number;
|
|
160
|
+
parent: number;
|
|
161
|
+
parent_source: number;
|
|
171
162
|
}
|
|
172
163
|
/** Represents formal explication for set of concepts. */
|
|
173
164
|
interface RSForm extends LibraryItem {
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
165
|
+
/** Whether this RSForm was produced (vs imported or inherited) */
|
|
166
|
+
is_produced: boolean;
|
|
167
|
+
/** Whether this RSForm has attribution feature */
|
|
168
|
+
is_attributive: boolean;
|
|
169
|
+
/** List of user IDs who can edit this RSForm */
|
|
170
|
+
editors: number[];
|
|
171
|
+
/** Information about the current version of this RSForm */
|
|
172
|
+
version: CurrentVersion;
|
|
173
|
+
/** Full version history of this RSForm */
|
|
174
|
+
versions: VersionInfo[];
|
|
175
|
+
/** Full list of constituents in the RSForm */
|
|
176
|
+
items: Constituenta[];
|
|
177
|
+
/** List of inheritance relationships between constituents */
|
|
178
|
+
inheritance: InheritanceInfo[];
|
|
179
|
+
/** List of constituent attribution relationships */
|
|
180
|
+
attribution: Attribution[];
|
|
181
|
+
/** References to Operational Schemes/Systems associated with the RSForm */
|
|
182
|
+
oss: LibraryItemReference[];
|
|
183
|
+
/** References to conceptual models associated with the RSForm */
|
|
184
|
+
models: LibraryItemReference[];
|
|
185
|
+
/** Analyzer instance for RS language features and validation */
|
|
186
|
+
analyzer: RSLangAnalyzer;
|
|
187
|
+
/** Graph structure representing formal dependencies between constituents */
|
|
188
|
+
graph: Graph;
|
|
189
|
+
/** Graph structure representing attribution relationships */
|
|
190
|
+
attribution_graph: Graph;
|
|
191
|
+
/** Map for quick lookup of constituents by alias */
|
|
192
|
+
cstByAlias: Map<string, Constituenta>;
|
|
193
|
+
/** Map for quick lookup of constituents by ID */
|
|
194
|
+
cstByID: Map<number, Constituenta>;
|
|
204
195
|
}
|
|
205
|
-
|
|
206
|
-
export {
|
|
196
|
+
//#endregion
|
|
197
|
+
export { ArgumentValue, Attribution, Constituenta, CstClass, CstStatus, CstType, RSForm, RSFormStats, Substitution, TypeInfo };
|
|
198
|
+
//# sourceMappingURL=rsform.d.ts.map
|
package/dist/library/rsform.js
CHANGED
|
@@ -1,32 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
//#region src/library/rsform.ts
|
|
2
|
+
/** Represents {@link Constituenta} type. */
|
|
3
|
+
const CstType = {
|
|
4
|
+
NOMINAL: "nominal",
|
|
5
|
+
BASE: "basic",
|
|
6
|
+
STRUCTURED: "structure",
|
|
7
|
+
TERM: "term",
|
|
8
|
+
AXIOM: "axiom",
|
|
9
|
+
FUNCTION: "function",
|
|
10
|
+
PREDICATE: "predicate",
|
|
11
|
+
CONSTANT: "constant",
|
|
12
|
+
STATEMENT: "statement"
|
|
12
13
|
};
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
/** Represents Constituenta classification in terms of system of concepts. */
|
|
15
|
+
const CstClass = {
|
|
16
|
+
NOMINAL: "nominal",
|
|
17
|
+
BASIC: "basic",
|
|
18
|
+
DERIVED: "derived",
|
|
19
|
+
STATEMENT: "statement",
|
|
20
|
+
TEMPLATE: "template"
|
|
19
21
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
export {
|
|
28
|
-
CstClass,
|
|
29
|
-
CstStatus,
|
|
30
|
-
CstType
|
|
22
|
+
/** Represents formal expression Status. */
|
|
23
|
+
const CstStatus = {
|
|
24
|
+
VERIFIED: "verified",
|
|
25
|
+
INCORRECT: "incorrect",
|
|
26
|
+
INCALCULABLE: "incalculable",
|
|
27
|
+
PROPERTY: "property",
|
|
28
|
+
UNKNOWN: "unknown"
|
|
31
29
|
};
|
|
30
|
+
//#endregion
|
|
31
|
+
export { CstClass, CstStatus, CstType };
|
|
32
|
+
|
|
32
33
|
//# sourceMappingURL=rsform.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/library/rsform.ts"],"sourcesContent":["/**\n * Module: Models for formal representation for systems of concepts.\n */\n\nimport { type Graph } from '../graph';\nimport { type AnalysisBase, type ExpressionType, type RSLangAnalyzer, type TypePath } from '../rslang';\n\nimport { type CurrentVersion, type LibraryItem, type LibraryItemReference, type VersionInfo } from './library';\n\n/** Represents {@link Constituenta} type. */\nexport const CstType = {\n NOMINAL: 'nominal',\n BASE: 'basic',\n STRUCTURED: 'structure',\n TERM: 'term',\n AXIOM: 'axiom',\n FUNCTION: 'function',\n PREDICATE: 'predicate',\n CONSTANT: 'constant',\n STATEMENT: 'statement'\n} as const;\nexport type CstType = (typeof CstType)[keyof typeof CstType];\n\n/** Represents attribution of a {@link Constituenta} to another {@link Constituenta}. */\nexport interface Attribution {\n container: number;\n attribute: number;\n}\n\n/** Represents global identifier type info. */\nexport interface TypeInfo {\n alias: string;\n type: ExpressionType;\n}\n\n/** Represents function argument value. */\nexport interface ArgumentValue {\n alias: string;\n typification: string;\n value?: string;\n}\n\n/** Represents Constituenta classification in terms of system of concepts. */\nexport const CstClass = {\n NOMINAL: 'nominal',\n BASIC: 'basic',\n DERIVED: 'derived',\n STATEMENT: 'statement',\n TEMPLATE: 'template'\n} as const;\nexport type CstClass = (typeof CstClass)[keyof typeof CstClass];\n\n/** Represents formal expression Status. */\nexport const CstStatus = {\n VERIFIED: 'verified',\n INCORRECT: 'incorrect',\n INCALCULABLE: 'incalculable',\n PROPERTY: 'property',\n UNKNOWN: 'unknown'\n} as const;\nexport type CstStatus = (typeof CstStatus)[keyof typeof CstStatus];\n\n/** Represents substitution of {@link Constituenta}. */\nexport interface Substitution {\n original: number;\n substitution: number;\n}\n\n/** Represents word form for natural language. */\ninterface TermForm {\n text: string;\n tags: string;\n}\n\n/** Represents Constituenta. */\nexport interface Constituenta {\n id: number;\n crucial: boolean;\n alias: string;\n convention: string;\n cst_type: CstType;\n definition_formal: string;\n definition_raw: string;\n definition_resolved: string;\n term_raw: string;\n term_resolved: string;\n term_forms: TermForm[];\n attributes: number[];\n\n /** Manual typification of the constituent */\n typification_manual: string;\n\n /** Controls whether base concepts expose property values or full values */\n value_is_property: boolean;\n\n homonyms: number[];\n formalDuplicates: number[];\n analysis: AnalysisBase;\n\n /** Typification used for dependents, model values, and display (manual when it overrides computed). */\n effectiveType: ExpressionType | null;\n\n /**\n * True when manual typification is non-empty, parses to a type, and its label differs from the\n * typification inferred from the formal definition ({@link Constituenta.analysis}.type).\n */\n is_type_mismatch: boolean;\n\n /** Identifier of {@link LibraryItem} containing this {@link Constituenta}. */\n schema: number;\n\n /** {@link CstClass} of this {@link Constituenta}. */\n cst_class: CstClass;\n /** {@link CstStatus} of this {@link Constituenta}. */\n status: CstStatus;\n\n /** Indicates if this {@link Constituenta} is a template. */\n is_template: boolean;\n /** Indicates if this {@link Constituenta} has a simple expression. */\n is_simple_expression: boolean;\n\n /** Index of {@link LibraryItem} that contains this cst (or inheritance parent).\n * 0 - not inherited, 1 - inherited by 1st schema, 2 - inherited by 2nd schema, etc.\n */\n parent_schema_index: number;\n /** {@link LibraryItem} that contains parent of this inherited {@link Constituenta}. */\n parent_schema: number | null;\n /** Indicates if this {@link Constituenta} is inherited. */\n is_inherited: boolean;\n /** Indicates if this {@link Constituenta} has children that are inherited. */\n has_inherited_children: boolean;\n\n /** {@link Constituenta} that spawned this one. */\n spawner?: number;\n /** Alias of {@link Constituenta} that spawned this one. */\n spawner_alias?: string;\n /** Structure path that spawned this one. */\n spawner_path?: TypePath;\n\n /** List of {@link Constituenta} that are spawned by this one. */\n spawn: number[];\n /** List of aliases of {@link Constituenta} that are spawned by this one. */\n spawn_alias: string[];\n}\n\n/** Represents {@link RSForm} statistics. */\nexport interface RSFormStats {\n step_complexity: number;\n\n /** Total number of constituents in the RSForm. */\n count_all: number;\n /** Number of crucial constituents in the RSForm. */\n count_crucial: number;\n\n count_problematic: number;\n /** Constituents that have same term. */\n count_homonyms: number;\n /** Constituents that have same formal definition and term. */\n count_formal_duplicates: number;\n /** Base constituents with no convention and alias. */\n count_missing_convention: number;\n /** Constituents with non-empty manual typification that disagrees with inferred typification. */\n count_type_mismatch: number;\n\n count_incorrect: number;\n count_property: number;\n count_incalculable: number;\n count_inherited: number;\n\n count_text_term: number;\n count_definition: number;\n count_convention: number;\n count_comment: number;\n\n count_base: number;\n count_constant: number;\n count_structured: number;\n count_axiom: number;\n count_term: number;\n count_function: number;\n count_predicate: number;\n count_statement: number;\n count_nominal: number;\n}\n\n/** Represents inheritance data for {@link RSForm}. */\ninterface InheritanceInfo {\n child: number;\n child_source: number;\n parent: number;\n parent_source: number;\n}\n\n/** Represents formal explication for set of concepts. */\nexport interface RSForm extends LibraryItem {\n /** Whether this RSForm was produced (vs imported or inherited) */\n is_produced: boolean;\n /** Whether this RSForm has attribution feature */\n is_attributive: boolean;\n /** List of user IDs who can edit this RSForm */\n editors: number[];\n /** Information about the current version of this RSForm */\n version: CurrentVersion;\n /** Full version history of this RSForm */\n versions: VersionInfo[];\n\n /** Full list of constituents in the RSForm */\n items: Constituenta[];\n /** List of inheritance relationships between constituents */\n inheritance: InheritanceInfo[];\n /** List of constituent attribution relationships */\n attribution: Attribution[];\n /** References to Operational Schemes/Systems associated with the RSForm */\n oss: LibraryItemReference[];\n /** References to conceptual models associated with the RSForm */\n models: LibraryItemReference[];\n\n /** Analyzer instance for RS language features and validation */\n analyzer: RSLangAnalyzer;\n /** Graph structure representing formal dependencies between constituents */\n graph: Graph;\n /** Graph structure representing attribution relationships */\n attribution_graph: Graph;\n /** Map for quick lookup of constituents by alias */\n cstByAlias: Map<string, Constituenta>;\n /** Map for quick lookup of constituents by ID */\n cstByID: Map<number, Constituenta>;\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"rsform.js","names":[],"sources":["../../src/library/rsform.ts"],"sourcesContent":["/**\n * Module: Models for formal representation for systems of concepts.\n */\n\nimport { type Graph } from '../graph';\nimport { type AnalysisBase, type ExpressionType, type RSLangAnalyzer, type TypePath } from '../rslang';\n\nimport { type CurrentVersion, type LibraryItem, type LibraryItemReference, type VersionInfo } from './library';\n\n/** Represents {@link Constituenta} type. */\nexport const CstType = {\n NOMINAL: 'nominal',\n BASE: 'basic',\n STRUCTURED: 'structure',\n TERM: 'term',\n AXIOM: 'axiom',\n FUNCTION: 'function',\n PREDICATE: 'predicate',\n CONSTANT: 'constant',\n STATEMENT: 'statement'\n} as const;\nexport type CstType = (typeof CstType)[keyof typeof CstType];\n\n/** Represents attribution of a {@link Constituenta} to another {@link Constituenta}. */\nexport interface Attribution {\n container: number;\n attribute: number;\n}\n\n/** Represents global identifier type info. */\nexport interface TypeInfo {\n alias: string;\n type: ExpressionType;\n}\n\n/** Represents function argument value. */\nexport interface ArgumentValue {\n alias: string;\n typification: string;\n value?: string;\n}\n\n/** Represents Constituenta classification in terms of system of concepts. */\nexport const CstClass = {\n NOMINAL: 'nominal',\n BASIC: 'basic',\n DERIVED: 'derived',\n STATEMENT: 'statement',\n TEMPLATE: 'template'\n} as const;\nexport type CstClass = (typeof CstClass)[keyof typeof CstClass];\n\n/** Represents formal expression Status. */\nexport const CstStatus = {\n VERIFIED: 'verified',\n INCORRECT: 'incorrect',\n INCALCULABLE: 'incalculable',\n PROPERTY: 'property',\n UNKNOWN: 'unknown'\n} as const;\nexport type CstStatus = (typeof CstStatus)[keyof typeof CstStatus];\n\n/** Represents substitution of {@link Constituenta}. */\nexport interface Substitution {\n original: number;\n substitution: number;\n}\n\n/** Represents word form for natural language. */\ninterface TermForm {\n text: string;\n tags: string;\n}\n\n/** Represents Constituenta. */\nexport interface Constituenta {\n id: number;\n crucial: boolean;\n alias: string;\n convention: string;\n cst_type: CstType;\n definition_formal: string;\n definition_raw: string;\n definition_resolved: string;\n term_raw: string;\n term_resolved: string;\n term_forms: TermForm[];\n attributes: number[];\n\n /** Manual typification of the constituent */\n typification_manual: string;\n\n /** Controls whether base concepts expose property values or full values */\n value_is_property: boolean;\n\n homonyms: number[];\n formalDuplicates: number[];\n analysis: AnalysisBase;\n\n /** Typification used for dependents, model values, and display (manual when it overrides computed). */\n effectiveType: ExpressionType | null;\n\n /**\n * True when manual typification is non-empty, parses to a type, and its label differs from the\n * typification inferred from the formal definition ({@link Constituenta.analysis}.type).\n */\n is_type_mismatch: boolean;\n\n /** Identifier of {@link LibraryItem} containing this {@link Constituenta}. */\n schema: number;\n\n /** {@link CstClass} of this {@link Constituenta}. */\n cst_class: CstClass;\n /** {@link CstStatus} of this {@link Constituenta}. */\n status: CstStatus;\n\n /** Indicates if this {@link Constituenta} is a template. */\n is_template: boolean;\n /** Indicates if this {@link Constituenta} has a simple expression. */\n is_simple_expression: boolean;\n\n /** Index of {@link LibraryItem} that contains this cst (or inheritance parent).\n * 0 - not inherited, 1 - inherited by 1st schema, 2 - inherited by 2nd schema, etc.\n */\n parent_schema_index: number;\n /** {@link LibraryItem} that contains parent of this inherited {@link Constituenta}. */\n parent_schema: number | null;\n /** Indicates if this {@link Constituenta} is inherited. */\n is_inherited: boolean;\n /** Indicates if this {@link Constituenta} has children that are inherited. */\n has_inherited_children: boolean;\n\n /** {@link Constituenta} that spawned this one. */\n spawner?: number;\n /** Alias of {@link Constituenta} that spawned this one. */\n spawner_alias?: string;\n /** Structure path that spawned this one. */\n spawner_path?: TypePath;\n\n /** List of {@link Constituenta} that are spawned by this one. */\n spawn: number[];\n /** List of aliases of {@link Constituenta} that are spawned by this one. */\n spawn_alias: string[];\n}\n\n/** Represents {@link RSForm} statistics. */\nexport interface RSFormStats {\n step_complexity: number;\n\n /** Total number of constituents in the RSForm. */\n count_all: number;\n /** Number of crucial constituents in the RSForm. */\n count_crucial: number;\n\n count_problematic: number;\n /** Constituents that have same term. */\n count_homonyms: number;\n /** Constituents that have same formal definition and term. */\n count_formal_duplicates: number;\n /** Base constituents with no convention and alias. */\n count_missing_convention: number;\n /** Constituents with non-empty manual typification that disagrees with inferred typification. */\n count_type_mismatch: number;\n\n count_incorrect: number;\n count_property: number;\n count_incalculable: number;\n count_inherited: number;\n\n count_text_term: number;\n count_definition: number;\n count_convention: number;\n count_comment: number;\n\n count_base: number;\n count_constant: number;\n count_structured: number;\n count_axiom: number;\n count_term: number;\n count_function: number;\n count_predicate: number;\n count_statement: number;\n count_nominal: number;\n}\n\n/** Represents inheritance data for {@link RSForm}. */\ninterface InheritanceInfo {\n child: number;\n child_source: number;\n parent: number;\n parent_source: number;\n}\n\n/** Represents formal explication for set of concepts. */\nexport interface RSForm extends LibraryItem {\n /** Whether this RSForm was produced (vs imported or inherited) */\n is_produced: boolean;\n /** Whether this RSForm has attribution feature */\n is_attributive: boolean;\n /** List of user IDs who can edit this RSForm */\n editors: number[];\n /** Information about the current version of this RSForm */\n version: CurrentVersion;\n /** Full version history of this RSForm */\n versions: VersionInfo[];\n\n /** Full list of constituents in the RSForm */\n items: Constituenta[];\n /** List of inheritance relationships between constituents */\n inheritance: InheritanceInfo[];\n /** List of constituent attribution relationships */\n attribution: Attribution[];\n /** References to Operational Schemes/Systems associated with the RSForm */\n oss: LibraryItemReference[];\n /** References to conceptual models associated with the RSForm */\n models: LibraryItemReference[];\n\n /** Analyzer instance for RS language features and validation */\n analyzer: RSLangAnalyzer;\n /** Graph structure representing formal dependencies between constituents */\n graph: Graph;\n /** Graph structure representing attribution relationships */\n attribution_graph: Graph;\n /** Map for quick lookup of constituents by alias */\n cstByAlias: Map<string, Constituenta>;\n /** Map for quick lookup of constituents by ID */\n cstByID: Map<number, Constituenta>;\n}\n"],"mappings":";;AAUA,MAAa,UAAU;CACrB,SAAS;CACT,MAAM;CACN,YAAY;CACZ,MAAM;CACN,OAAO;CACP,UAAU;CACV,WAAW;CACX,UAAU;CACV,WAAW;AACb;;AAuBA,MAAa,WAAW;CACtB,SAAS;CACT,OAAO;CACP,SAAS;CACT,WAAW;CACX,UAAU;AACZ;;AAIA,MAAa,YAAY;CACvB,UAAU;CACV,WAAW;CACX,cAAc;CACd,UAAU;CACV,SAAS;AACX"}
|
|
@@ -1,18 +1,10 @@
|
|
|
1
|
-
import { Typification, ExpressionType } from
|
|
2
|
-
import { Value, ValuePath } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import '../shared/branded.js';
|
|
7
|
-
import '../parsing/ast.js';
|
|
8
|
-
import '@lezer/common';
|
|
9
|
-
import '../rslang/eval/calculator.js';
|
|
10
|
-
import '../rslang/error.js';
|
|
11
|
-
import '../graph/graph.js';
|
|
12
|
-
import '../rslang/semantic/analyzer.js';
|
|
13
|
-
import '../rslang/semantic/value-class.js';
|
|
14
|
-
import './library.js';
|
|
1
|
+
import { b as Typification, f as ExpressionType } from "../typification-Dk-fisgO.js";
|
|
2
|
+
import { c as Value, u as ValuePath } from "../value-CTjX6825.js";
|
|
3
|
+
import { Constituenta, CstType, RSForm } from "./rsform.js";
|
|
4
|
+
import { BasicBinding, EvalStatus, RSModelStats } from "./rsmodel.js";
|
|
5
|
+
import { RSEngine } from "./rsengine.js";
|
|
15
6
|
|
|
7
|
+
//#region src/library/rsmodel-api.d.ts
|
|
16
8
|
/** Evaluate if parsed data is a basic binding data. */
|
|
17
9
|
declare function validateBasicBindingData(data: unknown): data is Record<string, string>;
|
|
18
10
|
/** Convert parsed data to a basic binding. */
|
|
@@ -39,5 +31,6 @@ declare function tryFixValue(value: Value, type: ExpressionType, targetAlias: st
|
|
|
39
31
|
declare function updateValueElement(value: Value | null, path: ValuePath, newValue: number): Value | null;
|
|
40
32
|
declare function deleteValueElement(value: Value | null, path: ValuePath, type: Typification, target: number): Value | null;
|
|
41
33
|
declare function addValueElement(value: Value | null, path: ValuePath, type: Typification, currentType: Typification): Value | null;
|
|
42
|
-
|
|
34
|
+
//#endregion
|
|
43
35
|
export { addValueElement, calculateModelStats, deleteValueElement, generateRandomValue, inferEvalStatus, isInferrable, isInterpretable, isModelIssue, toBasicBinding, tryFixValue, updateValueElement, validateBasicBindingData, validateValueData };
|
|
36
|
+
//# sourceMappingURL=rsmodel-api.d.ts.map
|