occam-verify-cli 1.0.682 → 1.0.685

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.
Files changed (53) hide show
  1. package/lib/action/verify.js +25 -20
  2. package/lib/context/ephemeral.js +2 -2
  3. package/lib/context/file/nominal.js +3 -3
  4. package/lib/element/assertion/contained.js +8 -4
  5. package/lib/element/assertion/defined.js +7 -4
  6. package/lib/element/assertion/type.js +3 -3
  7. package/lib/element/assumption.js +2 -8
  8. package/lib/element/constructor.js +4 -3
  9. package/lib/element/frame.js +7 -8
  10. package/lib/element/hypothesis.js +3 -2
  11. package/lib/element/metaType.js +4 -2
  12. package/lib/element/metavariable.js +2 -2
  13. package/lib/element/parameter.js +6 -3
  14. package/lib/element/procedureCall.js +5 -4
  15. package/lib/element/procedureReference.js +4 -2
  16. package/lib/element/property.js +4 -2
  17. package/lib/element/reference.js +3 -3
  18. package/lib/element/rule.js +3 -2
  19. package/lib/element/substitution/frame.js +19 -1
  20. package/lib/element/substitution/reference.js +19 -1
  21. package/lib/element/substitution/statement.js +12 -6
  22. package/lib/element/substitution/term.js +19 -1
  23. package/lib/element/type.js +4 -4
  24. package/lib/element/typePrefix.js +4 -2
  25. package/lib/element/variable.js +5 -3
  26. package/lib/utilities/json.js +54 -41
  27. package/package.json +2 -2
  28. package/src/action/verify.js +17 -6
  29. package/src/context/ephemeral.js +2 -2
  30. package/src/context/file/nominal.js +2 -2
  31. package/src/element/assertion/contained.js +14 -3
  32. package/src/element/assertion/defined.js +11 -3
  33. package/src/element/assertion/type.js +2 -2
  34. package/src/element/assumption.js +1 -12
  35. package/src/element/constructor.js +3 -1
  36. package/src/element/frame.js +11 -11
  37. package/src/element/hypothesis.js +2 -0
  38. package/src/element/metaType.js +5 -1
  39. package/src/element/metavariable.js +3 -3
  40. package/src/element/parameter.js +9 -2
  41. package/src/element/procedureCall.js +7 -4
  42. package/src/element/procedureReference.js +5 -1
  43. package/src/element/property.js +7 -2
  44. package/src/element/reference.js +3 -2
  45. package/src/element/rule.js +2 -0
  46. package/src/element/substitution/frame.js +30 -0
  47. package/src/element/substitution/reference.js +29 -0
  48. package/src/element/substitution/statement.js +19 -9
  49. package/src/element/substitution/term.js +30 -0
  50. package/src/element/type.js +11 -7
  51. package/src/element/typePrefix.js +5 -1
  52. package/src/element/variable.js +9 -3
  53. package/src/utilities/json.js +52 -54
@@ -651,25 +651,41 @@ export function nameToNameJSON(name) {
651
651
  }
652
652
 
653
653
  export function termToTermJSON(term) {
654
- const termJSON = term.toJSON();
654
+ const termJSON = (term !== null) ?
655
+ term.toJSON() :
656
+ null;
655
657
 
656
658
  return termJSON;
657
659
  }
658
660
 
659
661
  export function typeToTypeJSON(type) {
660
662
  const typeJSON = (type !== null) ?
661
- type.toJSON() :
662
- null;
663
+ type.toJSON() :
664
+ null;
663
665
 
664
666
  return typeJSON;
665
667
  }
666
668
 
669
+ export function frameToFrameJSON(frame) {
670
+ const frameJSON = (frame !== null) ?
671
+ frame.toJSON() :
672
+ null;
673
+
674
+ return frameJSON;
675
+ }
676
+
667
677
  export function labelToLabelJSON(label) {
668
678
  const labelJSON = label.toJSON();
669
679
 
670
680
  return labelJSON;
671
681
  }
672
682
 
