@polintpro/proposit-core 0.6.5 → 0.7.3
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 +194 -0
- package/dist/extensions/basics/schemata.d.ts +5 -0
- package/dist/extensions/basics/schemata.d.ts.map +1 -1
- package/dist/lib/consts.d.ts.map +1 -1
- package/dist/lib/consts.js +21 -2
- package/dist/lib/consts.js.map +1 -1
- package/dist/lib/core/argument-engine.d.ts +51 -2
- package/dist/lib/core/argument-engine.d.ts.map +1 -1
- package/dist/lib/core/argument-engine.js +764 -227
- package/dist/lib/core/argument-engine.js.map +1 -1
- package/dist/lib/core/change-collector.d.ts +1 -0
- package/dist/lib/core/change-collector.d.ts.map +1 -1
- package/dist/lib/core/change-collector.js +3 -0
- package/dist/lib/core/change-collector.js.map +1 -1
- package/dist/lib/core/claim-library.d.ts +4 -0
- package/dist/lib/core/claim-library.d.ts.map +1 -1
- package/dist/lib/core/claim-library.js +126 -59
- package/dist/lib/core/claim-library.js.map +1 -1
- package/dist/lib/core/claim-source-library.d.ts +4 -0
- package/dist/lib/core/claim-source-library.d.ts.map +1 -1
- package/dist/lib/core/claim-source-library.js +114 -38
- package/dist/lib/core/claim-source-library.js.map +1 -1
- package/dist/lib/core/diff.d.ts +10 -0
- package/dist/lib/core/diff.d.ts.map +1 -1
- package/dist/lib/core/diff.js +114 -21
- package/dist/lib/core/diff.js.map +1 -1
- package/dist/lib/core/expression-manager.d.ts +28 -0
- package/dist/lib/core/expression-manager.d.ts.map +1 -1
- package/dist/lib/core/expression-manager.js +458 -20
- package/dist/lib/core/expression-manager.js.map +1 -1
- package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts +9 -2
- package/dist/lib/core/interfaces/argument-engine.interfaces.d.ts.map +1 -1
- package/dist/lib/core/interfaces/library.interfaces.d.ts +19 -0
- package/dist/lib/core/interfaces/library.interfaces.d.ts.map +1 -1
- package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts +53 -1
- package/dist/lib/core/interfaces/premise-engine.interfaces.d.ts.map +1 -1
- package/dist/lib/core/invariant-violation-error.d.ts +6 -0
- package/dist/lib/core/invariant-violation-error.d.ts.map +1 -0
- package/dist/lib/core/invariant-violation-error.js +12 -0
- package/dist/lib/core/invariant-violation-error.js.map +1 -0
- package/dist/lib/core/parser/formula.d.ts.map +1 -1
- package/dist/lib/core/parser/formula.js +2 -2
- package/dist/lib/core/parser/formula.js.map +1 -1
- package/dist/lib/core/premise-engine.d.ts +12 -1
- package/dist/lib/core/premise-engine.d.ts.map +1 -1
- package/dist/lib/core/premise-engine.js +726 -382
- package/dist/lib/core/premise-engine.js.map +1 -1
- package/dist/lib/core/source-library.d.ts +4 -0
- package/dist/lib/core/source-library.d.ts.map +1 -1
- package/dist/lib/core/source-library.js +126 -59
- package/dist/lib/core/source-library.js.map +1 -1
- package/dist/lib/core/variable-manager.d.ts +7 -0
- package/dist/lib/core/variable-manager.d.ts.map +1 -1
- package/dist/lib/core/variable-manager.js +65 -1
- package/dist/lib/core/variable-manager.js.map +1 -1
- package/dist/lib/index.d.ts +4 -1
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +4 -1
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/schemata/argument.d.ts +2 -0
- package/dist/lib/schemata/argument.d.ts.map +1 -1
- package/dist/lib/schemata/argument.js +6 -0
- package/dist/lib/schemata/argument.js.map +1 -1
- package/dist/lib/schemata/propositional.d.ts +41 -0
- package/dist/lib/schemata/propositional.d.ts.map +1 -1
- package/dist/lib/schemata/propositional.js +34 -0
- package/dist/lib/schemata/propositional.js.map +1 -1
- package/dist/lib/types/diff.d.ts +6 -0
- package/dist/lib/types/diff.d.ts.map +1 -1
- package/dist/lib/types/fork.d.ts +32 -0
- package/dist/lib/types/fork.d.ts.map +1 -0
- package/dist/lib/types/fork.js +2 -0
- package/dist/lib/types/fork.js.map +1 -0
- package/dist/lib/types/grammar.d.ts +5 -4
- package/dist/lib/types/grammar.d.ts.map +1 -1
- package/dist/lib/types/grammar.js.map +1 -1
- package/dist/lib/types/validation.d.ts +46 -0
- package/dist/lib/types/validation.d.ts.map +1 -0
- package/dist/lib/types/validation.js +41 -0
- package/dist/lib/types/validation.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -168,6 +168,36 @@ Claim-source associations are managed by `ClaimSourceLibrary<TAssoc>` — a stan
|
|
|
168
168
|
|
|
169
169
|
The `@polintpro/proposit-core/extensions/ieee` subpath export provides `IEEESourceSchema` — an extended source type with IEEE citation reference schemas covering 33 reference types.
|
|
170
170
|
|
|
171
|
+
### Auto-variable creation
|
|
172
|
+
|
|
173
|
+
When a premise is created via `createPremise()` or `createPremiseWithId()`, the engine automatically creates a **premise-bound variable** for it. This variable allows other premises in the same argument to reference the premise's truth value in their expression trees without manual variable setup.
|
|
174
|
+
|
|
175
|
+
The auto-created variable gets a symbol from an optional `symbol` parameter, or an auto-generated one (`"P0"`, `"P1"`, ...) with collision avoidance. The variable is included in the returned changeset.
|
|
176
|
+
|
|
177
|
+
### Argument forking
|
|
178
|
+
|
|
179
|
+
An argument can be **forked** via `forkArgument()` to create an independent copy — useful for responding to, critiquing, or expanding on another author's argument. Forking:
|
|
180
|
+
|
|
181
|
+
- Creates a new argument with a new ID (version 0)
|
|
182
|
+
- Assigns new UUIDs to all premises, expressions, and variables
|
|
183
|
+
- Stamps `forkedFrom` provenance metadata on every entity, pointing back to the originals
|
|
184
|
+
- Remaps all internal references (expression parent chains, variable bindings, conclusion role)
|
|
185
|
+
- Returns the new engine and a remap table mapping original IDs to new IDs
|
|
186
|
+
|
|
187
|
+
The forked argument is fully independent — mutations don't affect the source. The `createForkedFromMatcher()` helper enables fork-aware diffing via `diffArguments()`, pairing entities by their provenance metadata rather than by ID.
|
|
188
|
+
|
|
189
|
+
Subclasses can override the protected `canFork()` method to restrict which arguments may be forked (e.g., only published versions).
|
|
190
|
+
|
|
191
|
+
### Cross-argument variable binding
|
|
192
|
+
|
|
193
|
+
A variable can reference a premise in a **different** argument via `bindVariableToExternalPremise()`. This enables structured inter-argument reasoning — for example, Rich's response to John's argument can reference John's premises as variables.
|
|
194
|
+
|
|
195
|
+
External bindings are **evaluator-assigned**: during evaluation they behave like claim-bound variables (the evaluator provides truth values in the assignment). The binding is navigational — it tells readers where the proposition is defined, but the engine doesn't resolve across argument boundaries. External bindings are included as free variables in truth-table generation.
|
|
196
|
+
|
|
197
|
+
`bindVariableToArgument()` is a convenience for binding to another argument's conclusion premise — the caller provides the conclusion premise ID and the method delegates to `bindVariableToExternalPremise()`.
|
|
198
|
+
|
|
199
|
+
Subclasses can override the protected `canBind()` method to restrict which external arguments may be referenced (e.g., only published versions).
|
|
200
|
+
|
|
171
201
|
Each expression carries:
|
|
172
202
|
|
|
173
203
|
| Field | Type | Description |
|
|
@@ -520,6 +550,170 @@ premise1.removeExpression("expr-r")
|
|
|
520
550
|
console.log(premise1.toDisplayString()) // (P → Q)
|
|
521
551
|
```
|
|
522
552
|
|
|
553
|
+
### Forking an argument
|
|
554
|
+
|
|
555
|
+
```typescript
|
|
556
|
+
// Fork John's argument to create Rich's response
|
|
557
|
+
const { engine: richArg, remapTable } = johnEngine.forkArgument(
|
|
558
|
+
"rich-arg-id",
|
|
559
|
+
claimLibrary,
|
|
560
|
+
sourceLibrary,
|
|
561
|
+
claimSourceLibrary
|
|
562
|
+
)
|
|
563
|
+
|
|
564
|
+
// Rich now has a mutable copy — modify, add, or remove premises
|
|
565
|
+
const forkedPremiseId = remapTable.premises.get(originalPremiseId)!
|
|
566
|
+
richArg.removePremise(forkedPremiseId) // reject a premise
|
|
567
|
+
richArg.createPremise(undefined, "RichNewPremise") // add a new one
|
|
568
|
+
|
|
569
|
+
// See what Rich changed relative to John's original
|
|
570
|
+
import {
|
|
571
|
+
diffArguments,
|
|
572
|
+
createForkedFromMatcher,
|
|
573
|
+
} from "@polintpro/proposit-core"
|
|
574
|
+
|
|
575
|
+
const diff = diffArguments(johnEngine, richArg, {
|
|
576
|
+
...createForkedFromMatcher(),
|
|
577
|
+
})
|
|
578
|
+
// diff.premises.removed — premises Rich rejected
|
|
579
|
+
// diff.premises.added — premises Rich introduced
|
|
580
|
+
// diff.premises.modified — premises Rich altered
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Cross-argument variable binding
|
|
584
|
+
|
|
585
|
+
```typescript
|
|
586
|
+
// Rich's argument references a premise from John's argument
|
|
587
|
+
richArg.bindVariableToExternalPremise({
|
|
588
|
+
id: "v-john-p2",
|
|
589
|
+
argumentId: "rich-arg-id",
|
|
590
|
+
argumentVersion: 0,
|
|
591
|
+
symbol: "JohnP2",
|
|
592
|
+
boundPremiseId: "johns-premise-2-id",
|
|
593
|
+
boundArgumentId: "johns-arg-id",
|
|
594
|
+
boundArgumentVersion: 2, // must be a published version
|
|
595
|
+
})
|
|
596
|
+
|
|
597
|
+
// Or reference John's conclusion directly
|
|
598
|
+
richArg.bindVariableToArgument(
|
|
599
|
+
{
|
|
600
|
+
id: "v-john-conclusion",
|
|
601
|
+
argumentId: "rich-arg-id",
|
|
602
|
+
argumentVersion: 0,
|
|
603
|
+
symbol: "JohnConclusion",
|
|
604
|
+
boundArgumentId: "johns-arg-id",
|
|
605
|
+
boundArgumentVersion: 2,
|
|
606
|
+
},
|
|
607
|
+
"johns-conclusion-premise-id" // caller resolves the conclusion
|
|
608
|
+
)
|
|
609
|
+
|
|
610
|
+
// External bindings are evaluator-assigned — provide truth values in the assignment
|
|
611
|
+
const result = richArg.evaluate({
|
|
612
|
+
variables: { "v-john-p2": true, "v-john-conclusion": false },
|
|
613
|
+
rejectedExpressionIds: [],
|
|
614
|
+
})
|
|
615
|
+
```
|
|
616
|
+
|
|
617
|
+
## Invalid Constructions and How They're Handled
|
|
618
|
+
|
|
619
|
+
The engine enforces structural invariants at two levels: **construction-time** (throws immediately) and **validation-time** (detected by `validateEvaluability()` before evaluation). The tables below list every invalid construction.
|
|
620
|
+
|
|
621
|
+
### Expression tree — prevented at construction time
|
|
622
|
+
|
|
623
|
+
| Invalid construction | What happens |
|
|
624
|
+
| -------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
625
|
+
| `implies` or `iff` with `parentId !== null` | Throws — root-only operators must be the root of a premise's tree |
|
|
626
|
+
| Non-`not` operator as direct child of another operator | Throws — a `formula` node must sit between them (unless `autoNormalize` is `true`, which auto-inserts one) |
|
|
627
|
+
| Expression with `parentId === id` (self-parentage) | Throws |
|
|
628
|
+
| Duplicate expression ID within a premise | Throws |
|
|
629
|
+
| Expression references a non-existent `parentId` | Throws |
|
|
630
|
+
| Expression's parent is a `variable` expression | Throws — only operators and formulas can have children |
|
|
631
|
+
| `formula` node already has a child (adding a second) | Throws — formulas allow exactly one child |
|
|
632
|
+
| `not` operator already has a child (adding a second) | Throws — `not` is unary |
|
|
633
|
+
| `implies` or `iff` already has two children (adding a third) | Throws — binary operators require exactly two |
|
|
634
|
+
| Two siblings share the same `position` under the same parent | Throws |
|
|
635
|
+
| `insertExpression` with `leftNodeId === rightNodeId` | Throws |
|
|
636
|
+
| `insertExpression` or `wrapExpression` targeting a root-only operator as a child | Throws — `implies`/`iff` cannot be subordinated |
|
|
637
|
+
| `wrapExpression` with `not` as the wrapping operator | Throws — `not` is unary but wrapping always produces two children |
|
|
638
|
+
| Expression's `argumentId`/`argumentVersion` doesn't match the premise | Throws |
|
|
639
|
+
|
|
640
|
+
### Expression tree — detected by validation
|
|
641
|
+
|
|
642
|
+
| Invalid construction | Error code |
|
|
643
|
+
| --------------------------------------------------------------------- | ------------------------------- |
|
|
644
|
+
| `and` or `or` operator with fewer than 2 children | `EXPR_CHILD_COUNT_INVALID` |
|
|
645
|
+
| `not` or `formula` with 0 children | `EXPR_CHILD_COUNT_INVALID` |
|
|
646
|
+
| `implies` or `iff` without exactly 2 children with distinct positions | `EXPR_BINARY_POSITIONS_INVALID` |
|
|
647
|
+
| Expression references an undeclared variable | `EXPR_VARIABLE_UNDECLARED` |
|
|
648
|
+
|
|
649
|
+
### Variables — prevented at construction time
|
|
650
|
+
|
|
651
|
+
| Invalid construction | What happens |
|
|
652
|
+
| --------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
653
|
+
| Duplicate variable `id` | Throws |
|
|
654
|
+
| Duplicate variable `symbol` | Throws |
|
|
655
|
+
| Variable `argumentId`/`argumentVersion` doesn't match the engine | Throws |
|
|
656
|
+
| Claim-bound variable references a non-existent claim/version | Throws |
|
|
657
|
+
| Premise-bound variable references a non-existent premise (internal) | Throws |
|
|
658
|
+
| Adding a premise-bound variable via `addVariable()` | Throws — use `bindVariableToPremise` or `bindVariableToExternalPremise` |
|
|
659
|
+
| Circular binding (variable → premise → expression → variable, transitively) | Throws |
|
|
660
|
+
| `bindVariableToPremise` with `boundArgumentId !== engine.argumentId` | Throws — use `bindVariableToExternalPremise` for cross-argument |
|
|
661
|
+
| `bindVariableToExternalPremise` with `boundArgumentId === engine.argumentId` | Throws — use `bindVariableToPremise` for internal |
|
|
662
|
+
| External binding rejected by `canBind()` policy | Throws |
|
|
663
|
+
| Renaming a variable to a symbol already in use | Throws |
|
|
664
|
+
| Changing a variable's binding type (claim → premise or vice versa) via `updateVariable` | Throws — delete and re-create |
|
|
665
|
+
|
|
666
|
+
### Variables — detected by validation
|
|
667
|
+
|
|
668
|
+
| Invalid construction | Error code | Severity |
|
|
669
|
+
| -------------------------------------------------- | -------------------------- | -------- |
|
|
670
|
+
| Premise-bound variable references an empty premise | `EXPR_BOUND_PREMISE_EMPTY` | Warning |
|
|
671
|
+
|
|
672
|
+
### Premises — prevented at construction time
|
|
673
|
+
|
|
674
|
+
| Invalid construction | What happens |
|
|
675
|
+
| --------------------------------------------------------------- | ------------ |
|
|
676
|
+
| Duplicate premise ID | Throws |
|
|
677
|
+
| Adding a second root expression (`parentId: null`) to a premise | Throws |
|
|
678
|
+
|
|
679
|
+
### Premises — detected by validation
|
|
680
|
+
|
|
681
|
+
| Invalid construction | Error code |
|
|
682
|
+
| ------------------------------------------------ | ----------------------- |
|
|
683
|
+
| Premise has no expressions | `PREMISE_EMPTY` |
|
|
684
|
+
| Premise has expressions but no root | `PREMISE_ROOT_MISSING` |
|
|
685
|
+
| `rootExpressionId` doesn't match the actual root | `PREMISE_ROOT_MISMATCH` |
|
|
686
|
+
|
|
687
|
+
### Argument — detected by validation
|
|
688
|
+
|
|
689
|
+
| Invalid construction | Error code |
|
|
690
|
+
| ----------------------------------------------------------- | -------------------------------------- |
|
|
691
|
+
| No conclusion premise designated | `ARGUMENT_NO_CONCLUSION` |
|
|
692
|
+
| Conclusion premise ID points to a non-existent premise | `ARGUMENT_CONCLUSION_NOT_FOUND` |
|
|
693
|
+
| Same variable ID used with multiple symbols across premises | `ARGUMENT_VARIABLE_ID_SYMBOL_MISMATCH` |
|
|
694
|
+
| Same variable symbol used with multiple IDs across premises | `ARGUMENT_VARIABLE_SYMBOL_AMBIGUOUS` |
|
|
695
|
+
|
|
696
|
+
### Removal cascades
|
|
697
|
+
|
|
698
|
+
These are not errors — they're intentional structural maintenance:
|
|
699
|
+
|
|
700
|
+
| Trigger | Cascade behavior |
|
|
701
|
+
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
702
|
+
| `removeVariable(id)` | All expressions referencing the variable are deleted across all premises, triggering operator collapse |
|
|
703
|
+
| `removePremise(id)` | All variables bound to the premise are removed (which cascades to their expressions). If the premise was the conclusion, the conclusion becomes unset. |
|
|
704
|
+
| `removeExpression(id)` | The expression's subtree is deleted. Ancestor operators with 0 remaining children are deleted. Operators with 1 remaining child promote that child into their slot (operator collapse). Promotions are checked against nesting and root-only rules. |
|
|
705
|
+
|
|
706
|
+
### Grammar configuration
|
|
707
|
+
|
|
708
|
+
Two options on `grammarConfig` control expression tree strictness:
|
|
709
|
+
|
|
710
|
+
| Option | Default | Effect |
|
|
711
|
+
| -------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
712
|
+
| `enforceFormulaBetweenOperators` | `true` | When `true`, non-`not` operators cannot be direct children of operators — a `formula` buffer is required. |
|
|
713
|
+
| `autoNormalize` | `false` | When `true`, `addExpression` auto-inserts `formula` buffers instead of throwing. Only applies to `addExpression` and `loadExpressions` — `insertExpression`, `wrapExpression`, and `removeExpression` always enforce or throw. |
|
|
714
|
+
|
|
715
|
+
`PERMISSIVE_GRAMMAR_CONFIG` (`{ enforceFormulaBetweenOperators: false, autoNormalize: false }`) is used by `fromSnapshot`/`fromData` to load previously saved trees without re-validation.
|
|
716
|
+
|
|
523
717
|
## API Reference
|
|
524
718
|
|
|
525
719
|
See [docs/api-reference.md](docs/api-reference.md) for the full API reference covering `ArgumentEngine`, `PremiseEngine`, standalone functions, position utilities, and types.
|
|
@@ -5,6 +5,8 @@ export declare const BasicsArgumentSchema: Type.TIntersect<[Type.TObject<{
|
|
|
5
5
|
checksum: Type.TString;
|
|
6
6
|
descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
7
7
|
combinedChecksum: Type.TString;
|
|
8
|
+
forkedFromArgumentId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
9
|
+
forkedFromArgumentVersion: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
8
10
|
}>, Type.TObject<{
|
|
9
11
|
title: Type.TString;
|
|
10
12
|
description: Type.TOptional<Type.TString>;
|
|
@@ -27,6 +29,9 @@ export declare const BasicsPremiseSchema: Type.TIntersect<[Type.TObject<{
|
|
|
27
29
|
checksum: Type.TString;
|
|
28
30
|
descendantChecksum: Type.TUnion<[Type.TString, Type.TNull]>;
|
|
29
31
|
combinedChecksum: Type.TString;
|
|
32
|
+
forkedFromPremiseId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
33
|
+
forkedFromArgumentId: Type.TOptional<Type.TUnion<[Type.TString, Type.TNull]>>;
|
|
34
|
+
forkedFromArgumentVersion: Type.TOptional<Type.TUnion<[Type.TNumber, Type.TNull]>>;
|
|
30
35
|
}>, Type.TObject<{
|
|
31
36
|
title: Type.TString;
|
|
32
37
|
}>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemata.d.ts","sourceRoot":"","sources":["../../../src/extensions/basics/schemata.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAO3C,eAAO,MAAM,oBAAoB
|
|
1
|
+
{"version":3,"file":"schemata.d.ts","sourceRoot":"","sources":["../../../src/extensions/basics/schemata.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAO3C,eAAO,MAAM,oBAAoB;;;;;;;;;;;IAM/B,CAAA;AACF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,iBAAiB;;;;;;;;IAM5B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA;AAE3D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;IAK9B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAA;AA4B/D,eAAO,MAAM,mBAAmB,cAI9B,CAAA"}
|
package/dist/lib/consts.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/lib/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,mBAAmB,
|
|
1
|
+
{"version":3,"file":"consts.d.ts","sourceRoot":"","sources":["../../src/lib/consts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAE9D,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAAC,mBAAmB,CAsDjE,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACxC,mBAAmB,GAAG,SAAS,CAwBjC;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CACnC,MAAM,EAAE,mBAAmB,GAAG,SAAS,GACxC,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,GAAG,SAAS,CAmBtC;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAChC,UAAU,EAAE,mBAAmB,GAChC,mBAAmB,CAkBrB"}
|
package/dist/lib/consts.js
CHANGED
|
@@ -9,6 +9,10 @@ export const DEFAULT_CHECKSUM_CONFIG = {
|
|
|
9
9
|
"premiseId",
|
|
10
10
|
"variableId",
|
|
11
11
|
"operator",
|
|
12
|
+
"forkedFromExpressionId",
|
|
13
|
+
"forkedFromPremiseId",
|
|
14
|
+
"forkedFromArgumentId",
|
|
15
|
+
"forkedFromArgumentVersion",
|
|
12
16
|
]),
|
|
13
17
|
variableFields: new Set([
|
|
14
18
|
"id",
|
|
@@ -20,9 +24,24 @@ export const DEFAULT_CHECKSUM_CONFIG = {
|
|
|
20
24
|
"boundPremiseId",
|
|
21
25
|
"boundArgumentId",
|
|
22
26
|
"boundArgumentVersion",
|
|
27
|
+
"forkedFromVariableId",
|
|
28
|
+
"forkedFromArgumentId",
|
|
29
|
+
"forkedFromArgumentVersion",
|
|
30
|
+
]),
|
|
31
|
+
premiseFields: new Set([
|
|
32
|
+
"id",
|
|
33
|
+
"argumentId",
|
|
34
|
+
"argumentVersion",
|
|
35
|
+
"forkedFromPremiseId",
|
|
36
|
+
"forkedFromArgumentId",
|
|
37
|
+
"forkedFromArgumentVersion",
|
|
38
|
+
]),
|
|
39
|
+
argumentFields: new Set([
|
|
40
|
+
"id",
|
|
41
|
+
"version",
|
|
42
|
+
"forkedFromArgumentId",
|
|
43
|
+
"forkedFromArgumentVersion",
|
|
23
44
|
]),
|
|
24
|
-
premiseFields: new Set(["id", "argumentId", "argumentVersion"]),
|
|
25
|
-
argumentFields: new Set(["id", "version"]),
|
|
26
45
|
roleFields: new Set(["conclusionPremiseId"]),
|
|
27
46
|
claimFields: new Set(["id", "version"]),
|
|
28
47
|
sourceFields: new Set(["id", "version"]),
|
package/dist/lib/consts.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/lib/consts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAkC;IAClE,gBAAgB,EAAE,IAAI,GAAG,CAAC;QACtB,IAAI;QACJ,MAAM;QACN,UAAU;QACV,UAAU;QACV,YAAY;QACZ,iBAAiB;QACjB,WAAW;QACX,YAAY;QACZ,UAAU;
|
|
1
|
+
{"version":3,"file":"consts.js","sourceRoot":"","sources":["../../src/lib/consts.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,uBAAuB,GAAkC;IAClE,gBAAgB,EAAE,IAAI,GAAG,CAAC;QACtB,IAAI;QACJ,MAAM;QACN,UAAU;QACV,UAAU;QACV,YAAY;QACZ,iBAAiB;QACjB,WAAW;QACX,YAAY;QACZ,UAAU;QACV,wBAAwB;QACxB,qBAAqB;QACrB,sBAAsB;QACtB,2BAA2B;KAC9B,CAAC;IACF,cAAc,EAAE,IAAI,GAAG,CAAC;QACpB,IAAI;QACJ,QAAQ;QACR,YAAY;QACZ,iBAAiB;QACjB,SAAS;QACT,cAAc;QACd,gBAAgB;QAChB,iBAAiB;QACjB,sBAAsB;QACtB,sBAAsB;QACtB,sBAAsB;QACtB,2BAA2B;KAC9B,CAAC;IACF,aAAa,EAAE,IAAI,GAAG,CAAC;QACnB,IAAI;QACJ,YAAY;QACZ,iBAAiB;QACjB,qBAAqB;QACrB,sBAAsB;QACtB,2BAA2B;KAC9B,CAAC;IACF,cAAc,EAAE,IAAI,GAAG,CAAC;QACpB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;QAClB,gBAAgB;QAChB,eAAe;QACf,gBAAgB;QAChB,YAAY;QACZ,aAAa;QACb,cAAc;QACd,8BAA8B;KACxB,CAAA;IACV,MAAM,MAAM,GAA6B,EAAE,CAAA;IAC3C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,CAAA;QACzB,IAAI,KAAK,KAAK,SAAS;YAAE,SAAQ;QACjC,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IACnC,CAAC;IACD,OAAO,MAAM,CAAA;AACjB,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAChC,UAA+B;IAE/B,MAAM,IAAI,GAAG;QACT,kBAAkB;QAClB,gBAAgB;QAChB,eAAe;QACf,gBAAgB;QAChB,YAAY;QACZ,aAAa;QACb,cAAc;QACd,8BAA8B;KACxB,CAAA;IACV,MAAM,MAAM,GAAwB,EAAE,CAAA;IACtC,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACrB,MAAM,IAAI,GAAG,uBAAuB,CAAC,GAAG,CAAE,CAAA;QAC1C,MAAM,KAAK,GAAG,UAAU,CAAC,GAAG,CAAC,CAAA;QAC7B,MAAM,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,IAAI,CAAC,CAAA;IACtE,CAAC;IACD,OAAO,MAAM,CAAA;AACjB,CAAC"}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { type TClaimBoundVariable, type TPremiseBoundVariable, type TCoreArgument, type TCoreClaim, type TCoreClaimSourceAssociation, type TCorePremise, type TCorePropositionalExpression, type TCorePropositionalVariable, type TOptionalChecksum, type TCoreSource } from "../schemata/index.js";
|
|
2
2
|
import type { TCoreArgumentEvaluationOptions, TCoreArgumentEvaluationResult, TCoreArgumentRoleState, TCoreExpressionAssignment, TCoreValidationResult, TCoreValidityCheckOptions, TCoreValidityCheckResult } from "../types/evaluation.js";
|
|
3
3
|
import type { TCoreChecksumConfig } from "../types/checksum.js";
|
|
4
|
+
import type { TForkArgumentOptions, TForkArgumentResult } from "../types/fork.js";
|
|
4
5
|
import { type TGrammarConfig } from "../types/grammar.js";
|
|
5
6
|
import type { TCorePositionConfig } from "../utils/position.js";
|
|
7
|
+
import type { TInvariantValidationResult } from "../types/validation.js";
|
|
6
8
|
import type { TCoreMutationResult } from "../types/mutation.js";
|
|
7
9
|
import type { TReactiveSnapshot } from "../types/reactive.js";
|
|
8
10
|
import type { TExpressionInput } from "./expression-manager.js";
|
|
@@ -40,6 +42,7 @@ export declare class ArgumentEngine<TArg extends TCoreArgument = TCoreArgument,
|
|
|
40
42
|
private checksumConfig?;
|
|
41
43
|
private positionConfig?;
|
|
42
44
|
private grammarConfig?;
|
|
45
|
+
private restoringFromSnapshot;
|
|
43
46
|
private checksumDirty;
|
|
44
47
|
private cachedMetaChecksum;
|
|
45
48
|
private cachedDescendantChecksum;
|
|
@@ -55,8 +58,13 @@ export declare class ArgumentEngine<TArg extends TCoreArgument = TCoreArgument,
|
|
|
55
58
|
private wouldCreateCycle;
|
|
56
59
|
private wireCircularityCheck;
|
|
57
60
|
private wireEmptyBoundPremiseCheck;
|
|
61
|
+
private generateUniqueSymbol;
|
|
58
62
|
subscribe: (listener: () => void) => (() => void);
|
|
59
63
|
protected notifySubscribers(): void;
|
|
64
|
+
private static readonly skipValidationResult;
|
|
65
|
+
private suppressPremiseValidation;
|
|
66
|
+
private restorePremiseValidation;
|
|
67
|
+
protected withValidation<T>(fn: () => T): T;
|
|
60
68
|
getSnapshot: () => TReactiveSnapshot<TArg, TPremise, TExpr, TVar>;
|
|
61
69
|
protected buildReactiveSnapshot(): TReactiveSnapshot<TArg, TPremise, TExpr, TVar>;
|
|
62
70
|
private buildVariablesRecord;
|
|
@@ -65,8 +73,8 @@ export declare class ArgumentEngine<TArg extends TCoreArgument = TCoreArgument,
|
|
|
65
73
|
private markReactiveDirty;
|
|
66
74
|
getArgument(): TArg;
|
|
67
75
|
toDisplayString(): string;
|
|
68
|
-
createPremise(extras?: Record<string, unknown
|
|
69
|
-
createPremiseWithId(id: string, extras?: Record<string, unknown
|
|
76
|
+
createPremise(extras?: Record<string, unknown>, symbol?: string): TCoreMutationResult<PremiseEngine<TArg, TPremise, TExpr, TVar>, TExpr, TVar, TPremise, TArg>;
|
|
77
|
+
createPremiseWithId(id: string, extras?: Record<string, unknown>, symbol?: string): TCoreMutationResult<PremiseEngine<TArg, TPremise, TExpr, TVar>, TExpr, TVar, TPremise, TArg>;
|
|
70
78
|
removePremise(premiseId: string): TCoreMutationResult<TPremise | undefined, TExpr, TVar, TPremise, TArg>;
|
|
71
79
|
getPremise(premiseId: string): PremiseEngine<TArg, TPremise, TExpr, TVar> | undefined;
|
|
72
80
|
hasPremise(premiseId: string): boolean;
|
|
@@ -74,7 +82,10 @@ export declare class ArgumentEngine<TArg extends TCoreArgument = TCoreArgument,
|
|
|
74
82
|
listPremises(): PremiseEngine<TArg, TPremise, TExpr, TVar>[];
|
|
75
83
|
addVariable(variable: TOptionalChecksum<TClaimBoundVariable> & Record<string, unknown>): TCoreMutationResult<TVar, TExpr, TVar, TPremise, TArg>;
|
|
76
84
|
bindVariableToPremise(variable: TOptionalChecksum<TPremiseBoundVariable> & Record<string, unknown>): TCoreMutationResult<TVar, TExpr, TVar, TPremise, TArg>;
|
|
85
|
+
bindVariableToExternalPremise(variable: TOptionalChecksum<TPremiseBoundVariable> & Record<string, unknown>): TCoreMutationResult<TVar, TExpr, TVar, TPremise, TArg>;
|
|
86
|
+
bindVariableToArgument(variable: Omit<TOptionalChecksum<TPremiseBoundVariable>, "boundPremiseId"> & Record<string, unknown>, conclusionPremiseId: string): TCoreMutationResult<TVar, TExpr, TVar, TPremise, TArg>;
|
|
77
87
|
updateVariable(variableId: string, updates: Record<string, unknown>): TCoreMutationResult<TVar | undefined, TExpr, TVar, TPremise, TArg>;
|
|
88
|
+
private removeVariableCore;
|
|
78
89
|
removeVariable(variableId: string): TCoreMutationResult<TVar | undefined, TExpr, TVar, TPremise, TArg>;
|
|
79
90
|
getVariables(): TVar[];
|
|
80
91
|
getVariable(variableId: string): TVar | undefined;
|
|
@@ -115,6 +126,7 @@ export declare class ArgumentEngine<TArg extends TCoreArgument = TCoreArgument,
|
|
|
115
126
|
*/
|
|
116
127
|
private static verifyDataChecksums;
|
|
117
128
|
rollback(snapshot: TArgumentEngineSnapshot<TArg, TPremise, TExpr, TVar>): void;
|
|
129
|
+
private rollbackInternal;
|
|
118
130
|
checksum(): string;
|
|
119
131
|
descendantChecksum(): string | null;
|
|
120
132
|
combinedChecksum(): string;
|
|
@@ -135,8 +147,45 @@ export declare class ArgumentEngine<TArg extends TCoreArgument = TCoreArgument,
|
|
|
135
147
|
premiseIds: string[];
|
|
136
148
|
}>;
|
|
137
149
|
};
|
|
150
|
+
/**
|
|
151
|
+
* Validates after a PremiseEngine mutation. Identical to `validate()` but
|
|
152
|
+
* clears cached argument-level checksums first so the checksum-stability
|
|
153
|
+
* check is skipped (checksums are known to be dirty after a premise
|
|
154
|
+
* mutation).
|
|
155
|
+
*/
|
|
156
|
+
/**
|
|
157
|
+
* Lightweight validation triggered after a PremiseEngine mutation.
|
|
158
|
+
* Skips per-premise deep validation (which is O(n) over all premises)
|
|
159
|
+
* and argument-level checksum stability checks (checksums are known to
|
|
160
|
+
* be dirty). Only checks argument-level cross-references that a
|
|
161
|
+
* PremiseEngine mutation could affect.
|
|
162
|
+
*/
|
|
163
|
+
private validateAfterPremiseMutation;
|
|
164
|
+
validate(): TInvariantValidationResult;
|
|
138
165
|
validateEvaluability(): TCoreValidationResult;
|
|
139
166
|
evaluate(assignment: TCoreExpressionAssignment, options?: TCoreArgumentEvaluationOptions): TCoreArgumentEvaluationResult;
|
|
140
167
|
checkValidity(options?: TCoreValidityCheckOptions): TCoreValidityCheckResult;
|
|
168
|
+
/**
|
|
169
|
+
* Override point for subclasses to prevent forking. When this returns
|
|
170
|
+
* `false`, `forkArgument` will throw.
|
|
171
|
+
*/
|
|
172
|
+
protected canFork(): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Override point for subclasses to restrict cross-argument bindings.
|
|
175
|
+
* When this returns `false`, `bindVariableToExternalPremise` will throw.
|
|
176
|
+
*/
|
|
177
|
+
protected canBind(_boundArgumentId: string, _boundArgumentVersion: number): boolean;
|
|
178
|
+
/**
|
|
179
|
+
* Creates an independent copy of this argument under a new argument ID.
|
|
180
|
+
*
|
|
181
|
+
* Every premise, expression, and variable receives a fresh ID (via
|
|
182
|
+
* `options.generateId`, defaulting to `crypto.randomUUID`). All internal
|
|
183
|
+
* cross-references are remapped to the new IDs. Each forked entity carries
|
|
184
|
+
* `forkedFrom*` metadata pointing back to the originals.
|
|
185
|
+
*
|
|
186
|
+
* The returned engine is fully independent — mutations on either the
|
|
187
|
+
* source or the fork do not affect the other.
|
|
188
|
+
*/
|
|
189
|
+
forkArgument(newArgumentId: string, claimLibrary: TClaimLookup<TClaim>, sourceLibrary: TSourceLookup<TSource>, claimSourceLibrary: TClaimSourceLookup<TAssoc>, options?: TForkArgumentOptions): TForkArgumentResult<TArg, TPremise, TExpr, TVar>;
|
|
141
190
|
}
|
|
142
191
|
//# sourceMappingURL=argument-engine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"argument-engine.d.ts","sourceRoot":"","sources":["../../../src/lib/core/argument-engine.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"argument-engine.d.ts","sourceRoot":"","sources":["../../../src/lib/core/argument-engine.ts"],"names":[],"mappings":"AAEA,OAAO,EAIH,KAAK,mBAAmB,EACxB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,2BAA2B,EAChC,KAAK,YAAY,EACj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