@polintpro/proposit-core 0.1.2 → 0.1.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 +47 -47
- package/dist/cli/commands/expressions.js.map +1 -1
- package/dist/cli/commands/premises.d.ts.map +1 -1
- package/dist/cli/commands/premises.js +14 -4
- package/dist/cli/commands/premises.js.map +1 -1
- package/dist/cli/engine.js.map +1 -1
- package/dist/cli/storage/analysis.d.ts +3 -3
- package/dist/cli/storage/analysis.d.ts.map +1 -1
- package/dist/cli/storage/analysis.js +3 -3
- package/dist/cli/storage/analysis.js.map +1 -1
- package/dist/cli/storage/arguments.d.ts +5 -5
- package/dist/cli/storage/arguments.d.ts.map +1 -1
- package/dist/cli/storage/arguments.js +3 -3
- package/dist/cli/storage/arguments.js.map +1 -1
- package/dist/cli/storage/premises.d.ts +5 -5
- package/dist/cli/storage/premises.d.ts.map +1 -1
- package/dist/cli/storage/premises.js +3 -3
- package/dist/cli/storage/premises.js.map +1 -1
- package/dist/cli/storage/roles.d.ts +3 -3
- package/dist/cli/storage/roles.d.ts.map +1 -1
- package/dist/cli/storage/roles.js +2 -2
- package/dist/cli/storage/roles.js.map +1 -1
- package/dist/cli/storage/variables.d.ts +3 -3
- package/dist/cli/storage/variables.d.ts.map +1 -1
- package/dist/cli/storage/variables.js +2 -2
- package/dist/cli/storage/variables.js.map +1 -1
- package/dist/cli.js +5 -5
- package/dist/cli.js.map +1 -1
- package/dist/lib/core/ArgumentEngine.d.ts +10 -10
- package/dist/lib/core/ArgumentEngine.d.ts.map +1 -1
- package/dist/lib/core/ArgumentEngine.js +2 -2
- package/dist/lib/core/ArgumentEngine.js.map +1 -1
- package/dist/lib/core/ExpressionManager.d.ts +8 -8
- package/dist/lib/core/ExpressionManager.d.ts.map +1 -1
- package/dist/lib/core/ExpressionManager.js.map +1 -1
- package/dist/lib/core/PremiseManager.d.ts +29 -22
- package/dist/lib/core/PremiseManager.d.ts.map +1 -1
- package/dist/lib/core/PremiseManager.js +18 -12
- package/dist/lib/core/PremiseManager.js.map +1 -1
- package/dist/lib/core/VariableManager.d.ts +5 -5
- package/dist/lib/core/VariableManager.d.ts.map +1 -1
- package/dist/lib/core/VariableManager.js.map +1 -1
- package/dist/lib/core/evaluation/shared.d.ts +4 -4
- package/dist/lib/core/evaluation/shared.d.ts.map +1 -1
- package/dist/lib/core/evaluation/shared.js.map +1 -1
- package/dist/lib/schemata/analysis.d.ts +2 -2
- package/dist/lib/schemata/analysis.d.ts.map +1 -1
- package/dist/lib/schemata/analysis.js +1 -1
- package/dist/lib/schemata/analysis.js.map +1 -1
- package/dist/lib/schemata/argument.d.ts +12 -12
- package/dist/lib/schemata/argument.d.ts.map +1 -1
- package/dist/lib/schemata/argument.js +11 -11
- package/dist/lib/schemata/argument.js.map +1 -1
- package/dist/lib/schemata/propositional.d.ts +21 -23
- package/dist/lib/schemata/propositional.d.ts.map +1 -1
- package/dist/lib/schemata/propositional.js +18 -28
- package/dist/lib/schemata/propositional.js.map +1 -1
- package/dist/lib/types/evaluation.d.ts +35 -35
- package/dist/lib/types/evaluation.d.ts.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VariableManager.js","sourceRoot":"","sources":["../../../src/lib/core/VariableManager.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,eAAe;IAChB,SAAS,
|
|
1
|
+
{"version":3,"file":"VariableManager.js","sourceRoot":"","sources":["../../../src/lib/core/VariableManager.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,eAAe;IAChB,SAAS,CAAyC;IAClD,eAAe,CAAa;IAEpC,YAAY,mBAAiD,EAAE;QAC3D,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAE,CAAA;QAC1B,IAAI,CAAC,eAAe,GAAG,IAAI,GAAG,EAAE,CAAA;QAEhC,KAAK,MAAM,QAAQ,IAAI,gBAAgB,EAAE,CAAC;YACtC,IAAI,CAAC,WAAW,CAA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CAAC,CAAA;IACzC,CAAC;IAEM,cAAc,CAAC,UAAkB,EAAE,SAAiB;QACvD,MAAM,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,CAAA;QAC/C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACZ,MAAM,IAAI,KAAK,CAAC,aAAa,UAAU,mBAAmB,CAAC,CAAA;QAC/D,CAAC;QACD,IACI,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC;YACnC,QAAQ,CAAC,MAAM,KAAK,SAAS,EAC/B,CAAC;YACC,MAAM,IAAI,KAAK,CAAC,oBAAoB,SAAS,sBAAsB,CAAC,CAAA;QACxE,CAAC;QACD,IAAI,CAAC,eAAe,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAA;QAC5C,IAAI,CAAC,eAAe,CAAC,GAAG,CAAC,SAAS,CAAC,CAAA;QACnC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,EAAE,EAAE,GAAG,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAA;IACtE,CAAC;CACJ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function makeValidationResult(issues:
|
|
3
|
-
export declare function makeErrorIssue(issue: Omit<
|
|
1
|
+
import type { TCoreDirectionalVacuity, TCoreValidationIssue, TCoreValidationResult } from "../../types/evaluation.js";
|
|
2
|
+
export declare function makeValidationResult(issues: TCoreValidationIssue[]): TCoreValidationResult;
|
|
3
|
+
export declare function makeErrorIssue(issue: Omit<TCoreValidationIssue, "severity">): TCoreValidationIssue;
|
|
4
4
|
export declare function implicationValue(antecedent: boolean, consequent: boolean): boolean;
|
|
5
|
-
export declare function buildDirectionalVacuity(antecedentTrue: boolean, consequentTrue: boolean):
|
|
5
|
+
export declare function buildDirectionalVacuity(antecedentTrue: boolean, consequentTrue: boolean): TCoreDirectionalVacuity;
|
|
6
6
|
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/evaluation/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../../src/lib/core/evaluation/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,uBAAuB,EACvB,oBAAoB,EACpB,qBAAqB,EACxB,MAAM,2BAA2B,CAAA;AAElC,wBAAgB,oBAAoB,CAChC,MAAM,EAAE,oBAAoB,EAAE,GAC/B,qBAAqB,CAKvB;AAED,wBAAgB,cAAc,CAC1B,KAAK,EAAE,IAAI,CAAC,oBAAoB,EAAE,UAAU,CAAC,GAC9C,oBAAoB,CAEtB;AAED,wBAAgB,gBAAgB,CAC5B,UAAU,EAAE,OAAO,EACnB,UAAU,EAAE,OAAO,GACpB,OAAO,CAET;AAED,wBAAgB,uBAAuB,CACnC,cAAc,EAAE,OAAO,EACvB,cAAc,EAAE,OAAO,GACxB,uBAAuB,CASzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/lib/core/evaluation/shared.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,oBAAoB,CAChC,
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../../../../src/lib/core/evaluation/shared.ts"],"names":[],"mappings":"AAMA,MAAM,UAAU,oBAAoB,CAChC,MAA8B;IAE9B,OAAO;QACH,EAAE,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,KAAK,OAAO,CAAC;QACvD,MAAM;KACT,CAAA;AACL,CAAC;AAED,MAAM,UAAU,cAAc,CAC1B,KAA6C;IAE7C,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,CAAA;AAC1C,CAAC;AAED,MAAM,UAAU,gBAAgB,CAC5B,UAAmB,EACnB,UAAmB;IAEnB,OAAO,CAAC,UAAU,IAAI,UAAU,CAAA;AACpC,CAAC;AAED,MAAM,UAAU,uBAAuB,CACnC,cAAuB,EACvB,cAAuB;IAEvB,MAAM,WAAW,GAAG,gBAAgB,CAAC,cAAc,EAAE,cAAc,CAAC,CAAA;IACpE,OAAO;QACH,cAAc;QACd,cAAc;QACd,gBAAgB,EAAE,WAAW;QAC7B,eAAe,EAAE,CAAC,cAAc;QAChC,KAAK,EAAE,cAAc;KACxB,CAAA;AACL,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import Type, { type Static } from "typebox";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CoreAnalysisFileSchema: Type.TObject<{
|
|
3
3
|
argumentId: Type.TString;
|
|
4
4
|
argumentVersion: Type.TNumber;
|
|
5
5
|
assignments: Type.TRecord<"^.*$", Type.TBoolean>;
|
|
6
6
|
}>;
|
|
7
|
-
export type
|
|
7
|
+
export type TCoreAnalysisFile = Static<typeof CoreAnalysisFileSchema>;
|
|
8
8
|
//# sourceMappingURL=analysis.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../../src/lib/schemata/analysis.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAG3C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"analysis.d.ts","sourceRoot":"","sources":["../../../src/lib/schemata/analysis.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAG3C,eAAO,MAAM,sBAAsB;;;;EAMjC,CAAA;AACF,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Type, {} from "typebox";
|
|
2
2
|
import { UUID } from "./shared.js";
|
|
3
|
-
export const
|
|
3
|
+
export const CoreAnalysisFileSchema = Type.Object({
|
|
4
4
|
argumentId: UUID,
|
|
5
5
|
argumentVersion: Type.Number(),
|
|
6
6
|
assignments: Type.Record(Type.String(), Type.Boolean(), {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis.js","sourceRoot":"","sources":["../../../src/lib/schemata/analysis.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"analysis.js","sourceRoot":"","sources":["../../../src/lib/schemata/analysis.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC9C,UAAU,EAAE,IAAI;IAChB,eAAe,EAAE,IAAI,CAAC,MAAM,EAAE;IAC9B,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,EAAE,IAAI,CAAC,OAAO,EAAE,EAAE;QACpD,WAAW,EAAE,wCAAwC;KACxD,CAAC;CACL,CAAC,CAAA"}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import Type, { type Static } from "typebox";
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const CoreArgumentMetaSchema: Type.TObject<{
|
|
3
3
|
id: Type.TString;
|
|
4
4
|
title: Type.TString;
|
|
5
5
|
description: Type.TString;
|
|
6
6
|
}>;
|
|
7
|
-
export type
|
|
8
|
-
export declare const
|
|
7
|
+
export type TCoreArgumentMeta = Static<typeof CoreArgumentMetaSchema>;
|
|
8
|
+
export declare const CoreArgumentVersionedSchema: Type.TObject<{
|
|
9
9
|
version: Type.TNumber;
|
|
10
10
|
createdAt: Type.TNumber;
|
|
11
11
|
}>;
|
|
12
|
-
export type
|
|
13
|
-
export declare const
|
|
12
|
+
export type TCoreArgumentVersioned = Static<typeof CoreArgumentVersionedSchema>;
|
|
13
|
+
export declare const CoreArgumentMutableDataSchema: Type.TObject<{
|
|
14
14
|
published: Type.TBoolean;
|
|
15
15
|
publishedAt: Type.TOptional<Type.TNumber>;
|
|
16
16
|
}>;
|
|
17
|
-
export type
|
|
18
|
-
export declare const
|
|
17
|
+
export type TCoreArgumentMutableData = Static<typeof CoreArgumentMutableDataSchema>;
|
|
18
|
+
export declare const CoreArgumentSchema: Type.TIntersect<[Type.TObject<{
|
|
19
19
|
id: Type.TString;
|
|
20
20
|
title: Type.TString;
|
|
21
21
|
description: Type.TString;
|
|
@@ -26,18 +26,18 @@ export declare const ArgumentSchema: Type.TIntersect<[Type.TObject<{
|
|
|
26
26
|
published: Type.TBoolean;
|
|
27
27
|
publishedAt: Type.TOptional<Type.TNumber>;
|
|
28
28
|
}>]>;
|
|
29
|
-
export type
|
|
30
|
-
export declare const
|
|
29
|
+
export type TCoreArgument = Static<typeof CoreArgumentSchema>;
|
|
30
|
+
export declare const CoreArgumentVersionMetaSchema: Type.TIntersect<[Type.TObject<{
|
|
31
31
|
version: Type.TNumber;
|
|
32
32
|
createdAt: Type.TNumber;
|
|
33
33
|
}>, Type.TObject<{
|
|
34
34
|
published: Type.TBoolean;
|
|
35
35
|
publishedAt: Type.TOptional<Type.TNumber>;
|
|
36
36
|
}>]>;
|
|
37
|
-
export type
|
|
38
|
-
export declare const
|
|
37
|
+
export type TCoreArgumentVersionMeta = Static<typeof CoreArgumentVersionMetaSchema>;
|
|
38
|
+
export declare const CoreArgumentRoleStateSchema: Type.TObject<{
|
|
39
39
|
conclusionPremiseId: Type.TOptional<Type.TString>;
|
|
40
40
|
supportingPremiseIds: Type.TArray<Type.TString>;
|
|
41
41
|
}>;
|
|
42
|
-
export type
|
|
42
|
+
export type TCoreArgumentRoleState = Static<typeof CoreArgumentRoleStateSchema>;
|
|
43
43
|
//# sourceMappingURL=argument.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"argument.d.ts","sourceRoot":"","sources":["../../../src/lib/schemata/argument.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAG3C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"argument.d.ts","sourceRoot":"","sources":["../../../src/lib/schemata/argument.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAG3C,eAAO,MAAM,sBAAsB;;;;EAUlC,CAAA;AACD,MAAM,MAAM,iBAAiB,GAAG,MAAM,CAAC,OAAO,sBAAsB,CAAC,CAAA;AAErE,eAAO,MAAM,2BAA2B;;;EAavC,CAAA;AACD,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E,eAAO,MAAM,6BAA6B;;;EAczC,CAAA;AACD,MAAM,MAAM,wBAAwB,GAAG,MAAM,CACzC,OAAO,6BAA6B,CACvC,CAAA;AAED,eAAO,MAAM,kBAAkB;;;;;;;;;;IAI7B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAE7D,eAAO,MAAM,6BAA6B;;;;;;IAGxC,CAAA;AACF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CACzC,OAAO,6BAA6B,CACvC,CAAA;AAED,eAAO,MAAM,2BAA2B;;;EAGtC,CAAA;AACF,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import Type, {} from "typebox";
|
|
2
2
|
import { UUID } from "./shared.js";
|
|
3
|
-
export const
|
|
3
|
+
export const CoreArgumentMetaSchema = Type.Object({
|
|
4
4
|
id: UUID,
|
|
5
5
|
title: Type.String(),
|
|
6
6
|
description: Type.String(),
|
|
7
7
|
}, {
|
|
8
8
|
description: "Metadata for an argument that does not change for different versions of the same argument.",
|
|
9
9
|
});
|
|
10
|
-
export const
|
|
10
|
+
export const CoreArgumentVersionedSchema = Type.Object({
|
|
11
11
|
version: Type.Number(),
|
|
12
12
|
createdAt: Type.Number({
|
|
13
13
|
description: "Unix timestamp in milliseconds of when the argument was created.",
|
|
@@ -16,7 +16,7 @@ export const ArgumentVersionedSchema = Type.Object({
|
|
|
16
16
|
}, {
|
|
17
17
|
description: "Data for an argument that will differ between different versions of the same argument",
|
|
18
18
|
});
|
|
19
|
-
export const
|
|
19
|
+
export const CoreArgumentMutableDataSchema = Type.Object({
|
|
20
20
|
published: Type.Boolean(),
|
|
21
21
|
publishedAt: Type.Optional(Type.Number({
|
|
22
22
|
description: "Unix timestamp in milliseconds of when the argument was published.",
|
|
@@ -24,16 +24,16 @@ export const ArgumentMutableDataSchema = Type.Object({
|
|
|
24
24
|
}, {
|
|
25
25
|
description: "Data for an argument that can be changed (e.g. published status).",
|
|
26
26
|
});
|
|
27
|
-
export const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
export const CoreArgumentSchema = Type.Intersect([
|
|
28
|
+
CoreArgumentMetaSchema,
|
|
29
|
+
CoreArgumentVersionedSchema,
|
|
30
|
+
CoreArgumentMutableDataSchema,
|
|
31
31
|
]);
|
|
32
|
-
export const
|
|
33
|
-
|
|
34
|
-
|
|
32
|
+
export const CoreArgumentVersionMetaSchema = Type.Intersect([
|
|
33
|
+
CoreArgumentVersionedSchema,
|
|
34
|
+
CoreArgumentMutableDataSchema,
|
|
35
35
|
]);
|
|
36
|
-
export const
|
|
36
|
+
export const CoreArgumentRoleStateSchema = Type.Object({
|
|
37
37
|
conclusionPremiseId: Type.Optional(UUID),
|
|
38
38
|
supportingPremiseIds: Type.Array(UUID),
|
|
39
39
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"argument.js","sourceRoot":"","sources":["../../../src/lib/schemata/argument.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"argument.js","sourceRoot":"","sources":["../../../src/lib/schemata/argument.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,MAAM,aAAa,CAAA;AAElC,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,MAAM,CAC7C;IACI,EAAE,EAAE,IAAI;IACR,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE;IACpB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;CAC7B,EACD;IACI,WAAW,EACP,4FAA4F;CACnG,CACJ,CAAA;AAGD,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC,MAAM,CAClD;IACI,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;IACtB,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC;QACnB,WAAW,EACP,kEAAkE;QACtE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE;KAC5B,CAAC;CACL,EACD;IACI,WAAW,EACP,uFAAuF;CAC9F,CACJ,CAAA;AAGD,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,MAAM,CACpD;IACI,SAAS,EAAE,IAAI,CAAC,OAAO,EAAE;IACzB,WAAW,EAAE,IAAI,CAAC,QAAQ,CACtB,IAAI,CAAC,MAAM,CAAC;QACR,WAAW,EACP,oEAAoE;KAC3E,CAAC,CACL;CACJ,EACD;IACI,WAAW,EACP,mEAAmE;CAC1E,CACJ,CAAA;AAKD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC,SAAS,CAAC;IAC7C,sBAAsB;IACtB,2BAA2B;IAC3B,6BAA6B;CAChC,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,6BAA6B,GAAG,IAAI,CAAC,SAAS,CAAC;IACxD,2BAA2B;IAC3B,6BAA6B;CAChC,CAAC,CAAA;AAKF,MAAM,CAAC,MAAM,2BAA2B,GAAG,IAAI,CAAC,MAAM,CAAC;IACnD,mBAAmB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IACxC,oBAAoB,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC;CACzC,CAAC,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import Type, { type Static } from "typebox";
|
|
2
|
-
export declare const
|
|
3
|
-
export type
|
|
4
|
-
export declare const
|
|
2
|
+
export declare const CorePropositionalExpressionTypes: Type.TUnion<[Type.TLiteral<"variable">, Type.TLiteral<"operator">, Type.TLiteral<"formula">]>;
|
|
3
|
+
export type TCorePropositionalExpressionTypes = Static<typeof CorePropositionalExpressionTypes>;
|
|
4
|
+
export declare const CorePropositionalVariableExpressionSchema: Type.TObject<{
|
|
5
5
|
id: Type.TString;
|
|
6
6
|
argumentId: Type.TString;
|
|
7
7
|
argumentVersion: Type.TNumber;
|
|
@@ -10,10 +10,10 @@ export declare const PropositionalVariableExpressionSchema: Type.TObject<{
|
|
|
10
10
|
type: Type.TLiteral<"variable">;
|
|
11
11
|
variableId: Type.TString;
|
|
12
12
|
}>;
|
|
13
|
-
export type
|
|
14
|
-
export declare const
|
|
15
|
-
export type
|
|
16
|
-
export declare const
|
|
13
|
+
export type TCorePropositionalVariableExpression = Static<typeof CorePropositionalVariableExpressionSchema>;
|
|
14
|
+
export declare const CoreLogicalOperatorType: Type.TUnion<[Type.TLiteral<"not">, Type.TLiteral<"and">, Type.TLiteral<"or">, Type.TLiteral<"implies">, Type.TLiteral<"iff">]>;
|
|
15
|
+
export type TCoreLogicalOperatorType = Static<typeof CoreLogicalOperatorType>;
|
|
16
|
+
export declare const CoreOperatorExpressionSchema: Type.TObject<{
|
|
17
17
|
id: Type.TString;
|
|
18
18
|
argumentId: Type.TString;
|
|
19
19
|
argumentVersion: Type.TNumber;
|
|
@@ -22,8 +22,8 @@ export declare const OperatorExpressionSchema: Type.TObject<{
|
|
|
22
22
|
type: Type.TLiteral<"operator">;
|
|
23
23
|
operator: Type.TUnion<[Type.TLiteral<"not">, Type.TLiteral<"and">, Type.TLiteral<"or">, Type.TLiteral<"implies">, Type.TLiteral<"iff">]>;
|
|
24
24
|
}>;
|
|
25
|
-
export type
|
|
26
|
-
export declare const
|
|
25
|
+
export type TCoreOperatorExpression = Static<typeof CoreOperatorExpressionSchema>;
|
|
26
|
+
export declare const CoreFormulaExpressionSchema: Type.TObject<{
|
|
27
27
|
id: Type.TString;
|
|
28
28
|
argumentId: Type.TString;
|
|
29
29
|
argumentVersion: Type.TNumber;
|
|
@@ -31,8 +31,8 @@ export declare const FormulaExpressionSchema: Type.TObject<{
|
|
|
31
31
|
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
32
32
|
type: Type.TLiteral<"formula">;
|
|
33
33
|
}>;
|
|
34
|
-
export type
|
|
35
|
-
export declare const
|
|
34
|
+
export type TCoreFormulaExpression = Static<typeof CoreFormulaExpressionSchema>;
|
|
35
|
+
export declare const CorePropositionalExpressionSchema: Type.TUnion<[Type.TObject<{
|
|
36
36
|
id: Type.TString;
|
|
37
37
|
argumentId: Type.TString;
|
|
38
38
|
argumentVersion: Type.TNumber;
|
|
@@ -56,23 +56,23 @@ export declare const PropositionalExpressionSchema: Type.TUnion<[Type.TObject<{
|
|
|
56
56
|
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
57
57
|
type: Type.TLiteral<"formula">;
|
|
58
58
|
}>]>;
|
|
59
|
-
export type
|
|
60
|
-
export type
|
|
59
|
+
export type TCorePropositionalExpressionCombined = Static<typeof CorePropositionalExpressionSchema>;
|
|
60
|
+
export type TCorePropositionalExpression<T extends TCorePropositionalExpressionTypes = TCorePropositionalExpressionTypes> = Extract<TCorePropositionalExpressionCombined, {
|
|
61
61
|
type: T;
|
|
62
62
|
}>;
|
|
63
|
-
export declare const
|
|
63
|
+
export declare const CorePropositionalVariableSchema: Type.TObject<{
|
|
64
64
|
id: Type.TString;
|
|
65
65
|
argumentId: Type.TString;
|
|
66
66
|
argumentVersion: Type.TNumber;
|
|
67
67
|
symbol: Type.TString;
|
|
68
68
|
}>;
|
|
69
|
-
export type
|
|
70
|
-
export declare const
|
|
69
|
+
export type TCorePropositionalVariable = Static<typeof CorePropositionalVariableSchema>;
|
|
70
|
+
export declare const CorePremiseMetaSchema: Type.TObject<{
|
|
71
71
|
id: Type.TString;
|
|
72
72
|
title: Type.TOptional<Type.TString>;
|
|
73
73
|
}>;
|
|
74
|
-
export type
|
|
75
|
-
export declare const
|
|
74
|
+
export type TCorePremiseMeta = Static<typeof CorePremiseMetaSchema>;
|
|
75
|
+
export declare const CorePremiseDataSchema: Type.TObject<{
|
|
76
76
|
rootExpressionId: Type.TOptional<Type.TString>;
|
|
77
77
|
variables: Type.TArray<Type.TString>;
|
|
78
78
|
expressions: Type.TArray<Type.TUnion<[Type.TObject<{
|
|
@@ -99,10 +99,9 @@ export declare const PremiseDataSchema: Type.TObject<{
|
|
|
99
99
|
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
100
100
|
type: Type.TLiteral<"formula">;
|
|
101
101
|
}>]>>;
|
|
102
|
-
type: Type.TUnion<[Type.TLiteral<"inference">, Type.TLiteral<"constraint">]>;
|
|
103
102
|
}>;
|
|
104
|
-
export type
|
|
105
|
-
export declare const
|
|
103
|
+
export type TCorePremiseData = Static<typeof CorePremiseDataSchema>;
|
|
104
|
+
export declare const CorePremiseSchema: Type.TIntersect<[Type.TObject<{
|
|
106
105
|
id: Type.TString;
|
|
107
106
|
title: Type.TOptional<Type.TString>;
|
|
108
107
|
}>, Type.TObject<{
|
|
@@ -132,7 +131,6 @@ export declare const PremiseSchema: Type.TIntersect<[Type.TObject<{
|
|
|
132
131
|
position: Type.TUnion<[Type.TInteger, Type.TNull]>;
|
|
133
132
|
type: Type.TLiteral<"formula">;
|
|
134
133
|
}>]>>;
|
|
135
|
-
type: Type.TUnion<[Type.TLiteral<"inference">, Type.TLiteral<"constraint">]>;
|
|
136
134
|
}>]>;
|
|
137
|
-
export type
|
|
135
|
+
export type TCorePremise = Static<typeof CorePremiseSchema>;
|
|
138
136
|
//# sourceMappingURL=propositional.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propositional.d.ts","sourceRoot":"","sources":["../../../src/lib/schemata/propositional.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAO3C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"propositional.d.ts","sourceRoot":"","sources":["../../../src/lib/schemata/propositional.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAE,KAAK,MAAM,EAAE,MAAM,SAAS,CAAA;AAO3C,eAAO,MAAM,gCAAgC,+FAI3C,CAAA;AACF,MAAM,MAAM,iCAAiC,GAAG,MAAM,CAClD,OAAO,gCAAgC,CAC1C,CAAA;AAoBD,eAAO,MAAM,yCAAyC;;;;;;;;EAMrD,CAAA;AAED,MAAM,MAAM,oCAAoC,GAAG,MAAM,CACrD,OAAO,yCAAyC,CACnD,CAAA;AAED,eAAO,MAAM,uBAAuB,gIAMlC,CAAA;AAEF,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE7E,eAAO,MAAM,4BAA4B;;;;;;;;EAMxC,CAAA;AACD,MAAM,MAAM,uBAAuB,GAAG,MAAM,CACxC,OAAO,4BAA4B,CACtC,CAAA;AAED,eAAO,MAAM,2BAA2B;;;;;;;EAKvC,CAAA;AACD,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAE/E,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;IAI5C,CAAA;AAEF,MAAM,MAAM,oCAAoC,GAAG,MAAM,CACrD,OAAO,iCAAiC,CAC3C,CAAA;AAED,MAAM,MAAM,4BAA4B,CACpC,CAAC,SAAS,iCAAiC,GACvC,iCAAiC,IACrC,OAAO,CAAC,oCAAoC,EAAE;IAAE,IAAI,EAAE,CAAC,CAAA;CAAE,CAAC,CAAA;AAE9D,eAAO,MAAM,+BAA+B;;;;;EAK1C,CAAA;AAEF,MAAM,MAAM,0BAA0B,GAAG,MAAM,CAC3C,OAAO,+BAA+B,CACzC,CAAA;AAED,eAAO,MAAM,qBAAqB;;;EAShC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUhC,CAAA;AACF,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,qBAAqB,CAAC,CAAA;AAEnE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAG5B,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAA"}
|
|
@@ -3,7 +3,7 @@ import { UUID, Nullable } from "./shared.js";
|
|
|
3
3
|
const VariableType = Type.Literal("variable");
|
|
4
4
|
const OperatorType = Type.Literal("operator");
|
|
5
5
|
const FormulaType = Type.Literal("formula");
|
|
6
|
-
export const
|
|
6
|
+
export const CorePropositionalExpressionTypes = Type.Union([
|
|
7
7
|
VariableType,
|
|
8
8
|
OperatorType,
|
|
9
9
|
FormulaType,
|
|
@@ -20,64 +20,54 @@ const BasePropositionalExpressionSchema = Type.Object({
|
|
|
20
20
|
description: "The ordering of this expression among its siblings under the same parent. Must be unique within (parentId, argumentId, argumentVersion).",
|
|
21
21
|
})),
|
|
22
22
|
});
|
|
23
|
-
export const
|
|
23
|
+
export const CorePropositionalVariableExpressionSchema = Type.Interface([BasePropositionalExpressionSchema], {
|
|
24
24
|
type: VariableType,
|
|
25
25
|
variableId: UUID,
|
|
26
26
|
});
|
|
27
|
-
export const
|
|
27
|
+
export const CoreLogicalOperatorType = Type.Union([
|
|
28
28
|
Type.Literal("not"), // unary
|
|
29
29
|
Type.Literal("and"), // variadic (≥2)
|
|
30
30
|
Type.Literal("or"), // variadic (≥2)
|
|
31
31
|
Type.Literal("implies"), // binary (ordered)
|
|
32
32
|
Type.Literal("iff"), // binary (unordered but fixed 2)
|
|
33
33
|
]);
|
|
34
|
-
export const
|
|
34
|
+
export const CoreOperatorExpressionSchema = Type.Interface([BasePropositionalExpressionSchema], {
|
|
35
35
|
type: OperatorType,
|
|
36
|
-
operator:
|
|
36
|
+
operator: CoreLogicalOperatorType,
|
|
37
37
|
});
|
|
38
|
-
export const
|
|
38
|
+
export const CoreFormulaExpressionSchema = Type.Interface([BasePropositionalExpressionSchema], {
|
|
39
39
|
type: FormulaType,
|
|
40
40
|
});
|
|
41
|
-
export const
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
41
|
+
export const CorePropositionalExpressionSchema = Type.Union([
|
|
42
|
+
CorePropositionalVariableExpressionSchema,
|
|
43
|
+
CoreOperatorExpressionSchema,
|
|
44
|
+
CoreFormulaExpressionSchema,
|
|
45
45
|
]);
|
|
46
|
-
export const
|
|
46
|
+
export const CorePropositionalVariableSchema = Type.Object({
|
|
47
47
|
id: UUID,
|
|
48
48
|
argumentId: UUID,
|
|
49
49
|
argumentVersion: Type.Number(),
|
|
50
50
|
symbol: Type.String(),
|
|
51
51
|
});
|
|
52
|
-
export const
|
|
52
|
+
export const CorePremiseMetaSchema = Type.Object({
|
|
53
53
|
// Auto-generated UUID
|
|
54
54
|
id: UUID,
|
|
55
55
|
title: Type.Optional(Type.String({
|
|
56
56
|
description: "An optional title for this premise, for display purposes.",
|
|
57
57
|
})),
|
|
58
58
|
});
|
|
59
|
-
export const
|
|
60
|
-
// If the premise has expressions in it, this is the ID of the root expression
|
|
61
|
-
// which must be a relation operator if the type is "inference", else. it can
|
|
62
|
-
// be any type of expression.
|
|
59
|
+
export const CorePremiseDataSchema = Type.Object({
|
|
60
|
+
// If the premise has expressions in it, this is the ID of the root expression.
|
|
63
61
|
rootExpressionId: Type.Optional(UUID),
|
|
64
62
|
variables: Type.Array(UUID, {
|
|
65
63
|
description: "IDs of all variables referenced in this premise.",
|
|
66
64
|
}),
|
|
67
|
-
expressions: Type.Array(
|
|
65
|
+
expressions: Type.Array(CorePropositionalExpressionSchema, {
|
|
68
66
|
description: "All expressions that are part of this premise, including sub-expressions. The root of the premise will have a null parentId.",
|
|
69
67
|
}),
|
|
70
|
-
type: Type.Union([
|
|
71
|
-
Type.Literal("inference", {
|
|
72
|
-
description: "A premise whose core operator is one of inference like implies or iff",
|
|
73
|
-
}),
|
|
74
|
-
Type.Literal("constraint", {
|
|
75
|
-
description: "A premise without an inference operator, it restricts the possible valuations of variables but is not part of the chain of logical reasoning.",
|
|
76
|
-
}),
|
|
77
|
-
]),
|
|
78
68
|
});
|
|
79
|
-
export const
|
|
80
|
-
|
|
81
|
-
|
|
69
|
+
export const CorePremiseSchema = Type.Intersect([
|
|
70
|
+
CorePremiseMetaSchema,
|
|
71
|
+
CorePremiseDataSchema,
|
|
82
72
|
]);
|
|
83
73
|
//# sourceMappingURL=propositional.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"propositional.js","sourceRoot":"","sources":["../../../src/lib/schemata/propositional.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,EAAE,EAAe,MAAM,SAAS,CAAA;AAC3C,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAE5C,MAAM,YAAY,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAA;AAC7C,MAAM,YAAY,GAAG,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IAC/E,gBAAgB,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC;IACrC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;QACxB,WAAW,EAAE,kDAAkD;KAClE,CAAC;IACF,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,iCAAiC,EAAE;QACvD,WAAW,EACP,8HAA8H;KACrI,CAAC;CACL,CAAC,CAAA;AAGF,MAAM,CAAC,MAAM,iBAAiB,GAAG,IAAI,CAAC,SAAS,CAAC;IAC5C,qBAAqB;IACrB,qBAAqB;CACxB,CAAC,CAAA"}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export type
|
|
3
|
-
export type {
|
|
4
|
-
export interface
|
|
5
|
-
argument:
|
|
6
|
-
premises:
|
|
7
|
-
roles:
|
|
1
|
+
import type { TCoreArgument, TCoreArgumentRoleState, TCorePremise } from "../schemata/index.js";
|
|
2
|
+
export type TCorePremiseRole = "supporting" | "conclusion";
|
|
3
|
+
export type { TCoreArgumentRoleState };
|
|
4
|
+
export interface TCoreArgumentEngineData {
|
|
5
|
+
argument: TCoreArgument;
|
|
6
|
+
premises: TCorePremise[];
|
|
7
|
+
roles: TCoreArgumentRoleState;
|
|
8
8
|
}
|
|
9
|
-
export type
|
|
10
|
-
export type
|
|
11
|
-
export type
|
|
12
|
-
export interface
|
|
13
|
-
code:
|
|
14
|
-
severity:
|
|
9
|
+
export type TCoreVariableAssignment = Record<string, boolean>;
|
|
10
|
+
export type TCoreValidationSeverity = "error" | "warning";
|
|
11
|
+
export type TCoreValidationCode = "ARGUMENT_NO_CONCLUSION" | "ARGUMENT_CONCLUSION_NOT_FOUND" | "ARGUMENT_SUPPORTING_PREMISE_NOT_FOUND" | "ARGUMENT_ROLE_OVERLAP" | "ARGUMENT_VARIABLE_ID_SYMBOL_MISMATCH" | "ARGUMENT_VARIABLE_SYMBOL_AMBIGUOUS" | "PREMISE_EMPTY" | "PREMISE_ROOT_MISSING" | "PREMISE_ROOT_MISMATCH" | "EXPR_CHILD_COUNT_INVALID" | "EXPR_BINARY_POSITIONS_INVALID" | "EXPR_VARIABLE_UNDECLARED" | "ASSIGNMENT_MISSING_VARIABLE" | "ASSIGNMENT_UNKNOWN_VARIABLE";
|
|
12
|
+
export interface TCoreValidationIssue {
|
|
13
|
+
code: TCoreValidationCode;
|
|
14
|
+
severity: TCoreValidationSeverity;
|
|
15
15
|
message: string;
|
|
16
16
|
premiseId?: string;
|
|
17
17
|
expressionId?: string;
|
|
18
18
|
variableId?: string;
|
|
19
19
|
}
|
|
20
|
-
export interface
|
|
20
|
+
export interface TCoreValidationResult {
|
|
21
21
|
ok: boolean;
|
|
22
|
-
issues:
|
|
22
|
+
issues: TCoreValidationIssue[];
|
|
23
23
|
}
|
|
24
|
-
export interface
|
|
24
|
+
export interface TCoreDirectionalVacuity {
|
|
25
25
|
antecedentTrue: boolean;
|
|
26
26
|
consequentTrue: boolean;
|
|
27
27
|
implicationValue: boolean;
|
|
28
28
|
isVacuouslyTrue: boolean;
|
|
29
29
|
fired: boolean;
|
|
30
30
|
}
|
|
31
|
-
export type
|
|
31
|
+
export type TCorePremiseInferenceDiagnostic = {
|
|
32
32
|
kind: "implies";
|
|
33
33
|
premiseId: string;
|
|
34
34
|
rootExpressionId: string;
|
|
@@ -47,59 +47,59 @@ export type TPremiseInferenceDiagnostic = {
|
|
|
47
47
|
leftValue: boolean;
|
|
48
48
|
rightValue: boolean;
|
|
49
49
|
rootValue: boolean;
|
|
50
|
-
leftToRight:
|
|
51
|
-
rightToLeft:
|
|
50
|
+
leftToRight: TCoreDirectionalVacuity;
|
|
51
|
+
rightToLeft: TCoreDirectionalVacuity;
|
|
52
52
|
bothSidesTrue: boolean;
|
|
53
53
|
bothSidesFalse: boolean;
|
|
54
54
|
};
|
|
55
|
-
export interface
|
|
55
|
+
export interface TCorePremiseEvaluationResult {
|
|
56
56
|
premiseId: string;
|
|
57
57
|
premiseType: "inference" | "constraint";
|
|
58
58
|
rootExpressionId?: string;
|
|
59
59
|
rootValue?: boolean;
|
|
60
60
|
expressionValues: Record<string, boolean>;
|
|
61
61
|
variableValues: Record<string, boolean>;
|
|
62
|
-
inferenceDiagnostic?:
|
|
62
|
+
inferenceDiagnostic?: TCorePremiseInferenceDiagnostic;
|
|
63
63
|
}
|
|
64
|
-
export interface
|
|
64
|
+
export interface TCoreArgumentEvaluationOptions {
|
|
65
65
|
strictUnknownAssignmentKeys?: boolean;
|
|
66
66
|
includeExpressionValues?: boolean;
|
|
67
67
|
includeDiagnostics?: boolean;
|
|
68
68
|
validateFirst?: boolean;
|
|
69
69
|
}
|
|
70
|
-
export interface
|
|
70
|
+
export interface TCoreArgumentEvaluationResult {
|
|
71
71
|
ok: boolean;
|
|
72
|
-
validation?:
|
|
73
|
-
assignment?:
|
|
72
|
+
validation?: TCoreValidationResult;
|
|
73
|
+
assignment?: TCoreVariableAssignment;
|
|
74
74
|
referencedVariableIds?: string[];
|
|
75
|
-
conclusion?:
|
|
76
|
-
supportingPremises?:
|
|
77
|
-
constraintPremises?:
|
|
75
|
+
conclusion?: TCorePremiseEvaluationResult;
|
|
76
|
+
supportingPremises?: TCorePremiseEvaluationResult[];
|
|
77
|
+
constraintPremises?: TCorePremiseEvaluationResult[];
|
|
78
78
|
isAdmissibleAssignment?: boolean;
|
|
79
79
|
allSupportingPremisesTrue?: boolean;
|
|
80
80
|
conclusionTrue?: boolean;
|
|
81
81
|
isCounterexample?: boolean;
|
|
82
82
|
preservesTruthUnderAssignment?: boolean;
|
|
83
83
|
}
|
|
84
|
-
export interface
|
|
84
|
+
export interface TCoreValidityCheckOptions {
|
|
85
85
|
mode?: "firstCounterexample" | "exhaustive";
|
|
86
86
|
maxVariables?: number;
|
|
87
87
|
maxAssignmentsChecked?: number;
|
|
88
88
|
includeCounterexampleEvaluations?: boolean;
|
|
89
89
|
validateFirst?: boolean;
|
|
90
90
|
}
|
|
91
|
-
export interface
|
|
92
|
-
assignment:
|
|
93
|
-
result:
|
|
91
|
+
export interface TCoreCounterexample {
|
|
92
|
+
assignment: TCoreVariableAssignment;
|
|
93
|
+
result: TCoreArgumentEvaluationResult;
|
|
94
94
|
}
|
|
95
|
-
export interface
|
|
95
|
+
export interface TCoreValidityCheckResult {
|
|
96
96
|
ok: boolean;
|
|
97
|
-
validation?:
|
|
97
|
+
validation?: TCoreValidationResult;
|
|
98
98
|
isValid?: boolean;
|
|
99
99
|
checkedVariableIds?: string[];
|
|
100
100
|
numAssignmentsChecked?: number;
|
|
101
101
|
numAdmissibleAssignments?: number;
|
|
102
|
-
counterexamples?:
|
|
102
|
+
counterexamples?: TCoreCounterexample[];
|
|
103
103
|
truncated?: boolean;
|
|
104
104
|
}
|
|
105
105
|
//# sourceMappingURL=evaluation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluation.d.ts","sourceRoot":"","sources":["../../../src/lib/types/evaluation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,
|
|
1
|
+
{"version":3,"file":"evaluation.d.ts","sourceRoot":"","sources":["../../../src/lib/types/evaluation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,aAAa,EACb,sBAAsB,EACtB,YAAY,EACf,MAAM,sBAAsB,CAAA;AAE7B,MAAM,MAAM,gBAAgB,GAAG,YAAY,GAAG,YAAY,CAAA;AAE1D,YAAY,EAAE,sBAAsB,EAAE,CAAA;AAEtC,MAAM,WAAW,uBAAuB;IAEpC,QAAQ,EAAE,aAAa,CAAA;IAEvB,QAAQ,EAAE,YAAY,EAAE,CAAA;IAExB,KAAK,EAAE,sBAAsB,CAAA;CAChC;AAED,MAAM,MAAM,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;AAE7D,MAAM,MAAM,uBAAuB,GAAG,OAAO,GAAG,SAAS,CAAA;AAEzD,MAAM,MAAM,mBAAmB,GACzB,wBAAwB,GACxB,+BAA+B,GAC/B,uCAAuC,GACvC,uBA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C,IAAI,CAAC,EAAE,qBAAqB,GAAG,YAAY,CAAA;IAE3C,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAE9B,gCAAgC,CAAC,EAAE,OAAO,CAAA;IAE1C,aAAa,CAAC,EAAE,OAAO,CAAA;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAEhC,UAAU,EAAE,uBAAuB,CAAA;IAEnC,MAAM,EAAE,6BAA6B,CAAA;CACxC;AAED,MAAM,WAAW,wBAAwB;IAErC,EAAE,EAAE,OAAO,CAAA;IAEX,UAAU,CAAC,EAAE,qBAAqB,CAAA;IAElC,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAE7B,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAE9B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IAEjC,eAAe,CAAC,EAAE,mBAAmB,EAAE,CAAA;IAEvC,SAAS,CAAC,EAAE,OAAO,CAAA;CACtB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@polintpro/proposit-core",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Core engine for building and manipulating propositional logic arguments.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
}
|
|
14
14
|
},
|
|
15
15
|
"bin": {
|
|
16
|
-
"core": "./dist/cli.js"
|
|
16
|
+
"proposit-core": "./dist/cli.js"
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
19
19
|
"dist"
|