@polintpro/proposit-core 0.2.11 → 0.4.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 +14 -525
- package/dist/cli/commands/diff.js +1 -1
- package/dist/cli/commands/diff.js.map +1 -1
- package/dist/cli/commands/premises.js +2 -2
- package/dist/cli/commands/premises.js.map +1 -1
- package/dist/cli/commands/sources.d.ts +3 -0
- package/dist/cli/commands/sources.d.ts.map +1 -0
- package/dist/cli/commands/sources.js +175 -0
- package/dist/cli/commands/sources.js.map +1 -0
- package/dist/cli/commands/{versionShow.d.ts → version-show.d.ts} +1 -1
- package/dist/cli/commands/version-show.d.ts.map +1 -0
- package/dist/cli/commands/{versionShow.js → version-show.js} +1 -1
- package/dist/cli/commands/version-show.js.map +1 -0
- package/dist/cli/config.d.ts +2 -0
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +6 -0
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/engine.d.ts +1 -1
- package/dist/cli/engine.d.ts.map +1 -1
- package/dist/cli/engine.js +40 -2
- package/dist/cli/engine.js.map +1 -1
- package/dist/cli/import.d.ts +1 -1
- package/dist/cli/import.d.ts.map +1 -1
- package/dist/cli/import.js +1 -1
- package/dist/cli/import.js.map +1 -1
- package/dist/cli/output/{diffRenderer.d.ts → diff-renderer.d.ts} +1 -1
- package/dist/cli/output/diff-renderer.d.ts.map +1 -0
- package/dist/cli/output/{diffRenderer.js → diff-renderer.js} +1 -1
- package/dist/cli/output/diff-renderer.js.map +1 -0
- package/dist/cli/schemata.d.ts +8 -0
- package/dist/cli/schemata.d.ts.map +1 -1
- package/dist/cli/schemata.js +10 -0
- package/dist/cli/schemata.js.map +1 -1
- package/dist/cli/storage/sources.d.ts +11 -0
- package/dist/cli/storage/sources.d.ts.map +1 -0
- package/dist/cli/storage/sources.js +105 -0
- package/dist/cli/storage/sources.js.map +1 -0
- package/dist/cli.js +3 -1
- package/dist/cli.js.map +1 -1
- package/dist/extensions/ieee/index.d.ts +3 -0
- package/dist/extensions/ieee/index.d.ts.map +1 -0
- package/dist/extensions/ieee/index.js +3 -0
- package/dist/extensions/ieee/index.js.map +1 -0
- package/dist/extensions/ieee/references.d.ts +620 -0
- package/dist/extensions/ieee/references.d.ts.map +1 -0
- package/dist/extensions/ieee/references.js +450 -0
- package/dist/extensions/ieee/references.js.map +1 -0
- package/dist/extensions/ieee/source.d.ts +286 -0
- package/dist/extensions/ieee/source.d.ts.map +1 -0
- package/dist/extensions/ieee/source.js +12 -0
- package/dist/extensions/ieee/source.js.map +1 -0
- package/dist/lib/consts.d.ts.map +1 -1
- package/dist/lib/consts.js +19 -0
- package/dist/lib/consts.js.map +1 -1
- package/dist/lib/core/argument-engine.d.ts +134 -0
- package/dist/lib/core/argument-engine.d.ts.map +1 -0
- package/dist/lib/core/{argumentEngine.js → argument-engine.js} +303 -120
- package/dist/lib/core/argument-engine.js.map +1 -0
- package/dist/lib/core/{changeCollector.d.ts → change-collector.d.ts} +13 -3
- package/dist/lib/core/change-collector.d.ts.map +1 -0
- package/dist/lib/core/{changeCollector.js → change-collector.js} +28 -1
- package/dist/lib/core/change-collector.js.map +1 -0
- package/dist/lib/core/diff.d.ts +9 -3
- package/dist/lib/core/diff.d.ts.map +1 -1
- package/dist/lib/core/diff.js +58 -0
- package/dist/lib/core/diff.js.map +1 -1
- package/dist/lib/core/{expressionManager.d.ts → expression-manager.d.ts} +24 -3
- package/dist/lib/core/expression-manager.d.ts.map +1 -0
- package/dist/lib/core/{expressionManager.js → expression-manager.js} +104 -1
- package/dist/lib/core/expression-manager.js.map +1 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts +334 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.js +2 -0
- package/dist/lib/core/interfaces/argument-engine.interfaces.js.map +1 -0
- package/dist/lib/core/interfaces/index.d.ts +5 -0
- package/dist/lib/core/interfaces/index.d.ts.map +1 -0
- package/dist/lib/core/interfaces/index.js +2 -0
- package/dist/lib/core/interfaces/index.js.map +1 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts +317 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.js +2 -0
- package/dist/lib/core/interfaces/premise-engine.interfaces.js.map +1 -0
- package/dist/lib/core/interfaces/shared.interfaces.d.ts +24 -0
- package/dist/lib/core/interfaces/shared.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/shared.interfaces.js +2 -0
- package/dist/lib/core/interfaces/shared.interfaces.js.map +1 -0
- package/dist/lib/core/interfaces/source-management.interfaces.d.ts +110 -0
- package/dist/lib/core/interfaces/source-management.interfaces.d.ts.map +1 -0
- package/dist/lib/core/interfaces/source-management.interfaces.js +2 -0
- package/dist/lib/core/interfaces/source-management.interfaces.js.map +1 -0
- package/dist/lib/core/parser/formula.d.ts +9 -9
- package/dist/lib/core/parser/formula.d.ts.map +1 -1
- package/dist/lib/core/parser/formula.js.map +1 -1
- package/dist/lib/core/premise-engine.d.ts +83 -0
- package/dist/lib/core/premise-engine.d.ts.map +1 -0
- package/dist/lib/core/{premiseEngine.js → premise-engine.js} +130 -134
- package/dist/lib/core/premise-engine.js.map +1 -0
- package/dist/lib/core/relationships.d.ts +2 -2
- package/dist/lib/core/relationships.d.ts.map +1 -1
- package/dist/lib/core/relationships.js.map +1 -1
- package/dist/lib/core/source-manager.d.ts +109 -0
- package/dist/lib/core/source-manager.d.ts.map +1 -0
- package/dist/lib/core/source-manager.js +420 -0
- package/dist/lib/core/source-manager.js.map +1 -0
- package/dist/lib/core/{variableManager.d.ts → variable-manager.d.ts} +2 -2
- package/dist/lib/core/variable-manager.d.ts.map +1 -0
- package/dist/lib/core/{variableManager.js → variable-manager.js} +1 -1
- package/dist/lib/core/variable-manager.js.map +1 -0
- package/dist/lib/index.d.ts +12 -9
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +4 -3
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/schemata/index.d.ts +1 -0
- package/dist/lib/schemata/index.d.ts.map +1 -1
- package/dist/lib/schemata/index.js +1 -0
- package/dist/lib/schemata/index.js.map +1 -1
- package/dist/lib/schemata/shared.d.ts +9 -9
- package/dist/lib/schemata/shared.d.ts.map +1 -1
- package/dist/lib/schemata/shared.js +4 -4
- package/dist/lib/schemata/shared.js.map +1 -1
- package/dist/lib/schemata/source.d.ts +28 -0
- package/dist/lib/schemata/source.d.ts.map +1 -0
- package/dist/lib/schemata/source.js +35 -0
- package/dist/lib/schemata/source.js.map +1 -0
- package/dist/lib/types/checksum.d.ts +6 -0
- package/dist/lib/types/checksum.d.ts.map +1 -1
- package/dist/lib/types/diff.d.ts +9 -3
- package/dist/lib/types/diff.d.ts.map +1 -1
- package/dist/lib/types/evaluation.d.ts +1 -1
- package/dist/lib/types/evaluation.d.ts.map +1 -1
- package/dist/lib/types/mutation.d.ts +7 -3
- package/dist/lib/types/mutation.d.ts.map +1 -1
- package/dist/lib/types/reactive.d.ts +5 -2
- package/dist/lib/types/reactive.d.ts.map +1 -1
- package/dist/lib/utils/{defaultMap.d.ts → default-map.d.ts} +3 -3
- package/dist/lib/utils/default-map.d.ts.map +1 -0
- package/dist/lib/utils/{defaultMap.js → default-map.js} +1 -1
- package/dist/lib/utils/default-map.js.map +1 -0
- package/package.json +6 -1
- package/dist/cli/commands/versionShow.d.ts.map +0 -1
- package/dist/cli/commands/versionShow.js.map +0 -1
- package/dist/cli/output/diffRenderer.d.ts.map +0 -1
- package/dist/cli/output/diffRenderer.js.map +0 -1
- package/dist/lib/core/argumentEngine.d.ts +0 -226
- package/dist/lib/core/argumentEngine.d.ts.map +0 -1
- package/dist/lib/core/argumentEngine.js.map +0 -1
- package/dist/lib/core/changeCollector.d.ts.map +0 -1
- package/dist/lib/core/changeCollector.js.map +0 -1
- package/dist/lib/core/expressionManager.d.ts.map +0 -1
- package/dist/lib/core/expressionManager.js.map +0 -1
- package/dist/lib/core/premiseEngine.d.ts +0 -202
- package/dist/lib/core/premiseEngine.d.ts.map +0 -1
- package/dist/lib/core/premiseEngine.js.map +0 -1
- package/dist/lib/core/variableManager.d.ts.map +0 -1
- package/dist/lib/core/variableManager.js.map +0 -1
- package/dist/lib/utils/defaultMap.d.ts.map +0 -1
- package/dist/lib/utils/defaultMap.js.map +0 -1
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable, TCoreSource, TCoreExpressionSourceAssociation } from "../../schemata/index.js";
|
|
2
|
+
import type { TCoreExpressionAssignment, TCorePremiseEvaluationResult, TCoreValidationResult } from "../../types/evaluation.js";
|
|
3
|
+
import type { TCoreMutationResult } from "../../types/mutation.js";
|
|
4
|
+
import type { TExpressionInput, TExpressionWithoutPosition, TExpressionUpdate } from "../expression-manager.js";
|
|
5
|
+
import type { TPremiseEngineSnapshot } from "../premise-engine.js";
|
|
6
|
+
/**
|
|
7
|
+
* Single-premise expression tree mutations.
|
|
8
|
+
*/
|
|
9
|
+
export interface TExpressionMutations<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TSource extends TCoreSource = TCoreSource> {
|
|
10
|
+
/**
|
|
11
|
+
* Adds an expression to this premise's tree.
|
|
12
|
+
*
|
|
13
|
+
* If the expression has `parentId: null` it becomes the root; only one
|
|
14
|
+
* root is permitted per premise. All structural rules (`implies`/`iff`
|
|
15
|
+
* root-only, child limits, position uniqueness) are enforced.
|
|
16
|
+
*
|
|
17
|
+
* @param expression - The expression to add, including position and
|
|
18
|
+
* parent assignment.
|
|
19
|
+
* @returns The added expression (with checksum) and changeset.
|
|
20
|
+
* @throws If the premise already has a root expression and this one is
|
|
21
|
+
* also a root.
|
|
22
|
+
* @throws If the expression's parent does not exist in this premise.
|
|
23
|
+
* @throws If the expression is a variable reference and the variable
|
|
24
|
+
* has not been registered.
|
|
25
|
+
*/
|
|
26
|
+
addExpression(expression: TExpressionInput<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
27
|
+
/**
|
|
28
|
+
* Adds an expression as the last child of the given parent, with
|
|
29
|
+
* position computed automatically. If `parentId` is `null`, the
|
|
30
|
+
* expression becomes the root.
|
|
31
|
+
*
|
|
32
|
+
* @param parentId - The parent expression ID, or `null` for root.
|
|
33
|
+
* @param expression - The expression to add (position is auto-assigned).
|
|
34
|
+
* @returns The added expression (with checksum) and changeset.
|
|
35
|
+
* @throws If the premise already has a root and `parentId` is `null`.
|
|
36
|
+
* @throws If the expression is a variable reference and the variable
|
|
37
|
+
* has not been registered.
|
|
38
|
+
*/
|
|
39
|
+
appendExpression(parentId: string | null, expression: TExpressionWithoutPosition<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
40
|
+
/**
|
|
41
|
+
* Adds an expression immediately before or after an existing sibling,
|
|
42
|
+
* with position computed automatically.
|
|
43
|
+
*
|
|
44
|
+
* @param siblingId - The ID of the existing sibling expression.
|
|
45
|
+
* @param relativePosition - Whether to insert `"before"` or `"after"`
|
|
46
|
+
* the sibling.
|
|
47
|
+
* @param expression - The expression to add (position is auto-assigned).
|
|
48
|
+
* @returns The added expression (with checksum) and changeset.
|
|
49
|
+
* @throws If the sibling does not exist in this premise.
|
|
50
|
+
* @throws If the expression is a variable reference and the variable
|
|
51
|
+
* has not been registered.
|
|
52
|
+
*/
|
|
53
|
+
addExpressionRelative(siblingId: string, relativePosition: "before" | "after", expression: TExpressionWithoutPosition<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
54
|
+
/**
|
|
55
|
+
* Updates mutable fields of an existing expression. Only `position`,
|
|
56
|
+
* `variableId`, and `operator` may be updated.
|
|
57
|
+
*
|
|
58
|
+
* @param expressionId - The ID of the expression to update.
|
|
59
|
+
* @param updates - The fields to update.
|
|
60
|
+
* @returns The updated expression and changeset.
|
|
61
|
+
* @throws If the expression does not exist in this premise.
|
|
62
|
+
* @throws If `variableId` references a non-existent variable.
|
|
63
|
+
*/
|
|
64
|
+
updateExpression(expressionId: string, updates: TExpressionUpdate): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
65
|
+
/**
|
|
66
|
+
* Removes an expression and optionally its entire descendant subtree,
|
|
67
|
+
* then collapses any ancestor operators with fewer than two children.
|
|
68
|
+
*
|
|
69
|
+
* @param expressionId - The ID of the expression to remove.
|
|
70
|
+
* @param deleteSubtree - Whether to remove all descendants as well.
|
|
71
|
+
* @returns The removed root expression, or `undefined` if not found.
|
|
72
|
+
*/
|
|
73
|
+
removeExpression(expressionId: string, deleteSubtree: boolean): TCoreMutationResult<TExpr | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
74
|
+
/**
|
|
75
|
+
* Splices a new expression between existing nodes in the tree. The new
|
|
76
|
+
* expression inherits the tree slot of the anchor node
|
|
77
|
+
* (`leftNodeId ?? rightNodeId`).
|
|
78
|
+
*
|
|
79
|
+
* @param expression - The expression to insert, including position and
|
|
80
|
+
* parent assignment.
|
|
81
|
+
* @param leftNodeId - The existing node to become the left child of
|
|
82
|
+
* the new expression.
|
|
83
|
+
* @param rightNodeId - The existing node to become the right child of
|
|
84
|
+
* the new expression.
|
|
85
|
+
* @returns The inserted expression (with checksum) and changeset.
|
|
86
|
+
* @throws If the expression is a variable reference and the variable
|
|
87
|
+
* has not been registered.
|
|
88
|
+
*/
|
|
89
|
+
insertExpression(expression: TExpressionInput<TExpr>, leftNodeId?: string, rightNodeId?: string): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
90
|
+
/**
|
|
91
|
+
* Wraps an existing expression with a new operator and a new sibling
|
|
92
|
+
* in a single atomic operation.
|
|
93
|
+
*
|
|
94
|
+
* The operator takes the existing node's slot in the tree. Both the
|
|
95
|
+
* existing node and the new sibling become children of the operator.
|
|
96
|
+
* Exactly one of `leftNodeId` / `rightNodeId` must be provided — it
|
|
97
|
+
* identifies the existing node and which child slot it occupies.
|
|
98
|
+
*
|
|
99
|
+
* @param operator - The new operator expression to wrap with.
|
|
100
|
+
* @param newSibling - The new sibling expression to add alongside the
|
|
101
|
+
* existing node.
|
|
102
|
+
* @param leftNodeId - The existing node to place as the left child.
|
|
103
|
+
* @param rightNodeId - The existing node to place as the right child.
|
|
104
|
+
* @returns The inserted operator (with checksum) and changeset.
|
|
105
|
+
* @throws If the new sibling is a variable reference and the variable
|
|
106
|
+
* has not been registered.
|
|
107
|
+
*/
|
|
108
|
+
wrapExpression(operator: TExpressionWithoutPosition<TExpr>, newSibling: TExpressionWithoutPosition<TExpr>, leftNodeId?: string, rightNodeId?: string): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
109
|
+
/**
|
|
110
|
+
* Creates an association between a source and this expression within
|
|
111
|
+
* this premise.
|
|
112
|
+
*
|
|
113
|
+
* @param sourceId - The ID of the source.
|
|
114
|
+
* @param expressionId - The ID of the expression to associate.
|
|
115
|
+
* @returns The created association and changeset.
|
|
116
|
+
* @throws If the source does not exist.
|
|
117
|
+
* @throws If the expression does not exist in this premise.
|
|
118
|
+
* @throws If the association already exists.
|
|
119
|
+
*/
|
|
120
|
+
addExpressionSourceAssociation(sourceId: string, expressionId: string): TCoreMutationResult<TCoreExpressionSourceAssociation, TExpr, TVar, TPremise, TArg, TSource>;
|
|
121
|
+
/**
|
|
122
|
+
* Removes an expression–source association by its own ID.
|
|
123
|
+
*
|
|
124
|
+
* @param associationId - The ID of the association to remove.
|
|
125
|
+
* @returns The removed association, or `undefined` if not found.
|
|
126
|
+
*/
|
|
127
|
+
removeExpressionSourceAssociation(associationId: string): TCoreMutationResult<TCoreExpressionSourceAssociation | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
128
|
+
/**
|
|
129
|
+
* Returns all source associations for a given expression in this
|
|
130
|
+
* premise.
|
|
131
|
+
*
|
|
132
|
+
* @param expressionId - The expression ID to look up.
|
|
133
|
+
* @returns An array of expression–source associations.
|
|
134
|
+
*/
|
|
135
|
+
getSourceAssociationsForExpression(expressionId: string): TCoreExpressionSourceAssociation[];
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Single-premise expression tree reads.
|
|
139
|
+
*/
|
|
140
|
+
export interface TExpressionQueries<TExpr extends TCorePropositionalExpression = TCorePropositionalExpression> {
|
|
141
|
+
/**
|
|
142
|
+
* Returns an expression by ID, or `undefined` if not found in this
|
|
143
|
+
* premise.
|
|
144
|
+
*
|
|
145
|
+
* @param id - The expression ID to look up.
|
|
146
|
+
* @returns The expression entity, or `undefined`.
|
|
147
|
+
*/
|
|
148
|
+
getExpression(id: string): TExpr | undefined;
|
|
149
|
+
/**
|
|
150
|
+
* Returns the ID of the root expression, or `undefined` if the premise
|
|
151
|
+
* is empty.
|
|
152
|
+
*
|
|
153
|
+
* @returns The root expression ID, or `undefined`.
|
|
154
|
+
*/
|
|
155
|
+
getRootExpressionId(): string | undefined;
|
|
156
|
+
/**
|
|
157
|
+
* Returns the root expression, or `undefined` if the premise is empty.
|
|
158
|
+
*
|
|
159
|
+
* @returns The root expression entity, or `undefined`.
|
|
160
|
+
*/
|
|
161
|
+
getRootExpression(): TExpr | undefined;
|
|
162
|
+
/**
|
|
163
|
+
* Returns all expressions in this premise.
|
|
164
|
+
*
|
|
165
|
+
* @returns An array of expression entities.
|
|
166
|
+
*/
|
|
167
|
+
getExpressions(): TExpr[];
|
|
168
|
+
/**
|
|
169
|
+
* Returns the child expressions of the given parent, sorted by
|
|
170
|
+
* position.
|
|
171
|
+
*
|
|
172
|
+
* @param parentId - The parent expression ID, or `null` for root-level
|
|
173
|
+
* children.
|
|
174
|
+
* @returns An array of child expression entities.
|
|
175
|
+
*/
|
|
176
|
+
getChildExpressions(parentId: string | null): TExpr[];
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Variable reference queries and cascade deletion.
|
|
180
|
+
*/
|
|
181
|
+
export interface TVariableReferences<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TSource extends TCoreSource = TCoreSource> {
|
|
182
|
+
/**
|
|
183
|
+
* Returns all argument-level variables (from the shared
|
|
184
|
+
* VariableManager) sorted by ID. Since the VariableManager is shared
|
|
185
|
+
* across all premises, this returns every registered variable — not
|
|
186
|
+
* just those referenced by expressions in this premise.
|
|
187
|
+
*
|
|
188
|
+
* @returns An array of variable entities.
|
|
189
|
+
*/
|
|
190
|
+
getVariables(): TVar[];
|
|
191
|
+
/**
|
|
192
|
+
* Returns the set of variable IDs referenced by expressions in this
|
|
193
|
+
* premise. Only variables that appear in `type: "variable"` expression
|
|
194
|
+
* nodes are included.
|
|
195
|
+
*
|
|
196
|
+
* @returns A Set of referenced variable ID strings.
|
|
197
|
+
*/
|
|
198
|
+
getReferencedVariableIds(): Set<string>;
|
|
199
|
+
/**
|
|
200
|
+
* Deletes all expressions that reference the given variable ID,
|
|
201
|
+
* including their subtrees. Operator collapse runs after each removal.
|
|
202
|
+
*
|
|
203
|
+
* @param variableId - The variable ID whose referencing expressions
|
|
204
|
+
* should be removed.
|
|
205
|
+
* @returns The removed expressions and changeset.
|
|
206
|
+
*/
|
|
207
|
+
deleteExpressionsUsingVariable(variableId: string): TCoreMutationResult<TExpr[], TExpr, TVar, TPremise, TArg, TSource>;
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Premise type classification (inference vs constraint).
|
|
211
|
+
*/
|
|
212
|
+
export interface TPremiseClassification {
|
|
213
|
+
/**
|
|
214
|
+
* Returns `true` if the root expression is an `implies` or `iff`
|
|
215
|
+
* operator, meaning this premise expresses a logical inference
|
|
216
|
+
* relationship.
|
|
217
|
+
*
|
|
218
|
+
* @returns Whether this premise is an inference.
|
|
219
|
+
*/
|
|
220
|
+
isInference(): boolean;
|
|
221
|
+
/**
|
|
222
|
+
* Returns `true` if this premise does not have an inference operator at
|
|
223
|
+
* its root. Equivalent to `!isInference()`.
|
|
224
|
+
*
|
|
225
|
+
* @returns Whether this premise is a constraint.
|
|
226
|
+
*/
|
|
227
|
+
isConstraint(): boolean;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Premise-level evaluation: single-assignment evaluation and evaluability
|
|
231
|
+
* validation.
|
|
232
|
+
*/
|
|
233
|
+
export interface TPremiseEvaluation {
|
|
234
|
+
/**
|
|
235
|
+
* Validates that this premise is structurally ready for evaluation.
|
|
236
|
+
*
|
|
237
|
+
* @returns A validation result with any issues found.
|
|
238
|
+
*/
|
|
239
|
+
validateEvaluability(): TCoreValidationResult;
|
|
240
|
+
/**
|
|
241
|
+
* Evaluates the premise under a three-valued expression assignment.
|
|
242
|
+
*
|
|
243
|
+
* Variable values are looked up using Kleene three-valued logic
|
|
244
|
+
* (`null` = unknown). Missing variables default to `null`. For
|
|
245
|
+
* inference premises (`implies`/`iff`), an `inferenceDiagnostic` is
|
|
246
|
+
* computed with three-valued fields unless the root is rejected.
|
|
247
|
+
*
|
|
248
|
+
* @param assignment - The variable assignment and optional rejected
|
|
249
|
+
* expression IDs.
|
|
250
|
+
* @param options - Optional evaluation options.
|
|
251
|
+
* @param options.strictUnknownKeys - If `true`, unknown variable keys
|
|
252
|
+
* in the assignment cause an error.
|
|
253
|
+
* @param options.requireExactCoverage - If `true`, the assignment must
|
|
254
|
+
* cover exactly the referenced variables.
|
|
255
|
+
* @returns The premise evaluation result.
|
|
256
|
+
*/
|
|
257
|
+
evaluate(assignment: TCoreExpressionAssignment, options?: {
|
|
258
|
+
strictUnknownKeys?: boolean;
|
|
259
|
+
requireExactCoverage?: boolean;
|
|
260
|
+
}): TCorePremiseEvaluationResult;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* Premise snapshot and mutation callback lifecycle.
|
|
264
|
+
* Static fromSnapshot factory is class-level only.
|
|
265
|
+
*/
|
|
266
|
+
export interface TPremiseLifecycle<TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression> {
|
|
267
|
+
/**
|
|
268
|
+
* Returns a serializable snapshot of the premise's owned state.
|
|
269
|
+
*
|
|
270
|
+
* @returns The premise engine snapshot.
|
|
271
|
+
*/
|
|
272
|
+
snapshot(): TPremiseEngineSnapshot<TPremise, TExpr>;
|
|
273
|
+
/**
|
|
274
|
+
* Sets a callback invoked after every mutation, or `undefined` to
|
|
275
|
+
* clear.
|
|
276
|
+
*
|
|
277
|
+
* @param callback - The mutation callback, or `undefined` to remove.
|
|
278
|
+
*/
|
|
279
|
+
setOnMutate(callback: (() => void) | undefined): void;
|
|
280
|
+
/**
|
|
281
|
+
* Invalidates the cached checksum so the next call recomputes it.
|
|
282
|
+
*/
|
|
283
|
+
markDirty(): void;
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Premise entity identity and metadata access.
|
|
287
|
+
*/
|
|
288
|
+
export interface TPremiseIdentity<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TSource extends TCoreSource = TCoreSource> {
|
|
289
|
+
/**
|
|
290
|
+
* Returns the premise ID.
|
|
291
|
+
*
|
|
292
|
+
* @returns The premise ID string.
|
|
293
|
+
*/
|
|
294
|
+
getId(): string;
|
|
295
|
+
/**
|
|
296
|
+
* Returns a serializable premise representation containing only
|
|
297
|
+
* identity/metadata and checksum. Use `getRootExpressionId()`,
|
|
298
|
+
* `getExpressions()`, `getReferencedVariableIds()` for runtime state.
|
|
299
|
+
*
|
|
300
|
+
* @returns The premise data entity.
|
|
301
|
+
*/
|
|
302
|
+
toPremiseData(): TPremise;
|
|
303
|
+
/**
|
|
304
|
+
* Returns the premise's extra metadata record.
|
|
305
|
+
*
|
|
306
|
+
* @returns The extras record.
|
|
307
|
+
*/
|
|
308
|
+
getExtras(): Record<string, unknown>;
|
|
309
|
+
/**
|
|
310
|
+
* Replaces the premise's extra metadata record.
|
|
311
|
+
*
|
|
312
|
+
* @param extras - The new extras record.
|
|
313
|
+
* @returns The previous extras record and changeset.
|
|
314
|
+
*/
|
|
315
|
+
setExtras(extras: Record<string, unknown>): TCoreMutationResult<Record<string, unknown>, TExpr, TVar, TPremise, TArg, TSource>;
|
|
316
|
+
}
|
|
317
|
+
//# sourceMappingURL=premise-engine.interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"premise-engine.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/premise-engine.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAC1B,WAAW,EACX,gCAAgC,EACnC,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EACR,yBAAyB,EACzB,4BAA4B,EAC5B,qBAAqB,EACxB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAClE,OAAO,KAAK,EACR,gBAAgB,EAChB,0BAA0B,EAC1B,iBAAiB,EACpB,MAAM,0BAA0B,CAAA;AACjC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,sBAAsB,CAAA;AAElE;;GAEG;AACH,MAAM,WAAW,oBAAoB,CACjC,IAAI,SAAS,aAAa,GAAG,aAAa,EAC1C,QAAQ,SAAS,YAAY,GAAG,YAAY,EAC5C,KAAK,SAAS,4BAA4B,GAAG,4BAA4B,EACzE,IAAI,SAAS,0BAA0B,GAAG,0BAA0B,EACpE,OAAO,SAAS,WAAW,GAAG,WAAW;IAEzC;;;;;;;;;;;;;;;OAeG;IACH,aAAa,CACT,UAAU,EAAE,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ACH,MAAM,WAAW,gBAAgB,CAC7B,IAAI,SAAS,aAAa,GAAG,aAAa,EAC1C,QAAQ,SAAS,YAAY,GAAG,YAAY,EAC5C,KAAK,SAAS,4BAA4B,GAAG,4BAA4B,EACzE,IAAI,SAAS,0BAA0B,GAAG,0BAA0B,EACpE,OAAO,SAAS,WAAW,GAAG,WAAW;IAEzC;;;;OAIG;IACH,KAAK,IAAI,MAAM,CAAA;IACf;;;;;;OAMG;IACH,aAAa,IAAI,QAAQ,CAAA;IACzB;;;;OAIG;IACH,SAAS,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACpC;;;;;OAKG;IACH,SAAS,CACL,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAChC,mBAAmB,CAClB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,IAAI,EACJ,OAAO,CACV,CAAA;CACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"premise-engine.interfaces.js","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/premise-engine.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An entity that can produce a human-readable display string.
|
|
3
|
+
*/
|
|
4
|
+
export interface TDisplayable {
|
|
5
|
+
/**
|
|
6
|
+
* Renders the entity as a human-readable string.
|
|
7
|
+
*
|
|
8
|
+
* @returns A human-readable display string.
|
|
9
|
+
*/
|
|
10
|
+
toDisplayString(): string;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An entity that can produce a deterministic content checksum.
|
|
14
|
+
*/
|
|
15
|
+
export interface TChecksummable {
|
|
16
|
+
/**
|
|
17
|
+
* Returns a deterministic content checksum. Computed lazily — only
|
|
18
|
+
* recalculated when state has changed.
|
|
19
|
+
*
|
|
20
|
+
* @returns A hex-encoded checksum string.
|
|
21
|
+
*/
|
|
22
|
+
checksum(): string;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=shared.interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/shared.interfaces.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB;;;;OAIG;IACH,eAAe,IAAI,MAAM,CAAA;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC3B;;;;;OAKG;IACH,QAAQ,IAAI,MAAM,CAAA;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.interfaces.js","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/shared.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable, TOptionalChecksum, TCoreSource, TCoreVariableSourceAssociation, TCoreExpressionSourceAssociation } from "../../schemata/index.js";
|
|
2
|
+
import type { TCoreMutationResult } from "../../types/mutation.js";
|
|
3
|
+
/**
|
|
4
|
+
* Source CRUD, association management, and lookup for an argument.
|
|
5
|
+
*/
|
|
6
|
+
export interface TSourceManagement<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TSource extends TCoreSource = TCoreSource> {
|
|
7
|
+
/**
|
|
8
|
+
* Registers a new source with this argument.
|
|
9
|
+
*
|
|
10
|
+
* @param source - The source entity to add, with optional checksum.
|
|
11
|
+
* @returns The added source (with checksum) and changeset.
|
|
12
|
+
* @throws If a source with the given ID already exists.
|
|
13
|
+
*/
|
|
14
|
+
addSource(source: TOptionalChecksum<TSource>): TCoreMutationResult<TSource, TExpr, TVar, TPremise, TArg, TSource>;
|
|
15
|
+
/**
|
|
16
|
+
* Removes a source and any associations referencing it.
|
|
17
|
+
*
|
|
18
|
+
* @param sourceId - The ID of the source to remove.
|
|
19
|
+
* @returns The removed source, or `undefined` if not found.
|
|
20
|
+
*/
|
|
21
|
+
removeSource(sourceId: string): TCoreMutationResult<TSource | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
22
|
+
/**
|
|
23
|
+
* Creates an association between a source and a variable.
|
|
24
|
+
*
|
|
25
|
+
* @param sourceId - The ID of the source.
|
|
26
|
+
* @param variableId - The ID of the variable to associate.
|
|
27
|
+
* @returns The created association and changeset.
|
|
28
|
+
* @throws If the source does not exist.
|
|
29
|
+
* @throws If the variable does not exist.
|
|
30
|
+
* @throws If the association already exists.
|
|
31
|
+
*/
|
|
32
|
+
addVariableSourceAssociation(sourceId: string, variableId: string): TCoreMutationResult<TCoreVariableSourceAssociation, TExpr, TVar, TPremise, TArg, TSource>;
|
|
33
|
+
/**
|
|
34
|
+
* Removes a variable–source association by its own ID.
|
|
35
|
+
*
|
|
36
|
+
* @param associationId - The ID of the association to remove.
|
|
37
|
+
* @returns The removed association, or `undefined` if not found.
|
|
38
|
+
*/
|
|
39
|
+
removeVariableSourceAssociation(associationId: string): TCoreMutationResult<TCoreVariableSourceAssociation | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
40
|
+
/**
|
|
41
|
+
* Creates an association between a source and an expression within a
|
|
42
|
+
* specific premise.
|
|
43
|
+
*
|
|
44
|
+
* @param sourceId - The ID of the source.
|
|
45
|
+
* @param expressionId - The ID of the expression to associate.
|
|
46
|
+
* @param premiseId - The ID of the premise that owns the expression.
|
|
47
|
+
* @returns The created association and changeset.
|
|
48
|
+
* @throws If the source does not exist.
|
|
49
|
+
* @throws If the expression does not exist in the specified premise.
|
|
50
|
+
* @throws If the association already exists.
|
|
51
|
+
*/
|
|
52
|
+
addExpressionSourceAssociation(sourceId: string, expressionId: string, premiseId: string): TCoreMutationResult<TCoreExpressionSourceAssociation, TExpr, TVar, TPremise, TArg, TSource>;
|
|
53
|
+
/**
|
|
54
|
+
* Removes an expression–source association by its own ID.
|
|
55
|
+
*
|
|
56
|
+
* @param associationId - The ID of the association to remove.
|
|
57
|
+
* @returns The removed association, or `undefined` if not found.
|
|
58
|
+
*/
|
|
59
|
+
removeExpressionSourceAssociation(associationId: string): TCoreMutationResult<TCoreExpressionSourceAssociation | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
60
|
+
/**
|
|
61
|
+
* Returns all registered sources sorted by ID.
|
|
62
|
+
*
|
|
63
|
+
* @returns An array of source entities.
|
|
64
|
+
*/
|
|
65
|
+
getSources(): TSource[];
|
|
66
|
+
/**
|
|
67
|
+
* Returns the source with the given ID, or `undefined` if not found.
|
|
68
|
+
*
|
|
69
|
+
* @param sourceId - The source ID to look up.
|
|
70
|
+
* @returns The source entity, or `undefined`.
|
|
71
|
+
*/
|
|
72
|
+
getSource(sourceId: string): TSource | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Returns all variable and expression associations for a given source.
|
|
75
|
+
*
|
|
76
|
+
* @param sourceId - The source ID to look up.
|
|
77
|
+
* @returns An object with `variable` and `expression` association arrays.
|
|
78
|
+
*/
|
|
79
|
+
getAssociationsForSource(sourceId: string): {
|
|
80
|
+
variable: TCoreVariableSourceAssociation[];
|
|
81
|
+
expression: TCoreExpressionSourceAssociation[];
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Returns all source associations for a given variable.
|
|
85
|
+
*
|
|
86
|
+
* @param variableId - The variable ID to look up.
|
|
87
|
+
* @returns An array of variable–source associations.
|
|
88
|
+
*/
|
|
89
|
+
getAssociationsForVariable(variableId: string): TCoreVariableSourceAssociation[];
|
|
90
|
+
/**
|
|
91
|
+
* Returns all source associations for a given expression.
|
|
92
|
+
*
|
|
93
|
+
* @param expressionId - The expression ID to look up.
|
|
94
|
+
* @returns An array of expression–source associations.
|
|
95
|
+
*/
|
|
96
|
+
getAssociationsForExpression(expressionId: string): TCoreExpressionSourceAssociation[];
|
|
97
|
+
/**
|
|
98
|
+
* Returns all variable–source associations across the argument.
|
|
99
|
+
*
|
|
100
|
+
* @returns An array of all variable–source association entities.
|
|
101
|
+
*/
|
|
102
|
+
getAllVariableSourceAssociations(): TCoreVariableSourceAssociation[];
|
|
103
|
+
/**
|
|
104
|
+
* Returns all expression–source associations across the argument.
|
|
105
|
+
*
|
|
106
|
+
* @returns An array of all expression–source association entities.
|
|
107
|
+
*/
|
|
108
|
+
getAllExpressionSourceAssociations(): TCoreExpressionSourceAssociation[];
|
|
109
|
+
}
|
|
110
|
+
//# sourceMappingURL=source-management.interfaces.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-management.interfaces.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/source-management.interfaces.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,WAAW,EACX,8BAA8B,EAC9B,gCAAgC,EACnC,MAAM,yBAAyB,CAAA;AAChC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAA;AAElE;;GAEG;AACH,MAAM,WAAW,iBAAiB,CAC9B,IAAI,SAAS,aAAa,GAAG,aAAa,EAC1C,QAAQ,SAAS,YAAY,GAAG,YAAY,EAC5C,KAAK,SAAS,4BAA4B,GAAG,4BAA4B,EACzE,IAAI,SAAS,0BAA0B,GAAG,0BAA0B,EACpE,OAAO,SAAS,WAAW,GAAG,WAAW;IAEzC;;;;;;OAMG;IACH,SAAS,CACL,MAAM,EAAE,iBAAiB,CAAC,OAAO,CAAC,GACnC,mBAAmB,CAAC,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,CAAC,CAAA;IAErE;;;;;OAKG;IACH,YAAY,CACR,QAAQ,EAAE,MAAM,GACjB,mBAAmB,CAClB,OAAO,GAAG,SAAS,EACnB,KA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;IAErC;;;;OAIG;IACH,gCAAgC,IAAI,8BAA8B,EAAE,CAAA;IAEpE;;;;OAIG;IACH,kCAAkC,IAAI,gCAAgC,EAAE,CAAA;CAC3E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"source-management.interfaces.js","sourceRoot":"","sources":["../../../../src/lib/core/interfaces/source-management.interfaces.ts"],"names":[],"mappings":""}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
export type
|
|
1
|
+
export type TFormulaAST = {
|
|
2
2
|
type: "variable";
|
|
3
3
|
name: string;
|
|
4
4
|
} | {
|
|
5
5
|
type: "not";
|
|
6
|
-
operand:
|
|
6
|
+
operand: TFormulaAST;
|
|
7
7
|
} | {
|
|
8
8
|
type: "and";
|
|
9
|
-
operands:
|
|
9
|
+
operands: TFormulaAST[];
|
|
10
10
|
} | {
|
|
11
11
|
type: "or";
|
|
12
|
-
operands:
|
|
12
|
+
operands: TFormulaAST[];
|
|
13
13
|
} | {
|
|
14
14
|
type: "implies";
|
|
15
|
-
left:
|
|
16
|
-
right:
|
|
15
|
+
left: TFormulaAST;
|
|
16
|
+
right: TFormulaAST;
|
|
17
17
|
} | {
|
|
18
18
|
type: "iff";
|
|
19
|
-
left:
|
|
20
|
-
right:
|
|
19
|
+
left: TFormulaAST;
|
|
20
|
+
right: TFormulaAST;
|
|
21
21
|
};
|
|
22
|
-
export declare function parseFormula(input: string):
|
|
22
|
+
export declare function parseFormula(input: string): TFormulaAST;
|
|
23
23
|
//# sourceMappingURL=formula.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formula.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/parser/formula.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"formula.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/parser/formula.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,WAAW,GACjB;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAClC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,OAAO,EAAE,WAAW,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,GACxC;IAAE,IAAI,EAAE,IAAI,CAAC;IAAC,QAAQ,EAAE,WAAW,EAAE,CAAA;CAAE,GACvC;IAAE,IAAI,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,GAC1D;IAAE,IAAI,EAAE,KAAK,CAAC;IAAC,IAAI,EAAE,WAAW,CAAC;IAAC,KAAK,EAAE,WAAW,CAAA;CAAE,CAAA;AAE5D,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAGvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formula.js","sourceRoot":"","sources":["../../../../src/lib/core/parser/formula.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAUpD,MAAM,UAAU,YAAY,CAAC,KAAa;IACtC,6DAA6D;IAC7D,OAAO,QAAQ,CAAC,KAAK,
|
|
1
|
+
{"version":3,"file":"formula.js","sourceRoot":"","sources":["../../../../src/lib/core/parser/formula.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAE,MAAM,kBAAkB,CAAA;AAUpD,MAAM,UAAU,YAAY,CAAC,KAAa;IACtC,6DAA6D;IAC7D,OAAO,QAAQ,CAAC,KAAK,CAAgB,CAAA;AACzC,CAAC"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import type { TCoreArgument, TCorePremise, TCorePropositionalExpression, TCorePropositionalVariable, TOptionalChecksum, TCoreSource, TCoreExpressionSourceAssociation } from "../schemata/index.js";
|
|
2
|
+
import type { TCoreExpressionAssignment, TCorePremiseEvaluationResult, TCoreValidationResult } from "../types/evaluation.js";
|
|
3
|
+
import type { TCoreMutationResult } from "../types/mutation.js";
|
|
4
|
+
import type { TLogicEngineOptions } from "./argument-engine.js";
|
|
5
|
+
import type { TExpressionInput, TExpressionManagerSnapshot, TExpressionWithoutPosition, TExpressionUpdate } from "./expression-manager.js";
|
|
6
|
+
import { VariableManager } from "./variable-manager.js";
|
|
7
|
+
import type { SourceManager } from "./source-manager.js";
|
|
8
|
+
import type { TExpressionMutations, TExpressionQueries, TVariableReferences, TPremiseClassification, TPremiseEvaluation, TPremiseLifecycle, TPremiseIdentity, TDisplayable, TChecksummable } from "./interfaces/index.js";
|
|
9
|
+
export type TPremiseEngineSnapshot<TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression> = {
|
|
10
|
+
premise: TOptionalChecksum<TPremise>;
|
|
11
|
+
rootExpressionId?: string;
|
|
12
|
+
expressions: TExpressionManagerSnapshot<TExpr>;
|
|
13
|
+
config?: TLogicEngineOptions;
|
|
14
|
+
};
|
|
15
|
+
export declare class PremiseEngine<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TSource extends TCoreSource = TCoreSource> implements TExpressionMutations<TArg, TPremise, TExpr, TVar, TSource>, TExpressionQueries<TExpr>, TVariableReferences<TArg, TPremise, TExpr, TVar, TSource>, TPremiseClassification, TPremiseEvaluation, TPremiseLifecycle<TPremise, TExpr>, TPremiseIdentity<TArg, TPremise, TExpr, TVar, TSource>, TDisplayable, TChecksummable {
|
|
16
|
+
private premise;
|
|
17
|
+
private rootExpressionId;
|
|
18
|
+
private variables;
|
|
19
|
+
private expressions;
|
|
20
|
+
private expressionsByVariableId;
|
|
21
|
+
private argument;
|
|
22
|
+
private checksumConfig?;
|
|
23
|
+
private checksumDirty;
|
|
24
|
+
private cachedChecksum;
|
|
25
|
+
private expressionIndex?;
|
|
26
|
+
private sourceManager?;
|
|
27
|
+
private onMutate?;
|
|
28
|
+
constructor(premise: TOptionalChecksum<TPremise>, deps: {
|
|
29
|
+
argument: TOptionalChecksum<TArg>;
|
|
30
|
+
variables: VariableManager<TVar>;
|
|
31
|
+
expressionIndex?: Map<string, string>;
|
|
32
|
+
sourceManager?: SourceManager<TSource>;
|
|
33
|
+
}, config?: TLogicEngineOptions);
|
|
34
|
+
setOnMutate(callback: (() => void) | undefined): void;
|
|
35
|
+
deleteExpressionsUsingVariable(variableId: string): TCoreMutationResult<TExpr[], TExpr, TVar, TPremise, TArg, TSource>;
|
|
36
|
+
addExpression(expression: TExpressionInput<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
37
|
+
appendExpression(parentId: string | null, expression: TExpressionWithoutPosition<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
38
|
+
addExpressionRelative(siblingId: string, relativePosition: "before" | "after", expression: TExpressionWithoutPosition<TExpr>): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
39
|
+
updateExpression(expressionId: string, updates: TExpressionUpdate): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
40
|
+
removeExpression(expressionId: string, deleteSubtree: boolean): TCoreMutationResult<TExpr | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
41
|
+
insertExpression(expression: TExpressionInput<TExpr>, leftNodeId?: string, rightNodeId?: string): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
42
|
+
wrapExpression(operator: TExpressionWithoutPosition<TExpr>, newSibling: TExpressionWithoutPosition<TExpr>, leftNodeId?: string, rightNodeId?: string): TCoreMutationResult<TExpr, TExpr, TVar, TPremise, TArg, TSource>;
|
|
43
|
+
addExpressionSourceAssociation(sourceId: string, expressionId: string): TCoreMutationResult<TCoreExpressionSourceAssociation, TExpr, TVar, TPremise, TArg, TSource>;
|
|
44
|
+
removeExpressionSourceAssociation(associationId: string): TCoreMutationResult<TCoreExpressionSourceAssociation | undefined, TExpr, TVar, TPremise, TArg, TSource>;
|
|
45
|
+
getSourceAssociationsForExpression(expressionId: string): TCoreExpressionSourceAssociation[];
|
|
46
|
+
getExpression(id: string): TExpr | undefined;
|
|
47
|
+
getId(): string;
|
|
48
|
+
getExtras(): Record<string, unknown>;
|
|
49
|
+
setExtras(extras: Record<string, unknown>): TCoreMutationResult<Record<string, unknown>, TExpr, TVar, TPremise, TArg, TSource>;
|
|
50
|
+
getRootExpressionId(): string | undefined;
|
|
51
|
+
getRootExpression(): TExpr | undefined;
|
|
52
|
+
getVariables(): TVar[];
|
|
53
|
+
getExpressions(): TExpr[];
|
|
54
|
+
getChildExpressions(parentId: string | null): TExpr[];
|
|
55
|
+
isInference(): boolean;
|
|
56
|
+
isConstraint(): boolean;
|
|
57
|
+
validateEvaluability(): TCoreValidationResult;
|
|
58
|
+
evaluate(assignment: TCoreExpressionAssignment, options?: {
|
|
59
|
+
strictUnknownKeys?: boolean;
|
|
60
|
+
requireExactCoverage?: boolean;
|
|
61
|
+
}): TCorePremiseEvaluationResult;
|
|
62
|
+
toDisplayString(): string;
|
|
63
|
+
getReferencedVariableIds(): Set<string>;
|
|
64
|
+
toPremiseData(): TPremise;
|
|
65
|
+
checksum(): string;
|
|
66
|
+
private computeChecksum;
|
|
67
|
+
markDirty(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Re-reads the single root from ExpressionManager after any operation
|
|
70
|
+
* that may have caused operator collapse to silently change the root.
|
|
71
|
+
*/
|
|
72
|
+
private syncRootExpressionId;
|
|
73
|
+
private collectSubtree;
|
|
74
|
+
private assertBelongsToArgument;
|
|
75
|
+
private renderExpression;
|
|
76
|
+
private operatorSymbol;
|
|
77
|
+
snapshot(): TPremiseEngineSnapshot<TPremise, TExpr>;
|
|
78
|
+
/** Creates a new PremiseEngine from a previously captured snapshot. */
|
|
79
|
+
static fromSnapshot<TArg extends TCoreArgument = TCoreArgument, TPremise extends TCorePremise = TCorePremise, TExpr extends TCorePropositionalExpression = TCorePropositionalExpression, TVar extends TCorePropositionalVariable = TCorePropositionalVariable, TSource extends TCoreSource = TCoreSource>(snapshot: TPremiseEngineSnapshot<TPremise, TExpr>, argument: TOptionalChecksum<TArg>, variables: VariableManager<TVar>, expressionIndex?: Map<string, string>, sourceManager?: SourceManager<TSource>): PremiseEngine<TArg, TPremise, TExpr, TVar, TSource>;
|
|
80
|
+
private syncExpressionIndex;
|
|
81
|
+
private rebuildVariableIndex;
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=premise-engine.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"premise-engine.d.ts","sourceRoot":"","sources":["../../../src/lib/core/premise-engine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACR,aAAa,EAEb,YAAY,EACZ,4BAA4B,EAC5B,0BAA0B,EAC1B,iBAAiB,EACjB,WAAW,EACX,gCAAgC,EACnC,MAAM,sBAAsB,CAAA;AAG7B,OAAO,KAAK,EACR,yBAAyB,EACzB,4BAA4B,EAI5B,qBAAqB,EACxB,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,mBAAmB,EAAkB,MAAM,sBAAsB,CAAA;AAc/E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAA;AAI/D,OAAO,KAAK,EACR,gBAAgB,EAChB,0BAA0B,EAC1B,0BAA0B,EAC1B,iBAAiB,EACpB,MAAM,yBAAyB,CAAA;AAEhC,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AACvD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EACR,oBAAoB,EACpB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,kBAAkB,EAClB,i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