occam-verify-cli 1.0.785 → 1.0.787

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.
@@ -3,8 +3,6 @@
3
3
  import elements from "../elements";
4
4
 
5
5
  import { baseTypeFromNothing } from "../utilities/type";
6
- import { simplify, instantiate,} from "../utilities/context";
7
- import { instantiateLabel, instantiateReference } from "../process/instantiate";
8
6
  import { equivalenceStringFromTerms,
9
7
  typeStringFromNominalTypeName,
10
8
  rulsStringFromLabelsPremisesAndConclusion,
@@ -922,9 +920,10 @@ export function referenceFromStepNode(stepNode, context) {
922
920
  const referenceNode = stepNode.getReferenceNode();
923
921
 
924
922
  if (referenceNode !== null) {
925
- const referenceString = context.nodeAsString(referenceNode);
923
+ const { Reference } = elements,
924
+ referenceString = context.nodeAsString(referenceNode);
926
925
 
927
- reference = referenceFromReferenceString(referenceString, context);
926
+ reference = Reference.fromReferenceString(referenceString, context);
928
927
  }
929
928
 
930
929
  return reference;
@@ -1346,9 +1345,10 @@ export function metavariableFromReferenceNode(referenceNode, context) {
1346
1345
  }
1347
1346
 
1348
1347
  export function referenceFromMetavariableNode(metavariableNode, context) {
1349
- const metavariableString = context.nodeAsString(metavariableNode),
1348
+ const { Reference } = elements,
1349
+ metavariableString = context.nodeAsString(metavariableNode),
1350
1350
  referenceString = metavariableString, ///
1351
- reference = referenceFromReferenceString(referenceString, context);
1351
+ reference = Reference.fromReferenceString(referenceString, context);
1352
1352
 
1353
1353
  return reference;
1354
1354
  }
@@ -1586,9 +1586,10 @@ export function proofFromTopLevelMetaAssertionNode(metaLemmaMetathoremNode, cont
1586
1586
  }
1587
1587
 
1588
1588
  export function labelFromTopLevelMetaAssertionNode(metaLemmaMetathoremNode, context) {
1589
- const labelNode = metaLemmaMetathoremNode.getLabelNode(),
1589
+ const { Label } = elements,
1590
+ labelNode = metaLemmaMetathoremNode.getLabelNode(),
1590
1591
  labelString = context.nodeAsString(labelNode),
1591
- label = labelFromLabelString(labelString, context);
1592
+ label = Label.fromLabelString(labelString, context);
1592
1593
 
1593
1594
  return label;
1594
1595
  }
@@ -1709,9 +1710,10 @@ export function signatureFromJSatisfiesAssertionNode(sasisfiesAssertionNode, con
1709
1710
  }
1710
1711
 
1711
1712
  export function referenceFromJSatisfiesAssertionNode(sasisfiesAssertionNode, context) {
1712
- const referenceNode = sasisfiesAssertionNode.getReferenceNode(),
1713
+ const { Reference } = elements,
1714
+ referenceNode = sasisfiesAssertionNode.getReferenceNode(),
1713
1715
  referenceString = context.nodeAsString(referenceNode),
1714
- reference = referenceFromReferenceString(referenceString, context);
1716
+ reference = Reference.fromReferenceString(referenceString, context);
1715
1717
 
1716
1718
  return reference;
1717
1719
  }
@@ -1880,9 +1882,10 @@ export function metavariableFromMetavariableDeclarationNode(metavariableDeclarat
1880
1882
  }
1881
1883
 
1882
1884
  export function targetReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context) {
1883
- const targetReferenceNode = referenceSubstitutionNode.getTargetReferenceNode(),
1885
+ const { Reference } = elements,
1886
+ targetReferenceNode = referenceSubstitutionNode.getTargetReferenceNode(),
1884
1887
  targetReferenceString = context.nodeAsString(targetReferenceNode),
1885
- targetReference = referenceFromReferenceString(targetReferenceString, context);
1888
+ targetReference = Reference.fromReferenceString(targetReferenceString, context);
1886
1889
 
1887
1890
  return targetReference;
1888
1891
  }
@@ -1919,9 +1922,10 @@ export function frameSubstitutionFromStatementSubstitutionNode(statementSubstitu
1919
1922
  }
1920
1923
 
1921
1924
  export function replacementReferenceFromReferenceSubstitutionNode(referenceSubstitutionNode, context) {
1922
- const replacementReferenceNode = referenceSubstitutionNode.getReplacementReferenceNode(),
1925
+ const { Reference } = elements,
1926
+ replacementReferenceNode = referenceSubstitutionNode.getReplacementReferenceNode(),
1923
1927
  replacementReferenceString = context.nodeAsString(replacementReferenceNode),
1924
- replacementReference = referenceFromReferenceString(replacementReferenceString, context);
1928
+ replacementReference = Reference.fromReferenceString(replacementReferenceString, context);
1925
1929
 
1926
1930
  return replacementReference;
1927
1931
  }
@@ -1956,8 +1960,9 @@ export function typesFromTypesNode(typesNode, context) {
1956
1960
 
1957
1961
  export function labelsFromLabelNodes(labelNodes, context) {
1958
1962
  const labels = labelNodes.map((labelNode) => {
1959
- const labelString = context.nodeAsString(labelNode),
1960
- label = labelFromLabelString(labelString, context);
1963
+ const { Label } = elements,
1964
+ labelString = context.nodeAsString(labelNode),
1965
+ label = Label.fromLabelString(labelString, context);
1961
1966
 
1962
1967
  return label;
1963
1968
  });
@@ -2046,33 +2051,3 @@ export function stepsOrSubproofsFromSubDerivationNode(subDerivationNode, context
2046
2051
 
2047
2052
  return stepsOrSubproofs;
2048
2053
  }
2049
-
2050
- export function labelFromLabelString(labelString, context) {
2051
- let label;
2052
-
2053
- simplify((context) => {
2054
- instantiate((context) => {
2055
- const string = labelString, ///
2056
- labelNode = instantiateLabel(string, context);
2057
-
2058
- label = labelFromLabelNode(labelNode, context);
2059
- }, context);
2060
- }, context);
2061
-
2062
- return label;
2063
- }
2064
-
2065
- export function referenceFromReferenceString(referenceString, context) {
2066
- let reference;
2067
-
2068
- simplify((context) => {
2069
- instantiate((context) => {
2070
- const string = referenceString, ///
2071
- referenceNode = instantiateReference(string, context);
2072
-
2073
- reference = referenceFromReferenceNode(referenceNode, context);
2074
- }, context);
2075
- }, context);
2076
-
2077
- return reference;
2078
- }
@@ -62,7 +62,7 @@ async function unifyStatementWithReference(statement, reference, satisfiesAssert
62
62
  const { Assumption } = elements,
63
63
  assumption = Assumption.fromStatementAndReference(statement, reference, context);
64
64
 
65
- assumption.validate(context, metaLevel);
65
+ assumption.validate(context);
66
66
 
67
67
  statementUnifiesWithReference = true;
68
68
  }, context);