683
+ export function negatedToNegatedJSON(negated) {
684
+ const negatedJSON = negated; ///
685
+
686
+ return negatedJSON;
687
+ }
688
+
673
689
  export function metaTypeToMetaTypeJSON(metaType) {
674
690
  const metaTypeJSON = (metaType !== null) ?
675
691
  metaType.toJSON() :
@@ -706,12 +722,24 @@ export function signatureToSignatureJSON(signature) {
706
722
  return signatureJSON;
707
723
  }
708
724
 
725
+ export function identifierToIdentifierJSON(identifier) {
726
+ const identifierJSON = identifier; ///
727
+
728
+ return identifierJSON;
729
+ }
730
+
709
731
  export function conclusionToConclusionJSON(conclusion) {
710
732
  const conclusionJSON = conclusion.toJSON();
711
733
 
712
734
  return conclusionJSON;
713
735
  }
714
736
 
737
+ export function provisionalToProvisionalJSON(provisional) {
738
+ const provisionalJSON = provisional; ///
739
+
740
+ return provisionalJSON;
741
+ }
742
+
715
743
  export function metavariableToMetavariableJSON(metavariable) {
716
744
  const metavariableJSON = metavariable.toJSON();
717
745
 
@@ -746,9 +774,7 @@ export function typesToTypesJSON(types) {
746
774
  const typesJSON = types.map((type) => {
747
775
  const typeJSON = type.toJSON();
748
776
 
749
- type = typeJSON; ///
750
-
751
- return type;
777
+ return typeJSON;
752
778
  });
753
779
 
754
780
  return typesJSON;
@@ -758,9 +784,7 @@ export function rulesToRulesJSON(rules) {
758
784
  const rulesJSON = rules.map((rule) => {
759
785
  const ruleJSON = rule.toJSON();
760
786
 
761
- rule = ruleJSON; ///
762
-
763
- return rule;
787
+ return ruleJSON;
764
788
  });
765
789
 
766
790
  return rulesJSON;
@@ -790,9 +814,7 @@ export function axiomsToAxiomsJSON(axioms) {
790
814
  const axiomsJSON = axioms.map((axiom) => {
791
815
  const axiomJSON = axiom.toJSON();
792
816
 
793
- axiom = axiomJSON; ///
794
-
795
- return axiom;
817
+ return axiomJSON;
796
818
  });
797
819
 
798
820
  return axiomsJSON;
@@ -812,9 +834,7 @@ export function theoremsToTheoremsJSON(theorems) {
812
834
  const theoremsJSON = theorems.map((theorem) => {
813
835
  const theoremJSON = theorem.toJSON();
814
836
 
815
- theorem = theoremJSON; ///
816
-
817
- return theorem;
837
+ return theoremJSON;
818
838
  });
819
839
 
820
840
  return theoremsJSON;
@@ -824,9 +844,7 @@ export function variablesToVariablesJSON(variables) {
824
844
  const variablesJSON = variables.map((variable) => {
825
845
  const variableJSON = variable.toJSON();
826
846
 
827
- variable = variableJSON; ///
828
-
829
- return variable;
847
+ return variableJSON;
830
848
  });
831
849
 
832
850
  return variablesJSON;
@@ -836,9 +854,7 @@ export function hypothesesToHypothesesJSON(hypotheses) {
836
854
  const hypothesesJSON = hypotheses.map((hypothesis) => {
837
855
  const hypothesisJSON = hypothesis.toJSON();
838
856
 
839
- hypothesis = hypothesisJSON; ///
840
-
841
- return hypothesis;
857
+ return hypothesisJSON;
842
858
  });
843
859
 
844
860
  return hypothesesJSON;
@@ -848,9 +864,7 @@ export function superTypesToSuperTypesJSON(superTypes) {
848
864
  const superTypesJSON = superTypes.map((superType) => {
849
865
  const superTypeJSON = superType.toJSON();
850
866
 
851
- superType = superTypeJSON; ///
852
-
853
- return superType;
867
+ return superTypeJSON;
854
868
  });
855
869
 
856
870
  return superTypesJSON;
@@ -860,9 +874,7 @@ export function parametersToParametersJSON(parameters) {
860
874
  const parametersJSON = parameters.map((parameter) => {
861
875
  const parameterJSON = parameter.toJSON();
862
876
 
863
- parameter = parameterJSON; ///
864
-
865
- return parameter;
877
+ return parameterJSON;
866
878
  });
867
879
 
868
880
  return parametersJSON;
@@ -872,9 +884,7 @@ export function propertiesToPropertiesJSON(properties) {
872
884
  const propertiesJSON = properties.map((property) => {
873
885
  const propertyJSON = property.toJSON();
874
886
 
875
- property = propertyJSON; ///
876
-
877
- return property;
887
+ return propertyJSON;
878
888
  });
879
889
 
880
890
  return propertiesJSON;
@@ -934,9 +944,7 @@ export function conjecturesToConjecturesJSON(conjectures) {
934
944
  const conjecturesJSON = conjectures.map((conjecture) => {
935
945
  const conjectureJSON = conjecture.toJSON();
936
946
 
937
- conjecture = conjectureJSON; ///
938
-
939
- return conjecture;
947
+ return conjectureJSON;
940
948
  });
941
949
 
942
950
  return conjecturesJSON;
@@ -946,9 +954,7 @@ export function combinatorsToCombinatorsJSON(combinators) {
946
954
  const combinatorsJSON = combinators.map((combinator) => {
947
955
  const combinatorJSON = combinator.toJSON();
948
956
 
949
- combinator = combinatorJSON; ///
950
-
951
- return combinator;
957
+ return combinatorJSON;
952
958
  });
953
959
 
954
960
  return combinatorsJSON;
@@ -978,9 +984,7 @@ export function constructorsToConstructorsJSON(constructors) {
978
984
  const constructorsJSON = constructors.map((constructor) => {
979
985
  const constructorJSON = constructor.toJSON();
980
986
 
981
- constructor = constructorJSON; ///
982
-
983
- return constructor;
987
+ return constructorJSON;
984
988
  });
985
989
 
986
990
  return constructorsJSON;
@@ -990,9 +994,7 @@ export function metatheoremsToMetatheoremsJSON(metatheorems) {
990
994
  const metatheoremsJSON = metatheorems.map((metatheorem) => {
991
995
  const metatheoremJSON = metatheorem.toJSON();
992
996
 
993
- metatheorem = metatheoremJSON; ///
994
-
995
- return metatheorem;
997
+ return metatheoremJSON;
996
998
  });
997
999
 
998
1000
  return metatheoremsJSON;
@@ -1002,16 +1004,14 @@ export function typePrefixesToTypePrefixesJSON(typePrefixes) {
1002
1004
  const typePrefixesJSON = typePrefixes.map((typePrefix) => {
1003
1005
  const typePrefixJSON = typePrefix.toJSON();
1004
1006
 
1005
- typePrefix = typePrefixJSON; ///
1006
-
1007
- return typePrefix;
1007
+ return typePrefixJSON;
1008
1008
  });
1009
1009
 
1010
1010
  return typePrefixesJSON;
1011
1011
  }
1012
1012
 
1013
1013
  export function substitutionsToSubstitutionsJSON(substitutions) {
1014
- const substitutionsJSON = substitutions.mapSubstitution((substitution) => {
1014
+ const substitutionsJSON = substitutions.map((substitution) => {
1015
1015
  const substitutionJSON = substitution.toJSON();
1016
1016
 
1017
1017
  return substitutionJSON;
@@ -1024,20 +1024,18 @@ export function metavariablesToMetavariablesJSON(metavariables) {
1024
1024
  const metavariablesJSON = metavariables.map((metavariable) => {
1025
1025
  const metavariableJSON = metavariable.toJSON();
1026
1026
 
1027
- metavariable = metavariableJSON; ///
1028
-
1029
- return metavariable;
1027
+ return metavariableJSON;
1030
1028
  });
1031
1029
 
1032
1030
  return metavariablesJSON;
1033
1031
  }
1034
1032
 
1035
- export function substitutionsToCSubstitutionsJSON(substitutiions) {
1036
- const substitutionsJSON = substitutiions.map((substitution) => {
1037
- const substitutionJSON = substitution.toJSON();
1033
+ export function propertyRelationsToPropertyRelationsJSON(propertyRelations) {
1034
+ const propertyRelationsJSON = propertyRelations.map((propertyRelation) => {
1035
+ const propertyRelationJSON = propertyRelation.toJSON();
1038
1036
 
1039
- return substitutionJSON;
1037
+ return propertyRelationJSON;
1040
1038
  });
1041
1039
 
1042
- return substitutionsJSON;
1040
+ return propertyRelationsJSON;
1043
1041
  }