From cb742a5b4b7902b1a414d0519e8ad36ea0d4dbcd Mon Sep 17 00:00:00 2001 From: Everett Hildenbrandt Date: Wed, 13 Mar 2024 18:05:15 -0600 Subject: [PATCH] Import the regression-new testsuite from K (https://github.com/runtimeverification/pyk/pull/980) This PR imports the entire `regression-new` test-suite from K. - The directory `k-distribution/tests/regression-new` from the K repository is copied to `regression-new`: https://github.com/runtimeverification/pyk/pull/958/commits/e33cc1fbc2f6b2fe571a9fb35bc2fd8067645a7a - The tests that use regular `ktest.mak` are adjusted to point at `regression-new/include/ktest.mak` instead of the old path. - The default backend to run these tests with is corrected to `llvm` in `regression-new/include/ktest.mak`. - All of the newly added tests are added to a skipped list `regression-new/skipped`, so that they are not run on CI. The existing tests `regression-new/kprove-haskell` from https://github.com/runtimeverification/pyk/pull/958 and `regression-new/withConfig` from https://github.com/runtimeverification/pyk/pull/973 are left enabled. --------- Co-authored-by: devops --- pyk/docs/conf.py | 4 +- pyk/package/version | 2 +- pyk/pyproject.toml | 2 +- pyk/regression-new/Makefile | 3 +- pyk/regression-new/amb-rew/Makefile | 6 + pyk/regression-new/amb-rew/test.k | 17 + pyk/regression-new/append/1.test.kparse | 1 + pyk/regression-new/append/1.test.kparse.out | 1 + pyk/regression-new/append/Makefile | 9 + pyk/regression-new/append/kparse-twice | 3 + pyk/regression-new/append/test.k | 15 + pyk/regression-new/array-haskell/1.test | 1 + pyk/regression-new/array-haskell/1.test.out | 3 + pyk/regression-new/array-haskell/2.test | 1 + pyk/regression-new/array-haskell/2.test.out | 3 + pyk/regression-new/array-haskell/3.test | 1 + pyk/regression-new/array-haskell/3.test.out | 3 + pyk/regression-new/array-haskell/4.test | 1 + pyk/regression-new/array-haskell/4.test.out | 3 + pyk/regression-new/array-haskell/5.test | 1 + pyk/regression-new/array-haskell/5.test.out | 3 + pyk/regression-new/array-haskell/Makefile | 7 + pyk/regression-new/array-haskell/test.k | 8 + pyk/regression-new/bad-bytes-literal/Makefile | 3 + pyk/regression-new/bad-bytes-literal/quote.k | 7 + .../bad-bytes-literal/quote.k.out | 6 + pyk/regression-new/bad-bytes-literal/slash.k | 7 + .../bad-bytes-literal/slash.k.out | 6 + .../bad-bytes-literal/unicode-escape.k | 7 + .../bad-bytes-literal/unicode-escape.k.out | 6 + .../bad-bytes-literal/unicode.k | 7 + .../bad-bytes-literal/unicode.k.out | 6 + pyk/regression-new/bad-flags/Makefile | 16 + pyk/regression-new/bad-flags/extra-flags.out | 1 + pyk/regression-new/bad-flags/no-flags.out | 2 + pyk/regression-new/bad-flags/test.k | 3 + pyk/regression-new/bison-glr-bug/Makefile | 17 + .../bison-glr-bug/forwarder.iele | 34 + pyk/regression-new/bison-glr-bug/iele.k | 339 + pyk/regression-new/bison-glr-bug/parse | 5 + pyk/regression-new/bison-glr-bug/test.ref | 1 + .../bison-parser-library/.gitignore | 1 + .../bison-parser-library/Makefile | 26 + .../bison-parser-library/test.c | 5 + .../bison-parser-library/test.in | 1 + .../bison-parser-library/test.k | 5 + .../bison-parser-library/test.out | 1 + pyk/regression-new/bit-range-llvm/1.test.out | 3 + pyk/regression-new/bit-range-llvm/2.test.out | 3 + pyk/regression-new/bit-range-llvm/3.test.out | 3 + pyk/regression-new/bit-range-llvm/4.test.out | 3 + pyk/regression-new/bit-range-llvm/5.test.out | 3 + pyk/regression-new/bit-range-llvm/6.test.out | 3 + pyk/regression-new/bit-range-llvm/7.test.out | 3 + pyk/regression-new/bit-range-llvm/Makefile | 7 + pyk/regression-new/bit-range-llvm/test.k | 9 + .../boundary-cells-opt/Makefile | 2 + .../boundary-cells-opt/bc-none/Makefile | 11 + .../bc-none/boundary-cells-test-spec.k.out | 1 + .../boundary-cells-test-spec.k | 12 + .../boundary-cells-opt/boundary-cells-test.k | 19 + pyk/regression-new/bracket-priority/Makefile | 6 + pyk/regression-new/bracket-priority/test.k | 18 + pyk/regression-new/bytes-coverage/Makefile | 7 + pyk/regression-new/bytes-coverage/test.k | 4 + pyk/regression-new/bytes-haskell/Makefile | 8 + pyk/regression-new/bytes-haskell/test.k | 12 + pyk/regression-new/bytes-literal/1.test | 2 + pyk/regression-new/bytes-literal/1.test.out | 3 + pyk/regression-new/bytes-literal/2.test | 1 + pyk/regression-new/bytes-literal/2.test.out | 3 + pyk/regression-new/bytes-literal/Makefile | 7 + pyk/regression-new/bytes-literal/test.k | 12 + pyk/regression-new/bytes-llvm/1.test.out | 3 + pyk/regression-new/bytes-llvm/10.test.out | 3 + pyk/regression-new/bytes-llvm/11.test.out | 3 + pyk/regression-new/bytes-llvm/12.test.out | 3 + pyk/regression-new/bytes-llvm/13.test.out | 3 + pyk/regression-new/bytes-llvm/14.test.out | 3 + pyk/regression-new/bytes-llvm/15.test.out | 3 + pyk/regression-new/bytes-llvm/16.test.out | 3 + pyk/regression-new/bytes-llvm/17.test.out | 3 + pyk/regression-new/bytes-llvm/18.test.out | 3 + pyk/regression-new/bytes-llvm/19.test.out | 3 + pyk/regression-new/bytes-llvm/2.test.out | 3 + pyk/regression-new/bytes-llvm/20.test.out | 3 + pyk/regression-new/bytes-llvm/21.test.out | 3 + pyk/regression-new/bytes-llvm/22.test.out | 3 + pyk/regression-new/bytes-llvm/23.test.out | 3 + pyk/regression-new/bytes-llvm/24.test.out | 3 + pyk/regression-new/bytes-llvm/25.test.out | 3 + pyk/regression-new/bytes-llvm/26.test.out | 3 + pyk/regression-new/bytes-llvm/27.test.out | 3 + pyk/regression-new/bytes-llvm/28.test.out | 3 + pyk/regression-new/bytes-llvm/29.test.out | 3 + pyk/regression-new/bytes-llvm/3.test.out | 3 + pyk/regression-new/bytes-llvm/30.test.out | 3 + pyk/regression-new/bytes-llvm/31.test.out | 3 + pyk/regression-new/bytes-llvm/32.test.out | 3 + pyk/regression-new/bytes-llvm/4.test.out | 3 + pyk/regression-new/bytes-llvm/5.test.out | 3 + pyk/regression-new/bytes-llvm/6.test.out | 3 + pyk/regression-new/bytes-llvm/7.test.out | 3 + pyk/regression-new/bytes-llvm/8.test.out | 3 + pyk/regression-new/bytes-llvm/9.test.out | 3 + pyk/regression-new/bytes-llvm/Makefile | 7 + pyk/regression-new/bytes-llvm/test.k | 12 + pyk/regression-new/bytes-memset/1.test | 1 + pyk/regression-new/bytes-memset/1.test.out | 3 + pyk/regression-new/bytes-memset/2.test | 1 + pyk/regression-new/bytes-memset/2.test.out | 3 + pyk/regression-new/bytes-memset/Makefile | 7 + pyk/regression-new/bytes-memset/test.k | 7 + pyk/regression-new/cast-kitem/1.test | 1 + pyk/regression-new/cast-kitem/1.test.out | 3 + pyk/regression-new/cast-kitem/Makefile | 7 + pyk/regression-new/cast-kitem/test.k | 11 + pyk/regression-new/cast/1.test | 1 + pyk/regression-new/cast/1.test.out | 3 + pyk/regression-new/cast/Makefile | 7 + pyk/regression-new/cast/test.k | 18 + .../cell-bag-sort-llvm/Makefile | 3 + pyk/regression-new/cell-bag-sort-llvm/test.k | 73 + .../cell-bag-sort-llvm/test.k.out | 17 + pyk/regression-new/cell-sort-haskell/1.test | 6 + .../cell-sort-haskell/1.test.out | 35 + pyk/regression-new/cell-sort-haskell/Makefile | 6 + pyk/regression-new/cell-sort-haskell/test.k | 73 + pyk/regression-new/cell_map/Makefile | 6 + pyk/regression-new/cell_map/pgm.test | 5 + pyk/regression-new/cell_map/pgm.test.out | 15 + pyk/regression-new/cell_map/test.k | 38 + pyk/regression-new/checkClaimError/Makefile | 7 + .../checkClaimError/claim-spec.k | 8 + .../checkClaimError/claim-spec.k.out | 1 + .../checkClaimError/errorClaim.k | 25 + .../checkClaimError/rule-spec.k | 7 + .../checkClaimError/rule-spec.k.out | 6 + .../checkClaimError/syntax-spec.k | 9 + .../checkClaimError/syntax-spec.k.out | 11 + pyk/regression-new/checkWarns/Makefile | 4 + .../checkWarns/checkHaskellAnywhere.k | 9 + .../checkWarns/checkHaskellAnywhere.k.out | 6 + .../checkWarns/checkRHSHaskell.k | 32 + .../checkWarns/checkRHSHaskell.k.out | 21 + .../checkWarns/checkUnusedSymbol.k | 13 + .../checkWarns/checkUnusedSymbol.k.out | 6 + .../checkWarns/checkUnusedVar.k | 32 + .../checkWarns/checkUnusedVar.k.out | 16 + pyk/regression-new/checkWarns/deprecated.k | 25 + .../checkWarns/deprecated.k.out | 56 + .../checkWarns/existsLHSBoundFail.k | 12 + .../checkWarns/existsLHSBoundFail.k.out | 16 + .../checkWarns/existsLHSBoundPass.k | 12 + .../checkWarns/existsLHSBoundPass.k.out | 0 pyk/regression-new/checkWarns/missingKlabel.k | 17 + .../checkWarns/missingKlabel.k.out | 1 + pyk/regression-new/checkWarns/nullarySymbol.k | 6 + .../checkWarns/nullarySymbol.k.out | 6 + .../checkWarns/requireBuiltinK.k | 10 + .../checkWarns/requireBuiltinK.k.out | 5 + .../checkWarns/singletonOverload.k | 11 + .../checkWarns/singletonOverload.k.out | 11 + pyk/regression-new/checkWarns/syntaxGroups.k | 11 + .../checkWarns/syntaxGroups.k.out | 6 + pyk/regression-new/checks/Makefile | 3 + .../checks/anywhereSimplification.k | 8 + .../checks/anywhereSimplification.k.out | 6 + pyk/regression-new/checks/anywhereSymbolic.k | 8 + .../checks/anywhereSymbolic.k.out | 6 + pyk/regression-new/checks/attParamForbidden.k | 7 + .../checks/attParamForbidden.k.out | 5 + pyk/regression-new/checks/attParamRequired.k | 7 + .../checks/attParamRequired.k.out | 5 + .../checks/badFunctionRuleWithContext.k | 16 + .../checks/badFunctionRuleWithContext.k.out | 6 + pyk/regression-new/checks/binder.k | 12 + pyk/regression-new/checks/binder.k.out | 11 + pyk/regression-new/checks/checkAssoc.k | 24 + pyk/regression-new/checks/checkAssoc.k.out | 25 + pyk/regression-new/checks/checkBracket.k | 9 + pyk/regression-new/checks/checkBracket.k.out | 5 + pyk/regression-new/checks/checkBracketFine.k | 16 + .../checks/checkBracketFine.k.out | 0 .../checks/checkBracketSubsort.k | 11 + .../checks/checkBracketSubsort.k.out | 5 + .../checks/checkBracketSupersort.k | 11 + .../checks/checkBracketSupersort.k.out | 5 + .../checks/checkBracketUnrelatedsort.k | 10 + .../checks/checkBracketUnrelatedsort.k.out | 5 + .../checks/checkCellSortDeclFail.k | 14 + .../checks/checkCellSortDeclFail.k.out | 6 + .../checks/checkCellSortDeclOK.k | 14 + .../checks/checkCellSortDeclOK.k.out | 0 .../checks/checkCellSortDeclOKIssue.k | 29 + .../checks/checkCellSortDeclOKIssue.k.out | 0 pyk/regression-new/checks/checkCircularList.k | 34 + .../checks/checkCircularList.k.out | 2 + .../checks/checkDuplicateList.k | 10 + .../checks/checkDuplicateList.k.out | 5 + .../checks/checkExcludeSimplification.k | 14 + .../checks/checkExcludeSimplification.k.out | 0 pyk/regression-new/checks/checkFuncRuleAtt.k | 21 + .../checks/checkFuncRuleAtt.k.out | 28 + .../checks/checkFuncWithContext.k | 14 + .../checks/checkFuncWithContext.k.out | 0 pyk/regression-new/checks/checkGroup.k | 5 + pyk/regression-new/checks/checkGroup.k.out | 5 + .../checks/checkInstantiation.k | 12 + .../checks/checkInstantiation.k.out | 5 + pyk/regression-new/checks/checkIsSort.k | 20 + pyk/regression-new/checks/checkIsSort.k.out | 21 + pyk/regression-new/checks/checkListDecl1.k | 14 + .../checks/checkListDecl1.k.out | 5 + pyk/regression-new/checks/checkListDecl2.k | 14 + .../checks/checkListDecl2.k.out | 5 + pyk/regression-new/checks/checkListDecl3.k | 14 + .../checks/checkListDecl3.k.out | 5 + pyk/regression-new/checks/checkMIntLiteral.k | 16 + .../checks/checkMIntLiteral.k.out | 6 + pyk/regression-new/checks/checkMacroRecord.k | 14 + .../checks/checkMacroRecord.k.out | 0 pyk/regression-new/checks/checkModuleAtts.k | 3 + .../checks/checkModuleAtts.k.out | 15 + .../checks/checkParametricSort.k | 8 + .../checks/checkParametricSort.k.out | 5 + .../checks/checkPriorityBlocks.k | 9 + .../checks/checkPriorityBlocks.k.out | 6 + .../checks/checkRecordProdDuplicateLabels.k | 79 + .../checkRecordProdDuplicateLabels.k.out | 11 + .../checks/checkReservedCellNames.k | 16 + .../checks/checkReservedCellNames.k.out | 11 + .../checks/checkSortDeclIssue3038.k | 19 + .../checks/checkSortDeclIssue3038.k.out | 0 .../checks/checkStrictBOOLInclusion.k | 18 + .../checks/checkStrictBOOLInclusion.k.out | 0 pyk/regression-new/checks/checkSymbolKlabel.k | 4 + .../checks/checkSymbolKlabel.k.out | 6 + .../checks/checkTerminatorSymbol.k | 10 + .../checks/checkTerminatorSymbol.k.out | 11 + .../checks/checkUndeclaredTags.k | 4 + .../checks/checkUndeclaredTags.k.out | 5 + pyk/regression-new/checks/circularImports.k | 7 + .../checks/circularImports.k.out | 1 + pyk/regression-new/checks/claimInDef.k | 7 + pyk/regression-new/checks/claimInDef.k.out | 6 + pyk/regression-new/checks/concrete.k | 36 + pyk/regression-new/checks/concrete.k.out | 41 + pyk/regression-new/checks/duplicateAttRule.k | 7 + .../checks/duplicateAttRule.k.out | 5 + .../checks/duplicateAttSyntax.k | 6 + .../checks/duplicateAttSyntax.k.out | 5 + .../checks/duplicateContextLabels.k | 14 + .../checks/duplicateContextLabels.k.out | 5 + pyk/regression-new/checks/duplicateKCells.k | 18 + .../checks/duplicateKCells.k.out | 25 + pyk/regression-new/checks/duplicateModule.k | 8 + .../checks/duplicateModule.k.out | 9 + pyk/regression-new/checks/duplicateRules.k | 10 + .../checks/duplicateRules.k.out | 16 + .../checks/emptyMapCollection.k | 9 + .../checks/emptyMapCollection.k.out | 9 + pyk/regression-new/checks/errorExistential.k | 7 + .../checks/errorExistential.k.out | 6 + pyk/regression-new/checks/existentialCheck.k | 22 + .../checks/existentialCheck.k.out | 41 + .../checks/existsLHSBoundFail.k | 12 + .../checks/existsLHSBoundFail.k.out | 11 + .../checks/existsLHSBoundPass.k | 12 + .../checks/existsLHSBoundPass.k.out | 0 .../checks/expandMacroEnsures.k | 13 + .../checks/expandMacroEnsures.k.out | 9 + .../checks/expandMacroRequires.k | 13 + .../checks/expandMacroRequires.k.out | 9 + pyk/regression-new/checks/formatatt.k | 6 + pyk/regression-new/checks/formatatt.k.out | 6 + pyk/regression-new/checks/freshConfig.k | 19 + pyk/regression-new/checks/freshConfig.k.out | 6 + .../checks/functionContextInRewrite.k | 11 + .../checks/functionContextInRewrite.k.out | 6 + .../checks/functionSimplification.k | 12 + .../checks/functionSimplification.k.out | 5 + pyk/regression-new/checks/intOperationInLHS.k | 23 + .../checks/intOperationInLHS.k.out | 16 + pyk/regression-new/checks/invalidAs.k | 9 + pyk/regression-new/checks/invalidAs.k.out | 16 + .../checks/invalidConstantExp.k | 7 + .../checks/invalidConstantExp.k.out | 8 + .../checks/invalidConstructor.k | 6 + .../checks/invalidConstructor.k.out | 16 + pyk/regression-new/checks/invalidFormat.k | 19 + pyk/regression-new/checks/invalidFormat.k.out | 36 + pyk/regression-new/checks/invalidLabel.k | 10 + pyk/regression-new/checks/invalidLabel.k.out | 16 + pyk/regression-new/checks/invalidPrec.k | 6 + pyk/regression-new/checks/invalidPrec.k.out | 5 + .../checks/invalidSortPredicate.k | 16 + .../checks/invalidSortPredicate.k.out | 8 + pyk/regression-new/checks/invalidStrict.k | 31 + pyk/regression-new/checks/invalidStrict.k.out | 41 + pyk/regression-new/checks/invalidSymbol.k | 12 + pyk/regression-new/checks/invalidSymbol.k.out | 11 + .../checks/localDuplicateList.k | 10 + .../checks/localDuplicateList.k.out | 5 + pyk/regression-new/checks/macroWithFunction.k | 24 + .../checks/macroWithFunction.k.out | 9 + .../checks/mapImportInConfigModules.k | 20 + .../checks/mapImportInConfigModules.k.out | 0 .../checks/markdownErrorLocation.md | 30 + .../checks/markdownErrorLocation.md.out | 6 + pyk/regression-new/checks/missingBar.k | 10 + pyk/regression-new/checks/missingBar.k.out | 6 + pyk/regression-new/checks/missingKResult.k | 21 + .../checks/missingKResult.k.out | 4 + pyk/regression-new/checks/missingModule.k | 4 + pyk/regression-new/checks/missingModule.k.out | 5 + .../checks/nestedFunctionContext.k | 22 + .../checks/nestedFunctionContext.k.out | 11 + .../checks/nestedFunctionContextInFun.k | 13 + .../checks/nestedFunctionContextInFun.k.out | 11 + pyk/regression-new/checks/nestedRewrite.k | 9 + pyk/regression-new/checks/nestedRewrite.k.out | 11 + .../checks/nestedRewriteInFun.k | 15 + .../checks/nestedRewriteInFun.k.out | 21 + pyk/regression-new/checks/noImportFloat.k | 16 + pyk/regression-new/checks/noImportFloat.k.out | 5 + pyk/regression-new/checks/noRewrite.k | 7 + pyk/regression-new/checks/noRewrite.k.out | 6 + pyk/regression-new/checks/noRewriteInFun.k | 7 + .../checks/noRewriteInFun.k.out | 6 + pyk/regression-new/checks/overloadKLabel.k | 6 + .../checks/overloadKLabel.k.out | 6 + pyk/regression-new/checks/paramAmb.k | 14 + pyk/regression-new/checks/paramAmb.k.out | 12 + .../checks/parseErrorExpected.k | 14 + .../checks/parseErrorExpected.k.out | 26 + pyk/regression-new/checks/priorityError.k | 24 + pyk/regression-new/checks/priorityError.k.out | 20 + pyk/regression-new/checks/recordOnRhs.k | 9 + pyk/regression-new/checks/recordOnRhs.k.out | 6 + pyk/regression-new/checks/removeUnit.k | 13 + pyk/regression-new/checks/removeUnit.k.out | 5 + pyk/regression-new/checks/restrictedAtts.k | 7 + .../checks/restrictedAtts.k.out | 11 + .../checks/rewriteInFunctionContext.k | 14 + .../checks/rewriteInFunctionContext.k.out | 6 + pyk/regression-new/checks/signature.k | 61 + pyk/regression-new/checks/signature.k.out | 51 + pyk/regression-new/checks/smtLemmaCheck.k | 17 + pyk/regression-new/checks/smtLemmaCheck.k.out | 9 + pyk/regression-new/checks/tokenCheck.k | 22 + pyk/regression-new/checks/tokenCheck.k.out | 16 + .../checks/totalWithoutFunction.k | 6 + .../checks/totalWithoutFunction.k.out | 6 + pyk/regression-new/checks/unexpandedMacro.k | 7 + .../checks/unexpandedMacro.k.out | 9 + pyk/regression-new/checks/wideningAnywhere.k | 9 + .../checks/wideningAnywhere.k.out | 6 + pyk/regression-new/checks/wideningMacro.k | 9 + pyk/regression-new/checks/wideningMacro.k.out | 6 + .../concrete-function-cache/Makefile | 16 + .../concrete-function-cache/a1-spec.k | 10 + .../concrete-function-cache/a1-spec.k.out | 1 + .../concrete-function-cache/a2-spec.k | 10 + .../concrete-function-cache/a2-spec.k.out | 24 + pyk/regression-new/concrete-function/1.a | 1 + pyk/regression-new/concrete-function/1.a.out | 3 + pyk/regression-new/concrete-function/2.a | 1 + pyk/regression-new/concrete-function/2.a.out | 3 + pyk/regression-new/concrete-function/3.a | 1 + pyk/regression-new/concrete-function/3.a.out | 3 + pyk/regression-new/concrete-function/Makefile | 16 + pyk/regression-new/concrete-function/a.k | 49 + .../concrete-function/a1-spec.k | 10 + .../concrete-function/a1-spec.k.out | 24 + .../concrete-function/a2-spec.k | 10 + .../concrete-function/a2-spec.k.out | 1 + pyk/regression-new/concrete-haskell/Makefile | 7 + pyk/regression-new/concrete-haskell/a.k | 21 + pyk/regression-new/concrete-haskell/a1-spec.k | 23 + .../concrete-haskell/a1-spec.k.out | 1 + .../configuration-composition/Makefile | 7 + .../configuration-composition/config-comp.k | 66 + .../configuration-formatting/1.test | 1 + .../configuration-formatting/1.test.out | 35 + .../configuration-formatting/Makefile | 6 + .../configuration-formatting/test.k | 36 + pyk/regression-new/constant-folding/1.test | 1 + .../constant-folding/1.test.out | 3 + pyk/regression-new/constant-folding/2.test | 1 + .../constant-folding/2.test.out | 3 + pyk/regression-new/constant-folding/3.test | 1 + .../constant-folding/3.test.out | 3 + pyk/regression-new/constant-folding/Makefile | 7 + pyk/regression-new/constant-folding/test.k | 17 + pyk/regression-new/context-alias-2/1.test | 1 + pyk/regression-new/context-alias-2/1.test.out | 12 + pyk/regression-new/context-alias-2/2.test | 1 + pyk/regression-new/context-alias-2/2.test.out | 13 + pyk/regression-new/context-alias-2/3.test | 1 + pyk/regression-new/context-alias-2/3.test.out | 12 + pyk/regression-new/context-alias-2/4.test | 1 + pyk/regression-new/context-alias-2/4.test.out | 12 + pyk/regression-new/context-alias-2/5.test | 1 + pyk/regression-new/context-alias-2/5.test.out | 64 + pyk/regression-new/context-alias-2/Makefile | 8 + pyk/regression-new/context-alias-2/test.k | 32 + pyk/regression-new/context-alias-3/Makefile | 6 + pyk/regression-new/context-alias-3/test.k | 10 + pyk/regression-new/context-alias/1.test | 1 + pyk/regression-new/context-alias/1.test.out | 14 + pyk/regression-new/context-alias/10.test | 1 + pyk/regression-new/context-alias/10.test.out | 14 + pyk/regression-new/context-alias/1b.test | 1 + pyk/regression-new/context-alias/1b.test.out | 14 + pyk/regression-new/context-alias/2.test | 1 + pyk/regression-new/context-alias/2.test.out | 14 + pyk/regression-new/context-alias/2b.test | 1 + pyk/regression-new/context-alias/2b.test.out | 14 + pyk/regression-new/context-alias/3.test | 1 + pyk/regression-new/context-alias/3.test.out | 14 + pyk/regression-new/context-alias/3b.test | 1 + pyk/regression-new/context-alias/3b.test.out | 14 + pyk/regression-new/context-alias/4.test | 1 + pyk/regression-new/context-alias/4.test.out | 14 + pyk/regression-new/context-alias/4b.test | 1 + pyk/regression-new/context-alias/4b.test.out | 14 + pyk/regression-new/context-alias/5.test | 1 + pyk/regression-new/context-alias/5.test.out | 14 + pyk/regression-new/context-alias/5b.test | 1 + pyk/regression-new/context-alias/5b.test.out | 14 + pyk/regression-new/context-alias/6.test | 1 + pyk/regression-new/context-alias/6.test.out | 14 + pyk/regression-new/context-alias/6b.test | 1 + pyk/regression-new/context-alias/6b.test.out | 14 + pyk/regression-new/context-alias/7.test | 1 + pyk/regression-new/context-alias/7.test.out | 14 + pyk/regression-new/context-alias/7b.test | 1 + pyk/regression-new/context-alias/7b.test.out | 14 + pyk/regression-new/context-alias/8.test | 1 + pyk/regression-new/context-alias/8.test.out | 14 + pyk/regression-new/context-alias/8b.test | 1 + pyk/regression-new/context-alias/8b.test.out | 14 + pyk/regression-new/context-alias/9.test | 1 + pyk/regression-new/context-alias/9.test.out | 14 + pyk/regression-new/context-alias/Makefile | 7 + pyk/regression-new/context-alias/test.k | 46 + pyk/regression-new/context-cell/1.test | 1 + pyk/regression-new/context-cell/1.test.out | 8 + pyk/regression-new/context-cell/Makefile | 6 + pyk/regression-new/context-cell/test.k | 12 + pyk/regression-new/context-labels/Makefile | 27 + .../context-labels/barlabel.find-rule | 1 + .../context-labels/barlabel.find-rule.out | 2 + .../context-labels/bazlabel.find-rule | 1 + .../context-labels/bazlabel.find-rule.out | 2 + .../context-labels/context-spec.k | 13 + .../context-labels/context-spec.k.in | 22 + .../context-labels/context-spec.k.out | 638 + pyk/regression-new/context-labels/context.k | 17 + .../context-labels/foolabel.find-rule | 1 + .../context-labels/foolabel.find-rule.out | 4 + pyk/regression-new/coverage/Makefile | 6 + pyk/regression-new/coverage/test.k | 8 + .../domains-lemmas-no-smt/Makefile | 9 + .../domains-lemmas-no-smt-spec.k | 26 + .../domains-lemmas-no-smt-spec.k.out | 1 + .../domains-lemmas-no-smt.k | 12 + .../domains-lemmas-smt/Makefile | 9 + .../domains-lemmas-smt-spec.k | 10 + .../domains-lemmas-smt-spec.k.out | 1 + .../domains-lemmas-smt/domains-lemmas-smt.k | 13 + pyk/regression-new/doubleinj/1.test | 1 + pyk/regression-new/doubleinj/1.test.out | 8 + pyk/regression-new/doubleinj/Makefile | 7 + pyk/regression-new/doubleinj/test.k | 5 + pyk/regression-new/equals-formatting/Makefile | 6 + pyk/regression-new/equals-formatting/eq.k | 15 + .../equals-formatting/equals1.kast | 1 + .../equals-formatting/equals1.kast.out | 5 + .../equals-formatting/equals2.kast | 1 + .../equals-formatting/equals2.kast.out | 5 + pyk/regression-new/equals-pattern/1.test | 1 + pyk/regression-new/equals-pattern/1.test.out | 3 + pyk/regression-new/equals-pattern/2.test | 1 + pyk/regression-new/equals-pattern/2.test.out | 3 + pyk/regression-new/equals-pattern/3.test | 1 + pyk/regression-new/equals-pattern/3.test.out | 3 + pyk/regression-new/equals-pattern/4.test | 1 + pyk/regression-new/equals-pattern/4.test.out | 3 + pyk/regression-new/equals-pattern/5.test | 1 + pyk/regression-new/equals-pattern/5.test.out | 3 + pyk/regression-new/equals-pattern/6.test | 1 + pyk/regression-new/equals-pattern/6.test.out | 3 + pyk/regression-new/equals-pattern/7.test | 1 + pyk/regression-new/equals-pattern/7.test.out | 3 + pyk/regression-new/equals-pattern/8.test | 1 + pyk/regression-new/equals-pattern/8.test.out | 3 + pyk/regression-new/equals-pattern/9.test | 1 + pyk/regression-new/equals-pattern/9.test.out | 3 + pyk/regression-new/equals-pattern/Makefile | 7 + pyk/regression-new/equals-pattern/test.k | 37 + .../excludedModuleAtts/Makefile | 2 + .../excludedModuleAtts/haskell/Makefile | 4 + .../excludedModuleAtts/haskell/test-entry.k | 8 + .../haskell/test-entry.k.out | 1 + .../excludedModuleAtts/haskell/test-main.k | 8 + .../haskell/test-main.k.out | 1 + .../excludedModuleAtts/llvm/Makefile | 3 + .../excludedModuleAtts/llvm/test-entry.k | 8 + .../excludedModuleAtts/llvm/test-entry.k.out | 1 + .../excludedModuleAtts/llvm/test-main.k | 8 + .../excludedModuleAtts/llvm/test-main.k.out | 1 + .../exit-code-no-gen-top/1.ecode | 1 + .../exit-code-no-gen-top/1.ecode.out | 8 + .../exit-code-no-gen-top/Makefile | 6 + .../exit-code-no-gen-top/exitcode.k | 21 + pyk/regression-new/f32-mul/1.mul | 1 + pyk/regression-new/f32-mul/1.mul.out | 3 + pyk/regression-new/f32-mul/Makefile | 6 + pyk/regression-new/f32-mul/float-mul.k | 19 + pyk/regression-new/fatalWarnings/Makefile | 3 + pyk/regression-new/fatalWarnings/test.k | 9 + pyk/regression-new/fatalWarnings/test.k.out | 1 + pyk/regression-new/ffi-llvm/Makefile | 6 + pyk/regression-new/ffi-llvm/test.k | 11 + pyk/regression-new/float-id/1.test | 1 + pyk/regression-new/float-id/1.test.out | 3 + pyk/regression-new/float-id/2.test | 1 + pyk/regression-new/float-id/2.test.out | 3 + pyk/regression-new/float-id/3.test | 1 + pyk/regression-new/float-id/3.test.out | 3 + pyk/regression-new/float-id/4.test | 1 + pyk/regression-new/float-id/4.test.out | 3 + pyk/regression-new/float-id/5.test | 1 + pyk/regression-new/float-id/5.test.out | 3 + pyk/regression-new/float-id/Makefile | 5 + pyk/regression-new/float-id/test.k | 10 + pyk/regression-new/fresh1/Makefile | 7 + pyk/regression-new/fresh1/test.k | 16 + pyk/regression-new/fresh2/Makefile | 7 + pyk/regression-new/fresh2/test.k | 18 + pyk/regression-new/fresh3/Makefile | 7 + pyk/regression-new/fresh3/test-ext.k | 34 + pyk/regression-new/fun-llvm/Makefile | 7 + pyk/regression-new/fun-llvm/fun-test.k | 105 + .../fun-llvm/funIntListAndConfig.test | 1 + .../fun-llvm/funIntListAndConfig.test.out | 8 + pyk/regression-new/fun-llvm/funSort.test | 1 + pyk/regression-new/fun-llvm/funSort.test.out | 8 + pyk/regression-new/fun-llvm/funSort2.test | 1 + pyk/regression-new/fun-llvm/funSort2.test.out | 8 + pyk/regression-new/fun-llvm/nestedFun.test | 1 + .../fun-llvm/nestedFun.test.out | 8 + .../fun-llvm/nestedFun3Levels.test | 1 + .../fun-llvm/nestedFun3Levels.test.out | 8 + .../fun-llvm/nestedFunString.test | 1 + .../fun-llvm/nestedFunString.test.out | 8 + pyk/regression-new/fun-llvm/useFooBarInt.test | 1 + .../fun-llvm/useFooBarInt.test.out | 8 + pyk/regression-new/fun-llvm/useFooToBar.test | 1 + .../fun-llvm/useFooToBar.test.out | 8 + .../fun-llvm/useNestedBarInt.test | 1 + .../fun-llvm/useNestedBarInt.test.out | 8 + .../fun-llvm/useNestedFooBarInt.test | 1 + .../fun-llvm/useNestedFooBarInt.test.out | 8 + .../fun-llvm/useNestedFooToBar.test | 1 + .../fun-llvm/useNestedFooToBar.test.out | 8 + pyk/regression-new/glr/1.test | 1 + pyk/regression-new/glr/Makefile | 17 + pyk/regression-new/glr/parse | 5 + pyk/regression-new/glr/test.k | 16 + pyk/regression-new/glr/test.ref | 1 + pyk/regression-new/glr2/1.test | 1 + pyk/regression-new/glr2/Makefile | 17 + pyk/regression-new/glr2/parse | 5 + pyk/regression-new/glr2/test.k | 18 + pyk/regression-new/glr2/test.ref | 1 + pyk/regression-new/glr3/1.test | 1 + pyk/regression-new/glr3/Makefile | 17 + pyk/regression-new/glr3/parse | 5 + pyk/regression-new/glr3/test.k | 18 + pyk/regression-new/glr3/test.ref | 1 + pyk/regression-new/glr4/1.test | 1 + pyk/regression-new/glr4/Makefile | 17 + pyk/regression-new/glr4/parse | 5 + pyk/regression-new/glr4/test.k | 22 + pyk/regression-new/glr4/test.ref | 1 + pyk/regression-new/group/1.test | 1 + pyk/regression-new/group/1.test.out | 3 + pyk/regression-new/group/Makefile | 6 + pyk/regression-new/group/test.k | 28 + pyk/regression-new/help/Makefile | 36 + .../help/check-git-revision-format | 11 + pyk/regression-new/help/test.k | 5 + pyk/regression-new/imp++-llvm/Makefile | 8 + pyk/regression-new/imp++-llvm/div.imp | 3 + pyk/regression-new/imp++-llvm/div.imp.out | 104 + pyk/regression-new/imp++-llvm/imp.md | 676 + pyk/regression-new/imp++-llvm/spawn.imp | 8 + pyk/regression-new/imp++-llvm/spawn.imp.in | 1 + pyk/regression-new/imp++-llvm/spawn.imp.out | 239 + pyk/regression-new/imp-haskell/Makefile | 11 + pyk/regression-new/imp-haskell/collatz.imp | 19 + .../imp-haskell/collatz.imp.out | 12 + pyk/regression-new/imp-haskell/imp.k | 70 + pyk/regression-new/imp-haskell/klabel-spec.k | 14 + .../imp-haskell/klabel-spec.k.out | 1 + .../imp-haskell/max-fail-spec.k | 33 + .../imp-haskell/max-fail-spec.k.out | 28 + pyk/regression-new/imp-haskell/max-spec.k | 33 + pyk/regression-new/imp-haskell/max-spec.k.out | 1 + .../imp-haskell/nested-imports-spec.k | 37 + .../imp-haskell/nested-imports-spec.k.out | 1 + pyk/regression-new/imp-haskell/primes.imp | 26 + pyk/regression-new/imp-haskell/primes.imp.out | 17 + pyk/regression-new/imp-haskell/sum.imp | 12 + pyk/regression-new/imp-haskell/sum.imp.out | 9 + pyk/regression-new/imp-json/Makefile | 7 + pyk/regression-new/imp-json/imp.k | 69 + pyk/regression-new/imp-kore/Makefile | 6 + pyk/regression-new/imp-kore/imp.k | 190 + pyk/regression-new/imp-llvm/Makefile | 8 + pyk/regression-new/imp-llvm/collatz.imp | 19 + pyk/regression-new/imp-llvm/collatz.imp.out | 12 + pyk/regression-new/imp-llvm/imp.k | 71 + pyk/regression-new/imp-llvm/primes.imp | 26 + pyk/regression-new/imp-llvm/primes.imp.out | 17 + pyk/regression-new/imp-llvm/sum.imp | 12 + pyk/regression-new/imp-llvm/sum.imp.out | 9 + pyk/regression-new/include/ktest.mak | 2 +- pyk/regression-new/int-llvm/Makefile | 7 + pyk/regression-new/int-llvm/llvm-int | 7 + pyk/regression-new/int-llvm/llvm-int.k | 8 + pyk/regression-new/int-llvm/test1.llvmint | 1 + pyk/regression-new/int-llvm/test1.llvmint.out | 3 + pyk/regression-new/int-llvm/test2.llvmint | 1 + pyk/regression-new/int-llvm/test2.llvmint.out | 3 + pyk/regression-new/io-llvm/1.test | 1 + pyk/regression-new/io-llvm/1.test.out | 3 + pyk/regression-new/io-llvm/2.test | 1 + pyk/regression-new/io-llvm/2.test.out | 3 + pyk/regression-new/io-llvm/3.test | 1 + pyk/regression-new/io-llvm/3.test.out | 3 + pyk/regression-new/io-llvm/4.test | 1 + pyk/regression-new/io-llvm/4.test.out | 3 + pyk/regression-new/io-llvm/Makefile | 9 + pyk/regression-new/io-llvm/test.k | 45 + pyk/regression-new/issue-1088/.gitignore | 1 + pyk/regression-new/issue-1088/1.kast | 1 + pyk/regression-new/issue-1088/1.kast.expected | 1 + pyk/regression-new/issue-1088/Makefile | 8 + pyk/regression-new/issue-1088/kast-in.k | 12 + pyk/regression-new/issue-1090/1.test | 1 + pyk/regression-new/issue-1090/1.test.out | 3 + pyk/regression-new/issue-1090/Makefile | 5 + pyk/regression-new/issue-1090/test.k | 17 + pyk/regression-new/issue-1098/1.test | 1 + pyk/regression-new/issue-1098/1.test.out | 3 + pyk/regression-new/issue-1098/Makefile | 6 + pyk/regression-new/issue-1098/test.k | 16 + pyk/regression-new/issue-1145/1.test | 1 + pyk/regression-new/issue-1145/1.test.out | 3 + pyk/regression-new/issue-1145/Makefile | 6 + pyk/regression-new/issue-1145/test.k | 14 + pyk/regression-new/issue-1169/.gitignore | 1 + pyk/regression-new/issue-1169/1.test | 1 + pyk/regression-new/issue-1169/1.test.out | 3 + pyk/regression-new/issue-1169/Makefile | 15 + pyk/regression-new/issue-1169/test.k | 8 + pyk/regression-new/issue-1175/Makefile | 8 + .../issue-1175/test-broken-spec.k | 7 + .../issue-1175/test-broken-spec.k.out | 6 + pyk/regression-new/issue-1175/test.k | 12 + .../issue-1175/test2-broken-spec.k | 7 + .../issue-1175/test2-broken-spec.k.out | 1 + pyk/regression-new/issue-1184/Makefile | 6 + pyk/regression-new/issue-1184/test.k | 10 + pyk/regression-new/issue-1186/1.test | 1 + pyk/regression-new/issue-1186/1.test.out | 3 + pyk/regression-new/issue-1186/Makefile | 6 + pyk/regression-new/issue-1186/test.k | 10 + pyk/regression-new/issue-1193/Makefile | 4 + pyk/regression-new/issue-1193/imp.k | 37 + pyk/regression-new/issue-1193/imp.k.out | 0 pyk/regression-new/issue-1263/1.test | 1 + pyk/regression-new/issue-1263/1.test.out | 3 + pyk/regression-new/issue-1263/Makefile | 6 + pyk/regression-new/issue-1263/test.k | 29 + pyk/regression-new/issue-1273/Makefile | 6 + pyk/regression-new/issue-1273/test.k | 17 + pyk/regression-new/issue-1372/Makefile | 7 + pyk/regression-new/issue-1372/test.k | 8 + pyk/regression-new/issue-1384/Makefile | 7 + pyk/regression-new/issue-1384/test.k | 45 + pyk/regression-new/issue-1388/Makefile | 7 + pyk/regression-new/issue-1388/test.k | 9 + pyk/regression-new/issue-1436/1.test | 1 + pyk/regression-new/issue-1436/1.test.out | 13 + pyk/regression-new/issue-1436/Makefile | 7 + pyk/regression-new/issue-1436/test.k | 25 + .../issue-1472-unboundVars/Makefile | 7 + .../issue-1472-unboundVars/test-spec.k | 10 + .../issue-1472-unboundVars/test-spec.k.out | 1 + .../issue-1472-unboundVars/test.k | 10 + .../issue-1489-claimLoc/Makefile | 13 + .../issue-1489-claimLoc/claimLoc-spec.k | 7 + .../issue-1489-claimLoc/claimLoc-spec.k.out | 4 + .../issue-1489-claimLoc/claimLoc.k | 12 + pyk/regression-new/issue-1528/1.test | 1 + pyk/regression-new/issue-1528/1.test.out | 3 + pyk/regression-new/issue-1528/2.test | 1 + pyk/regression-new/issue-1528/2.test.out | 3 + pyk/regression-new/issue-1528/3.test | 1 + pyk/regression-new/issue-1528/3.test.out | 3 + pyk/regression-new/issue-1528/Makefile | 6 + pyk/regression-new/issue-1528/test.k | 11 + .../Makefile | 1 + .../issue-1545-func-in-simplification/test.k | 6 + .../test.k.out | 12 + pyk/regression-new/issue-1572/Makefile | 3 + pyk/regression-new/issue-1572/test.k | 10 + pyk/regression-new/issue-1572/test.k.out | 1 + pyk/regression-new/issue-1573/1.test | 1 + pyk/regression-new/issue-1573/1.test.out | 8 + pyk/regression-new/issue-1573/Makefile | 6 + pyk/regression-new/issue-1573/test.k | 24 + pyk/regression-new/issue-1602/Makefile | 10 + pyk/regression-new/issue-1602/foo.test | 11001 ++++++++++++++++ pyk/regression-new/issue-1602/foo.test.out | 0 pyk/regression-new/issue-1602/test.k | 14 + pyk/regression-new/issue-1633/1.test | 1 + pyk/regression-new/issue-1633/1.test.out | 3 + pyk/regression-new/issue-1633/10.test | 1 + pyk/regression-new/issue-1633/10.test.out | 3 + pyk/regression-new/issue-1633/11.test | 1 + pyk/regression-new/issue-1633/11.test.out | 3 + pyk/regression-new/issue-1633/12.test | 1 + pyk/regression-new/issue-1633/12.test.out | 3 + pyk/regression-new/issue-1633/13.test | 1 + pyk/regression-new/issue-1633/13.test.out | 3 + pyk/regression-new/issue-1633/2.test | 1 + pyk/regression-new/issue-1633/2.test.out | 3 + pyk/regression-new/issue-1633/3.test | 1 + pyk/regression-new/issue-1633/3.test.out | 3 + pyk/regression-new/issue-1633/4.test | 1 + pyk/regression-new/issue-1633/4.test.out | 3 + pyk/regression-new/issue-1633/5.test | 1 + pyk/regression-new/issue-1633/5.test.out | 3 + pyk/regression-new/issue-1633/6.test | 1 + pyk/regression-new/issue-1633/6.test.out | 3 + pyk/regression-new/issue-1633/7.test | 1 + pyk/regression-new/issue-1633/7.test.out | 3 + pyk/regression-new/issue-1633/8.test | 1 + pyk/regression-new/issue-1633/8.test.out | 3 + pyk/regression-new/issue-1633/9.test | 1 + pyk/regression-new/issue-1633/9.test.out | 3 + pyk/regression-new/issue-1633/Makefile | 6 + pyk/regression-new/issue-1633/lexical.k | 63 + .../issue-1676-koreBytes/1.test | 1 + .../issue-1676-koreBytes/1.test.out | 16 + .../issue-1676-koreBytes/Makefile | 8 + .../issue-1676-koreBytes/test.k | 12 + .../issue-1682-korePrettyPrint/1.test | 1 + .../issue-1682-korePrettyPrint/1.test.out | 16 + .../issue-1682-korePrettyPrint/2.kast | 1 + .../issue-1682-korePrettyPrint/2.kast.out | 1 + .../issue-1682-korePrettyPrint/Makefile | 11 + .../issue-1682-korePrettyPrint/test.k | 8 + .../issue-1683-cfgVarsWarns/1.test | 1 + .../issue-1683-cfgVarsWarns/1.test.out | 1 + .../issue-1683-cfgVarsWarns/Makefile | 10 + .../issue-1683-cfgVarsWarns/test.k | 9 + .../issue-1683-cfgVarsWarns/test.k.out | 0 pyk/regression-new/issue-1760/Makefile | 1 + pyk/regression-new/issue-1760/test.k | 106 + pyk/regression-new/issue-1760/test.k.out | 20 + pyk/regression-new/issue-1789-rhsOr/Makefile | 2 + .../issue-1789-rhsOr/haskell/0.test | 1 + .../issue-1789-rhsOr/haskell/0.test.out | 3 + .../issue-1789-rhsOr/haskell/1.test | 1 + .../issue-1789-rhsOr/haskell/1.test.out | 3 + .../issue-1789-rhsOr/haskell/Makefile | 6 + .../issue-1789-rhsOr/haskell/test.k | 29 + .../issue-1789-rhsOr/llvm/1.test | 1 + .../issue-1789-rhsOr/llvm/1.test.out | 8 + .../issue-1789-rhsOr/llvm/2.test | 1 + .../issue-1789-rhsOr/llvm/2.test.out | 8 + .../issue-1789-rhsOr/llvm/Makefile | 6 + .../issue-1789-rhsOr/llvm/test.k | 24 + pyk/regression-new/issue-1844-noPGM/Makefile | 2 + .../issue-1844-noPGM/haskell/Makefile | 7 + .../issue-1844-noPGM/haskell/krun.nopgm | 1 + .../issue-1844-noPGM/haskell/krun.nopgm.out | 3 + .../issue-1844-noPGM/haskell/test.k | 1 + .../issue-1844-noPGM/krun.nopgm | 0 .../issue-1844-noPGM/llvm/Makefile | 7 + .../issue-1844-noPGM/llvm/krun.nopgm | 1 + .../issue-1844-noPGM/llvm/krun.nopgm.out | 3 + .../issue-1844-noPGM/llvm/test.k | 1 + pyk/regression-new/issue-1844-noPGM/test.k | 7 + .../issue-1879-kproveTrans/Makefile | 2 + .../issue-1879-kproveTrans/haskell/Makefile | 5 + .../haskell/test-spec.k | 10 + .../haskell/test-spec.k.out | 1 + .../issue-1879-kproveTrans/haskell/test.k | 31 + pyk/regression-new/issue-1952/1.test | 1 + pyk/regression-new/issue-1952/1.test.out | 3 + pyk/regression-new/issue-1952/Makefile | 7 + pyk/regression-new/issue-1952/test.k | 6 + pyk/regression-new/issue-2075-2/1.test | 1 + pyk/regression-new/issue-2075-2/1.test.out | 5 + pyk/regression-new/issue-2075-2/Makefile | 7 + pyk/regression-new/issue-2075-2/test.k | 10 + pyk/regression-new/issue-2075/1.test | 1 + pyk/regression-new/issue-2075/1.test.out | 10 + pyk/regression-new/issue-2075/Makefile | 7 + pyk/regression-new/issue-2075/test.k | 12 + pyk/regression-new/issue-2114/Makefile | 7 + pyk/regression-new/issue-2114/test.k | 17 + .../issue-2142-markConcrete/Makefile | 9 + .../issue-2142-markConcrete/test-spec.k | 10 + .../issue-2142-markConcrete/test-spec.k.out | 10 + .../issue-2142-markConcrete/test.k | 22 + .../issue-2146-duplicateModules/Makefile | 9 + .../issue-2146-duplicateModules/test.k | 8 + .../issue-2146-duplicateModules/test.k.out | 9 + .../issue-2174-kprovexParseError/Makefile | 9 + .../issue-2174-kprovexParseError/test-spec.k | 10 + .../test-spec.k.out | 6 + .../issue-2174-kprovexParseError/test.k | 22 + pyk/regression-new/issue-2273/Makefile | 13 + pyk/regression-new/issue-2273/a.k | 9 + pyk/regression-new/issue-2273/tests/1.a | 1 + pyk/regression-new/issue-2273/tests/1.a.out | 3 + .../issue-2273/tests/kast-in1.kast | 1 + .../issue-2273/tests/kast-in1.kast.out | 5 + .../Makefile | 8 + .../a1-spec.k | 21 + .../a1-spec.k.out | 1 + .../a2-spec.k | 17 + .../a2-spec.k.out | 5 + .../a3-spec.k | 12 + .../a3-spec.k.out | 1 + .../a4-spec.k | 12 + .../a4-spec.k.out | 1 + .../a5-spec.k | 13 + .../a5-spec.k.out | 1 + .../a6-spec.k | 17 + .../a6-spec.k.out | 5 + .../issue-2287-simpl-rules-in-kprovex/test.k | 25 + .../issue-2315-id-quotes/1.test | 1 + .../issue-2315-id-quotes/1.test.out | 3 + .../issue-2315-id-quotes/2.test | 1 + .../issue-2315-id-quotes/2.test.out | 3 + .../issue-2315-id-quotes/Makefile | 7 + .../issue-2315-id-quotes/test.k | 17 + .../issue-2321-kprovexCrash/Makefile | 9 + .../issue-2321-kprovexCrash/test-spec.k | 12 + .../issue-2321-kprovexCrash/test-spec.k.out | 1 + .../issue-2321-kprovexCrash/test.k | 20 + .../issue-2356-koreDecode/1.test | 1 + .../issue-2356-koreDecode/1.test.out | 3 + .../issue-2356-koreDecode/Makefile | 10 + .../issue-2356-koreDecode/result.kore.kast | 37 + .../result.kore.kast.out | 3 + .../issue-2356-koreDecode/result2.kore.kast | 0 .../issue-2356-koreDecode/test.k | 11 + .../issue-2812-kprove-filter-claims/Makefile | 2 + .../claims/Makefile | 9 + .../claims/a1-spec.k | 22 + .../claims/a1-spec.k.out | 1 + .../claims/a2-spec.k | 14 + .../claims/a2-spec.k.out | 1 + .../claims/test.k | 25 + .../exclude/Makefile | 9 + .../exclude/a1-spec.k | 24 + .../exclude/a1-spec.k.out | 1 + .../exclude/test.k | 25 + .../trusted/Makefile | 9 + .../trusted/a1-spec.k | 16 + .../trusted/a1-spec.k.out | 1 + .../trusted/test.k | 25 + .../Makefile | 2 + .../check/Makefile | 4 + .../check/test.k | 6 + .../check/test.k.out | 5 + .../haskell/1.test | 1 + .../haskell/1.test.out | 3 + .../haskell/Makefile | 7 + .../haskell/test.k | 9 + .../llvm/1.test | 1 + .../llvm/1.test.out | 3 + .../llvm/Makefile | 7 + .../llvm/test.k | 9 + .../issue-3035-antileft/Makefile | 2 + .../issue-3035-antileft/haskell/1.test | 1 + .../issue-3035-antileft/haskell/1.test.out | 3 + .../issue-3035-antileft/haskell/2.test | 1 + .../issue-3035-antileft/haskell/2.test.out | 3 + .../issue-3035-antileft/haskell/3.test | 1 + .../issue-3035-antileft/haskell/3.test.out | 3 + .../issue-3035-antileft/haskell/Makefile | 7 + .../issue-3035-antileft/haskell/test.k | 10 + .../issue-3035-antileft/llvm/1.test | 1 + .../issue-3035-antileft/llvm/1.test.out | 3 + .../issue-3035-antileft/llvm/2.test | 1 + .../issue-3035-antileft/llvm/2.test.out | 3 + .../issue-3035-antileft/llvm/3.test | 1 + .../issue-3035-antileft/llvm/3.test.out | 3 + .../issue-3035-antileft/llvm/Makefile | 7 + .../issue-3035-antileft/llvm/test.k | 11 + pyk/regression-new/issue-313/Makefile | 1 + pyk/regression-new/issue-313/test.k | 21 + pyk/regression-new/issue-313/test.k.out | 5 + .../Makefile | 7 + .../test.k | 16 + .../test.k.out | 1 + pyk/regression-new/issue-3385/Makefile | 6 + pyk/regression-new/issue-3385/test.k | 11 + pyk/regression-new/issue-3385/test.k.out | 6 + pyk/regression-new/issue-3446/Makefile | 1 + pyk/regression-new/issue-3446/a.kast | 1 + pyk/regression-new/issue-3446/a.kast.out | 5 + pyk/regression-new/issue-3446/test.k | 9 + pyk/regression-new/issue-3446/test.k.out | 0 .../issue-3450-kprove-fresh/Makefile | 6 + .../issue-3450-kprove-fresh/explicit-spec.k | 12 + .../explicit-spec.k.out | 1 + .../issue-3450-kprove-fresh/implicit-spec.k | 11 + .../implicit-spec.k.out | 1 + .../issue-3450-kprove-fresh/test.k | 18 + .../issue-3520-freshConfig/Makefile | 7 + .../issue-3520-freshConfig/run.test | 1 + .../issue-3520-freshConfig/run.test.out | 5 + .../issue-3520-freshConfig/test.k | 68 + .../issue-3604-counterCell/1.test | 1 + .../issue-3604-counterCell/1.test.out | 8 + .../issue-3604-counterCell/Makefile | 5 + .../issue-3604-counterCell/test.k | 15 + .../issue-3647-debugTokens/Makefile | 6 + .../issue-3647-debugTokens/a.test.kast | 14 + .../issue-3647-debugTokens/a.test.kast.out | 15 + .../issue-3647-debugTokens/b.test.kast | 1 + .../issue-3647-debugTokens/b.test.kast.out | 9 + .../issue-3647-debugTokens/test.k | 14 + .../issue-3672-debugParse/Makefile | 8 + .../issue-3672-debugParse/a.test.kast | 1 + .../issue-3672-debugParse/a.test.kast.out | 11 + .../issue-3672-debugParse/b.test.kast | 1 + .../issue-3672-debugParse/b.test.kast.out | 11 + .../issue-3672-debugParse/test.k | 21 + .../issue-3996-unary-symbol-list/Makefile | 5 + .../issue-3996-unary-symbol-list/int-list.k | 4 + pyk/regression-new/issue-425/Makefile | 5 + pyk/regression-new/issue-425/test.k | 12 + pyk/regression-new/issue-567/Makefile | 5 + pyk/regression-new/issue-567/test.k | 17 + pyk/regression-new/issue-582/1.test | 1 + pyk/regression-new/issue-582/1.test.out | 3 + pyk/regression-new/issue-582/Makefile | 8 + pyk/regression-new/issue-582/test-parser | 1 + pyk/regression-new/issue-582/test.k | 8 + pyk/regression-new/issue-946/Makefile | 7 + pyk/regression-new/issue-946/output | 13 + pyk/regression-new/issue-946/test.k | 12 + pyk/regression-new/issue-999/Makefile | 4 + pyk/regression-new/issue-999/kat.k | 106 + pyk/regression-new/issue-999/kat.k.out | 20 + pyk/regression-new/ite-bug/Makefile | 13 + pyk/regression-new/ite-bug/failing-1-spec.k | 6 + .../ite-bug/failing-1-spec.k.out | 21 + pyk/regression-new/ite-bug/failing-2-spec.k | 6 + .../ite-bug/failing-2-spec.k.out | 21 + pyk/regression-new/ite-bug/ite-bug.k | 37 + pyk/regression-new/ite-bug/passing-spec.k | 6 + pyk/regression-new/ite-bug/passing-spec.k.out | 1 + pyk/regression-new/itp/Makefile | 2 + pyk/regression-new/itp/nat-assoc/Makefile | 8 + pyk/regression-new/itp/nat-assoc/assoc-spec.k | 21 + .../itp/nat-assoc/assoc-spec.k.out | 1 + pyk/regression-new/itp/nat-assoc/nat.k | 23 + pyk/regression-new/itp/nth-ancestor/Makefile | 8 + pyk/regression-new/itp/nth-ancestor/chain.k | 89 + .../itp/nth-ancestor/nth1-spec.k | 51 + .../itp/nth-ancestor/nth1-spec.k.out | 1 + .../itp/nth-ancestor/nth2-spec.k | 63 + .../itp/nth-ancestor/nth2-spec.k.out | 1 + .../itp/nth-ancestor/proof-script.k | 44 + .../itp/nth-ancestor/verification.k | 17 + pyk/regression-new/json-input/Makefile | 6 + pyk/regression-new/json-input/json-in.k | 15 + .../json-input/json-in1.json.kast | 1 + .../json-input/json-in1.json.kast.out | 5 + .../json-input/json-in2.json.kast | 1 + .../json-input/json-in2.json.kast.out | 5 + .../json-input/json-in3.json.kast | 1 + .../json-input/json-in3.json.kast.out | 5 + .../kast-bison-bytes/.gitignore | 1 + .../kast-bison-bytes/1.kast-bison | 1 + .../kast-bison-bytes/1.kast-bison.out | 1 + pyk/regression-new/kast-bison-bytes/Makefile | 8 + pyk/regression-new/kast-bison-bytes/kast-in.k | 12 + pyk/regression-new/kast-bison/.gitignore | 1 + pyk/regression-new/kast-bison/1.kast-bison | 1 + .../kast-bison/1.kast-bison.out | 1 + pyk/regression-new/kast-bison/Makefile | 8 + pyk/regression-new/kast-bison/kast-in.k | 12 + .../kast-default-output/Makefile | 6 + .../kast-default-output/kast-out.k | 15 + .../kast-default-output/kast-out1.kast | 1 + .../kast-default-output/kast-out1.kast.out | 1 + .../kast-default-output/kast-out2.kast | 1 + .../kast-default-output/kast-out2.kast.out | 1 + pyk/regression-new/kast-input/Makefile | 6 + pyk/regression-new/kast-input/kast-in.k | 15 + pyk/regression-new/kast-input/kast-in1.kast | 2 + .../kast-input/kast-in1.kast.out | 5 + pyk/regression-new/kast-input/kast-in2.kast | 2 + .../kast-input/kast-in2.kast.out | 5 + pyk/regression-new/kast-kore-input/Makefile | 8 + pyk/regression-new/kast-kore-input/kast-in.k | 15 + .../kast-kore-input/kast-in1.kast | 1 + .../kast-kore-input/kast-in1.kast.out | 5 + .../kast-kore-input/kast-in2.kast | 1 + .../kast-kore-input/kast-in2.kast.out | 5 + .../kast-kore-input/kast-in3.kast | 1 + .../kast-kore-input/kast-in3.kast.out | 5 + pyk/regression-new/kast-rule/Makefile | 6 + pyk/regression-new/kast-rule/kast-in.k | 16 + pyk/regression-new/kast-rule/kast-in1.kast | 1 + .../kast-rule/kast-in1.kast.out | 1 + pyk/regression-new/kast-rule/kast-in2.kast | 1 + .../kast-rule/kast-in2.kast.out | 1 + pyk/regression-new/kast-rule/kast-in3.kast | 1 + .../kast-rule/kast-in3.kast.out | 1 + pyk/regression-new/kast-rule/kast-in4.kast | 1 + .../kast-rule/kast-in4.kast.out | 1 + pyk/regression-new/kast-rule/kast-in5.kast | 1 + .../kast-rule/kast-in5.kast.out | 1 + pyk/regression-new/kdep-options/Makefile | 2 + .../kdep-options/remake-depend/Makefile | 5 + .../kdep-options/remake-depend/a.k | 6 + .../kdep-options/remake-depend/a.k.out | 10 + .../kdep-options/remake-depend/b.k | 3 + .../kdep-options/remake-depend/b.k.out | 8 + .../kdep-options/simple/IncludeDirTest/d.k | 3 + .../kdep-options/simple/Makefile | 5 + pyk/regression-new/kdep-options/simple/a.k | 8 + .../kdep-options/simple/a.k.out | 6 + pyk/regression-new/kdep-options/simple/b.k | 3 + .../kdep-options/simple/b.k.out | 3 + pyk/regression-new/kdep-options/simple/c.k | 6 + .../kdep-options/simple/c.k.out | 4 + .../kdep-options/simple/outDirTest.k | 3 + .../kdep-options/simple/outDirTest.k.out | 3 + .../kompiled-directory/Makefile | 2 + .../kompiled-directory/default/1.test | 1 + .../kompiled-directory/default/1.test.in | 0 .../kompiled-directory/default/1.test.out | 3 + .../kompiled-directory/default/Makefile | 10 + .../kompiled-directory/default/test.k | 9 + .../kompiled-directory/nested/1.test | 1 + .../kompiled-directory/nested/1.test.in | 0 .../kompiled-directory/nested/1.test.out | 3 + .../kompiled-directory/nested/Makefile | 15 + .../kompiled-directory/nested/test.k | 9 + .../some/nested/path/.empty | 0 pyk/regression-new/kore-brackets/Makefile | 8 + pyk/regression-new/kore-brackets/korebrkt.k | 13 + pyk/regression-new/kore-issue-2253/Makefile | 8 + pyk/regression-new/kore-issue-2253/arr.k | 12 + pyk/regression-new/kore-issue-2253/make.arr | 1 + .../kore-issue-2253/make.arr.out | 3 + .../kore-issue-2253/updateAll.arr | 1 + .../kore-issue-2253/updateAll.arr.out | 3 + pyk/regression-new/kprove-append/Makefile | 8 + pyk/regression-new/kprove-append/def-spec.k | 5 + .../kprove-append/def-spec.k.out | 9 + pyk/regression-new/kprove-append/def.k | 15 + .../kprove-branchingAllowed/Makefile | 8 + .../kprove-branchingAllowed/def-spec.k | 7 + .../kprove-branchingAllowed/def-spec.k.out | 7 + .../kprove-branchingAllowed/def.k | 19 + .../kprove-error-status/Makefile | 8 + .../kprove-error-status/crash-spec.k | 9 + .../kprove-error-status/crash-spec.k.out | 1 + .../kprove-error-status/stuck-claim-spec.k | 16 + .../stuck-claim-spec.k.out | 1 + .../kprove-error-status/verif.k | 28 + .../kprove-error-status/verif.k.out | 0 pyk/regression-new/kprove-haskell/sum-spec.k | 16 + .../kprove-haskell/sum-spec.k.out | 13 + pyk/regression-new/kprove-java/Makefile | 13 + pyk/regression-new/kprove-java/demo.k | 5 + .../kprove-java/rhs-vars-broken-spec.k | 16 + .../kprove-java/rhs-vars-broken-spec.k.out | 16 + .../kprove-macro-exp-productions/Makefile | 11 + .../kprove-macro-exp-productions/main.k | 21 + .../kprove-macro-exp-productions/test-spec.k | 16 + .../test-spec.k.out | 1 + pyk/regression-new/kprove-macro-exp/Makefile | 11 + pyk/regression-new/kprove-macro-exp/main.k | 21 + .../kprove-macro-exp/test-spec.k | 16 + .../kprove-macro-exp/test-spec.k.out | 1 + pyk/regression-new/kprove-markdown/Makefile | 8 + .../kprove-markdown/set-balance-spec.md | 67 + .../kprove-markdown/set-balance-spec.md.out | 1 + .../kprove-markdown/set-balance.md | 768 ++ .../kprove-markdown/verification.k | 11 + pyk/regression-new/kprove-smt-lemma/Makefile | 2 + .../kprove-smt-lemma/haskell/Makefile | 8 + .../kprove-smt-lemma/haskell/verif.k | 1 + .../kprove-smt-lemma/tests/test-spec.k | 7 + .../kprove-smt-lemma/tests/test-spec.k.out | 1 + pyk/regression-new/kprove-smt-lemma/verif.k | 22 + pyk/regression-new/kprove-var-equals/Makefile | 8 + .../kprove-var-equals/var-eq-spec.k | 17 + .../kprove-var-equals/var-eq-spec.k.out | 1 + pyk/regression-new/kprove-var-equals/var-eq.k | 15 + pyk/regression-new/krun-deserialize/Makefile | 9 + pyk/regression-new/krun-deserialize/imp.k | 66 + .../krun-deserialize/sum.kore.imp | 1 + .../krun-deserialize/sum.kore.imp.out | 9 + pyk/regression-new/let-priority/1.test | 1 + pyk/regression-new/let-priority/1.test.out | 3 + pyk/regression-new/let-priority/2.test | 1 + pyk/regression-new/let-priority/2.test.out | 3 + pyk/regression-new/let-priority/3.test | 1 + pyk/regression-new/let-priority/3.test.out | 3 + pyk/regression-new/let-priority/4.test | 1 + pyk/regression-new/let-priority/4.test.out | 3 + pyk/regression-new/let-priority/5.test | 1 + pyk/regression-new/let-priority/5.test.out | 3 + pyk/regression-new/let-priority/6.test | 1 + pyk/regression-new/let-priority/6.test.out | 3 + pyk/regression-new/let-priority/Makefile | 7 + pyk/regression-new/let-priority/test.k | 12 + pyk/regression-new/let-test/1.test | 1 + pyk/regression-new/let-test/1.test.out | 3 + pyk/regression-new/let-test/Makefile | 7 + pyk/regression-new/let-test/test.k | 14 + pyk/regression-new/list-in-bug/Makefile | 5 + pyk/regression-new/list-in-bug/list-in.k | 18 + pyk/regression-new/list-in-bug/test1.listin | 1 + .../list-in-bug/test1.listin.out | 3 + pyk/regression-new/list-in-bug/test2.listin | 1 + .../list-in-bug/test2.listin.out | 3 + pyk/regression-new/list-in-bug/test3.listin | 1 + .../list-in-bug/test3.listin.out | 3 + pyk/regression-new/list-in-bug/test4.listin | 1 + .../list-in-bug/test4.listin.out | 3 + pyk/regression-new/llvm-kompile-type/Makefile | 11 + pyk/regression-new/llvm-krun/Makefile | 35 + pyk/regression-new/llvm-krun/test.in | 1 + pyk/regression-new/llvm-krun/test.k | 9 + pyk/regression-new/llvm-krun/test.out | 3 + pyk/regression-new/llvm-string2base/1.inttest | 1 + .../llvm-string2base/1.inttest.out | 3 + pyk/regression-new/llvm-string2base/Makefile | 6 + .../llvm-string2base/int-parse.k | 15 + pyk/regression-new/locations/1.test | 2 + pyk/regression-new/locations/1.test.out | 1 + pyk/regression-new/locations/Makefile | 7 + pyk/regression-new/locations/test.k | 14 + pyk/regression-new/locations2/1.test | 0 pyk/regression-new/locations2/1.test.out | 1 + pyk/regression-new/locations2/Makefile | 7 + pyk/regression-new/locations2/test.k | 17 + pyk/regression-new/locations3/1.test | 1 + pyk/regression-new/locations3/1.test.out | 1 + pyk/regression-new/locations3/Makefile | 7 + pyk/regression-new/locations3/test.k | 20 + pyk/regression-new/lub/Makefile | 5 + pyk/regression-new/lub/test.k | 16 + pyk/regression-new/lub2/Makefile | 5 + pyk/regression-new/lub2/test.k | 10 + .../macro_vars-productions/Makefile | 5 + .../macro_vars-productions/macro-vars.k | 19 + pyk/regression-new/macro_vars/Makefile | 5 + pyk/regression-new/macro_vars/macro-vars.k | 20 + .../map-symbolic-tests-haskell/Makefile | 10 + .../map-symbolic-tests-haskell/assignment | 31 + .../assignment-1-spec.k | 11 + .../assignment-1-spec.k.out | 4 + .../assignment-10-spec.k | 11 + .../assignment-10-spec.k.out | 23 + .../assignment-11-spec.k | 11 + .../assignment-11-spec.k.out | 36 + .../assignment-12-spec.k | 11 + .../assignment-12-spec.k.out | 17 + .../assignment-13-spec.k | 11 + .../assignment-13-spec.k.out | 17 + .../assignment-14-spec.k | 11 + .../assignment-14-spec.k.out | 29 + .../assignment-15-spec.k | 11 + .../assignment-15-spec.k.out | 41 + .../assignment-16-spec.k | 11 + .../assignment-16-spec.k.out | 43 + .../assignment-17-spec.k | 11 + .../assignment-17-spec.k.out | 11 + .../assignment-18-spec.k | 11 + .../assignment-18-spec.k.out | 1 + .../assignment-19-spec.k | 11 + .../assignment-19-spec.k.out | 11 + .../assignment-2-spec.k | 11 + .../assignment-2-spec.k.out | 11 + .../assignment-20-spec.k | 11 + .../assignment-20-spec.k.out | 17 + .../assignment-21-spec.k | 11 + .../assignment-21-spec.k.out | 11 + .../assignment-22-spec.k | 11 + .../assignment-22-spec.k.out | 17 + .../assignment-23-spec.k | 11 + .../assignment-23-spec.k.out | 11 + .../assignment-24-spec.k | 11 + .../assignment-24-spec.k.out | 17 + .../assignment-25-spec.k | 11 + .../assignment-25-spec.k.out | 23 + .../assignment-26-spec.k | 11 + .../assignment-26-spec.k.out | 6 + .../assignment-27-spec.k | 11 + .../assignment-27-spec.k.out | 4 + .../assignment-28-spec.k | 11 + .../assignment-28-spec.k.out | 11 + .../assignment-29-spec.k | 11 + .../assignment-29-spec.k.out | 24 + .../assignment-3-spec.k | 11 + .../assignment-3-spec.k.out | 17 + .../assignment-30-spec.k | 11 + .../assignment-30-spec.k.out | 24 + .../assignment-31-spec.k | 11 + .../assignment-31-spec.k.out | 24 + .../assignment-4-spec.k | 11 + .../assignment-4-spec.k.out | 23 + .../assignment-5-spec.k | 11 + .../assignment-5-spec.k.out | 24 + .../assignment-6-spec.k | 11 + .../assignment-6-spec.k.out | 11 + .../assignment-7-spec.k | 11 + .../assignment-7-spec.k.out | 17 + .../assignment-8-spec.k | 11 + .../assignment-8-spec.k.out | 17 + .../assignment-9-spec.k | 11 + .../assignment-9-spec.k.out | 23 + .../map-symbolic-tests-haskell/gen-tests.sh | 25 + .../map-symbolic-tests-haskell/inkeys | 17 + .../inkeys-1-spec.k | 11 + .../inkeys-1-spec.k.out | 4 + .../inkeys-10-spec.k | 11 + .../inkeys-10-spec.k.out | 4 + .../inkeys-11-spec.k | 11 + .../inkeys-11-spec.k.out | 4 + .../inkeys-12-spec.k | 11 + .../inkeys-12-spec.k.out | 10 + .../inkeys-13-spec.k | 11 + .../inkeys-13-spec.k.out | 10 + .../inkeys-14-spec.k | 11 + .../inkeys-14-spec.k.out | 4 + .../inkeys-15-spec.k | 11 + .../inkeys-15-spec.k.out | 4 + .../inkeys-16-spec.k | 11 + .../inkeys-16-spec.k.out | 10 + .../inkeys-17-spec.k | 11 + .../inkeys-17-spec.k.out | 10 + .../inkeys-2-spec.k | 11 + .../inkeys-2-spec.k.out | 10 + .../inkeys-3-spec.k | 11 + .../inkeys-3-spec.k.out | 11 + .../inkeys-4-spec.k | 11 + .../inkeys-4-spec.k.out | 17 + .../inkeys-5-spec.k | 11 + .../inkeys-5-spec.k.out | 17 + .../inkeys-6-spec.k | 11 + .../inkeys-6-spec.k.out | 22 + .../inkeys-7-spec.k | 11 + .../inkeys-7-spec.k.out | 24 + .../inkeys-8-spec.k | 11 + .../inkeys-8-spec.k.out | 30 + .../inkeys-9-spec.k | 11 + .../inkeys-9-spec.k.out | 30 + .../map-symbolic-tests-haskell/lookup | 55 + .../lookup-1-spec.k | 11 + .../lookup-1-spec.k.out | 18 + .../lookup-10-spec.k | 11 + .../lookup-10-spec.k.out | 11 + .../lookup-11-spec.k | 11 + .../lookup-11-spec.k.out | 24 + .../lookup-12-spec.k | 11 + .../lookup-12-spec.k.out | 10 + .../lookup-13-spec.k | 11 + .../lookup-13-spec.k.out | 24 + .../lookup-14-spec.k | 11 + .../lookup-14-spec.k.out | 35 + .../lookup-15-spec.k | 11 + .../lookup-15-spec.k.out | 16 + .../lookup-16-spec.k | 11 + .../lookup-16-spec.k.out | 22 + .../lookup-17-spec.k | 11 + .../lookup-17-spec.k.out | 22 + .../lookup-18-spec.k | 11 + .../lookup-18-spec.k.out | 22 + .../lookup-19-spec.k | 11 + .../lookup-19-spec.k.out | 22 + .../lookup-2-spec.k | 11 + .../lookup-2-spec.k.out | 10 + .../lookup-20-spec.k | 11 + .../lookup-20-spec.k.out | 22 + .../lookup-21-spec.k | 11 + .../lookup-21-spec.k.out | 22 + .../lookup-22-spec.k | 11 + .../lookup-22-spec.k.out | 16 + .../lookup-23-spec.k | 11 + .../lookup-23-spec.k.out | 17 + .../lookup-24-spec.k | 11 + .../lookup-24-spec.k.out | 1 + .../lookup-25-spec.k | 11 + .../lookup-25-spec.k.out | 10 + .../lookup-26-spec.k | 11 + .../lookup-26-spec.k.out | 11 + .../lookup-27-spec.k | 11 + .../lookup-27-spec.k.out | 10 + .../lookup-28-spec.k | 11 + .../lookup-28-spec.k.out | 16 + .../lookup-29-spec.k | 11 + .../lookup-29-spec.k.out | 11 + .../lookup-3-spec.k | 11 + .../lookup-3-spec.k.out | 29 + .../lookup-30-spec.k | 11 + .../lookup-30-spec.k.out | 17 + .../lookup-31-spec.k | 11 + .../lookup-31-spec.k.out | 22 + .../lookup-32-spec.k | 11 + .../lookup-32-spec.k.out | 23 + .../lookup-33-spec.k | 11 + .../lookup-33-spec.k.out | 16 + .../lookup-34-spec.k | 11 + .../lookup-34-spec.k.out | 28 + .../lookup-35-spec.k | 11 + .../lookup-35-spec.k.out | 11 + .../lookup-36-spec.k | 11 + .../lookup-36-spec.k.out | 17 + .../lookup-37-spec.k | 11 + .../lookup-37-spec.k.out | 10 + .../lookup-38-spec.k | 11 + .../lookup-38-spec.k.out | 17 + .../lookup-39-spec.k | 11 + .../lookup-39-spec.k.out | 22 + .../lookup-4-spec.k | 11 + .../lookup-4-spec.k.out | 18 + .../lookup-40-spec.k | 11 + .../lookup-40-spec.k.out | 16 + .../lookup-41-spec.k | 11 + .../lookup-41-spec.k.out | 22 + .../lookup-42-spec.k | 11 + .../lookup-42-spec.k.out | 22 + .../lookup-43-spec.k | 11 + .../lookup-43-spec.k.out | 22 + .../lookup-44-spec.k | 11 + .../lookup-44-spec.k.out | 22 + .../lookup-45-spec.k | 11 + .../lookup-45-spec.k.out | 22 + .../lookup-46-spec.k | 11 + .../lookup-46-spec.k.out | 22 + .../lookup-47-spec.k | 11 + .../lookup-47-spec.k.out | 16 + .../lookup-48-spec.k | 11 + .../lookup-48-spec.k.out | 10 + .../lookup-49-spec.k | 11 + .../lookup-49-spec.k.out | 4 + .../lookup-5-spec.k | 11 + .../lookup-5-spec.k.out | 24 + .../lookup-50-spec.k | 11 + .../lookup-50-spec.k.out | 10 + .../lookup-51-spec.k | 11 + .../lookup-51-spec.k.out | 22 + .../lookup-52-spec.k | 11 + .../lookup-52-spec.k.out | 10 + .../lookup-53-spec.k | 11 + .../lookup-53-spec.k.out | 16 + .../lookup-54-spec.k | 11 + .../lookup-54-spec.k.out | 10 + .../lookup-55-spec.k | 11 + .../lookup-55-spec.k.out | 16 + .../lookup-6-spec.k | 11 + .../lookup-6-spec.k.out | 35 + .../lookup-7-spec.k | 11 + .../lookup-7-spec.k.out | 30 + .../lookup-8-spec.k | 11 + .../lookup-8-spec.k.out | 23 + .../lookup-9-spec.k | 11 + .../lookup-9-spec.k.out | 41 + .../map-symbolic-tests-haskell/map-tests.k | 27 + .../map-symbolic-tests-haskell/remove | 18 + .../remove-1-spec.k | 11 + .../remove-1-spec.k.out | 16 + .../remove-10-spec.k | 11 + .../remove-10-spec.k.out | 18 + .../remove-11-spec.k | 11 + .../remove-11-spec.k.out | 24 + .../remove-12-spec.k | 11 + .../remove-12-spec.k.out | 1 + .../remove-13-spec.k | 11 + .../remove-13-spec.k.out | 24 + .../remove-14-spec.k | 11 + .../remove-14-spec.k.out | 30 + .../remove-15-spec.k | 11 + .../remove-15-spec.k.out | 22 + .../remove-16-spec.k | 11 + .../remove-16-spec.k.out | 16 + .../remove-17-spec.k | 11 + .../remove-17-spec.k.out | 29 + .../remove-18-spec.k | 11 + .../remove-18-spec.k.out | 10 + .../remove-2-spec.k | 11 + .../remove-2-spec.k.out | 1 + .../remove-3-spec.k | 11 + .../remove-3-spec.k.out | 22 + .../remove-4-spec.k | 11 + .../remove-4-spec.k.out | 18 + .../remove-5-spec.k | 11 + .../remove-5-spec.k.out | 30 + .../remove-6-spec.k | 11 + .../remove-6-spec.k.out | 41 + .../remove-7-spec.k | 11 + .../remove-7-spec.k.out | 36 + .../remove-8-spec.k | 11 + .../remove-8-spec.k.out | 1 + .../remove-9-spec.k | 11 + .../remove-9-spec.k.out | 47 + pyk/regression-new/markdownSelectors/1.test | 1 + .../markdownSelectors/1.test.out | 8 + pyk/regression-new/markdownSelectors/Makefile | 10 + .../markdownSelectors/a-spec.md | 11 + .../markdownSelectors/a-spec.md.out | 9 + pyk/regression-new/markdownSelectors/test.md | 41 + .../minimization-issue/Makefile | 7 + pyk/regression-new/minimization-issue/test.k | 10 + pyk/regression-new/mint-llvm/1.test | 1 + pyk/regression-new/mint-llvm/1.test.out | 3 + pyk/regression-new/mint-llvm/10.test | 1 + pyk/regression-new/mint-llvm/10.test.out | 3 + pyk/regression-new/mint-llvm/11.test | 1 + pyk/regression-new/mint-llvm/11.test.out | 3 + pyk/regression-new/mint-llvm/12.test | 1 + pyk/regression-new/mint-llvm/12.test.out | 3 + pyk/regression-new/mint-llvm/13.test | 1 + pyk/regression-new/mint-llvm/13.test.out | 3 + pyk/regression-new/mint-llvm/14.test | 1 + pyk/regression-new/mint-llvm/14.test.out | 3 + pyk/regression-new/mint-llvm/15.test | 1 + pyk/regression-new/mint-llvm/15.test.out | 3 + pyk/regression-new/mint-llvm/16.test | 1 + pyk/regression-new/mint-llvm/16.test.out | 3 + pyk/regression-new/mint-llvm/17.test | 1 + pyk/regression-new/mint-llvm/17.test.out | 3 + pyk/regression-new/mint-llvm/18.test | 1 + pyk/regression-new/mint-llvm/18.test.out | 3 + pyk/regression-new/mint-llvm/2.test | 1 + pyk/regression-new/mint-llvm/2.test.out | 3 + pyk/regression-new/mint-llvm/3.test | 1 + pyk/regression-new/mint-llvm/3.test.out | 3 + pyk/regression-new/mint-llvm/4.test | 1 + pyk/regression-new/mint-llvm/4.test.out | 3 + pyk/regression-new/mint-llvm/5.test | 1 + pyk/regression-new/mint-llvm/5.test.out | 3 + pyk/regression-new/mint-llvm/6.test | 1 + pyk/regression-new/mint-llvm/6.test.out | 3 + pyk/regression-new/mint-llvm/7.test | 1 + pyk/regression-new/mint-llvm/7.test.out | 3 + pyk/regression-new/mint-llvm/8.test | 1 + pyk/regression-new/mint-llvm/8.test.out | 3 + pyk/regression-new/mint-llvm/9.test | 1 + pyk/regression-new/mint-llvm/9.test.out | 3 + pyk/regression-new/mint-llvm/Makefile | 7 + pyk/regression-new/mint-llvm/test.k | 55 + pyk/regression-new/mutable-bytes/Makefile | 2 + .../mutable-bytes/default/Makefile | 7 + .../mutable-bytes/default/a.test | 1 + .../mutable-bytes/default/a.test.out | 11 + .../mutable-bytes/default/test.k | 21 + .../mutable-bytes/mutable/Makefile | 7 + .../mutable-bytes/mutable/a.test | 1 + .../mutable-bytes/mutable/a.test.out | 11 + .../mutable-bytes/mutable/test.k | 21 + pyk/regression-new/no-dup-rules/Makefile | 5 + .../no-dup-rules/no-dup-rules.k | 40 + pyk/regression-new/no-dup-rules/test.ndr | 1 + pyk/regression-new/no-dup-rules/test.ndr.out | 3 + pyk/regression-new/no-pattern/1.test | 1 + pyk/regression-new/no-pattern/1.test.out | 7 + pyk/regression-new/no-pattern/Makefile | 8 + pyk/regression-new/no-pattern/test.k | 7 + pyk/regression-new/nomain/Makefile | 7 + pyk/regression-new/nomain/test.k | 6 + pyk/regression-new/non-executable/Makefile | 2 + .../non-executable/haskell/1.test | 1 + .../non-executable/haskell/1.test.out | 3 + .../non-executable/haskell/2.test | 1 + .../non-executable/haskell/2.test.out | 3 + .../non-executable/haskell/3.test | 1 + .../non-executable/haskell/3.test.out | 3 + .../non-executable/haskell/Makefile | 6 + .../non-executable/haskell/test.k | 20 + pyk/regression-new/non-executable/llvm/1.test | 1 + .../non-executable/llvm/1.test.out | 3 + pyk/regression-new/non-executable/llvm/2.test | 1 + .../non-executable/llvm/2.test.out | 3 + pyk/regression-new/non-executable/llvm/3.test | 1 + .../non-executable/llvm/3.test.out | 3 + .../non-executable/llvm/Makefile | 6 + pyk/regression-new/non-executable/llvm/test.k | 20 + .../non-executable/rewrite-check/Makefile | 1 + .../non-executable/rewrite-check/test.k | 20 + .../non-executable/rewrite-check/test.k.out | 6 + pyk/regression-new/nonexhaustive/Makefile | 4 + pyk/regression-new/nonexhaustive/test.k | 117 + pyk/regression-new/nonexhaustive/test.k.out | 56 + pyk/regression-new/or-haskell/Makefile | 7 + pyk/regression-new/or-haskell/test.k | 1 + pyk/regression-new/or-llvm/1.test | 1 + pyk/regression-new/or-llvm/1.test.out | 8 + pyk/regression-new/or-llvm/10.test | 1 + pyk/regression-new/or-llvm/10.test.out | 8 + pyk/regression-new/or-llvm/11.test | 1 + pyk/regression-new/or-llvm/11.test.out | 8 + pyk/regression-new/or-llvm/2.test | 1 + pyk/regression-new/or-llvm/2.test.out | 8 + pyk/regression-new/or-llvm/3.test | 1 + pyk/regression-new/or-llvm/3.test.out | 8 + pyk/regression-new/or-llvm/4.test | 1 + pyk/regression-new/or-llvm/4.test.out | 8 + pyk/regression-new/or-llvm/5.test | 1 + pyk/regression-new/or-llvm/5.test.out | 8 + pyk/regression-new/or-llvm/6.test | 1 + pyk/regression-new/or-llvm/6.test.out | 8 + pyk/regression-new/or-llvm/7.test | 1 + pyk/regression-new/or-llvm/7.test.out | 8 + pyk/regression-new/or-llvm/8.test | 1 + pyk/regression-new/or-llvm/8.test.out | 8 + pyk/regression-new/or-llvm/9.test | 1 + pyk/regression-new/or-llvm/9.test.out | 8 + pyk/regression-new/or-llvm/Makefile | 7 + pyk/regression-new/or-llvm/test.k | 23 + pyk/regression-new/overload/Makefile | 6 + pyk/regression-new/overload/exp.test | 1 + pyk/regression-new/overload/exp.test.out | 3 + pyk/regression-new/overload/lval.test | 1 + pyk/regression-new/overload/lval.test.out | 3 + pyk/regression-new/overload/test.k | 13 + pyk/regression-new/owise-haskell/Makefile | 8 + pyk/regression-new/owise-haskell/demo.k | 10 + pyk/regression-new/owise-haskell/tests/1.demo | 1 + .../owise-haskell/tests/1.demo.out | 3 + pyk/regression-new/owise-haskell/tests/2.demo | 1 + .../owise-haskell/tests/2.demo.out | 3 + pyk/regression-new/owise-haskell/tests/3.demo | 1 + .../owise-haskell/tests/3.demo.out | 3 + pyk/regression-new/owise-haskell/tests/4.demo | 1 + .../owise-haskell/tests/4.demo.out | 3 + pyk/regression-new/parse-c/Makefile | 16 + pyk/regression-new/parse-c/c18-syntax.k | 341 + pyk/regression-new/parse-c/c18-translation.k | 14 + pyk/regression-new/parse-c/cparse | 5 + pyk/regression-new/parse-c/test.c | 34 + pyk/regression-new/parse-c/test.ref | 31 + pyk/regression-new/parseNonPgm/1.test | 1 + pyk/regression-new/parseNonPgm/1.test.out | 8 + pyk/regression-new/parseNonPgm/Makefile | 9 + pyk/regression-new/parseNonPgm/test | 6 + pyk/regression-new/parseNonPgm/test.k | 40 + .../pattern-macro-productions/1.test | 1 + .../pattern-macro-productions/1.test.out | 3 + .../pattern-macro-productions/2.test | 1 + .../pattern-macro-productions/2.test.out | 3 + .../pattern-macro-productions/3.test | 1 + .../pattern-macro-productions/3.test.out | 3 + .../pattern-macro-productions/4.test | 1 + .../pattern-macro-productions/4.test.out | 3 + .../pattern-macro-productions/5.test | 1 + .../pattern-macro-productions/5.test.out | 3 + .../pattern-macro-productions/6.test | 1 + .../pattern-macro-productions/6.test.out | 3 + .../pattern-macro-productions/7.test | 1 + .../pattern-macro-productions/7.test.out | 3 + .../pattern-macro-productions/Makefile | 6 + .../pattern-macro-productions/test.k | 40 + pyk/regression-new/pattern-macro/1.test | 1 + pyk/regression-new/pattern-macro/1.test.out | 3 + pyk/regression-new/pattern-macro/2.test | 1 + pyk/regression-new/pattern-macro/2.test.out | 3 + pyk/regression-new/pattern-macro/3.test | 1 + pyk/regression-new/pattern-macro/3.test.out | 3 + pyk/regression-new/pattern-macro/4.test | 1 + pyk/regression-new/pattern-macro/4.test.out | 3 + pyk/regression-new/pattern-macro/5.test | 1 + pyk/regression-new/pattern-macro/5.test.out | 3 + pyk/regression-new/pattern-macro/6.test | 1 + pyk/regression-new/pattern-macro/6.test.out | 3 + pyk/regression-new/pattern-macro/7.test | 1 + pyk/regression-new/pattern-macro/7.test.out | 3 + pyk/regression-new/pattern-macro/Makefile | 6 + pyk/regression-new/pattern-macro/test.k | 37 + .../pedanticAttributes/Makefile | 2 + pyk/regression-new/pedanticAttributes/test.k | 5 + .../pedanticAttributes/test.k.out | 11 + .../pl-tutorial/1_k/1_lambda/Makefile | 3 + .../1_k/1_lambda/lesson_8/Makefile | 8 + .../1_k/1_lambda/lesson_8/lambda.k | 51 + .../lesson_8/tests/arithmetic-div-zero.lambda | 1 + .../1_lambda/lesson_8/tests/arithmetic.lambda | 1 + .../lesson_8/tests/arithmetic.lambda.out | 3 + .../tests/closed-variable-capture.lambda | 1 + .../tests/closed-variable-capture.lambda.out | 3 + .../lesson_8/tests/factorial-let-fix.lambda | 7 + .../tests/factorial-let-fix.lambda.out | 3 + .../lesson_8/tests/factorial-let.lambda | 6 + .../lesson_8/tests/factorial-let.lambda.out | 3 + .../lesson_8/tests/factorial-letrec.lambda | 2 + .../tests/factorial-letrec.lambda.out | 3 + .../1_k/1_lambda/lesson_8/tests/fibbo.lambda | 1 + .../1_lambda/lesson_8/tests/fibbo.lambda.out | 3 + .../tests/free-variable-capture.lambda | 1 + .../tests/free-variable-capture.lambda.out | 3 + .../1_lambda/lesson_8/tests/identity.lambda | 1 + .../lesson_8/tests/identity.lambda.out | 3 + .../1_k/1_lambda/lesson_8/tests/if.lambda | 1 + .../1_k/1_lambda/lesson_8/tests/if.lambda.out | 3 + .../1_k/1_lambda/lesson_8/tests/lets.lambda | 5 + .../1_lambda/lesson_8/tests/lets.lambda.out | 3 + .../pl-tutorial/1_k/2_imp/Makefile | 3 + .../pl-tutorial/1_k/2_imp/lesson_4/Makefile | 5 + .../pl-tutorial/1_k/2_imp/lesson_4/imp.k | 65 + .../1_k/2_imp/lesson_4/tests/collatz.imp | 19 + .../1_k/2_imp/lesson_4/tests/collatz.imp.out | 12 + .../1_k/2_imp/lesson_4/tests/primes.imp | 26 + .../1_k/2_imp/lesson_4/tests/primes.imp.out | 17 + .../1_k/2_imp/lesson_4/tests/sum.imp | 12 + .../1_k/2_imp/lesson_4/tests/sum.imp.out | 9 + .../pl-tutorial/1_k/3_lambda++/Makefile | 3 + .../1_k/3_lambda++/lesson_5/Makefile | 24 + .../1_k/3_lambda++/lesson_5/Makefile.det | 12 + .../1_k/3_lambda++/lesson_5/Makefile.nondet | 11 + .../1_k/3_lambda++/lesson_5/lambda.k | 63 + .../deterministic/factorial-let-fix.lambda | 7 + .../factorial-let-fix.lambda.out | 5 + .../tests/deterministic/factorial-let.lambda | 6 + .../deterministic/factorial-let.lambda.out | 5 + .../deterministic/factorial-letrec.lambda | 2 + .../deterministic/factorial-letrec.lambda.out | 5 + .../lesson_5/tests/deterministic/fibbo.lambda | 1 + .../tests/deterministic/fibbo.lambda.out | 5 + .../arithmetic-div-zero.lambda | 1 + .../tests/nondeterministic/arithmetic.lambda | 1 + .../nondeterministic/arithmetic.lambda.out | 5 + .../tests/nondeterministic/callcc-env1.lambda | 2 + .../nondeterministic/callcc-env1.lambda.out | 5 + .../tests/nondeterministic/callcc-env2.lambda | 4 + .../nondeterministic/callcc-env2.lambda.out | 5 + .../nondeterministic/callcc-with-let.lambda | 5 + .../callcc-with-let.lambda.out | 5 + .../closed-variable-capture.lambda | 1 + .../closed-variable-capture.lambda.out | 5 + .../free-variable-capture.lambda | 1 + .../free-variable-capture.lambda.out | 23 + .../tests/nondeterministic/identity.lambda | 1 + .../nondeterministic/identity.lambda.out | 5 + .../lesson_5/tests/nondeterministic/if.lambda | 1 + .../tests/nondeterministic/if.lambda.out | 5 + .../tests/nondeterministic/lets.lambda | 5 + .../tests/nondeterministic/lets.lambda.out | 5 + .../pl-tutorial/1_k/4_imp++/Makefile | 3 + .../pl-tutorial/1_k/4_imp++/lesson_7/Makefile | 24 + .../1_k/4_imp++/lesson_7/Makefile.concrete | 15 + .../1_k/4_imp++/lesson_7/Makefile.proof | 9 + .../pl-tutorial/1_k/4_imp++/lesson_7/imp.k | 113 + .../1_k/4_imp++/lesson_7/tests/collatz.imp | 19 + .../4_imp++/lesson_7/tests/collatz.imp.out | 0 .../1_k/4_imp++/lesson_7/tests/div.imp | 3 + .../1_k/4_imp++/lesson_7/tests/div.imp.out | 104 + .../1_k/4_imp++/lesson_7/tests/io.imp | 5 + .../1_k/4_imp++/lesson_7/tests/io.imp.in | 1 + .../1_k/4_imp++/lesson_7/tests/io.imp.out | 1 + .../1_k/4_imp++/lesson_7/tests/locals.imp | 15 + .../1_k/4_imp++/lesson_7/tests/locals.imp.out | 5 + .../1_k/4_imp++/lesson_7/tests/primes.imp | 26 + .../1_k/4_imp++/lesson_7/tests/primes.imp.out | 0 .../4_imp++/lesson_7/tests/proofs/sum-spec.k | 76 + .../lesson_7/tests/proofs/sum-spec.k.out | 1 + .../1_k/4_imp++/lesson_7/tests/spawn.imp | 8 + .../1_k/4_imp++/lesson_7/tests/spawn.imp.in | 1 + .../1_k/4_imp++/lesson_7/tests/spawn.imp.out | 23 + .../1_k/4_imp++/lesson_7/tests/sum-io.imp | 14 + .../1_k/4_imp++/lesson_7/tests/sum-io.imp.in | 1 + .../1_k/4_imp++/lesson_7/tests/sum-io.imp.out | 2 + .../1_k/4_imp++/lesson_7/tests/sum.imp | 12 + .../1_k/4_imp++/lesson_7/tests/sum.imp.out | 0 .../pl-tutorial/1_k/5_types/Makefile | 3 + .../pl-tutorial/1_k/5_types/lesson_6/Makefile | 7 + .../pl-tutorial/1_k/5_types/lesson_6/lambda.k | 71 + .../5_types/lesson_6/tests/composition.lambda | 2 + .../lesson_6/tests/composition.lambda.out | 5 + .../5_types/lesson_6/tests/identity.lambda | 2 + .../lesson_6/tests/identity.lambda.out | 5 + .../1_k/5_types/lesson_6/tests/if.lambda | 2 + .../1_k/5_types/lesson_6/tests/if.lambda.out | 5 + .../1_k/5_types/lesson_6/tests/letrec.lambda | 2 + .../5_types/lesson_6/tests/letrec.lambda.out | 5 + .../5_types/lesson_6/tests/nested-lets.lambda | 6 + .../lesson_6/tests/nested-lets.lambda.out | 5 + .../1_k/5_types/lesson_6/tests/plus.lambda | 1 + .../5_types/lesson_6/tests/plus.lambda.out | 5 + .../tests/polymorphic-identity-1-fails.lambda | 2 + .../polymorphic-identity-1-fails.lambda.out | 1 + .../tests/polymorphic-identity-2-fails.lambda | 2 + .../polymorphic-identity-2-fails.lambda.out | 1 + .../lesson_6/tests/static-scoping-1.lambda | 4 + .../tests/static-scoping-1.lambda.out | 5 + .../lesson_6/tests/static-scoping-2.lambda | 6 + .../tests/static-scoping-2.lambda.out | 5 + .../5_types/lesson_6/tests/tricky-1.lambda | 6 + .../lesson_6/tests/tricky-1.lambda.out | 5 + .../5_types/lesson_6/tests/tricky-2.lambda | 3 + .../lesson_6/tests/tricky-2.lambda.out | 5 + .../5_types/lesson_6/tests/tricky-3.lambda | 2 + .../lesson_6/tests/tricky-3.lambda.out | 5 + .../5_types/lesson_6/tests/tricky-4.lambda | 3 + .../lesson_6/tests/tricky-4.lambda.out | 5 + .../5_types/lesson_6/tests/tricky-5.lambda | 2 + .../lesson_6/tests/tricky-5.lambda.out | 5 + pyk/regression-new/pl-tutorial/1_k/Makefile | 3 + .../2_languages/1_simple/1_untyped/Makefile | 20 + .../1_simple/1_untyped/simple-untyped.md | 1171 ++ .../1_untyped/tests/diverse/collatz.simple | 19 + .../1_untyped/tests/diverse/collatz.simple.in | 1 + .../tests/diverse/collatz.simple.out | 6 + .../1_untyped/tests/diverse/div-nondet.simple | 15 + .../tests/diverse/div-nondet.simple.out | 17 + .../1_untyped/tests/diverse/factorial.simple | 15 + .../tests/diverse/factorial.simple.in | 1 + .../tests/diverse/factorial.simple.out | 1 + .../tests/diverse/higher-order.simple | 77 + .../tests/diverse/higher-order.simple.out | 5 + .../1_untyped/tests/diverse/matrix.simple | 57 + .../1_untyped/tests/diverse/matrix.simple.in | 4 + .../1_untyped/tests/diverse/matrix.simple.out | 16 + .../diverse/nonterminating/dekker.simple | 31 + .../1_untyped/tests/diverse/sortings.simple | 133 + .../tests/diverse/sortings.simple.in | 1 + .../tests/diverse/sortings.simple.out | 17 + .../tests/exceptions/exceptions_01.simple | 16 + .../tests/exceptions/exceptions_01.simple.out | 1 + .../tests/exceptions/exceptions_02.simple | 20 + .../tests/exceptions/exceptions_02.simple.out | 1 + .../tests/exceptions/exceptions_03.simple | 8 + .../tests/exceptions/exceptions_03.simple.out | 1 + .../tests/exceptions/exceptions_04.simple | 8 + .../tests/exceptions/exceptions_04.simple.out | 1 + .../tests/exceptions/exceptions_05.simple | 23 + .../tests/exceptions/exceptions_05.simple.out | 1 + .../tests/exceptions/exceptions_06.simple | 22 + .../tests/exceptions/exceptions_06.simple.out | 1 + .../tests/exceptions/exceptions_07.simple | 13 + .../tests/exceptions/exceptions_07.simple.out | 11 + .../tests/exceptions/exceptions_08.simple | 27 + .../tests/exceptions/exceptions_08.simple.out | 1 + .../tests/exceptions/exceptions_09.simple | 24 + .../tests/exceptions/exceptions_09.simple.out | 1 + .../tests/exceptions/exceptions_10.simple | 13 + .../tests/exceptions/exceptions_10.simple.out | 1 + .../tests/exceptions/exceptions_11.simple | 20 + .../tests/exceptions/exceptions_11.simple.out | 1 + .../tests/exceptions/exceptions_12.simple | 19 + .../tests/exceptions/exceptions_12.simple.out | 1 + .../tests/exceptions/exceptions_13.simple | 10 + .../tests/exceptions/exceptions_13.simple.out | 1 + .../tests/exceptions/exceptions_14.simple | 10 + .../tests/exceptions/exceptions_14.simple.out | 1 + .../tests/exceptions/exceptions_15.simple | 15 + .../tests/exceptions/exceptions_15.simple.out | 1 + .../1_untyped/tests/threads/threads_01.simple | 10 + .../tests/threads/threads_01.simple.out | 11 + .../1_untyped/tests/threads/threads_02.simple | 14 + .../tests/threads/threads_02.simple.out | 11 + .../1_untyped/tests/threads/threads_04.simple | 15 + .../tests/threads/threads_04.simple.out | 23 + .../1_untyped/tests/threads/threads_05.simple | 13 + .../tests/threads/threads_05.simple.out | 199 + .../1_untyped/tests/threads/threads_06.simple | 10 + .../tests/threads/threads_06.simple.in | 1 + .../tests/threads/threads_06.simple.out | 23 + .../1_untyped/tests/threads/threads_07.simple | 13 + .../tests/threads/threads_07.simple.in | 1 + .../tests/threads/threads_07.simple.out | 1 + .../1_untyped/tests/threads/threads_09.simple | 15 + .../tests/threads/threads_09.simple.out | 11 + .../1_untyped/tests/threads/threads_10.simple | 18 + .../tests/threads/threads_10.simple.out | 1 + .../1_untyped/tests/threads/threads_11.simple | 22 + .../tests/threads/threads_11.simple.out | 1 + .../1_untyped/tests/threads/threads_12.simple | 46 + .../tests/threads/threads_12.simple.out | 1 + .../1_simple/2_typed/1_static/Makefile | 8 + .../2_typed/1_static/simple-typed-static.md | 658 + .../2_typed/1_static/tests/collatz.simple.out | 1 + .../2_typed/1_static/tests/dekker.simple.out | 1 + .../1_static/tests/div-nondet.simple.out | 1 + .../1_static/tests/exceptions_01.simple.out | 1 + .../1_static/tests/exceptions_02.simple.out | 1 + .../1_static/tests/exceptions_03.simple.out | 1 + .../1_static/tests/exceptions_04.simple.out | 1 + .../1_static/tests/exceptions_05.simple.out | 1 + .../1_static/tests/exceptions_06.simple.out | 1 + .../1_static/tests/exceptions_07.simple.out | 1 + .../1_static/tests/exceptions_08.simple.out | 1 + .../1_static/tests/exceptions_09.simple.out | 1 + .../1_static/tests/exceptions_10.simple.out | 1 + .../1_static/tests/exceptions_11.simple.out | 1 + .../1_static/tests/exceptions_12.simple.out | 1 + .../1_static/tests/exceptions_13.simple.out | 1 + .../1_static/tests/exceptions_14.simple.out | 1 + .../1_static/tests/exceptions_15.simple.out | 1 + .../1_static/tests/exceptions_16.simple.out | 1 + .../1_static/tests/factorial.simple.out | 1 + .../1_static/tests/higher-order.simple.out | 1 + .../2_typed/1_static/tests/matrix.simple.out | 1 + .../1_static/tests/sortings.simple.out | 1 + .../1_static/tests/threads_01.simple.out | 1 + .../1_static/tests/threads_02.simple.out | 1 + .../1_static/tests/threads_03.simple.out | 1 + .../1_static/tests/threads_04.simple.out | 1 + .../1_static/tests/threads_05.simple.out | 1 + .../1_static/tests/threads_06.simple.out | 1 + .../1_static/tests/threads_07.simple.out | 1 + .../1_static/tests/threads_08.simple.out | 1 + .../1_static/tests/threads_09.simple.out | 1 + .../1_static/tests/threads_10.simple.out | 1 + .../1_static/tests/threads_11.simple.out | 1 + .../1_static/tests/threads_12.simple.out | 1 + .../1_simple/2_typed/2_dynamic/Makefile | 25 + .../2_typed/2_dynamic/simple-typed-dynamic.md | 602 + .../2_typed/2_dynamic/tests/collatz.simple.in | 1 + .../2_dynamic/tests/collatz.simple.out | 6 + .../2_dynamic/tests/div-nondet.simple.out | 17 + .../2_dynamic/tests/exceptions_01.simple.out | 1 + .../2_dynamic/tests/exceptions_02.simple.out | 1 + .../2_dynamic/tests/exceptions_03.simple.out | 1 + .../2_dynamic/tests/exceptions_04.simple.out | 1 + .../2_dynamic/tests/exceptions_05.simple.out | 1 + .../2_dynamic/tests/exceptions_06.simple.out | 1 + .../2_dynamic/tests/exceptions_07.simple.out | 3 + .../2_dynamic/tests/exceptions_08.simple.out | 1 + .../2_dynamic/tests/exceptions_09.simple.out | 1 + .../2_dynamic/tests/exceptions_10.simple.out | 1 + .../2_dynamic/tests/exceptions_11.simple.out | 1 + .../2_dynamic/tests/exceptions_12.simple.out | 1 + .../2_dynamic/tests/exceptions_13.simple.out | 1 + .../2_dynamic/tests/exceptions_14.simple.out | 1 + .../2_dynamic/tests/exceptions_15.simple.out | 1 + .../2_dynamic/tests/exceptions_16.simple.out | 1 + .../2_dynamic/tests/factorial.simple.in | 1 + .../2_dynamic/tests/factorial.simple.out | 1 + .../2_dynamic/tests/higher-order.simple.out | 5 + .../2_typed/2_dynamic/tests/matrix.simple.in | 1 + .../2_typed/2_dynamic/tests/matrix.simple.out | 16 + .../2_dynamic/tests/sortings.simple.in | 1 + .../2_dynamic/tests/sortings.simple.out | 17 + .../2_dynamic/tests/threads_01.simple.out | 3 + .../2_dynamic/tests/threads_02.simple.out | 3 + .../2_dynamic/tests/threads_03.simple.out | 1 + .../2_dynamic/tests/threads_04.simple.out | 3 + .../2_dynamic/tests/threads_05.simple.out | 199 + .../2_dynamic/tests/threads_06.simple.in | 1 + .../2_dynamic/tests/threads_06.simple.out | 7 + .../2_dynamic/tests/threads_07.simple.in | 1 + .../2_dynamic/tests/threads_07.simple.out | 1 + .../2_dynamic/tests/threads_08.simple.out | 1 + .../2_dynamic/tests/threads_09.simple.out | 3 + .../2_dynamic/tests/threads_10.simple.out | 1 + .../2_dynamic/tests/threads_11.simple.out | 1 + .../2_dynamic/tests/threads_12.simple.out | 1 + .../2_typed/programs/diverse/collatz.simple | 19 + .../2_typed/programs/diverse/dekker.simple | 32 + .../programs/diverse/div-nondet.simple | 15 + .../2_typed/programs/diverse/factorial.simple | 15 + .../programs/diverse/higher-order.simple | 89 + .../2_typed/programs/diverse/matrix.simple | 57 + .../2_typed/programs/diverse/sortings.simple | 136 + .../programs/exceptions/exceptions_01.simple | 16 + .../programs/exceptions/exceptions_02.simple | 20 + .../programs/exceptions/exceptions_03.simple | 8 + .../programs/exceptions/exceptions_04.simple | 8 + .../programs/exceptions/exceptions_05.simple | 23 + .../programs/exceptions/exceptions_06.simple | 22 + .../programs/exceptions/exceptions_07.simple | 12 + .../programs/exceptions/exceptions_08.simple | 26 + .../programs/exceptions/exceptions_09.simple | 24 + .../programs/exceptions/exceptions_10.simple | 13 + .../programs/exceptions/exceptions_11.simple | 20 + .../programs/exceptions/exceptions_12.simple | 19 + .../programs/exceptions/exceptions_13.simple | 10 + .../programs/exceptions/exceptions_14.simple | 10 + .../programs/exceptions/exceptions_15.simple | 15 + .../programs/exceptions/exceptions_16.simple | 15 + .../programs/threads/threads_01.simple | 10 + .../programs/threads/threads_02.simple | 14 + .../programs/threads/threads_03.simple | 11 + .../programs/threads/threads_04.simple | 15 + .../programs/threads/threads_05.simple | 13 + .../programs/threads/threads_06.simple | 10 + .../programs/threads/threads_07.simple | 13 + .../programs/threads/threads_08.simple | 57 + .../programs/threads/threads_09.simple | 15 + .../programs/threads/threads_10.simple | 18 + .../programs/threads/threads_11.simple | 22 + .../programs/threads/threads_12.simple | 46 + .../pl-tutorial/2_languages/1_simple/Makefile | 3 + .../2_languages/2_kool/1_untyped/Makefile | 8 + .../2_kool/1_untyped/kool-untyped.md | 1055 ++ .../2_kool/1_untyped/tests/cast-1.kool | 39 + .../2_kool/1_untyped/tests/cast-1.kool.out | 4 + .../2_kool/1_untyped/tests/cast-2.kool | 34 + .../2_kool/1_untyped/tests/cast-2.kool.out | 1 + .../2_kool/1_untyped/tests/constructor.kool | 31 + .../1_untyped/tests/constructor.kool.out | 2 + .../1_untyped/tests/dynamic-dispatch-1.kool | 21 + .../tests/dynamic-dispatch-1.kool.out | 1 + .../1_untyped/tests/dynamic-dispatch-2.kool | 23 + .../tests/dynamic-dispatch-2.kool.out | 1 + .../1_untyped/tests/dynamic-dispatch-3.kool | 57 + .../tests/dynamic-dispatch-3.kool.out | 3 + .../2_kool/1_untyped/tests/exceptions-1.kool | 27 + .../1_untyped/tests/exceptions-1.kool.out | 1 + .../2_kool/1_untyped/tests/exceptions-2.kool | 45 + .../1_untyped/tests/exceptions-2.kool.out | 3 + .../2_kool/1_untyped/tests/factorial.kool | 15 + .../2_kool/1_untyped/tests/factorial.kool.out | 1 + .../2_kool/1_untyped/tests/failing/cycle.kool | 19 + .../1_untyped/tests/field-shadowing-1.kool | 34 + .../tests/field-shadowing-1.kool.out | 1 + .../1_untyped/tests/field-shadowing-2.kool | 29 + .../tests/field-shadowing-2.kool.out | 1 + .../2_kool/1_untyped/tests/field.kool | 10 + .../2_kool/1_untyped/tests/field.kool.out | 1 + .../2_kool/1_untyped/tests/hello-world.kool | 9 + .../1_untyped/tests/hello-world.kool.out | 1 + .../2_kool/1_untyped/tests/instanceOf.kool | 38 + .../1_untyped/tests/instanceOf.kool.out | 4 + .../2_kool/1_untyped/tests/matrix.kool | 99 + .../2_kool/1_untyped/tests/matrix.kool.in | 3 + .../2_kool/1_untyped/tests/matrix.kool.out | 18 + .../1_untyped/tests/method-sharing.kool | 40 + .../1_untyped/tests/method-sharing.kool.out | 1 + .../2_kool/1_untyped/tests/new-in-field.kool | 21 + .../1_untyped/tests/new-in-field.kool.out | 3 + .../2_kool/1_untyped/tests/new.kool | 15 + .../2_kool/1_untyped/tests/new.kool.out | 1 + .../2_kool/1_untyped/tests/odd-even.kool | 34 + .../2_kool/1_untyped/tests/odd-even.kool.out | 1 + .../2_kool/1_untyped/tests/point.kool | 43 + .../2_kool/1_untyped/tests/point.kool.out | 3 + .../2_kool/1_untyped/tests/return-object.kool | 29 + .../1_untyped/tests/return-object.kool.out | 1 + .../2_kool/1_untyped/tests/sorting.kool | 142 + .../2_kool/1_untyped/tests/sorting.kool.in | 2 + .../2_kool/1_untyped/tests/sorting.kool.out | 17 + .../2_kool/1_untyped/tests/super-1.kool | 33 + .../2_kool/1_untyped/tests/super-1.kool.out | 1 + .../2_kool/1_untyped/tests/super-2.kool | 75 + .../2_kool/1_untyped/tests/super-2.kool.out | 3 + .../2_kool/1_untyped/tests/super-3.kool | 39 + .../2_kool/1_untyped/tests/super-3.kool.out | 1 + .../2_kool/1_untyped/tests/this-explicit.kool | 19 + .../1_untyped/tests/this-explicit.kool.out | 1 + .../2_kool/1_untyped/tests/this-implicit.kool | 19 + .../1_untyped/tests/this-implicit.kool.out | 1 + .../2_kool/1_untyped/tests/threads.kool | 58 + .../2_kool/1_untyped/tests/threads.kool.out | 1 + .../2_kool/1_untyped/tests/tree-sum.kool | 33 + .../2_kool/1_untyped/tests/tree-sum.kool.out | 1 + .../2_kool/2_typed/1_dynamic/Makefile | 12 + .../2_typed/1_dynamic/kool-typed-dynamic.md | 868 ++ .../2_typed/1_dynamic/tests/cast-1.kool.out | 4 + .../2_typed/1_dynamic/tests/cast-2.kool.out | 1 + .../2_typed/1_dynamic/tests/collatz.kool.in | 1 + .../2_typed/1_dynamic/tests/collatz.kool.out | 11 + .../1_dynamic/tests/constructor.kool.out | 2 + .../tests/dynamic-dispatch-1.kool.out | 1 + .../tests/dynamic-dispatch-2.kool.out | 1 + .../tests/dynamic-dispatch-3.kool.out | 3 + .../1_dynamic/tests/exceptions-1.kool.out | 1 + .../1_dynamic/tests/exceptions-2.kool.out | 2 + .../1_dynamic/tests/factorial.kool.out | 1 + .../tests/field-shadowing-1.kool.out | 1 + .../tests/field-shadowing-2.kool.out | 1 + .../2_typed/1_dynamic/tests/field.kool.out | 1 + .../1_dynamic/tests/function-types.kool.out | 2 + .../1_dynamic/tests/hello-world.kool.out | 1 + .../1_dynamic/tests/instanceOf.kool.out | 4 + .../2_typed/1_dynamic/tests/matrix.kool.in | 3 + .../2_typed/1_dynamic/tests/matrix.kool.out | 18 + .../1_dynamic/tests/method-sharing.kool.out | 1 + .../2_typed/1_dynamic/tests/new.kool.out | 1 + .../2_typed/1_dynamic/tests/odd-even.kool.out | 1 + .../2_typed/1_dynamic/tests/point.kool.out | 3 + .../1_dynamic/tests/return-object.kool.out | 1 + .../2_typed/1_dynamic/tests/sorting.kool.in | 2 + .../2_typed/1_dynamic/tests/sorting.kool.out | 17 + .../2_typed/1_dynamic/tests/super-1.kool.out | 1 + .../2_typed/1_dynamic/tests/super-2.kool.out | 3 + .../2_typed/1_dynamic/tests/super-3.kool.out | 1 + .../1_dynamic/tests/this-explicit.kool.out | 1 + .../1_dynamic/tests/this-implicit.kool.out | 1 + .../2_typed/1_dynamic/tests/threads.kool.out | 1 + .../2_typed/1_dynamic/tests/tree-sum.kool.out | 1 + .../2_kool/2_typed/2_static/Makefile | 14 + .../2_typed/2_static/kool-typed-static.md | 900 ++ .../2_typed/2_static/tests/cast-1.kool.out | 1 + .../2_typed/2_static/tests/cast-2.kool.out | 1 + .../2_typed/2_static/tests/collatz.kool.out | 1 + .../2_static/tests/constructor.kool.out | 1 + .../2_typed/2_static/tests/cycle.kool.out | 11 + .../tests/dynamic-dispatch-1.kool.out | 1 + .../tests/dynamic-dispatch-2.kool.out | 1 + .../tests/dynamic-dispatch-3.kool.out | 1 + .../2_static/tests/exceptions-1.kool.out | 1 + .../2_static/tests/exceptions-2.kool.out | 1 + .../2_typed/2_static/tests/factorial.kool.out | 1 + .../2_static/tests/field-shadowing-1.kool.out | 1 + .../2_static/tests/field-shadowing-2.kool.out | 1 + .../2_typed/2_static/tests/field.kool.out | 1 + .../2_static/tests/function-types.kool.out | 1 + .../2_static/tests/hello-world.kool.out | 1 + .../2_static/tests/instanceOf.kool.out | 1 + .../2_typed/2_static/tests/matrix.kool.out | 1 + .../2_static/tests/method-sharing.kool.out | 1 + .../2_typed/2_static/tests/new.kool.out | 1 + .../2_typed/2_static/tests/odd-even.kool.out | 1 + .../2_typed/2_static/tests/point.kool.out | 1 + .../2_static/tests/return-object.kool.out | 1 + .../2_typed/2_static/tests/sorting.kool.out | 1 + .../2_typed/2_static/tests/super-1.kool.out | 1 + .../2_typed/2_static/tests/super-2.kool.out | 1 + .../2_typed/2_static/tests/super-3.kool.out | 1 + .../2_static/tests/this-explicit.kool.out | 1 + .../2_static/tests/this-implicit.kool.out | 1 + .../2_typed/2_static/tests/threads.kool.out | 1 + .../2_typed/2_static/tests/tree-sum.kool.out | 1 + .../2_kool/2_typed/programs/cast-1.kool | 39 + .../2_kool/2_typed/programs/cast-2.kool | 27 + .../2_kool/2_typed/programs/collatz.kool | 24 + .../2_kool/2_typed/programs/constructor.kool | 32 + .../2_kool/2_typed/programs/cycle.kool | 19 + .../2_typed/programs/dynamic-dispatch-1.kool | 22 + .../2_typed/programs/dynamic-dispatch-2.kool | 24 + .../2_typed/programs/dynamic-dispatch-3.kool | 74 + .../2_kool/2_typed/programs/exceptions-1.kool | 27 + .../2_kool/2_typed/programs/exceptions-2.kool | 44 + .../2_kool/2_typed/programs/factorial.kool | 13 + .../2_typed/programs/field-shadowing-1.kool | 34 + .../2_typed/programs/field-shadowing-2.kool | 30 + .../2_kool/2_typed/programs/field.kool | 10 + .../2_typed/programs/function-types.kool | 45 + .../2_kool/2_typed/programs/hello-world.kool | 9 + .../2_kool/2_typed/programs/instanceOf.kool | 38 + .../2_kool/2_typed/programs/matrix.kool | 101 + .../2_typed/programs/method-sharing.kool | 42 + .../2_kool/2_typed/programs/new.kool | 15 + .../2_kool/2_typed/programs/odd-even.kool | 34 + .../2_kool/2_typed/programs/point.kool | 44 + .../2_typed/programs/return-object.kool | 29 + .../2_kool/2_typed/programs/sorting.kool | 146 + .../2_kool/2_typed/programs/super-1.kool | 33 + .../2_kool/2_typed/programs/super-2.kool | 75 + .../2_kool/2_typed/programs/super-3.kool | 39 + .../2_typed/programs/this-explicit.kool | 19 + .../2_typed/programs/this-implicit.kool | 19 + .../2_kool/2_typed/programs/threads.kool | 58 + .../2_kool/2_typed/programs/tree-sum.kool | 37 + .../pl-tutorial/2_languages/2_kool/Makefile | 3 + .../3_fun/1_untyped/1_environment/Makefile | 11 + .../1_untyped/1_environment/fun-untyped.md | 785 ++ .../1_environment/tests/ackermann.fun.out | 5 + .../1_environment/tests/callcc-1.fun.out | 5 + .../1_environment/tests/callcc-2.fun.out | 5 + .../1_environment/tests/callcc-3.fun.out | 5 + .../1_environment/tests/callcc-4.fun.out | 5 + .../1_environment/tests/callcc-5.fun.out | 5 + .../tests/callcc-efficient-with-1.fun.out | 5 + .../tests/callcc-efficient-with-2.fun.out | 5 + .../tests/callcc-inefficient-without.fun.out | 5 + .../tests/callcc-looping.fun.out | 5 + .../tests/callcc-return-1.fun.out | 5 + .../tests/callcc-return-2.fun.out | 5 + .../tests/constructor-bst-sorting.fun.out | 5 + .../tests/constructor-days.fun.out | 5 + .../constructor-expr-distributivity.fun.out | 5 + .../tests/constructor-expr-toString.fun.out | 5 + .../tests/constructor-list-length.fun.out | 5 + .../tests/constructor-tree-mirror.fun.out | 5 + .../tests/empty-argument-1.fun.out | 5 + .../tests/empty-argument-2.fun.out | 5 + .../1_environment/tests/exceptions.fun.out | 5 + .../tests/factorial-and-list-max.fun.out | 5 + .../1_environment/tests/factorial.fun.out | 5 + .../1_environment/tests/list-1.fun.out | 5 + .../1_environment/tests/list-2.fun.out | 5 + .../1_environment/tests/list-3.fun.out | 5 + .../1_environment/tests/list-4.fun.out | 5 + .../1_environment/tests/list-length.fun.out | 5 + .../1_environment/tests/list-max.fun.out | 5 + .../1_environment/tests/list-nth.fun | 3 + .../1_environment/tests/list-nth.fun.out | 5 + .../1_untyped/1_environment/tests/nth.fun.out | 5 + .../1_environment/tests/pattern.fun.out | 5 + .../tests/polymorphism-1.fun.out | 5 + .../tests/polymorphism-2.fun.out | 5 + .../tests/polymorphism-3.fun.out | 5 + .../tests/polymorphism-4.fun.out | 5 + .../tests/polymorphism-5.fun.out | 5 + .../tests/polymorphism-6.fun.out | 8 + .../1_environment/tests/references-1.fun.out | 5 + .../1_environment/tests/references-2.fun.out | 5 + .../1_environment/tests/references-3.fun.out | 5 + .../1_environment/tests/references-4.fun.out | 5 + .../1_environment/tests/references-5.fun.out | 23 + .../1_environment/tests/stuck-letrec.fun.out | 5 + .../tests/tail-recursion.fun.out | 5 + .../1_environment/tests/tuple-1.fun.out | 5 + .../1_environment/tests/tuple-2.fun.out | 5 + .../1_environment/tests/tuple-3.fun.out | 5 + .../1_environment/tests/tuple-4.fun.out | 5 + .../1_environment/tests/tuple-5.fun.out | 5 + .../pl-tutorial/2_languages/3_fun/Makefile | 3 + .../2_languages/3_fun/programs/ackermann.fun | 6 + .../2_languages/3_fun/programs/callcc-1.fun | 5 + .../2_languages/3_fun/programs/callcc-2.fun | 5 + .../2_languages/3_fun/programs/callcc-3.fun | 5 + .../2_languages/3_fun/programs/callcc-4.fun | 5 + .../2_languages/3_fun/programs/callcc-5.fun | 5 + .../programs/callcc-efficient-with-1.fun | 13 + .../programs/callcc-efficient-with-2.fun | 13 + .../programs/callcc-inefficient-without.fun | 11 + .../3_fun/programs/callcc-looping.fun | 8 + .../3_fun/programs/callcc-return-1.fun | 8 + .../3_fun/programs/callcc-return-2.fun | 10 + .../programs/constructor-bst-sorting.fun | 17 + .../3_fun/programs/constructor-days.fun | 17 + .../constructor-expr-distributivity.fun | 16 + .../programs/constructor-expr-toString.fun | 8 + .../programs/constructor-list-length.fun | 4 + .../programs/constructor-tree-mirror.fun | 7 + .../3_fun/programs/empty-argument-1.fun | 9 + .../3_fun/programs/empty-argument-2.fun | 9 + .../2_languages/3_fun/programs/exceptions.fun | 11 + .../3_fun/programs/factorial-and-list-max.fun | 16 + .../2_languages/3_fun/programs/factorial.fun | 8 + .../2_languages/3_fun/programs/list-1.fun | 6 + .../2_languages/3_fun/programs/list-2.fun | 6 + .../2_languages/3_fun/programs/list-3.fun | 6 + .../2_languages/3_fun/programs/list-4.fun | 4 + .../3_fun/programs/list-length.fun | 5 + .../2_languages/3_fun/programs/list-max.fun | 6 + .../2_languages/3_fun/programs/list-nth.fun | 4 + .../2_languages/3_fun/programs/nth.fun | 10 + .../2_languages/3_fun/programs/pattern.fun | 16 + .../3_fun/programs/polymorphism-1.fun | 6 + .../3_fun/programs/polymorphism-2.fun | 6 + .../3_fun/programs/polymorphism-3.fun | 6 + .../3_fun/programs/polymorphism-4.fun | 6 + .../3_fun/programs/polymorphism-5.fun | 9 + .../3_fun/programs/polymorphism-6.fun | 8 + .../3_fun/programs/references-1.fun | 29 + .../3_fun/programs/references-2.fun | 5 + .../3_fun/programs/references-3.fun | 7 + .../3_fun/programs/references-4.fun | 10 + .../3_fun/programs/references-5.fun | 7 + .../3_fun/programs/stuck-letrec.fun | 6 + .../3_fun/programs/tail-recursion.fun | 12 + .../2_languages/3_fun/programs/tuple-1.fun | 5 + .../2_languages/3_fun/programs/tuple-2.fun | 9 + .../2_languages/3_fun/programs/tuple-3.fun | 6 + .../2_languages/3_fun/programs/tuple-4.fun | 6 + .../2_languages/3_fun/programs/tuple-5.fun | 9 + .../pl-tutorial/2_languages/Makefile | 3 + pyk/regression-new/pl-tutorial/Makefile | 2 + pyk/regression-new/poly-kitem/Makefile | 6 + pyk/regression-new/poly-kitem/test.k | 7 + pyk/regression-new/poly-sort/1.test | 1 + pyk/regression-new/poly-sort/1.test.out | 3 + pyk/regression-new/poly-sort/Makefile | 7 + pyk/regression-new/poly-sort/test.k | 13 + pyk/regression-new/poly-unparsing/Makefile | 7 + .../poly-unparsing/poly-unparsing.k | 14 + .../poly-unparsing/test1.kore.kast | 3 + .../poly-unparsing/test1.kore.kast.out | 1 + pyk/regression-new/prelude-warnings/Makefile | 6 + pyk/regression-new/prelude-warnings/test.k | 30 + pyk/regression-new/profile/Makefile | 10 + pyk/regression-new/profile/test-spec.k | 7 + pyk/regression-new/profile/test-spec.k.out | 1 + pyk/regression-new/profile/test.k | 7 + .../proof-instrumentation/.gitignore | 1 + .../proof-instrumentation/Makefile | 22 + .../proof-instrumentation/test.in | 1 + .../proof-instrumentation/test.k | 9 + pyk/regression-new/proof-tests/Makefile | 2 + .../proof-tests/deposit/Makefile | 2 + .../proof-tests/deposit/spec/Makefile | 16 + .../proof-tests/deposit/spec/deposit-spec.k | 56 + .../deposit/spec/deposit-spec.k.out | 1 + .../deposit/spec/deposit-symbolic.k | 125 + .../proof-tests/deposit/spec/imap.smt2 | 1 + .../proof-tests/deposit/test/Makefile | 7 + .../proof-tests/deposit/test/deposit.k | 145 + .../proof-tests/deposit/test/imap.k | 24 + .../proof-tests/deposit/test/test.deposit | 9 + .../proof-tests/deposit/test/test.deposit.out | 17 + .../quadratic-poly-unparsing/Makefile | 7 + .../initial.nondet.search | 1 + .../initial.nondet.search.out | 39 + .../quadratic-poly-unparsing/nondet.k | 20 + pyk/regression-new/rand/1.rand | 1 + pyk/regression-new/rand/1.rand.out | 13 + pyk/regression-new/rand/Makefile | 6 + pyk/regression-new/rand/rand.k | 21 + .../rangemap-tests-llvm/Makefile | 6 + .../rangemap-tests-llvm/choice.test | 1 + .../rangemap-tests-llvm/choice.test.out | 3 + .../rangemap-tests-llvm/concat-0.test | 1 + .../rangemap-tests-llvm/concat-0.test.out | 3 + .../rangemap-tests-llvm/concat-1.test | 1 + .../rangemap-tests-llvm/concat-1.test.out | 3 + .../rangemap-tests-llvm/concat-2.test | 1 + .../rangemap-tests-llvm/concat-2.test.out | 3 + .../rangemap-tests-llvm/concat-3.test | 1 + .../rangemap-tests-llvm/concat-3.test.out | 3 + .../rangemap-tests-llvm/concat-4.test | 1 + .../rangemap-tests-llvm/concat-4.test.out | 4 + .../rangemap-tests-llvm/concat-6.test | 1 + .../rangemap-tests-llvm/concat-6.test.out | 5 + .../rangemap-tests-llvm/difference-0.test | 1 + .../rangemap-tests-llvm/difference-0.test.out | 3 + .../rangemap-tests-llvm/difference-1.test | 1 + .../rangemap-tests-llvm/difference-1.test.out | 3 + .../rangemap-tests-llvm/difference-2.test | 1 + .../rangemap-tests-llvm/difference-2.test.out | 3 + .../rangemap-tests-llvm/difference-4.test | 1 + .../rangemap-tests-llvm/difference-4.test.out | 3 + .../rangemap-tests-llvm/difference-6.test | 1 + .../rangemap-tests-llvm/difference-6.test.out | 4 + .../rangemap-tests-llvm/difference-7.test | 1 + .../rangemap-tests-llvm/difference-7.test.out | 6 + .../rangemap-tests-llvm/difference-8.test | 1 + .../rangemap-tests-llvm/difference-8.test.out | 4 + .../rangemap-tests-llvm/element.test | 1 + .../rangemap-tests-llvm/element.test.out | 3 + .../rangemap-tests-llvm/find-range-1.test | 1 + .../rangemap-tests-llvm/find-range-1.test.out | 3 + .../rangemap-tests-llvm/find-range-2.test | 1 + .../rangemap-tests-llvm/find-range-2.test.out | 3 + .../rangemap-tests-llvm/in-keys-00.test | 1 + .../rangemap-tests-llvm/in-keys-00.test.out | 3 + .../rangemap-tests-llvm/in-keys-01.test | 1 + .../rangemap-tests-llvm/in-keys-01.test.out | 3 + .../rangemap-tests-llvm/in-keys-02.test | 1 + .../rangemap-tests-llvm/in-keys-02.test.out | 3 + .../rangemap-tests-llvm/in-keys-03.test | 1 + .../rangemap-tests-llvm/in-keys-03.test.out | 3 + .../rangemap-tests-llvm/in-keys-04.test | 1 + .../rangemap-tests-llvm/in-keys-04.test.out | 3 + .../rangemap-tests-llvm/in-keys-05.test | 1 + .../rangemap-tests-llvm/in-keys-05.test.out | 3 + .../rangemap-tests-llvm/in-keys-06.test | 1 + .../rangemap-tests-llvm/in-keys-06.test.out | 3 + .../rangemap-tests-llvm/in-keys-07.test | 1 + .../rangemap-tests-llvm/in-keys-07.test.out | 3 + .../rangemap-tests-llvm/in-keys-08.test | 1 + .../rangemap-tests-llvm/in-keys-08.test.out | 3 + .../rangemap-tests-llvm/in-keys-09.test | 1 + .../rangemap-tests-llvm/in-keys-09.test.out | 3 + .../rangemap-tests-llvm/in-keys-10.test | 1 + .../rangemap-tests-llvm/in-keys-10.test.out | 3 + .../rangemap-tests-llvm/in-keys-11.test | 1 + .../rangemap-tests-llvm/in-keys-11.test.out | 3 + .../rangemap-tests-llvm/in-keys-12.test | 1 + .../rangemap-tests-llvm/in-keys-12.test.out | 3 + .../rangemap-tests-llvm/in-keys-13.test | 1 + .../rangemap-tests-llvm/in-keys-13.test.out | 3 + .../rangemap-tests-llvm/in-keys-14.test | 1 + .../rangemap-tests-llvm/in-keys-14.test.out | 3 + .../rangemap-tests-llvm/in-keys-15.test | 1 + .../rangemap-tests-llvm/in-keys-15.test.out | 3 + .../rangemap-tests-llvm/inclusion-0.test | 1 + .../rangemap-tests-llvm/inclusion-0.test.out | 3 + .../rangemap-tests-llvm/inclusion-1.test | 1 + .../rangemap-tests-llvm/inclusion-1.test.out | 3 + .../rangemap-tests-llvm/inclusion-2.test | 1 + .../rangemap-tests-llvm/inclusion-2.test.out | 3 + .../rangemap-tests-llvm/inclusion-3.test | 1 + .../rangemap-tests-llvm/inclusion-3.test.out | 3 + .../rangemap-tests-llvm/inclusion-4.test | 1 + .../rangemap-tests-llvm/inclusion-4.test.out | 3 + .../rangemap-tests-llvm/inclusion-5.test | 1 + .../rangemap-tests-llvm/inclusion-5.test.out | 3 + .../rangemap-tests-llvm/inclusion-6.test | 1 + .../rangemap-tests-llvm/inclusion-6.test.out | 3 + .../rangemap-tests-llvm/inclusion-7.test | 1 + .../rangemap-tests-llvm/inclusion-7.test.out | 3 + .../rangemap-tests-llvm/inclusion-8.test | 1 + .../rangemap-tests-llvm/inclusion-8.test.out | 3 + .../rangemap-tests-llvm/inclusion-9.test | 1 + .../rangemap-tests-llvm/inclusion-9.test.out | 3 + .../rangemap-tests-llvm/keys-0.test | 1 + .../rangemap-tests-llvm/keys-0.test.out | 3 + .../rangemap-tests-llvm/keys-1.test | 1 + .../rangemap-tests-llvm/keys-1.test.out | 3 + .../rangemap-tests-llvm/keys-3.test | 1 + .../rangemap-tests-llvm/keys-3.test.out | 5 + .../rangemap-tests-llvm/keys-list-0.test | 1 + .../rangemap-tests-llvm/keys-list-0.test.out | 3 + .../rangemap-tests-llvm/keys-list-1.test | 1 + .../rangemap-tests-llvm/keys-list-1.test.out | 3 + .../rangemap-tests-llvm/keys-list-3.test | 1 + .../rangemap-tests-llvm/keys-list-3.test.out | 5 + .../rangemap-tests-llvm/lookup-0.test | 1 + .../rangemap-tests-llvm/lookup-0.test.out | 3 + .../rangemap-tests-llvm/lookup-1.test | 1 + .../rangemap-tests-llvm/lookup-1.test.out | 3 + .../rangemap-tests-llvm/lookup-2.test | 1 + .../rangemap-tests-llvm/lookup-2.test.out | 3 + .../rangemap-tests-llvm/lookup-4.test | 1 + .../rangemap-tests-llvm/lookup-4.test.out | 3 + .../lookupOrDefault-00.test | 1 + .../lookupOrDefault-00.test.out | 3 + .../lookupOrDefault-01.test | 1 + .../lookupOrDefault-01.test.out | 3 + .../lookupOrDefault-02.test | 1 + .../lookupOrDefault-02.test.out | 3 + .../lookupOrDefault-03.test | 1 + .../lookupOrDefault-03.test.out | 3 + .../lookupOrDefault-04.test | 1 + .../lookupOrDefault-04.test.out | 3 + .../lookupOrDefault-05.test | 1 + .../lookupOrDefault-05.test.out | 3 + .../lookupOrDefault-06.test | 1 + .../lookupOrDefault-06.test.out | 3 + .../lookupOrDefault-07.test | 1 + .../lookupOrDefault-07.test.out | 3 + .../lookupOrDefault-08.test | 1 + .../lookupOrDefault-08.test.out | 3 + .../lookupOrDefault-09.test | 1 + .../lookupOrDefault-09.test.out | 3 + .../lookupOrDefault-10.test | 1 + .../lookupOrDefault-10.test.out | 3 + .../lookupOrDefault-11.test | 1 + .../lookupOrDefault-11.test.out | 3 + .../lookupOrDefault-12.test | 1 + .../lookupOrDefault-12.test.out | 3 + .../lookupOrDefault-13.test | 1 + .../lookupOrDefault-13.test.out | 3 + .../lookupOrDefault-14.test | 1 + .../lookupOrDefault-14.test.out | 3 + .../rangemap-tests-llvm/rangemap-simple.k | 35 + .../rangemap-tests-llvm/remove-0.test | 1 + .../rangemap-tests-llvm/remove-0.test.out | 3 + .../rangemap-tests-llvm/remove-1.test | 1 + .../rangemap-tests-llvm/remove-1.test.out | 4 + .../rangemap-tests-llvm/remove-2.test | 1 + .../rangemap-tests-llvm/remove-2.test.out | 3 + .../rangemap-tests-llvm/remove-3.test | 1 + .../rangemap-tests-llvm/remove-3.test.out | 5 + .../rangemap-tests-llvm/remove-all-0.test | 1 + .../rangemap-tests-llvm/remove-all-0.test.out | 3 + .../rangemap-tests-llvm/remove-all-1.test | 1 + .../rangemap-tests-llvm/remove-all-1.test.out | 3 + .../rangemap-tests-llvm/remove-all-2.test | 1 + .../rangemap-tests-llvm/remove-all-2.test.out | 3 + .../rangemap-tests-llvm/remove-all-3.test | 1 + .../rangemap-tests-llvm/remove-all-3.test.out | 5 + .../rangemap-tests-llvm/remove-all-4.test | 1 + .../rangemap-tests-llvm/remove-all-4.test.out | 6 + .../rangemap-tests-llvm/remove-all-5.test | 1 + .../rangemap-tests-llvm/remove-all-5.test.out | 6 + .../rangemap-tests-llvm/size-0.test | 1 + .../rangemap-tests-llvm/size-0.test.out | 3 + .../rangemap-tests-llvm/size-1.test | 1 + .../rangemap-tests-llvm/size-1.test.out | 3 + .../rangemap-tests-llvm/size-2.test | 1 + .../rangemap-tests-llvm/size-2.test.out | 3 + .../rangemap-tests-llvm/size-3.test | 1 + .../rangemap-tests-llvm/size-3.test.out | 3 + .../rangemap-tests-llvm/size-4.test | 1 + .../rangemap-tests-llvm/size-4.test.out | 3 + .../rangemap-tests-llvm/unit.test | 1 + .../rangemap-tests-llvm/unit.test.out | 3 + .../rangemap-tests-llvm/update-0.test | 1 + .../rangemap-tests-llvm/update-0.test.out | 3 + .../rangemap-tests-llvm/update-1.test | 1 + .../rangemap-tests-llvm/update-1.test.out | 4 + .../rangemap-tests-llvm/update-2.test | 1 + .../rangemap-tests-llvm/update-2.test.out | 4 + .../rangemap-tests-llvm/update-3.test | 1 + .../rangemap-tests-llvm/update-3.test.out | 3 + .../rangemap-tests-llvm/update-4.test | 1 + .../rangemap-tests-llvm/update-4.test.out | 4 + .../rangemap-tests-llvm/update-5.test | 1 + .../rangemap-tests-llvm/update-5.test.out | 5 + .../rangemap-tests-llvm/update-6.test | 1 + .../rangemap-tests-llvm/update-6.test.out | 5 + .../rangemap-tests-llvm/update-all-0.test | 1 + .../rangemap-tests-llvm/update-all-0.test.out | 3 + .../rangemap-tests-llvm/update-all-1.test | 1 + .../rangemap-tests-llvm/update-all-1.test.out | 3 + .../rangemap-tests-llvm/update-all-2.test | 1 + .../rangemap-tests-llvm/update-all-2.test.out | 3 + .../rangemap-tests-llvm/update-all-3.test | 1 + .../rangemap-tests-llvm/update-all-3.test.out | 9 + .../rangemap-tests-llvm/update-all-4.test | 1 + .../rangemap-tests-llvm/update-all-4.test.out | 3 + .../rangemap-tests-llvm/update-all-5.test | 1 + .../rangemap-tests-llvm/update-all-5.test.out | 8 + .../rangemap-tests-llvm/values-0.test | 1 + .../rangemap-tests-llvm/values-0.test.out | 3 + .../rangemap-tests-llvm/values-1.test | 1 + .../rangemap-tests-llvm/values-1.test.out | 3 + .../rangemap-tests-llvm/values-3.test | 1 + .../rangemap-tests-llvm/values-3.test.out | 5 + pyk/regression-new/rat/Makefile | 2 + pyk/regression-new/rat/a.k | 18 + pyk/regression-new/rat/defined/Makefile | 2 + .../rat/defined/haskell/Makefile | 8 + pyk/regression-new/rat/defined/haskell/a.k | 1 + pyk/regression-new/rat/defined/llvm/Makefile | 8 + pyk/regression-new/rat/defined/llvm/a.k | 1 + pyk/regression-new/rat/defined/tests/1.a | 46 + pyk/regression-new/rat/defined/tests/1.a.out | 5 + pyk/regression-new/rat/defined/tests/2.a | 21 + pyk/regression-new/rat/defined/tests/2.a.out | 5 + pyk/regression-new/rat/defined/tests/3.a | 31 + pyk/regression-new/rat/defined/tests/3.a.out | 5 + pyk/regression-new/rat/defined/tests/4.a | 21 + pyk/regression-new/rat/defined/tests/4.a.out | 5 + pyk/regression-new/rat/defined/tests/5.a | 11 + pyk/regression-new/rat/defined/tests/5.a.out | 5 + pyk/regression-new/rat/defined/tests/7.a | 19 + pyk/regression-new/rat/defined/tests/7.a.out | 5 + pyk/regression-new/rat/defined/tests/8.a | 101 + pyk/regression-new/rat/defined/tests/8.a.out | 5 + pyk/regression-new/rat/undefined/Makefile | 2 + .../rat/undefined/haskell/6-1.a.out | 1 + .../rat/undefined/haskell/6-2.a.out | 1 + .../rat/undefined/haskell/6-3.a.out | 1 + .../rat/undefined/haskell/6-4.a.out | 1 + .../rat/undefined/haskell/7-1.a.out | 1 + .../rat/undefined/haskell/7-2.a.out | 1 + .../rat/undefined/haskell/7-3.a.out | 1 + .../rat/undefined/haskell/Makefile | 9 + pyk/regression-new/rat/undefined/haskell/a.k | 1 + pyk/regression-new/rat/undefined/tests/6-1.a | 3 + pyk/regression-new/rat/undefined/tests/6-2.a | 3 + pyk/regression-new/rat/undefined/tests/6-3.a | 3 + pyk/regression-new/rat/undefined/tests/6-4.a | 3 + pyk/regression-new/rat/undefined/tests/7-1.a | 4 + pyk/regression-new/rat/undefined/tests/7-2.a | 4 + pyk/regression-new/rat/undefined/tests/7-3.a | 4 + pyk/regression-new/record-llvm/1.test | 1 + pyk/regression-new/record-llvm/1.test.out | 3 + pyk/regression-new/record-llvm/2.test | 1 + pyk/regression-new/record-llvm/2.test.out | 3 + pyk/regression-new/record-llvm/3.test | 1 + pyk/regression-new/record-llvm/3.test.out | 3 + pyk/regression-new/record-llvm/4.test | 1 + pyk/regression-new/record-llvm/4.test.out | 3 + pyk/regression-new/record-llvm/Makefile | 7 + pyk/regression-new/record-llvm/test.k | 12 + pyk/regression-new/search-bound/1.test | 1 + pyk/regression-new/search-bound/1.test.out | 1 + pyk/regression-new/search-bound/2.test | 1 + pyk/regression-new/search-bound/2.test.out | 7 + pyk/regression-new/search-bound/3.test | 1 + pyk/regression-new/search-bound/3.test.out | 15 + pyk/regression-new/search-bound/Makefile | 12 + pyk/regression-new/search-bound/test.k | 14 + pyk/regression-new/seqstrict-predicate/1.test | 1 + .../seqstrict-predicate/1.test.out | 3 + .../seqstrict-predicate/Makefile | 6 + pyk/regression-new/seqstrict-predicate/test.k | 13 + .../set-symbolic-tests/Makefile | 10 + pyk/regression-new/set-symbolic-tests/diff | 38 + .../set-symbolic-tests/diff-1-spec.k | 11 + .../set-symbolic-tests/diff-1-spec.k.out | 4 + .../set-symbolic-tests/diff-10-spec.k | 11 + .../set-symbolic-tests/diff-10-spec.k.out | 10 + .../set-symbolic-tests/diff-11-spec.k | 11 + .../set-symbolic-tests/diff-11-spec.k.out | 11 + .../set-symbolic-tests/diff-17-spec.k | 11 + .../set-symbolic-tests/diff-17-spec.k.out | 11 + .../set-symbolic-tests/diff-19-spec.k | 11 + .../set-symbolic-tests/diff-19-spec.k.out | 11 + .../set-symbolic-tests/diff-2-spec.k | 11 + .../set-symbolic-tests/diff-2-spec.k.out | 4 + .../set-symbolic-tests/diff-21-spec.k | 11 + .../set-symbolic-tests/diff-21-spec.k.out | 10 + .../set-symbolic-tests/diff-22-spec.k | 11 + .../set-symbolic-tests/diff-22-spec.k.out | 10 + .../set-symbolic-tests/diff-23-spec.k | 11 + .../set-symbolic-tests/diff-23-spec.k.out | 16 + .../set-symbolic-tests/diff-3-spec.k | 11 + .../set-symbolic-tests/diff-3-spec.k.out | 4 + .../set-symbolic-tests/diff-31-spec.k | 11 + .../set-symbolic-tests/diff-31-spec.k.out | 11 + .../set-symbolic-tests/diff-4-spec.k | 11 + .../set-symbolic-tests/diff-4-spec.k.out | 10 + .../set-symbolic-tests/diff-5-spec.k | 11 + .../set-symbolic-tests/diff-5-spec.k.out | 11 + .../set-symbolic-tests/diff-ticket3124-spec.k | 11 + .../diff-ticket3124-spec.k.out | 10 + .../set-symbolic-tests/failing/diff-32-spec.k | 11 + .../failing/diff-32-spec.k.out | 9 + .../set-symbolic-tests/failing/diff-34-spec.k | 11 + .../failing/diff-34-spec.k.out | 9 + .../set-symbolic-tests/failing/diff-38-spec.k | 11 + .../failing/diff-38-spec.k.out | 16 + .../failing/diff-ticket2700-spec.k | 12 + .../failing/diff-ticket2700-spec.k.out | 10 + .../failing/inset-10-spec.k | 11 + .../failing/inset-10-spec.k.out | 17 + .../failing/inset-100-elements-spec.k | 27 + .../failing/inset-100-elements-spec.k.out | 1 + .../failing/union-18-spec.k | 11 + .../failing/union-18-spec.k.out | 11 + .../failing/union-24-spec.k | 11 + .../failing/union-24-spec.k.out | 17 + .../set-symbolic-tests/gen-tests.sh | 25 + pyk/regression-new/set-symbolic-tests/inset | 13 + .../set-symbolic-tests/inset-1-spec.k | 11 + .../set-symbolic-tests/inset-1-spec.k.out | 4 + .../set-symbolic-tests/inset-11-spec.k | 11 + .../set-symbolic-tests/inset-11-spec.k.out | 19 + .../set-symbolic-tests/inset-2-spec.k | 11 + .../set-symbolic-tests/inset-2-spec.k.out | 10 + .../set-symbolic-tests/inset-3-spec.k | 11 + .../set-symbolic-tests/inset-3-spec.k.out | 10 + .../set-symbolic-tests/inset-4-spec.k | 11 + .../set-symbolic-tests/inset-4-spec.k.out | 11 + .../set-symbolic-tests/intersect | 38 + .../set-symbolic-tests/intersect-1-spec.k | 11 + .../set-symbolic-tests/intersect-1-spec.k.out | 4 + .../set-symbolic-tests/intersect-10-spec.k | 11 + .../intersect-10-spec.k.out | 10 + .../set-symbolic-tests/intersect-11-spec.k | 11 + .../intersect-11-spec.k.out | 11 + .../set-symbolic-tests/intersect-17-spec.k | 11 + .../intersect-17-spec.k.out | 11 + .../set-symbolic-tests/intersect-19-spec.k | 11 + .../intersect-19-spec.k.out | 11 + .../set-symbolic-tests/intersect-2-spec.k | 11 + .../set-symbolic-tests/intersect-2-spec.k.out | 4 + .../set-symbolic-tests/intersect-21-spec.k | 11 + .../intersect-21-spec.k.out | 10 + .../set-symbolic-tests/intersect-22-spec.k | 11 + .../intersect-22-spec.k.out | 10 + .../set-symbolic-tests/intersect-23-spec.k | 11 + .../intersect-23-spec.k.out | 16 + .../set-symbolic-tests/intersect-3-spec.k | 11 + .../set-symbolic-tests/intersect-3-spec.k.out | 4 + .../set-symbolic-tests/intersect-31-spec.k | 11 + .../intersect-31-spec.k.out | 11 + .../set-symbolic-tests/intersect-37-spec.k | 11 + .../intersect-37-spec.k.out | 11 + .../set-symbolic-tests/intersect-4-spec.k | 11 + .../set-symbolic-tests/intersect-4-spec.k.out | 10 + .../set-symbolic-tests/intersect-5-spec.k | 11 + .../set-symbolic-tests/intersect-5-spec.k.out | 11 + .../set-symbolic-tests/set-tests.k | 26 + pyk/regression-new/set-symbolic-tests/union | 39 + .../set-symbolic-tests/union-1-spec.k | 11 + .../set-symbolic-tests/union-1-spec.k.out | 4 + .../set-symbolic-tests/union-10-spec.k | 11 + .../set-symbolic-tests/union-10-spec.k.out | 11 + .../set-symbolic-tests/union-11-spec.k | 11 + .../set-symbolic-tests/union-11-spec.k.out | 11 + .../set-symbolic-tests/union-17-spec.k | 11 + .../set-symbolic-tests/union-17-spec.k.out | 11 + .../set-symbolic-tests/union-19-spec.k | 11 + .../set-symbolic-tests/union-19-spec.k.out | 11 + .../set-symbolic-tests/union-2-spec.k | 11 + .../set-symbolic-tests/union-2-spec.k.out | 4 + .../set-symbolic-tests/union-21-spec.k | 11 + .../set-symbolic-tests/union-21-spec.k.out | 11 + .../set-symbolic-tests/union-22-spec.k | 11 + .../set-symbolic-tests/union-22-spec.k.out | 10 + .../set-symbolic-tests/union-23-spec.k | 11 + .../set-symbolic-tests/union-23-spec.k.out | 17 + .../set-symbolic-tests/union-3-spec.k | 11 + .../set-symbolic-tests/union-3-spec.k.out | 4 + .../set-symbolic-tests/union-31-spec.k | 11 + .../set-symbolic-tests/union-31-spec.k.out | 11 + .../set-symbolic-tests/union-32-spec.k | 11 + .../set-symbolic-tests/union-32-spec.k.out | 10 + .../set-symbolic-tests/union-34-spec.k | 11 + .../set-symbolic-tests/union-34-spec.k.out | 10 + .../set-symbolic-tests/union-37-spec.k | 11 + .../set-symbolic-tests/union-37-spec.k.out | 10 + .../set-symbolic-tests/union-38-spec.k | 11 + .../set-symbolic-tests/union-38-spec.k.out | 16 + .../set-symbolic-tests/union-39-spec.k | 11 + .../set-symbolic-tests/union-39-spec.k.out | 10 + .../set-symbolic-tests/union-4-spec.k | 11 + .../set-symbolic-tests/union-4-spec.k.out | 11 + .../set-symbolic-tests/union-5-spec.k | 11 + .../set-symbolic-tests/union-5-spec.k.out | 11 + .../unsimplified/diff-12-spec.k | 11 + .../unsimplified/diff-13-spec.k | 11 + .../unsimplified/diff-14-spec.k | 11 + .../unsimplified/diff-15-spec.k | 11 + .../unsimplified/diff-16-spec.k | 11 + .../unsimplified/diff-18-spec.k | 11 + .../unsimplified/diff-24-spec.k | 11 + .../unsimplified/diff-25-spec.k | 11 + .../unsimplified/diff-26-spec.k | 11 + .../unsimplified/diff-27-spec.k | 11 + .../unsimplified/diff-28-spec.k | 11 + .../unsimplified/diff-29-spec.k | 11 + .../unsimplified/diff-30-spec.k | 11 + .../unsimplified/diff-33-spec.k | 11 + .../unsimplified/diff-35-spec.k | 11 + .../unsimplified/diff-36-spec.k | 11 + .../unsimplified/diff-37-spec.k | 11 + .../unsimplified/diff-6-spec.k | 11 + .../unsimplified/diff-7-spec.k | 11 + .../unsimplified/diff-8-spec.k | 11 + .../unsimplified/diff-9-spec.k | 11 + .../unsimplified/inset-12-spec.k | 11 + .../unsimplified/inset-13-spec.k | 11 + .../unsimplified/inset-5-spec.k | 11 + .../unsimplified/inset-6-spec.k | 11 + .../unsimplified/inset-7-spec.k | 11 + .../unsimplified/inset-8-spec.k | 11 + .../unsimplified/inset-9-spec.k | 11 + .../unsimplified/intersect-12-spec.k | 11 + .../unsimplified/intersect-13-spec.k | 11 + .../unsimplified/intersect-14-spec.k | 11 + .../unsimplified/intersect-15-spec.k | 11 + .../unsimplified/intersect-16-spec.k | 11 + .../unsimplified/intersect-18-spec.k | 11 + .../unsimplified/intersect-24-spec.k | 11 + .../unsimplified/intersect-25-spec.k | 11 + .../unsimplified/intersect-26-spec.k | 11 + .../unsimplified/intersect-27-spec.k | 11 + .../unsimplified/intersect-28-spec.k | 11 + .../unsimplified/intersect-29-spec.k | 11 + .../unsimplified/intersect-30-spec.k | 11 + .../unsimplified/intersect-32-spec.k | 11 + .../unsimplified/intersect-33-spec.k | 11 + .../unsimplified/intersect-34-spec.k | 11 + .../unsimplified/intersect-35-spec.k | 11 + .../unsimplified/intersect-36-spec.k | 11 + .../unsimplified/intersect-38-spec.k | 11 + .../unsimplified/intersect-6-spec.k | 11 + .../unsimplified/intersect-7-spec.k | 11 + .../unsimplified/intersect-8-spec.k | 11 + .../unsimplified/intersect-9-spec.k | 11 + .../unsimplified/union-12-spec.k | 11 + .../unsimplified/union-13-spec.k | 11 + .../unsimplified/union-14-spec.k | 11 + .../unsimplified/union-15-spec.k | 11 + .../unsimplified/union-16-spec.k | 11 + .../unsimplified/union-25-spec.k | 11 + .../unsimplified/union-26-spec.k | 11 + .../unsimplified/union-27-spec.k | 11 + .../unsimplified/union-28-spec.k | 11 + .../unsimplified/union-29-spec.k | 11 + .../unsimplified/union-30-spec.k | 11 + .../unsimplified/union-33-spec.k | 11 + .../unsimplified/union-35-spec.k | 11 + .../unsimplified/union-36-spec.k | 11 + .../unsimplified/union-6-spec.k | 11 + .../unsimplified/union-7-spec.k | 11 + .../unsimplified/union-8-spec.k | 11 + .../unsimplified/union-9-spec.k | 11 + pyk/regression-new/set_unification/Makefile | 7 + pyk/regression-new/set_unification/a-spec.k | 15 + .../set_unification/a-spec.k.out | 1 + pyk/regression-new/set_unification/test.k | 16 + pyk/regression-new/simp-haskell/1.a | 1 + pyk/regression-new/simp-haskell/1.a.out | 3 + pyk/regression-new/simp-haskell/Makefile | 7 + pyk/regression-new/simp-haskell/a.k | 12 + pyk/regression-new/skipped | 211 + .../spec-rule-application/Makefile | 8 + .../spec-rule-application/def.k | 34 + .../spec-rule-application/def01-spec.k | 16 + .../spec-rule-application/def01-spec.k.out | 1 + .../spec-rule-application/def02-spec.k | 17 + .../spec-rule-application/def02-spec.k.out | 1 + .../spec-rule-application/def031-spec.k | 16 + .../spec-rule-application/def031-spec.k.out | 1 + .../spec-rule-application/def032-spec.k | 16 + .../spec-rule-application/def032-spec.k.out | 1 + .../spec-rule-application/def033-spec.k | 16 + .../spec-rule-application/def033-spec.k.out | 1 + .../spec-rule-application/def11-spec.k | 17 + .../spec-rule-application/def11-spec.k.out | 1 + .../spec-rule-application/def12-spec.k | 18 + .../spec-rule-application/def12-spec.k.out | 1 + .../spec-rule-application/def13-spec.k | 18 + .../spec-rule-application/def13-spec.k.out | 1 + .../spec-rule-application/def14-spec.k | 17 + .../spec-rule-application/def14-spec.k.out | 1 + .../spec-rule-application/def15-spec.k | 18 + .../spec-rule-application/def15-spec.k.out | 1 + .../spec-rule-application/def21-spec.k | 17 + .../spec-rule-application/def21-spec.k.out | 1 + .../spec-rule-application/def22-spec.k | 18 + .../spec-rule-application/def22-spec.k.out | 1 + .../spec-rule-application/def23-spec.k | 18 + .../spec-rule-application/def23-spec.k.out | 1 + .../spec-rule-application/def24-spec.k | 17 + .../spec-rule-application/def24-spec.k.out | 1 + .../spec-rule-application/def25-spec.k | 18 + .../spec-rule-application/def25-spec.k.out | 1 + .../spec-rule-application/def41-spec.k | 23 + .../spec-rule-application/def41-spec.k.out | 1 + .../spec-rule-application/def42-spec.k | 24 + .../spec-rule-application/def42-spec.k.out | 1 + .../spec-rule-application/def44-spec.k | 19 + .../spec-rule-application/def44-spec.k.out | 1 + .../spec-rule-application/def45-spec.k | 19 + .../spec-rule-application/def45-spec.k.out | 1 + .../spec-rule-application/def61-spec.k | 24 + .../spec-rule-application/def61-spec.k.out | 34 + .../spec-rule-application/def62-spec.k | 25 + .../spec-rule-application/def62-spec.k.out | 1 + .../spec-rule-application/def71-spec.k | 25 + .../spec-rule-application/def71-spec.k.out | 1 + .../spec-rule-application/def81-spec.k | 27 + .../spec-rule-application/def81-spec.k.out | 28 + .../spec-rule-application/fail/def32-spec.k | 18 + .../spec-rule-application/fail/def33-spec.k | 18 + .../spec-rule-application/fail/def34-spec.k | 17 + .../spec-rule-application/fail/def35-spec.k | 18 + .../spec-rule-application/test plan.txt | 117 + pyk/regression-new/star-multiplicity/1.test | 1 + .../star-multiplicity/1.test.out | 22 + pyk/regression-new/star-multiplicity/Makefile | 8 + .../star-multiplicity/test-parser | 1 + pyk/regression-new/star-multiplicity/test.k | 26 + pyk/regression-new/string_escape/1.a | 1 + pyk/regression-new/string_escape/1.a.out | 3 + pyk/regression-new/string_escape/Makefile | 6 + pyk/regression-new/string_escape/a.k | 15 + .../stringbuffer-llvm/1.test.out | 3 + pyk/regression-new/stringbuffer-llvm/Makefile | 8 + pyk/regression-new/stringbuffer-llvm/test.k | 14 + pyk/regression-new/synonym/1.test | 1 + pyk/regression-new/synonym/1.test.out | 8 + pyk/regression-new/synonym/Makefile | 7 + pyk/regression-new/synonym/test.k | 20 + pyk/regression-new/trace/1.test | 1 + pyk/regression-new/trace/1.test.out | 8 + pyk/regression-new/trace/Makefile | 8 + pyk/regression-new/trace/test.k | 15 + .../unification-lemmas/Makefile | 5 + .../unification-lemmas/test-spec.k | 12 + .../unification-lemmas/test-spec.k.out | 1 + pyk/regression-new/unification-lemmas/test.k | 44 + .../unification-lemmas/test2-spec.k | 10 + .../unification-lemmas/test2-spec.k.out | 1 + .../unification-lemmas2/Makefile | 5 + .../unification-lemmas2/owise-spec.k | 15 + .../unification-lemmas2/owise-spec.k.out | 1 + .../unification-lemmas2/with-config.k | 44 + pyk/regression-new/union/Makefile | 5 + pyk/regression-new/union/test1 | 1 + pyk/regression-new/union/test1.out | 3 + pyk/regression-new/union/test2 | 1 + pyk/regression-new/union/test2.out | 3 + pyk/regression-new/union/test3 | 1 + pyk/regression-new/union/test3.out | 4 + pyk/regression-new/union/test4 | 1 + pyk/regression-new/union/test4.out | 5 + pyk/regression-new/union/test5 | 1 + pyk/regression-new/union/test5.out | 6 + pyk/regression-new/union/test6 | 1 + pyk/regression-new/union/test6.out | 6 + pyk/regression-new/union/test7 | 1 + pyk/regression-new/union/test7.out | 6 + pyk/regression-new/union/test8 | 1 + pyk/regression-new/union/test8.out | 6 + pyk/regression-new/union/test9 | 1 + pyk/regression-new/union/test9.out | 7 + pyk/regression-new/union/union.k | 26 + pyk/regression-new/unparseKORE/1.test | 1 + pyk/regression-new/unparseKORE/1.test.out | 3 + pyk/regression-new/unparseKORE/Makefile | 6 + pyk/regression-new/unparseKORE/test.k | 15 + pyk/regression-new/useless/Makefile | 4 + pyk/regression-new/useless/test.k | 94 + pyk/regression-new/useless/test.k.out | 106 + pyk/regression-new/werrorCategory/Makefile | 6 + pyk/regression-new/werrorCategory/test.k | 7 + pyk/regression-new/withConfig-llvm/Makefile | 7 + pyk/regression-new/withConfig-llvm/test.k | 1 + pyk/regression-new/withConfig2/1.test | 1 + pyk/regression-new/withConfig2/1.test.out | 5 + pyk/regression-new/withConfig2/2.test | 1 + pyk/regression-new/withConfig2/2.test.out | 5 + pyk/regression-new/withConfig2/Makefile | 6 + pyk/regression-new/withConfig2/test.k | 21 + 2811 files changed, 48414 insertions(+), 6 deletions(-) create mode 100644 pyk/regression-new/amb-rew/Makefile create mode 100644 pyk/regression-new/amb-rew/test.k create mode 100644 pyk/regression-new/append/1.test.kparse create mode 100644 pyk/regression-new/append/1.test.kparse.out create mode 100644 pyk/regression-new/append/Makefile create mode 100755 pyk/regression-new/append/kparse-twice create mode 100644 pyk/regression-new/append/test.k create mode 100644 pyk/regression-new/array-haskell/1.test create mode 100644 pyk/regression-new/array-haskell/1.test.out create mode 100644 pyk/regression-new/array-haskell/2.test create mode 100644 pyk/regression-new/array-haskell/2.test.out create mode 100644 pyk/regression-new/array-haskell/3.test create mode 100644 pyk/regression-new/array-haskell/3.test.out create mode 100644 pyk/regression-new/array-haskell/4.test create mode 100644 pyk/regression-new/array-haskell/4.test.out create mode 100644 pyk/regression-new/array-haskell/5.test create mode 100644 pyk/regression-new/array-haskell/5.test.out create mode 100644 pyk/regression-new/array-haskell/Makefile create mode 100644 pyk/regression-new/array-haskell/test.k create mode 100644 pyk/regression-new/bad-bytes-literal/Makefile create mode 100644 pyk/regression-new/bad-bytes-literal/quote.k create mode 100644 pyk/regression-new/bad-bytes-literal/quote.k.out create mode 100644 pyk/regression-new/bad-bytes-literal/slash.k create mode 100644 pyk/regression-new/bad-bytes-literal/slash.k.out create mode 100644 pyk/regression-new/bad-bytes-literal/unicode-escape.k create mode 100644 pyk/regression-new/bad-bytes-literal/unicode-escape.k.out create mode 100644 pyk/regression-new/bad-bytes-literal/unicode.k create mode 100644 pyk/regression-new/bad-bytes-literal/unicode.k.out create mode 100644 pyk/regression-new/bad-flags/Makefile create mode 100644 pyk/regression-new/bad-flags/extra-flags.out create mode 100644 pyk/regression-new/bad-flags/no-flags.out create mode 100644 pyk/regression-new/bad-flags/test.k create mode 100644 pyk/regression-new/bison-glr-bug/Makefile create mode 100644 pyk/regression-new/bison-glr-bug/forwarder.iele create mode 100644 pyk/regression-new/bison-glr-bug/iele.k create mode 100755 pyk/regression-new/bison-glr-bug/parse create mode 100644 pyk/regression-new/bison-glr-bug/test.ref create mode 100644 pyk/regression-new/bison-parser-library/.gitignore create mode 100644 pyk/regression-new/bison-parser-library/Makefile create mode 100644 pyk/regression-new/bison-parser-library/test.c create mode 100644 pyk/regression-new/bison-parser-library/test.in create mode 100644 pyk/regression-new/bison-parser-library/test.k create mode 100644 pyk/regression-new/bison-parser-library/test.out create mode 100644 pyk/regression-new/bit-range-llvm/1.test.out create mode 100644 pyk/regression-new/bit-range-llvm/2.test.out create mode 100644 pyk/regression-new/bit-range-llvm/3.test.out create mode 100644 pyk/regression-new/bit-range-llvm/4.test.out create mode 100644 pyk/regression-new/bit-range-llvm/5.test.out create mode 100644 pyk/regression-new/bit-range-llvm/6.test.out create mode 100644 pyk/regression-new/bit-range-llvm/7.test.out create mode 100644 pyk/regression-new/bit-range-llvm/Makefile create mode 100644 pyk/regression-new/bit-range-llvm/test.k create mode 100644 pyk/regression-new/boundary-cells-opt/Makefile create mode 100644 pyk/regression-new/boundary-cells-opt/bc-none/Makefile create mode 100644 pyk/regression-new/boundary-cells-opt/bc-none/boundary-cells-test-spec.k.out create mode 100644 pyk/regression-new/boundary-cells-opt/boundary-cells-test-spec.k create mode 100644 pyk/regression-new/boundary-cells-opt/boundary-cells-test.k create mode 100644 pyk/regression-new/bracket-priority/Makefile create mode 100644 pyk/regression-new/bracket-priority/test.k create mode 100644 pyk/regression-new/bytes-coverage/Makefile create mode 100644 pyk/regression-new/bytes-coverage/test.k create mode 100644 pyk/regression-new/bytes-haskell/Makefile create mode 100644 pyk/regression-new/bytes-haskell/test.k create mode 100644 pyk/regression-new/bytes-literal/1.test create mode 100644 pyk/regression-new/bytes-literal/1.test.out create mode 100644 pyk/regression-new/bytes-literal/2.test create mode 100644 pyk/regression-new/bytes-literal/2.test.out create mode 100644 pyk/regression-new/bytes-literal/Makefile create mode 100644 pyk/regression-new/bytes-literal/test.k create mode 100644 pyk/regression-new/bytes-llvm/1.test.out create mode 100644 pyk/regression-new/bytes-llvm/10.test.out create mode 100644 pyk/regression-new/bytes-llvm/11.test.out create mode 100644 pyk/regression-new/bytes-llvm/12.test.out create mode 100644 pyk/regression-new/bytes-llvm/13.test.out create mode 100644 pyk/regression-new/bytes-llvm/14.test.out create mode 100644 pyk/regression-new/bytes-llvm/15.test.out create mode 100644 pyk/regression-new/bytes-llvm/16.test.out create mode 100644 pyk/regression-new/bytes-llvm/17.test.out create mode 100644 pyk/regression-new/bytes-llvm/18.test.out create mode 100644 pyk/regression-new/bytes-llvm/19.test.out create mode 100644 pyk/regression-new/bytes-llvm/2.test.out create mode 100644 pyk/regression-new/bytes-llvm/20.test.out create mode 100644 pyk/regression-new/bytes-llvm/21.test.out create mode 100644 pyk/regression-new/bytes-llvm/22.test.out create mode 100644 pyk/regression-new/bytes-llvm/23.test.out create mode 100644 pyk/regression-new/bytes-llvm/24.test.out create mode 100644 pyk/regression-new/bytes-llvm/25.test.out create mode 100644 pyk/regression-new/bytes-llvm/26.test.out create mode 100644 pyk/regression-new/bytes-llvm/27.test.out create mode 100644 pyk/regression-new/bytes-llvm/28.test.out create mode 100644 pyk/regression-new/bytes-llvm/29.test.out create mode 100644 pyk/regression-new/bytes-llvm/3.test.out create mode 100644 pyk/regression-new/bytes-llvm/30.test.out create mode 100644 pyk/regression-new/bytes-llvm/31.test.out create mode 100644 pyk/regression-new/bytes-llvm/32.test.out create mode 100644 pyk/regression-new/bytes-llvm/4.test.out create mode 100644 pyk/regression-new/bytes-llvm/5.test.out create mode 100644 pyk/regression-new/bytes-llvm/6.test.out create mode 100644 pyk/regression-new/bytes-llvm/7.test.out create mode 100644 pyk/regression-new/bytes-llvm/8.test.out create mode 100644 pyk/regression-new/bytes-llvm/9.test.out create mode 100644 pyk/regression-new/bytes-llvm/Makefile create mode 100644 pyk/regression-new/bytes-llvm/test.k create mode 100644 pyk/regression-new/bytes-memset/1.test create mode 100644 pyk/regression-new/bytes-memset/1.test.out create mode 100644 pyk/regression-new/bytes-memset/2.test create mode 100644 pyk/regression-new/bytes-memset/2.test.out create mode 100644 pyk/regression-new/bytes-memset/Makefile create mode 100644 pyk/regression-new/bytes-memset/test.k create mode 100644 pyk/regression-new/cast-kitem/1.test create mode 100644 pyk/regression-new/cast-kitem/1.test.out create mode 100644 pyk/regression-new/cast-kitem/Makefile create mode 100644 pyk/regression-new/cast-kitem/test.k create mode 100644 pyk/regression-new/cast/1.test create mode 100644 pyk/regression-new/cast/1.test.out create mode 100644 pyk/regression-new/cast/Makefile create mode 100644 pyk/regression-new/cast/test.k create mode 100644 pyk/regression-new/cell-bag-sort-llvm/Makefile create mode 100644 pyk/regression-new/cell-bag-sort-llvm/test.k create mode 100644 pyk/regression-new/cell-bag-sort-llvm/test.k.out create mode 100644 pyk/regression-new/cell-sort-haskell/1.test create mode 100644 pyk/regression-new/cell-sort-haskell/1.test.out create mode 100644 pyk/regression-new/cell-sort-haskell/Makefile create mode 100644 pyk/regression-new/cell-sort-haskell/test.k create mode 100644 pyk/regression-new/cell_map/Makefile create mode 100644 pyk/regression-new/cell_map/pgm.test create mode 100644 pyk/regression-new/cell_map/pgm.test.out create mode 100644 pyk/regression-new/cell_map/test.k create mode 100644 pyk/regression-new/checkClaimError/Makefile create mode 100644 pyk/regression-new/checkClaimError/claim-spec.k create mode 100644 pyk/regression-new/checkClaimError/claim-spec.k.out create mode 100644 pyk/regression-new/checkClaimError/errorClaim.k create mode 100644 pyk/regression-new/checkClaimError/rule-spec.k create mode 100644 pyk/regression-new/checkClaimError/rule-spec.k.out create mode 100644 pyk/regression-new/checkClaimError/syntax-spec.k create mode 100644 pyk/regression-new/checkClaimError/syntax-spec.k.out create mode 100644 pyk/regression-new/checkWarns/Makefile create mode 100644 pyk/regression-new/checkWarns/checkHaskellAnywhere.k create mode 100644 pyk/regression-new/checkWarns/checkHaskellAnywhere.k.out create mode 100644 pyk/regression-new/checkWarns/checkRHSHaskell.k create mode 100644 pyk/regression-new/checkWarns/checkRHSHaskell.k.out create mode 100644 pyk/regression-new/checkWarns/checkUnusedSymbol.k create mode 100644 pyk/regression-new/checkWarns/checkUnusedSymbol.k.out create mode 100644 pyk/regression-new/checkWarns/checkUnusedVar.k create mode 100644 pyk/regression-new/checkWarns/checkUnusedVar.k.out create mode 100644 pyk/regression-new/checkWarns/deprecated.k create mode 100644 pyk/regression-new/checkWarns/deprecated.k.out create mode 100644 pyk/regression-new/checkWarns/existsLHSBoundFail.k create mode 100644 pyk/regression-new/checkWarns/existsLHSBoundFail.k.out create mode 100644 pyk/regression-new/checkWarns/existsLHSBoundPass.k create mode 100644 pyk/regression-new/checkWarns/existsLHSBoundPass.k.out create mode 100644 pyk/regression-new/checkWarns/missingKlabel.k create mode 100644 pyk/regression-new/checkWarns/missingKlabel.k.out create mode 100644 pyk/regression-new/checkWarns/nullarySymbol.k create mode 100644 pyk/regression-new/checkWarns/nullarySymbol.k.out create mode 100644 pyk/regression-new/checkWarns/requireBuiltinK.k create mode 100644 pyk/regression-new/checkWarns/requireBuiltinK.k.out create mode 100644 pyk/regression-new/checkWarns/singletonOverload.k create mode 100644 pyk/regression-new/checkWarns/singletonOverload.k.out create mode 100644 pyk/regression-new/checkWarns/syntaxGroups.k create mode 100644 pyk/regression-new/checkWarns/syntaxGroups.k.out create mode 100644 pyk/regression-new/checks/Makefile create mode 100644 pyk/regression-new/checks/anywhereSimplification.k create mode 100644 pyk/regression-new/checks/anywhereSimplification.k.out create mode 100644 pyk/regression-new/checks/anywhereSymbolic.k create mode 100644 pyk/regression-new/checks/anywhereSymbolic.k.out create mode 100644 pyk/regression-new/checks/attParamForbidden.k create mode 100644 pyk/regression-new/checks/attParamForbidden.k.out create mode 100644 pyk/regression-new/checks/attParamRequired.k create mode 100644 pyk/regression-new/checks/attParamRequired.k.out create mode 100644 pyk/regression-new/checks/badFunctionRuleWithContext.k create mode 100644 pyk/regression-new/checks/badFunctionRuleWithContext.k.out create mode 100644 pyk/regression-new/checks/binder.k create mode 100644 pyk/regression-new/checks/binder.k.out create mode 100644 pyk/regression-new/checks/checkAssoc.k create mode 100644 pyk/regression-new/checks/checkAssoc.k.out create mode 100644 pyk/regression-new/checks/checkBracket.k create mode 100644 pyk/regression-new/checks/checkBracket.k.out create mode 100644 pyk/regression-new/checks/checkBracketFine.k create mode 100644 pyk/regression-new/checks/checkBracketFine.k.out create mode 100644 pyk/regression-new/checks/checkBracketSubsort.k create mode 100644 pyk/regression-new/checks/checkBracketSubsort.k.out create mode 100644 pyk/regression-new/checks/checkBracketSupersort.k create mode 100644 pyk/regression-new/checks/checkBracketSupersort.k.out create mode 100644 pyk/regression-new/checks/checkBracketUnrelatedsort.k create mode 100644 pyk/regression-new/checks/checkBracketUnrelatedsort.k.out create mode 100644 pyk/regression-new/checks/checkCellSortDeclFail.k create mode 100644 pyk/regression-new/checks/checkCellSortDeclFail.k.out create mode 100644 pyk/regression-new/checks/checkCellSortDeclOK.k create mode 100644 pyk/regression-new/checks/checkCellSortDeclOK.k.out create mode 100644 pyk/regression-new/checks/checkCellSortDeclOKIssue.k create mode 100644 pyk/regression-new/checks/checkCellSortDeclOKIssue.k.out create mode 100644 pyk/regression-new/checks/checkCircularList.k create mode 100644 pyk/regression-new/checks/checkCircularList.k.out create mode 100644 pyk/regression-new/checks/checkDuplicateList.k create mode 100644 pyk/regression-new/checks/checkDuplicateList.k.out create mode 100644 pyk/regression-new/checks/checkExcludeSimplification.k create mode 100644 pyk/regression-new/checks/checkExcludeSimplification.k.out create mode 100644 pyk/regression-new/checks/checkFuncRuleAtt.k create mode 100644 pyk/regression-new/checks/checkFuncRuleAtt.k.out create mode 100644 pyk/regression-new/checks/checkFuncWithContext.k create mode 100644 pyk/regression-new/checks/checkFuncWithContext.k.out create mode 100644 pyk/regression-new/checks/checkGroup.k create mode 100644 pyk/regression-new/checks/checkGroup.k.out create mode 100644 pyk/regression-new/checks/checkInstantiation.k create mode 100644 pyk/regression-new/checks/checkInstantiation.k.out create mode 100644 pyk/regression-new/checks/checkIsSort.k create mode 100644 pyk/regression-new/checks/checkIsSort.k.out create mode 100644 pyk/regression-new/checks/checkListDecl1.k create mode 100644 pyk/regression-new/checks/checkListDecl1.k.out create mode 100644 pyk/regression-new/checks/checkListDecl2.k create mode 100644 pyk/regression-new/checks/checkListDecl2.k.out create mode 100644 pyk/regression-new/checks/checkListDecl3.k create mode 100644 pyk/regression-new/checks/checkListDecl3.k.out create mode 100644 pyk/regression-new/checks/checkMIntLiteral.k create mode 100644 pyk/regression-new/checks/checkMIntLiteral.k.out create mode 100644 pyk/regression-new/checks/checkMacroRecord.k create mode 100644 pyk/regression-new/checks/checkMacroRecord.k.out create mode 100644 pyk/regression-new/checks/checkModuleAtts.k create mode 100644 pyk/regression-new/checks/checkModuleAtts.k.out create mode 100644 pyk/regression-new/checks/checkParametricSort.k create mode 100644 pyk/regression-new/checks/checkParametricSort.k.out create mode 100644 pyk/regression-new/checks/checkPriorityBlocks.k create mode 100644 pyk/regression-new/checks/checkPriorityBlocks.k.out create mode 100644 pyk/regression-new/checks/checkRecordProdDuplicateLabels.k create mode 100644 pyk/regression-new/checks/checkRecordProdDuplicateLabels.k.out create mode 100644 pyk/regression-new/checks/checkReservedCellNames.k create mode 100644 pyk/regression-new/checks/checkReservedCellNames.k.out create mode 100644 pyk/regression-new/checks/checkSortDeclIssue3038.k create mode 100644 pyk/regression-new/checks/checkSortDeclIssue3038.k.out create mode 100644 pyk/regression-new/checks/checkStrictBOOLInclusion.k create mode 100644 pyk/regression-new/checks/checkStrictBOOLInclusion.k.out create mode 100644 pyk/regression-new/checks/checkSymbolKlabel.k create mode 100644 pyk/regression-new/checks/checkSymbolKlabel.k.out create mode 100644 pyk/regression-new/checks/checkTerminatorSymbol.k create mode 100644 pyk/regression-new/checks/checkTerminatorSymbol.k.out create mode 100644 pyk/regression-new/checks/checkUndeclaredTags.k create mode 100644 pyk/regression-new/checks/checkUndeclaredTags.k.out create mode 100644 pyk/regression-new/checks/circularImports.k create mode 100644 pyk/regression-new/checks/circularImports.k.out create mode 100644 pyk/regression-new/checks/claimInDef.k create mode 100644 pyk/regression-new/checks/claimInDef.k.out create mode 100644 pyk/regression-new/checks/concrete.k create mode 100644 pyk/regression-new/checks/concrete.k.out create mode 100644 pyk/regression-new/checks/duplicateAttRule.k create mode 100644 pyk/regression-new/checks/duplicateAttRule.k.out create mode 100644 pyk/regression-new/checks/duplicateAttSyntax.k create mode 100644 pyk/regression-new/checks/duplicateAttSyntax.k.out create mode 100644 pyk/regression-new/checks/duplicateContextLabels.k create mode 100644 pyk/regression-new/checks/duplicateContextLabels.k.out create mode 100644 pyk/regression-new/checks/duplicateKCells.k create mode 100644 pyk/regression-new/checks/duplicateKCells.k.out create mode 100644 pyk/regression-new/checks/duplicateModule.k create mode 100644 pyk/regression-new/checks/duplicateModule.k.out create mode 100644 pyk/regression-new/checks/duplicateRules.k create mode 100644 pyk/regression-new/checks/duplicateRules.k.out create mode 100644 pyk/regression-new/checks/emptyMapCollection.k create mode 100644 pyk/regression-new/checks/emptyMapCollection.k.out create mode 100644 pyk/regression-new/checks/errorExistential.k create mode 100644 pyk/regression-new/checks/errorExistential.k.out create mode 100644 pyk/regression-new/checks/existentialCheck.k create mode 100644 pyk/regression-new/checks/existentialCheck.k.out create mode 100644 pyk/regression-new/checks/existsLHSBoundFail.k create mode 100644 pyk/regression-new/checks/existsLHSBoundFail.k.out create mode 100644 pyk/regression-new/checks/existsLHSBoundPass.k create mode 100644 pyk/regression-new/checks/existsLHSBoundPass.k.out create mode 100644 pyk/regression-new/checks/expandMacroEnsures.k create mode 100644 pyk/regression-new/checks/expandMacroEnsures.k.out create mode 100644 pyk/regression-new/checks/expandMacroRequires.k create mode 100644 pyk/regression-new/checks/expandMacroRequires.k.out create mode 100644 pyk/regression-new/checks/formatatt.k create mode 100644 pyk/regression-new/checks/formatatt.k.out create mode 100644 pyk/regression-new/checks/freshConfig.k create mode 100644 pyk/regression-new/checks/freshConfig.k.out create mode 100644 pyk/regression-new/checks/functionContextInRewrite.k create mode 100644 pyk/regression-new/checks/functionContextInRewrite.k.out create mode 100644 pyk/regression-new/checks/functionSimplification.k create mode 100644 pyk/regression-new/checks/functionSimplification.k.out create mode 100644 pyk/regression-new/checks/intOperationInLHS.k create mode 100644 pyk/regression-new/checks/intOperationInLHS.k.out create mode 100644 pyk/regression-new/checks/invalidAs.k create mode 100644 pyk/regression-new/checks/invalidAs.k.out create mode 100644 pyk/regression-new/checks/invalidConstantExp.k create mode 100644 pyk/regression-new/checks/invalidConstantExp.k.out create mode 100644 pyk/regression-new/checks/invalidConstructor.k create mode 100644 pyk/regression-new/checks/invalidConstructor.k.out create mode 100644 pyk/regression-new/checks/invalidFormat.k create mode 100644 pyk/regression-new/checks/invalidFormat.k.out create mode 100644 pyk/regression-new/checks/invalidLabel.k create mode 100644 pyk/regression-new/checks/invalidLabel.k.out create mode 100644 pyk/regression-new/checks/invalidPrec.k create mode 100644 pyk/regression-new/checks/invalidPrec.k.out create mode 100644 pyk/regression-new/checks/invalidSortPredicate.k create mode 100644 pyk/regression-new/checks/invalidSortPredicate.k.out create mode 100644 pyk/regression-new/checks/invalidStrict.k create mode 100644 pyk/regression-new/checks/invalidStrict.k.out create mode 100644 pyk/regression-new/checks/invalidSymbol.k create mode 100644 pyk/regression-new/checks/invalidSymbol.k.out create mode 100644 pyk/regression-new/checks/localDuplicateList.k create mode 100644 pyk/regression-new/checks/localDuplicateList.k.out create mode 100644 pyk/regression-new/checks/macroWithFunction.k create mode 100644 pyk/regression-new/checks/macroWithFunction.k.out create mode 100644 pyk/regression-new/checks/mapImportInConfigModules.k create mode 100644 pyk/regression-new/checks/mapImportInConfigModules.k.out create mode 100644 pyk/regression-new/checks/markdownErrorLocation.md create mode 100644 pyk/regression-new/checks/markdownErrorLocation.md.out create mode 100644 pyk/regression-new/checks/missingBar.k create mode 100644 pyk/regression-new/checks/missingBar.k.out create mode 100644 pyk/regression-new/checks/missingKResult.k create mode 100644 pyk/regression-new/checks/missingKResult.k.out create mode 100644 pyk/regression-new/checks/missingModule.k create mode 100644 pyk/regression-new/checks/missingModule.k.out create mode 100644 pyk/regression-new/checks/nestedFunctionContext.k create mode 100644 pyk/regression-new/checks/nestedFunctionContext.k.out create mode 100644 pyk/regression-new/checks/nestedFunctionContextInFun.k create mode 100644 pyk/regression-new/checks/nestedFunctionContextInFun.k.out create mode 100644 pyk/regression-new/checks/nestedRewrite.k create mode 100644 pyk/regression-new/checks/nestedRewrite.k.out create mode 100644 pyk/regression-new/checks/nestedRewriteInFun.k create mode 100644 pyk/regression-new/checks/nestedRewriteInFun.k.out create mode 100644 pyk/regression-new/checks/noImportFloat.k create mode 100644 pyk/regression-new/checks/noImportFloat.k.out create mode 100644 pyk/regression-new/checks/noRewrite.k create mode 100644 pyk/regression-new/checks/noRewrite.k.out create mode 100644 pyk/regression-new/checks/noRewriteInFun.k create mode 100644 pyk/regression-new/checks/noRewriteInFun.k.out create mode 100644 pyk/regression-new/checks/overloadKLabel.k create mode 100644 pyk/regression-new/checks/overloadKLabel.k.out create mode 100644 pyk/regression-new/checks/paramAmb.k create mode 100644 pyk/regression-new/checks/paramAmb.k.out create mode 100644 pyk/regression-new/checks/parseErrorExpected.k create mode 100644 pyk/regression-new/checks/parseErrorExpected.k.out create mode 100644 pyk/regression-new/checks/priorityError.k create mode 100644 pyk/regression-new/checks/priorityError.k.out create mode 100644 pyk/regression-new/checks/recordOnRhs.k create mode 100644 pyk/regression-new/checks/recordOnRhs.k.out create mode 100644 pyk/regression-new/checks/removeUnit.k create mode 100644 pyk/regression-new/checks/removeUnit.k.out create mode 100644 pyk/regression-new/checks/restrictedAtts.k create mode 100644 pyk/regression-new/checks/restrictedAtts.k.out create mode 100644 pyk/regression-new/checks/rewriteInFunctionContext.k create mode 100644 pyk/regression-new/checks/rewriteInFunctionContext.k.out create mode 100644 pyk/regression-new/checks/signature.k create mode 100644 pyk/regression-new/checks/signature.k.out create mode 100644 pyk/regression-new/checks/smtLemmaCheck.k create mode 100644 pyk/regression-new/checks/smtLemmaCheck.k.out create mode 100644 pyk/regression-new/checks/tokenCheck.k create mode 100644 pyk/regression-new/checks/tokenCheck.k.out create mode 100644 pyk/regression-new/checks/totalWithoutFunction.k create mode 100644 pyk/regression-new/checks/totalWithoutFunction.k.out create mode 100644 pyk/regression-new/checks/unexpandedMacro.k create mode 100644 pyk/regression-new/checks/unexpandedMacro.k.out create mode 100644 pyk/regression-new/checks/wideningAnywhere.k create mode 100644 pyk/regression-new/checks/wideningAnywhere.k.out create mode 100644 pyk/regression-new/checks/wideningMacro.k create mode 100644 pyk/regression-new/checks/wideningMacro.k.out create mode 100644 pyk/regression-new/concrete-function-cache/Makefile create mode 100644 pyk/regression-new/concrete-function-cache/a1-spec.k create mode 100644 pyk/regression-new/concrete-function-cache/a1-spec.k.out create mode 100644 pyk/regression-new/concrete-function-cache/a2-spec.k create mode 100644 pyk/regression-new/concrete-function-cache/a2-spec.k.out create mode 100644 pyk/regression-new/concrete-function/1.a create mode 100644 pyk/regression-new/concrete-function/1.a.out create mode 100644 pyk/regression-new/concrete-function/2.a create mode 100644 pyk/regression-new/concrete-function/2.a.out create mode 100644 pyk/regression-new/concrete-function/3.a create mode 100644 pyk/regression-new/concrete-function/3.a.out create mode 100644 pyk/regression-new/concrete-function/Makefile create mode 100644 pyk/regression-new/concrete-function/a.k create mode 100644 pyk/regression-new/concrete-function/a1-spec.k create mode 100644 pyk/regression-new/concrete-function/a1-spec.k.out create mode 100644 pyk/regression-new/concrete-function/a2-spec.k create mode 100644 pyk/regression-new/concrete-function/a2-spec.k.out create mode 100644 pyk/regression-new/concrete-haskell/Makefile create mode 100644 pyk/regression-new/concrete-haskell/a.k create mode 100644 pyk/regression-new/concrete-haskell/a1-spec.k create mode 100644 pyk/regression-new/concrete-haskell/a1-spec.k.out create mode 100644 pyk/regression-new/configuration-composition/Makefile create mode 100644 pyk/regression-new/configuration-composition/config-comp.k create mode 100644 pyk/regression-new/configuration-formatting/1.test create mode 100644 pyk/regression-new/configuration-formatting/1.test.out create mode 100644 pyk/regression-new/configuration-formatting/Makefile create mode 100644 pyk/regression-new/configuration-formatting/test.k create mode 100644 pyk/regression-new/constant-folding/1.test create mode 100644 pyk/regression-new/constant-folding/1.test.out create mode 100644 pyk/regression-new/constant-folding/2.test create mode 100644 pyk/regression-new/constant-folding/2.test.out create mode 100644 pyk/regression-new/constant-folding/3.test create mode 100644 pyk/regression-new/constant-folding/3.test.out create mode 100644 pyk/regression-new/constant-folding/Makefile create mode 100644 pyk/regression-new/constant-folding/test.k create mode 100644 pyk/regression-new/context-alias-2/1.test create mode 100644 pyk/regression-new/context-alias-2/1.test.out create mode 100644 pyk/regression-new/context-alias-2/2.test create mode 100644 pyk/regression-new/context-alias-2/2.test.out create mode 100644 pyk/regression-new/context-alias-2/3.test create mode 100644 pyk/regression-new/context-alias-2/3.test.out create mode 100644 pyk/regression-new/context-alias-2/4.test create mode 100644 pyk/regression-new/context-alias-2/4.test.out create mode 100644 pyk/regression-new/context-alias-2/5.test create mode 100644 pyk/regression-new/context-alias-2/5.test.out create mode 100644 pyk/regression-new/context-alias-2/Makefile create mode 100644 pyk/regression-new/context-alias-2/test.k create mode 100644 pyk/regression-new/context-alias-3/Makefile create mode 100644 pyk/regression-new/context-alias-3/test.k create mode 100644 pyk/regression-new/context-alias/1.test create mode 100644 pyk/regression-new/context-alias/1.test.out create mode 100644 pyk/regression-new/context-alias/10.test create mode 100644 pyk/regression-new/context-alias/10.test.out create mode 100644 pyk/regression-new/context-alias/1b.test create mode 100644 pyk/regression-new/context-alias/1b.test.out create mode 100644 pyk/regression-new/context-alias/2.test create mode 100644 pyk/regression-new/context-alias/2.test.out create mode 100644 pyk/regression-new/context-alias/2b.test create mode 100644 pyk/regression-new/context-alias/2b.test.out create mode 100644 pyk/regression-new/context-alias/3.test create mode 100644 pyk/regression-new/context-alias/3.test.out create mode 100644 pyk/regression-new/context-alias/3b.test create mode 100644 pyk/regression-new/context-alias/3b.test.out create mode 100644 pyk/regression-new/context-alias/4.test create mode 100644 pyk/regression-new/context-alias/4.test.out create mode 100644 pyk/regression-new/context-alias/4b.test create mode 100644 pyk/regression-new/context-alias/4b.test.out create mode 100644 pyk/regression-new/context-alias/5.test create mode 100644 pyk/regression-new/context-alias/5.test.out create mode 100644 pyk/regression-new/context-alias/5b.test create mode 100644 pyk/regression-new/context-alias/5b.test.out create mode 100644 pyk/regression-new/context-alias/6.test create mode 100644 pyk/regression-new/context-alias/6.test.out create mode 100644 pyk/regression-new/context-alias/6b.test create mode 100644 pyk/regression-new/context-alias/6b.test.out create mode 100644 pyk/regression-new/context-alias/7.test create mode 100644 pyk/regression-new/context-alias/7.test.out create mode 100644 pyk/regression-new/context-alias/7b.test create mode 100644 pyk/regression-new/context-alias/7b.test.out create mode 100644 pyk/regression-new/context-alias/8.test create mode 100644 pyk/regression-new/context-alias/8.test.out create mode 100644 pyk/regression-new/context-alias/8b.test create mode 100644 pyk/regression-new/context-alias/8b.test.out create mode 100644 pyk/regression-new/context-alias/9.test create mode 100644 pyk/regression-new/context-alias/9.test.out create mode 100644 pyk/regression-new/context-alias/Makefile create mode 100644 pyk/regression-new/context-alias/test.k create mode 100644 pyk/regression-new/context-cell/1.test create mode 100644 pyk/regression-new/context-cell/1.test.out create mode 100644 pyk/regression-new/context-cell/Makefile create mode 100644 pyk/regression-new/context-cell/test.k create mode 100644 pyk/regression-new/context-labels/Makefile create mode 100644 pyk/regression-new/context-labels/barlabel.find-rule create mode 100644 pyk/regression-new/context-labels/barlabel.find-rule.out create mode 100644 pyk/regression-new/context-labels/bazlabel.find-rule create mode 100644 pyk/regression-new/context-labels/bazlabel.find-rule.out create mode 100644 pyk/regression-new/context-labels/context-spec.k create mode 100644 pyk/regression-new/context-labels/context-spec.k.in create mode 100644 pyk/regression-new/context-labels/context-spec.k.out create mode 100644 pyk/regression-new/context-labels/context.k create mode 100644 pyk/regression-new/context-labels/foolabel.find-rule create mode 100644 pyk/regression-new/context-labels/foolabel.find-rule.out create mode 100644 pyk/regression-new/coverage/Makefile create mode 100644 pyk/regression-new/coverage/test.k create mode 100644 pyk/regression-new/domains-lemmas-no-smt/Makefile create mode 100644 pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k create mode 100644 pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k.out create mode 100644 pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt.k create mode 100644 pyk/regression-new/domains-lemmas-smt/Makefile create mode 100644 pyk/regression-new/domains-lemmas-smt/domains-lemmas-smt-spec.k create mode 100644 pyk/regression-new/domains-lemmas-smt/domains-lemmas-smt-spec.k.out create mode 100644 pyk/regression-new/domains-lemmas-smt/domains-lemmas-smt.k create mode 100644 pyk/regression-new/doubleinj/1.test create mode 100644 pyk/regression-new/doubleinj/1.test.out create mode 100644 pyk/regression-new/doubleinj/Makefile create mode 100644 pyk/regression-new/doubleinj/test.k create mode 100644 pyk/regression-new/equals-formatting/Makefile create mode 100644 pyk/regression-new/equals-formatting/eq.k create mode 100644 pyk/regression-new/equals-formatting/equals1.kast create mode 100644 pyk/regression-new/equals-formatting/equals1.kast.out create mode 100644 pyk/regression-new/equals-formatting/equals2.kast create mode 100644 pyk/regression-new/equals-formatting/equals2.kast.out create mode 100644 pyk/regression-new/equals-pattern/1.test create mode 100644 pyk/regression-new/equals-pattern/1.test.out create mode 100644 pyk/regression-new/equals-pattern/2.test create mode 100644 pyk/regression-new/equals-pattern/2.test.out create mode 100644 pyk/regression-new/equals-pattern/3.test create mode 100644 pyk/regression-new/equals-pattern/3.test.out create mode 100644 pyk/regression-new/equals-pattern/4.test create mode 100644 pyk/regression-new/equals-pattern/4.test.out create mode 100644 pyk/regression-new/equals-pattern/5.test create mode 100644 pyk/regression-new/equals-pattern/5.test.out create mode 100644 pyk/regression-new/equals-pattern/6.test create mode 100644 pyk/regression-new/equals-pattern/6.test.out create mode 100644 pyk/regression-new/equals-pattern/7.test create mode 100644 pyk/regression-new/equals-pattern/7.test.out create mode 100644 pyk/regression-new/equals-pattern/8.test create mode 100644 pyk/regression-new/equals-pattern/8.test.out create mode 100644 pyk/regression-new/equals-pattern/9.test create mode 100644 pyk/regression-new/equals-pattern/9.test.out create mode 100644 pyk/regression-new/equals-pattern/Makefile create mode 100644 pyk/regression-new/equals-pattern/test.k create mode 100644 pyk/regression-new/excludedModuleAtts/Makefile create mode 100644 pyk/regression-new/excludedModuleAtts/haskell/Makefile create mode 100644 pyk/regression-new/excludedModuleAtts/haskell/test-entry.k create mode 100644 pyk/regression-new/excludedModuleAtts/haskell/test-entry.k.out create mode 100644 pyk/regression-new/excludedModuleAtts/haskell/test-main.k create mode 100644 pyk/regression-new/excludedModuleAtts/haskell/test-main.k.out create mode 100644 pyk/regression-new/excludedModuleAtts/llvm/Makefile create mode 100644 pyk/regression-new/excludedModuleAtts/llvm/test-entry.k create mode 100644 pyk/regression-new/excludedModuleAtts/llvm/test-entry.k.out create mode 100644 pyk/regression-new/excludedModuleAtts/llvm/test-main.k create mode 100644 pyk/regression-new/excludedModuleAtts/llvm/test-main.k.out create mode 100644 pyk/regression-new/exit-code-no-gen-top/1.ecode create mode 100644 pyk/regression-new/exit-code-no-gen-top/1.ecode.out create mode 100644 pyk/regression-new/exit-code-no-gen-top/Makefile create mode 100644 pyk/regression-new/exit-code-no-gen-top/exitcode.k create mode 100644 pyk/regression-new/f32-mul/1.mul create mode 100644 pyk/regression-new/f32-mul/1.mul.out create mode 100644 pyk/regression-new/f32-mul/Makefile create mode 100644 pyk/regression-new/f32-mul/float-mul.k create mode 100644 pyk/regression-new/fatalWarnings/Makefile create mode 100644 pyk/regression-new/fatalWarnings/test.k create mode 100644 pyk/regression-new/fatalWarnings/test.k.out create mode 100644 pyk/regression-new/ffi-llvm/Makefile create mode 100644 pyk/regression-new/ffi-llvm/test.k create mode 100644 pyk/regression-new/float-id/1.test create mode 100644 pyk/regression-new/float-id/1.test.out create mode 100644 pyk/regression-new/float-id/2.test create mode 100644 pyk/regression-new/float-id/2.test.out create mode 100644 pyk/regression-new/float-id/3.test create mode 100644 pyk/regression-new/float-id/3.test.out create mode 100644 pyk/regression-new/float-id/4.test create mode 100644 pyk/regression-new/float-id/4.test.out create mode 100644 pyk/regression-new/float-id/5.test create mode 100644 pyk/regression-new/float-id/5.test.out create mode 100644 pyk/regression-new/float-id/Makefile create mode 100644 pyk/regression-new/float-id/test.k create mode 100644 pyk/regression-new/fresh1/Makefile create mode 100644 pyk/regression-new/fresh1/test.k create mode 100644 pyk/regression-new/fresh2/Makefile create mode 100644 pyk/regression-new/fresh2/test.k create mode 100644 pyk/regression-new/fresh3/Makefile create mode 100644 pyk/regression-new/fresh3/test-ext.k create mode 100644 pyk/regression-new/fun-llvm/Makefile create mode 100644 pyk/regression-new/fun-llvm/fun-test.k create mode 100644 pyk/regression-new/fun-llvm/funIntListAndConfig.test create mode 100644 pyk/regression-new/fun-llvm/funIntListAndConfig.test.out create mode 100644 pyk/regression-new/fun-llvm/funSort.test create mode 100644 pyk/regression-new/fun-llvm/funSort.test.out create mode 100644 pyk/regression-new/fun-llvm/funSort2.test create mode 100644 pyk/regression-new/fun-llvm/funSort2.test.out create mode 100644 pyk/regression-new/fun-llvm/nestedFun.test create mode 100644 pyk/regression-new/fun-llvm/nestedFun.test.out create mode 100644 pyk/regression-new/fun-llvm/nestedFun3Levels.test create mode 100644 pyk/regression-new/fun-llvm/nestedFun3Levels.test.out create mode 100644 pyk/regression-new/fun-llvm/nestedFunString.test create mode 100644 pyk/regression-new/fun-llvm/nestedFunString.test.out create mode 100644 pyk/regression-new/fun-llvm/useFooBarInt.test create mode 100644 pyk/regression-new/fun-llvm/useFooBarInt.test.out create mode 100644 pyk/regression-new/fun-llvm/useFooToBar.test create mode 100644 pyk/regression-new/fun-llvm/useFooToBar.test.out create mode 100644 pyk/regression-new/fun-llvm/useNestedBarInt.test create mode 100644 pyk/regression-new/fun-llvm/useNestedBarInt.test.out create mode 100644 pyk/regression-new/fun-llvm/useNestedFooBarInt.test create mode 100644 pyk/regression-new/fun-llvm/useNestedFooBarInt.test.out create mode 100644 pyk/regression-new/fun-llvm/useNestedFooToBar.test create mode 100644 pyk/regression-new/fun-llvm/useNestedFooToBar.test.out create mode 100644 pyk/regression-new/glr/1.test create mode 100644 pyk/regression-new/glr/Makefile create mode 100755 pyk/regression-new/glr/parse create mode 100644 pyk/regression-new/glr/test.k create mode 100644 pyk/regression-new/glr/test.ref create mode 100644 pyk/regression-new/glr2/1.test create mode 100644 pyk/regression-new/glr2/Makefile create mode 100755 pyk/regression-new/glr2/parse create mode 100644 pyk/regression-new/glr2/test.k create mode 100644 pyk/regression-new/glr2/test.ref create mode 100644 pyk/regression-new/glr3/1.test create mode 100644 pyk/regression-new/glr3/Makefile create mode 100755 pyk/regression-new/glr3/parse create mode 100644 pyk/regression-new/glr3/test.k create mode 100644 pyk/regression-new/glr3/test.ref create mode 100644 pyk/regression-new/glr4/1.test create mode 100644 pyk/regression-new/glr4/Makefile create mode 100755 pyk/regression-new/glr4/parse create mode 100644 pyk/regression-new/glr4/test.k create mode 100644 pyk/regression-new/glr4/test.ref create mode 100644 pyk/regression-new/group/1.test create mode 100644 pyk/regression-new/group/1.test.out create mode 100644 pyk/regression-new/group/Makefile create mode 100644 pyk/regression-new/group/test.k create mode 100644 pyk/regression-new/help/Makefile create mode 100755 pyk/regression-new/help/check-git-revision-format create mode 100644 pyk/regression-new/help/test.k create mode 100644 pyk/regression-new/imp++-llvm/Makefile create mode 100644 pyk/regression-new/imp++-llvm/div.imp create mode 100644 pyk/regression-new/imp++-llvm/div.imp.out create mode 100644 pyk/regression-new/imp++-llvm/imp.md create mode 100644 pyk/regression-new/imp++-llvm/spawn.imp create mode 100644 pyk/regression-new/imp++-llvm/spawn.imp.in create mode 100644 pyk/regression-new/imp++-llvm/spawn.imp.out create mode 100644 pyk/regression-new/imp-haskell/Makefile create mode 100644 pyk/regression-new/imp-haskell/collatz.imp create mode 100644 pyk/regression-new/imp-haskell/collatz.imp.out create mode 100644 pyk/regression-new/imp-haskell/imp.k create mode 100644 pyk/regression-new/imp-haskell/klabel-spec.k create mode 100644 pyk/regression-new/imp-haskell/klabel-spec.k.out create mode 100644 pyk/regression-new/imp-haskell/max-fail-spec.k create mode 100644 pyk/regression-new/imp-haskell/max-fail-spec.k.out create mode 100644 pyk/regression-new/imp-haskell/max-spec.k create mode 100644 pyk/regression-new/imp-haskell/max-spec.k.out create mode 100644 pyk/regression-new/imp-haskell/nested-imports-spec.k create mode 100644 pyk/regression-new/imp-haskell/nested-imports-spec.k.out create mode 100644 pyk/regression-new/imp-haskell/primes.imp create mode 100644 pyk/regression-new/imp-haskell/primes.imp.out create mode 100644 pyk/regression-new/imp-haskell/sum.imp create mode 100644 pyk/regression-new/imp-haskell/sum.imp.out create mode 100644 pyk/regression-new/imp-json/Makefile create mode 100644 pyk/regression-new/imp-json/imp.k create mode 100644 pyk/regression-new/imp-kore/Makefile create mode 100644 pyk/regression-new/imp-kore/imp.k create mode 100644 pyk/regression-new/imp-llvm/Makefile create mode 100644 pyk/regression-new/imp-llvm/collatz.imp create mode 100644 pyk/regression-new/imp-llvm/collatz.imp.out create mode 100644 pyk/regression-new/imp-llvm/imp.k create mode 100644 pyk/regression-new/imp-llvm/primes.imp create mode 100644 pyk/regression-new/imp-llvm/primes.imp.out create mode 100644 pyk/regression-new/imp-llvm/sum.imp create mode 100644 pyk/regression-new/imp-llvm/sum.imp.out create mode 100644 pyk/regression-new/int-llvm/Makefile create mode 100644 pyk/regression-new/int-llvm/llvm-int create mode 100644 pyk/regression-new/int-llvm/llvm-int.k create mode 100644 pyk/regression-new/int-llvm/test1.llvmint create mode 100644 pyk/regression-new/int-llvm/test1.llvmint.out create mode 100644 pyk/regression-new/int-llvm/test2.llvmint create mode 100644 pyk/regression-new/int-llvm/test2.llvmint.out create mode 100644 pyk/regression-new/io-llvm/1.test create mode 100644 pyk/regression-new/io-llvm/1.test.out create mode 100644 pyk/regression-new/io-llvm/2.test create mode 100644 pyk/regression-new/io-llvm/2.test.out create mode 100644 pyk/regression-new/io-llvm/3.test create mode 100644 pyk/regression-new/io-llvm/3.test.out create mode 100644 pyk/regression-new/io-llvm/4.test create mode 100644 pyk/regression-new/io-llvm/4.test.out create mode 100644 pyk/regression-new/io-llvm/Makefile create mode 100644 pyk/regression-new/io-llvm/test.k create mode 100644 pyk/regression-new/issue-1088/.gitignore create mode 100644 pyk/regression-new/issue-1088/1.kast create mode 100644 pyk/regression-new/issue-1088/1.kast.expected create mode 100644 pyk/regression-new/issue-1088/Makefile create mode 100644 pyk/regression-new/issue-1088/kast-in.k create mode 100644 pyk/regression-new/issue-1090/1.test create mode 100644 pyk/regression-new/issue-1090/1.test.out create mode 100644 pyk/regression-new/issue-1090/Makefile create mode 100644 pyk/regression-new/issue-1090/test.k create mode 100644 pyk/regression-new/issue-1098/1.test create mode 100644 pyk/regression-new/issue-1098/1.test.out create mode 100644 pyk/regression-new/issue-1098/Makefile create mode 100644 pyk/regression-new/issue-1098/test.k create mode 100644 pyk/regression-new/issue-1145/1.test create mode 100644 pyk/regression-new/issue-1145/1.test.out create mode 100644 pyk/regression-new/issue-1145/Makefile create mode 100644 pyk/regression-new/issue-1145/test.k create mode 100644 pyk/regression-new/issue-1169/.gitignore create mode 100644 pyk/regression-new/issue-1169/1.test create mode 100644 pyk/regression-new/issue-1169/1.test.out create mode 100644 pyk/regression-new/issue-1169/Makefile create mode 100644 pyk/regression-new/issue-1169/test.k create mode 100644 pyk/regression-new/issue-1175/Makefile create mode 100644 pyk/regression-new/issue-1175/test-broken-spec.k create mode 100644 pyk/regression-new/issue-1175/test-broken-spec.k.out create mode 100644 pyk/regression-new/issue-1175/test.k create mode 100644 pyk/regression-new/issue-1175/test2-broken-spec.k create mode 100644 pyk/regression-new/issue-1175/test2-broken-spec.k.out create mode 100644 pyk/regression-new/issue-1184/Makefile create mode 100644 pyk/regression-new/issue-1184/test.k create mode 100644 pyk/regression-new/issue-1186/1.test create mode 100644 pyk/regression-new/issue-1186/1.test.out create mode 100644 pyk/regression-new/issue-1186/Makefile create mode 100644 pyk/regression-new/issue-1186/test.k create mode 100644 pyk/regression-new/issue-1193/Makefile create mode 100644 pyk/regression-new/issue-1193/imp.k create mode 100644 pyk/regression-new/issue-1193/imp.k.out create mode 100644 pyk/regression-new/issue-1263/1.test create mode 100644 pyk/regression-new/issue-1263/1.test.out create mode 100644 pyk/regression-new/issue-1263/Makefile create mode 100644 pyk/regression-new/issue-1263/test.k create mode 100644 pyk/regression-new/issue-1273/Makefile create mode 100644 pyk/regression-new/issue-1273/test.k create mode 100644 pyk/regression-new/issue-1372/Makefile create mode 100644 pyk/regression-new/issue-1372/test.k create mode 100644 pyk/regression-new/issue-1384/Makefile create mode 100644 pyk/regression-new/issue-1384/test.k create mode 100644 pyk/regression-new/issue-1388/Makefile create mode 100644 pyk/regression-new/issue-1388/test.k create mode 100644 pyk/regression-new/issue-1436/1.test create mode 100644 pyk/regression-new/issue-1436/1.test.out create mode 100644 pyk/regression-new/issue-1436/Makefile create mode 100644 pyk/regression-new/issue-1436/test.k create mode 100644 pyk/regression-new/issue-1472-unboundVars/Makefile create mode 100644 pyk/regression-new/issue-1472-unboundVars/test-spec.k create mode 100644 pyk/regression-new/issue-1472-unboundVars/test-spec.k.out create mode 100644 pyk/regression-new/issue-1472-unboundVars/test.k create mode 100644 pyk/regression-new/issue-1489-claimLoc/Makefile create mode 100644 pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k create mode 100644 pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k.out create mode 100644 pyk/regression-new/issue-1489-claimLoc/claimLoc.k create mode 100644 pyk/regression-new/issue-1528/1.test create mode 100644 pyk/regression-new/issue-1528/1.test.out create mode 100644 pyk/regression-new/issue-1528/2.test create mode 100644 pyk/regression-new/issue-1528/2.test.out create mode 100644 pyk/regression-new/issue-1528/3.test create mode 100644 pyk/regression-new/issue-1528/3.test.out create mode 100644 pyk/regression-new/issue-1528/Makefile create mode 100644 pyk/regression-new/issue-1528/test.k create mode 100644 pyk/regression-new/issue-1545-func-in-simplification/Makefile create mode 100644 pyk/regression-new/issue-1545-func-in-simplification/test.k create mode 100644 pyk/regression-new/issue-1545-func-in-simplification/test.k.out create mode 100644 pyk/regression-new/issue-1572/Makefile create mode 100644 pyk/regression-new/issue-1572/test.k create mode 100644 pyk/regression-new/issue-1572/test.k.out create mode 100644 pyk/regression-new/issue-1573/1.test create mode 100644 pyk/regression-new/issue-1573/1.test.out create mode 100644 pyk/regression-new/issue-1573/Makefile create mode 100644 pyk/regression-new/issue-1573/test.k create mode 100644 pyk/regression-new/issue-1602/Makefile create mode 100644 pyk/regression-new/issue-1602/foo.test create mode 100644 pyk/regression-new/issue-1602/foo.test.out create mode 100644 pyk/regression-new/issue-1602/test.k create mode 100644 pyk/regression-new/issue-1633/1.test create mode 100644 pyk/regression-new/issue-1633/1.test.out create mode 100644 pyk/regression-new/issue-1633/10.test create mode 100644 pyk/regression-new/issue-1633/10.test.out create mode 100644 pyk/regression-new/issue-1633/11.test create mode 100644 pyk/regression-new/issue-1633/11.test.out create mode 100644 pyk/regression-new/issue-1633/12.test create mode 100644 pyk/regression-new/issue-1633/12.test.out create mode 100644 pyk/regression-new/issue-1633/13.test create mode 100644 pyk/regression-new/issue-1633/13.test.out create mode 100644 pyk/regression-new/issue-1633/2.test create mode 100644 pyk/regression-new/issue-1633/2.test.out create mode 100644 pyk/regression-new/issue-1633/3.test create mode 100644 pyk/regression-new/issue-1633/3.test.out create mode 100644 pyk/regression-new/issue-1633/4.test create mode 100644 pyk/regression-new/issue-1633/4.test.out create mode 100644 pyk/regression-new/issue-1633/5.test create mode 100644 pyk/regression-new/issue-1633/5.test.out create mode 100644 pyk/regression-new/issue-1633/6.test create mode 100644 pyk/regression-new/issue-1633/6.test.out create mode 100644 pyk/regression-new/issue-1633/7.test create mode 100644 pyk/regression-new/issue-1633/7.test.out create mode 100644 pyk/regression-new/issue-1633/8.test create mode 100644 pyk/regression-new/issue-1633/8.test.out create mode 100644 pyk/regression-new/issue-1633/9.test create mode 100644 pyk/regression-new/issue-1633/9.test.out create mode 100644 pyk/regression-new/issue-1633/Makefile create mode 100644 pyk/regression-new/issue-1633/lexical.k create mode 100644 pyk/regression-new/issue-1676-koreBytes/1.test create mode 100644 pyk/regression-new/issue-1676-koreBytes/1.test.out create mode 100644 pyk/regression-new/issue-1676-koreBytes/Makefile create mode 100644 pyk/regression-new/issue-1676-koreBytes/test.k create mode 100644 pyk/regression-new/issue-1682-korePrettyPrint/1.test create mode 100644 pyk/regression-new/issue-1682-korePrettyPrint/1.test.out create mode 100644 pyk/regression-new/issue-1682-korePrettyPrint/2.kast create mode 100644 pyk/regression-new/issue-1682-korePrettyPrint/2.kast.out create mode 100644 pyk/regression-new/issue-1682-korePrettyPrint/Makefile create mode 100644 pyk/regression-new/issue-1682-korePrettyPrint/test.k create mode 100644 pyk/regression-new/issue-1683-cfgVarsWarns/1.test create mode 100644 pyk/regression-new/issue-1683-cfgVarsWarns/1.test.out create mode 100644 pyk/regression-new/issue-1683-cfgVarsWarns/Makefile create mode 100644 pyk/regression-new/issue-1683-cfgVarsWarns/test.k create mode 100644 pyk/regression-new/issue-1683-cfgVarsWarns/test.k.out create mode 100644 pyk/regression-new/issue-1760/Makefile create mode 100644 pyk/regression-new/issue-1760/test.k create mode 100644 pyk/regression-new/issue-1760/test.k.out create mode 100644 pyk/regression-new/issue-1789-rhsOr/Makefile create mode 100644 pyk/regression-new/issue-1789-rhsOr/haskell/0.test create mode 100644 pyk/regression-new/issue-1789-rhsOr/haskell/0.test.out create mode 100644 pyk/regression-new/issue-1789-rhsOr/haskell/1.test create mode 100644 pyk/regression-new/issue-1789-rhsOr/haskell/1.test.out create mode 100644 pyk/regression-new/issue-1789-rhsOr/haskell/Makefile create mode 100644 pyk/regression-new/issue-1789-rhsOr/haskell/test.k create mode 100644 pyk/regression-new/issue-1789-rhsOr/llvm/1.test create mode 100644 pyk/regression-new/issue-1789-rhsOr/llvm/1.test.out create mode 100644 pyk/regression-new/issue-1789-rhsOr/llvm/2.test create mode 100644 pyk/regression-new/issue-1789-rhsOr/llvm/2.test.out create mode 100644 pyk/regression-new/issue-1789-rhsOr/llvm/Makefile create mode 100644 pyk/regression-new/issue-1789-rhsOr/llvm/test.k create mode 100644 pyk/regression-new/issue-1844-noPGM/Makefile create mode 100644 pyk/regression-new/issue-1844-noPGM/haskell/Makefile create mode 120000 pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm create mode 100644 pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm.out create mode 120000 pyk/regression-new/issue-1844-noPGM/haskell/test.k create mode 100644 pyk/regression-new/issue-1844-noPGM/krun.nopgm create mode 100644 pyk/regression-new/issue-1844-noPGM/llvm/Makefile create mode 120000 pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm create mode 100644 pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm.out create mode 120000 pyk/regression-new/issue-1844-noPGM/llvm/test.k create mode 100644 pyk/regression-new/issue-1844-noPGM/test.k create mode 100644 pyk/regression-new/issue-1879-kproveTrans/Makefile create mode 100644 pyk/regression-new/issue-1879-kproveTrans/haskell/Makefile create mode 100644 pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k create mode 100644 pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k.out create mode 100644 pyk/regression-new/issue-1879-kproveTrans/haskell/test.k create mode 100644 pyk/regression-new/issue-1952/1.test create mode 100644 pyk/regression-new/issue-1952/1.test.out create mode 100644 pyk/regression-new/issue-1952/Makefile create mode 100644 pyk/regression-new/issue-1952/test.k create mode 100644 pyk/regression-new/issue-2075-2/1.test create mode 100644 pyk/regression-new/issue-2075-2/1.test.out create mode 100644 pyk/regression-new/issue-2075-2/Makefile create mode 100644 pyk/regression-new/issue-2075-2/test.k create mode 100644 pyk/regression-new/issue-2075/1.test create mode 100644 pyk/regression-new/issue-2075/1.test.out create mode 100644 pyk/regression-new/issue-2075/Makefile create mode 100644 pyk/regression-new/issue-2075/test.k create mode 100644 pyk/regression-new/issue-2114/Makefile create mode 100644 pyk/regression-new/issue-2114/test.k create mode 100644 pyk/regression-new/issue-2142-markConcrete/Makefile create mode 100644 pyk/regression-new/issue-2142-markConcrete/test-spec.k create mode 100644 pyk/regression-new/issue-2142-markConcrete/test-spec.k.out create mode 100644 pyk/regression-new/issue-2142-markConcrete/test.k create mode 100644 pyk/regression-new/issue-2146-duplicateModules/Makefile create mode 100644 pyk/regression-new/issue-2146-duplicateModules/test.k create mode 100644 pyk/regression-new/issue-2146-duplicateModules/test.k.out create mode 100644 pyk/regression-new/issue-2174-kprovexParseError/Makefile create mode 100644 pyk/regression-new/issue-2174-kprovexParseError/test-spec.k create mode 100644 pyk/regression-new/issue-2174-kprovexParseError/test-spec.k.out create mode 100644 pyk/regression-new/issue-2174-kprovexParseError/test.k create mode 100644 pyk/regression-new/issue-2273/Makefile create mode 100644 pyk/regression-new/issue-2273/a.k create mode 100644 pyk/regression-new/issue-2273/tests/1.a create mode 100644 pyk/regression-new/issue-2273/tests/1.a.out create mode 100644 pyk/regression-new/issue-2273/tests/kast-in1.kast create mode 100644 pyk/regression-new/issue-2273/tests/kast-in1.kast.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/Makefile create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k.out create mode 100644 pyk/regression-new/issue-2287-simpl-rules-in-kprovex/test.k create mode 100644 pyk/regression-new/issue-2315-id-quotes/1.test create mode 100644 pyk/regression-new/issue-2315-id-quotes/1.test.out create mode 100644 pyk/regression-new/issue-2315-id-quotes/2.test create mode 100644 pyk/regression-new/issue-2315-id-quotes/2.test.out create mode 100644 pyk/regression-new/issue-2315-id-quotes/Makefile create mode 100644 pyk/regression-new/issue-2315-id-quotes/test.k create mode 100644 pyk/regression-new/issue-2321-kprovexCrash/Makefile create mode 100644 pyk/regression-new/issue-2321-kprovexCrash/test-spec.k create mode 100644 pyk/regression-new/issue-2321-kprovexCrash/test-spec.k.out create mode 100644 pyk/regression-new/issue-2321-kprovexCrash/test.k create mode 100644 pyk/regression-new/issue-2356-koreDecode/1.test create mode 100644 pyk/regression-new/issue-2356-koreDecode/1.test.out create mode 100644 pyk/regression-new/issue-2356-koreDecode/Makefile create mode 100644 pyk/regression-new/issue-2356-koreDecode/result.kore.kast create mode 100644 pyk/regression-new/issue-2356-koreDecode/result.kore.kast.out create mode 100644 pyk/regression-new/issue-2356-koreDecode/result2.kore.kast create mode 100644 pyk/regression-new/issue-2356-koreDecode/test.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/Makefile create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/claims/Makefile create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k.out create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k.out create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/claims/test.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/exclude/Makefile create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k.out create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/exclude/test.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/trusted/Makefile create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k.out create mode 100644 pyk/regression-new/issue-2812-kprove-filter-claims/trusted/test.k create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/Makefile create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/check/Makefile create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k.out create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test.out create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/Makefile create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/test.k create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test.out create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/Makefile create mode 100644 pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/test.k create mode 100644 pyk/regression-new/issue-3035-antileft/Makefile create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/1.test create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/1.test.out create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/2.test create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/2.test.out create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/3.test create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/3.test.out create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/Makefile create mode 100644 pyk/regression-new/issue-3035-antileft/haskell/test.k create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/1.test create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/1.test.out create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/2.test create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/2.test.out create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/3.test create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/3.test.out create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/Makefile create mode 100644 pyk/regression-new/issue-3035-antileft/llvm/test.k create mode 100644 pyk/regression-new/issue-313/Makefile create mode 100644 pyk/regression-new/issue-313/test.k create mode 100644 pyk/regression-new/issue-313/test.k.out create mode 100644 pyk/regression-new/issue-3285-nonexistent-concrete-rule/Makefile create mode 100644 pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k create mode 100644 pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k.out create mode 100644 pyk/regression-new/issue-3385/Makefile create mode 100644 pyk/regression-new/issue-3385/test.k create mode 100644 pyk/regression-new/issue-3385/test.k.out create mode 100644 pyk/regression-new/issue-3446/Makefile create mode 100644 pyk/regression-new/issue-3446/a.kast create mode 100644 pyk/regression-new/issue-3446/a.kast.out create mode 100644 pyk/regression-new/issue-3446/test.k create mode 100644 pyk/regression-new/issue-3446/test.k.out create mode 100644 pyk/regression-new/issue-3450-kprove-fresh/Makefile create mode 100644 pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k create mode 100644 pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k.out create mode 100644 pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k create mode 100644 pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k.out create mode 100644 pyk/regression-new/issue-3450-kprove-fresh/test.k create mode 100644 pyk/regression-new/issue-3520-freshConfig/Makefile create mode 100644 pyk/regression-new/issue-3520-freshConfig/run.test create mode 100644 pyk/regression-new/issue-3520-freshConfig/run.test.out create mode 100644 pyk/regression-new/issue-3520-freshConfig/test.k create mode 100644 pyk/regression-new/issue-3604-counterCell/1.test create mode 100644 pyk/regression-new/issue-3604-counterCell/1.test.out create mode 100644 pyk/regression-new/issue-3604-counterCell/Makefile create mode 100644 pyk/regression-new/issue-3604-counterCell/test.k create mode 100644 pyk/regression-new/issue-3647-debugTokens/Makefile create mode 100644 pyk/regression-new/issue-3647-debugTokens/a.test.kast create mode 100644 pyk/regression-new/issue-3647-debugTokens/a.test.kast.out create mode 100644 pyk/regression-new/issue-3647-debugTokens/b.test.kast create mode 100644 pyk/regression-new/issue-3647-debugTokens/b.test.kast.out create mode 100644 pyk/regression-new/issue-3647-debugTokens/test.k create mode 100644 pyk/regression-new/issue-3672-debugParse/Makefile create mode 100644 pyk/regression-new/issue-3672-debugParse/a.test.kast create mode 100644 pyk/regression-new/issue-3672-debugParse/a.test.kast.out create mode 100644 pyk/regression-new/issue-3672-debugParse/b.test.kast create mode 100644 pyk/regression-new/issue-3672-debugParse/b.test.kast.out create mode 100644 pyk/regression-new/issue-3672-debugParse/test.k create mode 100644 pyk/regression-new/issue-3996-unary-symbol-list/Makefile create mode 100644 pyk/regression-new/issue-3996-unary-symbol-list/int-list.k create mode 100644 pyk/regression-new/issue-425/Makefile create mode 100644 pyk/regression-new/issue-425/test.k create mode 100644 pyk/regression-new/issue-567/Makefile create mode 100644 pyk/regression-new/issue-567/test.k create mode 100644 pyk/regression-new/issue-582/1.test create mode 100644 pyk/regression-new/issue-582/1.test.out create mode 100644 pyk/regression-new/issue-582/Makefile create mode 100755 pyk/regression-new/issue-582/test-parser create mode 100644 pyk/regression-new/issue-582/test.k create mode 100644 pyk/regression-new/issue-946/Makefile create mode 100644 pyk/regression-new/issue-946/output create mode 100644 pyk/regression-new/issue-946/test.k create mode 100644 pyk/regression-new/issue-999/Makefile create mode 100644 pyk/regression-new/issue-999/kat.k create mode 100644 pyk/regression-new/issue-999/kat.k.out create mode 100644 pyk/regression-new/ite-bug/Makefile create mode 100644 pyk/regression-new/ite-bug/failing-1-spec.k create mode 100644 pyk/regression-new/ite-bug/failing-1-spec.k.out create mode 100644 pyk/regression-new/ite-bug/failing-2-spec.k create mode 100644 pyk/regression-new/ite-bug/failing-2-spec.k.out create mode 100644 pyk/regression-new/ite-bug/ite-bug.k create mode 100644 pyk/regression-new/ite-bug/passing-spec.k create mode 100644 pyk/regression-new/ite-bug/passing-spec.k.out create mode 100644 pyk/regression-new/itp/Makefile create mode 100644 pyk/regression-new/itp/nat-assoc/Makefile create mode 100644 pyk/regression-new/itp/nat-assoc/assoc-spec.k create mode 100644 pyk/regression-new/itp/nat-assoc/assoc-spec.k.out create mode 100644 pyk/regression-new/itp/nat-assoc/nat.k create mode 100644 pyk/regression-new/itp/nth-ancestor/Makefile create mode 100644 pyk/regression-new/itp/nth-ancestor/chain.k create mode 100644 pyk/regression-new/itp/nth-ancestor/nth1-spec.k create mode 100644 pyk/regression-new/itp/nth-ancestor/nth1-spec.k.out create mode 100644 pyk/regression-new/itp/nth-ancestor/nth2-spec.k create mode 100644 pyk/regression-new/itp/nth-ancestor/nth2-spec.k.out create mode 100644 pyk/regression-new/itp/nth-ancestor/proof-script.k create mode 100644 pyk/regression-new/itp/nth-ancestor/verification.k create mode 100644 pyk/regression-new/json-input/Makefile create mode 100644 pyk/regression-new/json-input/json-in.k create mode 100644 pyk/regression-new/json-input/json-in1.json.kast create mode 100644 pyk/regression-new/json-input/json-in1.json.kast.out create mode 100644 pyk/regression-new/json-input/json-in2.json.kast create mode 100644 pyk/regression-new/json-input/json-in2.json.kast.out create mode 100644 pyk/regression-new/json-input/json-in3.json.kast create mode 100644 pyk/regression-new/json-input/json-in3.json.kast.out create mode 100644 pyk/regression-new/kast-bison-bytes/.gitignore create mode 100644 pyk/regression-new/kast-bison-bytes/1.kast-bison create mode 100644 pyk/regression-new/kast-bison-bytes/1.kast-bison.out create mode 100644 pyk/regression-new/kast-bison-bytes/Makefile create mode 100644 pyk/regression-new/kast-bison-bytes/kast-in.k create mode 100644 pyk/regression-new/kast-bison/.gitignore create mode 100644 pyk/regression-new/kast-bison/1.kast-bison create mode 100644 pyk/regression-new/kast-bison/1.kast-bison.out create mode 100644 pyk/regression-new/kast-bison/Makefile create mode 100644 pyk/regression-new/kast-bison/kast-in.k create mode 100644 pyk/regression-new/kast-default-output/Makefile create mode 100644 pyk/regression-new/kast-default-output/kast-out.k create mode 100644 pyk/regression-new/kast-default-output/kast-out1.kast create mode 100644 pyk/regression-new/kast-default-output/kast-out1.kast.out create mode 100644 pyk/regression-new/kast-default-output/kast-out2.kast create mode 100644 pyk/regression-new/kast-default-output/kast-out2.kast.out create mode 100644 pyk/regression-new/kast-input/Makefile create mode 100644 pyk/regression-new/kast-input/kast-in.k create mode 100644 pyk/regression-new/kast-input/kast-in1.kast create mode 100644 pyk/regression-new/kast-input/kast-in1.kast.out create mode 100644 pyk/regression-new/kast-input/kast-in2.kast create mode 100644 pyk/regression-new/kast-input/kast-in2.kast.out create mode 100644 pyk/regression-new/kast-kore-input/Makefile create mode 100644 pyk/regression-new/kast-kore-input/kast-in.k create mode 100644 pyk/regression-new/kast-kore-input/kast-in1.kast create mode 100644 pyk/regression-new/kast-kore-input/kast-in1.kast.out create mode 100644 pyk/regression-new/kast-kore-input/kast-in2.kast create mode 100644 pyk/regression-new/kast-kore-input/kast-in2.kast.out create mode 100644 pyk/regression-new/kast-kore-input/kast-in3.kast create mode 100644 pyk/regression-new/kast-kore-input/kast-in3.kast.out create mode 100644 pyk/regression-new/kast-rule/Makefile create mode 100644 pyk/regression-new/kast-rule/kast-in.k create mode 100644 pyk/regression-new/kast-rule/kast-in1.kast create mode 100644 pyk/regression-new/kast-rule/kast-in1.kast.out create mode 100644 pyk/regression-new/kast-rule/kast-in2.kast create mode 100644 pyk/regression-new/kast-rule/kast-in2.kast.out create mode 100644 pyk/regression-new/kast-rule/kast-in3.kast create mode 100644 pyk/regression-new/kast-rule/kast-in3.kast.out create mode 100644 pyk/regression-new/kast-rule/kast-in4.kast create mode 100644 pyk/regression-new/kast-rule/kast-in4.kast.out create mode 100644 pyk/regression-new/kast-rule/kast-in5.kast create mode 100644 pyk/regression-new/kast-rule/kast-in5.kast.out create mode 100644 pyk/regression-new/kdep-options/Makefile create mode 100644 pyk/regression-new/kdep-options/remake-depend/Makefile create mode 100644 pyk/regression-new/kdep-options/remake-depend/a.k create mode 100644 pyk/regression-new/kdep-options/remake-depend/a.k.out create mode 100644 pyk/regression-new/kdep-options/remake-depend/b.k create mode 100644 pyk/regression-new/kdep-options/remake-depend/b.k.out create mode 100644 pyk/regression-new/kdep-options/simple/IncludeDirTest/d.k create mode 100644 pyk/regression-new/kdep-options/simple/Makefile create mode 100644 pyk/regression-new/kdep-options/simple/a.k create mode 100644 pyk/regression-new/kdep-options/simple/a.k.out create mode 100644 pyk/regression-new/kdep-options/simple/b.k create mode 100644 pyk/regression-new/kdep-options/simple/b.k.out create mode 100644 pyk/regression-new/kdep-options/simple/c.k create mode 100644 pyk/regression-new/kdep-options/simple/c.k.out create mode 100644 pyk/regression-new/kdep-options/simple/outDirTest.k create mode 100644 pyk/regression-new/kdep-options/simple/outDirTest.k.out create mode 100644 pyk/regression-new/kompiled-directory/Makefile create mode 100644 pyk/regression-new/kompiled-directory/default/1.test create mode 100644 pyk/regression-new/kompiled-directory/default/1.test.in create mode 100644 pyk/regression-new/kompiled-directory/default/1.test.out create mode 100644 pyk/regression-new/kompiled-directory/default/Makefile create mode 100644 pyk/regression-new/kompiled-directory/default/test.k create mode 100644 pyk/regression-new/kompiled-directory/nested/1.test create mode 100644 pyk/regression-new/kompiled-directory/nested/1.test.in create mode 100644 pyk/regression-new/kompiled-directory/nested/1.test.out create mode 100644 pyk/regression-new/kompiled-directory/nested/Makefile create mode 100644 pyk/regression-new/kompiled-directory/nested/test.k create mode 100644 pyk/regression-new/kompiled-directory/some/nested/path/.empty create mode 100644 pyk/regression-new/kore-brackets/Makefile create mode 100644 pyk/regression-new/kore-brackets/korebrkt.k create mode 100644 pyk/regression-new/kore-issue-2253/Makefile create mode 100644 pyk/regression-new/kore-issue-2253/arr.k create mode 100644 pyk/regression-new/kore-issue-2253/make.arr create mode 100644 pyk/regression-new/kore-issue-2253/make.arr.out create mode 100644 pyk/regression-new/kore-issue-2253/updateAll.arr create mode 100644 pyk/regression-new/kore-issue-2253/updateAll.arr.out create mode 100644 pyk/regression-new/kprove-append/Makefile create mode 100644 pyk/regression-new/kprove-append/def-spec.k create mode 100644 pyk/regression-new/kprove-append/def-spec.k.out create mode 100644 pyk/regression-new/kprove-append/def.k create mode 100644 pyk/regression-new/kprove-branchingAllowed/Makefile create mode 100644 pyk/regression-new/kprove-branchingAllowed/def-spec.k create mode 100644 pyk/regression-new/kprove-branchingAllowed/def-spec.k.out create mode 100644 pyk/regression-new/kprove-branchingAllowed/def.k create mode 100644 pyk/regression-new/kprove-error-status/Makefile create mode 100644 pyk/regression-new/kprove-error-status/crash-spec.k create mode 100644 pyk/regression-new/kprove-error-status/crash-spec.k.out create mode 100644 pyk/regression-new/kprove-error-status/stuck-claim-spec.k create mode 100644 pyk/regression-new/kprove-error-status/stuck-claim-spec.k.out create mode 100644 pyk/regression-new/kprove-error-status/verif.k create mode 100644 pyk/regression-new/kprove-error-status/verif.k.out create mode 100644 pyk/regression-new/kprove-haskell/sum-spec.k create mode 100644 pyk/regression-new/kprove-haskell/sum-spec.k.out create mode 100644 pyk/regression-new/kprove-java/Makefile create mode 100644 pyk/regression-new/kprove-java/demo.k create mode 100644 pyk/regression-new/kprove-java/rhs-vars-broken-spec.k create mode 100644 pyk/regression-new/kprove-java/rhs-vars-broken-spec.k.out create mode 100644 pyk/regression-new/kprove-macro-exp-productions/Makefile create mode 100644 pyk/regression-new/kprove-macro-exp-productions/main.k create mode 100644 pyk/regression-new/kprove-macro-exp-productions/test-spec.k create mode 100644 pyk/regression-new/kprove-macro-exp-productions/test-spec.k.out create mode 100644 pyk/regression-new/kprove-macro-exp/Makefile create mode 100644 pyk/regression-new/kprove-macro-exp/main.k create mode 100644 pyk/regression-new/kprove-macro-exp/test-spec.k create mode 100644 pyk/regression-new/kprove-macro-exp/test-spec.k.out create mode 100644 pyk/regression-new/kprove-markdown/Makefile create mode 100644 pyk/regression-new/kprove-markdown/set-balance-spec.md create mode 100644 pyk/regression-new/kprove-markdown/set-balance-spec.md.out create mode 100644 pyk/regression-new/kprove-markdown/set-balance.md create mode 100644 pyk/regression-new/kprove-markdown/verification.k create mode 100644 pyk/regression-new/kprove-smt-lemma/Makefile create mode 100644 pyk/regression-new/kprove-smt-lemma/haskell/Makefile create mode 120000 pyk/regression-new/kprove-smt-lemma/haskell/verif.k create mode 100644 pyk/regression-new/kprove-smt-lemma/tests/test-spec.k create mode 100644 pyk/regression-new/kprove-smt-lemma/tests/test-spec.k.out create mode 100644 pyk/regression-new/kprove-smt-lemma/verif.k create mode 100644 pyk/regression-new/kprove-var-equals/Makefile create mode 100644 pyk/regression-new/kprove-var-equals/var-eq-spec.k create mode 100644 pyk/regression-new/kprove-var-equals/var-eq-spec.k.out create mode 100644 pyk/regression-new/kprove-var-equals/var-eq.k create mode 100644 pyk/regression-new/krun-deserialize/Makefile create mode 100644 pyk/regression-new/krun-deserialize/imp.k create mode 100644 pyk/regression-new/krun-deserialize/sum.kore.imp create mode 100644 pyk/regression-new/krun-deserialize/sum.kore.imp.out create mode 100644 pyk/regression-new/let-priority/1.test create mode 100644 pyk/regression-new/let-priority/1.test.out create mode 100644 pyk/regression-new/let-priority/2.test create mode 100644 pyk/regression-new/let-priority/2.test.out create mode 100644 pyk/regression-new/let-priority/3.test create mode 100644 pyk/regression-new/let-priority/3.test.out create mode 100644 pyk/regression-new/let-priority/4.test create mode 100644 pyk/regression-new/let-priority/4.test.out create mode 100644 pyk/regression-new/let-priority/5.test create mode 100644 pyk/regression-new/let-priority/5.test.out create mode 100644 pyk/regression-new/let-priority/6.test create mode 100644 pyk/regression-new/let-priority/6.test.out create mode 100644 pyk/regression-new/let-priority/Makefile create mode 100644 pyk/regression-new/let-priority/test.k create mode 100644 pyk/regression-new/let-test/1.test create mode 100644 pyk/regression-new/let-test/1.test.out create mode 100644 pyk/regression-new/let-test/Makefile create mode 100644 pyk/regression-new/let-test/test.k create mode 100644 pyk/regression-new/list-in-bug/Makefile create mode 100644 pyk/regression-new/list-in-bug/list-in.k create mode 100644 pyk/regression-new/list-in-bug/test1.listin create mode 100644 pyk/regression-new/list-in-bug/test1.listin.out create mode 100644 pyk/regression-new/list-in-bug/test2.listin create mode 100644 pyk/regression-new/list-in-bug/test2.listin.out create mode 100644 pyk/regression-new/list-in-bug/test3.listin create mode 100644 pyk/regression-new/list-in-bug/test3.listin.out create mode 100644 pyk/regression-new/list-in-bug/test4.listin create mode 100644 pyk/regression-new/list-in-bug/test4.listin.out create mode 100644 pyk/regression-new/llvm-kompile-type/Makefile create mode 100644 pyk/regression-new/llvm-krun/Makefile create mode 100644 pyk/regression-new/llvm-krun/test.in create mode 100644 pyk/regression-new/llvm-krun/test.k create mode 100644 pyk/regression-new/llvm-krun/test.out create mode 100644 pyk/regression-new/llvm-string2base/1.inttest create mode 100644 pyk/regression-new/llvm-string2base/1.inttest.out create mode 100644 pyk/regression-new/llvm-string2base/Makefile create mode 100644 pyk/regression-new/llvm-string2base/int-parse.k create mode 100644 pyk/regression-new/locations/1.test create mode 100644 pyk/regression-new/locations/1.test.out create mode 100644 pyk/regression-new/locations/Makefile create mode 100644 pyk/regression-new/locations/test.k create mode 100644 pyk/regression-new/locations2/1.test create mode 100644 pyk/regression-new/locations2/1.test.out create mode 100644 pyk/regression-new/locations2/Makefile create mode 100644 pyk/regression-new/locations2/test.k create mode 100644 pyk/regression-new/locations3/1.test create mode 100644 pyk/regression-new/locations3/1.test.out create mode 100644 pyk/regression-new/locations3/Makefile create mode 100644 pyk/regression-new/locations3/test.k create mode 100644 pyk/regression-new/lub/Makefile create mode 100644 pyk/regression-new/lub/test.k create mode 100644 pyk/regression-new/lub2/Makefile create mode 100644 pyk/regression-new/lub2/test.k create mode 100644 pyk/regression-new/macro_vars-productions/Makefile create mode 100644 pyk/regression-new/macro_vars-productions/macro-vars.k create mode 100644 pyk/regression-new/macro_vars/Makefile create mode 100644 pyk/regression-new/macro_vars/macro-vars.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/Makefile create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k.out create mode 100755 pyk/regression-new/map-symbolic-tests-haskell/gen-tests.sh create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/map-tests.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k.out create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k create mode 100644 pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k.out create mode 100644 pyk/regression-new/markdownSelectors/1.test create mode 100644 pyk/regression-new/markdownSelectors/1.test.out create mode 100644 pyk/regression-new/markdownSelectors/Makefile create mode 100644 pyk/regression-new/markdownSelectors/a-spec.md create mode 100644 pyk/regression-new/markdownSelectors/a-spec.md.out create mode 100644 pyk/regression-new/markdownSelectors/test.md create mode 100644 pyk/regression-new/minimization-issue/Makefile create mode 100644 pyk/regression-new/minimization-issue/test.k create mode 100644 pyk/regression-new/mint-llvm/1.test create mode 100644 pyk/regression-new/mint-llvm/1.test.out create mode 100644 pyk/regression-new/mint-llvm/10.test create mode 100644 pyk/regression-new/mint-llvm/10.test.out create mode 100644 pyk/regression-new/mint-llvm/11.test create mode 100644 pyk/regression-new/mint-llvm/11.test.out create mode 100644 pyk/regression-new/mint-llvm/12.test create mode 100644 pyk/regression-new/mint-llvm/12.test.out create mode 100644 pyk/regression-new/mint-llvm/13.test create mode 100644 pyk/regression-new/mint-llvm/13.test.out create mode 100644 pyk/regression-new/mint-llvm/14.test create mode 100644 pyk/regression-new/mint-llvm/14.test.out create mode 100644 pyk/regression-new/mint-llvm/15.test create mode 100644 pyk/regression-new/mint-llvm/15.test.out create mode 100644 pyk/regression-new/mint-llvm/16.test create mode 100644 pyk/regression-new/mint-llvm/16.test.out create mode 100644 pyk/regression-new/mint-llvm/17.test create mode 100644 pyk/regression-new/mint-llvm/17.test.out create mode 100644 pyk/regression-new/mint-llvm/18.test create mode 100644 pyk/regression-new/mint-llvm/18.test.out create mode 100644 pyk/regression-new/mint-llvm/2.test create mode 100644 pyk/regression-new/mint-llvm/2.test.out create mode 100644 pyk/regression-new/mint-llvm/3.test create mode 100644 pyk/regression-new/mint-llvm/3.test.out create mode 100644 pyk/regression-new/mint-llvm/4.test create mode 100644 pyk/regression-new/mint-llvm/4.test.out create mode 100644 pyk/regression-new/mint-llvm/5.test create mode 100644 pyk/regression-new/mint-llvm/5.test.out create mode 100644 pyk/regression-new/mint-llvm/6.test create mode 100644 pyk/regression-new/mint-llvm/6.test.out create mode 100644 pyk/regression-new/mint-llvm/7.test create mode 100644 pyk/regression-new/mint-llvm/7.test.out create mode 100644 pyk/regression-new/mint-llvm/8.test create mode 100644 pyk/regression-new/mint-llvm/8.test.out create mode 100644 pyk/regression-new/mint-llvm/9.test create mode 100644 pyk/regression-new/mint-llvm/9.test.out create mode 100644 pyk/regression-new/mint-llvm/Makefile create mode 100644 pyk/regression-new/mint-llvm/test.k create mode 100644 pyk/regression-new/mutable-bytes/Makefile create mode 100644 pyk/regression-new/mutable-bytes/default/Makefile create mode 100644 pyk/regression-new/mutable-bytes/default/a.test create mode 100644 pyk/regression-new/mutable-bytes/default/a.test.out create mode 100644 pyk/regression-new/mutable-bytes/default/test.k create mode 100644 pyk/regression-new/mutable-bytes/mutable/Makefile create mode 100644 pyk/regression-new/mutable-bytes/mutable/a.test create mode 100644 pyk/regression-new/mutable-bytes/mutable/a.test.out create mode 100644 pyk/regression-new/mutable-bytes/mutable/test.k create mode 100644 pyk/regression-new/no-dup-rules/Makefile create mode 100644 pyk/regression-new/no-dup-rules/no-dup-rules.k create mode 100644 pyk/regression-new/no-dup-rules/test.ndr create mode 100644 pyk/regression-new/no-dup-rules/test.ndr.out create mode 100644 pyk/regression-new/no-pattern/1.test create mode 100644 pyk/regression-new/no-pattern/1.test.out create mode 100644 pyk/regression-new/no-pattern/Makefile create mode 100644 pyk/regression-new/no-pattern/test.k create mode 100644 pyk/regression-new/nomain/Makefile create mode 100644 pyk/regression-new/nomain/test.k create mode 100644 pyk/regression-new/non-executable/Makefile create mode 100644 pyk/regression-new/non-executable/haskell/1.test create mode 100644 pyk/regression-new/non-executable/haskell/1.test.out create mode 100644 pyk/regression-new/non-executable/haskell/2.test create mode 100644 pyk/regression-new/non-executable/haskell/2.test.out create mode 100644 pyk/regression-new/non-executable/haskell/3.test create mode 100644 pyk/regression-new/non-executable/haskell/3.test.out create mode 100644 pyk/regression-new/non-executable/haskell/Makefile create mode 100644 pyk/regression-new/non-executable/haskell/test.k create mode 100644 pyk/regression-new/non-executable/llvm/1.test create mode 100644 pyk/regression-new/non-executable/llvm/1.test.out create mode 100644 pyk/regression-new/non-executable/llvm/2.test create mode 100644 pyk/regression-new/non-executable/llvm/2.test.out create mode 100644 pyk/regression-new/non-executable/llvm/3.test create mode 100644 pyk/regression-new/non-executable/llvm/3.test.out create mode 100644 pyk/regression-new/non-executable/llvm/Makefile create mode 100644 pyk/regression-new/non-executable/llvm/test.k create mode 100644 pyk/regression-new/non-executable/rewrite-check/Makefile create mode 100644 pyk/regression-new/non-executable/rewrite-check/test.k create mode 100644 pyk/regression-new/non-executable/rewrite-check/test.k.out create mode 100644 pyk/regression-new/nonexhaustive/Makefile create mode 100644 pyk/regression-new/nonexhaustive/test.k create mode 100644 pyk/regression-new/nonexhaustive/test.k.out create mode 100644 pyk/regression-new/or-haskell/Makefile create mode 120000 pyk/regression-new/or-haskell/test.k create mode 100644 pyk/regression-new/or-llvm/1.test create mode 100644 pyk/regression-new/or-llvm/1.test.out create mode 100644 pyk/regression-new/or-llvm/10.test create mode 100644 pyk/regression-new/or-llvm/10.test.out create mode 100644 pyk/regression-new/or-llvm/11.test create mode 100644 pyk/regression-new/or-llvm/11.test.out create mode 100644 pyk/regression-new/or-llvm/2.test create mode 100644 pyk/regression-new/or-llvm/2.test.out create mode 100644 pyk/regression-new/or-llvm/3.test create mode 100644 pyk/regression-new/or-llvm/3.test.out create mode 100644 pyk/regression-new/or-llvm/4.test create mode 100644 pyk/regression-new/or-llvm/4.test.out create mode 100644 pyk/regression-new/or-llvm/5.test create mode 100644 pyk/regression-new/or-llvm/5.test.out create mode 100644 pyk/regression-new/or-llvm/6.test create mode 100644 pyk/regression-new/or-llvm/6.test.out create mode 100644 pyk/regression-new/or-llvm/7.test create mode 100644 pyk/regression-new/or-llvm/7.test.out create mode 100644 pyk/regression-new/or-llvm/8.test create mode 100644 pyk/regression-new/or-llvm/8.test.out create mode 100644 pyk/regression-new/or-llvm/9.test create mode 100644 pyk/regression-new/or-llvm/9.test.out create mode 100644 pyk/regression-new/or-llvm/Makefile create mode 100644 pyk/regression-new/or-llvm/test.k create mode 100644 pyk/regression-new/overload/Makefile create mode 100644 pyk/regression-new/overload/exp.test create mode 100644 pyk/regression-new/overload/exp.test.out create mode 100644 pyk/regression-new/overload/lval.test create mode 100644 pyk/regression-new/overload/lval.test.out create mode 100644 pyk/regression-new/overload/test.k create mode 100644 pyk/regression-new/owise-haskell/Makefile create mode 100644 pyk/regression-new/owise-haskell/demo.k create mode 100644 pyk/regression-new/owise-haskell/tests/1.demo create mode 100644 pyk/regression-new/owise-haskell/tests/1.demo.out create mode 100644 pyk/regression-new/owise-haskell/tests/2.demo create mode 100644 pyk/regression-new/owise-haskell/tests/2.demo.out create mode 100644 pyk/regression-new/owise-haskell/tests/3.demo create mode 100644 pyk/regression-new/owise-haskell/tests/3.demo.out create mode 100644 pyk/regression-new/owise-haskell/tests/4.demo create mode 100644 pyk/regression-new/owise-haskell/tests/4.demo.out create mode 100644 pyk/regression-new/parse-c/Makefile create mode 100644 pyk/regression-new/parse-c/c18-syntax.k create mode 100644 pyk/regression-new/parse-c/c18-translation.k create mode 100755 pyk/regression-new/parse-c/cparse create mode 100644 pyk/regression-new/parse-c/test.c create mode 100644 pyk/regression-new/parse-c/test.ref create mode 100755 pyk/regression-new/parseNonPgm/1.test create mode 100644 pyk/regression-new/parseNonPgm/1.test.out create mode 100644 pyk/regression-new/parseNonPgm/Makefile create mode 100755 pyk/regression-new/parseNonPgm/test create mode 100644 pyk/regression-new/parseNonPgm/test.k create mode 100644 pyk/regression-new/pattern-macro-productions/1.test create mode 100644 pyk/regression-new/pattern-macro-productions/1.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/2.test create mode 100644 pyk/regression-new/pattern-macro-productions/2.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/3.test create mode 100644 pyk/regression-new/pattern-macro-productions/3.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/4.test create mode 100644 pyk/regression-new/pattern-macro-productions/4.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/5.test create mode 100644 pyk/regression-new/pattern-macro-productions/5.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/6.test create mode 100644 pyk/regression-new/pattern-macro-productions/6.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/7.test create mode 100644 pyk/regression-new/pattern-macro-productions/7.test.out create mode 100644 pyk/regression-new/pattern-macro-productions/Makefile create mode 100644 pyk/regression-new/pattern-macro-productions/test.k create mode 100644 pyk/regression-new/pattern-macro/1.test create mode 100644 pyk/regression-new/pattern-macro/1.test.out create mode 100644 pyk/regression-new/pattern-macro/2.test create mode 100644 pyk/regression-new/pattern-macro/2.test.out create mode 100644 pyk/regression-new/pattern-macro/3.test create mode 100644 pyk/regression-new/pattern-macro/3.test.out create mode 100644 pyk/regression-new/pattern-macro/4.test create mode 100644 pyk/regression-new/pattern-macro/4.test.out create mode 100644 pyk/regression-new/pattern-macro/5.test create mode 100644 pyk/regression-new/pattern-macro/5.test.out create mode 100644 pyk/regression-new/pattern-macro/6.test create mode 100644 pyk/regression-new/pattern-macro/6.test.out create mode 100644 pyk/regression-new/pattern-macro/7.test create mode 100644 pyk/regression-new/pattern-macro/7.test.out create mode 100644 pyk/regression-new/pattern-macro/Makefile create mode 100644 pyk/regression-new/pattern-macro/test.k create mode 100644 pyk/regression-new/pedanticAttributes/Makefile create mode 100644 pyk/regression-new/pedanticAttributes/test.k create mode 100644 pyk/regression-new/pedanticAttributes/test.k.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/lambda.k create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic-div-zero.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/imp.k create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.det create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.nondet create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/lambda.k create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic-div-zero.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.concrete create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.proof create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/imp.k create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.in create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.in create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.in create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp create mode 100644 pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/Makefile create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/lambda.k create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda create mode 100644 pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda.out create mode 100644 pyk/regression-new/pl-tutorial/1_k/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/simple-untyped.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/nonterminating/dekker.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/simple-typed-static.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/collatz.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/dekker.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/div-nondet.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_01.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_02.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_03.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_04.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_05.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_06.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_07.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_08.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_09.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_10.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_11.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_12.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_13.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_14.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_15.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_16.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/factorial.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/higher-order.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/matrix.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/sortings.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_01.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_02.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_03.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_04.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_05.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_06.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_07.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_08.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_09.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_10.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_11.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_12.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/simple-typed-dynamic.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/div-nondet.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_01.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_02.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_03.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_04.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_05.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_06.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_07.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_08.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_09.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_10.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_11.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_12.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_13.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_14.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_15.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_16.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/higher-order.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_01.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_02.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_03.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_04.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_05.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_08.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_09.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_10.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_11.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_12.simple.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/collatz.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/dekker.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/div-nondet.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/factorial.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/higher-order.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/matrix.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/sortings.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_01.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_02.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_03.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_04.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_05.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_06.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_07.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_08.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_09.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_10.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_11.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_12.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_13.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_14.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_15.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_16.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_01.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_02.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_03.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_04.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_05.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_06.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_07.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_08.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_09.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_10.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_11.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_12.simple create mode 100644 pyk/regression-new/pl-tutorial/2_languages/1_simple/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/kool-untyped.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/failing/cycle.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/matrix.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/matrix.kool.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/matrix.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/method-sharing.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/method-sharing.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/new-in-field.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/new-in-field.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/new.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/new.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/odd-even.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/odd-even.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/point.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/point.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/return-object.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/return-object.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/sorting.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/sorting.kool.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/sorting.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/super-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/super-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/super-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/super-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/super-3.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/super-3.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/this-explicit.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/this-explicit.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/this-implicit.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/this-implicit.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/threads.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/threads.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/tree-sum.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/tree-sum.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/kool-typed-dynamic.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/constructor.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-3.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/factorial.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/function-types.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/hello-world.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/instanceOf.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/method-sharing.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/new.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/odd-even.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/point.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/return-object.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.in create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-3.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-explicit.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-implicit.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/threads.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/tree-sum.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/kool-typed-static.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/collatz.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/constructor.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cycle.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-3.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/factorial.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/function-types.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/hello-world.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/instanceOf.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/matrix.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/method-sharing.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/new.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/odd-even.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/point.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/return-object.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/sorting.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-1.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-2.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-3.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-explicit.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-implicit.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/threads.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/tree-sum.kool.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/collatz.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/constructor.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cycle.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-3.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/factorial.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/function-types.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/hello-world.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/instanceOf.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/matrix.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/method-sharing.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/new.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/odd-even.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/point.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/return-object.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/sorting.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/super-1.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/super-2.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/super-3.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/this-explicit.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/this-implicit.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/threads.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/tree-sum.kool create mode 100644 pyk/regression-new/pl-tutorial/2_languages/2_kool/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/fun-untyped.md create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/ackermann.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-3.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-4.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-5.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-inefficient-without.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-looping.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-bst-sorting.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-days.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-distributivity.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-toString.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-list-length.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-tree-mirror.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/exceptions.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial-and-list-max.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-3.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-4.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-length.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-max.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/nth.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/pattern.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-3.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-4.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-5.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-6.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-3.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-4.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-5.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/stuck-letrec.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tail-recursion.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-1.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-2.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-3.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-4.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-5.fun.out create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/Makefile create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/ackermann.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-3.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-4.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-5.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-inefficient-without.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-looping.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-bst-sorting.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-days.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-distributivity.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-toString.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-list-length.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-tree-mirror.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/exceptions.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial-and-list-max.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-3.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-4.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-length.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-max.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-nth.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/nth.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/pattern.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-3.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-4.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-5.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-6.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-3.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-4.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-5.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/stuck-letrec.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tail-recursion.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-1.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-2.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-3.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-4.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-5.fun create mode 100644 pyk/regression-new/pl-tutorial/2_languages/Makefile create mode 100644 pyk/regression-new/pl-tutorial/Makefile create mode 100644 pyk/regression-new/poly-kitem/Makefile create mode 100644 pyk/regression-new/poly-kitem/test.k create mode 100644 pyk/regression-new/poly-sort/1.test create mode 100644 pyk/regression-new/poly-sort/1.test.out create mode 100644 pyk/regression-new/poly-sort/Makefile create mode 100644 pyk/regression-new/poly-sort/test.k create mode 100644 pyk/regression-new/poly-unparsing/Makefile create mode 100644 pyk/regression-new/poly-unparsing/poly-unparsing.k create mode 100644 pyk/regression-new/poly-unparsing/test1.kore.kast create mode 100644 pyk/regression-new/poly-unparsing/test1.kore.kast.out create mode 100644 pyk/regression-new/prelude-warnings/Makefile create mode 100644 pyk/regression-new/prelude-warnings/test.k create mode 100644 pyk/regression-new/profile/Makefile create mode 100644 pyk/regression-new/profile/test-spec.k create mode 100644 pyk/regression-new/profile/test-spec.k.out create mode 100644 pyk/regression-new/profile/test.k create mode 100644 pyk/regression-new/proof-instrumentation/.gitignore create mode 100644 pyk/regression-new/proof-instrumentation/Makefile create mode 100644 pyk/regression-new/proof-instrumentation/test.in create mode 100644 pyk/regression-new/proof-instrumentation/test.k create mode 100644 pyk/regression-new/proof-tests/Makefile create mode 100644 pyk/regression-new/proof-tests/deposit/Makefile create mode 100644 pyk/regression-new/proof-tests/deposit/spec/Makefile create mode 100644 pyk/regression-new/proof-tests/deposit/spec/deposit-spec.k create mode 100644 pyk/regression-new/proof-tests/deposit/spec/deposit-spec.k.out create mode 100644 pyk/regression-new/proof-tests/deposit/spec/deposit-symbolic.k create mode 100644 pyk/regression-new/proof-tests/deposit/spec/imap.smt2 create mode 100644 pyk/regression-new/proof-tests/deposit/test/Makefile create mode 100644 pyk/regression-new/proof-tests/deposit/test/deposit.k create mode 100644 pyk/regression-new/proof-tests/deposit/test/imap.k create mode 100644 pyk/regression-new/proof-tests/deposit/test/test.deposit create mode 100644 pyk/regression-new/proof-tests/deposit/test/test.deposit.out create mode 100644 pyk/regression-new/quadratic-poly-unparsing/Makefile create mode 100644 pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search create mode 100644 pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search.out create mode 100644 pyk/regression-new/quadratic-poly-unparsing/nondet.k create mode 100644 pyk/regression-new/rand/1.rand create mode 100644 pyk/regression-new/rand/1.rand.out create mode 100644 pyk/regression-new/rand/Makefile create mode 100644 pyk/regression-new/rand/rand.k create mode 100644 pyk/regression-new/rangemap-tests-llvm/Makefile create mode 100644 pyk/regression-new/rangemap-tests-llvm/choice.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/choice.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-6.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/concat-6.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-6.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-6.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-7.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-7.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-8.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/difference-8.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/element.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/element.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/find-range-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/find-range-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/find-range-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/find-range-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-00.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-00.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-01.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-01.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-02.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-02.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-03.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-03.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-04.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-04.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-05.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-05.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-06.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-06.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-07.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-07.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-08.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-08.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-09.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-09.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-10.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-10.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-11.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-11.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-12.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-12.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-13.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-13.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-14.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-14.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-15.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/in-keys-15.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-5.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-5.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-6.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-6.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-7.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-7.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-8.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-8.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-9.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/inclusion-9.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-list-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-list-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-list-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-list-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-list-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/keys-list-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookup-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/rangemap-simple.k create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-5.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/remove-all-5.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/size-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/unit.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/unit.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-5.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-5.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-6.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-6.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-2.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-2.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-3.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-4.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-4.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-5.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/update-all-5.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/values-0.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/values-0.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/values-1.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/values-1.test.out create mode 100644 pyk/regression-new/rangemap-tests-llvm/values-3.test create mode 100644 pyk/regression-new/rangemap-tests-llvm/values-3.test.out create mode 100644 pyk/regression-new/rat/Makefile create mode 100644 pyk/regression-new/rat/a.k create mode 100644 pyk/regression-new/rat/defined/Makefile create mode 100644 pyk/regression-new/rat/defined/haskell/Makefile create mode 120000 pyk/regression-new/rat/defined/haskell/a.k create mode 100644 pyk/regression-new/rat/defined/llvm/Makefile create mode 120000 pyk/regression-new/rat/defined/llvm/a.k create mode 100644 pyk/regression-new/rat/defined/tests/1.a create mode 100644 pyk/regression-new/rat/defined/tests/1.a.out create mode 100644 pyk/regression-new/rat/defined/tests/2.a create mode 100644 pyk/regression-new/rat/defined/tests/2.a.out create mode 100644 pyk/regression-new/rat/defined/tests/3.a create mode 100644 pyk/regression-new/rat/defined/tests/3.a.out create mode 100644 pyk/regression-new/rat/defined/tests/4.a create mode 100644 pyk/regression-new/rat/defined/tests/4.a.out create mode 100644 pyk/regression-new/rat/defined/tests/5.a create mode 100644 pyk/regression-new/rat/defined/tests/5.a.out create mode 100644 pyk/regression-new/rat/defined/tests/7.a create mode 100644 pyk/regression-new/rat/defined/tests/7.a.out create mode 100644 pyk/regression-new/rat/defined/tests/8.a create mode 100644 pyk/regression-new/rat/defined/tests/8.a.out create mode 100644 pyk/regression-new/rat/undefined/Makefile create mode 100644 pyk/regression-new/rat/undefined/haskell/6-1.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/6-2.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/6-3.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/6-4.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/7-1.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/7-2.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/7-3.a.out create mode 100644 pyk/regression-new/rat/undefined/haskell/Makefile create mode 120000 pyk/regression-new/rat/undefined/haskell/a.k create mode 100644 pyk/regression-new/rat/undefined/tests/6-1.a create mode 100644 pyk/regression-new/rat/undefined/tests/6-2.a create mode 100644 pyk/regression-new/rat/undefined/tests/6-3.a create mode 100644 pyk/regression-new/rat/undefined/tests/6-4.a create mode 100644 pyk/regression-new/rat/undefined/tests/7-1.a create mode 100644 pyk/regression-new/rat/undefined/tests/7-2.a create mode 100644 pyk/regression-new/rat/undefined/tests/7-3.a create mode 100644 pyk/regression-new/record-llvm/1.test create mode 100644 pyk/regression-new/record-llvm/1.test.out create mode 100644 pyk/regression-new/record-llvm/2.test create mode 100644 pyk/regression-new/record-llvm/2.test.out create mode 100644 pyk/regression-new/record-llvm/3.test create mode 100644 pyk/regression-new/record-llvm/3.test.out create mode 100644 pyk/regression-new/record-llvm/4.test create mode 100644 pyk/regression-new/record-llvm/4.test.out create mode 100644 pyk/regression-new/record-llvm/Makefile create mode 100644 pyk/regression-new/record-llvm/test.k create mode 100644 pyk/regression-new/search-bound/1.test create mode 100644 pyk/regression-new/search-bound/1.test.out create mode 100644 pyk/regression-new/search-bound/2.test create mode 100644 pyk/regression-new/search-bound/2.test.out create mode 100644 pyk/regression-new/search-bound/3.test create mode 100644 pyk/regression-new/search-bound/3.test.out create mode 100644 pyk/regression-new/search-bound/Makefile create mode 100644 pyk/regression-new/search-bound/test.k create mode 100644 pyk/regression-new/seqstrict-predicate/1.test create mode 100644 pyk/regression-new/seqstrict-predicate/1.test.out create mode 100644 pyk/regression-new/seqstrict-predicate/Makefile create mode 100644 pyk/regression-new/seqstrict-predicate/test.k create mode 100644 pyk/regression-new/set-symbolic-tests/Makefile create mode 100644 pyk/regression-new/set-symbolic-tests/diff create mode 100644 pyk/regression-new/set-symbolic-tests/diff-1-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-1-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-10-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-10-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-11-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-11-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-17-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-17-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-19-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-19-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-2-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-2-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-21-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-21-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-22-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-22-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-23-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-23-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-3-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-3-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-31-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-31-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-4-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-4-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-5-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-5-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-ticket2700-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/diff-ticket2700-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/inset-10-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/inset-10-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k.out create mode 100755 pyk/regression-new/set-symbolic-tests/gen-tests.sh create mode 100644 pyk/regression-new/set-symbolic-tests/inset create mode 100644 pyk/regression-new/set-symbolic-tests/inset-1-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/inset-1-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/inset-11-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/inset-11-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/inset-2-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/inset-2-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/inset-3-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/inset-3-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/inset-4-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/inset-4-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-1-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-1-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-10-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-10-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-11-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-11-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-17-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-17-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-19-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-19-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-2-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-2-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-21-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-21-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-22-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-22-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-23-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-23-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-3-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-3-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-31-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-31-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-37-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-37-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-4-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-4-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-5-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/intersect-5-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/set-tests.k create mode 100644 pyk/regression-new/set-symbolic-tests/union create mode 100644 pyk/regression-new/set-symbolic-tests/union-1-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-1-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-10-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-10-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-11-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-11-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-17-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-17-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-19-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-19-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-2-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-2-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-21-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-21-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-22-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-22-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-23-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-23-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-3-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-3-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-31-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-31-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-32-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-32-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-34-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-34-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-37-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-37-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-38-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-38-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-39-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-39-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-4-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-4-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/union-5-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/union-5-spec.k.out create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-12-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-13-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-14-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-15-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-16-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-18-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-24-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-25-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-26-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-27-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-28-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-29-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-30-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-33-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-35-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-36-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-37-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-6-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-7-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-8-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/diff-9-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-12-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-13-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-5-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-6-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-7-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-8-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/inset-9-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-12-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-13-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-14-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-15-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-16-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-18-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-24-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-25-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-26-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-27-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-28-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-29-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-30-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-32-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-33-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-34-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-35-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-36-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-38-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-6-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-7-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-8-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/intersect-9-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-12-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-13-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-14-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-15-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-16-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-25-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-26-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-27-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-28-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-29-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-30-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-33-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-35-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-36-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-6-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-7-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-8-spec.k create mode 100644 pyk/regression-new/set-symbolic-tests/unsimplified/union-9-spec.k create mode 100644 pyk/regression-new/set_unification/Makefile create mode 100644 pyk/regression-new/set_unification/a-spec.k create mode 100644 pyk/regression-new/set_unification/a-spec.k.out create mode 100644 pyk/regression-new/set_unification/test.k create mode 100644 pyk/regression-new/simp-haskell/1.a create mode 100644 pyk/regression-new/simp-haskell/1.a.out create mode 100644 pyk/regression-new/simp-haskell/Makefile create mode 100644 pyk/regression-new/simp-haskell/a.k create mode 100644 pyk/regression-new/skipped create mode 100644 pyk/regression-new/spec-rule-application/Makefile create mode 100644 pyk/regression-new/spec-rule-application/def.k create mode 100644 pyk/regression-new/spec-rule-application/def01-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def01-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def02-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def02-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def031-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def031-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def032-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def032-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def033-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def033-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def11-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def11-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def12-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def12-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def13-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def13-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def14-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def14-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def15-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def15-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def21-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def21-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def22-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def22-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def23-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def23-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def24-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def24-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def25-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def25-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def41-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def41-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def42-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def42-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def44-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def44-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def45-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def45-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def61-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def61-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def62-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def62-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def71-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def71-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/def81-spec.k create mode 100644 pyk/regression-new/spec-rule-application/def81-spec.k.out create mode 100644 pyk/regression-new/spec-rule-application/fail/def32-spec.k create mode 100644 pyk/regression-new/spec-rule-application/fail/def33-spec.k create mode 100644 pyk/regression-new/spec-rule-application/fail/def34-spec.k create mode 100644 pyk/regression-new/spec-rule-application/fail/def35-spec.k create mode 100644 pyk/regression-new/spec-rule-application/test plan.txt create mode 100644 pyk/regression-new/star-multiplicity/1.test create mode 100644 pyk/regression-new/star-multiplicity/1.test.out create mode 100644 pyk/regression-new/star-multiplicity/Makefile create mode 100755 pyk/regression-new/star-multiplicity/test-parser create mode 100644 pyk/regression-new/star-multiplicity/test.k create mode 100644 pyk/regression-new/string_escape/1.a create mode 100644 pyk/regression-new/string_escape/1.a.out create mode 100644 pyk/regression-new/string_escape/Makefile create mode 100644 pyk/regression-new/string_escape/a.k create mode 100644 pyk/regression-new/stringbuffer-llvm/1.test.out create mode 100644 pyk/regression-new/stringbuffer-llvm/Makefile create mode 100644 pyk/regression-new/stringbuffer-llvm/test.k create mode 100644 pyk/regression-new/synonym/1.test create mode 100644 pyk/regression-new/synonym/1.test.out create mode 100644 pyk/regression-new/synonym/Makefile create mode 100644 pyk/regression-new/synonym/test.k create mode 100644 pyk/regression-new/trace/1.test create mode 100644 pyk/regression-new/trace/1.test.out create mode 100644 pyk/regression-new/trace/Makefile create mode 100644 pyk/regression-new/trace/test.k create mode 100644 pyk/regression-new/unification-lemmas/Makefile create mode 100644 pyk/regression-new/unification-lemmas/test-spec.k create mode 100644 pyk/regression-new/unification-lemmas/test-spec.k.out create mode 100644 pyk/regression-new/unification-lemmas/test.k create mode 100644 pyk/regression-new/unification-lemmas/test2-spec.k create mode 100644 pyk/regression-new/unification-lemmas/test2-spec.k.out create mode 100644 pyk/regression-new/unification-lemmas2/Makefile create mode 100644 pyk/regression-new/unification-lemmas2/owise-spec.k create mode 100644 pyk/regression-new/unification-lemmas2/owise-spec.k.out create mode 100644 pyk/regression-new/unification-lemmas2/with-config.k create mode 100644 pyk/regression-new/union/Makefile create mode 100644 pyk/regression-new/union/test1 create mode 100644 pyk/regression-new/union/test1.out create mode 100644 pyk/regression-new/union/test2 create mode 100644 pyk/regression-new/union/test2.out create mode 100644 pyk/regression-new/union/test3 create mode 100644 pyk/regression-new/union/test3.out create mode 100644 pyk/regression-new/union/test4 create mode 100644 pyk/regression-new/union/test4.out create mode 100644 pyk/regression-new/union/test5 create mode 100644 pyk/regression-new/union/test5.out create mode 100644 pyk/regression-new/union/test6 create mode 100644 pyk/regression-new/union/test6.out create mode 100644 pyk/regression-new/union/test7 create mode 100644 pyk/regression-new/union/test7.out create mode 100644 pyk/regression-new/union/test8 create mode 100644 pyk/regression-new/union/test8.out create mode 100644 pyk/regression-new/union/test9 create mode 100644 pyk/regression-new/union/test9.out create mode 100644 pyk/regression-new/union/union.k create mode 100644 pyk/regression-new/unparseKORE/1.test create mode 100644 pyk/regression-new/unparseKORE/1.test.out create mode 100644 pyk/regression-new/unparseKORE/Makefile create mode 100644 pyk/regression-new/unparseKORE/test.k create mode 100644 pyk/regression-new/useless/Makefile create mode 100644 pyk/regression-new/useless/test.k create mode 100644 pyk/regression-new/useless/test.k.out create mode 100644 pyk/regression-new/werrorCategory/Makefile create mode 100644 pyk/regression-new/werrorCategory/test.k create mode 100644 pyk/regression-new/withConfig-llvm/Makefile create mode 120000 pyk/regression-new/withConfig-llvm/test.k create mode 100644 pyk/regression-new/withConfig2/1.test create mode 100644 pyk/regression-new/withConfig2/1.test.out create mode 100644 pyk/regression-new/withConfig2/2.test create mode 100644 pyk/regression-new/withConfig2/2.test.out create mode 100644 pyk/regression-new/withConfig2/Makefile create mode 100644 pyk/regression-new/withConfig2/test.k diff --git a/pyk/docs/conf.py b/pyk/docs/conf.py index 54cfcaaefca..c3ea77661e6 100644 --- a/pyk/docs/conf.py +++ b/pyk/docs/conf.py @@ -9,8 +9,8 @@ project = 'pyk' author = 'Runtime Verification, Inc' copyright = '2024, Runtime Verification, Inc' -version = '0.1.705' -release = '0.1.705' +version = '0.1.706' +release = '0.1.706' # -- General configuration --------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration diff --git a/pyk/package/version b/pyk/package/version index acc12c75def..5941951189a 100644 --- a/pyk/package/version +++ b/pyk/package/version @@ -1 +1 @@ -0.1.705 +0.1.706 diff --git a/pyk/pyproject.toml b/pyk/pyproject.toml index a483375e7b8..6555210cffe 100644 --- a/pyk/pyproject.toml +++ b/pyk/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api" [tool.poetry] name = "pyk" -version = "0.1.705" +version = "0.1.706" description = "" authors = [ "Runtime Verification, Inc. ", diff --git a/pyk/regression-new/Makefile b/pyk/regression-new/Makefile index 8967e457844..9a9797014f1 100644 --- a/pyk/regression-new/Makefile +++ b/pyk/regression-new/Makefile @@ -1,2 +1,3 @@ -SUBDIRS=$(filter-out Makefile include, $(wildcard *)) +SKIPPED=$(shell cat skipped) +SUBDIRS=$(filter-out Makefile include $(SKIPPED), $(wildcard *)) include ./include/ktest-group.mak diff --git a/pyk/regression-new/amb-rew/Makefile b/pyk/regression-new/amb-rew/Makefile new file mode 100644 index 00000000000..035c11600d8 --- /dev/null +++ b/pyk/regression-new/amb-rew/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=-w2e + +include ../include/ktest.mak diff --git a/pyk/regression-new/amb-rew/test.k b/pyk/regression-new/amb-rew/test.k new file mode 100644 index 00000000000..5565378e3ba --- /dev/null +++ b/pyk/regression-new/amb-rew/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + imports MAP + imports ID + +syntax Type ::= "type" +syntax Foo ::= foo(Map) + +rule foo(1 |-> 0 => 1 |-> #fun(T::Type => T |-> T)(type)) + + +endmodule diff --git a/pyk/regression-new/append/1.test.kparse b/pyk/regression-new/append/1.test.kparse new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/append/1.test.kparse @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/append/1.test.kparse.out b/pyk/regression-new/append/1.test.kparse.out new file mode 100644 index 00000000000..8ade6ae5038 --- /dev/null +++ b/pyk/regression-new/append/1.test.kparse.out @@ -0,0 +1 @@ +\dv{SortInt{}}("1")\dv{SortInt{}}("1") \ No newline at end of file diff --git a/pyk/regression-new/append/Makefile b/pyk/regression-new/append/Makefile new file mode 100644 index 00000000000..12b2426661f --- /dev/null +++ b/pyk/regression-new/append/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak + +KPARSE=./kparse-twice diff --git a/pyk/regression-new/append/kparse-twice b/pyk/regression-new/append/kparse-twice new file mode 100755 index 00000000000..0c835c02377 --- /dev/null +++ b/pyk/regression-new/append/kparse-twice @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +"$(dirname "$0")/../../../bin/kparse" "$@" +"$(dirname "$0")/../../../bin/kparse" "$@" diff --git a/pyk/regression-new/append/test.k b/pyk/regression-new/append/test.k new file mode 100644 index 00000000000..71638b2fe4a --- /dev/null +++ b/pyk/regression-new/append/test.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEAL-SYNTAX + imports INT-SYNTAX +endmodule + +module TEST-SYNTAX + imports TEAL-SYNTAX +endmodule + +module TEST + imports TEAL-SYNTAX + + configuration + $PGM:Int +endmodule diff --git a/pyk/regression-new/array-haskell/1.test b/pyk/regression-new/array-haskell/1.test new file mode 100644 index 00000000000..6f042b962cf --- /dev/null +++ b/pyk/regression-new/array-haskell/1.test @@ -0,0 +1 @@ +makeArray(0, 0) [ 0 ] diff --git a/pyk/regression-new/array-haskell/1.test.out b/pyk/regression-new/array-haskell/1.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/array-haskell/1.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/array-haskell/2.test b/pyk/regression-new/array-haskell/2.test new file mode 100644 index 00000000000..61fab1fcbe1 --- /dev/null +++ b/pyk/regression-new/array-haskell/2.test @@ -0,0 +1 @@ +makeArray(0, 0) [ 1 ] diff --git a/pyk/regression-new/array-haskell/2.test.out b/pyk/regression-new/array-haskell/2.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/array-haskell/2.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/array-haskell/3.test b/pyk/regression-new/array-haskell/3.test new file mode 100644 index 00000000000..0eca93999c6 --- /dev/null +++ b/pyk/regression-new/array-haskell/3.test @@ -0,0 +1 @@ +makeArray(1, 0) [ 0 <- 1 ] [ 0 ] diff --git a/pyk/regression-new/array-haskell/3.test.out b/pyk/regression-new/array-haskell/3.test.out new file mode 100644 index 00000000000..36e7b68b492 --- /dev/null +++ b/pyk/regression-new/array-haskell/3.test.out @@ -0,0 +1,3 @@ + + 1 ~> .K + diff --git a/pyk/regression-new/array-haskell/4.test b/pyk/regression-new/array-haskell/4.test new file mode 100644 index 00000000000..9c81a11cdec --- /dev/null +++ b/pyk/regression-new/array-haskell/4.test @@ -0,0 +1 @@ +makeArray(1, 0) [ 0 <- 1] [ 1 ] diff --git a/pyk/regression-new/array-haskell/4.test.out b/pyk/regression-new/array-haskell/4.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/array-haskell/4.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/array-haskell/5.test b/pyk/regression-new/array-haskell/5.test new file mode 100644 index 00000000000..4ab1e9b4fc1 --- /dev/null +++ b/pyk/regression-new/array-haskell/5.test @@ -0,0 +1 @@ +makeArray(1, 0) [0 <- 1] [ -1 ] diff --git a/pyk/regression-new/array-haskell/5.test.out b/pyk/regression-new/array-haskell/5.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/array-haskell/5.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/array-haskell/Makefile b/pyk/regression-new/array-haskell/Makefile new file mode 100644 index 00000000000..9ca6dfc3a42 --- /dev/null +++ b/pyk/regression-new/array-haskell/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND?=haskell +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/array-haskell/test.k b/pyk/regression-new/array-haskell/test.k new file mode 100644 index 00000000000..1675ae49fe8 --- /dev/null +++ b/pyk/regression-new/array-haskell/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + imports ARRAY + +configuration $PGM:K + +endmodule diff --git a/pyk/regression-new/bad-bytes-literal/Makefile b/pyk/regression-new/bad-bytes-literal/Makefile new file mode 100644 index 00000000000..e4d1eb792b7 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/Makefile @@ -0,0 +1,3 @@ +KOMPILE_FLAGS=-w none + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/bad-bytes-literal/quote.k b/pyk/regression-new/bad-bytes-literal/quote.k new file mode 100644 index 00000000000..63cbfb20108 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/quote.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module QUOTE + imports BYTES + configuration $PGM:Bool + + rule b""" => b"" +endmodule diff --git a/pyk/regression-new/bad-bytes-literal/quote.k.out b/pyk/regression-new/bad-bytes-literal/quote.k.out new file mode 100644 index 00000000000..0044de48e6d --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/quote.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Scanner error: unexpected character sequence '"'. + Source(quote.k) + Location(6,24,6,25) + 6 | rule b""" => b"" + . ^ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/bad-bytes-literal/slash.k b/pyk/regression-new/bad-bytes-literal/slash.k new file mode 100644 index 00000000000..cbca29aa0e8 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/slash.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module SLASH + imports BYTES + configuration $PGM:Bool + + rule b"\" => b"" +endmodule diff --git a/pyk/regression-new/bad-bytes-literal/slash.k.out b/pyk/regression-new/bad-bytes-literal/slash.k.out new file mode 100644 index 00000000000..2c5747bded2 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/slash.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Scanner error: unexpected character sequence '"'. + Source(slash.k) + Location(6,24,6,25) + 6 | rule b"\" => b"" + . ^ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/bad-bytes-literal/unicode-escape.k b/pyk/regression-new/bad-bytes-literal/unicode-escape.k new file mode 100644 index 00000000000..da3e3197b79 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/unicode-escape.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module UNICODE-ESCAPE + imports BYTES + configuration $PGM:Bool + + rule b"\u0012" => b"" +endmodule diff --git a/pyk/regression-new/bad-bytes-literal/unicode-escape.k.out b/pyk/regression-new/bad-bytes-literal/unicode-escape.k.out new file mode 100644 index 00000000000..8799a829b16 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/unicode-escape.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Parse error: unexpected token '"\u0012"' following token 'b'. + Source(unicode-escape.k) + Location(6,15,6,23) + 6 | rule b"\u0012" => b"" + . ^~~~~~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/bad-bytes-literal/unicode.k b/pyk/regression-new/bad-bytes-literal/unicode.k new file mode 100644 index 00000000000..5044081254b --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/unicode.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module UNICODE + imports BYTES + configuration $PGM:Bool + + rule b"\x😃" => b"" +endmodule diff --git a/pyk/regression-new/bad-bytes-literal/unicode.k.out b/pyk/regression-new/bad-bytes-literal/unicode.k.out new file mode 100644 index 00000000000..d1bd5d8c844 --- /dev/null +++ b/pyk/regression-new/bad-bytes-literal/unicode.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Scanner error: unexpected character sequence '"'. + Source(unicode.k) + Location(6,15,6,16) + 6 | rule b"\x😃" => b"" + . ^ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/bad-flags/Makefile b/pyk/regression-new/bad-flags/Makefile new file mode 100644 index 00000000000..f5401bc2c67 --- /dev/null +++ b/pyk/regression-new/bad-flags/Makefile @@ -0,0 +1,16 @@ +DEF=test +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +CHECK=2>&1 | diff - +ALLOW_FAIL= + +.PHONY: all clean update-results +all: + $(KOMPILE) $(CHECK) no-flags.out $(ALLOW_FAIL) + $(KOMPILE) $(KOMPILE_FLAGS) --badflag --extra --backend $(KOMPILE_BACKEND) $(DEBUG) $(DEF).$(SOURCE_EXT) ---output-definition $(DEF)-kompiled $(CHECK) extra-flags.out $(ALLOW_FAIL) + +include ../include/ktest.mak + +update-results: CHECK=2> +update-results: ALLOW_FAIL=; true diff --git a/pyk/regression-new/bad-flags/extra-flags.out b/pyk/regression-new/bad-flags/extra-flags.out new file mode 100644 index 00000000000..ab1ab0e2865 --- /dev/null +++ b/pyk/regression-new/bad-flags/extra-flags.out @@ -0,0 +1 @@ +[Error] Critical: Only one main parameter allowed but found several: "--badflag" and "--extra" diff --git a/pyk/regression-new/bad-flags/no-flags.out b/pyk/regression-new/bad-flags/no-flags.out new file mode 100644 index 00000000000..56ac5fd7f1e --- /dev/null +++ b/pyk/regression-new/bad-flags/no-flags.out @@ -0,0 +1,2 @@ +[Error] Critical: You have to provide exactly one main file in order to do +outer parsing. diff --git a/pyk/regression-new/bad-flags/test.k b/pyk/regression-new/bad-flags/test.k new file mode 100644 index 00000000000..dd942ab8904 --- /dev/null +++ b/pyk/regression-new/bad-flags/test.k @@ -0,0 +1,3 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST +endmodule diff --git a/pyk/regression-new/bison-glr-bug/Makefile b/pyk/regression-new/bison-glr-bug/Makefile new file mode 100644 index 00000000000..80142689fce --- /dev/null +++ b/pyk/regression-new/bison-glr-bug/Makefile @@ -0,0 +1,17 @@ +DEF=iele +EXT= +TESTDIR=. +KOMPILE_FLAGS+=--gen-glr-bison-parser + +test: test.kore + cat test.kore | diff - test.ref + +test.kore: forwarder.iele kompile + ./iele-kompiled/parser_PGM forwarder.iele > test.kore +include ../include/ktest.mak + +clean: + rm -rf test.kore $(KOMPILED_DIR) .depend-tmp .depend .kompile-* .krun-* .kprove-* kore-exec.tar.gz + + +KRUN_OR_KX=./parse diff --git a/pyk/regression-new/bison-glr-bug/forwarder.iele b/pyk/regression-new/bison-glr-bug/forwarder.iele new file mode 100644 index 00000000000..6472154d438 --- /dev/null +++ b/pyk/regression-new/bison-glr-bug/forwarder.iele @@ -0,0 +1,34 @@ +// Copyright (c) 2017 Runtime Verification, Inc. All Rights Reserved. +// +// This contract implements a forwarder that forwards any funds sent to +// the account it is deployed with to the account that created it. +contract Forwarder { + + // initializes a forwarder by storing in the account storage the account + // number of the creator, this is the account to which received funds should + // be forwarded + define @init() { + %parent = call @iele.caller() + %zero = 0 + sstore %parent, %zero + } + + // deposit forwards the recieved funds to the creator of this account + define public @deposit() { + // get the received funds + %value = call @iele.callvalue() + + // get the creator account, where we should forward funds, from the storage + %zero = 0 + %sender = sload %zero + + // forward funds by calling deposit at the creator account + %gas = call @iele.gas() + %status = call @deposit at %sender () send %value , gaslimit %gas + br %status, throw // contract call failed + ret void + + throw: + call @iele.invalid() + } +} diff --git a/pyk/regression-new/bison-glr-bug/iele.k b/pyk/regression-new/bison-glr-bug/iele.k new file mode 100644 index 00000000000..e67c1ca14a1 --- /dev/null +++ b/pyk/regression-new/bison-glr-bug/iele.k @@ -0,0 +1,339 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module IELE-SYNTAX + imports IELE-COMMON + syntax IeleNameToken ::= + r"(? .LValues = call NAME ( ARGS ) + rule ret void => ret .NonEmptyOperands +endmodule + +module IELE + imports IELE-COMMON + imports BOOL +endmodule diff --git a/pyk/regression-new/bison-glr-bug/parse b/pyk/regression-new/bison-glr-bug/parse new file mode 100755 index 00000000000..2e03539f6be --- /dev/null +++ b/pyk/regression-new/bison-glr-bug/parse @@ -0,0 +1,5 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../../bin +pgm=$1 +shift +llvm-krun -c PGM "$pgm" Contract prettyfile -p "$@" -d "$(dirname "$0")/iele-kompiled" diff --git a/pyk/regression-new/bison-glr-bug/test.ref b/pyk/regression-new/bison-glr-bug/test.ref new file mode 100644 index 00000000000..8b22c28ba27 --- /dev/null +++ b/pyk/regression-new/bison-glr-bug/test.ref @@ -0,0 +1 @@ +inj{SortContractDefinition{}, SortKItem{}}(Lblcontract'UndsLBraUndsRBraUnds'IELE-COMMON'Unds'ContractDefinition'Unds'IeleName'Unds'TopLevelDefinitions{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("Forwarder")),Lbl'UndsUndsUnds'IELE-COMMON'Unds'TopLevelDefinitions'Unds'TopLevelDefinition'Unds'TopLevelDefinitions{}(inj{SortFunctionDefinition{}, SortTopLevelDefinition{}}(Lbldefine'UndsLBraUndsRBraUnds'IELE-COMMON'Unds'FunctionDefinition'Unds'FunctionSignature'Unds'Blocks{}(Lbl'UndsLParUndsRParUnds'IELE-COMMON'Unds'FunctionSignature'Unds'GlobalName'Unds'FunctionParameters{}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("init"))),inj{SortLocalNames{}, SortFunctionParameters{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'LocalNames'Unds'LocalName'Unds'LocalNames'QuotRBraUnds'LocalNames{}())),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Blocks'Unds'UnlabeledBlock'Unds'LabeledBlocks{}(inj{SortInstructions{}, SortUnlabeledBlock{}}(Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortLocalCallInst{}, SortInstruction{}}(Lbl'UndsEqls'call'UndsLParUndsRParUnds'IELE-COMMON'Unds'LocalCallInst'Unds'LValues'Unds'Operand'Unds'Operands{}(Lbl'UndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("parent")))),Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues'QuotRBraUnds'LValues{}()),inj{SortGlobalName{}, SortOperand{}}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("iele.caller")))),inj{SortNonEmptyInts{}, SortOperands{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'NonEmptyInts'Unds'Int'Unds'NonEmptyInts'QuotRBraUnds'NonEmptyInts{}()))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortAssignInst{}, SortInstruction{}}(Lbl'UndsEqlsUndsUnds'IELE-COMMON'Unds'AssignInst'Unds'LValue'Unds'Operand{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("zero")))),inj{SortInt{}, SortOperand{}}(\dv{SortInt{}}("0")))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortSStoreInst{}, SortInstruction{}}(Lblsstore'UndsCommUndsUnds'IELE-COMMON'Unds'SStoreInst'Unds'Operand'Unds'Operand{}(inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("parent")))),inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("zero")))))),Lbl'Stop'List'LBraQuotUndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions'QuotRBraUnds'Instructions{}())))),Lbl'Stop'List'LBraQuotUndsUndsUnds'IELE-COMMON'Unds'LabeledBlocks'Unds'LabeledBlock'Unds'LabeledBlocks'QuotRBraUnds'LabeledBlocks{}()))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'TopLevelDefinitions'Unds'TopLevelDefinition'Unds'TopLevelDefinitions{}(inj{SortFunctionDefinition{}, SortTopLevelDefinition{}}(Lbldefinepublic'UndsLBraUndsRBraUnds'IELE-COMMON'Unds'FunctionDefinition'Unds'FunctionSignature'Unds'Blocks{}(Lbl'UndsLParUndsRParUnds'IELE-COMMON'Unds'FunctionSignature'Unds'GlobalName'Unds'FunctionParameters{}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("deposit"))),inj{SortLocalNames{}, SortFunctionParameters{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'LocalNames'Unds'LocalName'Unds'LocalNames'QuotRBraUnds'LocalNames{}())),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Blocks'Unds'UnlabeledBlock'Unds'LabeledBlocks{}(inj{SortInstructions{}, SortUnlabeledBlock{}}(Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortLocalCallInst{}, SortInstruction{}}(Lbl'UndsEqls'call'UndsLParUndsRParUnds'IELE-COMMON'Unds'LocalCallInst'Unds'LValues'Unds'Operand'Unds'Operands{}(Lbl'UndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("value")))),Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues'QuotRBraUnds'LValues{}()),inj{SortGlobalName{}, SortOperand{}}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("iele.callvalue")))),inj{SortNonEmptyInts{}, SortOperands{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'NonEmptyInts'Unds'Int'Unds'NonEmptyInts'QuotRBraUnds'NonEmptyInts{}()))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortAssignInst{}, SortInstruction{}}(Lbl'UndsEqlsUndsUnds'IELE-COMMON'Unds'AssignInst'Unds'LValue'Unds'Operand{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("zero")))),inj{SortInt{}, SortOperand{}}(\dv{SortInt{}}("0")))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortSLoadInst{}, SortInstruction{}}(Lbl'UndsEqls'sload'UndsUnds'IELE-COMMON'Unds'SLoadInst'Unds'LValue'Unds'Operand{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("sender")))),inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("zero")))))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortLocalCallInst{}, SortInstruction{}}(Lbl'UndsEqls'call'UndsLParUndsRParUnds'IELE-COMMON'Unds'LocalCallInst'Unds'LValues'Unds'Operand'Unds'Operands{}(Lbl'UndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("gas")))),Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues'QuotRBraUnds'LValues{}()),inj{SortGlobalName{}, SortOperand{}}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("iele.gas")))),inj{SortNonEmptyInts{}, SortOperands{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'NonEmptyInts'Unds'Int'Unds'NonEmptyInts'QuotRBraUnds'NonEmptyInts{}()))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortAccountCallInst{}, SortInstruction{}}(Lbl'UndsEqls'call'Unds'at'UndsLParUndsRPar'send'UndsComm'gaslimit'UndsUnds'IELE-COMMON'Unds'AccountCallInst'Unds'LValues'Unds'Operand'Unds'Operand'Unds'Operands'Unds'Operand'Unds'Operand{}(Lbl'UndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues{}(inj{SortLocalName{}, SortLValue{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("status")))),Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'LValues'Unds'LValue'Unds'LValues'QuotRBraUnds'LValues{}()),inj{SortGlobalName{}, SortOperand{}}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("deposit")))),inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("sender")))),inj{SortNonEmptyInts{}, SortOperands{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'NonEmptyInts'Unds'Int'Unds'NonEmptyInts'QuotRBraUnds'NonEmptyInts{}()),inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("value")))),inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("gas")))))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortCondJumpInst{}, SortInstruction{}}(Lblbr'UndsCommUndsUnds'IELE-COMMON'Unds'CondJumpInst'Unds'Operand'Unds'IeleName{}(inj{SortLocalName{}, SortOperand{}}(Lbl'PercUndsUnds'IELE-COMMON'Unds'LocalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("status")))),inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("throw")))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortReturnInst{}, SortInstruction{}}(Lblretvoid'Unds'IELE-COMMON'Unds'ReturnInst{}()),Lbl'Stop'List'LBraQuotUndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions'QuotRBraUnds'Instructions{}())))))))),Lbl'UndsUndsUnds'IELE-COMMON'Unds'LabeledBlocks'Unds'LabeledBlock'Unds'LabeledBlocks{}(Lbl'UndsColnUndsUnds'IELE-COMMON'Unds'LabeledBlock'Unds'IeleName'Unds'Instructions{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("throw")),Lbl'UndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions{}(inj{SortLocalCallInst{}, SortInstruction{}}(Lblcall'UndsLParUndsRParUnds'IELE-COMMON'Unds'LocalCallInst'Unds'Operand'Unds'Operands{}(inj{SortGlobalName{}, SortOperand{}}(Lbl'-AT-UndsUnds'IELE-COMMON'Unds'GlobalName'Unds'IeleName{}(inj{SortIeleNameToken{}, SortIeleName{}}(\dv{SortIeleNameToken{}}("iele.invalid")))),inj{SortNonEmptyInts{}, SortOperands{}}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IELE-COMMON'Unds'NonEmptyInts'Unds'Int'Unds'NonEmptyInts'QuotRBraUnds'NonEmptyInts{}()))),Lbl'Stop'List'LBraQuotUndsUndsUnds'IELE-COMMON'Unds'Instructions'Unds'Instruction'Unds'Instructions'QuotRBraUnds'Instructions{}())),Lbl'Stop'List'LBraQuotUndsUndsUnds'IELE-COMMON'Unds'LabeledBlocks'Unds'LabeledBlock'Unds'LabeledBlocks'QuotRBraUnds'LabeledBlocks{}())))),Lbl'Stop'List'LBraQuotUndsUndsUnds'IELE-COMMON'Unds'TopLevelDefinitions'Unds'TopLevelDefinition'Unds'TopLevelDefinitions'QuotRBraUnds'TopLevelDefinitions{}())))) diff --git a/pyk/regression-new/bison-parser-library/.gitignore b/pyk/regression-new/bison-parser-library/.gitignore new file mode 100644 index 00000000000..9daeafb9864 --- /dev/null +++ b/pyk/regression-new/bison-parser-library/.gitignore @@ -0,0 +1 @@ +test diff --git a/pyk/regression-new/bison-parser-library/Makefile b/pyk/regression-new/bison-parser-library/Makefile new file mode 100644 index 00000000000..65b1988ca3f --- /dev/null +++ b/pyk/regression-new/bison-parser-library/Makefile @@ -0,0 +1,26 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST --gen-glr-bison-parser --bison-parser-library --llvm-kompile-type c --llvm-kompile-output libfoo + +UNAME := $(shell uname) +ifeq ($(UNAME),Darwin) + CC=clang +else + CC=gcc +endif + +check: test.kore + diff test.kore test.out + +test: kompile + $(CC) test.c -Ltest-kompiled -lfoo -lparser_KItem_TEST -o test + +test.kore: test test.in + LD_LIBRARY_PATH=test-kompiled ./test test.in > test.kore + +include ../include/ktest.mak + +clean: + rm -rf ./test-kompiled .depend-tmp .depend .kompile-* .krun-* .kprove-* .kbmc-* kore-exec.tar.gz + rm -rf test.kore test diff --git a/pyk/regression-new/bison-parser-library/test.c b/pyk/regression-new/bison-parser-library/test.c new file mode 100644 index 00000000000..0c092a94723 --- /dev/null +++ b/pyk/regression-new/bison-parser-library/test.c @@ -0,0 +1,5 @@ +#include + +char *parse_KItem(char *, char *); + +int main(int argc, char **argv) { printf("%s\n", parse_KItem(argv[1], NULL)); } diff --git a/pyk/regression-new/bison-parser-library/test.in b/pyk/regression-new/bison-parser-library/test.in new file mode 100644 index 00000000000..eb28ef4401b --- /dev/null +++ b/pyk/regression-new/bison-parser-library/test.in @@ -0,0 +1 @@ +foo() diff --git a/pyk/regression-new/bison-parser-library/test.k b/pyk/regression-new/bison-parser-library/test.k new file mode 100644 index 00000000000..c912cf1bce2 --- /dev/null +++ b/pyk/regression-new/bison-parser-library/test.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + syntax Foo [locations] + syntax Foo ::= foo() | bar() +endmodule diff --git a/pyk/regression-new/bison-parser-library/test.out b/pyk/regression-new/bison-parser-library/test.out new file mode 100644 index 00000000000..2463212ba92 --- /dev/null +++ b/pyk/regression-new/bison-parser-library/test.out @@ -0,0 +1 @@ +inj{SortFoo{}, SortKItem{}}(Lbl'Hash'location{SortFoo{}}(Lblfoo'LParRParUnds'TEST'Unds'Foo{}(), \dv{SortString{}}("test.in"), \dv{SortInt{}}("1"), \dv{SortInt{}}("0"), \dv{SortInt{}}("1"), \dv{SortInt{}}("4"))) diff --git a/pyk/regression-new/bit-range-llvm/1.test.out b/pyk/regression-new/bit-range-llvm/1.test.out new file mode 100644 index 00000000000..55117df7449 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/1.test.out @@ -0,0 +1,3 @@ + + 127 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/2.test.out b/pyk/regression-new/bit-range-llvm/2.test.out new file mode 100644 index 00000000000..8258d55ec8f --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/2.test.out @@ -0,0 +1,3 @@ + + 255 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/3.test.out b/pyk/regression-new/bit-range-llvm/3.test.out new file mode 100644 index 00000000000..e84b09a323e --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/3.test.out @@ -0,0 +1,3 @@ + + 64 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/4.test.out b/pyk/regression-new/bit-range-llvm/4.test.out new file mode 100644 index 00000000000..99474604871 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/4.test.out @@ -0,0 +1,3 @@ + + 0 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/5.test.out b/pyk/regression-new/bit-range-llvm/5.test.out new file mode 100644 index 00000000000..83b6b1cf9e0 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/5.test.out @@ -0,0 +1,3 @@ + + -1 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/6.test.out b/pyk/regression-new/bit-range-llvm/6.test.out new file mode 100644 index 00000000000..55117df7449 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/6.test.out @@ -0,0 +1,3 @@ + + 127 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/7.test.out b/pyk/regression-new/bit-range-llvm/7.test.out new file mode 100644 index 00000000000..99474604871 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/7.test.out @@ -0,0 +1,3 @@ + + 0 ~> . + diff --git a/pyk/regression-new/bit-range-llvm/Makefile b/pyk/regression-new/bit-range-llvm/Makefile new file mode 100644 index 00000000000..cac6d4d1e87 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=../bit-range +RESULTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bit-range-llvm/test.k b/pyk/regression-new/bit-range-llvm/test.k new file mode 100644 index 00000000000..3d5a64b5414 --- /dev/null +++ b/pyk/regression-new/bit-range-llvm/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + +configuration $PGM:K + +syntax Int ::= "(" Int ")" [bracket] + +endmodule diff --git a/pyk/regression-new/boundary-cells-opt/Makefile b/pyk/regression-new/boundary-cells-opt/Makefile new file mode 100644 index 00000000000..be53a75e0fa --- /dev/null +++ b/pyk/regression-new/boundary-cells-opt/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=bc-none +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/boundary-cells-opt/bc-none/Makefile b/pyk/regression-new/boundary-cells-opt/bc-none/Makefile new file mode 100644 index 00000000000..bc49d281070 --- /dev/null +++ b/pyk/regression-new/boundary-cells-opt/bc-none/Makefile @@ -0,0 +1,11 @@ +DEF=../boundary-cells-test +EXT=a +TESTDIR=.. +RESULTDIR=. + +KOMPILE_FLAGS=--syntax-module BOUNDARY-CELLS-TEST +KOMPILE_BACKEND?=haskell + +KPROVE_FLAGS= + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/boundary-cells-opt/bc-none/boundary-cells-test-spec.k.out b/pyk/regression-new/boundary-cells-opt/bc-none/boundary-cells-test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/boundary-cells-opt/bc-none/boundary-cells-test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/boundary-cells-opt/boundary-cells-test-spec.k b/pyk/regression-new/boundary-cells-opt/boundary-cells-test-spec.k new file mode 100644 index 00000000000..cd82a6cbf8a --- /dev/null +++ b/pyk/regression-new/boundary-cells-opt/boundary-cells-test-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "boundary-cells-test.k" + +module BOUNDARY-CELLS-TEST-SPEC + imports BOUNDARY-CELLS-TEST + + claim 0 => 4 + 0 => 2 + 0 => 0 + +endmodule diff --git a/pyk/regression-new/boundary-cells-opt/boundary-cells-test.k b/pyk/regression-new/boundary-cells-opt/boundary-cells-test.k new file mode 100644 index 00000000000..1448b63998a --- /dev/null +++ b/pyk/regression-new/boundary-cells-opt/boundary-cells-test.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "domains.md" + +module BOUNDARY-CELLS-TEST + + imports DOMAINS + + configuration + $PGM:K + 0 + 0 + + + rule I:Int => I +Int 1 ... + _ => (I +Int 1) /Int 2 + _ => (I +Int 1) %Int 2 + +endmodule diff --git a/pyk/regression-new/bracket-priority/Makefile b/pyk/regression-new/bracket-priority/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/bracket-priority/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bracket-priority/test.k b/pyk/regression-new/bracket-priority/test.k new file mode 100644 index 00000000000..eb957a43d8d --- /dev/null +++ b/pyk/regression-new/bracket-priority/test.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports ID + imports INT + +syntax Exp ::= "(" Name ExpList ")" +syntax Exp ::= Int + | Name +syntax Name ::= Id +syntax ExpList ::= List{Exp,""} [group(expList)] +syntax Name ::= BuiltinName +syntax BuiltinName ::= "+" + +rule (+ I1:Int I2:Int) => I1 +Int I2 + +syntax priority defaultBracket > expList + +endmodule diff --git a/pyk/regression-new/bytes-coverage/Makefile b/pyk/regression-new/bytes-coverage/Makefile new file mode 100644 index 00000000000..65bbf079461 --- /dev/null +++ b/pyk/regression-new/bytes-coverage/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--coverage --syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bytes-coverage/test.k b/pyk/regression-new/bytes-coverage/test.k new file mode 100644 index 00000000000..c4c285fca39 --- /dev/null +++ b/pyk/regression-new/bytes-coverage/test.k @@ -0,0 +1,4 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BYTES +endmodule diff --git a/pyk/regression-new/bytes-haskell/Makefile b/pyk/regression-new/bytes-haskell/Makefile new file mode 100644 index 00000000000..2865c4041be --- /dev/null +++ b/pyk/regression-new/bytes-haskell/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=../bytes +RESULTDIR=../bytes-llvm +KOMPILE_BACKEND?=haskell +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bytes-haskell/test.k b/pyk/regression-new/bytes-haskell/test.k new file mode 100644 index 00000000000..89ad0a040c3 --- /dev/null +++ b/pyk/regression-new/bytes-haskell/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + imports BYTES + +configuration $PGM:K + +syntax Int ::= "(" Int ")" [bracket] +syntax Bytes ::= "(" Bytes ")" [bracket] +syntax String ::= "(" String ")" [bracket] + +endmodule diff --git a/pyk/regression-new/bytes-literal/1.test b/pyk/regression-new/bytes-literal/1.test new file mode 100644 index 00000000000..38b91ede46e --- /dev/null +++ b/pyk/regression-new/bytes-literal/1.test @@ -0,0 +1,2 @@ +bytesEq(b" !#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz{|}~\x12\x0A\xbA\\\t\n\f\r", + b"\x20\x21\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f\x30\x31\x32\x33\x34\x35\x36\x37\x38\x39\x3a\x3b\x3c\x3d\x3e\x3f\x40\x41\x42\x43\x44\x45\x46\x47\x48\x49\x4a\x4b\x4c\x4d\x4e\x4f\x50\x51\x52\x53\x54\x55\x56\x57\x58\x59\x5a\x5b\x5d\x5e\x5f\x60\x61\x62\x63\x64\x65\x66\x67\x68\x69\x6a\x6b\x6c\x6d\x6e\x6f\x70\x71\x72\x73\x74\x75\x76\x77\x78\x79\x7a\x7b\x7c\x7d\x7e\x12\x0a\xba\x5c\x09\x0a\x0c\x0d") diff --git a/pyk/regression-new/bytes-literal/1.test.out b/pyk/regression-new/bytes-literal/1.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/bytes-literal/1.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/bytes-literal/2.test b/pyk/regression-new/bytes-literal/2.test new file mode 100644 index 00000000000..afc292e1528 --- /dev/null +++ b/pyk/regression-new/bytes-literal/2.test @@ -0,0 +1 @@ +bytesEq(b"\x5C\x22", b"\"") diff --git a/pyk/regression-new/bytes-literal/2.test.out b/pyk/regression-new/bytes-literal/2.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/bytes-literal/2.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/bytes-literal/Makefile b/pyk/regression-new/bytes-literal/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/bytes-literal/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bytes-literal/test.k b/pyk/regression-new/bytes-literal/test.k new file mode 100644 index 00000000000..5ddd5e95025 --- /dev/null +++ b/pyk/regression-new/bytes-literal/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BYTES + imports BOOL + imports K-EQUAL + + syntax Bool ::= bytesEq(Bytes, Bytes) [function] + configuration $PGM:Bool + + rule bytesEq(B1, B2) => true requires B1 ==K B2 + rule bytesEq(_B1, _B2) => false [owise] +endmodule diff --git a/pyk/regression-new/bytes-llvm/1.test.out b/pyk/regression-new/bytes-llvm/1.test.out new file mode 100644 index 00000000000..00298da5ca6 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/1.test.out @@ -0,0 +1,3 @@ + + "" ~> . + diff --git a/pyk/regression-new/bytes-llvm/10.test.out b/pyk/regression-new/bytes-llvm/10.test.out new file mode 100644 index 00000000000..00298da5ca6 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/10.test.out @@ -0,0 +1,3 @@ + + "" ~> . + diff --git a/pyk/regression-new/bytes-llvm/11.test.out b/pyk/regression-new/bytes-llvm/11.test.out new file mode 100644 index 00000000000..199e1d6f937 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/11.test.out @@ -0,0 +1,3 @@ + + "4321" ~> . + diff --git a/pyk/regression-new/bytes-llvm/12.test.out b/pyk/regression-new/bytes-llvm/12.test.out new file mode 100644 index 00000000000..00298da5ca6 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/12.test.out @@ -0,0 +1,3 @@ + + "" ~> . + diff --git a/pyk/regression-new/bytes-llvm/13.test.out b/pyk/regression-new/bytes-llvm/13.test.out new file mode 100644 index 00000000000..09271814006 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/13.test.out @@ -0,0 +1,3 @@ + + "aaaa" ~> . + diff --git a/pyk/regression-new/bytes-llvm/14.test.out b/pyk/regression-new/bytes-llvm/14.test.out new file mode 100644 index 00000000000..f5cd21a0da9 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/14.test.out @@ -0,0 +1,3 @@ + + "aaaa1234" ~> . + diff --git a/pyk/regression-new/bytes-llvm/15.test.out b/pyk/regression-new/bytes-llvm/15.test.out new file mode 100644 index 00000000000..615f6c5ac6f --- /dev/null +++ b/pyk/regression-new/bytes-llvm/15.test.out @@ -0,0 +1,3 @@ + + "1234aaaa" ~> . + diff --git a/pyk/regression-new/bytes-llvm/16.test.out b/pyk/regression-new/bytes-llvm/16.test.out new file mode 100644 index 00000000000..00298da5ca6 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/16.test.out @@ -0,0 +1,3 @@ + + "" ~> . + diff --git a/pyk/regression-new/bytes-llvm/17.test.out b/pyk/regression-new/bytes-llvm/17.test.out new file mode 100644 index 00000000000..f8da69e89d9 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/17.test.out @@ -0,0 +1,3 @@ + + "\x00\x00\x00\x00" ~> . + diff --git a/pyk/regression-new/bytes-llvm/18.test.out b/pyk/regression-new/bytes-llvm/18.test.out new file mode 100644 index 00000000000..edf41de8276 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/18.test.out @@ -0,0 +1,3 @@ + + "\x80" ~> . + diff --git a/pyk/regression-new/bytes-llvm/19.test.out b/pyk/regression-new/bytes-llvm/19.test.out new file mode 100644 index 00000000000..edf41de8276 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/19.test.out @@ -0,0 +1,3 @@ + + "\x80" ~> . + diff --git a/pyk/regression-new/bytes-llvm/2.test.out b/pyk/regression-new/bytes-llvm/2.test.out new file mode 100644 index 00000000000..99474604871 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/2.test.out @@ -0,0 +1,3 @@ + + 0 ~> . + diff --git a/pyk/regression-new/bytes-llvm/20.test.out b/pyk/regression-new/bytes-llvm/20.test.out new file mode 100644 index 00000000000..5b7a54c50d5 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/20.test.out @@ -0,0 +1,3 @@ + + "\x00\x80" ~> . + diff --git a/pyk/regression-new/bytes-llvm/21.test.out b/pyk/regression-new/bytes-llvm/21.test.out new file mode 100644 index 00000000000..30af9bdd45d --- /dev/null +++ b/pyk/regression-new/bytes-llvm/21.test.out @@ -0,0 +1,3 @@ + + "\xff\x80" ~> . + diff --git a/pyk/regression-new/bytes-llvm/22.test.out b/pyk/regression-new/bytes-llvm/22.test.out new file mode 100644 index 00000000000..4a7735c3af0 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/22.test.out @@ -0,0 +1,3 @@ + + "\x80\xff" ~> . + diff --git a/pyk/regression-new/bytes-llvm/23.test.out b/pyk/regression-new/bytes-llvm/23.test.out new file mode 100644 index 00000000000..00298da5ca6 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/23.test.out @@ -0,0 +1,3 @@ + + "" ~> . + diff --git a/pyk/regression-new/bytes-llvm/24.test.out b/pyk/regression-new/bytes-llvm/24.test.out new file mode 100644 index 00000000000..980b381b0aa --- /dev/null +++ b/pyk/regression-new/bytes-llvm/24.test.out @@ -0,0 +1,3 @@ + + "1" ~> . + diff --git a/pyk/regression-new/bytes-llvm/25.test.out b/pyk/regression-new/bytes-llvm/25.test.out new file mode 100644 index 00000000000..901b3613335 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/25.test.out @@ -0,0 +1,3 @@ + + "2" ~> . + diff --git a/pyk/regression-new/bytes-llvm/26.test.out b/pyk/regression-new/bytes-llvm/26.test.out new file mode 100644 index 00000000000..f1cdd36f4d3 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/26.test.out @@ -0,0 +1,3 @@ + + "234" ~> . + diff --git a/pyk/regression-new/bytes-llvm/27.test.out b/pyk/regression-new/bytes-llvm/27.test.out new file mode 100644 index 00000000000..20ec2873433 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/27.test.out @@ -0,0 +1,3 @@ + + "2234" ~> . + diff --git a/pyk/regression-new/bytes-llvm/28.test.out b/pyk/regression-new/bytes-llvm/28.test.out new file mode 100644 index 00000000000..d91c109b0b2 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/28.test.out @@ -0,0 +1,3 @@ + + "2334" ~> . + diff --git a/pyk/regression-new/bytes-llvm/29.test.out b/pyk/regression-new/bytes-llvm/29.test.out new file mode 100644 index 00000000000..a22577d908d --- /dev/null +++ b/pyk/regression-new/bytes-llvm/29.test.out @@ -0,0 +1,3 @@ + + "1234" ~> . + diff --git a/pyk/regression-new/bytes-llvm/3.test.out b/pyk/regression-new/bytes-llvm/3.test.out new file mode 100644 index 00000000000..99474604871 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/3.test.out @@ -0,0 +1,3 @@ + + 0 ~> . + diff --git a/pyk/regression-new/bytes-llvm/30.test.out b/pyk/regression-new/bytes-llvm/30.test.out new file mode 100644 index 00000000000..c16b3a95042 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/30.test.out @@ -0,0 +1,3 @@ + + "1124" ~> . + diff --git a/pyk/regression-new/bytes-llvm/31.test.out b/pyk/regression-new/bytes-llvm/31.test.out new file mode 100644 index 00000000000..a2b724c3f87 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/31.test.out @@ -0,0 +1,3 @@ + + "12" ~> . + diff --git a/pyk/regression-new/bytes-llvm/32.test.out b/pyk/regression-new/bytes-llvm/32.test.out new file mode 100644 index 00000000000..496e95bc12b --- /dev/null +++ b/pyk/regression-new/bytes-llvm/32.test.out @@ -0,0 +1,3 @@ + + "foo" ~> . + diff --git a/pyk/regression-new/bytes-llvm/4.test.out b/pyk/regression-new/bytes-llvm/4.test.out new file mode 100644 index 00000000000..8258d55ec8f --- /dev/null +++ b/pyk/regression-new/bytes-llvm/4.test.out @@ -0,0 +1,3 @@ + + 255 ~> . + diff --git a/pyk/regression-new/bytes-llvm/5.test.out b/pyk/regression-new/bytes-llvm/5.test.out new file mode 100644 index 00000000000..83b6b1cf9e0 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/5.test.out @@ -0,0 +1,3 @@ + + -1 ~> . + diff --git a/pyk/regression-new/bytes-llvm/6.test.out b/pyk/regression-new/bytes-llvm/6.test.out new file mode 100644 index 00000000000..8258d55ec8f --- /dev/null +++ b/pyk/regression-new/bytes-llvm/6.test.out @@ -0,0 +1,3 @@ + + 255 ~> . + diff --git a/pyk/regression-new/bytes-llvm/7.test.out b/pyk/regression-new/bytes-llvm/7.test.out new file mode 100644 index 00000000000..8258d55ec8f --- /dev/null +++ b/pyk/regression-new/bytes-llvm/7.test.out @@ -0,0 +1,3 @@ + + 255 ~> . + diff --git a/pyk/regression-new/bytes-llvm/8.test.out b/pyk/regression-new/bytes-llvm/8.test.out new file mode 100644 index 00000000000..99474604871 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/8.test.out @@ -0,0 +1,3 @@ + + 0 ~> . + diff --git a/pyk/regression-new/bytes-llvm/9.test.out b/pyk/regression-new/bytes-llvm/9.test.out new file mode 100644 index 00000000000..3fdf9fe580b --- /dev/null +++ b/pyk/regression-new/bytes-llvm/9.test.out @@ -0,0 +1,3 @@ + + 4 ~> . + diff --git a/pyk/regression-new/bytes-llvm/Makefile b/pyk/regression-new/bytes-llvm/Makefile new file mode 100644 index 00000000000..fd340c4a902 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=../bytes +RESULTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bytes-llvm/test.k b/pyk/regression-new/bytes-llvm/test.k new file mode 100644 index 00000000000..89ad0a040c3 --- /dev/null +++ b/pyk/regression-new/bytes-llvm/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + imports BYTES + +configuration $PGM:K + +syntax Int ::= "(" Int ")" [bracket] +syntax Bytes ::= "(" Bytes ")" [bracket] +syntax String ::= "(" String ")" [bracket] + +endmodule diff --git a/pyk/regression-new/bytes-memset/1.test b/pyk/regression-new/bytes-memset/1.test new file mode 100644 index 00000000000..1c39464c58d --- /dev/null +++ b/pyk/regression-new/bytes-memset/1.test @@ -0,0 +1 @@ +memsetBytes(b"12345", 1, 3, 48) diff --git a/pyk/regression-new/bytes-memset/1.test.out b/pyk/regression-new/bytes-memset/1.test.out new file mode 100644 index 00000000000..b1c551859ff --- /dev/null +++ b/pyk/regression-new/bytes-memset/1.test.out @@ -0,0 +1,3 @@ + + b"10005" ~> .K + diff --git a/pyk/regression-new/bytes-memset/2.test b/pyk/regression-new/bytes-memset/2.test new file mode 100644 index 00000000000..1bd1e676842 --- /dev/null +++ b/pyk/regression-new/bytes-memset/2.test @@ -0,0 +1 @@ +memsetBytes(b"10005", 1, 1, -1) diff --git a/pyk/regression-new/bytes-memset/2.test.out b/pyk/regression-new/bytes-memset/2.test.out new file mode 100644 index 00000000000..d0c0e5d2c74 --- /dev/null +++ b/pyk/regression-new/bytes-memset/2.test.out @@ -0,0 +1,3 @@ + + b"1\xff005" ~> .K + diff --git a/pyk/regression-new/bytes-memset/Makefile b/pyk/regression-new/bytes-memset/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/bytes-memset/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/bytes-memset/test.k b/pyk/regression-new/bytes-memset/test.k new file mode 100644 index 00000000000..7aee2d9a2db --- /dev/null +++ b/pyk/regression-new/bytes-memset/test.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BYTES + imports INT + + configuration $PGM:Bytes +endmodule diff --git a/pyk/regression-new/cast-kitem/1.test b/pyk/regression-new/cast-kitem/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/cast-kitem/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/cast-kitem/1.test.out b/pyk/regression-new/cast-kitem/1.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/cast-kitem/1.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/cast-kitem/Makefile b/pyk/regression-new/cast-kitem/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/cast-kitem/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/cast-kitem/test.k b/pyk/regression-new/cast-kitem/test.k new file mode 100644 index 00000000000..9dff3ec50c8 --- /dev/null +++ b/pyk/regression-new/cast-kitem/test.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + +syntax K ::= foo() [function] + +rule foo() => 0 + +rule 1 => {foo()}:>KItem + +endmodule diff --git a/pyk/regression-new/cast/1.test b/pyk/regression-new/cast/1.test new file mode 100644 index 00000000000..6c162f7cab8 --- /dev/null +++ b/pyk/regression-new/cast/1.test @@ -0,0 +1 @@ +asInt(te(0)) diff --git a/pyk/regression-new/cast/1.test.out b/pyk/regression-new/cast/1.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/cast/1.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/cast/Makefile b/pyk/regression-new/cast/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/cast/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/cast/test.k b/pyk/regression-new/cast/test.k new file mode 100644 index 00000000000..39edd224592 --- /dev/null +++ b/pyk/regression-new/cast/test.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + +syntax KItem ::= Int + +syntax K ::= value(K) [function] +syntax RValue ::= te(K) + +syntax Int ::= asInt(RValue) [function] +syntax Int ::= foo(Int) [function] + +rule value(te(K:K)) => K + +rule asInt(V::RValue) => foo({value(V)}:>Int) +rule foo(I:Int) => I + +endmodule diff --git a/pyk/regression-new/cell-bag-sort-llvm/Makefile b/pyk/regression-new/cell-bag-sort-llvm/Makefile new file mode 100644 index 00000000000..3c6eb02ca62 --- /dev/null +++ b/pyk/regression-new/cell-bag-sort-llvm/Makefile @@ -0,0 +1,3 @@ +-KOMPILE_FLAGS=-w none + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/cell-bag-sort-llvm/test.k b/pyk/regression-new/cell-bag-sort-llvm/test.k new file mode 100644 index 00000000000..cf4e168adf4 --- /dev/null +++ b/pyk/regression-new/cell-bag-sort-llvm/test.k @@ -0,0 +1,73 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + + syntax Stmt ::= "addContract" "(" Id ")" ";" + | "addFunction" "(" Id "," Id ")" ";" + | "testFunction" "(" Id "," Id ")" ";" + | "testFunction1" "(" Int ")" ";" + > Stmt Stmt [left, format(%1%n%2)] + + syntax Pgm ::= Stmt +endmodule + +module TEST + imports TEST-SYNTAX + imports DOMAINS + + configuration + $PGM:Pgm + + 0:Int // It works again if we move this outside of + + 0:Int + + + + + .K + .Map + + + + + rule + addContract(ContractName:Id); => .K ... + + ... + (.Bag => + + ContractName + .Map + ) + ... + + +rule + addFunction(ContractName:Id, FunctionName:Id); => .K ... + + ... + + ContractName + ... .Map => FunctionName |-> N ... + + ... + + + N => N +Int 1 + (.Bag => N ) + ... + + +rule + testFunction(ContractName:Id, FunctionName:Id); => "done" ... + + ContractName + ... FunctionName |-> N:Int ... + + N + +rule + S1:Stmt S2:Stmt => S1 ~> S2 + +endmodule diff --git a/pyk/regression-new/cell-bag-sort-llvm/test.k.out b/pyk/regression-new/cell-bag-sort-llvm/test.k.out new file mode 100644 index 00000000000..fb8c9472199 --- /dev/null +++ b/pyk/regression-new/cell-bag-sort-llvm/test.k.out @@ -0,0 +1,17 @@ +[Error] Compiler: Cell bags are only supported on the Java backend. If you want this feature, comment on https://github.com/runtimeverification/k/issues/1419 . As a workaround, you can add the attribute type="Set" and add a unique identifier to each element in the set. + Source(test.k) + Location(22,21,24,32) + . v~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 22 | + 23 | 0:Int + 24 | + . ~~~~~~~~~~^ +[Error] Compiler: Cell bags are only supported on the Java backend. If you want this feature, comment on https://github.com/runtimeverification/k/issues/1419 . As a workaround, you can add the attribute type="Set" and add a unique identifier to each element in the set. + Source(test.k) + Location(27,21,30,32) + . v~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 27 | + | ... + 30 | + . ~~~~~~~~~~^ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/cell-sort-haskell/1.test b/pyk/regression-new/cell-sort-haskell/1.test new file mode 100644 index 00000000000..6e2d44767d9 --- /dev/null +++ b/pyk/regression-new/cell-sort-haskell/1.test @@ -0,0 +1,6 @@ +addContract(foo); +addFunction(foo, f1); +addFunction(foo, f2); +addFunction(foo, f3); + +testFunction(foo, f2); // but it works with f1 or f3 (first or last element) diff --git a/pyk/regression-new/cell-sort-haskell/1.test.out b/pyk/regression-new/cell-sort-haskell/1.test.out new file mode 100644 index 00000000000..f3492455aa3 --- /dev/null +++ b/pyk/regression-new/cell-sort-haskell/1.test.out @@ -0,0 +1,35 @@ + + + "done" ~> .K + + + 3 + + + + + 0 + + + + 1 + + + + 2 + + + + + + + foo ~> .K + + + f1 |-> 0 + f2 |-> 1 + f3 |-> 2 + + + + diff --git a/pyk/regression-new/cell-sort-haskell/Makefile b/pyk/regression-new/cell-sort-haskell/Makefile new file mode 100644 index 00000000000..4c7bc752978 --- /dev/null +++ b/pyk/regression-new/cell-sort-haskell/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND = haskell + +include ../include/ktest.mak diff --git a/pyk/regression-new/cell-sort-haskell/test.k b/pyk/regression-new/cell-sort-haskell/test.k new file mode 100644 index 00000000000..93170728509 --- /dev/null +++ b/pyk/regression-new/cell-sort-haskell/test.k @@ -0,0 +1,73 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + + syntax Stmt ::= "addContract" "(" Id ")" ";" + | "addFunction" "(" Id "," Id ")" ";" + | "testFunction" "(" Id "," Id ")" ";" + | "testFunction1" "(" Int ")" ";" + > Stmt Stmt [left, format(%1%n%2)] + + syntax Pgm ::= Stmt +endmodule + +module TEST + imports TEST-SYNTAX + imports DOMAINS + + configuration + $PGM:Pgm + 0:Int + + + 0:Int + + + + + .K + .Map + + + + + rule + addContract(ContractName:Id); => .K ... + + ... + (.Bag => + + ContractName + .Map + ) + ... + + +rule + addFunction(ContractName:Id, FunctionName:Id); => .K ... + + ... + + ContractName + ... .Map => FunctionName |-> N ... + + ... + + N => N +Int 1 + + (.Bag => N ) + ... + + +rule + testFunction(ContractName:Id, FunctionName:Id); => "done" ... + + ContractName + ... FunctionName |-> N:Int ... + + N + +rule + S1:Stmt S2:Stmt => S1 ~> S2 + +endmodule diff --git a/pyk/regression-new/cell_map/Makefile b/pyk/regression-new/cell_map/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/cell_map/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/cell_map/pgm.test b/pyk/regression-new/cell_map/pgm.test new file mode 100644 index 00000000000..f4eed75c00b --- /dev/null +++ b/pyk/regression-new/cell_map/pgm.test @@ -0,0 +1,5 @@ +insert(0, 1); +insert(1, 1); +update(0, 0); +remove(1); +get(0) diff --git a/pyk/regression-new/cell_map/pgm.test.out b/pyk/regression-new/cell_map/pgm.test.out new file mode 100644 index 00000000000..bfbae1c9e39 --- /dev/null +++ b/pyk/regression-new/cell_map/pgm.test.out @@ -0,0 +1,15 @@ + + + 0 ~> .K + + + + + 0 ~> .K + + + 0 ~> .K + + + + diff --git a/pyk/regression-new/cell_map/test.k b/pyk/regression-new/cell_map/test.k new file mode 100644 index 00000000000..f2479c59edc --- /dev/null +++ b/pyk/regression-new/cell_map/test.k @@ -0,0 +1,38 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + + configuration + $PGM:Stmt + + + .K + .K + + + + syntax Stmt ::= get(Int) + | insert(Int, Int) + | remove(Int) + | update(Int, Int) + | Stmt ";" Stmt [left] + rule + get(Key) => Value ... + Key + Value:Int + rule + insert(Key, Value) => .K ... + ... + .Bag => Key Value + ... + rule + remove(Key) => .K ... + ... + Key _ => .Bag + ... + rule + update(Key, Value) => .K ... + Key + _ => Value + rule S1; S2 => S1 ~> S2 +endmodule diff --git a/pyk/regression-new/checkClaimError/Makefile b/pyk/regression-new/checkClaimError/Makefile new file mode 100644 index 00000000000..7bdb395b8c7 --- /dev/null +++ b/pyk/regression-new/checkClaimError/Makefile @@ -0,0 +1,7 @@ +DEF=errorClaim +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/checkClaimError/claim-spec.k b/pyk/regression-new/checkClaimError/claim-spec.k new file mode 100644 index 00000000000..5db9fd4a96f --- /dev/null +++ b/pyk/regression-new/checkClaimError/claim-spec.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CLAIM-SPEC + imports ERRORCLAIM + + syntax Int ::= "noError" [token] + claim doIt(foo) => doIt(0) ... +endmodule diff --git a/pyk/regression-new/checkClaimError/claim-spec.k.out b/pyk/regression-new/checkClaimError/claim-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/checkClaimError/claim-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/checkClaimError/errorClaim.k b/pyk/regression-new/checkClaimError/errorClaim.k new file mode 100644 index 00000000000..ee9dbd7098f --- /dev/null +++ b/pyk/regression-new/checkClaimError/errorClaim.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module ERRORCLAIM-SYNTAX + imports INT + + syntax Int ::= "foo" [macro] + rule foo => 3 + + syntax Pgm ::= doIt ( Int ) + syntax Pgm ::= addCounter ( Int ) +endmodule + +module ERRORCLAIM + imports ERRORCLAIM-SYNTAX + + configuration $PGM:Pgm 1 0 + + rule addCounter(0) => .K ... + rule addCounter(Times:Int => Times -Int 1) ... + C:Int => C +Int 1 + S:Int => S +Int C + requires Times >Int 0 + + rule doIt(I => I -Int 1) ... requires I >Int 0 +endmodule diff --git a/pyk/regression-new/checkClaimError/rule-spec.k b/pyk/regression-new/checkClaimError/rule-spec.k new file mode 100644 index 00000000000..2f1bf249118 --- /dev/null +++ b/pyk/regression-new/checkClaimError/rule-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module RULE-SPEC + imports ERRORCLAIM + + rule doIt(foo) => doIt(0) ... +endmodule diff --git a/pyk/regression-new/checkClaimError/rule-spec.k.out b/pyk/regression-new/checkClaimError/rule-spec.k.out new file mode 100644 index 00000000000..c53603a7836 --- /dev/null +++ b/pyk/regression-new/checkClaimError/rule-spec.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Only claims and simplification rules are allowed in proof modules. + Source(rule-spec.k) + Location(6,10,6,43) + 6 | rule doIt(foo) => doIt(0) ... + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checkClaimError/syntax-spec.k b/pyk/regression-new/checkClaimError/syntax-spec.k new file mode 100644 index 00000000000..327b6f340ab --- /dev/null +++ b/pyk/regression-new/checkClaimError/syntax-spec.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module SYNTAX-SPEC + imports ERRORCLAIM + + syntax X ::= "errorHere" + syntax Y + claim doIt(foo) => doIt(0) ... +endmodule diff --git a/pyk/regression-new/checkClaimError/syntax-spec.k.out b/pyk/regression-new/checkClaimError/syntax-spec.k.out new file mode 100644 index 00000000000..3be4663c053 --- /dev/null +++ b/pyk/regression-new/checkClaimError/syntax-spec.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Found syntax declaration in proof module. Only tokens for existing sorts are allowed. + Source(syntax-spec.k) + Location(6,18,6,29) + 6 | syntax X ::= "errorHere" + . ^~~~~~~~~~~ +[Error] Compiler: Found syntax declaration in proof module. Only tokens for existing sorts are allowed. + Source(syntax-spec.k) + Location(7,5,7,13) + 7 | syntax Y + . ^~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checkWarns/Makefile b/pyk/regression-new/checkWarns/Makefile new file mode 100644 index 00000000000..468508b94ae --- /dev/null +++ b/pyk/regression-new/checkWarns/Makefile @@ -0,0 +1,4 @@ +KOMPILE_FLAGS=-w2e -w all +KOMPILE_BACKEND=haskell + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/checkWarns/checkHaskellAnywhere.k b/pyk/regression-new/checkWarns/checkHaskellAnywhere.k new file mode 100644 index 00000000000..dd8d6718492 --- /dev/null +++ b/pyk/regression-new/checkWarns/checkHaskellAnywhere.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKHASKELLANYWHERE-SYNTAX +endmodule + +module CHECKHASKELLANYWHERE + imports CHECKHASKELLANYWHERE-SYNTAX + imports INT + rule 1 => 2 [anywhere] +endmodule diff --git a/pyk/regression-new/checkWarns/checkHaskellAnywhere.k.out b/pyk/regression-new/checkWarns/checkHaskellAnywhere.k.out new file mode 100644 index 00000000000..8cba0652f0a --- /dev/null +++ b/pyk/regression-new/checkWarns/checkHaskellAnywhere.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: anywhere is not supported by the haskell backend. + Source(checkHaskellAnywhere.k) + Location(8,8,8,14) + 8 | rule 1 => 2 [anywhere] + . ^~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checkWarns/checkRHSHaskell.k b/pyk/regression-new/checkWarns/checkRHSHaskell.k new file mode 100644 index 00000000000..faf87db8fad --- /dev/null +++ b/pyk/regression-new/checkWarns/checkRHSHaskell.k @@ -0,0 +1,32 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// +// This should kompile just fine for the haskell backend, variables +// in the requires clause should be considered as part of LHS for haskell backend. +// https://github.com/runtimeverification/k/issues/2687 + +module CHECKRHSHASKELL-SYNTAX + +endmodule + +module CHECKRHSHASKELL + imports CHECKRHSHASKELL-SYNTAX + imports MAP + imports INT + imports BOOL + + syntax Pgm ::= "a" | "b" + rule a => b + syntax Int ::= f ( Int ) [function, total, no-evaluators] + + configuration $PGM:Pgm + + rule a => b requires f(_X) ==Int 3 + rule a => b requires #let _ = 1 #in true + rule #let _ = 1 #in true => 2 + rule 1 => #let _ = 1 #in true + rule a => b requires #let #let _ = 2 #in true = 1 #in true + rule 1 => 2 requires #fun ( _ => true ) ( 1 ) + rule (1 => 2) ~> #fun ( _ => 2 ) ( 2 ) + rule 1 => 2 requires #fun ( _ => #let _ = 1 #in true ) ( 1 ) + rule 1 => 2 requires #fun ( #let _ = 1 #in true => true ) ( 5 ) +endmodule diff --git a/pyk/regression-new/checkWarns/checkRHSHaskell.k.out b/pyk/regression-new/checkWarns/checkRHSHaskell.k.out new file mode 100644 index 00000000000..7869a540e7b --- /dev/null +++ b/pyk/regression-new/checkWarns/checkRHSHaskell.k.out @@ -0,0 +1,21 @@ +[Error] Compiler: Found #fun expression in a pattern location (LHS and outside of rewrite). + Source(checkRHSHaskell.k) + Location(25,14,25,33) + 25 | rule #let _ = 1 #in true => 2 + . ^~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Found #fun expression in a pattern location (LHS and outside of rewrite). + Source(checkRHSHaskell.k) + Location(27,40,27,59) + 27 | rule a => b requires #let #let _ = 2 #in true = 1 #in true + . ^~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Found #fun expression in a pattern location (LHS and outside of rewrite). + Source(checkRHSHaskell.k) + Location(29,26,29,47) + 29 | rule (1 => 2) ~> #fun ( _ => 2 ) ( 2 ) + . ^~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Found #fun expression in a pattern location (LHS and outside of rewrite). + Source(checkRHSHaskell.k) + Location(31,42,31,61) + 31 | rule 1 => 2 requires #fun ( #let _ = 1 #in true => true ) ( 5 ) + . ^~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 4 structural errors. diff --git a/pyk/regression-new/checkWarns/checkUnusedSymbol.k b/pyk/regression-new/checkWarns/checkUnusedSymbol.k new file mode 100644 index 00000000000..ada153dcb08 --- /dev/null +++ b/pyk/regression-new/checkWarns/checkUnusedSymbol.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKUNUSEDSYMBOL-SYNTAX + +endmodule + +module CHECKUNUSEDSYMBOL + imports CHECKUNUSEDSYMBOL-SYNTAX + imports INT + + syntax Foo ::= foo(Int) + + syntax Bar ::= bar(Int) [unused] +endmodule diff --git a/pyk/regression-new/checkWarns/checkUnusedSymbol.k.out b/pyk/regression-new/checkWarns/checkUnusedSymbol.k.out new file mode 100644 index 00000000000..fc5999215cd --- /dev/null +++ b/pyk/regression-new/checkWarns/checkUnusedSymbol.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Symbol 'foo(_)_CHECKUNUSEDSYMBOL_Foo_Int' defined but not used. Add the 'unused' attribute if this is intentional. + Source(checkUnusedSymbol.k) + Location(10,18,10,26) + 10 | syntax Foo ::= foo(Int) + . ^~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checkWarns/checkUnusedVar.k b/pyk/regression-new/checkWarns/checkUnusedVar.k new file mode 100644 index 00000000000..08e01d7aabf --- /dev/null +++ b/pyk/regression-new/checkWarns/checkUnusedVar.k @@ -0,0 +1,32 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKUNUSEDVAR-SYNTAX + +endmodule + +module MOD + imports INT + configuration 0 +endmodule + +module CHECKUNUSEDVAR + imports INT + imports MOD + + syntax KItem ::= foo(Int) + + rule foo(X) => 0 + rule foo(0) => !_:Int + + rule foo(X) => 0 + requires X >Int 0 + rule foo(X) => 1 + requires 0 >Int 0 + + rule foo(X) => ?X:Int + ensures X >Int 0 + + rule foo(_X) => 1 + + configuration $PGM:K + +endmodule diff --git a/pyk/regression-new/checkWarns/checkUnusedVar.k.out b/pyk/regression-new/checkWarns/checkUnusedVar.k.out new file mode 100644 index 00000000000..d537409dd75 --- /dev/null +++ b/pyk/regression-new/checkWarns/checkUnusedVar.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Variable 'X' defined but not used. Prefix variable name with underscore if this is intentional. + Source(checkUnusedVar.k) + Location(17,12,17,13) + 17 | rule foo(X) => 0 + . ^ +[Error] Compiler: Variable 'X' defined but not used. Prefix variable name with underscore if this is intentional. + Source(checkUnusedVar.k) + Location(22,12,22,13) + 22 | rule foo(X) => 1 + . ^ +[Error] Compiler: Variable '?X' defined but not used. Prefix variable name with underscore if this is intentional. + Source(checkUnusedVar.k) + Location(25,18,25,20) + 25 | rule foo(X) => ?X:Int + . ^~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checkWarns/deprecated.k b/pyk/regression-new/checkWarns/deprecated.k new file mode 100644 index 00000000000..87206be1d65 --- /dev/null +++ b/pyk/regression-new/checkWarns/deprecated.k @@ -0,0 +1,25 @@ +module DEPRECATED-SYNTAX +endmodule + +module DEPRECATED + imports BOOL + syntax Foo ::= foo() [deprecated] + | bar() [deprecated] + | baz(Foo) + | qux(Foo) [deprecated] + + syntax Bool ::= f() [function, deprecated] + rule f() => true + + rule baz(baz(foo())) => baz(bar()) + requires f() + ensures f() + + context [qux]: qux(HOLE) requires f() + context alias [qux2]: baz(qux(HERE)) requires f() + + syntax KResult ::= Foo + + configuration + qux(foo()) +endmodule diff --git a/pyk/regression-new/checkWarns/deprecated.k.out b/pyk/regression-new/checkWarns/deprecated.k.out new file mode 100644 index 00000000000..cf86a91b0e9 --- /dev/null +++ b/pyk/regression-new/checkWarns/deprecated.k.out @@ -0,0 +1,56 @@ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(12,8,12,11) + 12 | rule f() => true + . ^~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(14,16,14,21) + 14 | rule baz(baz(foo())) => baz(bar()) + . ^~~~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(14,31,14,36) + 14 | rule baz(baz(foo())) => baz(bar()) + . ^~~~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(15,14,15,17) + 15 | requires f() + . ^~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(16,13,16,16) + 16 | ensures f() + . ^~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(18,18,18,27) + 18 | context [qux]: qux(HOLE) requires f() + . ^~~~~~~~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(18,37,18,40) + 18 | context [qux]: qux(HOLE) requires f() + . ^~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(19,29,19,38) + 19 | context alias [qux2]: baz(qux(HERE)) requires f() + . ^~~~~~~~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(19,49,19,52) + 19 | context alias [qux2]: baz(qux(HERE)) requires f() + . ^~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(24,9,24,19) + 24 | qux(foo()) + . ^~~~~~~~~~ +[Error] Compiler: Use of deprecated production found; this syntax may be removed in the future. + Source(deprecated.k) + Location(24,13,24,18) + 24 | qux(foo()) + . ^~~~~ +[Error] Compiler: Had 11 structural errors. diff --git a/pyk/regression-new/checkWarns/existsLHSBoundFail.k b/pyk/regression-new/checkWarns/existsLHSBoundFail.k new file mode 100644 index 00000000000..63a208b788b --- /dev/null +++ b/pyk/regression-new/checkWarns/existsLHSBoundFail.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module EXISTSLHSBOUNDFAIL-SYNTAX + imports INT-SYNTAX +endmodule + +module EXISTSLHSBOUNDFAIL + imports EXISTSLHSBOUNDFAIL-SYNTAX + imports INT + + syntax Exp ::= foo(Int) + rule foo(X) => #Exists Y . { I #Equals Y } +endmodule diff --git a/pyk/regression-new/checkWarns/existsLHSBoundFail.k.out b/pyk/regression-new/checkWarns/existsLHSBoundFail.k.out new file mode 100644 index 00000000000..c4847bfd5e0 --- /dev/null +++ b/pyk/regression-new/checkWarns/existsLHSBoundFail.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Variable 'X' defined but not used. Prefix variable name with underscore if this is intentional. + Source(existsLHSBoundFail.k) + Location(11,12,11,13) + 11 | rule foo(X) => #Exists Y . { I #Equals Y } + . ^ +[Error] Compiler: Found variable I on right hand side of rule, not bound on left hand side. Did you mean "?I"? + Source(existsLHSBoundFail.k) + Location(11,32,11,33) + 11 | rule foo(X) => #Exists Y . { I #Equals Y } + . ^ +[Error] Compiler: Variable 'I' defined but not used. Prefix variable name with underscore if this is intentional. + Source(existsLHSBoundFail.k) + Location(11,32,11,33) + 11 | rule foo(X) => #Exists Y . { I #Equals Y } + . ^ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checkWarns/existsLHSBoundPass.k b/pyk/regression-new/checkWarns/existsLHSBoundPass.k new file mode 100644 index 00000000000..fb1a38f9949 --- /dev/null +++ b/pyk/regression-new/checkWarns/existsLHSBoundPass.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module EXISTSLHSBOUNDPASS-SYNTAX + imports INT-SYNTAX +endmodule + +module EXISTSLHSBOUNDPASS + imports EXISTSLHSBOUNDPASS-SYNTAX + imports INT + + syntax Exp ::= foo(Int) + rule foo(_X) => #Exists Y . { ?_I #Equals Y } +endmodule diff --git a/pyk/regression-new/checkWarns/existsLHSBoundPass.k.out b/pyk/regression-new/checkWarns/existsLHSBoundPass.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checkWarns/missingKlabel.k b/pyk/regression-new/checkWarns/missingKlabel.k new file mode 100644 index 00000000000..4ce27642627 --- /dev/null +++ b/pyk/regression-new/checkWarns/missingKlabel.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module MISSINGKLABEL-SYNTAX +endmodule + +module MISSINGKLABEL + imports MISSINGKLABEL-SYNTAX + imports BASIC-K + + syntax MyMap ::= KItem "M|->" KItem + [ function, total, hook(MAP.element), klabel(_M|->_), symbol, injective, unused] + + syntax MyMap ::= MyMap MyMap + [ left, function, hook(MAP.concat), klabel(_MyMap_), symbol, assoc, comm + , unit(.MyMap), element(_M|->_), index(0), format(%1%n%2), unused + ] + +endmodule diff --git a/pyk/regression-new/checkWarns/missingKlabel.k.out b/pyk/regression-new/checkWarns/missingKlabel.k.out new file mode 100644 index 00000000000..a1a040a7739 --- /dev/null +++ b/pyk/regression-new/checkWarns/missingKlabel.k.out @@ -0,0 +1 @@ +[Error] Compiler: Expected to find exactly one production for KLabel: .MyMap found: 0 diff --git a/pyk/regression-new/checkWarns/nullarySymbol.k b/pyk/regression-new/checkWarns/nullarySymbol.k new file mode 100644 index 00000000000..54e8f0232ed --- /dev/null +++ b/pyk/regression-new/checkWarns/nullarySymbol.k @@ -0,0 +1,6 @@ +module NULLARYSYMBOL-SYNTAX +endmodule + +module NULLARYSYMBOL + syntax Foo ::= foo() [symbol, unused] +endmodule diff --git a/pyk/regression-new/checkWarns/nullarySymbol.k.out b/pyk/regression-new/checkWarns/nullarySymbol.k.out new file mode 100644 index 00000000000..72209c7f50b --- /dev/null +++ b/pyk/regression-new/checkWarns/nullarySymbol.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Zero-argument `symbol` attribute used without a corresponding `klabel(_)`. Either remove `symbol`, or supply an argument. + Source(nullarySymbol.k) + Location(5,18,5,40) + 5 | syntax Foo ::= foo() [symbol, unused] + . ^~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checkWarns/requireBuiltinK.k b/pyk/regression-new/checkWarns/requireBuiltinK.k new file mode 100644 index 00000000000..ddde73b4366 --- /dev/null +++ b/pyk/regression-new/checkWarns/requireBuiltinK.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "ffi.k" + +module REQUIREBUILTINK-SYNTAX +endmodule + +module REQUIREBUILTINK + imports REQUIREBUILTINK-SYNTAX + imports FFI +endmodule diff --git a/pyk/regression-new/checkWarns/requireBuiltinK.k.out b/pyk/regression-new/checkWarns/requireBuiltinK.k.out new file mode 100644 index 00000000000..bbf8c2bff34 --- /dev/null +++ b/pyk/regression-new/checkWarns/requireBuiltinK.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Requiring a K file in the K builtin directory via a deprecated filename. Please replace "ffi.k" with "ffi.md". + Source(requireBuiltinK.k) + Location(2,1,2,17) + 2 | requires "ffi.k" + . ^~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checkWarns/singletonOverload.k b/pyk/regression-new/checkWarns/singletonOverload.k new file mode 100644 index 00000000000..6466b993c45 --- /dev/null +++ b/pyk/regression-new/checkWarns/singletonOverload.k @@ -0,0 +1,11 @@ +module SINGLETONOVERLOAD-SYNTAX +endmodule + +module SINGLETONOVERLOAD + imports ID + + syntax LVal ::= L() [unused] + | LVal "." Id [unused, overload(_.)] + syntax Exp ::= LVal + | Exp "." Id [unused, overload(_._)] +endmodule diff --git a/pyk/regression-new/checkWarns/singletonOverload.k.out b/pyk/regression-new/checkWarns/singletonOverload.k.out new file mode 100644 index 00000000000..9c7d52ab526 --- /dev/null +++ b/pyk/regression-new/checkWarns/singletonOverload.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Production has an `overload(_)` attribute but is not an overload of any other production. + Source(singletonOverload.k) + Location(8,19,8,53) + 8 | | LVal "." Id [unused, overload(_.)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Production has an `overload(_)` attribute but is not an overload of any other production. + Source(singletonOverload.k) + Location(10,19,10,54) + 10 | | Exp "." Id [unused, overload(_._)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checkWarns/syntaxGroups.k b/pyk/regression-new/checkWarns/syntaxGroups.k new file mode 100644 index 00000000000..0ff65613508 --- /dev/null +++ b/pyk/regression-new/checkWarns/syntaxGroups.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module SYNTAXGROUPS-SYNTAX + syntax Exp ::= Exp "*" Exp [group(times), unused] + > Exp "+" Exp [group(plus), unused] + + syntax left times plus +endmodule + +module SYNTAXGROUPS + imports SYNTAXGROUPS-SYNTAX +endmodule diff --git a/pyk/regression-new/checkWarns/syntaxGroups.k.out b/pyk/regression-new/checkWarns/syntaxGroups.k.out new file mode 100644 index 00000000000..42955cf7330 --- /dev/null +++ b/pyk/regression-new/checkWarns/syntaxGroups.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Symbols _+__SYNTAXGROUPS-SYNTAX_Exp_Exp_Exp and _*__SYNTAXGROUPS-SYNTAX_Exp_Exp_Exp are in the same associativity group, but have different priorities. + Source(syntaxGroups.k) + Location(6,3,6,25) + 6 | syntax left times plus + . ^~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/Makefile b/pyk/regression-new/checks/Makefile new file mode 100644 index 00000000000..e4d1eb792b7 --- /dev/null +++ b/pyk/regression-new/checks/Makefile @@ -0,0 +1,3 @@ +KOMPILE_FLAGS=-w none + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/checks/anywhereSimplification.k b/pyk/regression-new/checks/anywhereSimplification.k new file mode 100644 index 00000000000..8a2d16be304 --- /dev/null +++ b/pyk/regression-new/checks/anywhereSimplification.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module ANYWHERESIMPLIFICATION + + syntax Foo ::= a() | b() + + rule a() => b() [anywhere, simplification] + +endmodule diff --git a/pyk/regression-new/checks/anywhereSimplification.k.out b/pyk/regression-new/checks/anywhereSimplification.k.out new file mode 100644 index 00000000000..09dee333fdf --- /dev/null +++ b/pyk/regression-new/checks/anywhereSimplification.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: anywhere attribute is not supported on simplification rules. + Source(anywhereSimplification.k) + Location(6,8,6,18) + 6 | rule a() => b() [anywhere, simplification] + . ^~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/anywhereSymbolic.k b/pyk/regression-new/checks/anywhereSymbolic.k new file mode 100644 index 00000000000..4e09bbdf241 --- /dev/null +++ b/pyk/regression-new/checks/anywhereSymbolic.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module ANYWHERESYMBOLIC + + syntax Foo ::= a() | b() + + rule a() => b() [anywhere, symbolic] + +endmodule diff --git a/pyk/regression-new/checks/anywhereSymbolic.k.out b/pyk/regression-new/checks/anywhereSymbolic.k.out new file mode 100644 index 00000000000..577e799b723 --- /dev/null +++ b/pyk/regression-new/checks/anywhereSymbolic.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: anywhere attribute is not supported on symbolic rules. + Source(anywhereSymbolic.k) + Location(6,8,6,18) + 6 | rule a() => b() [anywhere, symbolic] + . ^~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/attParamForbidden.k b/pyk/regression-new/checks/attParamForbidden.k new file mode 100644 index 00000000000..d4fe8b73c41 --- /dev/null +++ b/pyk/regression-new/checks/attParamForbidden.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module ATTPARAMFORBIDDEN + + syntax Foo ::= a() + rule a() => .K [owise(1)] + +endmodule diff --git a/pyk/regression-new/checks/attParamForbidden.k.out b/pyk/regression-new/checks/attParamForbidden.k.out new file mode 100644 index 00000000000..84df9f22d26 --- /dev/null +++ b/pyk/regression-new/checks/attParamForbidden.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Parameters for the attribute 'owise' are forbidden. + Source(attParamForbidden.k) + Location(5,19,5,27) + 5 | rule a() => .K [owise(1)] + . ^~~~~~~~ diff --git a/pyk/regression-new/checks/attParamRequired.k b/pyk/regression-new/checks/attParamRequired.k new file mode 100644 index 00000000000..25af2048a10 --- /dev/null +++ b/pyk/regression-new/checks/attParamRequired.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module ATTPARAMREQUIRED + + syntax Foo ::= a() + rule a() => .K [prec] + +endmodule diff --git a/pyk/regression-new/checks/attParamRequired.k.out b/pyk/regression-new/checks/attParamRequired.k.out new file mode 100644 index 00000000000..8c4687d0df7 --- /dev/null +++ b/pyk/regression-new/checks/attParamRequired.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Parameters for the attribute 'prec' are required. + Source(attParamRequired.k) + Location(5,19,5,23) + 5 | rule a() => .K [prec] + . ^~~~ diff --git a/pyk/regression-new/checks/badFunctionRuleWithContext.k b/pyk/regression-new/checks/badFunctionRuleWithContext.k new file mode 100644 index 00000000000..0cebb757ad0 --- /dev/null +++ b/pyk/regression-new/checks/badFunctionRuleWithContext.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module BADFUNCTIONRULEWITHCONTEXT + imports INT + imports BOOL + imports MAP + +syntax Int ::= foo(Int) [function] + +configuration $PGM:K 0 + +rule [[ foo(I:Int) => false ]] + I + +rule true => foo(0) + +endmodule diff --git a/pyk/regression-new/checks/badFunctionRuleWithContext.k.out b/pyk/regression-new/checks/badFunctionRuleWithContext.k.out new file mode 100644 index 00000000000..c2c1e588715 --- /dev/null +++ b/pyk/regression-new/checks/badFunctionRuleWithContext.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Unexpected sort Bool for term parsed as production syntax Bool ::= "false" [token]. Expected: Int + Source(badFunctionRuleWithContext.k) + Location(11,23,11,28) + 11 | rule [[ foo(I:Int) => false ]] + . ^~~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/binder.k b/pyk/regression-new/checks/binder.k new file mode 100644 index 00000000000..9ce0d39f714 --- /dev/null +++ b/pyk/regression-new/checks/binder.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "substitution.md" + +module BINDER + imports KVAR + + syntax Error ::= foo() [binder] + + syntax Error ::= foo(Error, Error) [binder] + + syntax Correct ::= foo(KVar, Error) [binder] +endmodule diff --git a/pyk/regression-new/checks/binder.k.out b/pyk/regression-new/checks/binder.k.out new file mode 100644 index 00000000000..8f2fa012a31 --- /dev/null +++ b/pyk/regression-new/checks/binder.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Binder productions must have at least two nonterminals. + Source(binder.k) + Location(7,20,7,34) + 7 | syntax Error ::= foo() [binder] + . ^~~~~~~~~~~~~~ +[Error] Compiler: First child of binder must have a sort with the 'KVAR.KVar' hook attribute. + Source(binder.k) + Location(9,20,9,46) + 9 | syntax Error ::= foo(Error, Error) [binder] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/checkAssoc.k b/pyk/regression-new/checks/checkAssoc.k new file mode 100644 index 00000000000..f0d19f44e70 --- /dev/null +++ b/pyk/regression-new/checks/checkAssoc.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKASSOC-SYNTAX + imports BOOL + imports INT + + configuration $PGM:Pgm + + syntax Pgm ::= Bool | Int + + syntax Bool ::= Bool "bad1" Int [left, function] + | Int "bad2" Bool [right, function] + | Bool "bad3" Int [non-assoc, function] + | Int "bad4" Bool [non-assoc, function] + | Bool "good1" Int [right, function] + | Int "good2" Bool [left, function] + | Bool "good3" Bool [non-assoc, function] + | Pgm "sub1" Int [right, function] + | Int "sub2" Pgm [left, function] + | Pgm "sub3" Pgm [non-assoc, function] +endmodule + +module CHECKASSOC + imports CHECKASSOC-SYNTAX +endmodule diff --git a/pyk/regression-new/checks/checkAssoc.k.out b/pyk/regression-new/checks/checkAssoc.k.out new file mode 100644 index 00000000000..89ad7d9ac0c --- /dev/null +++ b/pyk/regression-new/checks/checkAssoc.k.out @@ -0,0 +1,25 @@ +[Error] Compiler: left attribute not permitted on non-associative production. +Hint: The sub-sorting relation Bool <= Int does not hold, so the left attribute has no effect. + Source(checkAssoc.k) + Location(10,21,10,55) + 10 | syntax Bool ::= Bool "bad1" Int [left, function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: right attribute not permitted on non-associative production. +Hint: The sub-sorting relation Bool <= Int does not hold, so the right attribute has no effect. + Source(checkAssoc.k) + Location(11,21,11,56) + 11 | | Int "bad2" Bool [right, function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: non-assoc attribute not permitted on non-associative production. +Hint: One of the sub-sorting relations Bool <= Bool or Bool <= Int does not hold, so the non-assoc attribute has no effect. + Source(checkAssoc.k) + Location(12,21,12,60) + 12 | | Bool "bad3" Int [non-assoc, function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: non-assoc attribute not permitted on non-associative production. +Hint: One of the sub-sorting relations Bool <= Int or Bool <= Bool does not hold, so the non-assoc attribute has no effect. + Source(checkAssoc.k) + Location(13,21,13,60) + 13 | | Int "bad4" Bool [non-assoc, function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 4 structural errors. diff --git a/pyk/regression-new/checks/checkBracket.k b/pyk/regression-new/checks/checkBracket.k new file mode 100644 index 00000000000..8330e0aaadd --- /dev/null +++ b/pyk/regression-new/checks/checkBracket.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKBRACKET-SYNTAX + syntax Exp ::= "(" Exp Exp ")" [bracket] +endmodule + +module CHECKBRACKET + imports CHECKBRACKET-SYNTAX + +endmodule diff --git a/pyk/regression-new/checks/checkBracket.k.out b/pyk/regression-new/checks/checkBracket.k.out new file mode 100644 index 00000000000..326444a77c6 --- /dev/null +++ b/pyk/regression-new/checks/checkBracket.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: bracket productions should have exactly one non-terminal of the same sort as the production. + Source(checkBracket.k) + Location(3,18,3,43) + 3 | syntax Exp ::= "(" Exp Exp ")" [bracket] + . ^~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkBracketFine.k b/pyk/regression-new/checks/checkBracketFine.k new file mode 100644 index 00000000000..56e4245aa9f --- /dev/null +++ b/pyk/regression-new/checks/checkBracketFine.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKBRACKETFINE-SYNTAX + syntax Exp ::= "(" Exp [bracket] + syntax Exp ::= Exp ")" [bracket] + syntax Exp ::= "(" ")" Exp [bracket] + syntax Exp ::= "$" Exp [bracket] + syntax Exp ::= "%*()&@$)" Exp [bracket] + syntax Exp ::= "OQNFO" "LDKKSFH" Exp "()&*^Y" "\"LKSDH'" [bracket] + syntax {A} A ::= "(" A ")" [bracket] + syntax Exp ::= "(" Exp ")" [bracket] +endmodule + +module CHECKBRACKETFINE + imports CHECKBRACKETFINE-SYNTAX + +endmodule diff --git a/pyk/regression-new/checks/checkBracketFine.k.out b/pyk/regression-new/checks/checkBracketFine.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkBracketSubsort.k b/pyk/regression-new/checks/checkBracketSubsort.k new file mode 100644 index 00000000000..7c2b8a3b9b3 --- /dev/null +++ b/pyk/regression-new/checks/checkBracketSubsort.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKBRACKETSUBSORT-SYNTAX + syntax A + syntax Exp ::= A + syntax Exp ::= "(" A ")" [bracket] +endmodule + +module CHECKBRACKETSUBSORT + imports CHECKBRACKETSUBSORT-SYNTAX + +endmodule diff --git a/pyk/regression-new/checks/checkBracketSubsort.k.out b/pyk/regression-new/checks/checkBracketSubsort.k.out new file mode 100644 index 00000000000..8f614f2c686 --- /dev/null +++ b/pyk/regression-new/checks/checkBracketSubsort.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: bracket productions should have exactly one non-terminal of the same sort as the production. + Source(checkBracketSubsort.k) + Location(5,18,5,37) + 5 | syntax Exp ::= "(" A ")" [bracket] + . ^~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkBracketSupersort.k b/pyk/regression-new/checks/checkBracketSupersort.k new file mode 100644 index 00000000000..0a0eab0390f --- /dev/null +++ b/pyk/regression-new/checks/checkBracketSupersort.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKBRACKETSUPERSORT-SYNTAX + syntax A + syntax Exp ::= A + syntax A ::= "(" Exp ")" [bracket] +endmodule + +module CHECKBRACKETSUPERSORT + imports CHECKBRACKETSUPERSORT-SYNTAX + +endmodule diff --git a/pyk/regression-new/checks/checkBracketSupersort.k.out b/pyk/regression-new/checks/checkBracketSupersort.k.out new file mode 100644 index 00000000000..f7d963665ff --- /dev/null +++ b/pyk/regression-new/checks/checkBracketSupersort.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: bracket productions should have exactly one non-terminal of the same sort as the production. + Source(checkBracketSupersort.k) + Location(5,16,5,37) + 5 | syntax A ::= "(" Exp ")" [bracket] + . ^~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkBracketUnrelatedsort.k b/pyk/regression-new/checks/checkBracketUnrelatedsort.k new file mode 100644 index 00000000000..8b0949c13e9 --- /dev/null +++ b/pyk/regression-new/checks/checkBracketUnrelatedsort.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKBRACKET-SYNTAX + syntax A + syntax Exp ::= "(" A ")" [bracket] +endmodule + +module CHECKBRACKET + imports CHECKBRACKET-SYNTAX + +endmodule diff --git a/pyk/regression-new/checks/checkBracketUnrelatedsort.k.out b/pyk/regression-new/checks/checkBracketUnrelatedsort.k.out new file mode 100644 index 00000000000..bf79b819d9f --- /dev/null +++ b/pyk/regression-new/checks/checkBracketUnrelatedsort.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: bracket productions should have exactly one non-terminal of the same sort as the production. + Source(checkBracketUnrelatedsort.k) + Location(4,18,4,37) + 4 | syntax Exp ::= "(" A ")" [bracket] + . ^~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkCellSortDeclFail.k b/pyk/regression-new/checks/checkCellSortDeclFail.k new file mode 100644 index 00000000000..f370c470c48 --- /dev/null +++ b/pyk/regression-new/checks/checkCellSortDeclFail.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CHECKCELLSORTDECLFAIL-SYNTAX + syntax Pgm +endmodule + +module CHECKCELLSORTDECLFAIL + imports CHECKCELLSORTDECLFAIL-SYNTAX + +configuration $PGM:Pgm + +syntax Pgm ::= MisTypedCell + +endmodule diff --git a/pyk/regression-new/checks/checkCellSortDeclFail.k.out b/pyk/regression-new/checks/checkCellSortDeclFail.k.out new file mode 100644 index 00000000000..8697f70a4d5 --- /dev/null +++ b/pyk/regression-new/checks/checkCellSortDeclFail.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Could not find sorts: [MisTypedCell] + Source(checkCellSortDeclFail.k) + Location(12,16,12,28) + 12 | syntax Pgm ::= MisTypedCell + . ^~~~~~~~~~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/checkCellSortDeclOK.k b/pyk/regression-new/checks/checkCellSortDeclOK.k new file mode 100644 index 00000000000..bd61a4549a1 --- /dev/null +++ b/pyk/regression-new/checks/checkCellSortDeclOK.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CHECKCELLSORTDECLOK-SYNTAX + syntax Pgm +endmodule + +module CHECKCELLSORTDECLOK + imports CHECKCELLSORTDECLOK-SYNTAX + +configuration $PGM:Pgm + +syntax Pgm ::= KCell + +endmodule diff --git a/pyk/regression-new/checks/checkCellSortDeclOK.k.out b/pyk/regression-new/checks/checkCellSortDeclOK.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkCellSortDeclOKIssue.k b/pyk/regression-new/checks/checkCellSortDeclOKIssue.k new file mode 100644 index 00000000000..034f52ea97c --- /dev/null +++ b/pyk/regression-new/checks/checkCellSortDeclOKIssue.k @@ -0,0 +1,29 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CHECKCELLSORTDECLOKISSUE-SYNTAX +endmodule + +module EVM + imports INT + + configuration + + $PGM:Int + 0 + + +endmodule + +module CHECKCELLSORTDECLOKISSUE + imports EVM + + configuration + + + $FOO:KItem + + + syntax AccountItem ::= AccountCell + // ---------------------------------- + +endmodule diff --git a/pyk/regression-new/checks/checkCellSortDeclOKIssue.k.out b/pyk/regression-new/checks/checkCellSortDeclOKIssue.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkCircularList.k b/pyk/regression-new/checks/checkCircularList.k new file mode 100644 index 00000000000..8ed7bfa0e84 --- /dev/null +++ b/pyk/regression-new/checks/checkCircularList.k @@ -0,0 +1,34 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKCIRCULARLIST-SYNTAX + imports INT-SYNTAX + imports LIST + + syntax Exp ::= Int + | "(" Exp ")" [bracket] + | Exp "*" Exp [left, strict] + > Exp "+" Exp [left, strict] + | Exp "-" Exp [left, strict] + + syntax ExpList ::= List{Exp, ";"} [strict] + syntax Exp ::= ExpList + | eval(Exp) [strict] + + syntax KResult ::= Int | ExpList + +endmodule + +module CHECKCIRCULARLIST + imports CHECKCIRCULARLIST-SYNTAX + imports INT + + rule L::Int + R::Int => L +Int R + rule L::Int - R::Int => L -Int R + rule L::Int * R::Int => L *Int R + + rule eval(E::Exp) => E + rule eval(E::Exp; Es::ExpList) => eval(E); eval(Es) + rule eval(.ExpList) => .ExpList + + configuration eval($PGM:ExpList) +endmodule + diff --git a/pyk/regression-new/checks/checkCircularList.k.out b/pyk/regression-new/checks/checkCircularList.k.out new file mode 100644 index 00000000000..017afc66824 --- /dev/null +++ b/pyk/regression-new/checks/checkCircularList.k.out @@ -0,0 +1,2 @@ +[Error] Compiler: Had 1 parsing errors. +[Error] Compiler: Illegal circular relation: Exp < ExpList < Exp diff --git a/pyk/regression-new/checks/checkDuplicateList.k b/pyk/regression-new/checks/checkDuplicateList.k new file mode 100644 index 00000000000..b2143251c26 --- /dev/null +++ b/pyk/regression-new/checks/checkDuplicateList.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKDUPLICATELIST-SYNTAX + imports INT-SYNTAX + syntax MyList ::= List{Int,""} +endmodule + +module CHECKDUPLICATELIST + imports CHECKDUPLICATELIST-SYNTAX + syntax MyList ::= List{Int,""} +endmodule diff --git a/pyk/regression-new/checks/checkDuplicateList.k.out b/pyk/regression-new/checks/checkDuplicateList.k.out new file mode 100644 index 00000000000..fe9fbee7e2e --- /dev/null +++ b/pyk/regression-new/checks/checkDuplicateList.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Sort MyList previously declared as a user list at Source(checkDuplicateList.k) and Location(4,21,4,33) + Source(checkDuplicateList.k) + Location(9,21,9,33) + 9 | syntax MyList ::= List{Int,""} + . ^~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkExcludeSimplification.k b/pyk/regression-new/checks/checkExcludeSimplification.k new file mode 100644 index 00000000000..fd6b6971106 --- /dev/null +++ b/pyk/regression-new/checks/checkExcludeSimplification.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKEXCLUDESIMPLIFICATION-SYNTAX +endmodule + +module CHECKEXCLUDESIMPLIFICATION + imports CHECKEXCLUDESIMPLIFICATION-SYNTAX + imports INT + +syntax Int ::= f(Int) [function, total] +syntax Int ::= g(Int) [function, total] + +rule g(f(X)) => X [simplification] + +endmodule diff --git a/pyk/regression-new/checks/checkExcludeSimplification.k.out b/pyk/regression-new/checks/checkExcludeSimplification.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkFuncRuleAtt.k b/pyk/regression-new/checks/checkFuncRuleAtt.k new file mode 100644 index 00000000000..713f71df351 --- /dev/null +++ b/pyk/regression-new/checks/checkFuncRuleAtt.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKFUNCRULEATT-SYNTAX +endmodule +module CHECKFUNCRULEATT + imports CHECKFUNCRULEATT-SYNTAX + imports INT + syntax FOO ::= "foo" [function] + | Int + configuration foo + 0 + rule foo => 0 [macro] + rule foo => 1 [macro-rec] + rule foo => 2 [alias] + rule foo => 3 [alias-rec] + rule foo => 4 + rule 5 => foo + rule [[ foo => 6 ]] + 7 [macro] + rule [[ foo => 8 ]] + 9 +endmodule diff --git a/pyk/regression-new/checks/checkFuncRuleAtt.k.out b/pyk/regression-new/checks/checkFuncRuleAtt.k.out new file mode 100644 index 00000000000..02ad205fcdf --- /dev/null +++ b/pyk/regression-new/checks/checkFuncRuleAtt.k.out @@ -0,0 +1,28 @@ +[Error] Compiler: Rule cannot have the following attributes: [macro] + Source(checkFuncRuleAtt.k) + Location(11,10,11,18) + 11 | rule foo => 0 [macro] + . ^~~~~~~~ +[Error] Compiler: Rule cannot have the following attributes: [macro-rec] + Source(checkFuncRuleAtt.k) + Location(12,10,12,18) + 12 | rule foo => 1 [macro-rec] + . ^~~~~~~~ +[Error] Compiler: Rule cannot have the following attributes: [alias] + Source(checkFuncRuleAtt.k) + Location(13,10,13,18) + 13 | rule foo => 2 [alias] + . ^~~~~~~~ +[Error] Compiler: Rule cannot have the following attributes: [alias-rec] + Source(checkFuncRuleAtt.k) + Location(14,10,14,18) + 14 | rule foo => 3 [alias-rec] + . ^~~~~~~~ +[Error] Compiler: Rule cannot have the following attributes: [macro] + Source(checkFuncRuleAtt.k) + Location(17,10,18,26) + . v~~~~~~~~~~~~~ + 17 | rule [[ foo => 6 ]] + 18 | 7 [macro] + . ~~~~~~~~~~~~~~~^ +[Error] Compiler: Had 5 structural errors. diff --git a/pyk/regression-new/checks/checkFuncWithContext.k b/pyk/regression-new/checks/checkFuncWithContext.k new file mode 100644 index 00000000000..2929eef437f --- /dev/null +++ b/pyk/regression-new/checks/checkFuncWithContext.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKFUNCWITHCONTEXT-SYNTAX + imports INT-SYNTAX + syntax S ::= func(Int) [function] + syntax S ::= "a" +endmodule + +module CHECKFUNCWITHCONTEXT + imports CHECKFUNCWITHCONTEXT-SYNTAX + imports INT + configuration $PGM:Int .Map + rule [[ func(1) => a ]] + .Map +endmodule diff --git a/pyk/regression-new/checks/checkFuncWithContext.k.out b/pyk/regression-new/checks/checkFuncWithContext.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkGroup.k b/pyk/regression-new/checks/checkGroup.k new file mode 100644 index 00000000000..82808630618 --- /dev/null +++ b/pyk/regression-new/checks/checkGroup.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKGROUP + syntax Int ::= r"[\\+-]?[0-9]+" [prefer, token, prec(2)] + | Int "+" Int [group(fun,)] +endmodule diff --git a/pyk/regression-new/checks/checkGroup.k.out b/pyk/regression-new/checks/checkGroup.k.out new file mode 100644 index 00000000000..115acdee904 --- /dev/null +++ b/pyk/regression-new/checks/checkGroup.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: group(_) attribute expects a comma separated list of groups, each of which consists of a lower case letter followed by any number of alphanumeric or '-' characters. + Source(checkGroup.k) + Location(4,18,4,43) + 4 | | Int "+" Int [group(fun,)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkInstantiation.k b/pyk/regression-new/checks/checkInstantiation.k new file mode 100644 index 00000000000..b3e6afd56c3 --- /dev/null +++ b/pyk/regression-new/checks/checkInstantiation.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKINSTANTIATION-SYNTAX + imports MINT-SYNTAX +endmodule + +module CHECKINSTANTIATION + imports CHECKINSTANTIATION-SYNTAX + imports MINT + + syntax KItem ::= foo(MInt{6}) + +endmodule diff --git a/pyk/regression-new/checks/checkInstantiation.k.out b/pyk/regression-new/checks/checkInstantiation.k.out new file mode 100644 index 00000000000..6b41f95a874 --- /dev/null +++ b/pyk/regression-new/checks/checkInstantiation.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Could not find sorts: [MInt{6}] + Source(checkInstantiation.k) + Location(10,20,10,32) + 10 | syntax KItem ::= foo(MInt{6}) + . ^~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkIsSort.k b/pyk/regression-new/checks/checkIsSort.k new file mode 100644 index 00000000000..e2fb263b5ff --- /dev/null +++ b/pyk/regression-new/checks/checkIsSort.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKISSORT-SYNTAX + imports BOOL-SYNTAX + imports BASIC-K + + syntax Foo ::= Blah(Bool) + + syntax Bool ::= isNonAddr(KItem) [function] + | isNotASort(KItem) [function] + | isNonAddr(Foo) [function] + | isnonaddr(KItem) [function] + | isNonAddr ( KItem , KItem ) [function] + | isFoo(Foo) [function] + + syntax NonAddr ::= nonAddr(KItem) +endmodule + +module CHECKISSORT + imports CHECKISSORT-SYNTAX +endmodule diff --git a/pyk/regression-new/checks/checkIsSort.k.out b/pyk/regression-new/checks/checkIsSort.k.out new file mode 100644 index 00000000000..442440051d8 --- /dev/null +++ b/pyk/regression-new/checks/checkIsSort.k.out @@ -0,0 +1,21 @@ +[Error] Compiler: Syntax declaration conflicts with automatically generated isNonAddr predicate. + Source(checkIsSort.k) + Location(8,19,8,47) + 8 | syntax Bool ::= isNonAddr(KItem) [function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Syntax declaration conflicts with automatically generated isNonAddr predicate. + Source(checkIsSort.k) + Location(10,19,10,47) + 10 | | isNonAddr(Foo) [function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Syntax declaration conflicts with automatically generated isNonAddr predicate. + Source(checkIsSort.k) + Location(12,19,12,57) + 12 | | isNonAddr ( KItem , KItem ) [function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Syntax declaration conflicts with automatically generated isFoo predicate. + Source(checkIsSort.k) + Location(13,19,13,40) + 13 | | isFoo(Foo) [function] + . ^~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 4 structural errors. diff --git a/pyk/regression-new/checks/checkListDecl1.k b/pyk/regression-new/checks/checkListDecl1.k new file mode 100644 index 00000000000..2fbcef14d5d --- /dev/null +++ b/pyk/regression-new/checks/checkListDecl1.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CHECKLISTDECL1-SYNTAX + syntax Pgm +endmodule + +module CHECKLISTDECL1 + imports CHECKLISTDECL1-SYNTAX + +configuration $PGM:Pgm + +syntax KItem ::= List{Int,""} + +endmodule diff --git a/pyk/regression-new/checks/checkListDecl1.k.out b/pyk/regression-new/checks/checkListDecl1.k.out new file mode 100644 index 00000000000..aa3f98429a4 --- /dev/null +++ b/pyk/regression-new/checks/checkListDecl1.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: KItem can not be extended to be a list sort. + Source(checkListDecl1.k) + Location(12,18,12,30) + 12 | syntax KItem ::= List{Int,""} + . ^~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkListDecl2.k b/pyk/regression-new/checks/checkListDecl2.k new file mode 100644 index 00000000000..d4dfb44d31a --- /dev/null +++ b/pyk/regression-new/checks/checkListDecl2.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CHECKLISTDECL2-SYNTAX + syntax Pgm +endmodule + +module CHECKLISTDECL2 + imports CHECKLISTDECL2-SYNTAX + +configuration $PGM:Pgm + +syntax Int ::= List{Int,""} + +endmodule diff --git a/pyk/regression-new/checks/checkListDecl2.k.out b/pyk/regression-new/checks/checkListDecl2.k.out new file mode 100644 index 00000000000..23becc68186 --- /dev/null +++ b/pyk/regression-new/checks/checkListDecl2.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Circular lists are not allowed. + Source(checkListDecl2.k) + Location(12,16,12,28) + 12 | syntax Int ::= List{Int,""} + . ^~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkListDecl3.k b/pyk/regression-new/checks/checkListDecl3.k new file mode 100644 index 00000000000..1208e993788 --- /dev/null +++ b/pyk/regression-new/checks/checkListDecl3.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CHECKLISTDECL3-SYNTAX + syntax Pgm +endmodule + +module CHECKLISTDECL3 + imports CHECKLISTDECL3-SYNTAX + +configuration $PGM:Pgm + +syntax KItem ::= Int "+" List{Int,""} + +endmodule diff --git a/pyk/regression-new/checks/checkListDecl3.k.out b/pyk/regression-new/checks/checkListDecl3.k.out new file mode 100644 index 00000000000..4ae2a40f0f6 --- /dev/null +++ b/pyk/regression-new/checks/checkListDecl3.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Inline list declarations are not allowed. + Source(checkListDecl3.k) + Location(12,26,12,38) + 12 | syntax KItem ::= Int "+" List{Int,""} + . ^~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkMIntLiteral.k b/pyk/regression-new/checks/checkMIntLiteral.k new file mode 100644 index 00000000000..de84a669d75 --- /dev/null +++ b/pyk/regression-new/checks/checkMIntLiteral.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKMINTLITERAL-SYNTAX + imports MINT-SYNTAX +endmodule + +module CHECKMINTLITERAL + imports CHECKMINTLITERAL-SYNTAX + imports MINT + imports INT + + syntax MInt{6} + syntax KItem ::= foo(MInt{6}) + + rule foo(0p32) => 0 + +endmodule diff --git a/pyk/regression-new/checks/checkMIntLiteral.k.out b/pyk/regression-new/checks/checkMIntLiteral.k.out new file mode 100644 index 00000000000..dd88ed7514f --- /dev/null +++ b/pyk/regression-new/checks/checkMIntLiteral.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Unexpected sort MInt{32} for term parsed as production syntax MInt{32} ::= r"[\\+-]?[0-9]+[pP][0-9]+" [hook(MINT.literal), prec(2), token]. Expected: MInt{6} + Source(checkMIntLiteral.k) + Location(14,12,14,16) + 14 | rule foo(0p32) => 0 + . ^~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/checkMacroRecord.k b/pyk/regression-new/checks/checkMacroRecord.k new file mode 100644 index 00000000000..c1d71a01f2d --- /dev/null +++ b/pyk/regression-new/checks/checkMacroRecord.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// +// https://github.com/runtimeverification/k/issues/2217 +// do not generate sort projections for macro symbols +module CHECKMACRORECORD + imports INT + + configuration $PGM:Int + + syntax Int ::= f ( a: Int, b: Int ) [macro] + // ----------------------------------- + rule f(X, Y) => X +Int Y + +endmodule diff --git a/pyk/regression-new/checks/checkMacroRecord.k.out b/pyk/regression-new/checks/checkMacroRecord.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkModuleAtts.k b/pyk/regression-new/checks/checkModuleAtts.k new file mode 100644 index 00000000000..77825de915f --- /dev/null +++ b/pyk/regression-new/checks/checkModuleAtts.k @@ -0,0 +1,3 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKMODULEATTS [foo, group(bar), baz] +endmodule diff --git a/pyk/regression-new/checks/checkModuleAtts.k.out b/pyk/regression-new/checks/checkModuleAtts.k.out new file mode 100644 index 00000000000..bd9b1eb32e1 --- /dev/null +++ b/pyk/regression-new/checks/checkModuleAtts.k.out @@ -0,0 +1,15 @@ +[Error] Compiler: Module cannot have the following attributes: [group] + Source(checkModuleAtts.k) + Location(2,1,3,10) + . v~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2 | module CHECKMODULEATTS [foo, group(bar), baz] + 3 | endmodule + . ~~~~~~~~^ +[Error] Compiler: Unrecognized attributes: [baz, foo] + Source(checkModuleAtts.k) + Location(2,1,3,10) + . v~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 2 | module CHECKMODULEATTS [foo, group(bar), baz] + 3 | endmodule + . ~~~~~~~~^ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/checkParametricSort.k b/pyk/regression-new/checks/checkParametricSort.k new file mode 100644 index 00000000000..85bc2a174e3 --- /dev/null +++ b/pyk/regression-new/checks/checkParametricSort.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKPARAMETRICSORT +imports MINT +imports INT + +syntax MInt{6} +syntax {S} Foo{S} +endmodule diff --git a/pyk/regression-new/checks/checkParametricSort.k.out b/pyk/regression-new/checks/checkParametricSort.k.out new file mode 100644 index 00000000000..04b183f486a --- /dev/null +++ b/pyk/regression-new/checks/checkParametricSort.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: User-defined parametric sorts are currently unsupported: Foo{S} + Source(checkParametricSort.k) + Location(7,1,7,18) + 7 | syntax {S} Foo{S} + . ^~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/checkPriorityBlocks.k b/pyk/regression-new/checks/checkPriorityBlocks.k new file mode 100644 index 00000000000..6b9443a70f2 --- /dev/null +++ b/pyk/regression-new/checks/checkPriorityBlocks.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKPRIORITYBLOCKS + imports INT + + syntax Exp ::= Int + | "[" Exp "]" [bracket, applyPriority(1)] + > Exp "+" Exp + rule [1 + 2] => .K +endmodule diff --git a/pyk/regression-new/checks/checkPriorityBlocks.k.out b/pyk/regression-new/checks/checkPriorityBlocks.k.out new file mode 100644 index 00000000000..56e7b49a2b9 --- /dev/null +++ b/pyk/regression-new/checks/checkPriorityBlocks.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Priority filter exception. Cannot use _+__CHECKPRIORITYBLOCKS_Exp_Exp_Exp as an immediate child of [_]_CHECKPRIORITYBLOCKS_Exp_Exp. Consider using parentheses around _+__CHECKPRIORITYBLOCKS_Exp_Exp_Exp + Source(checkPriorityBlocks.k) + Location(8,9,8,14) + 8 | rule [1 + 2] => .K + . ^~~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/checkRecordProdDuplicateLabels.k b/pyk/regression-new/checks/checkRecordProdDuplicateLabels.k new file mode 100644 index 00000000000..290bdfbe46c --- /dev/null +++ b/pyk/regression-new/checks/checkRecordProdDuplicateLabels.k @@ -0,0 +1,79 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKRECORDPRODDUPLICATELABELS-SYNTAX +endmodule + +module CHECKRECORDPRODDUPLICATELABELS + imports CHECKRECORDPRODDUPLICATELABELS-SYNTAX + imports INT + imports MAP + imports LIST + syntax StateCell ::= Int +syntax StateCell ::= invariantStateFull( + p1:Int, + p2:Int, + p3:Int, + p4:Int, + p5:Int, + p6:Int, + P7:Int, + p8:Int, + p9:Int, + p10:Int, + P11:Int, + p12:Int, + p13:Int, + p14:Int, + p15:Int, + p16:Int, + numUsers:Int, + userIdToAddress:Map, + addressToUserId:Map, + numBoardMembers:Int, + numProposers:Int, + userIdToRole:Map, + quorum:Int, + actionLastIndex:Int, + actionData:Map, + actionSigners:Map, + callerAddress:KItem, + stack:Int, + variables:Map, + performedActions:List) // 30 params + rule invariantStateFull(... p1:X, p1:Y) => 1 // duplicate keys here, rest should be fine + rule invariantStateFull(... p2:X, numUsers:_Gen0, p2:Y) => 1 // duplicate keys here, rest should be fine + rule invariantStateFull(... numUsers:_X, stack:_Y, quorum:_Z, variables:_P) => 1 + rule invariantStateFull(... quorum:_Z, variables:_P, numUsers:_X, stack:_Y, p1:_Q) => 1 + rule invariantStateFull(... numUsers:_X) ~> invariantStateFull(...) => 1 + + syntax StateCell ::= abc(one:Int) + rule abc(... one:X) => 1 + + syntax Mix ::= Int + syntax Mix ::= "a" p1:Int + "b" p2:Int + "c" p3:Int + "d" p4:Int + "e" p5:Int + "f" p6:Int + "g" p7:Int + "h" p8:Int + "i" p9:Int + "j" p10:Int + "k" p11:Int + "l" p12:Int + "m" p13:Int + "n" p14:Int + "o" p15:Map + "p" p16:Int + "q" p17:Int + "r" p18:Int + "s" p19:Int + "t" p20:KItem + "u" p21:Int + "v" p22:Int + "w" p23:Int + "x" p24:Int + "y" p25:Int + "z" p26:Int + rule a _ b _ c _ d _ e _ f _ g _ h _ i _ j _ k _ l _ m _ n _ o _ p _ q _ r _ s _ t _ u _ v _ w _ x _ y _ z _ => 1 +endmodule diff --git a/pyk/regression-new/checks/checkRecordProdDuplicateLabels.k.out b/pyk/regression-new/checks/checkRecordProdDuplicateLabels.k.out new file mode 100644 index 00000000000..b277816ef0e --- /dev/null +++ b/pyk/regression-new/checks/checkRecordProdDuplicateLabels.k.out @@ -0,0 +1,11 @@ +[Error] Inner Parser: Duplicate record production key: p1 + Source(checkRecordProdDuplicateLabels.k) + Location(42,7,42,41) + 42 | rule invariantStateFull(... p1:X, p1:Y) => 1 // duplicate keys here, rest should be fine + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Inner Parser: Duplicate record production key: p2 + Source(checkRecordProdDuplicateLabels.k) + Location(43,7,43,57) + 43 | rule invariantStateFull(... p2:X, numUsers:_Gen0, p2:Y) => 1 // duplicate keys here, rest should be fine + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 2 parsing errors. diff --git a/pyk/regression-new/checks/checkReservedCellNames.k b/pyk/regression-new/checks/checkReservedCellNames.k new file mode 100644 index 00000000000..1173481b941 --- /dev/null +++ b/pyk/regression-new/checks/checkReservedCellNames.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKRESERVEDCELLNAMES-SYNTAX + imports INT-SYNTAX + +endmodule + +module CHECKRESERVEDCELLNAMES + imports INT + imports CHECKRESERVEDCELLNAMES-SYNTAX + + configuration + $PGM + 0 + 1 + +endmodule diff --git a/pyk/regression-new/checks/checkReservedCellNames.k.out b/pyk/regression-new/checks/checkReservedCellNames.k.out new file mode 100644 index 00000000000..648ae407ad1 --- /dev/null +++ b/pyk/regression-new/checks/checkReservedCellNames.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Cell name is reserved by K. + Source(checkReservedCellNames.k) + Location(13,6,13,22) + 13 | 0 + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Cell name is reserved by K. + Source(checkReservedCellNames.k) + Location(14,6,14,18) + 14 | 1 + . ^~~~~~~~~~~~ +[Error] Compiler: Had 2 parsing errors. diff --git a/pyk/regression-new/checks/checkSortDeclIssue3038.k b/pyk/regression-new/checks/checkSortDeclIssue3038.k new file mode 100644 index 00000000000..8f2b4e3482e --- /dev/null +++ b/pyk/regression-new/checks/checkSortDeclIssue3038.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKSORTDECLISSUE3038-SYNTAX + imports STRING + + syntax Token ::= "token" [token] + + syntax Token ::= String2Token( String ) [function, total, hook(STRING.string2token)] + + syntax Nested ::= nested( Token ) + +endmodule + +module CHECKSORTDECLISSUE3038 + imports CHECKSORTDECLISSUE3038-SYNTAX + + //syntax Token + syntax Nested ::= "NESTED_ALIAS" [alias] + rule NESTED_ALIAS => nested( String2Token("token") ) +endmodule diff --git a/pyk/regression-new/checks/checkSortDeclIssue3038.k.out b/pyk/regression-new/checks/checkSortDeclIssue3038.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkStrictBOOLInclusion.k b/pyk/regression-new/checks/checkStrictBOOLInclusion.k new file mode 100644 index 00000000000..ce3263af936 --- /dev/null +++ b/pyk/regression-new/checks/checkStrictBOOLInclusion.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CHECKSTRICTBOOLINCLUSION-SYNTAX +// https://github.com/runtimeverification/k/issues/2564 +// imports BOOL + syntax MyBool ::= "mytrue" | "myfalse" + syntax BExp ::= MyBool | BExp "myand" BExp [strict] + + syntax KResult ::= MyBool + +endmodule + +module CHECKSTRICTBOOLINCLUSION + imports CHECKSTRICTBOOLINCLUSION-SYNTAX + + rule mytrue myand B2 => B2 + rule myfalse myand _ => myfalse + +endmodule diff --git a/pyk/regression-new/checks/checkStrictBOOLInclusion.k.out b/pyk/regression-new/checks/checkStrictBOOLInclusion.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/checkSymbolKlabel.k b/pyk/regression-new/checks/checkSymbolKlabel.k new file mode 100644 index 00000000000..f6a32c2e395 --- /dev/null +++ b/pyk/regression-new/checks/checkSymbolKlabel.k @@ -0,0 +1,4 @@ +module CHECKSYMBOLKLABEL + syntax Foo ::= foo() [symbol(foo)] + | bar() [symbol(bar), klabel(baz)] +endmodule diff --git a/pyk/regression-new/checks/checkSymbolKlabel.k.out b/pyk/regression-new/checks/checkSymbolKlabel.k.out new file mode 100644 index 00000000000..21b21189a44 --- /dev/null +++ b/pyk/regression-new/checks/checkSymbolKlabel.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: The 1-argument form of the `symbol(_)` attribute cannot be combined with `klabel(_)`. + Source(checkSymbolKlabel.k) + Location(3,18,3,50) + 3 | | bar() [symbol(bar), klabel(baz)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/checkTerminatorSymbol.k b/pyk/regression-new/checks/checkTerminatorSymbol.k new file mode 100644 index 00000000000..511f4c1973a --- /dev/null +++ b/pyk/regression-new/checks/checkTerminatorSymbol.k @@ -0,0 +1,10 @@ +module CHECKTERMINATORSYMBOL + imports INT + syntax KItem ::= foo() + | bar() [terminator-symbol(bar)] + + syntax Ints ::= List{Int, ","} [symbol(ints), terminator-symbol(.ints)] + + syntax PipeInts ::= List{Int, "|"} [symbol(pipe-ints), terminator-symbol(.pipe-ints)] + syntax Oops ::= oops() [symbol(.pipe-ints)] +endmodule diff --git a/pyk/regression-new/checks/checkTerminatorSymbol.k.out b/pyk/regression-new/checks/checkTerminatorSymbol.k.out new file mode 100644 index 00000000000..21d2d9b563d --- /dev/null +++ b/pyk/regression-new/checks/checkTerminatorSymbol.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: The attribute 'terminator-symbol' cannot be applied to a production that does not declare a syntactic list. + Source(checkTerminatorSymbol.k) + Location(4,20,4,50) + 4 | | bar() [terminator-symbol(bar)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Symbol .pipe-ints is not unique. Previously defined as: syntax Oops ::= "oops" "(" ")" [symbol(.pipe-ints)] + Source(checkTerminatorSymbol.k) + Location(8,23,8,88) + 8 | syntax PipeInts ::= List{Int, "|"} [symbol(pipe-ints), terminator-symbol(.pipe-ints)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/checkUndeclaredTags.k b/pyk/regression-new/checks/checkUndeclaredTags.k new file mode 100644 index 00000000000..f3566aed947 --- /dev/null +++ b/pyk/regression-new/checks/checkUndeclaredTags.k @@ -0,0 +1,4 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + syntax priority a > b +endmodule diff --git a/pyk/regression-new/checks/checkUndeclaredTags.k.out b/pyk/regression-new/checks/checkUndeclaredTags.k.out new file mode 100644 index 00000000000..eac478430ca --- /dev/null +++ b/pyk/regression-new/checks/checkUndeclaredTags.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: Could not find any productions for tag: a + Source(checkUndeclaredTags.k) + Location(3,3,3,24) + 3 | syntax priority a > b + . ^~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/circularImports.k b/pyk/regression-new/checks/circularImports.k new file mode 100644 index 00000000000..1441dc54c62 --- /dev/null +++ b/pyk/regression-new/checks/circularImports.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module A imports B endmodule +module B imports C endmodule +module C imports D endmodule +module D imports E endmodule +module E imports A endmodule diff --git a/pyk/regression-new/checks/circularImports.k.out b/pyk/regression-new/checks/circularImports.k.out new file mode 100644 index 00000000000..e9a5df2e1cc --- /dev/null +++ b/pyk/regression-new/checks/circularImports.k.out @@ -0,0 +1 @@ +[Error] Compiler: Found circularity in module imports: E < D < C < B < A < E diff --git a/pyk/regression-new/checks/claimInDef.k b/pyk/regression-new/checks/claimInDef.k new file mode 100644 index 00000000000..b6374651c95 --- /dev/null +++ b/pyk/regression-new/checks/claimInDef.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CLAIMINDEF + + claim _ => . + +endmodule diff --git a/pyk/regression-new/checks/claimInDef.k.out b/pyk/regression-new/checks/claimInDef.k.out new file mode 100644 index 00000000000..94270185443 --- /dev/null +++ b/pyk/regression-new/checks/claimInDef.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Claims are not allowed in the definition. + Source(claimInDef.k) + Location(5,11,5,17) + 5 | claim _ => . + . ^~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/concrete.k b/pyk/regression-new/checks/concrete.k new file mode 100644 index 00000000000..f629672b584 --- /dev/null +++ b/pyk/regression-new/checks/concrete.k @@ -0,0 +1,36 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CONCRETE + imports INT + + rule 0 +Int X => X [symbolic, simplification] + rule 1 +Int X => X +Int 1 [concrete, simplification] + rule 0 *Int X => 0 [symbolic] + rule 1 *Int X => X [concrete] + + syntax Int ::= foo(Int) [function] + rule foo(0) => 0 [symbolic, concrete] + + syntax Int ::= bar(Int) [function] + rule bar(0) => 0 [symbolic] + + syntax Int ::= bar2(Int) [function] + rule bar2(0) => 0 [symbolic] + rule bar2(1) => 1 + rule bar2(2) => 2 [simplification] + + syntax Int ::= baz(Int) [function] + rule baz(0) => 0 [concrete] + rule baz(1) => 1 [simplification] + + syntax Int ::= baz2(Int) [function] + rule baz2(0) => 0 [concrete] + rule baz2(1) => 1 + + syntax Int ::= baz3(Int) [function] + rule baz3(X) => 0 [concrete(X)] + + syntax Int ::= baz4(Int, Int) [function] + rule baz4(A, B) => baz4(B, A) [concrete(A), symbolic(A, B), simplification] + rule baz4(A, B) => baz4(B, A) [concrete(A), symbolic, simplification] + rule baz4(C, D) => baz4(D, C) [concrete(C), symbolic(D), simplification] +endmodule diff --git a/pyk/regression-new/checks/concrete.k.out b/pyk/regression-new/checks/concrete.k.out new file mode 100644 index 00000000000..36de2f3e0a7 --- /dev/null +++ b/pyk/regression-new/checks/concrete.k.out @@ -0,0 +1,41 @@ +[Error] Compiler: Found symbolic attribute without simplification attribute on function with one or more non-symbolic rules. + Source(concrete.k) + Location(7,8,7,21) + 7 | rule 0 *Int X => 0 [symbolic] + . ^~~~~~~~~~~~~ +[Error] Compiler: Found concrete attribute without simplification attribute on function with one or more non-concrete rules. + Source(concrete.k) + Location(8,8,8,21) + 8 | rule 1 *Int X => X [concrete] + . ^~~~~~~~~~~~~ +[Error] Compiler: Rule cannot be both concrete and symbolic in the same variable. + Source(concrete.k) + Location(11,8,11,19) + 11 | rule foo(0) => 0 [symbolic, concrete] + . ^~~~~~~~~~~ +[Error] Compiler: Found symbolic attribute without simplification attribute on function with one or more non-symbolic rules. + Source(concrete.k) + Location(17,8,17,20) + 17 | rule bar2(0) => 0 [symbolic] + . ^~~~~~~~~~~~ +[Error] Compiler: Found concrete attribute without simplification attribute on function with one or more non-concrete rules. + Source(concrete.k) + Location(26,8,26,20) + 26 | rule baz2(0) => 0 [concrete] + . ^~~~~~~~~~~~ +[Error] Compiler: Found concrete attribute without simplification attribute on function with one or more non-concrete rules. + Source(concrete.k) + Location(30,8,30,20) + 30 | rule baz3(X) => 0 [concrete(X)] + . ^~~~~~~~~~~~ +[Error] Compiler: Rule cannot be both concrete and symbolic in the same variable: [A] + Source(concrete.k) + Location(33,8,33,32) + 33 | rule baz4(A, B) => baz4(B, A) [concrete(A), symbolic(A, B), simplification] + . ^~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Rule cannot be both concrete and symbolic in the same variable. + Source(concrete.k) + Location(34,8,34,32) + 34 | rule baz4(A, B) => baz4(B, A) [concrete(A), symbolic, simplification] + . ^~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 8 structural errors. diff --git a/pyk/regression-new/checks/duplicateAttRule.k b/pyk/regression-new/checks/duplicateAttRule.k new file mode 100644 index 00000000000..16001ced7b3 --- /dev/null +++ b/pyk/regression-new/checks/duplicateAttRule.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DUPLICATEATTRULE + + syntax Foo ::= a() + rule a() => .K [concrete, concrete] + +endmodule diff --git a/pyk/regression-new/checks/duplicateAttRule.k.out b/pyk/regression-new/checks/duplicateAttRule.k.out new file mode 100644 index 00000000000..26001fe8577 --- /dev/null +++ b/pyk/regression-new/checks/duplicateAttRule.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: Duplicate attribute: concrete + Source(duplicateAttRule.k) + Location(5,29,5,37) + 5 | rule a() => .K [concrete, concrete] + . ^~~~~~~~ diff --git a/pyk/regression-new/checks/duplicateAttSyntax.k b/pyk/regression-new/checks/duplicateAttSyntax.k new file mode 100644 index 00000000000..af4c122ef6d --- /dev/null +++ b/pyk/regression-new/checks/duplicateAttSyntax.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DUPLICATEATTSYNTAX + + syntax Foo ::= a() [left, left] + +endmodule diff --git a/pyk/regression-new/checks/duplicateAttSyntax.k.out b/pyk/regression-new/checks/duplicateAttSyntax.k.out new file mode 100644 index 00000000000..2085913a0ad --- /dev/null +++ b/pyk/regression-new/checks/duplicateAttSyntax.k.out @@ -0,0 +1,5 @@ +[Error] Outer Parser: Duplicate attribute: left + Source(duplicateAttSyntax.k) + Location(4,30,4,34) + 4 | syntax Foo ::= a() [left, left] + . ^~~~ diff --git a/pyk/regression-new/checks/duplicateContextLabels.k b/pyk/regression-new/checks/duplicateContextLabels.k new file mode 100644 index 00000000000..df124090e1d --- /dev/null +++ b/pyk/regression-new/checks/duplicateContextLabels.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DUPLICATECONTEXTLABELS + imports INT + + syntax KResult ::= Int + syntax A ::= "a" + | foo( A, A ) + + context [foo-left]: foo( HOLE, _ ) + context [foo-right]: foo( _, HOLE ) + + rule [foo-left-cool]: a => 1 + +endmodule diff --git a/pyk/regression-new/checks/duplicateContextLabels.k.out b/pyk/regression-new/checks/duplicateContextLabels.k.out new file mode 100644 index 00000000000..238e532e9ce --- /dev/null +++ b/pyk/regression-new/checks/duplicateContextLabels.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: The generated label for a context rule conflicts with a user-defined label at Source(duplicateContextLabels.k) and Location(12,25,12,31). Please consider renaming. + Source(duplicateContextLabels.k) + Location(9,24,9,41) + 9 | context [foo-left]: foo( HOLE, _ ) + . ^~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/duplicateKCells.k b/pyk/regression-new/checks/duplicateKCells.k new file mode 100644 index 00000000000..dc638f090d0 --- /dev/null +++ b/pyk/regression-new/checks/duplicateKCells.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DUPLICATEKCELLS-SYNTAX + + configuration $PGM:K + +endmodule + +module DUPLICATEKCELLS + imports DUPLICATEKCELLS-SYNTAX + + configuration $PGM:Int + + configuration + $PGM:Int + .Map + + +endmodule diff --git a/pyk/regression-new/checks/duplicateKCells.k.out b/pyk/regression-new/checks/duplicateKCells.k.out new file mode 100644 index 00000000000..4fc8f3a9226 --- /dev/null +++ b/pyk/regression-new/checks/duplicateKCells.k.out @@ -0,0 +1,25 @@ +[Error] Compiler: Multiple K cell declarations detected. Only one cell declaration is allowed. + Source(duplicateKCells.k) + Location(4,19,4,34) + 4 | configuration $PGM:K + . ^~~~~~~~~~~~~~~ +[Error] Compiler: Multiple K cell declarations detected. Only one cell declaration is allowed. + Source(duplicateKCells.k) + Location(11,19,11,36) + 11 | configuration $PGM:Int + . ^~~~~~~~~~~~~~~~~ +[Error] Compiler: Multiple K cell declarations detected. Only one cell declaration is allowed. + Source(duplicateKCells.k) + Location(13,19,16,23) + . v~~ + 13 | configuration + | ... + 16 | + . ~~~^ +[Error] Compiler: Multiple K cell declarations detected. Only one cell declaration is allowed. + Source(duplicateKCells.k) + Location(14,23,14,40) + 14 | $PGM:Int + . ^~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 4 parsing errors. +[Error] Compiler: Had 5 parsing errors. diff --git a/pyk/regression-new/checks/duplicateModule.k b/pyk/regression-new/checks/duplicateModule.k new file mode 100644 index 00000000000..261fac0148b --- /dev/null +++ b/pyk/regression-new/checks/duplicateModule.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DUPLICATEMODULE + +endmodule + +module DUPLICATEMODULE + +endmodule diff --git a/pyk/regression-new/checks/duplicateModule.k.out b/pyk/regression-new/checks/duplicateModule.k.out new file mode 100644 index 00000000000..818f70fd87b --- /dev/null +++ b/pyk/regression-new/checks/duplicateModule.k.out @@ -0,0 +1,9 @@ +[Error] Outer Parser: Module DUPLICATEMODULE differs from previous declaration at Source(duplicateModule.k) and Location(2,1,4,10) + Source(duplicateModule.k) + Location(6,1,8,10) + . v~~~~~~~~~~~~~~~~~~~~~ + 6 | module DUPLICATEMODULE + 7 | + 8 | endmodule + . ~~~~~~~~^ +[Error] Outer Parser: Had 1 outer parsing errors. diff --git a/pyk/regression-new/checks/duplicateRules.k b/pyk/regression-new/checks/duplicateRules.k new file mode 100644 index 00000000000..8b16337e7dc --- /dev/null +++ b/pyk/regression-new/checks/duplicateRules.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DUPLICATERULES-SYNTAX +endmodule + +module DUPLICATERULES + imports INT + claim A => 0 + claim A => 0 + claim A => 0 +endmodule diff --git a/pyk/regression-new/checks/duplicateRules.k.out b/pyk/regression-new/checks/duplicateRules.k.out new file mode 100644 index 00000000000..5a3a082a749 --- /dev/null +++ b/pyk/regression-new/checks/duplicateRules.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Claims are not allowed in the definition. + Source(duplicateRules.k) + Location(7,9,7,15) + 7 | claim A => 0 + . ^~~~~~ +[Error] Compiler: Claims are not allowed in the definition. + Source(duplicateRules.k) + Location(8,9,8,15) + 8 | claim A => 0 + . ^~~~~~ +[Error] Compiler: Claims are not allowed in the definition. + Source(duplicateRules.k) + Location(9,9,9,15) + 9 | claim A => 0 + . ^~~~~~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checks/emptyMapCollection.k b/pyk/regression-new/checks/emptyMapCollection.k new file mode 100644 index 00000000000..dcd3c4313c9 --- /dev/null +++ b/pyk/regression-new/checks/emptyMapCollection.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module EMPTYMAPCOLLECTION + configuration + + + .Bag + + +endmodule \ No newline at end of file diff --git a/pyk/regression-new/checks/emptyMapCollection.k.out b/pyk/regression-new/checks/emptyMapCollection.k.out new file mode 100644 index 00000000000..23df175f07a --- /dev/null +++ b/pyk/regression-new/checks/emptyMapCollection.k.out @@ -0,0 +1,9 @@ +[Error] Compiler: Cells of type Map expect at least one child cell as their key + Source(emptyMapCollection.k) + Location(5,7,7,14) + . v~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + 5 | + 6 | .Bag + 7 | + . ~~~~~~^ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/errorExistential.k b/pyk/regression-new/checks/errorExistential.k new file mode 100644 index 00000000000..7965c681729 --- /dev/null +++ b/pyk/regression-new/checks/errorExistential.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module ERROREXISTENTIAL + imports INT + +rule 0 => ?I:Int + +endmodule diff --git a/pyk/regression-new/checks/errorExistential.k.out b/pyk/regression-new/checks/errorExistential.k.out new file mode 100644 index 00000000000..18b32cd2f9d --- /dev/null +++ b/pyk/regression-new/checks/errorExistential.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(errorExistential.k) + Location(5,11,5,13) + 5 | rule 0 => ?I:Int + . ^~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/existentialCheck.k b/pyk/regression-new/checks/existentialCheck.k new file mode 100644 index 00000000000..bd23b5b87ac --- /dev/null +++ b/pyk/regression-new/checks/existentialCheck.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module EXISTENTIALCHECK + + imports K-EQUAL + imports BOOL + + syntax Program ::= "stateA" | "stateB" + syntax Bool ::= isDone(Program) [function] + + rule stateA => stateB + + rule isDone(stateB) => true + rule isDone(_) => false [owise] + + claim ?X:Int => . + + rule ?X:Int => . + + rule stateA => ?STATE + requires isDone(?STATE) + +endmodule diff --git a/pyk/regression-new/checks/existentialCheck.k.out b/pyk/regression-new/checks/existentialCheck.k.out new file mode 100644 index 00000000000..f3bd0b7f497 --- /dev/null +++ b/pyk/regression-new/checks/existentialCheck.k.out @@ -0,0 +1,41 @@ +[Error] Compiler: Claims are not allowed in the definition. + Source(existentialCheck.k) + Location(15,9,15,29) + 15 | claim ?X:Int => . + . ^~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Existential variable ?X found in LHS. Existential variables are only allowed in the RHS. + Source(existentialCheck.k) + Location(15,13,15,15) + 15 | claim ?X:Int => . + . ^~ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(existentialCheck.k) + Location(15,13,15,15) + 15 | claim ?X:Int => . + . ^~ +[Error] Compiler: Existential variable ?X found in LHS. Existential variables are only allowed in the RHS. + Source(existentialCheck.k) + Location(17,12,17,14) + 17 | rule ?X:Int => . + . ^~ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(existentialCheck.k) + Location(17,12,17,14) + 17 | rule ?X:Int => . + . ^~ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(existentialCheck.k) + Location(19,22,19,28) + 19 | rule stateA => ?STATE + . ^~~~~~ +[Error] Compiler: Existential variable ?STATE found in LHS. Existential variables are only allowed in the RHS. + Source(existentialCheck.k) + Location(20,21,20,27) + 20 | requires isDone(?STATE) + . ^~~~~~ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(existentialCheck.k) + Location(20,21,20,27) + 20 | requires isDone(?STATE) + . ^~~~~~ +[Error] Compiler: Had 8 structural errors. diff --git a/pyk/regression-new/checks/existsLHSBoundFail.k b/pyk/regression-new/checks/existsLHSBoundFail.k new file mode 100644 index 00000000000..8ad9535bdaa --- /dev/null +++ b/pyk/regression-new/checks/existsLHSBoundFail.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module EXISTSLHSBOUNDFAIL-SYNTAX + imports INT-SYNTAX +endmodule + +module EXISTSLHSBOUNDFAIL + imports EXISTSLHSBOUNDFAIL-SYNTAX + imports INT + +// rule { C #Equals { C }:>Int } => #Exists I1. { C #Equals I1:Int } [simplification] + rule { C #Equals { C }:>Int } => #Exists ?I1. { C #Equals ?I1:Int } [simplification] +endmodule diff --git a/pyk/regression-new/checks/existsLHSBoundFail.k.out b/pyk/regression-new/checks/existsLHSBoundFail.k.out new file mode 100644 index 00000000000..a35e7e4af84 --- /dev/null +++ b/pyk/regression-new/checks/existsLHSBoundFail.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(existsLHSBoundFail.k) + Location(11,44,11,47) + 11 | rule { C #Equals { C }:>Int } => #Exists ?I1. { C #Equals ?I1:Int } [simplification] + . ^~~ +[Error] Compiler: Found existential variable not supported by concrete backend. + Source(existsLHSBoundFail.k) + Location(11,61,11,64) + 11 | rule { C #Equals { C }:>Int } => #Exists ?I1. { C #Equals ?I1:Int } [simplification] + . ^~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/existsLHSBoundPass.k b/pyk/regression-new/checks/existsLHSBoundPass.k new file mode 100644 index 00000000000..426b13d64f0 --- /dev/null +++ b/pyk/regression-new/checks/existsLHSBoundPass.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module EXISTSLHSBOUNDPASS-SYNTAX + imports INT-SYNTAX +endmodule + +module EXISTSLHSBOUNDPASS + imports EXISTSLHSBOUNDPASS-SYNTAX + imports INT + + rule { C #Equals { C }:>Int } => #Exists I1. { C #Equals I1:Int } [simplification] +// rule { C #Equals { C }:>Int } => #Exists ?I1. { C #Equals ?I1:Int } [simplification] +endmodule diff --git a/pyk/regression-new/checks/existsLHSBoundPass.k.out b/pyk/regression-new/checks/existsLHSBoundPass.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/expandMacroEnsures.k b/pyk/regression-new/checks/expandMacroEnsures.k new file mode 100644 index 00000000000..871963111a8 --- /dev/null +++ b/pyk/regression-new/checks/expandMacroEnsures.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module EXPANDMACROENSURES + imports INT + imports BOOL + + syntax Int ::= #foo ( Int ) [function] + syntax Bool ::= #baz ( Int ) [alias] + +// rule #baz ( X ) => X // NOTE I should be defined !! + + rule #foo( X ) => X ensures #baz( X ) +endmodule diff --git a/pyk/regression-new/checks/expandMacroEnsures.k.out b/pyk/regression-new/checks/expandMacroEnsures.k.out new file mode 100644 index 00000000000..d293d876591 --- /dev/null +++ b/pyk/regression-new/checks/expandMacroEnsures.k.out @@ -0,0 +1,9 @@ +[Error] Compiler: Rule contains macro symbol that was not expanded + Source(expandMacroEnsures.k) + Location(12,10,12,49) + 12 | rule #foo( X ) => X ensures #baz( X ) + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors after macro expansion. + while executing phase "expand macros" on sentence at + Source(expandMacroEnsures.k) + Location(12,10,12,49) diff --git a/pyk/regression-new/checks/expandMacroRequires.k b/pyk/regression-new/checks/expandMacroRequires.k new file mode 100644 index 00000000000..aee4470ca9e --- /dev/null +++ b/pyk/regression-new/checks/expandMacroRequires.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module EXPANDMACROREQUIRES + imports INT + imports BOOL + + syntax Int ::= #foo ( Int ) [function] + syntax Bool ::= #bar ( Int ) [alias] + +// rule #bar ( X ) => X >Int 0 // NOTE I should be defined !! + + rule #foo( X ) => X requires #bar( X ) +endmodule diff --git a/pyk/regression-new/checks/expandMacroRequires.k.out b/pyk/regression-new/checks/expandMacroRequires.k.out new file mode 100644 index 00000000000..597759a38f0 --- /dev/null +++ b/pyk/regression-new/checks/expandMacroRequires.k.out @@ -0,0 +1,9 @@ +[Error] Compiler: Rule contains macro symbol that was not expanded + Source(expandMacroRequires.k) + Location(12,10,12,49) + 12 | rule #foo( X ) => X requires #bar( X ) + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors after macro expansion. + while executing phase "expand macros" on sentence at + Source(expandMacroRequires.k) + Location(12,10,12,49) diff --git a/pyk/regression-new/checks/formatatt.k b/pyk/regression-new/checks/formatatt.k new file mode 100644 index 00000000000..ec1089b19cb --- /dev/null +++ b/pyk/regression-new/checks/formatatt.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FORMATATT + imports BOOL + + syntax Stmt ::= "if" "(" Bool ")" Stmt "else" Stmt [avoid, colors(blue,red,red,blue), format(%1 %2%c%3%r%4 %5 %6 %7)] +endmodule diff --git a/pyk/regression-new/checks/formatatt.k.out b/pyk/regression-new/checks/formatatt.k.out new file mode 100644 index 00000000000..9ac1b1e6015 --- /dev/null +++ b/pyk/regression-new/checks/formatatt.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Invalid colors attribute: expected 5 colors, found 4 colors instead. + Source(formatatt.k) + Location(5,19,5,120) + 5 | syntax Stmt ::= "if" "(" Bool ")" Stmt "else" Stmt [avoid, colors(blue,red,red,blue), format(%1 %2%c%3%r%4 %5 %6 %7)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/freshConfig.k b/pyk/regression-new/checks/freshConfig.k new file mode 100644 index 00000000000..1b916e585dc --- /dev/null +++ b/pyk/regression-new/checks/freshConfig.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FRESHCONFIG-SYNTAX +endmodule + +module FRESHCONFIG + imports INT + + syntax Foo ::= foo(Int) + + syntax Foo ::= freshFoo(Int) [freshGenerator, function, total] + rule freshFoo(I:Int) => foo(I) + +configuration + $PGM:Int + !_:Foo + + rule 0 => !_:Foo + +endmodule diff --git a/pyk/regression-new/checks/freshConfig.k.out b/pyk/regression-new/checks/freshConfig.k.out new file mode 100644 index 00000000000..033068654f8 --- /dev/null +++ b/pyk/regression-new/checks/freshConfig.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Can't resolve fresh configuration variable not of sort Int + while executing phase "Resolve fresh variables in cell initializers" + Source(freshConfig.k) + Location(15,14,15,16) + 15 | !_:Foo + . ^~ diff --git a/pyk/regression-new/checks/functionContextInRewrite.k b/pyk/regression-new/checks/functionContextInRewrite.k new file mode 100644 index 00000000000..a983baf8ba5 --- /dev/null +++ b/pyk/regression-new/checks/functionContextInRewrite.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FUNCTIONCONTEXTINREWRITE + imports INT + imports BOOL + imports MAP + +configuration $PGM:K 0 + +rule 0 => ([[ 1 ]] 0 ) + +endmodule diff --git a/pyk/regression-new/checks/functionContextInRewrite.k.out b/pyk/regression-new/checks/functionContextInRewrite.k.out new file mode 100644 index 00000000000..968f865a770 --- /dev/null +++ b/pyk/regression-new/checks/functionContextInRewrite.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Parse error: unexpected token '[' following token '('. + Source(functionContextInRewrite.k) + Location(9,12,9,13) + 9 | rule 0 => ([[ 1 ]] 0 ) + . ^ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/functionSimplification.k b/pyk/regression-new/checks/functionSimplification.k new file mode 100644 index 00000000000..981c0d0189f --- /dev/null +++ b/pyk/regression-new/checks/functionSimplification.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FUNCTIONSIMPLIFICATION-SYNTAX +endmodule + +module FUNCTIONSIMPLIFICATION + imports FUNCTIONSIMPLIFICATION-SYNTAX + + syntax Foo ::= a() | b() + + rule a() => b() [simplification] + +endmodule diff --git a/pyk/regression-new/checks/functionSimplification.k.out b/pyk/regression-new/checks/functionSimplification.k.out new file mode 100644 index 00000000000..7aac42069ee --- /dev/null +++ b/pyk/regression-new/checks/functionSimplification.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Simplification rules expect function/functional/mlOp symbols at the top of the left hand side term. + Source(functionSimplification.k) + Location(10,8,10,18) + 10 | rule a() => b() [simplification] + . ^~~~~~~~~~ diff --git a/pyk/regression-new/checks/intOperationInLHS.k b/pyk/regression-new/checks/intOperationInLHS.k new file mode 100644 index 00000000000..9ab026c1138 --- /dev/null +++ b/pyk/regression-new/checks/intOperationInLHS.k @@ -0,0 +1,23 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INTOPERATIONINLHS + imports INT + imports MAP + +syntax Int ::= "foo" "(" Int ")" [function] + +rule foo(_ +Int 1) => 0 + +syntax Int ::= bar(Map) [function] + +rule bar(foo(0) |-> 0) => 0 + +rule [[ bar(0 |-> 0) => foo(0) ]] + .K + +rule [[ bar(0 |-> 0) => 0 ]] + foo(0) + +rule [[ bar(0 |-> foo(0)) => foo(0) ]] + .K + +endmodule diff --git a/pyk/regression-new/checks/intOperationInLHS.k.out b/pyk/regression-new/checks/intOperationInLHS.k.out new file mode 100644 index 00000000000..a1a45eae46c --- /dev/null +++ b/pyk/regression-new/checks/intOperationInLHS.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Illegal function symbol _+Int_ on LHS of rule. Consider adding `simplification` attribute to the rule if this is intended. + Source(intOperationInLHS.k) + Location(8,10,8,18) + 8 | rule foo(_ +Int 1) => 0 + . ^~~~~~~~ +[Error] Compiler: Illegal function symbol foo(_)_INTOPERATIONINLHS_Int_Int on LHS of rule. Consider adding `simplification` attribute to the rule if this is intended. + Source(intOperationInLHS.k) + Location(18,10,18,16) + 18 | foo(0) + . ^~~~~~ +[Error] Compiler: Illegal function symbol foo(_)_INTOPERATIONINLHS_Int_Int on LHS of rule. Consider adding `simplification` attribute to the rule if this is intended. + Source(intOperationInLHS.k) + Location(20,19,20,25) + 20 | rule [[ bar(0 |-> foo(0)) => foo(0) ]] + . ^~~~~~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checks/invalidAs.k b/pyk/regression-new/checks/invalidAs.k new file mode 100644 index 00000000000..f16fb5ae5af --- /dev/null +++ b/pyk/regression-new/checks/invalidAs.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDAS + imports DOMAINS + + rule (0 #as 0) => 0 // Found #as pattern where the right side is not a variable. + rule Y => (0 #as Y) // #as is not allowed in the RHS of a rule. - issue #753 + rule (0 => 1) #as X // Rewrites are not allowed inside an #as pattern. + +endmodule diff --git a/pyk/regression-new/checks/invalidAs.k.out b/pyk/regression-new/checks/invalidAs.k.out new file mode 100644 index 00000000000..c81da701c46 --- /dev/null +++ b/pyk/regression-new/checks/invalidAs.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Found #as pattern where the right side is not a variable. + Source(invalidAs.k) + Location(5,9,5,16) + 5 | rule (0 #as 0) => 0 // Found #as pattern where the right side is not a variable. + . ^~~~~~~ +[Error] Compiler: #as is not allowed in the RHS of a rule. + Source(invalidAs.k) + Location(6,14,6,21) + 6 | rule Y => (0 #as Y) // #as is not allowed in the RHS of a rule. - issue #753 + . ^~~~~~~ +[Error] Compiler: Rewrites are not allowed inside an #as pattern. + Source(invalidAs.k) + Location(7,9,7,15) + 7 | rule (0 => 1) #as X // Rewrites are not allowed inside an #as pattern. + . ^~~~~~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checks/invalidConstantExp.k b/pyk/regression-new/checks/invalidConstantExp.k new file mode 100644 index 00000000000..3ddb5bd0060 --- /dev/null +++ b/pyk/regression-new/checks/invalidConstantExp.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDCONSTANTEXP + imports INT + + rule 0 => 1 /Int 0 + +endmodule diff --git a/pyk/regression-new/checks/invalidConstantExp.k.out b/pyk/regression-new/checks/invalidConstantExp.k.out new file mode 100644 index 00000000000..23cdb964bc9 --- /dev/null +++ b/pyk/regression-new/checks/invalidConstantExp.k.out @@ -0,0 +1,8 @@ +[Error] Compiler: Division by zero. + while executing phase "constant expression folding" on sentence at + Source(invalidConstantExp.k) + Location(5,8,5,21) + Source(invalidConstantExp.k) + Location(5,13,5,21) + 5 | rule 0 => 1 /Int 0 + . ^~~~~~~~ diff --git a/pyk/regression-new/checks/invalidConstructor.k b/pyk/regression-new/checks/invalidConstructor.k new file mode 100644 index 00000000000..f784a02b8bd --- /dev/null +++ b/pyk/regression-new/checks/invalidConstructor.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDCONSTRUCTOR + imports INT + syntax K ::= foo() + syntax Int ::= bar() +endmodule diff --git a/pyk/regression-new/checks/invalidConstructor.k.out b/pyk/regression-new/checks/invalidConstructor.k.out new file mode 100644 index 00000000000..d509ad2279e --- /dev/null +++ b/pyk/regression-new/checks/invalidConstructor.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Cannot add new constructors to hooked sort K + Source(invalidConstructor.k) + Location(4,16,4,21) + 4 | syntax K ::= foo() + . ^~~~~ +[Error] Compiler: Cannot add new constructors to hooked sort Int + Source(invalidConstructor.k) + Location(5,18,5,23) + 5 | syntax Int ::= bar() + . ^~~~~ +[Error] Compiler: Sort Int was declared as a token. Productions of this sort can only contain [function] or [token] labels. + Source(invalidConstructor.k) + Location(5,18,5,23) + 5 | syntax Int ::= bar() + . ^~~~~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checks/invalidFormat.k b/pyk/regression-new/checks/invalidFormat.k new file mode 100644 index 00000000000..6c667ff28ef --- /dev/null +++ b/pyk/regression-new/checks/invalidFormat.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDFORMAT + + syntax Foo ::= "foo" [format(%)] + + syntax Bar ::= "bar" [format(%c), colors(black)] + + syntax Baz ::= "baz" [format(%%%%c), colors(white)] + + syntax A ::= "a" [format(%0)] + + syntax B ::= "b" [format(%2)] + + syntax C ::= r"c" [format(%1)] + + syntax D ::= r"d" + + syntax E ::= r"e" "f" +endmodule diff --git a/pyk/regression-new/checks/invalidFormat.k.out b/pyk/regression-new/checks/invalidFormat.k.out new file mode 100644 index 00000000000..451c61c73a3 --- /dev/null +++ b/pyk/regression-new/checks/invalidFormat.k.out @@ -0,0 +1,36 @@ +[Error] Compiler: Invalid format attribute: unfinished escape sequence. + Source(invalidFormat.k) + Location(4,18,4,35) + 4 | syntax Foo ::= "foo" [format(%)] + . ^~~~~~~~~~~~~~~~~ +[Error] Compiler: Invalid colors attribute: expected 2 colors, found 1 colors instead. + Source(invalidFormat.k) + Location(6,18,6,51) + 6 | syntax Bar ::= "bar" [format(%c), colors(black)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Invalid format escape sequence '%0'. Expected a number between 1 and 1 + Source(invalidFormat.k) + Location(10,16,10,32) + 10 | syntax A ::= "a" [format(%0)] + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Invalid format escape sequence '%2'. Expected a number between 1 and 1 + Source(invalidFormat.k) + Location(12,16,12,32) + 12 | syntax B ::= "b" [format(%2)] + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Invalid format escape sequence referring to regular expression terminal 'r"c"'. + Source(invalidFormat.k) + Location(14,16,14,33) + 14 | syntax C ::= r"c" [format(%1)] + . ^~~~~~~~~~~~~~~~~ +[Error] Compiler: Expected format attribute on production with regular expression terminal. Did you forget the 'token' attribute? + Source(invalidFormat.k) + Location(16,16,16,20) + 16 | syntax D ::= r"d" + . ^~~~ +[Error] Compiler: Expected format attribute on production with regular expression terminal. + Source(invalidFormat.k) + Location(18,16,18,24) + 18 | syntax E ::= r"e" "f" + . ^~~~~~~~ +[Error] Compiler: Had 7 structural errors. diff --git a/pyk/regression-new/checks/invalidLabel.k b/pyk/regression-new/checks/invalidLabel.k new file mode 100644 index 00000000000..2455fc1fd57 --- /dev/null +++ b/pyk/regression-new/checks/invalidLabel.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDLABEL + imports BOOL + imports INT + + rule [foo`bar]: true => false + rule false => true [label(foo bar)] + rule 0 => 1 [label(foo`bar)] + +endmodule diff --git a/pyk/regression-new/checks/invalidLabel.k.out b/pyk/regression-new/checks/invalidLabel.k.out new file mode 100644 index 00000000000..0af6e51d1b3 --- /dev/null +++ b/pyk/regression-new/checks/invalidLabel.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Label 'INVALIDLABEL.foo`bar' cannot contain whitespace or backticks. + Source(invalidLabel.k) + Location(6,19,6,32) + 6 | rule [foo`bar]: true => false + . ^~~~~~~~~~~~~ +[Error] Compiler: Label 'foo bar' cannot contain whitespace or backticks. + Source(invalidLabel.k) + Location(7,8,7,21) + 7 | rule false => true [label(foo bar)] + . ^~~~~~~~~~~~~ +[Error] Compiler: Label 'foo`bar' cannot contain whitespace or backticks. + Source(invalidLabel.k) + Location(8,8,8,14) + 8 | rule 0 => 1 [label(foo`bar)] + . ^~~~~~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checks/invalidPrec.k b/pyk/regression-new/checks/invalidPrec.k new file mode 100644 index 00000000000..a135be787d9 --- /dev/null +++ b/pyk/regression-new/checks/invalidPrec.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDPREC + + syntax Foo ::= r"[0-9]+" [token] + +endmodule diff --git a/pyk/regression-new/checks/invalidPrec.k.out b/pyk/regression-new/checks/invalidPrec.k.out new file mode 100644 index 00000000000..faf42350403 --- /dev/null +++ b/pyk/regression-new/checks/invalidPrec.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Inconsistent token precedence detected. + Source(invalidPrec.k) + Location(4,17,4,34) + 4 | syntax Foo ::= r"[0-9]+" [token] + . ^~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/invalidSortPredicate.k b/pyk/regression-new/checks/invalidSortPredicate.k new file mode 100644 index 00000000000..072869781ab --- /dev/null +++ b/pyk/regression-new/checks/invalidSortPredicate.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDSORTPREDICATE + imports INT + imports BOOL + + syntax Exp + + rule isExp(I) => isInt(I) andBool configFunction() + + configuration $PGM:K .K + + syntax Bool ::= configFunction() [function] + rule [[ configFunction() => true ]] + .K + +endmodule diff --git a/pyk/regression-new/checks/invalidSortPredicate.k.out b/pyk/regression-new/checks/invalidSortPredicate.k.out new file mode 100644 index 00000000000..b0b831c98cf --- /dev/null +++ b/pyk/regression-new/checks/invalidSortPredicate.k.out @@ -0,0 +1,8 @@ +[Error] Compiler: Invalid sort predicate isExp that depends directly or indirectly on the current configuration. Is it possible to replace the sort predicate with a regular function? + while executing phase "Add sort injections" on sentence at + Source(invalidSortPredicate.k) + Location(8,8,8,53) + Source(invalidSortPredicate.k) + Location(8,8,8,16) + 8 | rule isExp(I) => isInt(I) andBool configFunction() + . ^~~~~~~~ diff --git a/pyk/regression-new/checks/invalidStrict.k b/pyk/regression-new/checks/invalidStrict.k new file mode 100644 index 00000000000..a6db67cee3a --- /dev/null +++ b/pyk/regression-new/checks/invalidStrict.k @@ -0,0 +1,31 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDSTRICT + imports BASIC-K + +syntax Foo ::= foo() [strict(1)] + +syntax Foo ::= foo(Foo) [strict(2)] + +syntax Foo ::= bar(Foo) [strict(foo; bar; 1)] + +syntax Bar ::= baz(K) [strict] + +syntax Bar ::= stuff(K, Foo) [strict(1)] + +syntax Bar ::= stuff2(K, Foo) [strict(2)] + +syntax Baz ::= plugh(K) + +syntax Baz ::= xyzzy(K) + +context plugh(HOLE:K) + +context plugh(HOLE) + +context alias [x]: xyzzy(HERE) + +syntax Baz ::= thingy(K) [seqstrict(x)] + +context plugh(HOLE:KItem) + +endmodule diff --git a/pyk/regression-new/checks/invalidStrict.k.out b/pyk/regression-new/checks/invalidStrict.k.out new file mode 100644 index 00000000000..7afcc0d0970 --- /dev/null +++ b/pyk/regression-new/checks/invalidStrict.k.out @@ -0,0 +1,41 @@ +[Error] Compiler: Cannot put a strict attribute on a production with no nonterminals + Source(invalidStrict.k) + Location(5,16,5,33) + 5 | syntax Foo ::= foo() [strict(1)] + . ^~~~~~~~~~~~~~~~~ +[Error] Compiler: Expecting a number between 1 and 1, but found 2 as a strict position in [2] + Source(invalidStrict.k) + Location(7,16,7,36) + 7 | syntax Foo ::= foo(Foo) [strict(2)] + . ^~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Invalid strict attribute containing invalid semicolons. Must contain 0, 1, 2, or an even number of components. + Source(invalidStrict.k) + Location(9,16,9,46) + 9 | syntax Foo ::= bar(Foo) [strict(foo; bar; 1)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Cannot heat a nonterminal of sort K. Did you mean KItem? + Source(invalidStrict.k) + Location(11,16,11,31) + 11 | syntax Bar ::= baz(K) [strict] + . ^~~~~~~~~~~~~~~ +[Error] Compiler: Cannot heat a nonterminal of sort K. Did you mean KItem? + Source(invalidStrict.k) + Location(13,16,13,41) + 13 | syntax Bar ::= stuff(K, Foo) [strict(1)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Cannot heat a HOLE of sort K. Did you mean to sort it to KItem? + Source(invalidStrict.k) + Location(21,15,21,21) + 21 | context plugh(HOLE:K) + . ^~~~~~ +[Error] Compiler: Cannot heat a HOLE of sort K. Did you mean to sort it to KItem? + Source(invalidStrict.k) + Location(23,15,23,19) + 23 | context plugh(HOLE) + . ^~~~ +[Error] Compiler: Cannot heat a nonterminal of sort K. Did you mean KItem? + Source(invalidStrict.k) + Location(27,16,27,40) + 27 | syntax Baz ::= thingy(K) [seqstrict(x)] + . ^~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 8 structural errors. diff --git a/pyk/regression-new/checks/invalidSymbol.k b/pyk/regression-new/checks/invalidSymbol.k new file mode 100644 index 00000000000..d538f158b1d --- /dev/null +++ b/pyk/regression-new/checks/invalidSymbol.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module INVALIDSYMBOL + +syntax Foo ::= foo() [klabel(#KToken), symbol] + +syntax Bar ::= bar() [klabel(foo), symbol] +syntax Baz ::= baz() [klabel(foo), symbol] + +syntax Exp ::= Val +syntax Val ::= "val" + +endmodule diff --git a/pyk/regression-new/checks/invalidSymbol.k.out b/pyk/regression-new/checks/invalidSymbol.k.out new file mode 100644 index 00000000000..4eb9bcc8cc0 --- /dev/null +++ b/pyk/regression-new/checks/invalidSymbol.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Symbol #KToken is not unique. Previously defined as: syntax KBott ::= "#token" "(" KString "," KString ")" [klabel(#KToken), symbol] + Source(invalidSymbol.k) + Location(4,16,4,47) + 4 | syntax Foo ::= foo() [klabel(#KToken), symbol] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Symbol foo is not unique. Previously defined as: syntax Bar ::= "bar" "(" ")" [klabel(foo), symbol] + Source(invalidSymbol.k) + Location(7,16,7,43) + 7 | syntax Baz ::= baz() [klabel(foo), symbol] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/localDuplicateList.k b/pyk/regression-new/checks/localDuplicateList.k new file mode 100644 index 00000000000..0ee928b49f5 --- /dev/null +++ b/pyk/regression-new/checks/localDuplicateList.k @@ -0,0 +1,10 @@ +module LOCALDUPLICATELIST-SYNTAX +endmodule + +module LOCALDUPLICATELIST + imports BOOL-SYNTAX + imports INT-SYNTAX + + syntax Foo ::= List{Bool, ","} + syntax Foo ::= List{Int, ";"} +endmodule diff --git a/pyk/regression-new/checks/localDuplicateList.k.out b/pyk/regression-new/checks/localDuplicateList.k.out new file mode 100644 index 00000000000..3512d96d4aa --- /dev/null +++ b/pyk/regression-new/checks/localDuplicateList.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Sort Foo previously declared as a user list at Source(localDuplicateList.k) and Location(9,18,9,32) + Source(localDuplicateList.k) + Location(8,18,8,33) + 8 | syntax Foo ::= List{Bool, ","} + . ^~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/macroWithFunction.k b/pyk/regression-new/checks/macroWithFunction.k new file mode 100644 index 00000000000..40a8a48ee70 --- /dev/null +++ b/pyk/regression-new/checks/macroWithFunction.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module MACROWITHFUNCTION + imports INT + imports BOOL + + configuration $PGM:Pgm + + syntax FInt ::= FInt ( value: Int , one: Int ) [klabel(FInt), symbol] + // --------------------------------------------------------------------- + + syntax Wad = FInt + syntax Wad ::= wad ( Int ) [macro] + // -------------------------- + rule wad(I) => FInt(I *Int WAD, WAD) + + syntax Int ::= "WAD" [macro] + // -------------------- + rule WAD => 1000000000000000000 + + syntax Pgm ::= "go" FInt | Pgm ";" Pgm [left] + // --------------------------------------------- + rule P ; Q => P ~> Q ... + rule go wad(0) => . ... +endmodule diff --git a/pyk/regression-new/checks/macroWithFunction.k.out b/pyk/regression-new/checks/macroWithFunction.k.out new file mode 100644 index 00000000000..ce74468a1a3 --- /dev/null +++ b/pyk/regression-new/checks/macroWithFunction.k.out @@ -0,0 +1,9 @@ +[Error] Compiler: Illegal function symbol _*Int_ on LHS of rule. Consider adding `simplification` attribute to the rule if this is intended. + Source(macroWithFunction.k) + Location(14,25,14,35) + 14 | rule wad(I) => FInt(I *Int WAD, WAD) + . ^~~~~~~~~~ +[Error] Compiler: Had 1 structural errors after macro expansion. + while executing phase "expand macros" on sentence at + Source(macroWithFunction.k) + Location(23,10,23,37) diff --git a/pyk/regression-new/checks/mapImportInConfigModules.k b/pyk/regression-new/checks/mapImportInConfigModules.k new file mode 100644 index 00000000000..3481207383b --- /dev/null +++ b/pyk/regression-new/checks/mapImportInConfigModules.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module MAPIMPORTINCONFIGMODULES-SYNTAX + imports INT-SYNTAX +endmodule + +module CONFIG + imports INT + syntax E ::= "balance" + configuration $PGM:Int .Map + +endmodule + +module MAPIMPORTINCONFIGMODULES + imports MAPIMPORTINCONFIGMODULES-SYNTAX + imports INT + imports CONFIG + + rule .Map => .Map + rule 0 => 1 +endmodule diff --git a/pyk/regression-new/checks/mapImportInConfigModules.k.out b/pyk/regression-new/checks/mapImportInConfigModules.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/checks/markdownErrorLocation.md b/pyk/regression-new/checks/markdownErrorLocation.md new file mode 100644 index 00000000000..895ea31f725 --- /dev/null +++ b/pyk/regression-new/checks/markdownErrorLocation.md @@ -0,0 +1,30 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +1 + ```k + // keep indentation + module MARKDOWNERRORLOCATION-SYNTAX + endmodule + ``` +7 +```{.a .b} +9 +``` +11 +```{.k .x} +module MARKDOWNERRORLOCATION + imports INT +``` + +``` { not used +} +``` + + ```k + rule 21 // pandoc would think this is line 20, column 7 + ``` + +```{.y .k} +endmodule // pandoc would miss this last unfinished block diff --git a/pyk/regression-new/checks/markdownErrorLocation.md.out b/pyk/regression-new/checks/markdownErrorLocation.md.out new file mode 100644 index 00000000000..6592325c6d1 --- /dev/null +++ b/pyk/regression-new/checks/markdownErrorLocation.md.out @@ -0,0 +1,6 @@ +[Error] Compiler: Rules must have at least one rewrite. + Source(markdownErrorLocation.md) + Location(26,8,26,10) + 26 | rule 21 // pandoc would think this is line 20, column 7 + . ^~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/missingBar.k b/pyk/regression-new/checks/missingBar.k new file mode 100644 index 00000000000..1504e23bfde --- /dev/null +++ b/pyk/regression-new/checks/missingBar.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module MISSINGBAR + + syntax Foo ::= foo () + bar () + + rule foo () => bar () + +endmodule + diff --git a/pyk/regression-new/checks/missingBar.k.out b/pyk/regression-new/checks/missingBar.k.out new file mode 100644 index 00000000000..ee796a8232f --- /dev/null +++ b/pyk/regression-new/checks/missingBar.k.out @@ -0,0 +1,6 @@ +[Error] Outer Parser: Encountered . +Was expecting one of: ["rule", "context", "configuration", "claim", "syntax", "endmodule", "[", ">", "|"] + Source(missingBar.k) + Location(5,18,5,21) + 5 | bar () + . ^~~ diff --git a/pyk/regression-new/checks/missingKResult.k b/pyk/regression-new/checks/missingKResult.k new file mode 100644 index 00000000000..ba73b06875a --- /dev/null +++ b/pyk/regression-new/checks/missingKResult.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "substitution.md" + +module MISSINGKRESULT + imports DOMAINS + imports SUBSTITUTION + + syntax Exp ::= Val + | Exp Exp + | "(" Exp ")" [bracket] + + syntax Val ::= Int | Bool + syntax Exp ::= Exp "*" Exp + | Exp "/" Exp [strict] + > Exp "+" Exp + > Exp "<=" Exp + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 + rule I1 + I2 => I1 +Int I2 + rule I1 <= I2 => I1 <=Int I2 +endmodule diff --git a/pyk/regression-new/checks/missingKResult.k.out b/pyk/regression-new/checks/missingKResult.k.out new file mode 100644 index 00000000000..a18cd7d9fa0 --- /dev/null +++ b/pyk/regression-new/checks/missingKResult.k.out @@ -0,0 +1,4 @@ +[Error] Compiler: Definition is missing function isKResult required for strictness. Please either declare sort KResult or declare 'syntax Bool ::= isKResult(K) [symbol(isKResult), function]' + while executing phase "resolving heat and cool attributes" on sentence at + Source(missingKResult.k) + Location(14,18,14,47) diff --git a/pyk/regression-new/checks/missingModule.k b/pyk/regression-new/checks/missingModule.k new file mode 100644 index 00000000000..736850f96aa --- /dev/null +++ b/pyk/regression-new/checks/missingModule.k @@ -0,0 +1,4 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports FOO +endmodule diff --git a/pyk/regression-new/checks/missingModule.k.out b/pyk/regression-new/checks/missingModule.k.out new file mode 100644 index 00000000000..a7d97588184 --- /dev/null +++ b/pyk/regression-new/checks/missingModule.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Could not find module: FOO + Source(missingModule.k) + Location(3,3,3,14) + 3 | imports FOO + . ^~~~~~~~~~~ diff --git a/pyk/regression-new/checks/nestedFunctionContext.k b/pyk/regression-new/checks/nestedFunctionContext.k new file mode 100644 index 00000000000..5b5c7229096 --- /dev/null +++ b/pyk/regression-new/checks/nestedFunctionContext.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NESTEDFUNCTIONCONTEXT + imports INT + imports BOOL + imports MAP + +syntax Int ::= foo(Int) [function] + +configuration $PGM:K 0 .K + +rule [[ foo(0) => 1 ]] + 0 + 0 + +rule [[[[foo(0) => 1]] + 0 ]] + 0 + +rule foo(0) => 1 + [[foo(0)]] .K + +endmodule diff --git a/pyk/regression-new/checks/nestedFunctionContext.k.out b/pyk/regression-new/checks/nestedFunctionContext.k.out new file mode 100644 index 00000000000..3427b463d2c --- /dev/null +++ b/pyk/regression-new/checks/nestedFunctionContext.k.out @@ -0,0 +1,11 @@ +[Error] Inner Parser: Parse error: unexpected token '[' following token '['. + Source(nestedFunctionContext.k) + Location(15,8,15,9) + 15 | rule [[[[foo(0) => 1]] + . ^ +[Error] Inner Parser: Parse error: unexpected token '' following token '1'. + Source(nestedFunctionContext.k) + Location(20,6,20,11) + 20 | [[foo(0)]] .K + . ^~~~~ +[Error] Compiler: Had 2 parsing errors. diff --git a/pyk/regression-new/checks/nestedFunctionContextInFun.k b/pyk/regression-new/checks/nestedFunctionContextInFun.k new file mode 100644 index 00000000000..c130585635b --- /dev/null +++ b/pyk/regression-new/checks/nestedFunctionContextInFun.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NESTEDFUNCTIONCONTEXTINFUN + imports INT + imports MAP + imports BOOL + +configuration $PGM:K 0 + +rule 0 => #fun([[0 => 1]] 0 )(0) + +rule 0 => #fun([[[[0 => 1]] 0 ]] 0 )(0) + +endmodule diff --git a/pyk/regression-new/checks/nestedFunctionContextInFun.k.out b/pyk/regression-new/checks/nestedFunctionContextInFun.k.out new file mode 100644 index 00000000000..c158578b89e --- /dev/null +++ b/pyk/regression-new/checks/nestedFunctionContextInFun.k.out @@ -0,0 +1,11 @@ +[Error] Inner Parser: Parse error: unexpected token '[' following token '('. + Source(nestedFunctionContextInFun.k) + Location(9,16,9,17) + 9 | rule 0 => #fun([[0 => 1]] 0 )(0) + . ^ +[Error] Inner Parser: Parse error: unexpected token '[' following token '('. + Source(nestedFunctionContextInFun.k) + Location(11,16,11,17) + 11 | rule 0 => #fun([[[[0 => 1]] 0 ]] 0 )(0) + . ^ +[Error] Compiler: Had 2 parsing errors. diff --git a/pyk/regression-new/checks/nestedRewrite.k b/pyk/regression-new/checks/nestedRewrite.k new file mode 100644 index 00000000000..b62b9011afa --- /dev/null +++ b/pyk/regression-new/checks/nestedRewrite.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NESTEDREWRITE + imports INT + +rule (1 => 2) => 3 +rule 1 => (2 => 3) +rule 1 => 2 + +endmodule diff --git a/pyk/regression-new/checks/nestedRewrite.k.out b/pyk/regression-new/checks/nestedRewrite.k.out new file mode 100644 index 00000000000..40963de6fb9 --- /dev/null +++ b/pyk/regression-new/checks/nestedRewrite.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Rewrites are not allowed to be nested. + Source(nestedRewrite.k) + Location(5,7,5,13) + 5 | rule (1 => 2) => 3 + . ^~~~~~ +[Error] Compiler: Rewrites are not allowed to be nested. + Source(nestedRewrite.k) + Location(6,12,6,18) + 6 | rule 1 => (2 => 3) + . ^~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/nestedRewriteInFun.k b/pyk/regression-new/checks/nestedRewriteInFun.k new file mode 100644 index 00000000000..bf28521dd80 --- /dev/null +++ b/pyk/regression-new/checks/nestedRewriteInFun.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NESTEDREWRITEINFUN + imports INT + +rule 0 => #fun(0 => 1)(0) +rule 0 => #fun(0 => (1 => 2))(0) +rule 0 => #fun((0 => 1) => 2)(0) + +syntax Foo ::= foo(Int) + +rule 1 => #fun(foo(0 => 1))(0) +rule 1 => #fun(foo(0 => (1 => 2)))(0) +rule 1 => #fun(foo((0 => 1) => 2))(0) + +endmodule diff --git a/pyk/regression-new/checks/nestedRewriteInFun.k.out b/pyk/regression-new/checks/nestedRewriteInFun.k.out new file mode 100644 index 00000000000..ff1aeafc1b7 --- /dev/null +++ b/pyk/regression-new/checks/nestedRewriteInFun.k.out @@ -0,0 +1,21 @@ +[Error] Compiler: Rewrites are not allowed to be nested. + Source(nestedRewriteInFun.k) + Location(6,22,6,28) + 6 | rule 0 => #fun(0 => (1 => 2))(0) + . ^~~~~~ +[Error] Compiler: Rewrites are not allowed to be nested. + Source(nestedRewriteInFun.k) + Location(7,17,7,23) + 7 | rule 0 => #fun((0 => 1) => 2)(0) + . ^~~~~~ +[Error] Compiler: Rewrites are not allowed to be nested. + Source(nestedRewriteInFun.k) + Location(12,26,12,32) + 12 | rule 1 => #fun(foo(0 => (1 => 2)))(0) + . ^~~~~~ +[Error] Compiler: Rewrites are not allowed to be nested. + Source(nestedRewriteInFun.k) + Location(13,21,13,27) + 13 | rule 1 => #fun(foo((0 => 1) => 2))(0) + . ^~~~~~ +[Error] Compiler: Had 4 structural errors. diff --git a/pyk/regression-new/checks/noImportFloat.k b/pyk/regression-new/checks/noImportFloat.k new file mode 100644 index 00000000000..8325b207e0a --- /dev/null +++ b/pyk/regression-new/checks/noImportFloat.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NOIMPORTFLOAT-SYNTAX + imports DOMAINS-SYNTAX + syntax Pgm ::= foo(x:Float) | bar() +endmodule + + +module NOIMPORTFLOAT + imports NOIMPORTFLOAT-SYNTAX + imports DOMAINS + + configuration + $PGM:Pgm + + +endmodule diff --git a/pyk/regression-new/checks/noImportFloat.k.out b/pyk/regression-new/checks/noImportFloat.k.out new file mode 100644 index 00000000000..d13eb1393b5 --- /dev/null +++ b/pyk/regression-new/checks/noImportFloat.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Could not find sorts: [Float] + Source(noImportFloat.k) + Location(4,19,4,31) + 4 | syntax Pgm ::= foo(x:Float) | bar() + . ^~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/noRewrite.k b/pyk/regression-new/checks/noRewrite.k new file mode 100644 index 00000000000..d665ff2da4b --- /dev/null +++ b/pyk/regression-new/checks/noRewrite.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NOREWRITE + imports INT + +rule 0 + +endmodule diff --git a/pyk/regression-new/checks/noRewrite.k.out b/pyk/regression-new/checks/noRewrite.k.out new file mode 100644 index 00000000000..8aa35fada2d --- /dev/null +++ b/pyk/regression-new/checks/noRewrite.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Rules must have at least one rewrite. + Source(noRewrite.k) + Location(5,6,5,7) + 5 | rule 0 + . ^ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/noRewriteInFun.k b/pyk/regression-new/checks/noRewriteInFun.k new file mode 100644 index 00000000000..9fb3bbb187c --- /dev/null +++ b/pyk/regression-new/checks/noRewriteInFun.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NOREWRITEINFUN + imports INT + +rule 0 => #fun(0)(0) + +endmodule diff --git a/pyk/regression-new/checks/noRewriteInFun.k.out b/pyk/regression-new/checks/noRewriteInFun.k.out new file mode 100644 index 00000000000..566dd94967c --- /dev/null +++ b/pyk/regression-new/checks/noRewriteInFun.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: #fun expressions must have at least one rewrite. + Source(noRewriteInFun.k) + Location(5,11,5,21) + 5 | rule 0 => #fun(0)(0) + . ^~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/overloadKLabel.k b/pyk/regression-new/checks/overloadKLabel.k new file mode 100644 index 00000000000..6543bc08c37 --- /dev/null +++ b/pyk/regression-new/checks/overloadKLabel.k @@ -0,0 +1,6 @@ +module OVERLOADKLABEL + imports ID + syntax Exp ::= LVal + | Exp "." Id [klabel(_._), overload(_._)] + syntax LVal ::= LVal "." Id [overload(_._)] +endmodule diff --git a/pyk/regression-new/checks/overloadKLabel.k.out b/pyk/regression-new/checks/overloadKLabel.k.out new file mode 100644 index 00000000000..44d93e75af2 --- /dev/null +++ b/pyk/regression-new/checks/overloadKLabel.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: The attributes `klabel(_)` and `overload(_)` may not occur together. + Source(overloadKLabel.k) + Location(4,19,4,59) + 4 | | Exp "." Id [klabel(_._), overload(_._)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/paramAmb.k b/pyk/regression-new/checks/paramAmb.k new file mode 100644 index 00000000000..70842bb3a6d --- /dev/null +++ b/pyk/regression-new/checks/paramAmb.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module PARAMAMB + + syntax T ::= "wrap" M | "wrap" X + syntax A + syntax B + syntax M ::= A | B + syntax N ::= A | B | X + syntax X + syntax KItem ::= label(N, T) + + rule X => label(X, wrap X) + +endmodule diff --git a/pyk/regression-new/checks/paramAmb.k.out b/pyk/regression-new/checks/paramAmb.k.out new file mode 100644 index 00000000000..f79d574534a --- /dev/null +++ b/pyk/regression-new/checks/paramAmb.k.out @@ -0,0 +1,12 @@ +[Error] Inner Parser: Parsing ambiguity. +1: syntax {Sort} Sort ::= Sort "=>" Sort [klabel(#KRewrite), symbol] + #KRewrite(#SemanticCastToB(#token("X","#KVariable")),`label(_,_)_PARAMAMB_KItem_N_T`(#SemanticCastToB(#token("X","#KVariable")),`wrap__PARAMAMB_T_M`(#SemanticCastToB(#token("X","#KVariable"))))) +2: syntax {Sort} Sort ::= Sort "=>" Sort [klabel(#KRewrite), symbol] + #KRewrite(#SemanticCastToX(#token("X","#KVariable")),`label(_,_)_PARAMAMB_KItem_N_T`(#SemanticCastToX(#token("X","#KVariable")),`wrap__PARAMAMB_T_X`(#SemanticCastToX(#token("X","#KVariable"))))) +3: syntax {Sort} Sort ::= Sort "=>" Sort [klabel(#KRewrite), symbol] + #KRewrite(#SemanticCastToA(#token("X","#KVariable")),`label(_,_)_PARAMAMB_KItem_N_T`(#SemanticCastToA(#token("X","#KVariable")),`wrap__PARAMAMB_T_M`(#SemanticCastToA(#token("X","#KVariable"))))) + Source(paramAmb.k) + Location(12,8,12,29) + 12 | rule X => label(X, wrap X) + . ^~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/parseErrorExpected.k b/pyk/regression-new/checks/parseErrorExpected.k new file mode 100644 index 00000000000..2003eef75db --- /dev/null +++ b/pyk/regression-new/checks/parseErrorExpected.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module PARSEERROREXPECTED + imports INT + +syntax Foo ::= "foo" "bar" + +rule => false +rule 0 => true +rule 0 => true +rule +rule foo + + +endmodule diff --git a/pyk/regression-new/checks/parseErrorExpected.k.out b/pyk/regression-new/checks/parseErrorExpected.k.out new file mode 100644 index 00000000000..fb6d2d83406 --- /dev/null +++ b/pyk/regression-new/checks/parseErrorExpected.k.out @@ -0,0 +1,26 @@ +[Error] Inner Parser: Parse error: unexpected token '=>'. + Source(parseErrorExpected.k) + Location(7,6,7,8) + 7 | rule => false + . ^~ +[Error] Inner Parser: Parse error: unexpected end of file following token 'true'. + Source(parseErrorExpected.k) + Location(8,15,8,15) + 8 | rule 0 => true + . ^ +[Error] Inner Parser: Parse error: unexpected token '' following token 'true'. + Source(parseErrorExpected.k) + Location(9,20,9,24) + 9 | rule 0 => true + . ^~~~ +[Error] Inner Parser: Parse error: unexpected end of file. + Source(parseErrorExpected.k) + Location(10,5,10,5) + 10 | rule + . ^ +[Error] Inner Parser: Parse error: unexpected end of file following token 'foo'. + Source(parseErrorExpected.k) + Location(11,9,11,9) + 11 | rule foo + . ^ +[Error] Compiler: Had 5 parsing errors. diff --git a/pyk/regression-new/checks/priorityError.k b/pyk/regression-new/checks/priorityError.k new file mode 100644 index 00000000000..8f957125c29 --- /dev/null +++ b/pyk/regression-new/checks/priorityError.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// +// Issue #1593 +// priority between left guarded and right guarded +// operators are not properly disambiguated +// so at least give a better error message + +module PRIORITYERROR-SYNTAX + +endmodule + +module PRIORITYERROR + imports PRIORITYERROR-SYNTAX + imports INT + + syntax Exp ::= Int + + syntax Exp ::= Exp "+" Exp [klabel(plus), symbol] + > "l" Exp [klabel(lguard), symbol] + | Exp "r" [klabel(rguard), symbol] + rule . => 1 + l 2 // unable to disambiguate - error + rule . => 1 r + 2 // unable to disambiguate - error + rule . => l 1 r // ambiguous - error +endmodule diff --git a/pyk/regression-new/checks/priorityError.k.out b/pyk/regression-new/checks/priorityError.k.out new file mode 100644 index 00000000000..dc616732c40 --- /dev/null +++ b/pyk/regression-new/checks/priorityError.k.out @@ -0,0 +1,20 @@ +[Error] Inner Parser: Priority filter exception. Cannot use lguard as an immediate child of plus. Consider using parentheses around lguard + Source(priorityError.k) + Location(21,19,21,22) + 21 | rule . => 1 + l 2 // unable to disambiguate - error + . ^~~ +[Error] Inner Parser: Priority filter exception. Cannot use rguard as an immediate child of plus. Consider using parentheses around rguard + Source(priorityError.k) + Location(22,15,22,18) + 22 | rule . => 1 r + 2 // unable to disambiguate - error + . ^~~ +[Error] Inner Parser: Parsing ambiguity. +1: syntax Exp ::= "l" Exp [klabel(lguard), symbol] + lguard(rguard(#token("1","Int"))) +2: syntax Exp ::= Exp "r" [klabel(rguard), symbol] + rguard(lguard(#token("1","Int"))) + Source(priorityError.k) + Location(23,15,23,20) + 23 | rule . => l 1 r // ambiguous - error + . ^~~~~ +[Error] Compiler: Had 3 parsing errors. diff --git a/pyk/regression-new/checks/recordOnRhs.k b/pyk/regression-new/checks/recordOnRhs.k new file mode 100644 index 00000000000..6e26033c6a2 --- /dev/null +++ b/pyk/regression-new/checks/recordOnRhs.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module RECORDONRHS + imports INT + +syntax Foo ::= foo(Int) + +rule _Gen0 => foo(...) + +endmodule diff --git a/pyk/regression-new/checks/recordOnRhs.k.out b/pyk/regression-new/checks/recordOnRhs.k.out new file mode 100644 index 00000000000..81de08a6f7a --- /dev/null +++ b/pyk/regression-new/checks/recordOnRhs.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Found variable _Gen1 on right hand side of rule, not bound on left hand side. Did you mean "?_Gen1"? + Source(recordOnRhs.k) + Location(7,15,7,23) + 7 | rule _Gen0 => foo(...) + . ^~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/removeUnit.k b/pyk/regression-new/checks/removeUnit.k new file mode 100644 index 00000000000..a57e66f1e3a --- /dev/null +++ b/pyk/regression-new/checks/removeUnit.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module REMOVEUNIT + imports INT + + syntax Foo [hook(LIST.List)] + + syntax Foo ::= Foo Foo [left, function, total, hook(LIST.concat), klabel(_Foo_), unit(.Foo), element(FooItem)] + | ".Foo" [function, total, hook(LIST.unit), klabel(.Foo), symbol] + | FooItem(KItem) [function, total, hook(LIST.element), klabel(FooItem), symbol] + + rule X:Int => FooItem(X) .Foo + +endmodule diff --git a/pyk/regression-new/checks/removeUnit.k.out b/pyk/regression-new/checks/removeUnit.k.out new file mode 100644 index 00000000000..737fd593509 --- /dev/null +++ b/pyk/regression-new/checks/removeUnit.k.out @@ -0,0 +1,5 @@ +[Error] Internal: Unimplemented case when removing unit applications: unit attribute but no assoc + Source(removeUnit.k) + Location(7,18,7,120) + 7 | syntax Foo ::= Foo Foo [left, function, total, hook(LIST.concat), klabel(_Foo_), unit(.Foo), element(FooItem)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/checks/restrictedAtts.k b/pyk/regression-new/checks/restrictedAtts.k new file mode 100644 index 00000000000..8f00379cee7 --- /dev/null +++ b/pyk/regression-new/checks/restrictedAtts.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module RESTRICTEDATTS + + syntax Foo ::= a() [cool, left] + rule a() => .K [idem, owise] + +endmodule diff --git a/pyk/regression-new/checks/restrictedAtts.k.out b/pyk/regression-new/checks/restrictedAtts.k.out new file mode 100644 index 00000000000..7a0aa7a575b --- /dev/null +++ b/pyk/regression-new/checks/restrictedAtts.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Production cannot have the following attributes: [cool] + Source(restrictedAtts.k) + Location(4,19,4,35) + 4 | syntax Foo ::= a() [cool, left] + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Rule cannot have the following attributes: [idem] + Source(restrictedAtts.k) + Location(5,8,5,17) + 5 | rule a() => .K [idem, owise] + . ^~~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/checks/rewriteInFunctionContext.k b/pyk/regression-new/checks/rewriteInFunctionContext.k new file mode 100644 index 00000000000..6d837cda8c9 --- /dev/null +++ b/pyk/regression-new/checks/rewriteInFunctionContext.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module REWRITEINFUNCTIONCONTEXT + imports INT + imports BOOL + imports MAP + +syntax Int ::= foo(Int) [function] + +configuration $PGM:K 0 + +rule [[ foo(0) => 0 ]] + 0 => 1 + +endmodule diff --git a/pyk/regression-new/checks/rewriteInFunctionContext.k.out b/pyk/regression-new/checks/rewriteInFunctionContext.k.out new file mode 100644 index 00000000000..81ccb04ed91 --- /dev/null +++ b/pyk/regression-new/checks/rewriteInFunctionContext.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Rewrites are not allowed in the context of a function rule. + Source(rewriteInFunctionContext.k) + Location(12,12,12,18) + 12 | 0 => 1 + . ^~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/signature.k b/pyk/regression-new/checks/signature.k new file mode 100644 index 00000000000..1ff5ab6aabd --- /dev/null +++ b/pyk/regression-new/checks/signature.k @@ -0,0 +1,61 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A [private] + + syntax Foo ::= foo() // <- B may not use this symbol + + syntax Foo ::= bam() [public] // <- B may use this symbol + + syntax Foo ::= fu() [private] // <- B may not use this symbol + + syntax Foo ::= "bar" [public, token] // <- B may use this token + | r"ba." [token, prec(3)] // <- B may not use this token + + rule foo() => .K + rule bam() => .K + rule fu() => .K + rule bar => .K + rule baz => .K +endmodule + +module B + imports private A // <- B may use the _public_ syntax of A, but C may not + + syntax Bar ::= a() [public] | b() [private] + + rule foo() => .K + rule bam() => .K + rule fu() => .K + rule bar => .K + rule baz => .K + rule a() => .K + rule b() => .K +endmodule + +module C + imports B + + rule foo() => .K + rule bam() => .K + rule fu() => .K + rule bar => .K + rule baz => .K + rule a() => .K + rule b() => .K +endmodule + +module D [private] + imports C + imports public A + +endmodule + +module E + imports D + + rule a() => .K + rule bam() => .K +endmodule + +module SIGNATURE + imports E +endmodule diff --git a/pyk/regression-new/checks/signature.k.out b/pyk/regression-new/checks/signature.k.out new file mode 100644 index 00000000000..58c461a1038 --- /dev/null +++ b/pyk/regression-new/checks/signature.k.out @@ -0,0 +1,51 @@ +[Error] Inner Parser: Parse error: unexpected token 'foo'. + Source(signature.k) + Location(25,8,25,11) + 25 | rule foo() => .K + . ^~~ +[Error] Inner Parser: Parse error: unexpected token 'fu'. + Source(signature.k) + Location(27,8,27,10) + 27 | rule fu() => .K + . ^~ +[Error] Inner Parser: Parse error: unexpected token 'baz'. + Source(signature.k) + Location(29,8,29,11) + 29 | rule baz => .K + . ^~~ +[Error] Inner Parser: Parse error: unexpected token 'foo'. + Source(signature.k) + Location(37,8,37,11) + 37 | rule foo() => .K + . ^~~ +[Error] Inner Parser: Parse error: unexpected token 'bam'. + Source(signature.k) + Location(38,8,38,11) + 38 | rule bam() => .K + . ^~~ +[Error] Inner Parser: Parse error: unexpected token 'fu'. + Source(signature.k) + Location(39,8,39,10) + 39 | rule fu() => .K + . ^~ +[Error] Inner Parser: Parse error: unexpected token 'bar'. + Source(signature.k) + Location(40,8,40,11) + 40 | rule bar => .K + . ^~~ +[Error] Inner Parser: Parse error: unexpected token 'baz'. + Source(signature.k) + Location(41,8,41,11) + 41 | rule baz => .K + . ^~~ +[Error] Inner Parser: Parse error: unexpected token 'b'. + Source(signature.k) + Location(43,8,43,9) + 43 | rule b() => .K + . ^ +[Error] Inner Parser: Parse error: unexpected token 'a'. + Source(signature.k) + Location(55,8,55,9) + 55 | rule a() => .K + . ^ +[Error] Compiler: Had 10 parsing errors. diff --git a/pyk/regression-new/checks/smtLemmaCheck.k b/pyk/regression-new/checks/smtLemmaCheck.k new file mode 100644 index 00000000000..159775eec69 --- /dev/null +++ b/pyk/regression-new/checks/smtLemmaCheck.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module SMTLEMMACHECK + imports BOOL + imports INT + imports K-EQUAL + + syntax KItem ::= a(Int) + syntax Int ::= f(Int) [function, total] + + rule f(0) => 0 + rule f(_) => 1 [owise] + + rule f(_) >Int -1 andBool false => true [simplification, smt-lemma] + + rule a(X) => .K requires f(X) >=Int -1 + +endmodule diff --git a/pyk/regression-new/checks/smtLemmaCheck.k.out b/pyk/regression-new/checks/smtLemmaCheck.k.out new file mode 100644 index 00000000000..eb808f8646c --- /dev/null +++ b/pyk/regression-new/checks/smtLemmaCheck.k.out @@ -0,0 +1,9 @@ +[Error] Compiler: Invalid term in smt-lemma detected. All terms in smt-lemma rules require smt-hook or smtlib labels + Source(smtLemmaCheck.k) + Location(13,8,13,12) + 13 | rule f(_) >Int -1 andBool false => true [simplification, smt-lemma] + . ^~~~ +[Error] Compiler: Had 1 structural errors after macro expansion. + while executing phase "expand macros" on sentence at + Source(smtLemmaCheck.k) + Location(13,8,13,42) diff --git a/pyk/regression-new/checks/tokenCheck.k b/pyk/regression-new/checks/tokenCheck.k new file mode 100644 index 00000000000..88dad20feab --- /dev/null +++ b/pyk/regression-new/checks/tokenCheck.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TOKENCHECK-SYNTAX + imports ID-SYNTAX + syntax X ::= "abc" [token] + +endmodule + +module TOKENCHECK + imports TOKENCHECK-SYNTAX + imports INT + + syntax X ::= fail() + + syntax Y ::= "a" [token] + syntax Y ::= Z + syntax Z ::= "b" [token] + + syntax Int ::= "foo" [macro] + rule foo => 3 + + syntax Id ::= Foo(Id) +endmodule diff --git a/pyk/regression-new/checks/tokenCheck.k.out b/pyk/regression-new/checks/tokenCheck.k.out new file mode 100644 index 00000000000..45dc17bb604 --- /dev/null +++ b/pyk/regression-new/checks/tokenCheck.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Sort X was declared as a token. Productions of this sort can only contain [function] or [token] labels. + Source(tokenCheck.k) + Location(12,16,12,22) + 12 | syntax X ::= fail() + . ^~~~~~ +[Error] Compiler: Sort Y was declared as a token. Productions of this sort can only contain [function] or [token] labels. + Source(tokenCheck.k) + Location(15,16,15,17) + 15 | syntax Y ::= Z + . ^ +[Error] Compiler: Sort Id was declared as a token. Productions of this sort can only contain [function] or [token] labels. + Source(tokenCheck.k) + Location(21,17,21,24) + 21 | syntax Id ::= Foo(Id) + . ^~~~~~~ +[Error] Compiler: Had 3 structural errors. diff --git a/pyk/regression-new/checks/totalWithoutFunction.k b/pyk/regression-new/checks/totalWithoutFunction.k new file mode 100644 index 00000000000..e51edd4a09c --- /dev/null +++ b/pyk/regression-new/checks/totalWithoutFunction.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TOTALWITHOUTFUNCTION + + syntax A ::= c(A) [total] + +endmodule diff --git a/pyk/regression-new/checks/totalWithoutFunction.k.out b/pyk/regression-new/checks/totalWithoutFunction.k.out new file mode 100644 index 00000000000..ccb077e56ce --- /dev/null +++ b/pyk/regression-new/checks/totalWithoutFunction.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: The attribute 'total' cannot be applied to a production which does not have the 'function' attribute. + Source(totalWithoutFunction.k) + Location(4,16,4,28) + 4 | syntax A ::= c(A) [total] + . ^~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/checks/unexpandedMacro.k b/pyk/regression-new/checks/unexpandedMacro.k new file mode 100644 index 00000000000..bd6e149da23 --- /dev/null +++ b/pyk/regression-new/checks/unexpandedMacro.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module UNEXPANDEDMACRO + imports INT + + syntax Int ::= A ( Int ) [macro] + rule A ( N ) +Int 4 => N +endmodule diff --git a/pyk/regression-new/checks/unexpandedMacro.k.out b/pyk/regression-new/checks/unexpandedMacro.k.out new file mode 100644 index 00000000000..21dbbdc0973 --- /dev/null +++ b/pyk/regression-new/checks/unexpandedMacro.k.out @@ -0,0 +1,9 @@ +[Error] Compiler: Rule contains macro symbol that was not expanded + Source(unexpandedMacro.k) + Location(6,8,6,27) + 6 | rule A ( N ) +Int 4 => N + . ^~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors after macro expansion. + while executing phase "expand macros" on sentence at + Source(unexpandedMacro.k) + Location(6,8,6,27) diff --git a/pyk/regression-new/checks/wideningAnywhere.k b/pyk/regression-new/checks/wideningAnywhere.k new file mode 100644 index 00000000000..7212dcebd28 --- /dev/null +++ b/pyk/regression-new/checks/wideningAnywhere.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module WIDENINGANYWHERE + +syntax Foo ::= "foo" +syntax KItem ::= "bar" + +rule foo => bar [anywhere] + +endmodule diff --git a/pyk/regression-new/checks/wideningAnywhere.k.out b/pyk/regression-new/checks/wideningAnywhere.k.out new file mode 100644 index 00000000000..654c26e6ad7 --- /dev/null +++ b/pyk/regression-new/checks/wideningAnywhere.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Unexpected sort KItem for term parsed as production syntax KItem ::= "bar". Expected: Foo + Source(wideningAnywhere.k) + Location(7,13,7,16) + 7 | rule foo => bar [anywhere] + . ^~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/checks/wideningMacro.k b/pyk/regression-new/checks/wideningMacro.k new file mode 100644 index 00000000000..89d9c3db6bc --- /dev/null +++ b/pyk/regression-new/checks/wideningMacro.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module WIDENINGMACRO + imports INT + imports BOOL + + syntax Bool ::= #bar ( Int ) [alias] + + rule #bar ( X ) => X +endmodule diff --git a/pyk/regression-new/checks/wideningMacro.k.out b/pyk/regression-new/checks/wideningMacro.k.out new file mode 100644 index 00000000000..aa35d9d3655 --- /dev/null +++ b/pyk/regression-new/checks/wideningMacro.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Sort of variable X inferred as greatest lower bound of [Bool, Int], but no such bound exists. + Source(wideningMacro.k) + Location(8,10,8,25) + 8 | rule #bar ( X ) => X + . ^~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/concrete-function-cache/Makefile b/pyk/regression-new/concrete-function-cache/Makefile new file mode 100644 index 00000000000..0ea05c128a0 --- /dev/null +++ b/pyk/regression-new/concrete-function-cache/Makefile @@ -0,0 +1,16 @@ +DEF=../concrete-function/a +TESTDIR=. +EXT=a +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--concrete-rules "A.f2" + +%-spec.k %-spec.md: kompile +ifeq ($(TESTDIR),$(RESULTDIR)) + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $@.out +else + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $(RESULTDIR)/$(notdir $@).out +endif + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/concrete-function-cache/a1-spec.k b/pyk/regression-new/concrete-function-cache/a1-spec.k new file mode 100644 index 00000000000..bbbb0046a88 --- /dev/null +++ b/pyk/regression-new/concrete-function-cache/a1-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A1-SPEC + +imports A + +claim [s1]: + begin(barConcrete(X)) => end(baz(X)) +requires X >Int 0 + +endmodule diff --git a/pyk/regression-new/concrete-function-cache/a1-spec.k.out b/pyk/regression-new/concrete-function-cache/a1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/concrete-function-cache/a1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/concrete-function-cache/a2-spec.k b/pyk/regression-new/concrete-function-cache/a2-spec.k new file mode 100644 index 00000000000..5efbab2318f --- /dev/null +++ b/pyk/regression-new/concrete-function-cache/a2-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A2-SPEC + +imports A + +claim [s2]: + begin(bar(X)) => end(baz(X)) +requires X + end ( bar ( X ) ) ~> .K + +#And + { + true + #Equals + X + foo ( inc ( sym2 ( ?_X:Int ) ) ) ~> .K + diff --git a/pyk/regression-new/concrete-function/2.a b/pyk/regression-new/concrete-function/2.a new file mode 100644 index 00000000000..9e7b9e24a8d --- /dev/null +++ b/pyk/regression-new/concrete-function/2.a @@ -0,0 +1 @@ +run(2) diff --git a/pyk/regression-new/concrete-function/2.a.out b/pyk/regression-new/concrete-function/2.a.out new file mode 100644 index 00000000000..b64960acced --- /dev/null +++ b/pyk/regression-new/concrete-function/2.a.out @@ -0,0 +1,3 @@ + + foo ( sym2 ( 222 ) +Num 1 ) ~> .K + diff --git a/pyk/regression-new/concrete-function/3.a b/pyk/regression-new/concrete-function/3.a new file mode 100644 index 00000000000..4ae862269f9 --- /dev/null +++ b/pyk/regression-new/concrete-function/3.a @@ -0,0 +1 @@ +run(3) diff --git a/pyk/regression-new/concrete-function/3.a.out b/pyk/regression-new/concrete-function/3.a.out new file mode 100644 index 00000000000..9e2315a48d7 --- /dev/null +++ b/pyk/regression-new/concrete-function/3.a.out @@ -0,0 +1,3 @@ + + 334 ~> .K + diff --git a/pyk/regression-new/concrete-function/Makefile b/pyk/regression-new/concrete-function/Makefile new file mode 100644 index 00000000000..7dcae033461 --- /dev/null +++ b/pyk/regression-new/concrete-function/Makefile @@ -0,0 +1,16 @@ +DEF=a +EXT=a +KOMPILE_BACKEND=haskell +TESTDIR=. +KOMPILE_FLAGS=--concrete-rules "A.f1" + +%-spec.k %-spec.md: kompile +ifeq ($(TESTDIR),$(RESULTDIR)) + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $@.out +else + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $(RESULTDIR)/$(notdir $@).out +endif + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/concrete-function/a.k b/pyk/regression-new/concrete-function/a.k new file mode 100644 index 00000000000..3695ddcc035 --- /dev/null +++ b/pyk/regression-new/concrete-function/a.k @@ -0,0 +1,49 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A-SYNTAX +imports DOMAINS-SYNTAX +syntax Pgm ::= run(Int) +endmodule +module A +imports DOMAINS +imports A-SYNTAX +configuration $PGM:Pgm + +syntax Pgm ::= fff(Int) +rule run(1) => fff(1) +rule fff(1) => fff(2) +rule fff(2) => foo(inc(sym(?_X:Int))) // terms with variables are not concrete + +// sym(222) is a functional term, thus not concrete even if no variable appears, for which the inc rule is not applicable, +// but it will be rewritten to sym2(222), which is a normal (ground) term, and concrete. +rule run(2) => foo(inc(sym(222))) + +rule run(3) => foo(inc(333)) + +syntax Num ::= Int +syntax Num ::= Num "+Num" Num [function] +rule I:Int +Num J:Int => I +Int J + +syntax Num ::= sym(Int) [function] + | sym2(Int) +rule sym(I) => sym2(I) + +syntax Num ::= inc(Num) [function] +rule inc(I) => I +Num 1 [concrete] + +syntax Num ::= foo(Num) [function] +rule foo(I) => I + +// for testing `--concrete-rules` option + +syntax Pgm ::= begin(Int) | end(Int) + +rule begin(X) => end(X) + +syntax Int ::= barConcrete(Int) [function, smtlib(barConcrete)] + | bar(Int) [function, smtlib(bar)] + | baz(Int) [function, smtlib(baz), no-evaluators] + +rule [f1]: barConcrete(X) => baz(X) requires X >Int 0 +rule [f2]: bar(X) => baz(X) requires X begin(barConcrete(X)) => end(baz(X)) +requires X >Int 0 + +endmodule diff --git a/pyk/regression-new/concrete-function/a1-spec.k.out b/pyk/regression-new/concrete-function/a1-spec.k.out new file mode 100644 index 00000000000..86686e04760 --- /dev/null +++ b/pyk/regression-new/concrete-function/a1-spec.k.out @@ -0,0 +1,24 @@ +kore-exec: [] Warning (WarnStuckClaimState): + The configuration's term unifies with the destination's term, but the implication check between the conditions has failed. Location: a1-spec.k:7:1-8:18 +Context: + (InfoReachability) while checking the implication + #Ceil ( barConcrete ( X ) ) +#And + #Not ( #Ceil ( baz ( X ) ) + #And + { + barConcrete ( X ) + #Equals + baz ( X ) + } ) +#And + + end ( barConcrete ( X ) ) ~> .K + +#And + { + true + #Equals + X >Int 0 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/concrete-function/a2-spec.k b/pyk/regression-new/concrete-function/a2-spec.k new file mode 100644 index 00000000000..5efbab2318f --- /dev/null +++ b/pyk/regression-new/concrete-function/a2-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A2-SPEC + +imports A + +claim [s2]: + begin(bar(X)) => end(baz(X)) +requires X $PGM:Pgm 0 + +syntax Int ::= final(Int) [function, total] + | "n" [function, total, no-evaluators] + +rule run(0) => .K N:Int => final(N) +rule run(N:Int => N -Int 1) ... M:Int => M +Int 1 + requires N >Int 0 andBool N %Int 2 ==Int 0 +rule run(N:Int => N -Int 1) ... M:Int => 1 +Int M + requires N >Int 0 andBool N %Int 2 ==Int 1 + +endmodule diff --git a/pyk/regression-new/concrete-haskell/a1-spec.k b/pyk/regression-new/concrete-haskell/a1-spec.k new file mode 100644 index 00000000000..f83e54d26ac --- /dev/null +++ b/pyk/regression-new/concrete-haskell/a1-spec.k @@ -0,0 +1,23 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A-LEMMAS +imports A + +rule (X +Int Y) +Int Z => Z +Int (X +Int Y) [simplification, symbolic(X), concrete(Y, Z)] + +rule (X +Int Y) +Int Z => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + +rule X +Int (Y +Int Z) => Z +Int (X +Int Y) [simplification, concrete(X, Y), symbolic(Z)] + +rule X +Int (Y +Int Z) => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + +rule final(n +Int _M:Int) => 0 [simplification, concrete(_M)] + +endmodule + +module A1-SPEC +imports A-LEMMAS + +claim [s1]: + run(5) => .K n => 0 + +endmodule diff --git a/pyk/regression-new/concrete-haskell/a1-spec.k.out b/pyk/regression-new/concrete-haskell/a1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/concrete-haskell/a1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/configuration-composition/Makefile b/pyk/regression-new/configuration-composition/Makefile new file mode 100644 index 00000000000..9e3debd8db9 --- /dev/null +++ b/pyk/regression-new/configuration-composition/Makefile @@ -0,0 +1,7 @@ +DEF=config-comp +EXT=ccomp +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module CONFIG-COMP + +include ../include/ktest.mak diff --git a/pyk/regression-new/configuration-composition/config-comp.k b/pyk/regression-new/configuration-composition/config-comp.k new file mode 100644 index 00000000000..7ddc8df081b --- /dev/null +++ b/pyk/regression-new/configuration-composition/config-comp.k @@ -0,0 +1,66 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CONFIG-COMP + imports CONFIG-COMP-1 + imports CONFIG-COMP-2 + + configuration + + + + + +endmodule + +module CONFIG-COMP-COMMON + imports LIST + + configuration + + $PGM:Cmds + .List + + + syntax Cmd + syntax Cmds ::= Cmd Cmds + | ".Cmds" +endmodule + +module CONFIG-COMP-1 + imports CONFIG-COMP-COMMON + imports INT + + configuration + + 0 + + + syntax Int ::= get() [function] + // ------------------------------- + rule [[ get() => ACCUMULATOR ]] + ACCUMULATOR + + syntax Cmd ::= "Inc" + // -------------------- + rule Inc => .K ... + I => I +Int 1 +endmodule + +module CONFIG-COMP-2 + imports CONFIG-COMP-COMMON + + configuration + + .List + + + syntax Cmd ::= "push" Int + | "pop" + // ------------------------- + rule push I => .K ... + (.List => ListItem( I )) ... + + rule pop => .K ... + ... (.List => ListItem( I )) + (ListItem( I ) => .List) ... +endmodule diff --git a/pyk/regression-new/configuration-formatting/1.test b/pyk/regression-new/configuration-formatting/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/configuration-formatting/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/configuration-formatting/1.test.out b/pyk/regression-new/configuration-formatting/1.test.out new file mode 100644 index 00000000000..f4a8d757a19 --- /dev/null +++ b/pyk/regression-new/configuration-formatting/1.test.out @@ -0,0 +1,35 @@ + + + 1 ~> .K + + foo(1) + + + + 1 + + + 1 + + + + 2 + + + 1 + + + + + + 1 + + 1 + + + + + 1 + + + diff --git a/pyk/regression-new/configuration-formatting/Makefile b/pyk/regression-new/configuration-formatting/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/configuration-formatting/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/configuration-formatting/test.k b/pyk/regression-new/configuration-formatting/test.k new file mode 100644 index 00000000000..066698a56e5 --- /dev/null +++ b/pyk/regression-new/configuration-formatting/test.k @@ -0,0 +1,36 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports SET + imports STRING-SYNTAX + + configuration + + $PGM + $PGM:Int + + + 2:Int + 2:Int + + + 2:Int + 2:Int + + + rule ( .Bag + => 1 1 + 2 1 + ) + + rule ( .Bag + => 1 + 1 + ) + + rule ( .Bag + => 1 + 1 + ) + +endmodule diff --git a/pyk/regression-new/constant-folding/1.test b/pyk/regression-new/constant-folding/1.test new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/constant-folding/1.test @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/constant-folding/1.test.out b/pyk/regression-new/constant-folding/1.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/constant-folding/1.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/constant-folding/2.test b/pyk/regression-new/constant-folding/2.test new file mode 100644 index 00000000000..b4de3947675 --- /dev/null +++ b/pyk/regression-new/constant-folding/2.test @@ -0,0 +1 @@ +11 diff --git a/pyk/regression-new/constant-folding/2.test.out b/pyk/regression-new/constant-folding/2.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/constant-folding/2.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/constant-folding/3.test b/pyk/regression-new/constant-folding/3.test new file mode 100644 index 00000000000..7ed6ff82de6 --- /dev/null +++ b/pyk/regression-new/constant-folding/3.test @@ -0,0 +1 @@ +5 diff --git a/pyk/regression-new/constant-folding/3.test.out b/pyk/regression-new/constant-folding/3.test.out new file mode 100644 index 00000000000..52ee6edd36c --- /dev/null +++ b/pyk/regression-new/constant-folding/3.test.out @@ -0,0 +1,3 @@ + + 5 ~> .K + diff --git a/pyk/regression-new/constant-folding/Makefile b/pyk/regression-new/constant-folding/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/constant-folding/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/constant-folding/test.k b/pyk/regression-new/constant-folding/test.k new file mode 100644 index 00000000000..6ddf13d3248 --- /dev/null +++ b/pyk/regression-new/constant-folding/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports STRING + imports ID + + syntax Int ::= "foo" [macro] + | "bar" [macro] + + syntax Id ::= "main" [token] + + rule foo => 1 +Int 2 + rule foo => .K + + rule bar => 1 +Int 2 *Int lengthString(Id2String(main) +String substrString("foo", 0, 1)) + rule bar => .K +endmodule diff --git a/pyk/regression-new/context-alias-2/1.test b/pyk/regression-new/context-alias-2/1.test new file mode 100644 index 00000000000..3a5c8f292d9 --- /dev/null +++ b/pyk/regression-new/context-alias-2/1.test @@ -0,0 +1 @@ +foo(x = 5, x) diff --git a/pyk/regression-new/context-alias-2/1.test.out b/pyk/regression-new/context-alias-2/1.test.out new file mode 100644 index 00000000000..946f4ce437e --- /dev/null +++ b/pyk/regression-new/context-alias-2/1.test.out @@ -0,0 +1,12 @@ +{ + Result:GeneratedTopCell +#Equals + + + 10 ~> .K + + + x |-> 5 + + +} diff --git a/pyk/regression-new/context-alias-2/2.test b/pyk/regression-new/context-alias-2/2.test new file mode 100644 index 00000000000..0bbabd95105 --- /dev/null +++ b/pyk/regression-new/context-alias-2/2.test @@ -0,0 +1 @@ +bar(x = 5, y = 1, y) diff --git a/pyk/regression-new/context-alias-2/2.test.out b/pyk/regression-new/context-alias-2/2.test.out new file mode 100644 index 00000000000..5f61cadc97c --- /dev/null +++ b/pyk/regression-new/context-alias-2/2.test.out @@ -0,0 +1,13 @@ +{ + Result:GeneratedTopCell +#Equals + + + bar ( 5 , 1 , 1 ) ~> .K + + + x |-> 5 + y |-> 1 + + +} diff --git a/pyk/regression-new/context-alias-2/3.test b/pyk/regression-new/context-alias-2/3.test new file mode 100644 index 00000000000..0be96bb688d --- /dev/null +++ b/pyk/regression-new/context-alias-2/3.test @@ -0,0 +1 @@ +bar(x = 5, x, x) diff --git a/pyk/regression-new/context-alias-2/3.test.out b/pyk/regression-new/context-alias-2/3.test.out new file mode 100644 index 00000000000..c1ffb39683b --- /dev/null +++ b/pyk/regression-new/context-alias-2/3.test.out @@ -0,0 +1,12 @@ +{ + Result:GeneratedTopCell +#Equals + + + bar ( 5 , 5 , 5 ) ~> .K + + + x |-> 5 + + +} diff --git a/pyk/regression-new/context-alias-2/4.test b/pyk/regression-new/context-alias-2/4.test new file mode 100644 index 00000000000..363cc3d27b8 --- /dev/null +++ b/pyk/regression-new/context-alias-2/4.test @@ -0,0 +1 @@ +baz(x = 1, x, x = 2) diff --git a/pyk/regression-new/context-alias-2/4.test.out b/pyk/regression-new/context-alias-2/4.test.out new file mode 100644 index 00000000000..3934417c39d --- /dev/null +++ b/pyk/regression-new/context-alias-2/4.test.out @@ -0,0 +1,12 @@ +{ + Result:GeneratedTopCell +#Equals + + + baz ( 1 , 2 , 2 ) ~> .K + + + x |-> 2 + + +} diff --git a/pyk/regression-new/context-alias-2/5.test b/pyk/regression-new/context-alias-2/5.test new file mode 100644 index 00000000000..e5048340beb --- /dev/null +++ b/pyk/regression-new/context-alias-2/5.test @@ -0,0 +1 @@ +qux(x = 1, x, x = 2) diff --git a/pyk/regression-new/context-alias-2/5.test.out b/pyk/regression-new/context-alias-2/5.test.out new file mode 100644 index 00000000000..fd0cb19468e --- /dev/null +++ b/pyk/regression-new/context-alias-2/5.test.out @@ -0,0 +1,64 @@ + { + Result:GeneratedTopCell + #Equals + + + qux ( 1 , 1 , 2 ) ~> .K + + + x |-> 1 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + qux ( 1 , 1 , 2 ) ~> .K + + + x |-> 2 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + qux ( 1 , 2 , 2 ) ~> .K + + + x |-> 1 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + qux ( 1 , 2 , 2 ) ~> .K + + + x |-> 2 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + r ( x ) ~> #freezerqux(_,_,_)_TEST_Exp_Exp_Exp_Exp1_ ( x = 1 ~> .K , x = 2 ~> .K ) ~> .K + + + .Map + + + } diff --git a/pyk/regression-new/context-alias-2/Makefile b/pyk/regression-new/context-alias-2/Makefile new file mode 100644 index 00000000000..a3b3e1c8d13 --- /dev/null +++ b/pyk/regression-new/context-alias-2/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KRUN_FLAGS=--search +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/context-alias-2/test.k b/pyk/regression-new/context-alias-2/test.k new file mode 100644 index 00000000000..c7236c77caa --- /dev/null +++ b/pyk/regression-new/context-alias-2/test.k @@ -0,0 +1,32 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports ID + imports MAP + + syntax Exp ::= foo(Exp, Exp) [seqstrict(left; 1; right; 2)] + | Id "=" Int + | Id + | Int + | l(Exp) [klabel(l), symbol] | m(Exp) [klabel(m), symbol] | r(Exp) [klabel(r), symbol] + syntax KResult ::= Int + + context alias [left]: HERE [context(l)] + context alias [middle]: HERE [context(m)] + context alias [right]: HERE [context(r)] + + + configuration $PGM:K .Map + + rule foo(I1:Int, I2:Int) => I1 +Int I2 + + rule r(X:Id => I:Int) ... ... X |-> I ... + rule m(X:Id => I:Int) ... ... X |-> I ... + rule l(X:Id = I:Int => I) ... Rho => Rho [ X <- I ] + rule m(X:Id = I:Int => I) ... Rho => Rho [ X <- I ] + + syntax Exp ::= bar(Exp, Exp, Exp) [seqstrict(left; 1; middle; 2; right; 3)] + syntax Exp ::= baz(Exp, Exp, Exp) [seqstrict(left; 1, 3; right; 2)] + syntax Exp ::= qux(Exp, Exp, Exp) [strict(left; 1, 3; right; 2)] + +endmodule diff --git a/pyk/regression-new/context-alias-3/Makefile b/pyk/regression-new/context-alias-3/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/context-alias-3/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/context-alias-3/test.k b/pyk/regression-new/context-alias-3/test.k new file mode 100644 index 00000000000..1754333ea66 --- /dev/null +++ b/pyk/regression-new/context-alias-3/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + syntax Foo ::= foo(Int) + + context alias [foo]: HERE + requires isFoo(HOLE) + +endmodule diff --git a/pyk/regression-new/context-alias/1.test b/pyk/regression-new/context-alias/1.test new file mode 100644 index 00000000000..dd0d29b332c --- /dev/null +++ b/pyk/regression-new/context-alias/1.test @@ -0,0 +1 @@ +1 + (1 + 1); diff --git a/pyk/regression-new/context-alias/1.test.out b/pyk/regression-new/context-alias/1.test.out new file mode 100644 index 00000000000..a0ce57e9ae7 --- /dev/null +++ b/pyk/regression-new/context-alias/1.test.out @@ -0,0 +1,14 @@ + + + 1 + ( 1 + 1 ) ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/10.test b/pyk/regression-new/context-alias/10.test new file mode 100644 index 00000000000..3be9ca92117 --- /dev/null +++ b/pyk/regression-new/context-alias/10.test @@ -0,0 +1 @@ +enableHeating() evalAndStop() - (1 :+ 1) ; diff --git a/pyk/regression-new/context-alias/10.test.out b/pyk/regression-new/context-alias/10.test.out new file mode 100644 index 00000000000..1f5f00153f8 --- /dev/null +++ b/pyk/regression-new/context-alias/10.test.out @@ -0,0 +1,14 @@ + + + 0 - ( 1 :+ 1 ) ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/1b.test b/pyk/regression-new/context-alias/1b.test new file mode 100644 index 00000000000..128439b6cf5 --- /dev/null +++ b/pyk/regression-new/context-alias/1b.test @@ -0,0 +1 @@ +(1 + 1) + 1; diff --git a/pyk/regression-new/context-alias/1b.test.out b/pyk/regression-new/context-alias/1b.test.out new file mode 100644 index 00000000000..e96fc6f4fb2 --- /dev/null +++ b/pyk/regression-new/context-alias/1b.test.out @@ -0,0 +1,14 @@ + + + ( 1 + 1 ) + 1 ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/2.test b/pyk/regression-new/context-alias/2.test new file mode 100644 index 00000000000..b172918b3e4 --- /dev/null +++ b/pyk/regression-new/context-alias/2.test @@ -0,0 +1 @@ +enableHeating() (1 + 1) + 1; diff --git a/pyk/regression-new/context-alias/2.test.out b/pyk/regression-new/context-alias/2.test.out new file mode 100644 index 00000000000..05d00d84a6e --- /dev/null +++ b/pyk/regression-new/context-alias/2.test.out @@ -0,0 +1,14 @@ + + + .K + + + true + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/2b.test b/pyk/regression-new/context-alias/2b.test new file mode 100644 index 00000000000..5e133ea7670 --- /dev/null +++ b/pyk/regression-new/context-alias/2b.test @@ -0,0 +1 @@ +enableHeating() 1 + (1 + 1); diff --git a/pyk/regression-new/context-alias/2b.test.out b/pyk/regression-new/context-alias/2b.test.out new file mode 100644 index 00000000000..05d00d84a6e --- /dev/null +++ b/pyk/regression-new/context-alias/2b.test.out @@ -0,0 +1,14 @@ + + + .K + + + true + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/3.test b/pyk/regression-new/context-alias/3.test new file mode 100644 index 00000000000..22b78d1b385 --- /dev/null +++ b/pyk/regression-new/context-alias/3.test @@ -0,0 +1 @@ +x = (1 + 1); diff --git a/pyk/regression-new/context-alias/3.test.out b/pyk/regression-new/context-alias/3.test.out new file mode 100644 index 00000000000..712de240445 --- /dev/null +++ b/pyk/regression-new/context-alias/3.test.out @@ -0,0 +1,14 @@ + + + x = ( 1 + 1 ) ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/3b.test b/pyk/regression-new/context-alias/3b.test new file mode 100644 index 00000000000..de40fa0904a --- /dev/null +++ b/pyk/regression-new/context-alias/3b.test @@ -0,0 +1 @@ +(x = 1) + 1; diff --git a/pyk/regression-new/context-alias/3b.test.out b/pyk/regression-new/context-alias/3b.test.out new file mode 100644 index 00000000000..d45c131455e --- /dev/null +++ b/pyk/regression-new/context-alias/3b.test.out @@ -0,0 +1,14 @@ + + + ( x = 1 ) + 1 ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/4.test b/pyk/regression-new/context-alias/4.test new file mode 100644 index 00000000000..515218497e0 --- /dev/null +++ b/pyk/regression-new/context-alias/4.test @@ -0,0 +1 @@ +enableHeating() x = (1 + 1) ; diff --git a/pyk/regression-new/context-alias/4.test.out b/pyk/regression-new/context-alias/4.test.out new file mode 100644 index 00000000000..992b389d6b8 --- /dev/null +++ b/pyk/regression-new/context-alias/4.test.out @@ -0,0 +1,14 @@ + + + .K + + + true + + + x |-> 2 + + + false + + diff --git a/pyk/regression-new/context-alias/4b.test b/pyk/regression-new/context-alias/4b.test new file mode 100644 index 00000000000..b8a5b4519ab --- /dev/null +++ b/pyk/regression-new/context-alias/4b.test @@ -0,0 +1 @@ +enableHeating() (x = 1) + 1 ; diff --git a/pyk/regression-new/context-alias/4b.test.out b/pyk/regression-new/context-alias/4b.test.out new file mode 100644 index 00000000000..dac832d4160 --- /dev/null +++ b/pyk/regression-new/context-alias/4b.test.out @@ -0,0 +1,14 @@ + + + .K + + + true + + + x |-> 1 + + + false + + diff --git a/pyk/regression-new/context-alias/5.test b/pyk/regression-new/context-alias/5.test new file mode 100644 index 00000000000..8fcb9616cc3 --- /dev/null +++ b/pyk/regression-new/context-alias/5.test @@ -0,0 +1 @@ +x := (1 + 1) ; diff --git a/pyk/regression-new/context-alias/5.test.out b/pyk/regression-new/context-alias/5.test.out new file mode 100644 index 00000000000..f74d167db49 --- /dev/null +++ b/pyk/regression-new/context-alias/5.test.out @@ -0,0 +1,14 @@ + + + .K + + + false + + + x |-> 2 + + + false + + diff --git a/pyk/regression-new/context-alias/5b.test b/pyk/regression-new/context-alias/5b.test new file mode 100644 index 00000000000..6603ec1e551 --- /dev/null +++ b/pyk/regression-new/context-alias/5b.test @@ -0,0 +1 @@ +(x := 1) + 1 ; diff --git a/pyk/regression-new/context-alias/5b.test.out b/pyk/regression-new/context-alias/5b.test.out new file mode 100644 index 00000000000..3a6416bcf01 --- /dev/null +++ b/pyk/regression-new/context-alias/5b.test.out @@ -0,0 +1,14 @@ + + + ( x := 1 ) + 1 ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/6.test b/pyk/regression-new/context-alias/6.test new file mode 100644 index 00000000000..3c3a41ce091 --- /dev/null +++ b/pyk/regression-new/context-alias/6.test @@ -0,0 +1 @@ +(1 :+ 1) :+ 1; diff --git a/pyk/regression-new/context-alias/6.test.out b/pyk/regression-new/context-alias/6.test.out new file mode 100644 index 00000000000..4b9c87fd10f --- /dev/null +++ b/pyk/regression-new/context-alias/6.test.out @@ -0,0 +1,14 @@ + + + .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/6b.test b/pyk/regression-new/context-alias/6b.test new file mode 100644 index 00000000000..40b4e52fe06 --- /dev/null +++ b/pyk/regression-new/context-alias/6b.test @@ -0,0 +1 @@ +1 :+ (1 :+ 1); diff --git a/pyk/regression-new/context-alias/6b.test.out b/pyk/regression-new/context-alias/6b.test.out new file mode 100644 index 00000000000..4b9c87fd10f --- /dev/null +++ b/pyk/regression-new/context-alias/6b.test.out @@ -0,0 +1,14 @@ + + + .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/7.test b/pyk/regression-new/context-alias/7.test new file mode 100644 index 00000000000..033a3b9106d --- /dev/null +++ b/pyk/regression-new/context-alias/7.test @@ -0,0 +1 @@ +(x = 2) ->+ x = 3 ; diff --git a/pyk/regression-new/context-alias/7.test.out b/pyk/regression-new/context-alias/7.test.out new file mode 100644 index 00000000000..3e0d8e623df --- /dev/null +++ b/pyk/regression-new/context-alias/7.test.out @@ -0,0 +1,14 @@ + + + ( x = 2 ) ->+ x = 3 ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/7b.test b/pyk/regression-new/context-alias/7b.test new file mode 100644 index 00000000000..1fed17d6d1b --- /dev/null +++ b/pyk/regression-new/context-alias/7b.test @@ -0,0 +1 @@ +x = (2 ->+ x = 3) ; diff --git a/pyk/regression-new/context-alias/7b.test.out b/pyk/regression-new/context-alias/7b.test.out new file mode 100644 index 00000000000..6ced645b311 --- /dev/null +++ b/pyk/regression-new/context-alias/7b.test.out @@ -0,0 +1,14 @@ + + + x = ( 2 ->+ x = 3 ) ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/8.test b/pyk/regression-new/context-alias/8.test new file mode 100644 index 00000000000..15da10a9935 --- /dev/null +++ b/pyk/regression-new/context-alias/8.test @@ -0,0 +1 @@ +enableHeating() (x = 2) ->+ x = 3 ; diff --git a/pyk/regression-new/context-alias/8.test.out b/pyk/regression-new/context-alias/8.test.out new file mode 100644 index 00000000000..b73b05b177e --- /dev/null +++ b/pyk/regression-new/context-alias/8.test.out @@ -0,0 +1,14 @@ + + + .K + + + true + + + x |-> 3 + + + false + + diff --git a/pyk/regression-new/context-alias/8b.test b/pyk/regression-new/context-alias/8b.test new file mode 100644 index 00000000000..90377dfa948 --- /dev/null +++ b/pyk/regression-new/context-alias/8b.test @@ -0,0 +1 @@ +enableHeating() x = (2 ->+ x = 3) ; diff --git a/pyk/regression-new/context-alias/8b.test.out b/pyk/regression-new/context-alias/8b.test.out new file mode 100644 index 00000000000..f0f136978f9 --- /dev/null +++ b/pyk/regression-new/context-alias/8b.test.out @@ -0,0 +1,14 @@ + + + .K + + + true + + + x |-> 5 + + + false + + diff --git a/pyk/regression-new/context-alias/9.test b/pyk/regression-new/context-alias/9.test new file mode 100644 index 00000000000..3bc63f55610 --- /dev/null +++ b/pyk/regression-new/context-alias/9.test @@ -0,0 +1 @@ +(1 + 1) - 1 ; diff --git a/pyk/regression-new/context-alias/9.test.out b/pyk/regression-new/context-alias/9.test.out new file mode 100644 index 00000000000..142f5921ac0 --- /dev/null +++ b/pyk/regression-new/context-alias/9.test.out @@ -0,0 +1,14 @@ + + + ( 1 + 1 ) - 1 ~> #freezer_;_TEST_Stmt_Expr0_ ( ) ~> .K + + + false + + + .Map + + + false + + diff --git a/pyk/regression-new/context-alias/Makefile b/pyk/regression-new/context-alias/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/context-alias/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/context-alias/test.k b/pyk/regression-new/context-alias/test.k new file mode 100644 index 00000000000..38d1cfe3bbf --- /dev/null +++ b/pyk/regression-new/context-alias/test.k @@ -0,0 +1,46 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports ID + imports MAP + imports BOOL + +configuration $PGM:Stmt false .Map false + +context alias [heatable]: HERE ... true +context alias [heatable]: HERE ... true + +context alias [heatable2]: HERE ... B requires B + +syntax Expr ::= Expr "+" Expr [strict(heatable)] + | Id "=" Expr [strict(heatable; 2)] + | Id ":=" Expr [strict(2)] + | Expr ":+" Expr [strict] + | Expr "->+" Expr [seqstrict(heatable)] + | Expr "-" Expr [seqstrict(heatable2)] + | Int + +syntax KResult ::= Int + +syntax Stmt ::= Expr ";" [strict] | Stmt Stmt | enableHeating() | disableHeating() +syntax Expr ::= evalAndStop() + +syntax Expr ::= "(" Expr ")" [bracket] + +rule enableHeating() => .K ... _ => true +rule disableHeating() => .K ... _ => false + +rule evalAndStop() => 0 ... _ => false + +rule S::Stmt S2::Stmt => S ~> S2 + +rule _I:Int ; => .K + +rule X:Id = I:Int => I ... Rho => Rho [ X <- I ] +rule X:Id := I:Int => I ... Rho => Rho [ X <- I ] + +rule I:Int + I2:Int => I +Int I2 +rule I:Int :+ I2:Int => I +Int I2 +rule I:Int ->+ I2:Int => I +Int I2 + +endmodule diff --git a/pyk/regression-new/context-cell/1.test b/pyk/regression-new/context-cell/1.test new file mode 100644 index 00000000000..2c4e5e2d5f9 --- /dev/null +++ b/pyk/regression-new/context-cell/1.test @@ -0,0 +1 @@ +baz(bar()) diff --git a/pyk/regression-new/context-cell/1.test.out b/pyk/regression-new/context-cell/1.test.out new file mode 100644 index 00000000000..4e754e1b4fd --- /dev/null +++ b/pyk/regression-new/context-cell/1.test.out @@ -0,0 +1,8 @@ + + + baz ( 0 ) ~> .K + + + .K + + diff --git a/pyk/regression-new/context-cell/Makefile b/pyk/regression-new/context-cell/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/context-cell/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/context-cell/test.k b/pyk/regression-new/context-cell/test.k new file mode 100644 index 00000000000..845ab81b95c --- /dev/null +++ b/pyk/regression-new/context-cell/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + +configuration $PGM:K .K + + syntax Foo ::= bar() | baz(Foo) + syntax Foo ::= Int + rule bar() => 0 + syntax KResult ::= Int + context baz(HOLE) ... .K +endmodule diff --git a/pyk/regression-new/context-labels/Makefile b/pyk/regression-new/context-labels/Makefile new file mode 100644 index 00000000000..abfc72a2dcd --- /dev/null +++ b/pyk/regression-new/context-labels/Makefile @@ -0,0 +1,27 @@ +DEF=context +TESTDIR=. +KOMPILE_BACKEND=haskell +KPROVE_FLAGS+=--debugger --debug-script context-spec.k.in +KORE_REPL_OPTS=--log-entries DebugAppliedLabeledRewriteRule +export KORE_REPL_OPTS +CONSIDER_PROVER_ERRORS=2>&1 | sed 's!\[[0-9][0-9]*]!!g' # Hacking in a sed command here to remove strings of the form '[23452]' + +include ../include/ktest.mak + +K_RULE_FIND=${K_BIN}/k-rule-find + +FIND_RULES_TESTS?=$(wildcard $(TESTDIR)/*.find-rule) + +.PHONY: find-rules + +all: find-rules + +find-rules: $(FIND_RULES_TESTS) + +%.find-rule: kompile +ifeq ($(TESTDIR),$(RESULTDIR)) + $(K_RULE_FIND) $(KOMPILED_DIR) $(shell cat $@) $(CHECK) $@.out +else + $(K_RULE_FIND) $(KOMPILED_DIR) $(shell cat $@) $(CHECK) $(RESULTDIR)/$(notdir $@).out +endif + diff --git a/pyk/regression-new/context-labels/barlabel.find-rule b/pyk/regression-new/context-labels/barlabel.find-rule new file mode 100644 index 00000000000..547a6bc6cb1 --- /dev/null +++ b/pyk/regression-new/context-labels/barlabel.find-rule @@ -0,0 +1 @@ +context.k:12 diff --git a/pyk/regression-new/context-labels/barlabel.find-rule.out b/pyk/regression-new/context-labels/barlabel.find-rule.out new file mode 100644 index 00000000000..75339b679f4 --- /dev/null +++ b/pyk/regression-new/context-labels/barlabel.find-rule.out @@ -0,0 +1,2 @@ +CONTEXT.bar1-cool +CONTEXT.bar1-heat diff --git a/pyk/regression-new/context-labels/bazlabel.find-rule b/pyk/regression-new/context-labels/bazlabel.find-rule new file mode 100644 index 00000000000..ef280ac26dc --- /dev/null +++ b/pyk/regression-new/context-labels/bazlabel.find-rule @@ -0,0 +1 @@ +context.k:10 diff --git a/pyk/regression-new/context-labels/bazlabel.find-rule.out b/pyk/regression-new/context-labels/bazlabel.find-rule.out new file mode 100644 index 00000000000..e934c7c554f --- /dev/null +++ b/pyk/regression-new/context-labels/bazlabel.find-rule.out @@ -0,0 +1,2 @@ +CONTEXT.baz2-cool +CONTEXT.baz2-heat diff --git a/pyk/regression-new/context-labels/context-spec.k b/pyk/regression-new/context-labels/context-spec.k new file mode 100644 index 00000000000..29bd144ceb5 --- /dev/null +++ b/pyk/regression-new/context-labels/context-spec.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "context.k" + +module CONTEXT-SPEC + imports CONTEXT + + claim foo( a, a ) => foo( 0, 0 ) ... + + claim bar( a, a ) => bar( 0, 0 ) ... + + claim baz( a, a ) => baz( a, 0 ) ... + +endmodule diff --git a/pyk/regression-new/context-labels/context-spec.k.in b/pyk/regression-new/context-labels/context-spec.k.in new file mode 100644 index 00000000000..2d9011240c1 --- /dev/null +++ b/pyk/regression-new/context-labels/context-spec.k.in @@ -0,0 +1,22 @@ +prove 0 +ktryf CONTEXT.foo1-heat +step +ktryf CONTEXT.foo1-cool +ktryf CONTEXT.foo2-heat +step +ktryf CONTEXT.foo2-cool +step +prove 1 +ktryf CONTEXT.bar1-heat +step +ktryf CONTEXT.bar1-cool +ktryf CONTEXT.bar2-heat +step +ktryf CONTEXT.bar2-cool +step +prove 2 +ktryf CONTEXT.baz2-heat +step +ktryf CONTEXT.baz2-cool +step +exit diff --git a/pyk/regression-new/context-labels/context-spec.k.out b/pyk/regression-new/context-labels/context-spec.k.out new file mode 100644 index 00000000000..449ec6c2aa1 --- /dev/null +++ b/pyk/regression-new/context-labels/context-spec.k.out @@ -0,0 +1,638 @@ +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.foo1-heat ] at location: context.k:8:16-8:52 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lblfoo'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A{}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}(), + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ ] at location: context.k:15:8-15:14 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerfoo'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A0'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.foo1-cool ] at location: context.k:8:16-8:52 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerfoo'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A0'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.foo2-heat ] at location: context.k:8:16-8:52 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lblfoo'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortA{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ ] at location: context.k:15:8-15:14 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerfoo'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A1'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.foo2-cool ] at location: context.k:8:16-8:52 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerfoo'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A1'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.bar1-heat ] at location: context.k:12:19-12:36 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lblbar'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A{}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}(), + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ ] at location: context.k:15:8-15:14 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerbar'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A0'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.bar1-cool ] at location: context.k:12:19-12:36 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerbar'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A0'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.bar2-heat ] at location: context.k:13:19-13:36 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lblbar'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortA{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ ] at location: context.k:15:8-15:14 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerbar'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A1'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.bar2-cool ] at location: context.k:13:19-13:36 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerbar'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A1'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.baz2-heat ] at location: context.k:10:16-10:52 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lblbaz'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A{}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}(), + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ ] at location: context.k:15:8-15:14 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerbaz'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A1'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +kore-repl: Debug (DebugAppliedLabeledRewriteRule): + The rule with label [ CONTEXT.baz2-cool ] at location: context.k:10:16-10:52 was applied + on configuration: + \and{SortGeneratedTopCell{}}( + /* term: */ + /* T Fn D Sfa */ + Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortInt{}}("0") + ), + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa Cl */ + Lbl'Hash'freezerbaz'LParUndsCommUndsRParUnds'CONTEXT'Unds'A'Unds'A'Unds'A1'Unds'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortA{}, SortKItem{}}( + /* T Fn D Sfa Cl */ + Lbla'Unds'CONTEXT'Unds'A{}() + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa */ Var'Unds'DotVar1:SortK{} + ) + ) + ), + /* T Fn D Sfa */ + Lbl'-LT-'generatedCounter'-GT-'{}( + /* T Fn D Sfa */ Var'Unds'Gen0:SortInt{} + ) + ), + \and{SortGeneratedTopCell{}}( + /* predicate: */ + /* D Sfa */ \top{SortGeneratedTopCell{}}(), + /* substitution: */ + \top{SortGeneratedTopCell{}}() + )) +Context: + (InfoReachability) while applying axioms +#Top diff --git a/pyk/regression-new/context-labels/context.k b/pyk/regression-new/context-labels/context.k new file mode 100644 index 00000000000..37a68c1dcc4 --- /dev/null +++ b/pyk/regression-new/context-labels/context.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module CONTEXT + imports INT + + syntax KResult ::= Int + + syntax A ::= "a" | Int + | foo( A, A ) [seqstrict, klabel(foo)] + | bar( A, A ) + | baz( A, A ) [strict(2), klabel(baz)] + + context [bar1]: bar( HOLE, _ ) + context [bar2]: bar( _, HOLE ) + + rule a => 0 + +endmodule diff --git a/pyk/regression-new/context-labels/foolabel.find-rule b/pyk/regression-new/context-labels/foolabel.find-rule new file mode 100644 index 00000000000..6a6d4d99c9d --- /dev/null +++ b/pyk/regression-new/context-labels/foolabel.find-rule @@ -0,0 +1 @@ +context.k:8 diff --git a/pyk/regression-new/context-labels/foolabel.find-rule.out b/pyk/regression-new/context-labels/foolabel.find-rule.out new file mode 100644 index 00000000000..919d9f66248 --- /dev/null +++ b/pyk/regression-new/context-labels/foolabel.find-rule.out @@ -0,0 +1,4 @@ +CONTEXT.foo1-cool +CONTEXT.foo2-cool +CONTEXT.foo1-heat +CONTEXT.foo2-heat diff --git a/pyk/regression-new/coverage/Makefile b/pyk/regression-new/coverage/Makefile new file mode 100644 index 00000000000..b4da0328d63 --- /dev/null +++ b/pyk/regression-new/coverage/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--coverage --syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/coverage/test.k b/pyk/regression-new/coverage/test.k new file mode 100644 index 00000000000..1c17cda4882 --- /dev/null +++ b/pyk/regression-new/coverage/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports K-EQUAL + + syntax Int ::= "#ctz" "(" Int ")" [function] + rule #ctz(N) => #if N modInt 2 ==Int 1 #then 0 #else 1 +Int #ctz(N >>Int 1) #fi requires N =/=Int 0 +endmodule diff --git a/pyk/regression-new/domains-lemmas-no-smt/Makefile b/pyk/regression-new/domains-lemmas-no-smt/Makefile new file mode 100644 index 00000000000..e361e04d43a --- /dev/null +++ b/pyk/regression-new/domains-lemmas-no-smt/Makefile @@ -0,0 +1,9 @@ +DEF=domains-lemmas-no-smt +EXT=dlns +TESTDIR=. +KOMPILE_BACKEND=haskell +KPROVE_FLAGS=--smt none +KOMPILE_FLAGS=--syntax-module DOMAINS-LEMMAS-NO-SMT +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak diff --git a/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k b/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k new file mode 100644 index 00000000000..46dc7c73aa2 --- /dev/null +++ b/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k @@ -0,0 +1,26 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "domains-lemmas-no-smt.k" + +module DOMAINS-LEMMAS-NO-SMT-SPEC + imports DOMAINS-LEMMAS-NO-SMT + + // Arithmetic Normalization + claim 0 +Int X => X ... + claim (5 +Int X) +Int 0 => X +Int 5 ... + claim X -Int (5 -Int 5) => X ... + claim 5 +Int X => X +Int 5 ... + claim X -Int 5 => X +Int (0 -Int 5) ... + claim (X +Int 3) +Int 5 => X +Int 8 ... + claim 3 +Int (X +Int 5) => X +Int 8 ... + claim 5 -Int (X +Int 3) => 2 -Int X ... + claim 5 +Int (3 +Int X) => 8 +Int X ... + claim 5 +Int (3 -Int X) => 8 -Int X ... + claim (5 -Int X) +Int 3 => 8 -Int X ... + claim 5 -Int (3 +Int X) => 2 -Int X ... + claim 5 -Int (3 -Int X) => 2 +Int X ... + claim (X +Int I) -Int X => I ... + claim (I +Int X) -Int X => I ... + claim (X -Int 5) -Int 3 => X -Int 8 ... + claim 5 &Int (3 &Int X) => 1 &Int X ... + claim ((X +Int 1) +Int 1) => X +Int 2 ... +endmodule diff --git a/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k.out b/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt.k b/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt.k new file mode 100644 index 00000000000..e2388a3849b --- /dev/null +++ b/pyk/regression-new/domains-lemmas-no-smt/domains-lemmas-no-smt.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "domains.md" + +module DOMAINS-LEMMAS-NO-SMT + imports INT + + configuration $PGM:Pgm + + syntax Pgm ::= Int + // ------------------ + +endmodule diff --git a/pyk/regression-new/domains-lemmas-smt/Makefile b/pyk/regression-new/domains-lemmas-smt/Makefile new file mode 100644 index 00000000000..31b71ba9dd6 --- /dev/null +++ b/pyk/regression-new/domains-lemmas-smt/Makefile @@ -0,0 +1,9 @@ +DEF=domains-lemmas-smt +EXT=dls +TESTDIR=. +KOMPILE_BACKEND=haskell +KPROVE_FLAGS= +export KORE_EXEC_OPTS=--log-level error +KOMPILE_FLAGS=--syntax-module DOMAINS-LEMMAS-SMT + +include ../include/ktest.mak diff --git a/pyk/regression-new/domains-lemmas-smt/domains-lemmas-smt-spec.k b/pyk/regression-new/domains-lemmas-smt/domains-lemmas-smt-spec.k new file mode 100644 index 00000000000..902b63014d0 --- /dev/null +++ b/pyk/regression-new/domains-lemmas-smt/domains-lemmas-smt-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "domains-lemmas-smt.k" + +module DOMAINS-LEMMAS-SMT-SPEC + imports DOMAINS-LEMMAS-SMT + + // Arithmetic Normalization + claim (4 +Int X) modInt 10 => 4 +Int X ... requires -4 <=Int X andBool X (4 +Int X) %Int 10 => 4 +Int X ... requires -4 <=Int X andBool X $PGM:Pgm + + syntax Pgm ::= Int + // ------------------ + +endmodule diff --git a/pyk/regression-new/doubleinj/1.test b/pyk/regression-new/doubleinj/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/doubleinj/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/doubleinj/1.test.out b/pyk/regression-new/doubleinj/1.test.out new file mode 100644 index 00000000000..628beda027c --- /dev/null +++ b/pyk/regression-new/doubleinj/1.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + 1 + + diff --git a/pyk/regression-new/doubleinj/Makefile b/pyk/regression-new/doubleinj/Makefile new file mode 100644 index 00000000000..735c266ca70 --- /dev/null +++ b/pyk/regression-new/doubleinj/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KRUN_FLAGS="-cFoo=1" +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/doubleinj/test.k b/pyk/regression-new/doubleinj/test.k new file mode 100644 index 00000000000..a4335f9fb4e --- /dev/null +++ b/pyk/regression-new/doubleinj/test.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + configuration $PGM:KItem $Foo:Int +endmodule diff --git a/pyk/regression-new/equals-formatting/Makefile b/pyk/regression-new/equals-formatting/Makefile new file mode 100644 index 00000000000..cf52ff1ef8a --- /dev/null +++ b/pyk/regression-new/equals-formatting/Makefile @@ -0,0 +1,6 @@ +DEF=eq +EXT=eq +TESTDIR=. +KAST_FLAGS=--output pretty --expand-macros --no-substitution-filtering + +include ../include/ktest.mak diff --git a/pyk/regression-new/equals-formatting/eq.k b/pyk/regression-new/equals-formatting/eq.k new file mode 100644 index 00000000000..b07f4aa7de9 --- /dev/null +++ b/pyk/regression-new/equals-formatting/eq.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module EQ-SYNTAX + imports INT-SYNTAX + imports ML-SYNTAX + + syntax Pgm ::= init ( Int ) [macro] + rule init(0) => { 3 #Equals 4 } + rule init(1) => { 3 #Equals 3 } +endmodule + +module EQ + imports EQ-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/equals-formatting/equals1.kast b/pyk/regression-new/equals-formatting/equals1.kast new file mode 100644 index 00000000000..32a7d20708e --- /dev/null +++ b/pyk/regression-new/equals-formatting/equals1.kast @@ -0,0 +1 @@ +init(0) diff --git a/pyk/regression-new/equals-formatting/equals1.kast.out b/pyk/regression-new/equals-formatting/equals1.kast.out new file mode 100644 index 00000000000..a31c87355da --- /dev/null +++ b/pyk/regression-new/equals-formatting/equals1.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 4 +} diff --git a/pyk/regression-new/equals-formatting/equals2.kast b/pyk/regression-new/equals-formatting/equals2.kast new file mode 100644 index 00000000000..ee04e473c4e --- /dev/null +++ b/pyk/regression-new/equals-formatting/equals2.kast @@ -0,0 +1 @@ +init(1) diff --git a/pyk/regression-new/equals-formatting/equals2.kast.out b/pyk/regression-new/equals-formatting/equals2.kast.out new file mode 100644 index 00000000000..6f25cca1eef --- /dev/null +++ b/pyk/regression-new/equals-formatting/equals2.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 3 +} diff --git a/pyk/regression-new/equals-pattern/1.test b/pyk/regression-new/equals-pattern/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/equals-pattern/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/equals-pattern/1.test.out b/pyk/regression-new/equals-pattern/1.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/equals-pattern/1.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/equals-pattern/2.test b/pyk/regression-new/equals-pattern/2.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/equals-pattern/2.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/equals-pattern/2.test.out b/pyk/regression-new/equals-pattern/2.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/equals-pattern/2.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/equals-pattern/3.test b/pyk/regression-new/equals-pattern/3.test new file mode 100644 index 00000000000..c031825f72f --- /dev/null +++ b/pyk/regression-new/equals-pattern/3.test @@ -0,0 +1 @@ +foo(0) diff --git a/pyk/regression-new/equals-pattern/3.test.out b/pyk/regression-new/equals-pattern/3.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/equals-pattern/3.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/equals-pattern/4.test b/pyk/regression-new/equals-pattern/4.test new file mode 100644 index 00000000000..828b6467540 --- /dev/null +++ b/pyk/regression-new/equals-pattern/4.test @@ -0,0 +1 @@ +foo(1) diff --git a/pyk/regression-new/equals-pattern/4.test.out b/pyk/regression-new/equals-pattern/4.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/equals-pattern/4.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/equals-pattern/5.test b/pyk/regression-new/equals-pattern/5.test new file mode 100644 index 00000000000..65a2ef32210 --- /dev/null +++ b/pyk/regression-new/equals-pattern/5.test @@ -0,0 +1 @@ +baz(baz(bar(0))) diff --git a/pyk/regression-new/equals-pattern/5.test.out b/pyk/regression-new/equals-pattern/5.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/equals-pattern/5.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/equals-pattern/6.test b/pyk/regression-new/equals-pattern/6.test new file mode 100644 index 00000000000..542a53e6f6a --- /dev/null +++ b/pyk/regression-new/equals-pattern/6.test @@ -0,0 +1 @@ +baz(bar(0)) diff --git a/pyk/regression-new/equals-pattern/6.test.out b/pyk/regression-new/equals-pattern/6.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/equals-pattern/6.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/equals-pattern/7.test b/pyk/regression-new/equals-pattern/7.test new file mode 100644 index 00000000000..44a44cd88fa --- /dev/null +++ b/pyk/regression-new/equals-pattern/7.test @@ -0,0 +1 @@ +baz(foo(0)) diff --git a/pyk/regression-new/equals-pattern/7.test.out b/pyk/regression-new/equals-pattern/7.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/equals-pattern/7.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/equals-pattern/8.test b/pyk/regression-new/equals-pattern/8.test new file mode 100644 index 00000000000..a2c18a806a5 --- /dev/null +++ b/pyk/regression-new/equals-pattern/8.test @@ -0,0 +1 @@ +bar(1) diff --git a/pyk/regression-new/equals-pattern/8.test.out b/pyk/regression-new/equals-pattern/8.test.out new file mode 100644 index 00000000000..a2c989c3617 --- /dev/null +++ b/pyk/regression-new/equals-pattern/8.test.out @@ -0,0 +1,3 @@ + + bar ( 2 ) ~> .K + diff --git a/pyk/regression-new/equals-pattern/9.test b/pyk/regression-new/equals-pattern/9.test new file mode 100644 index 00000000000..cef025f6433 --- /dev/null +++ b/pyk/regression-new/equals-pattern/9.test @@ -0,0 +1 @@ +stuff(foo(0)) diff --git a/pyk/regression-new/equals-pattern/9.test.out b/pyk/regression-new/equals-pattern/9.test.out new file mode 100644 index 00000000000..1b239a340ff --- /dev/null +++ b/pyk/regression-new/equals-pattern/9.test.out @@ -0,0 +1,3 @@ + + 10 ~> .K + diff --git a/pyk/regression-new/equals-pattern/Makefile b/pyk/regression-new/equals-pattern/Makefile new file mode 100644 index 00000000000..9b000a071d8 --- /dev/null +++ b/pyk/regression-new/equals-pattern/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND?=llvm +KOMPILE_FLAGS=-w2e + +include ../include/ktest.mak diff --git a/pyk/regression-new/equals-pattern/test.k b/pyk/regression-new/equals-pattern/test.k new file mode 100644 index 00000000000..51668f4c8a5 --- /dev/null +++ b/pyk/regression-new/equals-pattern/test.k @@ -0,0 +1,37 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX + imports INT + imports K-EQUAL + imports BOOL + imports BASIC-K + +syntax KItem ::= foo(Int) | bar(Int) | baz(KItem) | stuff(K) + +syntax Constant ::= StringLiteral(K) | WStringLiteral(K) + +rule I:Int => foo(_) :=K foo(I) + requires I ==Int 0 + +rule 1 => foo(_) :/=K foo(0) + +rule foo(I:Int) => #fun(0 => I ==Int 0)(0) + +rule bar(A:Int) => #fun(bar(I => #fun(N => N +Int A)(I)))(bar(A)) + requires A #fun(baz(B) => baz(bar(_)) :=K baz(B))(baz(A)) + requires baz(_) :/=K A +rule baz(baz(A:KItem)) => #fun(baz(B) => baz(A) :=K baz(B))(baz(A)) + +rule stuff(K) => 10 + requires StringLiteral(...) :/=K K + andBool WStringLiteral(...) :/=K K +rule stuff(K) => 10 + requires StringLiteral(...) :=K K + andBool WStringLiteral(...) :=K K +endmodule + +module TEST + imports TEST-SYNTAX +endmodule diff --git a/pyk/regression-new/excludedModuleAtts/Makefile b/pyk/regression-new/excludedModuleAtts/Makefile new file mode 100644 index 00000000000..99ac9266ab6 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=$(filter-out Makefile, $(wildcard *)) +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/excludedModuleAtts/haskell/Makefile b/pyk/regression-new/excludedModuleAtts/haskell/Makefile new file mode 100644 index 00000000000..472f73894bd --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/haskell/Makefile @@ -0,0 +1,4 @@ +DEF=test +KOMPILE_BACKEND=haskell + +include ../../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/excludedModuleAtts/haskell/test-entry.k b/pyk/regression-new/excludedModuleAtts/haskell/test-entry.k new file mode 100644 index 00000000000..972387220c1 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/haskell/test-entry.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-ENTRY-SYNTAX [concrete] + +endmodule + +module TEST-ENTRY + +endmodule diff --git a/pyk/regression-new/excludedModuleAtts/haskell/test-entry.k.out b/pyk/regression-new/excludedModuleAtts/haskell/test-entry.k.out new file mode 100644 index 00000000000..a58cd7f4db4 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/haskell/test-entry.k.out @@ -0,0 +1 @@ +[Error] Compiler: Syntax module TEST-ENTRY-SYNTAX has excluded attribute [concrete]. diff --git a/pyk/regression-new/excludedModuleAtts/haskell/test-main.k b/pyk/regression-new/excludedModuleAtts/haskell/test-main.k new file mode 100644 index 00000000000..363b7eed9c4 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/haskell/test-main.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-MAIN-SYNTAX + +endmodule + +module TEST-MAIN [concrete] + +endmodule diff --git a/pyk/regression-new/excludedModuleAtts/haskell/test-main.k.out b/pyk/regression-new/excludedModuleAtts/haskell/test-main.k.out new file mode 100644 index 00000000000..1c7c59a9dd2 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/haskell/test-main.k.out @@ -0,0 +1 @@ +[Error] Compiler: Main module TEST-MAIN has excluded attribute [concrete]. diff --git a/pyk/regression-new/excludedModuleAtts/llvm/Makefile b/pyk/regression-new/excludedModuleAtts/llvm/Makefile new file mode 100644 index 00000000000..90651c31ff0 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/llvm/Makefile @@ -0,0 +1,3 @@ +DEF=test + +include ../../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/excludedModuleAtts/llvm/test-entry.k b/pyk/regression-new/excludedModuleAtts/llvm/test-entry.k new file mode 100644 index 00000000000..0e1161a25b9 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/llvm/test-entry.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-ENTRY-SYNTAX [symbolic] + +endmodule + +module TEST-ENTRY + +endmodule diff --git a/pyk/regression-new/excludedModuleAtts/llvm/test-entry.k.out b/pyk/regression-new/excludedModuleAtts/llvm/test-entry.k.out new file mode 100644 index 00000000000..8a33d7e38a2 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/llvm/test-entry.k.out @@ -0,0 +1 @@ +[Error] Compiler: Syntax module TEST-ENTRY-SYNTAX has excluded attribute [symbolic]. diff --git a/pyk/regression-new/excludedModuleAtts/llvm/test-main.k b/pyk/regression-new/excludedModuleAtts/llvm/test-main.k new file mode 100644 index 00000000000..db65291b750 --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/llvm/test-main.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-MAIN-SYNTAX + +endmodule + +module TEST-MAIN [symbolic] + +endmodule diff --git a/pyk/regression-new/excludedModuleAtts/llvm/test-main.k.out b/pyk/regression-new/excludedModuleAtts/llvm/test-main.k.out new file mode 100644 index 00000000000..735adb6574c --- /dev/null +++ b/pyk/regression-new/excludedModuleAtts/llvm/test-main.k.out @@ -0,0 +1 @@ +[Error] Compiler: Main module TEST-MAIN has excluded attribute [symbolic]. diff --git a/pyk/regression-new/exit-code-no-gen-top/1.ecode b/pyk/regression-new/exit-code-no-gen-top/1.ecode new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/exit-code-no-gen-top/1.ecode @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/exit-code-no-gen-top/1.ecode.out b/pyk/regression-new/exit-code-no-gen-top/1.ecode.out new file mode 100644 index 00000000000..f415d01aff3 --- /dev/null +++ b/pyk/regression-new/exit-code-no-gen-top/1.ecode.out @@ -0,0 +1,8 @@ + + + .K + + + 0 + + diff --git a/pyk/regression-new/exit-code-no-gen-top/Makefile b/pyk/regression-new/exit-code-no-gen-top/Makefile new file mode 100644 index 00000000000..7b86502e933 --- /dev/null +++ b/pyk/regression-new/exit-code-no-gen-top/Makefile @@ -0,0 +1,6 @@ +DEF=exitcode +EXT=ecode +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/exit-code-no-gen-top/exitcode.k b/pyk/regression-new/exit-code-no-gen-top/exitcode.k new file mode 100644 index 00000000000..c37cc7c48f6 --- /dev/null +++ b/pyk/regression-new/exit-code-no-gen-top/exitcode.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module EXITCODE-SYNTAX + imports INT + + syntax Pgm ::= Int +endmodule + +module EXITCODE + imports EXITCODE-SYNTAX + + configuration + + $PGM:Pgm + 0 + + + rule I:Int => .K ... + _ => I + +endmodule diff --git a/pyk/regression-new/f32-mul/1.mul b/pyk/regression-new/f32-mul/1.mul new file mode 100644 index 00000000000..f8631220d61 --- /dev/null +++ b/pyk/regression-new/f32-mul/1.mul @@ -0,0 +1 @@ +f32mul ( -6.2831854820251465 , 1.401298464324817e-45 ) ; checkEqual ( -8.40779079e-45 ) diff --git a/pyk/regression-new/f32-mul/1.mul.out b/pyk/regression-new/f32-mul/1.mul.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/f32-mul/1.mul.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/f32-mul/Makefile b/pyk/regression-new/f32-mul/Makefile new file mode 100644 index 00000000000..dd8a43000d5 --- /dev/null +++ b/pyk/regression-new/f32-mul/Makefile @@ -0,0 +1,6 @@ +DEF=float-mul +EXT=mul +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/f32-mul/float-mul.k b/pyk/regression-new/f32-mul/float-mul.k new file mode 100644 index 00000000000..06661ad231a --- /dev/null +++ b/pyk/regression-new/f32-mul/float-mul.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module FLOAT-MUL-SYNTAX + imports FLOAT + syntax Pgm ::= f32mul ( Float, Float ) + | checkEqual ( Float ) + | Pgm ";" Pgm +endmodule + +module FLOAT-MUL + imports FLOAT-MUL-SYNTAX + imports INT + + configuration $PGM:Pgm + + rule f32mul ( F1, F2 ) => roundFloat(F1, 24, 8) *Float roundFloat(F2, 24, 8) ... + rule F1:Float ~> checkEqual ( F2 ) => .K ... requires F1 ==Float roundFloat(F2, 24, 8) + rule P1 ; P2 => P1 ~> P2 ... +endmodule diff --git a/pyk/regression-new/fatalWarnings/Makefile b/pyk/regression-new/fatalWarnings/Makefile new file mode 100644 index 00000000000..3b59c03a3cc --- /dev/null +++ b/pyk/regression-new/fatalWarnings/Makefile @@ -0,0 +1,3 @@ +KOMPILE_FLAGS=-w2e -w all + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/fatalWarnings/test.k b/pyk/regression-new/fatalWarnings/test.k new file mode 100644 index 00000000000..80b0f95b55b --- /dev/null +++ b/pyk/regression-new/fatalWarnings/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + +syntax Foo ::= "foo" +syntax Bar ::= "foo" + +rule foo => . + +endmodule diff --git a/pyk/regression-new/fatalWarnings/test.k.out b/pyk/regression-new/fatalWarnings/test.k.out new file mode 100644 index 00000000000..0182da0db62 --- /dev/null +++ b/pyk/regression-new/fatalWarnings/test.k.out @@ -0,0 +1 @@ +[Error] Compiler: Could not find main syntax module with name TEST-SYNTAX in definition. Use --syntax-module to specify one. Using TEST as default. diff --git a/pyk/regression-new/ffi-llvm/Makefile b/pyk/regression-new/ffi-llvm/Makefile new file mode 100644 index 00000000000..083497d5260 --- /dev/null +++ b/pyk/regression-new/ffi-llvm/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/ffi-llvm/test.k b/pyk/regression-new/ffi-llvm/test.k new file mode 100644 index 00000000000..04d843de3a2 --- /dev/null +++ b/pyk/regression-new/ffi-llvm/test.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "ffi.md" + +module TEST-SYNTAX + imports FFI-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports FFI +endmodule diff --git a/pyk/regression-new/float-id/1.test b/pyk/regression-new/float-id/1.test new file mode 100644 index 00000000000..736991a1387 --- /dev/null +++ b/pyk/regression-new/float-id/1.test @@ -0,0 +1 @@ +NaN diff --git a/pyk/regression-new/float-id/1.test.out b/pyk/regression-new/float-id/1.test.out new file mode 100644 index 00000000000..2eb725f65a0 --- /dev/null +++ b/pyk/regression-new/float-id/1.test.out @@ -0,0 +1,3 @@ + + NaN ~> .K + diff --git a/pyk/regression-new/float-id/2.test b/pyk/regression-new/float-id/2.test new file mode 100644 index 00000000000..3c62151db76 --- /dev/null +++ b/pyk/regression-new/float-id/2.test @@ -0,0 +1 @@ +Infinity diff --git a/pyk/regression-new/float-id/2.test.out b/pyk/regression-new/float-id/2.test.out new file mode 100644 index 00000000000..65907e4a71a --- /dev/null +++ b/pyk/regression-new/float-id/2.test.out @@ -0,0 +1,3 @@ + + Infinity ~> .K + diff --git a/pyk/regression-new/float-id/3.test b/pyk/regression-new/float-id/3.test new file mode 100644 index 00000000000..879e80ee343 --- /dev/null +++ b/pyk/regression-new/float-id/3.test @@ -0,0 +1 @@ +-Infinity diff --git a/pyk/regression-new/float-id/3.test.out b/pyk/regression-new/float-id/3.test.out new file mode 100644 index 00000000000..262fec8509c --- /dev/null +++ b/pyk/regression-new/float-id/3.test.out @@ -0,0 +1,3 @@ + + -Infinity ~> .K + diff --git a/pyk/regression-new/float-id/4.test b/pyk/regression-new/float-id/4.test new file mode 100644 index 00000000000..d9f5b6df078 --- /dev/null +++ b/pyk/regression-new/float-id/4.test @@ -0,0 +1 @@ +NaNf diff --git a/pyk/regression-new/float-id/4.test.out b/pyk/regression-new/float-id/4.test.out new file mode 100644 index 00000000000..1720a25c6ef --- /dev/null +++ b/pyk/regression-new/float-id/4.test.out @@ -0,0 +1,3 @@ + + NaNf ~> .K + diff --git a/pyk/regression-new/float-id/5.test b/pyk/regression-new/float-id/5.test new file mode 100644 index 00000000000..5c635f29b29 --- /dev/null +++ b/pyk/regression-new/float-id/5.test @@ -0,0 +1 @@ +NaNp24x8 diff --git a/pyk/regression-new/float-id/5.test.out b/pyk/regression-new/float-id/5.test.out new file mode 100644 index 00000000000..1720a25c6ef --- /dev/null +++ b/pyk/regression-new/float-id/5.test.out @@ -0,0 +1,3 @@ + + NaNf ~> .K + diff --git a/pyk/regression-new/float-id/Makefile b/pyk/regression-new/float-id/Makefile new file mode 100644 index 00000000000..b46362c03c6 --- /dev/null +++ b/pyk/regression-new/float-id/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/float-id/test.k b/pyk/regression-new/float-id/test.k new file mode 100644 index 00000000000..d18be6adcac --- /dev/null +++ b/pyk/regression-new/float-id/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports FLOAT-SYNTAX + imports ID +endmodule + +module TEST + imports TEST-SYNTAX + configuration $PGM:Float +endmodule diff --git a/pyk/regression-new/fresh1/Makefile b/pyk/regression-new/fresh1/Makefile new file mode 100644 index 00000000000..69e30b0cc04 --- /dev/null +++ b/pyk/regression-new/fresh1/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND?=kore +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/fresh1/test.k b/pyk/regression-new/fresh1/test.k new file mode 100644 index 00000000000..62edd4568f1 --- /dev/null +++ b/pyk/regression-new/fresh1/test.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports BOOL + imports MAP + + syntax Foo ::= foo(Int) + + syntax Foo ::= freshFoo(Int) [freshGenerator, function, total] + rule freshFoo(I:Int) => foo(I) + + syntax KItem ::= foo(Foo, Int, Int, Int) + + rule 0 => foo(!_I:Foo, !X:Int, !X:Int, !_Y:Int) + +endmodule diff --git a/pyk/regression-new/fresh2/Makefile b/pyk/regression-new/fresh2/Makefile new file mode 100644 index 00000000000..69e30b0cc04 --- /dev/null +++ b/pyk/regression-new/fresh2/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND?=kore +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/fresh2/test.k b/pyk/regression-new/fresh2/test.k new file mode 100644 index 00000000000..30c11d3a43d --- /dev/null +++ b/pyk/regression-new/fresh2/test.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports BOOL + imports MAP + + syntax Foo ::= foo(Int) + + syntax Foo ::= freshFoo(Int) [freshGenerator, function, total] + rule freshFoo(I:Int) => foo(I) + + syntax KItem ::= foo(Foo, Int, Int, Int) + + rule 0 => foo(!_I:Foo, !X:Int, !X:Int, !_Y:Int) + + configuration $PGM:K 0 + +endmodule diff --git a/pyk/regression-new/fresh3/Makefile b/pyk/regression-new/fresh3/Makefile new file mode 100644 index 00000000000..73cbdb5383e --- /dev/null +++ b/pyk/regression-new/fresh3/Makefile @@ -0,0 +1,7 @@ +DEF=test-ext +EXT=test-ext +TESTDIR=. +KOMPILE_BACKEND?=llvm +KOMPILE_FLAGS=--syntax-module TEST-EXT + +include ../include/ktest.mak diff --git a/pyk/regression-new/fresh3/test-ext.k b/pyk/regression-new/fresh3/test-ext.k new file mode 100644 index 00000000000..0bf29e10d4c --- /dev/null +++ b/pyk/regression-new/fresh3/test-ext.k @@ -0,0 +1,34 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module EVM-DATA + imports STRING + + syntax JSON ::= String + // ---------------------- +endmodule + +module EVM + imports EVM-DATA + + configuration + + $PGM:EthereumCommand + + syntax EthereumCommand +endmodule + +module ETHEREUM-SIMULATION + imports EVM + + syntax EthereumCommand ::= "load" JSON | "mkTX" Int + // --------------------------------------------------- + rule load "transaction" => mkTX !_ID:Int ... +endmodule + +module TEST-EXT + imports ETHEREUM-SIMULATION + + syntax KItem ::= "step" + + rule step => .K ... +endmodule diff --git a/pyk/regression-new/fun-llvm/Makefile b/pyk/regression-new/fun-llvm/Makefile new file mode 100644 index 00000000000..e7904af4e4d --- /dev/null +++ b/pyk/regression-new/fun-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=fun-test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module FUN-TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/fun-llvm/fun-test.k b/pyk/regression-new/fun-llvm/fun-test.k new file mode 100644 index 00000000000..62e72221c2e --- /dev/null +++ b/pyk/regression-new/fun-llvm/fun-test.k @@ -0,0 +1,105 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FUN-TEST + imports INT + imports STRING + imports MAP + + configuration + $PGM:KItem + .Map + +syntax KItem ::= nestedFun( Int ) +rule nestedFun(A) => #fun(B => #fun(C => 100 *Int A +Int 10 *Int B +Int C)(2 *Int B))(2 *Int A) + +syntax KItem ::= nestedFunString ( Int ) +rule nestedFunString(A) => #fun(B => #fun(C => Int2String(A) +String Int2String(B) +String Int2String(C))(2 *Int B))(2 *Int A) + +syntax FooT ::= "#foo" +syntax BarT ::= "#bar" + +syntax BarT ::= fooToBar( FooT ) +rule fooToBar( #foo ) => #bar + +syntax KItem ::= useFooToBar( FooT ) +rule useFooToBar(FOO) => #fun(F => fooToBar(F))(FOO) + +syntax KItem ::= useNestedFooToBar( FooT ) +rule useNestedFooToBar(FOO) => #fun(F2 => #fun(F3 => fooToBar(F3))(F2) )(FOO) + +syntax FooInt ::= Int +syntax FooInt ::= getFooInt() [function] +rule getFooInt() => 0 + +syntax BarInt ::= Int +syntax BarInt ::= getBarInt() [function] +rule getBarInt() => 1 + +syntax KItem ::= useFooBarInt() +rule useFooBarInt() => #fun( _FOO => getBarInt() )(getFooInt()) + +// LLVM error +syntax KItem ::= useNestedBarInt() +rule useNestedBarInt() + => #fun(_FOO + => #fun(_F2 => getBarInt() )(0) + )(0) + + syntax KItem ::= nestedFun3Levels() + rule nestedFun3Levels() + => #fun(V1 + => #fun(_V2 + => #fun(_V3 + => requiresConfig() + )(V1 *Int 0) + )(0) + )(0) + + syntax Int ::= requiresConfig() [function] + rule [[ requiresConfig() => 0 ]] + _M + + syntax IntList ::= List{Int, ""} + + syntax KItem ::= callFunIntListAndConfig() + rule callFunIntListAndConfig() => funIntListAndConfig() + + syntax Int ::= funIntListAndConfig() [function] + rule [[ funIntListAndConfig() => #fun(_V1 => 0)(.IntList) ]] + _M + + syntax KItem ::= Int + syntax Int ::= funSortTest(Int) [function] + rule funSortTest(I) + => #fun(BALANCE + => #fun(ROOT + => BALANCE +Int ROOT)(I))(I) + + syntax KItem ::= Hash + syntax Hash ::= funSortTest2() [function] + rule funSortTest2() + => #fun(EPOCH + => #fun(CommitteesPerSlot + => #fun(OFFSET + => #fun(SHARD + => #fun(FirstCommittee + => #fun(MaxRandomByte + => #fun(SEED + => #fun(I + => funSortTest2Aux(EPOCH, CommitteesPerSlot, OFFSET, SHARD, FirstCommittee, MaxRandomByte, SEED, I) + )(0) + )(get_seed(EPOCH)) + )(0) + )(0) + )(0) + )(0) + )(0) + )(0) + + syntax Hash ::= funSortTest2Aux(Int, Int, Int, Int, Int, Int, h: Hash, Int) [function] + rule funSortTest2Aux(... h: H) => H + + syntax Hash ::= "foo" + syntax Hash ::= "get_seed" "(" Int ")" [function] + rule get_seed(_) => foo + +endmodule diff --git a/pyk/regression-new/fun-llvm/funIntListAndConfig.test b/pyk/regression-new/fun-llvm/funIntListAndConfig.test new file mode 100644 index 00000000000..b7970b184c7 --- /dev/null +++ b/pyk/regression-new/fun-llvm/funIntListAndConfig.test @@ -0,0 +1 @@ +callFunIntListAndConfig() diff --git a/pyk/regression-new/fun-llvm/funIntListAndConfig.test.out b/pyk/regression-new/fun-llvm/funIntListAndConfig.test.out new file mode 100644 index 00000000000..4eb21a69d77 --- /dev/null +++ b/pyk/regression-new/fun-llvm/funIntListAndConfig.test.out @@ -0,0 +1,8 @@ + + + 0 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/funSort.test b/pyk/regression-new/fun-llvm/funSort.test new file mode 100644 index 00000000000..14987d343cd --- /dev/null +++ b/pyk/regression-new/fun-llvm/funSort.test @@ -0,0 +1 @@ +funSortTest(1) diff --git a/pyk/regression-new/fun-llvm/funSort.test.out b/pyk/regression-new/fun-llvm/funSort.test.out new file mode 100644 index 00000000000..8b4921faf1b --- /dev/null +++ b/pyk/regression-new/fun-llvm/funSort.test.out @@ -0,0 +1,8 @@ + + + 2 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/funSort2.test b/pyk/regression-new/fun-llvm/funSort2.test new file mode 100644 index 00000000000..9f8adc838ad --- /dev/null +++ b/pyk/regression-new/fun-llvm/funSort2.test @@ -0,0 +1 @@ +funSortTest2() diff --git a/pyk/regression-new/fun-llvm/funSort2.test.out b/pyk/regression-new/fun-llvm/funSort2.test.out new file mode 100644 index 00000000000..cd7a9bf800e --- /dev/null +++ b/pyk/regression-new/fun-llvm/funSort2.test.out @@ -0,0 +1,8 @@ + + + foo ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/nestedFun.test b/pyk/regression-new/fun-llvm/nestedFun.test new file mode 100644 index 00000000000..00541a70283 --- /dev/null +++ b/pyk/regression-new/fun-llvm/nestedFun.test @@ -0,0 +1 @@ +nestedFun(1) diff --git a/pyk/regression-new/fun-llvm/nestedFun.test.out b/pyk/regression-new/fun-llvm/nestedFun.test.out new file mode 100644 index 00000000000..e4b28489d17 --- /dev/null +++ b/pyk/regression-new/fun-llvm/nestedFun.test.out @@ -0,0 +1,8 @@ + + + 124 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/nestedFun3Levels.test b/pyk/regression-new/fun-llvm/nestedFun3Levels.test new file mode 100644 index 00000000000..3f6b66e8ac4 --- /dev/null +++ b/pyk/regression-new/fun-llvm/nestedFun3Levels.test @@ -0,0 +1 @@ +nestedFun3Levels() diff --git a/pyk/regression-new/fun-llvm/nestedFun3Levels.test.out b/pyk/regression-new/fun-llvm/nestedFun3Levels.test.out new file mode 100644 index 00000000000..4eb21a69d77 --- /dev/null +++ b/pyk/regression-new/fun-llvm/nestedFun3Levels.test.out @@ -0,0 +1,8 @@ + + + 0 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/nestedFunString.test b/pyk/regression-new/fun-llvm/nestedFunString.test new file mode 100644 index 00000000000..91d06e10c47 --- /dev/null +++ b/pyk/regression-new/fun-llvm/nestedFunString.test @@ -0,0 +1 @@ +nestedFunString(1) diff --git a/pyk/regression-new/fun-llvm/nestedFunString.test.out b/pyk/regression-new/fun-llvm/nestedFunString.test.out new file mode 100644 index 00000000000..e2293f7b2d3 --- /dev/null +++ b/pyk/regression-new/fun-llvm/nestedFunString.test.out @@ -0,0 +1,8 @@ + + + "124" ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/useFooBarInt.test b/pyk/regression-new/fun-llvm/useFooBarInt.test new file mode 100644 index 00000000000..80c97f05785 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useFooBarInt.test @@ -0,0 +1 @@ +useFooBarInt() diff --git a/pyk/regression-new/fun-llvm/useFooBarInt.test.out b/pyk/regression-new/fun-llvm/useFooBarInt.test.out new file mode 100644 index 00000000000..9f2d66c2d98 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useFooBarInt.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/useFooToBar.test b/pyk/regression-new/fun-llvm/useFooToBar.test new file mode 100644 index 00000000000..72ef966a742 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useFooToBar.test @@ -0,0 +1 @@ +useFooToBar(#foo) diff --git a/pyk/regression-new/fun-llvm/useFooToBar.test.out b/pyk/regression-new/fun-llvm/useFooToBar.test.out new file mode 100644 index 00000000000..756dd75abf4 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useFooToBar.test.out @@ -0,0 +1,8 @@ + + + #bar ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/useNestedBarInt.test b/pyk/regression-new/fun-llvm/useNestedBarInt.test new file mode 100644 index 00000000000..999630e087a --- /dev/null +++ b/pyk/regression-new/fun-llvm/useNestedBarInt.test @@ -0,0 +1 @@ +useNestedBarInt() diff --git a/pyk/regression-new/fun-llvm/useNestedBarInt.test.out b/pyk/regression-new/fun-llvm/useNestedBarInt.test.out new file mode 100644 index 00000000000..9f2d66c2d98 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useNestedBarInt.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/useNestedFooBarInt.test b/pyk/regression-new/fun-llvm/useNestedFooBarInt.test new file mode 100644 index 00000000000..80c97f05785 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useNestedFooBarInt.test @@ -0,0 +1 @@ +useFooBarInt() diff --git a/pyk/regression-new/fun-llvm/useNestedFooBarInt.test.out b/pyk/regression-new/fun-llvm/useNestedFooBarInt.test.out new file mode 100644 index 00000000000..9f2d66c2d98 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useNestedFooBarInt.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + .Map + + diff --git a/pyk/regression-new/fun-llvm/useNestedFooToBar.test b/pyk/regression-new/fun-llvm/useNestedFooToBar.test new file mode 100644 index 00000000000..99cfdee0bf1 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useNestedFooToBar.test @@ -0,0 +1 @@ +useNestedFooToBar(#foo) diff --git a/pyk/regression-new/fun-llvm/useNestedFooToBar.test.out b/pyk/regression-new/fun-llvm/useNestedFooToBar.test.out new file mode 100644 index 00000000000..756dd75abf4 --- /dev/null +++ b/pyk/regression-new/fun-llvm/useNestedFooToBar.test.out @@ -0,0 +1,8 @@ + + + #bar ~> .K + + + .Map + + diff --git a/pyk/regression-new/glr/1.test b/pyk/regression-new/glr/1.test new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/pyk/regression-new/glr/1.test @@ -0,0 +1 @@ +foo diff --git a/pyk/regression-new/glr/Makefile b/pyk/regression-new/glr/Makefile new file mode 100644 index 00000000000..c547f370fcd --- /dev/null +++ b/pyk/regression-new/glr/Makefile @@ -0,0 +1,17 @@ +DEF=test +EXT=foo +TESTDIR=. +KOMPILE_FLAGS+=--gen-glr-bison-parser + +test: test.kore + $(KPRINT) test-kompiled test.kore | diff - test.ref + +test.kore: 1.test kompile + ./test-kompiled/parser_PGM 1.test > test.kore +include ../include/ktest.mak + +clean: + rm -rf test.kore test-kompiled + + +KRUN_OR_LEGACY=./parse diff --git a/pyk/regression-new/glr/parse b/pyk/regression-new/glr/parse new file mode 100755 index 00000000000..88875b921ff --- /dev/null +++ b/pyk/regression-new/glr/parse @@ -0,0 +1,5 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../../bin +pgm=$1 +shift +llvm-krun -c PGM "$pgm" A prettyfile -p "$@" -d "$(dirname "$0")/test-kompiled" diff --git a/pyk/regression-new/glr/test.k b/pyk/regression-new/glr/test.k new file mode 100644 index 00000000000..b71b0128b47 --- /dev/null +++ b/pyk/regression-new/glr/test.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + + syntax A ::= B | C + syntax B ::= D + syntax C ::= D + syntax D ::= "foo" + +endmodule + +module TEST + imports TEST-SYNTAX + + configuration $PGM:A + +endmodule diff --git a/pyk/regression-new/glr/test.ref b/pyk/regression-new/glr/test.ref new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/pyk/regression-new/glr/test.ref @@ -0,0 +1 @@ +foo diff --git a/pyk/regression-new/glr2/1.test b/pyk/regression-new/glr2/1.test new file mode 100644 index 00000000000..828b6467540 --- /dev/null +++ b/pyk/regression-new/glr2/1.test @@ -0,0 +1 @@ +foo(1) diff --git a/pyk/regression-new/glr2/Makefile b/pyk/regression-new/glr2/Makefile new file mode 100644 index 00000000000..c547f370fcd --- /dev/null +++ b/pyk/regression-new/glr2/Makefile @@ -0,0 +1,17 @@ +DEF=test +EXT=foo +TESTDIR=. +KOMPILE_FLAGS+=--gen-glr-bison-parser + +test: test.kore + $(KPRINT) test-kompiled test.kore | diff - test.ref + +test.kore: 1.test kompile + ./test-kompiled/parser_PGM 1.test > test.kore +include ../include/ktest.mak + +clean: + rm -rf test.kore test-kompiled + + +KRUN_OR_LEGACY=./parse diff --git a/pyk/regression-new/glr2/parse b/pyk/regression-new/glr2/parse new file mode 100755 index 00000000000..6060456c0a7 --- /dev/null +++ b/pyk/regression-new/glr2/parse @@ -0,0 +1,5 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../../bin +pgm=$1 +shift +llvm-krun -c PGM "$pgm" Exp prettyfile -p "$@" -d "$(dirname "$0")/test-kompiled" diff --git a/pyk/regression-new/glr2/test.k b/pyk/regression-new/glr2/test.k new file mode 100644 index 00000000000..25c524a3c02 --- /dev/null +++ b/pyk/regression-new/glr2/test.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Exp ::= Val + | Exp "+" Exp + | foo(Exp) [klabel(foo)] + syntax Val ::= foo(Val) [klabel(foo)] + | Int + +endmodule + +module TEST + imports TEST-SYNTAX + + configuration $PGM:Exp + +endmodule diff --git a/pyk/regression-new/glr2/test.ref b/pyk/regression-new/glr2/test.ref new file mode 100644 index 00000000000..f4bd10eb419 --- /dev/null +++ b/pyk/regression-new/glr2/test.ref @@ -0,0 +1 @@ +foo ( 1 ) diff --git a/pyk/regression-new/glr3/1.test b/pyk/regression-new/glr3/1.test new file mode 100644 index 00000000000..185bc7d37cc --- /dev/null +++ b/pyk/regression-new/glr3/1.test @@ -0,0 +1 @@ +foo(1, 1, 1) diff --git a/pyk/regression-new/glr3/Makefile b/pyk/regression-new/glr3/Makefile new file mode 100644 index 00000000000..c547f370fcd --- /dev/null +++ b/pyk/regression-new/glr3/Makefile @@ -0,0 +1,17 @@ +DEF=test +EXT=foo +TESTDIR=. +KOMPILE_FLAGS+=--gen-glr-bison-parser + +test: test.kore + $(KPRINT) test-kompiled test.kore | diff - test.ref + +test.kore: 1.test kompile + ./test-kompiled/parser_PGM 1.test > test.kore +include ../include/ktest.mak + +clean: + rm -rf test.kore test-kompiled + + +KRUN_OR_LEGACY=./parse diff --git a/pyk/regression-new/glr3/parse b/pyk/regression-new/glr3/parse new file mode 100755 index 00000000000..6060456c0a7 --- /dev/null +++ b/pyk/regression-new/glr3/parse @@ -0,0 +1,5 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../../bin +pgm=$1 +shift +llvm-krun -c PGM "$pgm" Exp prettyfile -p "$@" -d "$(dirname "$0")/test-kompiled" diff --git a/pyk/regression-new/glr3/test.k b/pyk/regression-new/glr3/test.k new file mode 100644 index 00000000000..0d1cec011b2 --- /dev/null +++ b/pyk/regression-new/glr3/test.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Exp ::= Val + | Exp "+" Exp + | foo(Exp, Exp, Int) [klabel(foo)] + syntax Val ::= foo(Val, Val, Int) [klabel(foo)] + | Int + +endmodule + +module TEST + imports TEST-SYNTAX + + configuration $PGM:Exp + +endmodule diff --git a/pyk/regression-new/glr3/test.ref b/pyk/regression-new/glr3/test.ref new file mode 100644 index 00000000000..993b5fba581 --- /dev/null +++ b/pyk/regression-new/glr3/test.ref @@ -0,0 +1 @@ +foo ( 1 , 1 , 1 ) diff --git a/pyk/regression-new/glr4/1.test b/pyk/regression-new/glr4/1.test new file mode 100644 index 00000000000..828b6467540 --- /dev/null +++ b/pyk/regression-new/glr4/1.test @@ -0,0 +1 @@ +foo(1) diff --git a/pyk/regression-new/glr4/Makefile b/pyk/regression-new/glr4/Makefile new file mode 100644 index 00000000000..c547f370fcd --- /dev/null +++ b/pyk/regression-new/glr4/Makefile @@ -0,0 +1,17 @@ +DEF=test +EXT=foo +TESTDIR=. +KOMPILE_FLAGS+=--gen-glr-bison-parser + +test: test.kore + $(KPRINT) test-kompiled test.kore | diff - test.ref + +test.kore: 1.test kompile + ./test-kompiled/parser_PGM 1.test > test.kore +include ../include/ktest.mak + +clean: + rm -rf test.kore test-kompiled + + +KRUN_OR_LEGACY=./parse diff --git a/pyk/regression-new/glr4/parse b/pyk/regression-new/glr4/parse new file mode 100755 index 00000000000..6060456c0a7 --- /dev/null +++ b/pyk/regression-new/glr4/parse @@ -0,0 +1,5 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../../bin +pgm=$1 +shift +llvm-krun -c PGM "$pgm" Exp prettyfile -p "$@" -d "$(dirname "$0")/test-kompiled" diff --git a/pyk/regression-new/glr4/test.k b/pyk/regression-new/glr4/test.k new file mode 100644 index 00000000000..5e10c53e146 --- /dev/null +++ b/pyk/regression-new/glr4/test.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Exp5 ::= Exp4 | Exp5 "-" Exp5 | foo(Exp5) [klabel(foo)] + syntax Exp4 ::= Exp3 | Exp4 "-" Exp4 | foo(Exp4) [klabel(foo)] + syntax Exp3 ::= Exp2 | Exp3 "-" Exp3 | foo(Exp3) [klabel(foo)] + syntax Exp2 ::= Exp | Exp2 "-" Exp2 | foo(Exp2) [klabel(foo)] + syntax Exp ::= Val + | Exp "+" Exp + | foo(Exp) [klabel(foo)] + syntax Val ::= foo(Val) [klabel(foo)] + | Int + +endmodule + +module TEST + imports TEST-SYNTAX + + configuration $PGM:Exp5 + +endmodule diff --git a/pyk/regression-new/glr4/test.ref b/pyk/regression-new/glr4/test.ref new file mode 100644 index 00000000000..f4bd10eb419 --- /dev/null +++ b/pyk/regression-new/glr4/test.ref @@ -0,0 +1 @@ +foo ( 1 ) diff --git a/pyk/regression-new/group/1.test b/pyk/regression-new/group/1.test new file mode 100644 index 00000000000..7637e579e79 --- /dev/null +++ b/pyk/regression-new/group/1.test @@ -0,0 +1 @@ +6 / 2 - 2 - 1 diff --git a/pyk/regression-new/group/1.test.out b/pyk/regression-new/group/1.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/group/1.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/group/Makefile b/pyk/regression-new/group/Makefile new file mode 100644 index 00000000000..083497d5260 --- /dev/null +++ b/pyk/regression-new/group/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/group/test.k b/pyk/regression-new/group/test.k new file mode 100644 index 00000000000..a771fda87d0 --- /dev/null +++ b/pyk/regression-new/group/test.k @@ -0,0 +1,28 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Int ::= + "(" Int ")" [bracket] + | "-" Int [function, group(unmin)] + | Int "*" Int [function, group(muldiv)] + | Int "/" Int [function, group(muldiv)] + // digest is an attribute, but it's internal only, so it should be fine to use as a group + | Int "+" Int [function, group(plusmin,digest)] + | Int "-" Int [function, group(plusmin,digest)] + + syntax priority unmin > muldiv > plusmin + syntax left digest + syntax left muldiv +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + rule - I2 => 0 -Int I2 + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 divInt I2 + rule I1 + I2 => I1 +Int I2 + rule I1 - I2 => I1 -Int I2 +endmodule diff --git a/pyk/regression-new/help/Makefile b/pyk/regression-new/help/Makefile new file mode 100644 index 00000000000..fda32170654 --- /dev/null +++ b/pyk/regression-new/help/Makefile @@ -0,0 +1,36 @@ +DEF=test +EXT=test +TESTDIR=. +KRUN_FLAGS=--help +KOMPILE_FLAGS=--syntax-module TEST +PACKAGE_VERSION ?= $(shell cat ../../../../package/version) +GIT_REVISION=$(shell ../../../../scripts/get-version-string.sh) +VERSION_REGEX="$(PACKAGE_VERSION)\|$(shell echo $(GIT_REVISION) | sed 's/-dirty/\\(-dirty\\)\\?/')" +KPARSE=${K_BIN}/kparse +KPARSE_GEN=${K_BIN}/kparse-gen +KORE_PRINT=${K_BIN}/kore-print + +1.test: + ./check-git-revision-format "$(GIT_REVISION)" + ${KAST} --help | grep -q -- "--version" + ${KDEP} --help | grep -q -- "--version" + ${KOMPILE} --help | grep -q -- "--version" + ${KPROVE} --help | grep -q -- "--version" + ${KRUN} --help | grep -q -- "--version" + ${KSERVER} --help | grep -q -- "--version" + ${KPARSE} --help | grep -q -- "--version" + ${KPARSE_GEN} --help | grep -q -- "--version" + ${KORE_PRINT} --help | grep -q -- "--version" + ${KAST} --version | grep -q $(VERSION_REGEX) + ${KDEP} --version | grep -q $(VERSION_REGEX) + ${KOMPILE} --version | grep -q $(VERSION_REGEX) + ${KPROVE} --version | grep -q $(VERSION_REGEX) + ${KRUN} --version | grep -q $(VERSION_REGEX) + ${KSERVER} --version | grep -q $(VERSION_REGEX) + ${KPARSE} --version | grep -q $(VERSION_REGEX) + ${KPARSE_GEN} --version | grep -q $(VERSION_REGEX) + ${KORE_PRINT} --version | grep -q $(VERSION_REGEX) + + +include ../include/ktest.mak + diff --git a/pyk/regression-new/help/check-git-revision-format b/pyk/regression-new/help/check-git-revision-format new file mode 100755 index 00000000000..49f30abdefd --- /dev/null +++ b/pyk/regression-new/help/check-git-revision-format @@ -0,0 +1,11 @@ +#!/usr/bin/env bash + +GIT_REVISION="$1" +shift + +if [ -z "$GIT_REVISION" ]; then + exit 0 +fi + +VERSION_REGEX='v[0-9]+\.[0-9]+\.[0-9]+-[0-9]+-g[0-9a-z]+(-dirty)?$' +echo "$GIT_REVISION" | egrep -q "$VERSION_REGEX" diff --git a/pyk/regression-new/help/test.k b/pyk/regression-new/help/test.k new file mode 100644 index 00000000000..11557aa0c73 --- /dev/null +++ b/pyk/regression-new/help/test.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + +endmodule diff --git a/pyk/regression-new/imp++-llvm/Makefile b/pyk/regression-new/imp++-llvm/Makefile new file mode 100644 index 00000000000..12efa369945 --- /dev/null +++ b/pyk/regression-new/imp++-llvm/Makefile @@ -0,0 +1,8 @@ +DEF=imp +EXT=imp +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--gen-glr-bison-parser --enable-search +KRUN_FLAGS=--search + +include ../include/ktest.mak diff --git a/pyk/regression-new/imp++-llvm/div.imp b/pyk/regression-new/imp++-llvm/div.imp new file mode 100644 index 00000000000..46da85aa150 --- /dev/null +++ b/pyk/regression-new/imp++-llvm/div.imp @@ -0,0 +1,3 @@ +int x,y; +x = 1; +y = ++x / (++x / x); diff --git a/pyk/regression-new/imp++-llvm/div.imp.out b/pyk/regression-new/imp++-llvm/div.imp.out new file mode 100644 index 00000000000..48339ebd62b --- /dev/null +++ b/pyk/regression-new/imp++-llvm/div.imp.out @@ -0,0 +1,104 @@ + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + x |-> 0 + y |-> 1 + + + 0 + + + + + 0 |-> 3 + 1 |-> 1 + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + x |-> 0 + y |-> 1 + + + 0 + + + + + 0 |-> 3 + 1 |-> 2 + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + x |-> 0 + y |-> 1 + + + 0 + + + + + 0 |-> 3 + 1 |-> 3 + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> .K ) ) + + + } diff --git a/pyk/regression-new/imp++-llvm/imp.md b/pyk/regression-new/imp++-llvm/imp.md new file mode 100644 index 00000000000..ac8bca28385 --- /dev/null +++ b/pyk/regression-new/imp++-llvm/imp.md @@ -0,0 +1,676 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +IMP++ +===== + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +### Abstract +This is the **K** semantic definition of the IMP++ language. +IMP++ extends the IMP language with the features listed below. We +strongly recommend you to first familiarize yourself with the IMP +language and its **K** definition in Tutorial 2 before proceeding. + +__Strings and concatenation of strings.__ Strings are useful +for the `print` statement, which is discussed below. For +string concatenation, we use the same `+` construct that we use +for addition (so we overload it). + +__Variable increment.__ We only add a pre-increment construct: +`++x` increments variable `x` and evaluates to the +incremented value. Variable increment makes the evaluation of +expressions have side effects, and thus makes the evaluation strategies +of the various language constructs have an influence on the set +of possible program behaviors. + +__Input and output.__ IMP++ adds a `read()` expression +construct which reads an integer number and evaluates to it, and +a variadic (i.e., it has an arbitrary number of arguments) statement +construct `print(e1,e2,...,en)` which evaluates its arguments +and then outputs their values. Note that the **K** tool allows to +connect the input and output cells to the standard input and output +buffers, this way compiling the language definition into an +interactive interpreter. + +__Abrupt termination.__ The `halt` statement simply halts +the program. The **K** tool shows the resulting configuration, as if the +program terminated normally. We therefore assume that an external +observer does not care whether the program terminates normally or +abruptly, same like with `exit` statements in conventional +programming languages like C. + +__Dynamic threads.__ The expression construct `spawn s` +starts a new concurrent thread that executes statement `s`, +which is expected to be a block, and evaluates immediately to a fresh +thread identifier that is also assigned to the newly created thread. +The new thread is given at creation time the `environment` of its +parent, so it can access all its parent's variables. This allows for +the parent thread, and the child thread to communicate; it also allows +for races and "unexpected" behaviors, so be careful. +For thread synchronization, IMP++ provides a thread join statement +construct `join t;`, where `t` evaluates to a thread +identifier, which stalls the current thread until thread `t` +completes its computation. For simplicity, we here assume a +sequentially consistent shared memory model. To experiment with other +memory models, see the definition of KERNELC. + +__Blocks and local variables.__ IMP++ allows blocks enclosed by +curly brackets. Also, IMP's global variable declaration construct is +generalized to be used anywhere as a statement, not only at the +beginning of the program. As expected, the scope of the declared +variables is from their declaration point till the end of the most +nested enclosing block. + + +### What You Will Learn Here + + +* How to define a less trivial language in **K**, as explained above. +* How to use the `superheat` and `supercool` +options of the **K** tool `kompile` to exhaustively explore the +non-determinism due to underspecified evaluation strategies. +* How to use the `transition` option of the **K** tool to +exhaustively explore the non-determinism due to concurrency. +* How to connect certain cells in the configuration to the +standard input and standard output, and thus turn the `krun` +tool into an interactive interpreter for the defined language. +* How to exhaustively search for the non-deterministic behaviors +of a program using the `search` option of `krun`. + +```k +module IMP-SYNTAX + imports DOMAINS-SYNTAX +``` +### Syntax +IMP++ adds several syntactic constructs to IMP. Also, since the +variable declaration construct is generalized to be used anywhere a +statement can be used, not only at the beginning of the program, we +need to remove the previous global variable declaration of IMP and +instead add a variable declaration statement construct + +We do not re-discuss the constructs which are taken over from IMP, +except when their syntax has been subtly modified (such as, for +example, the syntax of the previous "statement" assignment which +is now obtained by composing the new assignment expression, and the +new expression statement constructs); go the last lesson of +Tutorial 2 if you are interested in IMP's constructs. For execution +purposes, we tag the addition and division operations with the +`addition` and `division` tags. These attributes have +no theoretical significance, in that they do not affect the semantics +of the language in any way. They only have practical relevance, +specific to our implementation of the **K** tool. Specifically, we can +tell the **K** tool (using its `superheat` and `supercool` +options) that we want to exhaustively explore all the non-deterministic +behaviors (due to strictness) of these language constructs. For performance +reasons, by default the **K** tool chooses an arbitrary but fixed order to +evaluate the arguments of the strict language constructs, thus possibly +losing behaviors due to missed interleavings. This aspect was irrelevant in +IMP, because its expressions had no side effects, but it becomes relevant +in IMP++. + +The syntax of the IMP++ constructs is self-explanatory. Note that assignment +is now an expression construct. Also, `print` is variadic, taking a +list of expressions as argument. It is also strict, which means that the +entire list of expressions, that is, each expression in the list, will be +evaluated. Note also that we have now defined sequential composition +of statements as a whitespace-separated list of statements, aliased with +the nonterminal `Stmts`, and block as such a (possibly empty) sequence +of statements surrounded by curly brackets. + +```k + syntax AExp ::= Int | String | Id + | "++" Id + | "read" "(" ")" + | "-" AExp [strict] + | "(" AExp ")" [bracket] + > AExp "/" AExp [left, strict, group(division)] + > AExp "+" AExp [left, strict] + > "spawn" Block + > Id "=" AExp [strict(2)] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict] + | "!" BExp [strict] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1)] + syntax Block ::= "{" Stmts "}" + syntax Stmt ::= Block + | AExp ";" [strict] + | "if" "(" BExp ")" + Block "else" Block [strict(1)] + | "while" "(" BExp ")" Block + | "int" Ids ";" + | "print" "(" AExps ")" ";" + | "halt" ";" + > "join" AExp ";" [strict] + + syntax Ids ::= List{Id,","} + syntax AExps ::= List{AExp,","} + syntax Stmts ::= List{Stmt,""} + syntax AExps ::= Ids +endmodule + + +module IMP + imports IMP-SYNTAX + imports DOMAINS +``` + +### Semantics +We next give the semantics of IMP++. We start by first defining its +configuration. + +#### Configuration +The original configuration of IMP has been extended to include +all the various additional cells needed for IMP++. +To facilitate the semantics of threads, more specifically +to naturally give them access to their parent's variables, we prefer a +(rather conventional) split of the program state into an +`environment` and a `store`. An environment maps +variable names into `locations`, while a store maps locations +into values. Stores are also sometimes called `states`, or +`heaps`, or `memory`, in the literature. Like values, locations +can be anything. For simplicity, here we assume they are natural +numbers. Moreover, each thread has its own environment, so it knows +where all the variables that it has access to are located in the store +(that includes its locally declared variables as well as the variables +of its parent thread), and its own unique identifier. The store is +shared by all threads. For simplicity, we assume a sequentially consistent +memory model in IMP++. Note that the `thread` cell has multiplicity +`*`, meaning that there could be zero, one, or more instances of that cell +in the configuration at any given time. This multiplicity information +is important for **K**'s _configuration abstraction_ process: it tells +**K** how to complete rules which, in order to increase the modularity of the +definition, choose to not mention the entire configuration context. +The `in` and `out` cells hold the input and the output +buffers as lists of items. + +```k + configuration + + + $PGM:Stmts + .Map + 0 + + +//
+ .Map +// .List +// .List + .List + .List +
+// Replace the and cells with the next two in order to +// initialize the input buffer through krun +// $IN:List +// .List +// Replace the and cells with the next two to connect the +// input/output buffers to stdin/stdout through krun +// .List +// .List +// Replace the and cells with the next two to connect the +// input/output buffers to stdin/stdout and also allow input through krun +// $IN:List +// .List +``` + +We can also use configuration variables to initialize +the configuration through `krun`. For example, we may want to +pass a few list items in the `in` cell when the program makes +use of `read()`, so that the semantics does not get stuck. +Recall from IMP that configuration variables start with a _$_ +character when used in the configuration (see, for example, +_$PGM_) and can be initialized with any string by +`krun`; or course, the string should parse to a term of the +corresponding sort, otherwise errors will be generated. +Moreover, **K** allows you to connect list cells to the standard input or +the standard output. For example, if you add the attribute +`stream="stdin"` to the `in` cell, then `krun` +will prompt the user to pass input when the `in` cell is empty +and any semantic rule needs at least one item to be present there in +order to match. Similarly but dually, if you add the attribute +`stream="stdout"` to the `out` cell, then any item +placed into this cell by any rule will be promptly sent to the +standard output. This way, `krun` can be used to obtain +interactive interpreters based directly on the **K** semantics of the +language. For example: + +```shell script +sh$ krun sum-io.imp --output none +Add numbers up to (<= 0 to quit)? 10 +Sum = 55 +Add numbers up to (<= 0 to quit)? 1000 +Sum = 500500 +Add numbers up to (<= 0 to quit)? 0 +sh$ +``` + +The option `--output none` instructs `krun` to not +display the resulting configuration after the program executes. The +input/output streaming works with or without this option, although +if you don't use the option then a configuration with empty +`in` and `out` cells will be displayed after the program +is executed. You can also initialize the configuration using +configuration variables and stream the contents of the cells to +standard input/output at the same time. For example, if you use a +configuration variable in the `in` cell and pass contents to it +through `krun`, then that contents will be first consumed and +then the user will be prompted to introduce additional input if the +program's execution encounters more `read()` constructs. + +### The old IMP constructs +The semantics of the old IMP constructs is almost identical to their +semantics in the original IMP language, except for those constructs +making use of the program state and for those whose syntax has slightly +changed. Indeed, the rules for variable lookup and assignment in IMP +accessed the `state` cell, but that cell is not available in IMP++ +anymore. Instead, we have to use the combination of environment and store +cells. Thanks to **K**'s implicit configuration abstraction, we do not have +to mention the `thread` and `threads` cells: these are +automatically inferred (and added by the **K** tool at compile time) from the +definition of the configuration above, as there is only one correct +way to complete the configuration context of these rules in order to +match the configuration declared above. In our case here, "correct way" +means that the `k` and `env` cells will be considered as +being part of the same `thread` cell, as opposed to each being part +of a different thread. Configuration abstraction is crucial for modularity, +because it gives us the possibility to write our definitions in a way that +may not require us to revisit existing rules when we change the configuration. +Changes in the configuration are quite frequent in practice, typically +needed in order to accommodate new language features. For example, +imagine that we initially did not have threads in IMP++. There +would be no need for the `thread` and `threads` cells in +the configuration then, the cells `k` and `env` being simply +placed at the top level in the `T` cell, together with the +already existing cells. Then the rules below would be exactly the +same. Thus, configuration abstraction allows you to not have to +modify your rules when you make structural changes in your language +configuration. + +Below we list the semantics of the old IMP constructs, referring the +reader to the **K** semantics of IMP for their meaning. Like we tagged the +addition and the division rules above in the syntax, we also tag the lookup +and the assignment rules below (with tags `lookup` and +`assignment`), because we want to refer to them when we generate the +language model (with the `kompile` tool), basically to allow them to +generate (possibly non-deterministic) transitions. Indeed, these two rules, +unlike the other rules corresponding to old IMP constructs, can yield +non-deterministic behaviors when more threads are executed concurrently. +In terms of rewriting, these two rules can "compete" with each other on +some program configurations, in the sense that they can both match at the +same time and different behaviors may be obtained depending upon which of +them is chosen first. + +```k + syntax KResult ::= Int | Bool +``` +### Variable lookup + +```k + rule X:Id => I ... + ... X |-> N ... + ... N |-> I ... [group(lookup)] +``` + +### Arithmetic constructs + +```k + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I => 0 -Int I +``` + +### Boolean constructs + +```k + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false +``` + +### Variable assignment +Note that the old IMP assignment statement `X = I;` is now composed of two +constructs: an assignment expression construct `X = I`, followed by a +semicolon `;` turning the expression into a statement. The rationale behind +this syntactic restructuring has been explained in Lesson 7. Here is the +semantics of the two constructs: + +```k + rule _:Int; => .K + rule X = I:Int => I ... + ... X |-> N ... + ... N |-> (_ => I) ... [group(assignment)] +``` + +### Sequential composition +Sequential composition has been defined as a whitespace-separated syntactic +list of statements. Recall that syntactic lists are actually syntactic +sugar for cons-lists. Therefore, the following two rules eventually +sequentialize a syntactic list of statements `s1 s2 ... sn..` into the +corresponding computation `s1 ~> s2 ~> ... ~> sn`. + +```k + rule .Stmts => .K + rule S:Stmt Ss:Stmts => S ~> Ss +``` + +### Conditional statement + +```k + rule if (true) S else _ => S + rule if (false) _ else S => S +``` + +### While loop +The only thing to notice here is that the empty block has been replaced +with the block holding the explicit empty sequence. That's because in +the semantics all empty lists become explicit corresponding dots +(to avoid parsing ambiguities) + +```k + rule while (B) S => if (B) {S while (B) S} else {.Stmts} +``` + +### The new IMP++ constructs +We next discuss the semantics of the new IMP++ constructs. + +### Strings +First, we have to state that strings are also results. +Second, we give the semantics of IMP++ string concatenation (which +uses the already existing addition symbol `+` from IMP) by +reduction to the built-in string concatenation operation. + +```k + syntax KResult ::= String + rule Str1 + Str2 => Str1 +String Str2 +``` + +### Variable increment +Like variable lookup, this is also meant to be a supercool transition: we +want it to count both in the non-determinism due to strict operations above +it in the computation and in the non-determinism due to thread +interleavings. This rule also relies on **K**'s configuration abstraction. +Without abstraction, you would have to also include the `thread` and +`threads` cells. + +```k + rule ++X => I +Int 1 ... + ... X |-> N ... + ... N |-> (I => I +Int 1) ... [group(increment)] +``` + +### Read +The `read()` construct evaluates to the first integer in the +input buffer, which it consumes. Note that this rule is tagged +`increment`. This is because we will include it in the set of +potentially non-deterministic transitions when we kompile the definition; +we want to do that because two or more threads can "compete" on +reading the next integer from the input buffer, and different choices +for the next transition can lead to different behaviors. + +```k + rule read() => I ... + ListItem(I:Int) => .List ... [group(read)] +``` + +### Print +The `print` statement is strict, so all its arguments are +eventually evaluated (recall that `print` is variadic). We +append each of its evaluated arguments, in order, to the output buffer, +and structurally discard the residual `print` statement with an +empty list of arguments. We only want to allow printing integers and +strings, so we define a `Printable` syntactic category including +only these and define the `print` statement to only print +`Printable` elements. Alternatively, we could have had two +similar rules, one for integers and one for strings. Recall that, +currently, **K**'s lists are cons-lists, so we cannot simply rewrite the +head of a list (`P`) into a list (`.`). The first rule below is tagged, +because we want to include it in the list of transitions when we kompile; +different threads may compete on the output buffer and we want to capture +all behaviors. + +```k + syntax Printable ::= Int | String + +/* currently it is necessary to subsort Printable to AExp, + but future K should be able to infer that automatically. */ + syntax AExp ::= Printable + + context print(HOLE:AExp, _AEs:AExps); + + rule print(P:Printable,AEs => AEs); ... + ... .List => ListItem(P) [group(print)] + rule print(.AExps); => .K +``` + +### Halt +The `halt` statement empties the computation, so the rewriting process +simply terminates as if the program terminated normally. Interestingly, once +we add threads to the language, the `halt` statement as defined below +will terminate the current thread only. If you want an abrupt termination +statement that halts the entire program, then you need to discard the entire +contents of the `threads` cell, so the entire computation abruptly +terminates the entire program, no matter how many concurrent threads it has, +because there is nothing else to rewrite. + +```k + rule halt; ~> _ => .K +``` + +### Spawn thread +A spawned thread is passed its parent's environment at creation time. +The `spawn` expression in the parent thread is immediately +replaced by the unique identifier of the newly created thread, so the +parent thread can continue its execution. We only consider a sequentially +consistent shared memory model for IMP++, but other memory models can also +be defined in **K**; see, for example, the definition of KERNELC. Note that +the rule below does not need to be tagged in order to make it a transition +when we kompile, because the creation of the thread itself does not interfere +with the execution of other threads. Also, note that **K**'s configuration +abstraction is at heavy work here, in two different places. First, the +parent thread's `k` and `env` cells are wrapped within a +`thread` cell. Second, the child thread's `k`, `env` +and `id` cells are also wrapped within a `thread` cell. Why +that way and not putting all these four cells together within the +same thread, or even create an additional `threads` cell at top +holding a `thread` cell with the new `k`, `env` +and `id`? Because in the original configuration we declared +the multiplicity of the `thread` cell to be `*`, which +effectively tells the **K** tool that zero, one or more such cells can +co-exist in a configuration at any moment. The other cells have the +default multiplicity `one`, so they are not allowed to multiply. +Thus, the only way to complete the rule below in a way consistent with +the declared configuration is to wrap the first two cells in a +`thread` cell, and the latter two cells under the `.` +also in a `thread` cell. Once the rule applies, the spawning +thread cell will add a new thread cell next to it, which is consistent +with the declared configuration cell multiplicity. The unique identifier +of the new thread is generated using the `fresh` side condition. + +```k + rule spawn S => !T:Int ... Rho + (.Bag => ... S Rho !T ...) +``` +### Join thread +A thread who wants to join another thread `T` has to wait until +the computation of `T` becomes empty. When that happens, the +join statement is simply dissolved. The terminated thread is not removed, +because we want to allow possible other join statements to also dissolve. + +```k + rule join(T); => .K ... ... .K T ... +``` + +### Blocks +The body statement of a block is executed normally, making sure +that the environment at the block entry point is saved in the computation, +in order to be recovered after the block body statement. This step is +necessary because blocks can declare new variables having the same +name as variables which already exist in the environment, and our +semantics of variable declarations is to update the environment map in +the declared variable with a fresh location. Thus, variables which +are shadowed lose their original binding, which is why we take a +snapshot of the environment at block entrance and place it after the +block body (see the semantics of environment recovery at the end of +this module). Note that any store updates through variables which are +not declared locally are kept at the end of the block, since the store +is not saved/restored. An alternative to this environment save/restore +approach is to actually maintain a stack of environments and to push a +new layer at block entrance and pop it at block exit. The variable +lookup/assign/increment operations then also need to change, so we do +not prefer that non-modular approach. Compilers solve this problem by +statically renaming all local variables into fresh ones, to completely +eliminate shadowing and thus environment saving/restoring. The rule +below can be structural, because what it effectively does is to take a +snapshot of the current environment; this operation is arguably not a +computational step. + +```k + rule {Ss} => Ss ~> Rho ... Rho +``` + +### Variable declaration +We allocate a fresh location for each newly declared variable and +initialize it with 0. + +```k + rule int (X,Xs => Xs); ... + Rho => Rho[X <- !N:Int] + ... .Map => !N |-> 0 ... + rule int .Ids; => .K +``` + +### Auxiliary operations +We only have one auxiliary operation in IMP++, the environment +recovery. Its role is to discard the current environment in the +`env` cell and replace it with the environment that it holds. +This rule is structural: we do not want them to count as computational +steps in the transition system of a program. + +```k + rule Rho => .K ... _ => Rho +``` + +If you want to avoid useless environment recovery steps and keep the size +of the computation structure smaller, then you can also add the rule +``` + rule (_:Map => .) ~> _:Map +``` +This rule acts like a ``tail recursion'' optimization, but for blocks. */ +```k +// verification ids + syntax Id ::= "n" [token] + | "sum" [token] + | "a" [token] + | "b" [token] + | "c" [token] +endmodule +``` +### On Kompilation Options + +We are done with the IMP++ semantics. The next step is to kompile the +definition using the `kompile` tool, this way generating a language +model. Depending upon for what you want to use the generated language model, +you may need to kompile the definition using various options. We here discuss +these options. + +To tell the **K** tool to exhaustively explore all the behaviors due to the +non-determinism of addition, division, and threads, we have to kompile +with the command: + +```shell script +kompile imp.k --transition="addition division lookup assignment increment read print" +``` + +As already mentioned, the syntax and rule tags play no theoretical or +foundational role in **K**. They are only a means to allow `kompile` to +refer to them in its options, like we did above. By default, `kompile`'s +transition option is empty, because this yields the fastest language model when +executed. Transitions may slow down the execution, but they instrument +the language model to allow for formal analysis of program behaviors, even for +exhaustive analysis. + +Theoretically, the heating/cooling rules in **K** are fully reversible and +unconstrained by side conditions as we showed in the semantics of IMP. +For example, the theoretical heating/cooling rules corresponding to the +`strict` attribute of division are the following: + +``` +E₁ / E₂ ⇒ E₁ ⤳ □ / E₂ +E₁ ⤳ □ / E₂ ⇒ E₁ / E₂ +E₁ / E₂ ⇒ E₂ ⤳ E₁ / □ +E₂ ⤳ E₁ / □ ⇒ E₁ / E₂ +``` + +The other semantic rules apply `modulo` such structural rules. +For example, using heating rules we can bring a redex (a subterm which +can be reduced with semantic rules) to the front of the computation, +then reduce it, then use cooling rules to reconstruct a term over the +original syntax of the language, then heat again and +non-deterministically pick another redex, and so on and so forth +without losing any opportunities to apply semantic rules. +Nevertheless, these unrestricted heating/cooling rules may create an +immense, often unfeasibly large space of possibilities to analyze. +The `--transition` option implements an optimization which works +well with other implementation choices made in the current **K** tool. +Recall from the detailed description of the IMP language semantics that +(theoretical) reversible rules like above are restricted by default +to complementary conditional rules of the form + +``` +E₁ / E₂ ⇒ E₁ ⤳ □ / E₂ + if E₁ not in KResult +E₁ ⤳ □ / E₂ ⇒ E₁ / E₂ + if E₁ in KResult +E₁ / E₂ ⇒ E₂ ⤳ E₁ / □ + if E₂ not in KResult +E₂ ⤳ E₁ / □ ⇒ E₁ / E₂ + if E₂ in KResult +``` + +Therefore, our tool eagerly heats and lazily cools the computation. +In other words, heating rules apply until a redex gets placed on the +top of the computation, then some semantic rule applies and rewrites +that into a result, then a cooling rule is applied to plug the +obtained result back into its context, then another argument may be +chosen and completely heated, and so on. This leads to efficient +execution, but it may and typically does hide program behaviors. +Using the `--transition` option allows you to interfere with this +process and to obtain all possible non-deterministic behaviors as if +the theoretical heating/cooling rules were applied. Optimizations +of course happen under the hood, but you need not be aware of them. +Used carefully, this mechanism allows us to efficiently explore more of +the non-deterministic behaviors of a program, even all of them (like here). +For example, with the semantics of IMP++ given above, the `krun` +command with the `--search` option detects all five behaviors +of the following IMP++ program (`x` can be 0, 1, 2, 3, or undefined +due to division-by-zero): +``` + int x,y; + x = 1; + y = ++x / (++x / x); +``` + +Besides non-determinism due to underspecified argument evaluation +orders, which the current **K** tool addresses as explained above, there +is another important source of non-determinism in programming languages: +non-determinism due to concurrency/parallelism. For example, when two +or more threads are about to access the same location in the store and at +least one of these accesses is a write (i.e., an instance of the variable +assignment rule), there is a high chance that different choices for +the next transition lead to different program behaviors. While in the +theory of **K** all the rules count as computational steps +and hereby as transitions in the transition system associated to the +program, in practice that may yield a tremendous number of step +interleavings to consider. Most of these interleavings are behaviorally +equivalent for most purposes. For example, the fact that a thread computes +a step `8+3 ⇒ 11` is likely irrelevant for the other +threads, so one may not want to consider it as an observable transition in +the space of interleavings. Since the K tool cannot know without help which +transitions need to be explored and which do not, our approach is to +let the user say so explicitly using the `transition` option of +`kompile`. diff --git a/pyk/regression-new/imp++-llvm/spawn.imp b/pyk/regression-new/imp++-llvm/spawn.imp new file mode 100644 index 00000000000..3f2353fa50b --- /dev/null +++ b/pyk/regression-new/imp++-llvm/spawn.imp @@ -0,0 +1,8 @@ +int x; +print("x = "); +x=read(); +int t1; t1 = spawn {x=x/2;}; +int t2; t2 = spawn { /* join(t1); */ x=x+10;}; // uncomment for fully sync +join(t1); +join(t2); +print(x,"\n"); diff --git a/pyk/regression-new/imp++-llvm/spawn.imp.in b/pyk/regression-new/imp++-llvm/spawn.imp.in new file mode 100644 index 00000000000..409940768f2 --- /dev/null +++ b/pyk/regression-new/imp++-llvm/spawn.imp.in @@ -0,0 +1 @@ +23 diff --git a/pyk/regression-new/imp++-llvm/spawn.imp.out b/pyk/regression-new/imp++-llvm/spawn.imp.out new file mode 100644 index 00000000000..744f5ad91c4 --- /dev/null +++ b/pyk/regression-new/imp++-llvm/spawn.imp.out @@ -0,0 +1,239 @@ + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 0 + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 4 + + + + .K + + + t1 |-> 1 + x |-> 0 + + + 2 + + + + + 0 |-> 11 + 1 |-> 2 + 3 |-> 4 + + + ListItem ( #buffer ( "" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "x = 11\n" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 0 + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 4 + + + + .K + + + t1 |-> 1 + x |-> 0 + + + 2 + + + + + 0 |-> 16 + 1 |-> 2 + 3 |-> 4 + + + ListItem ( #buffer ( "" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "x = 16\n" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 0 + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 4 + + + + .K + + + t1 |-> 1 + x |-> 0 + + + 2 + + + + + 0 |-> 21 + 1 |-> 2 + 3 |-> 4 + + + ListItem ( #buffer ( "" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "x = 21\n" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 0 + + + + .K + + + t1 |-> 1 + t2 |-> 3 + x |-> 0 + + + 4 + + + + .K + + + t1 |-> 1 + x |-> 0 + + + 2 + + + + + 0 |-> 33 + 1 |-> 2 + 3 |-> 4 + + + ListItem ( #buffer ( "" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "x = 33\n" ~> .K ) ) + + + } diff --git a/pyk/regression-new/imp-haskell/Makefile b/pyk/regression-new/imp-haskell/Makefile new file mode 100644 index 00000000000..bf442af6d1b --- /dev/null +++ b/pyk/regression-new/imp-haskell/Makefile @@ -0,0 +1,11 @@ +DEF=imp +EXT=imp +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--post-process 'cat' +KPROVE_FLAGS= +export KOMPILE_BACKEND +export KPROVE_FLAGS +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak diff --git a/pyk/regression-new/imp-haskell/collatz.imp b/pyk/regression-new/imp-haskell/collatz.imp new file mode 100644 index 00000000000..49bef5c2a89 --- /dev/null +++ b/pyk/regression-new/imp-haskell/collatz.imp @@ -0,0 +1,19 @@ +// This program tests the Collatz conjecture for all numbers up to m +// and accumulates the total number of steps in s. + +int m, n, q, r, s; +m = 10; +while (!(m<=2)) { + n = m; + m = m + -1; + while (!(n<=1)) { + s = s+1; + q = n/2; + r = q+q+1; + if (r<=n) { + n = n+n+n+1; // n becomes 3*n+1 if odd + } else {n=q;} // or n/2 if even + } +} + +// s should be 66 when m is 10 diff --git a/pyk/regression-new/imp-haskell/collatz.imp.out b/pyk/regression-new/imp-haskell/collatz.imp.out new file mode 100644 index 00000000000..746da717cb6 --- /dev/null +++ b/pyk/regression-new/imp-haskell/collatz.imp.out @@ -0,0 +1,12 @@ + + + .K + + + m |-> 2 + n |-> 1 + q |-> 1 + r |-> 3 + s |-> 66 + + diff --git a/pyk/regression-new/imp-haskell/imp.k b/pyk/regression-new/imp-haskell/imp.k new file mode 100644 index 00000000000..06261193710 --- /dev/null +++ b/pyk/regression-new/imp-haskell/imp.k @@ -0,0 +1,70 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module IMP-SYNTAX + imports DOMAINS-SYNTAX + syntax AExp ::= Int | Id + | "-" Int + | AExp "/" AExp [left, seqstrict] + | "(" AExp ")" [bracket] + > AExp "+" AExp [left, seqstrict] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict] + | "!" BExp [strict] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1)] + syntax Block ::= "{" "}" + | "{" Stmt "}" + syntax Stmt ::= Block + | Id "=" AExp ";" [strict(2)] + | "if" "(" BExp ")" + Block "else" Block [strict(1)] + | "while" "(" BExp ")" Block + > Stmt Stmt [left] + syntax Pgm ::= "int" Ids ";" Stmt + syntax Ids ::= List{Id,","} +endmodule + + +module IMP + imports IMP-SYNTAX + imports BOOL + imports INT + imports MAP + imports SET + imports K-EQUAL + + syntax KResult ::= Int | Bool + + configuration + $PGM:Pgm + .Map + + +// AExp + rule X:Id => I ... ... X |-> I ... + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I1 => 0 -Int I1 +// BExp + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false +// Block + rule {} => .K + rule {S} => S +// Stmt + rule X = I:Int; => .K ... ... X |-> (_ => I) ... + rule S1:Stmt S2:Stmt => S1 ~> S2 + rule if (true) S else _ => S + rule if (false) _ else S => S + rule while (B) S => if (B) {S while (B) S} else {} +// Pgm + rule int (X,Xs => Xs);_ Rho:Map (.Map => X|->0) + requires notBool (X in keys(Rho)) + rule int .Ids; S => S + +// verification ids + syntax Id ::= "n" [token] + | "sum" [token] +endmodule diff --git a/pyk/regression-new/imp-haskell/klabel-spec.k b/pyk/regression-new/imp-haskell/klabel-spec.k new file mode 100644 index 00000000000..bf4338d7ac1 --- /dev/null +++ b/pyk/regression-new/imp-haskell/klabel-spec.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "imp.k" + +module VERIFICATION + imports IMP + + rule (#if C #then B1 #else B2 #fi) +Int A => #if C #then (B1 +Int A) #else (B2 +Int A) #fi [simplification] +endmodule + +module KLABEL-SPEC + imports VERIFICATION + + claim .K => .K +endmodule diff --git a/pyk/regression-new/imp-haskell/klabel-spec.k.out b/pyk/regression-new/imp-haskell/klabel-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/imp-haskell/klabel-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/imp-haskell/max-fail-spec.k b/pyk/regression-new/imp-haskell/max-fail-spec.k new file mode 100644 index 00000000000..db7e62e4ef2 --- /dev/null +++ b/pyk/regression-new/imp-haskell/max-fail-spec.k @@ -0,0 +1,33 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +/* +*/ + +module VERIFICATION + imports IMP + + syntax Id ::= "a" [token] + syntax Id ::= "b" [token] + syntax Id ::= "max" [token] +endmodule + + +module MAX-FAIL-SPEC + imports VERIFICATION + imports IMP + + claim + +if (a <= b) +{ max = b; } +else +{ max = a; } +=> .K + + + a |-> A:Int + b |-> B:Int + max |-> (_ => ?M:Int) + + ensures (A >=Int B andBool ?M ==Int A) + +endmodule diff --git a/pyk/regression-new/imp-haskell/max-fail-spec.k.out b/pyk/regression-new/imp-haskell/max-fail-spec.k.out new file mode 100644 index 00000000000..1c5e3fbe58c --- /dev/null +++ b/pyk/regression-new/imp-haskell/max-fail-spec.k.out @@ -0,0 +1,28 @@ + #Not ( { + A + #Equals + B + } + #And + { + true + #Equals + B >=Int B + } ) +#And + + + .K + + + a |-> A:Int + b |-> B:Int + max |-> B:Int + + +#And + { + true + #Equals + A <=Int B + } diff --git a/pyk/regression-new/imp-haskell/max-spec.k b/pyk/regression-new/imp-haskell/max-spec.k new file mode 100644 index 00000000000..740107ce3bb --- /dev/null +++ b/pyk/regression-new/imp-haskell/max-spec.k @@ -0,0 +1,33 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +/* +*/ + +module VERIFICATION + imports IMP + + syntax Id ::= "a" [token] + syntax Id ::= "b" [token] + syntax Id ::= "max" [token] +endmodule + + +module MAX-SPEC [one-path] + imports VERIFICATION + imports IMP + + claim + +if (a <= b) +{ max = b; } +else +{ max = a; } +=> .K + + + a |-> A:Int + b |-> B:Int + max |-> (_ => ?M:Int) + + ensures (A >=Int B andBool ?M ==Int A) orBool (B >=Int A andBool ?M ==Int B) + +endmodule diff --git a/pyk/regression-new/imp-haskell/max-spec.k.out b/pyk/regression-new/imp-haskell/max-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/imp-haskell/max-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/imp-haskell/nested-imports-spec.k b/pyk/regression-new/imp-haskell/nested-imports-spec.k new file mode 100644 index 00000000000..09685a21731 --- /dev/null +++ b/pyk/regression-new/imp-haskell/nested-imports-spec.k @@ -0,0 +1,37 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +/* +*/ + +module MODULE + imports IMP +endmodule + +module VERIFICATION + imports MODULE + + syntax Id ::= "a" [token] + syntax Id ::= "b" [token] + syntax Id ::= "max" [token] +endmodule + + +module NESTED-IMPORTS-SPEC [one-path] + imports IMP + imports VERIFICATION + + claim + +if (a <= b) +{ max = b; } +else +{ max = a; } +=> .K + + + a |-> A:Int + b |-> B:Int + max |-> (_ => ?M:Int) + + ensures (A >=Int B andBool ?M ==Int A) orBool (B >=Int A andBool ?M ==Int B) + +endmodule diff --git a/pyk/regression-new/imp-haskell/nested-imports-spec.k.out b/pyk/regression-new/imp-haskell/nested-imports-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/imp-haskell/nested-imports-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/imp-haskell/primes.imp b/pyk/regression-new/imp-haskell/primes.imp new file mode 100644 index 00000000000..f5ff7e26c1c --- /dev/null +++ b/pyk/regression-new/imp-haskell/primes.imp @@ -0,0 +1,26 @@ +// This program counts in s all the prime numbers up to m. + +int i, m, n, q, r, s, t, x, y, z; +m = 10; n = 2; +while (n <= m) { + // checking primality of n and writing t to 1 or 0 + i = 2; q = n/i; t = 1; + while (i<=q && 1<=t) { + x = i; + y = q; + // fast multiplication (base 2) algorithm + z = 0; + while (!(x <= 0)) { + q = x/2; + r = q+q+1; + if (r <= x) { z = z+y; } else {} + x = q; + y = y+y; + } // end fast multiplication + if (n <= z) { t = 0; } else { i = i+1; q = n/i; } + } // end checking primality + if (1 <= t) { s = s+1; } else {} + n = n+1; +} + +// s should be 4 when m = 10. diff --git a/pyk/regression-new/imp-haskell/primes.imp.out b/pyk/regression-new/imp-haskell/primes.imp.out new file mode 100644 index 00000000000..702afd61a3a --- /dev/null +++ b/pyk/regression-new/imp-haskell/primes.imp.out @@ -0,0 +1,17 @@ + + + .K + + + i |-> 2 + m |-> 10 + n |-> 11 + q |-> 0 + r |-> 1 + s |-> 4 + t |-> 0 + x |-> 0 + y |-> 20 + z |-> 10 + + diff --git a/pyk/regression-new/imp-haskell/sum.imp b/pyk/regression-new/imp-haskell/sum.imp new file mode 100644 index 00000000000..23e8bb6df0d --- /dev/null +++ b/pyk/regression-new/imp-haskell/sum.imp @@ -0,0 +1,12 @@ +// This program calculates in sum +// the sum of numbers from 1 to n. + +int n, sum; +n = 100; +sum = 0; +while (!(n <= 0)) { + sum = sum + n; + n = n + -1; +} + +// sum should be 5050 when n is 100 diff --git a/pyk/regression-new/imp-haskell/sum.imp.out b/pyk/regression-new/imp-haskell/sum.imp.out new file mode 100644 index 00000000000..d6373fd27e4 --- /dev/null +++ b/pyk/regression-new/imp-haskell/sum.imp.out @@ -0,0 +1,9 @@ + + + .K + + + n |-> 0 + sum |-> 5050 + + diff --git a/pyk/regression-new/imp-json/Makefile b/pyk/regression-new/imp-json/Makefile new file mode 100644 index 00000000000..569862eea84 --- /dev/null +++ b/pyk/regression-new/imp-json/Makefile @@ -0,0 +1,7 @@ +DEF=imp +EXT=imp +TESTDIR=. +KOMPILE_BACKEND?=llvm +KOMPILE_FLAGS=--emit-json + +include ../include/ktest.mak diff --git a/pyk/regression-new/imp-json/imp.k b/pyk/regression-new/imp-json/imp.k new file mode 100644 index 00000000000..9ab86d0d5ad --- /dev/null +++ b/pyk/regression-new/imp-json/imp.k @@ -0,0 +1,69 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module IMP-SYNTAX + imports DOMAINS-SYNTAX + + syntax AExp ::= Int | Id + | "-" Int [format(%1%2)] + | AExp "/" AExp [left, strict, color(pink)] + | "(" AExp ")" [bracket] + > AExp "+" AExp [left, strict, color(pink)] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict, color(pink)] + | "!" BExp [strict, color(pink)] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1), color(pink)] + syntax Block ::= "{" "}" + | "{" Stmt "}" [format(%1%i%n%2%d%n%3)] + syntax Stmt ::= Block + | Id "=" AExp ";" [strict(2), color(pink), format(%1 %2 %3%4)] + | "if" "(" BExp ")" + Block "else" Block [strict(1), colors(yellow, white, white, yellow), format(%1 %2%3%4 %5 %6 %7)] + | "while" "(" BExp ")" Block [colors(yellow,white,white), format(%1 %2%3%4 %5)] + > Stmt Stmt [left, format(%1%n%2)] + + syntax Pgm ::= "int" Ids ";" Stmt [format(%1 %2%3%n%4), colors(yellow,pink)] + syntax Ids ::= List{Id,","} [format(%1%2 %3)] +endmodule + +module IMP + imports IMP-SYNTAX + imports INT + imports BOOL + imports MAP + imports SET + + syntax KResult ::= Int | Bool + + configuration + $PGM:Pgm + .Map + + + rule X:Id => I ... ... X |-> I ... + + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I1 => 0 -Int I1 + + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false + + rule {} => .K + rule {S} => S + + rule X = I:Int; => .K ... ... X |-> (_ => I) ... + + rule S1:Stmt S2:Stmt => S1 ~> S2 + + rule if (true) S else _ => S + rule if (false) _ else S => S + + rule while (B) S => if (B) {S while (B) S} else {} + + rule int (X,Xs => Xs);_ Rho:Map (.Map => X|->0) + requires notBool (X in keys(Rho)) + rule int .Ids; S => S +endmodule diff --git a/pyk/regression-new/imp-kore/Makefile b/pyk/regression-new/imp-kore/Makefile new file mode 100644 index 00000000000..fa8effc0d39 --- /dev/null +++ b/pyk/regression-new/imp-kore/Makefile @@ -0,0 +1,6 @@ +DEF=imp +EXT=imp +TESTDIR=. +KOMPILE_BACKEND?=kore + +include ../include/ktest.mak diff --git a/pyk/regression-new/imp-kore/imp.k b/pyk/regression-new/imp-kore/imp.k new file mode 100644 index 00000000000..56accdea96e --- /dev/null +++ b/pyk/regression-new/imp-kore/imp.k @@ -0,0 +1,190 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +/*! +\setlength{\parindent}{1em} +\title{IMP} +\author{Grigore Ro\c{s}u (\texttt{grosu@illinois.edu})} +\organization{University of Illinois at Urbana-Champaign} +*/ + +/*@ \section{Abstract} +This is the \K semantic definition of the classic IMP language. +IMP is considered a folklore language, without an official inventor, +and has been used in many textbooks and papers, often with slight +syntactic variations and often without being called IMP\@. It includes +the most basic imperative language constructs, namely basic constructs +for arithmetic and Boolean expressions, and variable assignment, +conditional, while loop and sequential composition constructs for statements. +*/ + +module IMP-SYNTAX + imports DOMAINS-SYNTAX +/*@ \section{Syntax} +This module defines the syntax of IMP\@. +Note that \texttt{<=} is sequentially strict and has a \LaTeX\ attribute +making it display as $\leq$, and that \texttt{\&\&} is strict only in its first +argument, because we want to give it a short-circuit semantics. */ + + syntax AExp ::= Int | Id + | "-" Int [format(%1%2)] + | AExp "/" AExp [left, strict, color(pink)] + | "(" AExp ")" [bracket] + > AExp "+" AExp [left, strict, color(pink)] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict, color(pink)] + | "!" BExp [strict, color(pink)] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1), color(pink)] + syntax Block ::= "{" "}" + | "{" Stmt "}" [format(%1%i%n%2%d%n%3)] + syntax Stmt ::= Block + | Id "=" AExp ";" [strict(2), color(pink), format(%1 %2 %3%4)] + | "if" "(" BExp ")" + Block "else" Block [strict(1), colors(yellow, white, white, yellow), format(%1 %2%3%4 %5 %6 %7)] + | "while" "(" BExp ")" Block [colors(yellow,white,white), format(%1 %2%3%4 %5)] + > Stmt Stmt [left, format(%1%n%2)] + +/*@ An IMP program declares a set of variables and then executes a +statement in the state obtained after initializing all those variables +to 0. \K provides builtin support for generic syntactic lists: +$\textit{List}\{\textit{Nonterminal},\textit{terminal}\}$ stands for +\textit{terminal}-separated lists of \textit{Nonterminal} elements. */ + + syntax Pgm ::= "int" Ids ";" Stmt [format(%1 %2%3%n%4), colors(yellow,pink)] + syntax Ids ::= List{Id,","} [format(%1%2 %3)] +endmodule + +/*@ We are done with the definition of IMP's syntax. Make sure +that you write and parse several interesting programs before you move to the +semantics. */ + +module IMP + imports IMP-SYNTAX + imports INT + imports BOOL + imports MAP + imports SET +/*@ \section{Semantics} +This module defines the semantics of IMP\@. +Before you start adding semantic rules to a \K definition, you need to +define the basic semantic infrastructure consisting of definitions for +{\em results} and the {\em configuration}. */ + +/*@ \subsection{Values and results} +IMP only has two types of values, or results of computations: integers +and Booleans. We here use the \K builtin variants for both of them. */ + + syntax KResult ::= Int | Bool + +/*@ \subsection{Configuration} +The configuration of IMP is trivial: it only contains two cells, one +for the computation and another for the state. For good encapsulation +and clarity, we place the two cells inside another cell, the ``top'' cell +which is labeled \textsf{T}. */ + + configuration + $PGM:Pgm + .Map + + +/*@ The configuration variable $\${\it PGM}$ tells the \K tool where to +place the program. More precisely, the command +``\texttt{krun program}'' parses the program and places the resulting +\K abstract syntax tree in the \textsf{k} cell before invoking the +semantic rules described in the sequel. The ``$\kdot$'' in the +\textsf{state} cell, written \texttt{.Map} in ASCII in the +\texttt{imp.k} file, is \K's way to say ``nothing''. Technically, it +is a constant which is the unit, or identity, of all maps in \K +(similar dot units exist for other \K structures, such as lists, sets, +multi-sets, etc.). */ + +/*@ \subsection{Arithmetic expressions} +The \K semantics of each arithmetic construct is defined below. */ + +/*@ \subsubsection{Variable lookup} +A program variable $X$ is looked up in the state by matching a binding +of the form $X \mapsto I$ in the state cell. If such a binding does not +exist, then the rewriting process will get stuck. Thus our semantics of +IMP disallows uses of uninitialized variables. Note that the variable +to be looked up is the first task in the \textsf{k} cell (the cell is +closed to the left and torn to the right), while the binding can be +anywhere in the \textsf{state} cell (the cell is torn at both sides). */ + + rule X:Id => I ... ... X |-> I ... + +/*@ \subsubsection{Arithmetic operators} +There is nothing special about these, but recall that \K's configuration +abstraction mechanism is at work here! That means that the rewrites in the +rules below all happen at the beginning of the \textsf{k} cell. */ + + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I1 => 0 -Int I1 + +/*@ \subsection{Boolean expressions} +The rules below are straightforward. Note the short-circuited semantics +of \texttt{\&\&}; this is the reason we annotated the syntax of +\texttt{\&\&} with the \K attribute \texttt{strict(1)} instead of +\texttt{strict}. */ + + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false + +/*@ \subsection{Blocks and Statements} +There is one rule per statement construct except for the conditional, +which needs two rules. */ + +/*@ \subsubsection{Blocks} +The empty block \texttt{\{\}} is simply dissolved. The $\kdot$ below is the +unit of the computation list structure $K$, that is, the empty task. +Similarly, the non-empty blocks are dissolved and replaced by their statement +contents, thus effectively giving them a bracket semantics; we can afford to +do this only because we have no block-local variable declarations yet in IMP. */ + + rule {} => .K + rule {S} => S + +/*@ \subsubsection{Assignment} +The assigned variable is updated in the state. The variable is expected +to be declared, otherwise the semantics will get stuck. At the same time, +the assignment is dissolved. */ + + rule X = I:Int; => .K ... ... X |-> (_ => I) ... + +/*@ \subsubsection{Sequential composition} +Sequential composition is simply structurally translated into \K's +builtin task sequentialization operation. */ + + rule S1:Stmt S2:Stmt => S1 ~> S2 + +/*@ \subsubsection{Conditional} +The conditional statement has two semantic cases, corresponding to +when its condition evaluates to \texttt{true} or to \texttt{false}. +Recall that the conditional was annotated with the attribute +\texttt{strict(1)} in the syntax module above, so only its first +argument is allowed to be evaluated. */ + + rule if (true) S else _ => S + rule if (false) _ else S => S + +/*@ \subsubsection{While loop} +We give the semantics of the \texttt{while} loop by unrolling. */ + + rule while (B) S => if (B) {S while (B) S} else {} + +/*@ \subsection{Programs} +The semantics of an IMP program is that its body statement is executed +in a state initializing all its global variables to 0. Since \K's +syntactic lists are internally interpreted as cons-lists (i.e., lists +constructed with a head element followed by a tail list), we need to +distinguish two cases, one when the list has at least one element and +another when the list is empty. In the first case we initialize the +variable to 0 in the state, but only when the variable is not already +declared (all variables are global and distinct in IMP). */ + + rule int (X,Xs => Xs);_ Rho:Map (.Map => X|->0) + requires notBool (X in keys(Rho)) + rule int .Ids; S => S +endmodule diff --git a/pyk/regression-new/imp-llvm/Makefile b/pyk/regression-new/imp-llvm/Makefile new file mode 100644 index 00000000000..ed06a328ab4 --- /dev/null +++ b/pyk/regression-new/imp-llvm/Makefile @@ -0,0 +1,8 @@ +DEF=imp +EXT=imp +TESTDIR=. +KOMPILE_BACKEND=llvm +export KOMPILE_BACKEND +KRUN_FLAGS=--profile + +include ../include/ktest.mak diff --git a/pyk/regression-new/imp-llvm/collatz.imp b/pyk/regression-new/imp-llvm/collatz.imp new file mode 100644 index 00000000000..d8e35fce848 --- /dev/null +++ b/pyk/regression-new/imp-llvm/collatz.imp @@ -0,0 +1,19 @@ +// This program tests the Collatz conjecture for all numbers up to m +// and accumulates the total number of steps in s. + +int m, n, q, r, s; +m = 10; +while (!(m<=2)) { + n = m; + m = m + -1; + while (!(n<=1)) { + s = s + 1; + q = n/2; + r = q+q + 1; + if (r<=n) { + n = n+n+n + 1; // n becomes 3*n+1 if odd + } else {n=q;} // or n/2 if even + } +} + +// s should be 66 when m is 10 diff --git a/pyk/regression-new/imp-llvm/collatz.imp.out b/pyk/regression-new/imp-llvm/collatz.imp.out new file mode 100644 index 00000000000..746da717cb6 --- /dev/null +++ b/pyk/regression-new/imp-llvm/collatz.imp.out @@ -0,0 +1,12 @@ + + + .K + + + m |-> 2 + n |-> 1 + q |-> 1 + r |-> 3 + s |-> 66 + + diff --git a/pyk/regression-new/imp-llvm/imp.k b/pyk/regression-new/imp-llvm/imp.k new file mode 100644 index 00000000000..6383397ab27 --- /dev/null +++ b/pyk/regression-new/imp-llvm/imp.k @@ -0,0 +1,71 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module IMP-SYNTAX + imports BOOL-SYNTAX + imports INT-SYNTAX + imports ID + + syntax AExp ::= Int | Id + | "-" Int [format(%1%2)] + | AExp "/" AExp [left, strict, color(pink)] + | "(" AExp ")" [bracket] + > AExp "+" AExp [left, strict, color(pink)] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict, color(pink)] + | "!" BExp [strict, color(pink)] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1), color(pink)] + syntax Block ::= "{" "}" + | "{" Stmt "}" [format(%1%i%n%2%d%n%3)] + syntax Stmt ::= Block + | Id "=" AExp ";" [strict(2), color(pink), format(%1 %2 %3%4)] + | "if" "(" BExp ")" + Block "else" Block [strict(1), colors(yellow, white, white, yellow), format(%1 %2%3%4 %5 %6 %7)] + | "while" "(" BExp ")" Block [colors(yellow,white,white), format(%1 %2%3%4 %5)] + > Stmt Stmt [left, format(%1%n%2)] + + syntax Pgm ::= "int" Ids ";" Stmt [format(%1 %2%3%n%4), colors(yellow,pink)] + syntax Ids ::= List{Id,","} [format(%1%2 %3)] +endmodule + +module IMP + imports IMP-SYNTAX + imports BOOL + imports INT + imports MAP + imports SET + + syntax KResult ::= Int | Bool + + configuration + $PGM:Pgm + .Map + + + rule X:Id => I ... ... X |-> I ... + + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I1 => 0 -Int I1 + + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false + + rule {} => .K + rule {S} => S + + rule X = I:Int; => .K ... ... X |-> (_ => I) ... + + rule S1:Stmt S2:Stmt => S1 ~> S2 + + rule if (true) S else _ => S + rule if (false) _ else S => S + + rule while (B) S => if (B) {S while (B) S} else {} + + rule int (X,Xs => Xs);_ Rho:Map (.Map => X|->0) + requires notBool (X in keys(Rho)) + rule int .Ids; S => S +endmodule diff --git a/pyk/regression-new/imp-llvm/primes.imp b/pyk/regression-new/imp-llvm/primes.imp new file mode 100644 index 00000000000..3edf1a58fc8 --- /dev/null +++ b/pyk/regression-new/imp-llvm/primes.imp @@ -0,0 +1,26 @@ +// This program counts in s all the prime numbers up to m. + +int i, m, n, q, r, s, t, x, y, z; +m = 10; n = 2; +while (n <= m) { + // checking primality of n and writing t to 1 or 0 + i = 2; q = n/i; t = 1; + while (i<=q && 1<=t) { + x = i; + y = q; + // fast multiplication (base 2) algorithm + z = 0; + while (!(x <= 0)) { + q = x/2; + r = q+q + 1; + if (r <= x) { z = z+y; } else {} + x = q; + y = y+y; + } // end fast multiplication + if (n <= z) { t = 0; } else { i = i + 1; q = n/i; } + } // end checking primality + if (1 <= t) { s = s + 1; } else {} + n = n + 1; +} + +// s should be 4 when m = 10. diff --git a/pyk/regression-new/imp-llvm/primes.imp.out b/pyk/regression-new/imp-llvm/primes.imp.out new file mode 100644 index 00000000000..702afd61a3a --- /dev/null +++ b/pyk/regression-new/imp-llvm/primes.imp.out @@ -0,0 +1,17 @@ + + + .K + + + i |-> 2 + m |-> 10 + n |-> 11 + q |-> 0 + r |-> 1 + s |-> 4 + t |-> 0 + x |-> 0 + y |-> 20 + z |-> 10 + + diff --git a/pyk/regression-new/imp-llvm/sum.imp b/pyk/regression-new/imp-llvm/sum.imp new file mode 100644 index 00000000000..23e8bb6df0d --- /dev/null +++ b/pyk/regression-new/imp-llvm/sum.imp @@ -0,0 +1,12 @@ +// This program calculates in sum +// the sum of numbers from 1 to n. + +int n, sum; +n = 100; +sum = 0; +while (!(n <= 0)) { + sum = sum + n; + n = n + -1; +} + +// sum should be 5050 when n is 100 diff --git a/pyk/regression-new/imp-llvm/sum.imp.out b/pyk/regression-new/imp-llvm/sum.imp.out new file mode 100644 index 00000000000..d6373fd27e4 --- /dev/null +++ b/pyk/regression-new/imp-llvm/sum.imp.out @@ -0,0 +1,9 @@ + + + .K + + + n |-> 0 + sum |-> 5050 + + diff --git a/pyk/regression-new/include/ktest.mak b/pyk/regression-new/include/ktest.mak index bcb6feafb66..5209f536906 100644 --- a/pyk/regression-new/include/ktest.mak +++ b/pyk/regression-new/include/ktest.mak @@ -22,7 +22,7 @@ KOMPILED_DIR=$(DEFDIR)/$(notdir $(DEF))-kompiled RUN_TESTS?=$(wildcard $(TESTDIR)/*.$(EXT)) PROOF_TESTS?=$(wildcard $(TESTDIR)/*-spec.k) $(wildcard $(TESTDIR)/*-spec.md) # default KOMPILE_BACKEND -KOMPILE_BACKEND?=haskell +KOMPILE_BACKEND?=llvm # check if .k file exists, if not, check if .md file exists # if not, default to .k to give error message SOURCE_EXT?=$(or $(and $(wildcard $(DEF).k), k), $(or $(and $(wildcard $(DEF).md), md), k)) diff --git a/pyk/regression-new/int-llvm/Makefile b/pyk/regression-new/int-llvm/Makefile new file mode 100644 index 00000000000..65decfcd293 --- /dev/null +++ b/pyk/regression-new/int-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=llvm-int +EXT=llvmint +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module LLVM-INT + +include ../include/ktest.mak diff --git a/pyk/regression-new/int-llvm/llvm-int b/pyk/regression-new/int-llvm/llvm-int new file mode 100644 index 00000000000..09a5ec505e5 --- /dev/null +++ b/pyk/regression-new/int-llvm/llvm-int @@ -0,0 +1,7 @@ +module PP-INT + imports INT + + configuration $PGM:Pgm + + syntax Pgm ::= foo ( Int ) +endmodule diff --git a/pyk/regression-new/int-llvm/llvm-int.k b/pyk/regression-new/int-llvm/llvm-int.k new file mode 100644 index 00000000000..60329ba9e44 --- /dev/null +++ b/pyk/regression-new/int-llvm/llvm-int.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module LLVM-INT + imports INT + + configuration $PGM:Pgm + + syntax Pgm ::= foo ( Int ) +endmodule diff --git a/pyk/regression-new/int-llvm/test1.llvmint b/pyk/regression-new/int-llvm/test1.llvmint new file mode 100644 index 00000000000..29d8f360b4d --- /dev/null +++ b/pyk/regression-new/int-llvm/test1.llvmint @@ -0,0 +1 @@ +foo ( +3 ) diff --git a/pyk/regression-new/int-llvm/test1.llvmint.out b/pyk/regression-new/int-llvm/test1.llvmint.out new file mode 100644 index 00000000000..193ee6d9a2a --- /dev/null +++ b/pyk/regression-new/int-llvm/test1.llvmint.out @@ -0,0 +1,3 @@ + + foo ( 3 ) ~> .K + diff --git a/pyk/regression-new/int-llvm/test2.llvmint b/pyk/regression-new/int-llvm/test2.llvmint new file mode 100644 index 00000000000..bec32cee655 --- /dev/null +++ b/pyk/regression-new/int-llvm/test2.llvmint @@ -0,0 +1 @@ +foo ( 2 ^Int 29 ) diff --git a/pyk/regression-new/int-llvm/test2.llvmint.out b/pyk/regression-new/int-llvm/test2.llvmint.out new file mode 100644 index 00000000000..8961cb8e6db --- /dev/null +++ b/pyk/regression-new/int-llvm/test2.llvmint.out @@ -0,0 +1,3 @@ + + foo ( 536870912 ) ~> .K + diff --git a/pyk/regression-new/io-llvm/1.test b/pyk/regression-new/io-llvm/1.test new file mode 100644 index 00000000000..0fc6a4f560d --- /dev/null +++ b/pyk/regression-new/io-llvm/1.test @@ -0,0 +1 @@ +open("foo", "r") diff --git a/pyk/regression-new/io-llvm/1.test.out b/pyk/regression-new/io-llvm/1.test.out new file mode 100644 index 00000000000..5bfea3fdd3f --- /dev/null +++ b/pyk/regression-new/io-llvm/1.test.out @@ -0,0 +1,3 @@ + + #ENOENT ~> .K + diff --git a/pyk/regression-new/io-llvm/2.test b/pyk/regression-new/io-llvm/2.test new file mode 100644 index 00000000000..097cfe5d2b9 --- /dev/null +++ b/pyk/regression-new/io-llvm/2.test @@ -0,0 +1 @@ +system("echo sout ; >&2 echo serr") diff --git a/pyk/regression-new/io-llvm/2.test.out b/pyk/regression-new/io-llvm/2.test.out new file mode 100644 index 00000000000..accdc938c47 --- /dev/null +++ b/pyk/regression-new/io-llvm/2.test.out @@ -0,0 +1,3 @@ + + #systemResult ( 0 , "sout\n" , "serr\n" ) ~> .K + diff --git a/pyk/regression-new/io-llvm/3.test b/pyk/regression-new/io-llvm/3.test new file mode 100644 index 00000000000..053b1841b1c --- /dev/null +++ b/pyk/regression-new/io-llvm/3.test @@ -0,0 +1 @@ +mkstemp("test-foo-XXXXXX") diff --git a/pyk/regression-new/io-llvm/3.test.out b/pyk/regression-new/io-llvm/3.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/io-llvm/3.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/io-llvm/4.test b/pyk/regression-new/io-llvm/4.test new file mode 100644 index 00000000000..84f85fcbeb5 --- /dev/null +++ b/pyk/regression-new/io-llvm/4.test @@ -0,0 +1 @@ +orr diff --git a/pyk/regression-new/io-llvm/4.test.out b/pyk/regression-new/io-llvm/4.test.out new file mode 100644 index 00000000000..18657955c95 --- /dev/null +++ b/pyk/regression-new/io-llvm/4.test.out @@ -0,0 +1,3 @@ + + "open" ~> "(\"foo\", \"r\")\n" ~> "" ~> .K + diff --git a/pyk/regression-new/io-llvm/Makefile b/pyk/regression-new/io-llvm/Makefile new file mode 100644 index 00000000000..b1acd4e94c2 --- /dev/null +++ b/pyk/regression-new/io-llvm/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +TESTDIR=. +RESULTDIR=. +KOMPILE_BACKEND=llvm +PREPARE=./prepare.sh +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/io-llvm/test.k b/pyk/regression-new/io-llvm/test.k new file mode 100644 index 00000000000..60f077729d7 --- /dev/null +++ b/pyk/regression-new/io-llvm/test.k @@ -0,0 +1,45 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports STRING + imports K-IO + +syntax KItem ::= open(String, String) | tell(Int) | getc(Int) | read(Int, Int) +syntax KItem ::= close(Int) | seek(Int, KItem) [strict(2)] | putc(Int, Int) | write(Int, String) +syntax KItem ::= system(String) | mkstemp(String) | remove(String) + +syntax KItem ::= assertEqual(K, K) + +syntax KResult ::= Int | String | IOError + +syntax KItem ::= KItem "-" KItem [strict] + +rule I1:Int - I2:Int => I1 -Int I2 + +rule open(S1:String, S2:String) => #open(S1, S2) +rule tell(I:Int) => #tell(I) +rule getc(I:Int) => #getc(I) +rule read(I1:Int, I2:Int) => #read(I1, I2) +rule close(I:Int) => #close(I) +rule seek(I1:Int, I2:Int) => #seek(I1, I2) +rule putc(I1:Int, I2:Int) => #putc(I1, I2) +rule write(I:Int, S:String) => #write(I, S) + +// 2 +rule system(S:String) => #system(S) + +// 3 +rule remove(S:String) => #remove(S) +rule mkstemp(Template:String) => #mkstemp(Template) +rule #tempFile(Path:String, Fd:Int) => #write(Fd, "abc") ~> close(Fd) ~> open(Path, "r") ~> remove(Path) +rule Fd:Int ~> remove(Path) => #read(Fd, 3) ~> Fd ~> remove(Path) +rule "abc" ~> Fd:Int ~> remove(Path) => #close(Fd) ~> remove(Path) + +// 4 +syntax KItem ::= "orr" +rule orr => #open("1.test", "r") ~> orr +rule Fd:Int ~> orr => #read(Fd, 4) ~> Fd:Int ~> orr +rule S1:String ~> Fd:Int ~> orr => S1 ~> #read(Fd, 100) ~> Fd:Int ~> orr +rule S1:String ~> S2:String ~> Fd:Int ~> orr => S1 ~> S2 ~> #read(Fd, 100) + +endmodule diff --git a/pyk/regression-new/issue-1088/.gitignore b/pyk/regression-new/issue-1088/.gitignore new file mode 100644 index 00000000000..8d70fd51725 --- /dev/null +++ b/pyk/regression-new/issue-1088/.gitignore @@ -0,0 +1 @@ +1.kast.out diff --git a/pyk/regression-new/issue-1088/1.kast b/pyk/regression-new/issue-1088/1.kast new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-1088/1.kast @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-1088/1.kast.expected b/pyk/regression-new/issue-1088/1.kast.expected new file mode 100644 index 00000000000..ebe5b352d3f --- /dev/null +++ b/pyk/regression-new/issue-1088/1.kast.expected @@ -0,0 +1 @@ +#token("1","Int") diff --git a/pyk/regression-new/issue-1088/Makefile b/pyk/regression-new/issue-1088/Makefile new file mode 100644 index 00000000000..1d51f3cbffd --- /dev/null +++ b/pyk/regression-new/issue-1088/Makefile @@ -0,0 +1,8 @@ +DEF=kast-in +EXT=kast-in +TESTDIR=. +KOMPILE_BACKEND=llvm +KAST_FLAGS=--output kast --output-file 1.kast.out +CHECK=&& diff 1.kast.expected + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1088/kast-in.k b/pyk/regression-new/issue-1088/kast-in.k new file mode 100644 index 00000000000..c76ef7c627b --- /dev/null +++ b/pyk/regression-new/issue-1088/kast-in.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-IN-SYNTAX + imports INT-SYNTAX + + syntax Pgm ::= Int +endmodule + +module KAST-IN + imports KAST-IN-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/issue-1090/1.test b/pyk/regression-new/issue-1090/1.test new file mode 100644 index 00000000000..82637f3b902 --- /dev/null +++ b/pyk/regression-new/issue-1090/1.test @@ -0,0 +1 @@ +"blah" diff --git a/pyk/regression-new/issue-1090/1.test.out b/pyk/regression-new/issue-1090/1.test.out new file mode 100644 index 00000000000..8f3b5376616 --- /dev/null +++ b/pyk/regression-new/issue-1090/1.test.out @@ -0,0 +1,3 @@ + + foo ( < "blah" > ) ~> .K + diff --git a/pyk/regression-new/issue-1090/Makefile b/pyk/regression-new/issue-1090/Makefile new file mode 100644 index 00000000000..b46362c03c6 --- /dev/null +++ b/pyk/regression-new/issue-1090/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1090/test.k b/pyk/regression-new/issue-1090/test.k new file mode 100644 index 00000000000..3a798f29823 --- /dev/null +++ b/pyk/regression-new/issue-1090/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports STRING + + syntax KItem ::= foo(X) + + syntax X ::= String [klabel(bar)] + syntax X ::= "<" String ">" + + rule T:String => < T > [anywhere] + + configuration foo($PGM:String) +endmodule + +module TEST-SYNTAX + imports TEST +endmodule diff --git a/pyk/regression-new/issue-1098/1.test b/pyk/regression-new/issue-1098/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/issue-1098/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/issue-1098/1.test.out b/pyk/regression-new/issue-1098/1.test.out new file mode 100644 index 00000000000..df7eea54e8e --- /dev/null +++ b/pyk/regression-new/issue-1098/1.test.out @@ -0,0 +1,3 @@ + + x = ( 0 ~> .K ) ; .RecordDescr ~> .K + diff --git a/pyk/regression-new/issue-1098/Makefile b/pyk/regression-new/issue-1098/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1098/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1098/test.k b/pyk/regression-new/issue-1098/test.k new file mode 100644 index 00000000000..9923d9233e5 --- /dev/null +++ b/pyk/regression-new/issue-1098/test.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST + imports DOMAINS + + syntax RecordFieldDescr ::= key:Id "=" value:K + syntax RecordDescr ::= List{ RecordFieldDescr , ";" } + syntax Record ::= Map | ".Record" + + syntax RecordDescr ::= "record2descr" "(" Record ")" [function] + rule record2descr( F:Id |-> V ) => F = V + + rule 0 => record2descr(x |-> 0) + syntax Id ::= "x" [token] +endmodule + diff --git a/pyk/regression-new/issue-1145/1.test b/pyk/regression-new/issue-1145/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/issue-1145/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/issue-1145/1.test.out b/pyk/regression-new/issue-1145/1.test.out new file mode 100644 index 00000000000..94b5b3e2bac --- /dev/null +++ b/pyk/regression-new/issue-1145/1.test.out @@ -0,0 +1,3 @@ + + ~> .K + diff --git a/pyk/regression-new/issue-1145/Makefile b/pyk/regression-new/issue-1145/Makefile new file mode 100644 index 00000000000..1e2ac720031 --- /dev/null +++ b/pyk/regression-new/issue-1145/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KRUN_FLAGS=--output program + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1145/test.k b/pyk/regression-new/issue-1145/test.k new file mode 100644 index 00000000000..644edf25da1 --- /dev/null +++ b/pyk/regression-new/issue-1145/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + imports STRING-SYNTAX + + syntax AList ::= List{String, ";"} +endmodule + +module TEST + imports TEST-SYNTAX + + rule _I:Int => .AList + configuration $PGM:Int +endmodule diff --git a/pyk/regression-new/issue-1169/.gitignore b/pyk/regression-new/issue-1169/.gitignore new file mode 100644 index 00000000000..812155a8fa2 --- /dev/null +++ b/pyk/regression-new/issue-1169/.gitignore @@ -0,0 +1 @@ +test2.k diff --git a/pyk/regression-new/issue-1169/1.test b/pyk/regression-new/issue-1169/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/issue-1169/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/issue-1169/1.test.out b/pyk/regression-new/issue-1169/1.test.out new file mode 100644 index 00000000000..ad5b4d50e46 --- /dev/null +++ b/pyk/regression-new/issue-1169/1.test.out @@ -0,0 +1,3 @@ + + 3 ~> .K + diff --git a/pyk/regression-new/issue-1169/Makefile b/pyk/regression-new/issue-1169/Makefile new file mode 100644 index 00000000000..f5de3f8306d --- /dev/null +++ b/pyk/regression-new/issue-1169/Makefile @@ -0,0 +1,15 @@ +DEF=test +DEF2=test2 +EXT=test +TESTDIR=. + +include ../include/ktest.mak + +$(KOMPILED_DIR)/timestamp: $(DEF).k + $(KOMPILE) $(DEF).k -E > $(DEF2).k + $(KOMPILE) $(DEF2).k --no-prelude --main-module TEST --syntax-module TEST + rm -rf $(KOMPILED_DIR) + mv test2-kompiled $(KOMPILED_DIR) + +clean: + rm -rf test2.k test2-kompiled test-kompiled diff --git a/pyk/regression-new/issue-1169/test.k b/pyk/regression-new/issue-1169/test.k new file mode 100644 index 00000000000..8afc0a7c9ed --- /dev/null +++ b/pyk/regression-new/issue-1169/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + rule 0 => 1 + rule 1 => 2 + rule 2 => 3 +endmodule diff --git a/pyk/regression-new/issue-1175/Makefile b/pyk/regression-new/issue-1175/Makefile new file mode 100644 index 00000000000..b916bd2b85d --- /dev/null +++ b/pyk/regression-new/issue-1175/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST +CONSIDER_PROVER_ERRORS=2>&1 + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1175/test-broken-spec.k b/pyk/regression-new/issue-1175/test-broken-spec.k new file mode 100644 index 00000000000..29797dbd28f --- /dev/null +++ b/pyk/regression-new/issue-1175/test-broken-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-BROKEN-SPEC + + rule inc X => X +Int 1 ... + +endmodule + diff --git a/pyk/regression-new/issue-1175/test-broken-spec.k.out b/pyk/regression-new/issue-1175/test-broken-spec.k.out new file mode 100644 index 00000000000..e5ae6f639a8 --- /dev/null +++ b/pyk/regression-new/issue-1175/test-broken-spec.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Scanner error: unexpected character sequence '<'. + Source(test-broken-spec.k) + Location(4,10,4,11) + 4 | rule inc X => X +Int 1 ... + . ^ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/issue-1175/test.k b/pyk/regression-new/issue-1175/test.k new file mode 100644 index 00000000000..667bad699f6 --- /dev/null +++ b/pyk/regression-new/issue-1175/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + + configuration $PGM:Val + + syntax Val ::= "inc" Int + + rule inc I:Int => I +Int 1 ... + +endmodule + diff --git a/pyk/regression-new/issue-1175/test2-broken-spec.k b/pyk/regression-new/issue-1175/test2-broken-spec.k new file mode 100644 index 00000000000..e91f4da7c15 --- /dev/null +++ b/pyk/regression-new/issue-1175/test2-broken-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SPEC + + rule inc X => X +Int 1 ... + +endmodule + diff --git a/pyk/regression-new/issue-1175/test2-broken-spec.k.out b/pyk/regression-new/issue-1175/test2-broken-spec.k.out new file mode 100644 index 00000000000..5062e407f3e --- /dev/null +++ b/pyk/regression-new/issue-1175/test2-broken-spec.k.out @@ -0,0 +1 @@ +[Error] Critical: Module TEST2-BROKEN-SPEC does not exist. diff --git a/pyk/regression-new/issue-1184/Makefile b/pyk/regression-new/issue-1184/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1184/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1184/test.k b/pyk/regression-new/issue-1184/test.k new file mode 100644 index 00000000000..04e09e728e0 --- /dev/null +++ b/pyk/regression-new/issue-1184/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + + syntax Val + + configuration $PGM:Val {$PGM}:>K + +endmodule + diff --git a/pyk/regression-new/issue-1186/1.test b/pyk/regression-new/issue-1186/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/issue-1186/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/issue-1186/1.test.out b/pyk/regression-new/issue-1186/1.test.out new file mode 100644 index 00000000000..8d511b44110 --- /dev/null +++ b/pyk/regression-new/issue-1186/1.test.out @@ -0,0 +1,3 @@ + + _0 ~> .K + diff --git a/pyk/regression-new/issue-1186/Makefile b/pyk/regression-new/issue-1186/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1186/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1186/test.k b/pyk/regression-new/issue-1186/test.k new file mode 100644 index 00000000000..b02e4c7749d --- /dev/null +++ b/pyk/regression-new/issue-1186/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "substitution.md" + +module TEST + imports KVAR + imports INT + + rule 0 => !_X:KVar + +endmodule diff --git a/pyk/regression-new/issue-1193/Makefile b/pyk/regression-new/issue-1193/Makefile new file mode 100644 index 00000000000..7b7c3a97ee7 --- /dev/null +++ b/pyk/regression-new/issue-1193/Makefile @@ -0,0 +1,4 @@ +KOMPILE_FLAGS=-w none +KOMPILE_BACKEND=haskell + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-1193/imp.k b/pyk/regression-new/issue-1193/imp.k new file mode 100644 index 00000000000..dfe4a62647e --- /dev/null +++ b/pyk/regression-new/issue-1193/imp.k @@ -0,0 +1,37 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module IMP-SYNTAX + imports DOMAINS-SYNTAX + + syntax Pgm ::= Int +endmodule + + +module IMP + imports IMP-SYNTAX + imports DOMAINS + syntax KResult ::= Int | Bool + + configuration + $PGM:Pgm + + + .K + .K + false + + + + + syntax Enum + + syntax CppenumCell + syntax IncompleteInfo ::= "#incomplete" + syntax EnumInfo ::= CppenumCell | IncompleteInfo + syntax EnumInfo ::= #getEnumInfo(Enum) [function] + + rule [[ #getEnumInfo(X::Enum) => X B ]] + X B::Bag + + rule #getEnumInfo(_) => #incomplete [owise] + +endmodule diff --git a/pyk/regression-new/issue-1193/imp.k.out b/pyk/regression-new/issue-1193/imp.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/issue-1263/1.test b/pyk/regression-new/issue-1263/1.test new file mode 100644 index 00000000000..f1940b38331 --- /dev/null +++ b/pyk/regression-new/issue-1263/1.test @@ -0,0 +1 @@ +go wad(0) ; go wad(1) ; go wad(3) diff --git a/pyk/regression-new/issue-1263/1.test.out b/pyk/regression-new/issue-1263/1.test.out new file mode 100644 index 00000000000..1a60e170743 --- /dev/null +++ b/pyk/regression-new/issue-1263/1.test.out @@ -0,0 +1,3 @@ + + go FInt (... value: 1000000000000000000 , one: 1000000000000000000 ) ~> go FInt (... value: 3000000000000000000 , one: 1000000000000000000 ) ~> .K + diff --git a/pyk/regression-new/issue-1263/Makefile b/pyk/regression-new/issue-1263/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1263/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1263/test.k b/pyk/regression-new/issue-1263/test.k new file mode 100644 index 00000000000..11116707f64 --- /dev/null +++ b/pyk/regression-new/issue-1263/test.k @@ -0,0 +1,29 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports BOOL + + configuration $PGM:Pgm + + syntax FInt ::= FInt ( value: Int , one: Int ) [klabel(FInt), symbol] + // --------------------------------------------------------------------- + + syntax Wad = FInt + syntax Wad ::= wad ( Int ) [macro] + // ---------------------------------- + + // Note that if we just switch the order of these rules in the file, it works. + // But we should not care about order of rules in the file, is better for user to be explicit. + rule wad(I) => FInt(I *Int WAD, WAD) [priority(26)] + rule wad(1) => FInt(WAD , WAD) [priority(25)] + rule wad(0) => FInt(0 , WAD) [priority(25)] + + syntax Int ::= "WAD" [macro] + // ---------------------------- + rule WAD => 1000000000000000000 + + syntax Pgm ::= "go" FInt | Pgm ";" Pgm [left] + // --------------------------------------------- + rule P ; Q => P ~> Q ... + rule go wad(0) => .K ... +endmodule diff --git a/pyk/regression-new/issue-1273/Makefile b/pyk/regression-new/issue-1273/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1273/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1273/test.k b/pyk/regression-new/issue-1273/test.k new file mode 100644 index 00000000000..28d7244cd37 --- /dev/null +++ b/pyk/regression-new/issue-1273/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports BOOL + + syntax FInt ::= "(" FInt ")" [bracket] + | FInt ( value: Int , one: Int ) [klabel(FInt), symbol] + // --------------------------------------------------------------------- + + syntax FInt ::= "1FInt" "(" Int ")" [macro] + // ------------------------------------------- + rule 1FInt(ONE) => FInt(ONE, ONE) + + syntax FInt ::= foo ( FInt ) [function] + // --------------------------------------- + rule foo(FI) => 1FInt(one(FI)) +endmodule diff --git a/pyk/regression-new/issue-1372/Makefile b/pyk/regression-new/issue-1372/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/issue-1372/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1372/test.k b/pyk/regression-new/issue-1372/test.k new file mode 100644 index 00000000000..58edf75bcfa --- /dev/null +++ b/pyk/regression-new/issue-1372/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + configuration .K + .K + + syntax KItem ::= "foo" +endmodule + diff --git a/pyk/regression-new/issue-1384/Makefile b/pyk/regression-new/issue-1384/Makefile new file mode 100644 index 00000000000..f77dad2a3d3 --- /dev/null +++ b/pyk/regression-new/issue-1384/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=-w2e + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1384/test.k b/pyk/regression-new/issue-1384/test.k new file mode 100644 index 00000000000..009866689db --- /dev/null +++ b/pyk/regression-new/issue-1384/test.k @@ -0,0 +1,45 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + +endmodule + +module TEST +imports DOMAINS + + syntax EmptyStmt + // ---------------- + + syntax Instr ::= "foo" [unused] + syntax Defn ::= "bar" [unused] + // ---------------------- + + syntax Instr ::= EmptyStmt + syntax Defn ::= EmptyStmt + syntax Stmt ::= Instr | Defn + // ----------------------------- + + syntax EmptyStmts ::= List{EmptyStmt , ""} + syntax Instrs ::= List{Instr , ""} + syntax Defns ::= List{Defn , ""} + syntax Stmts ::= List{Stmt , ""} + // ------------------------------------------ + + syntax Instrs ::= EmptyStmts + syntax Defns ::= EmptyStmts + syntax Stmts ::= Instrs | Defns + // -------------------------------- + + syntax K ::= sequenceStmts ( Stmts ) [function] + | sequenceDefns ( Defns ) [function] + | sequenceInstrs ( Instrs ) [function] + // ------------------------------------------------- + rule sequenceStmts(.Stmts) => .K + rule sequenceStmts(S SS ) => S ~> sequenceStmts(SS) + + rule sequenceDefns(.Defns) => .K + rule sequenceDefns(D DS ) => D ~> sequenceDefns(DS) + + rule sequenceInstrs(.Instrs) => .K + rule sequenceInstrs(I IS ) => I ~> sequenceInstrs(IS) + +endmodule diff --git a/pyk/regression-new/issue-1388/Makefile b/pyk/regression-new/issue-1388/Makefile new file mode 100644 index 00000000000..3d0d4b6a116 --- /dev/null +++ b/pyk/regression-new/issue-1388/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--coverage --main-module WASM-TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1388/test.k b/pyk/regression-new/issue-1388/test.k new file mode 100644 index 00000000000..507ab052958 --- /dev/null +++ b/pyk/regression-new/issue-1388/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module WASM-TEST-SYNTAX + imports WASM-TEST +endmodule + +module WASM-TEST +endmodule + + diff --git a/pyk/regression-new/issue-1436/1.test b/pyk/regression-new/issue-1436/1.test new file mode 100644 index 00000000000..32d3ca119d7 --- /dev/null +++ b/pyk/regression-new/issue-1436/1.test @@ -0,0 +1 @@ +run(0) diff --git a/pyk/regression-new/issue-1436/1.test.out b/pyk/regression-new/issue-1436/1.test.out new file mode 100644 index 00000000000..3b908ae7a42 --- /dev/null +++ b/pyk/regression-new/issue-1436/1.test.out @@ -0,0 +1,13 @@ + + + 6 ~> .K + + + 6 + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "0" ~> .K ) ) + + diff --git a/pyk/regression-new/issue-1436/Makefile b/pyk/regression-new/issue-1436/Makefile new file mode 100644 index 00000000000..b266f1391dd --- /dev/null +++ b/pyk/regression-new/issue-1436/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KRUN_FLAGS=--io off + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1436/test.k b/pyk/regression-new/issue-1436/test.k new file mode 100644 index 00000000000..ad8353d101b --- /dev/null +++ b/pyk/regression-new/issue-1436/test.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + syntax Prog ::= run(Int) +endmodule + +module TEST + imports TEST-SYNTAX + imports DOMAINS + + syntax KResult + + configuration + $PGM:Prog + 6 + .List + + syntax Int ::= foo(Int) [function] + + rule [[ foo(0) => I ]] + I + + rule run(I) => foo(I) ... + ... .List => ListItem(I) +endmodule diff --git a/pyk/regression-new/issue-1472-unboundVars/Makefile b/pyk/regression-new/issue-1472-unboundVars/Makefile new file mode 100644 index 00000000000..ac27a35eaac --- /dev/null +++ b/pyk/regression-new/issue-1472-unboundVars/Makefile @@ -0,0 +1,7 @@ +DEF=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1472-unboundVars/test-spec.k b/pyk/regression-new/issue-1472-unboundVars/test-spec.k new file mode 100644 index 00000000000..d531f6b5112 --- /dev/null +++ b/pyk/regression-new/issue-1472-unboundVars/test-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST-SPEC + imports TEST + + claim inc(3) => I + requires I ==Int 4 +endmodule diff --git a/pyk/regression-new/issue-1472-unboundVars/test-spec.k.out b/pyk/regression-new/issue-1472-unboundVars/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-1472-unboundVars/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-1472-unboundVars/test.k b/pyk/regression-new/issue-1472-unboundVars/test.k new file mode 100644 index 00000000000..67b058ad1c7 --- /dev/null +++ b/pyk/regression-new/issue-1472-unboundVars/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + + configuration + $PGM:Int + + syntax Int ::= inc ( Int ) [function] + rule inc(I) => I +Int 1 +endmodule diff --git a/pyk/regression-new/issue-1489-claimLoc/Makefile b/pyk/regression-new/issue-1489-claimLoc/Makefile new file mode 100644 index 00000000000..eb0b72f659c --- /dev/null +++ b/pyk/regression-new/issue-1489-claimLoc/Makefile @@ -0,0 +1,13 @@ +DEF=claimLoc +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module CLAIMLOC + +%-spec.k %-spec.md: kompile +ifeq ($(TESTDIR),$(RESULTDIR)) + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $@.out +else + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $(RESULTDIR)/$(notdir $@).out +endif + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k b/pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k new file mode 100644 index 00000000000..68505e96a5f --- /dev/null +++ b/pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CLAIMLOC-SPEC + imports CLAIMLOC + + claim a => c requires false +endmodule diff --git a/pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k.out b/pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k.out new file mode 100644 index 00000000000..83c4b702050 --- /dev/null +++ b/pyk/regression-new/issue-1489-claimLoc/claimLoc-spec.k.out @@ -0,0 +1,4 @@ +kore-exec: [] Warning (WarnTrivialClaim): + Claim proven during initialization: claimLoc-spec.k:6:11-6:32 + The left-hand side of the claim may be undefined. +#Top diff --git a/pyk/regression-new/issue-1489-claimLoc/claimLoc.k b/pyk/regression-new/issue-1489-claimLoc/claimLoc.k new file mode 100644 index 00000000000..82c210c1149 --- /dev/null +++ b/pyk/regression-new/issue-1489-claimLoc/claimLoc.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CLAIMLOC + imports BOOL + syntax S ::= "a" | "b" | "c" | "d" + + rule a => b [label(A2B)] + + rule b => c [label(B2C)] + + rule c => d [label(C2D)] +endmodule diff --git a/pyk/regression-new/issue-1528/1.test b/pyk/regression-new/issue-1528/1.test new file mode 100644 index 00000000000..c031825f72f --- /dev/null +++ b/pyk/regression-new/issue-1528/1.test @@ -0,0 +1 @@ +foo(0) diff --git a/pyk/regression-new/issue-1528/1.test.out b/pyk/regression-new/issue-1528/1.test.out new file mode 100644 index 00000000000..6988b500654 --- /dev/null +++ b/pyk/regression-new/issue-1528/1.test.out @@ -0,0 +1,3 @@ + + bar ( 0 , 0 ) ~> bar ( 0 , 0 ) ~> .K + diff --git a/pyk/regression-new/issue-1528/2.test b/pyk/regression-new/issue-1528/2.test new file mode 100644 index 00000000000..828b6467540 --- /dev/null +++ b/pyk/regression-new/issue-1528/2.test @@ -0,0 +1 @@ +foo(1) diff --git a/pyk/regression-new/issue-1528/2.test.out b/pyk/regression-new/issue-1528/2.test.out new file mode 100644 index 00000000000..3b6fa246003 --- /dev/null +++ b/pyk/regression-new/issue-1528/2.test.out @@ -0,0 +1,3 @@ + + bar ( 0 , 0 ) ~> bar ( 0 , 0 ) ~> bar ( 0 , 0 ) ~> .K + diff --git a/pyk/regression-new/issue-1528/3.test b/pyk/regression-new/issue-1528/3.test new file mode 100644 index 00000000000..5eea096da27 --- /dev/null +++ b/pyk/regression-new/issue-1528/3.test @@ -0,0 +1 @@ +foo(2) diff --git a/pyk/regression-new/issue-1528/3.test.out b/pyk/regression-new/issue-1528/3.test.out new file mode 100644 index 00000000000..b386d4046f5 --- /dev/null +++ b/pyk/regression-new/issue-1528/3.test.out @@ -0,0 +1,3 @@ + + bar ( 0 , 1 ) ~> bar ( 0 , 1 ) ~> bar ( 0 , 1 ) ~> .K + diff --git a/pyk/regression-new/issue-1528/Makefile b/pyk/regression-new/issue-1528/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1528/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1528/test.k b/pyk/regression-new/issue-1528/test.k new file mode 100644 index 00000000000..eced8281e86 --- /dev/null +++ b/pyk/regression-new/issue-1528/test.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + +syntax Exp ::= foo(Exp) | bar(Int, Int) | Int + +rule foo(0) => bar(!I:Int, !I:Int) ~> #fun(_B => bar(!I:Int, !I:Int))(0) +rule foo(1) => bar(!I:Int, !I:Int) ~> #fun(_B => bar(!I:Int, !I:Int) ~> #fun(_B2 => bar(!I:Int, !I:Int))(0))(0) +rule foo(2) => bar(!I:Int, !J:Int) ~> #fun(_B => bar(!I:Int, !J:Int) ~> #fun(_B2 => bar(!I:Int, !J:Int))(0))(0) + +endmodule diff --git a/pyk/regression-new/issue-1545-func-in-simplification/Makefile b/pyk/regression-new/issue-1545-func-in-simplification/Makefile new file mode 100644 index 00000000000..7d52aa208a5 --- /dev/null +++ b/pyk/regression-new/issue-1545-func-in-simplification/Makefile @@ -0,0 +1 @@ +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-1545-func-in-simplification/test.k b/pyk/regression-new/issue-1545-func-in-simplification/test.k new file mode 100644 index 00000000000..fd269a7ef55 --- /dev/null +++ b/pyk/regression-new/issue-1545-func-in-simplification/test.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + rule (A *Int I2) +Int (I3 /Int A) => I2 *Int I3 [simplification] + rule (A +Int I2) +Int (I3 -Int A) => I2 +Int I3 +endmodule diff --git a/pyk/regression-new/issue-1545-func-in-simplification/test.k.out b/pyk/regression-new/issue-1545-func-in-simplification/test.k.out new file mode 100644 index 00000000000..79a1e17c7a8 --- /dev/null +++ b/pyk/regression-new/issue-1545-func-in-simplification/test.k.out @@ -0,0 +1,12 @@ +[Error] Compiler: Illegal function symbol _+Int_ on LHS of rule. Consider adding `simplification` attribute to the rule if this is intended. + Source(test.k) + Location(5,11,5,20) + 5 | rule (A +Int I2) +Int (I3 -Int A) => I2 +Int I3 + . ^~~~~~~~~ +[Error] Compiler: Illegal function symbol _-Int_ on LHS of rule. Consider adding `simplification` attribute to the rule if this is intended. + Source(test.k) + Location(5,28,5,37) + 5 | rule (A +Int I2) +Int (I3 -Int A) => I2 +Int I3 + . ^~~~~~~~~ +[Error] Compiler: Had 2 structural errors. +[Warning] Compiler: Could not find main syntax module with name TEST-SYNTAX in definition. Use --syntax-module to specify one. Using TEST as default. diff --git a/pyk/regression-new/issue-1572/Makefile b/pyk/regression-new/issue-1572/Makefile new file mode 100644 index 00000000000..f1e1170ba95 --- /dev/null +++ b/pyk/regression-new/issue-1572/Makefile @@ -0,0 +1,3 @@ +KOMPILE_FLAGS=-w2e -w all --gen-bison-parser + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-1572/test.k b/pyk/regression-new/issue-1572/test.k new file mode 100644 index 00000000000..5b3b5e96992 --- /dev/null +++ b/pyk/regression-new/issue-1572/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports ML-SYNTAX + +endmodule + +module TEST + imports TEST-SYNTAX + +endmodule diff --git a/pyk/regression-new/issue-1572/test.k.out b/pyk/regression-new/issue-1572/test.k.out new file mode 100644 index 00000000000..c5ac6cc249e --- /dev/null +++ b/pyk/regression-new/issue-1572/test.k.out @@ -0,0 +1 @@ +[Error] Inner Parser: Skipping modules [ML-SYNTAX] tagged as not-lr1 which are not supported by Bison. diff --git a/pyk/regression-new/issue-1573/1.test b/pyk/regression-new/issue-1573/1.test new file mode 100644 index 00000000000..3df46ad1902 --- /dev/null +++ b/pyk/regression-new/issue-1573/1.test @@ -0,0 +1 @@ +fun diff --git a/pyk/regression-new/issue-1573/1.test.out b/pyk/regression-new/issue-1573/1.test.out new file mode 100644 index 00000000000..fce1fdeb1f7 --- /dev/null +++ b/pyk/regression-new/issue-1573/1.test.out @@ -0,0 +1,8 @@ + + + .K + + + 10 .IntList + + diff --git a/pyk/regression-new/issue-1573/Makefile b/pyk/regression-new/issue-1573/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/issue-1573/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1573/test.k b/pyk/regression-new/issue-1573/test.k new file mode 100644 index 00000000000..452031310d1 --- /dev/null +++ b/pyk/regression-new/issue-1573/test.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + syntax IntList ::= List{Int, ""} + + syntax KItem ::= "go" | "fun" + + configuration + + go ~> $PGM:K + .IntList + + + syntax Int ::= foo(Int) [function] + rule foo(I) => 10 *Int I + + rule go => .K ... + _ => 1 + + rule fun => .K ... + 1 => foo(1) + +endmodule diff --git a/pyk/regression-new/issue-1602/Makefile b/pyk/regression-new/issue-1602/Makefile new file mode 100644 index 00000000000..abd2d4b7864 --- /dev/null +++ b/pyk/regression-new/issue-1602/Makefile @@ -0,0 +1,10 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS+=--gen-bison-parser --bison-stack-max-depth 12000 +KRUN_FLAGS=--dry-run --no-expand-macros 1>/dev/null 2>/dev/null + +include ../include/ktest.mak + +# output is already ignored, no need to update results +update-results: CHECK=| diff - diff --git a/pyk/regression-new/issue-1602/foo.test b/pyk/regression-new/issue-1602/foo.test new file mode 100644 index 00000000000..f8c14750e4a --- /dev/null +++ b/pyk/regression-new/issue-1602/foo.test @@ -0,0 +1,11001 @@ +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +16 +17 +18 +19 +20 +21 +22 +23 +24 +25 +26 +27 +28 +29 +30 +31 +32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229 +230 +231 +232 +233 +234 +235 +236 +237 +238 +239 +240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256 +257 +258 +259 +260 +261 +262 +263 +264 +265 +266 +267 +268 +269 +270 +271 +272 +273 +274 +275 +276 +277 +278 +279 +280 +281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294 +295 +296 +297 +298 +299 +300 +301 +302 +303 +304 +305 +306 +307 +308 +309 +310 +311 +312 +313 +314 +315 +316 +317 +318 +319 +320 +321 +322 +323 +324 +325 +326 +327 +328 +329 +330 +331 +332 +333 +334 +335 +336 +337 +338 +339 +340 +341 +342 +343 +344 +345 +346 +347 +348 +349 +350 +351 +352 +353 +354 +355 +356 +357 +358 +359 +360 +361 +362 +363 +364 +365 +366 +367 +368 +369 +370 +371 +372 +373 +374 +375 +376 +377 +378 +379 +380 +381 +382 +383 +384 +385 +386 +387 +388 +389 +390 +391 +392 +393 +394 +395 +396 +397 +398 +399 +400 +401 +402 +403 +404 +405 +406 +407 +408 +409 +410 +411 +412 +413 +414 +415 +416 +417 +418 +419 +420 +421 +422 +423 +424 +425 +426 +427 +428 +429 +430 +431 +432 +433 +434 +435 +436 +437 +438 +439 +440 +441 +442 +443 +444 +445 +446 +447 +448 +449 +450 +451 +452 +453 +454 +455 +456 +457 +458 +459 +460 +461 +462 +463 +464 +465 +466 +467 +468 +469 +470 +471 +472 +473 +474 +475 +476 +477 +478 +479 +480 +481 +482 +483 +484 +485 +486 +487 +488 +489 +490 +491 +492 +493 +494 +495 +496 +497 +498 +499 +500 +501 +502 +503 +504 +505 +506 +507 +508 +509 +510 +511 +512 +513 +514 +515 +516 +517 +518 +519 +520 +521 +522 +523 +524 +525 +526 +527 +528 +529 +530 +531 +532 +533 +534 +535 +536 +537 +538 +539 +540 +541 +542 +543 +544 +545 +546 +547 +548 +549 +550 +551 +552 +553 +554 +555 +556 +557 +558 +559 +560 +561 +562 +563 +564 +565 +566 +567 +568 +569 +570 +571 +572 +573 +574 +575 +576 +577 +578 +579 +580 +581 +582 +583 +584 +585 +586 +587 +588 +589 +590 +591 +592 +593 +594 +595 +596 +597 +598 +599 +600 +601 +602 +603 +604 +605 +606 +607 +608 +609 +610 +611 +612 +613 +614 +615 +616 +617 +618 +619 +620 +621 +622 +623 +624 +625 +626 +627 +628 +629 +630 +631 +632 +633 +634 +635 +636 +637 +638 +639 +640 +641 +642 +643 +644 +645 +646 +647 +648 +649 +650 +651 +652 +653 +654 +655 +656 +657 +658 +659 +660 +661 +662 +663 +664 +665 +666 +667 +668 +669 +670 +671 +672 +673 +674 +675 +676 +677 +678 +679 +680 +681 +682 +683 +684 +685 +686 +687 +688 +689 +690 +691 +692 +693 +694 +695 +696 +697 +698 +699 +700 +701 +702 +703 +704 +705 +706 +707 +708 +709 +710 +711 +712 +713 +714 +715 +716 +717 +718 +719 +720 +721 +722 +723 +724 +725 +726 +727 +728 +729 +730 +731 +732 +733 +734 +735 +736 +737 +738 +739 +740 +741 +742 +743 +744 +745 +746 +747 +748 +749 +750 +751 +752 +753 +754 +755 +756 +757 +758 +759 +760 +761 +762 +763 +764 +765 +766 +767 +768 +769 +770 +771 +772 +773 +774 +775 +776 +777 +778 +779 +780 +781 +782 +783 +784 +785 +786 +787 +788 +789 +790 +791 +792 +793 +794 +795 +796 +797 +798 +799 +800 +801 +802 +803 +804 +805 +806 +807 +808 +809 +810 +811 +812 +813 +814 +815 +816 +817 +818 +819 +820 +821 +822 +823 +824 +825 +826 +827 +828 +829 +830 +831 +832 +833 +834 +835 +836 +837 +838 +839 +840 +841 +842 +843 +844 +845 +846 +847 +848 +849 +850 +851 +852 +853 +854 +855 +856 +857 +858 +859 +860 +861 +862 +863 +864 +865 +866 +867 +868 +869 +870 +871 +872 +873 +874 +875 +876 +877 +878 +879 +880 +881 +882 +883 +884 +885 +886 +887 +888 +889 +890 +891 +892 +893 +894 +895 +896 +897 +898 +899 +900 +901 +902 +903 +904 +905 +906 +907 +908 +909 +910 +911 +912 +913 +914 +915 +916 +917 +918 +919 +920 +921 +922 +923 +924 +925 +926 +927 +928 +929 +930 +931 +932 +933 +934 +935 +936 +937 +938 +939 +940 +941 +942 +943 +944 +945 +946 +947 +948 +949 +950 +951 +952 +953 +954 +955 +956 +957 +958 +959 +960 +961 +962 +963 +964 +965 +966 +967 +968 +969 +970 +971 +972 +973 +974 +975 +976 +977 +978 +979 +980 +981 +982 +983 +984 +985 +986 +987 +988 +989 +990 +991 +992 +993 +994 +995 +996 +997 +998 +999 +1000 +1001 +1002 +1003 +1004 +1005 +1006 +1007 +1008 +1009 +1010 +1011 +1012 +1013 +1014 +1015 +1016 +1017 +1018 +1019 +1020 +1021 +1022 +1023 +1024 +1025 +1026 +1027 +1028 +1029 +1030 +1031 +1032 +1033 +1034 +1035 +1036 +1037 +1038 +1039 +1040 +1041 +1042 +1043 +1044 +1045 +1046 +1047 +1048 +1049 +1050 +1051 +1052 +1053 +1054 +1055 +1056 +1057 +1058 +1059 +1060 +1061 +1062 +1063 +1064 +1065 +1066 +1067 +1068 +1069 +1070 +1071 +1072 +1073 +1074 +1075 +1076 +1077 +1078 +1079 +1080 +1081 +1082 +1083 +1084 +1085 +1086 +1087 +1088 +1089 +1090 +1091 +1092 +1093 +1094 +1095 +1096 +1097 +1098 +1099 +1100 +1101 +1102 +1103 +1104 +1105 +1106 +1107 +1108 +1109 +1110 +1111 +1112 +1113 +1114 +1115 +1116 +1117 +1118 +1119 +1120 +1121 +1122 +1123 +1124 +1125 +1126 +1127 +1128 +1129 +1130 +1131 +1132 +1133 +1134 +1135 +1136 +1137 +1138 +1139 +1140 +1141 +1142 +1143 +1144 +1145 +1146 +1147 +1148 +1149 +1150 +1151 +1152 +1153 +1154 +1155 +1156 +1157 +1158 +1159 +1160 +1161 +1162 +1163 +1164 +1165 +1166 +1167 +1168 +1169 +1170 +1171 +1172 +1173 +1174 +1175 +1176 +1177 +1178 +1179 +1180 +1181 +1182 +1183 +1184 +1185 +1186 +1187 +1188 +1189 +1190 +1191 +1192 +1193 +1194 +1195 +1196 +1197 +1198 +1199 +1200 +1201 +1202 +1203 +1204 +1205 +1206 +1207 +1208 +1209 +1210 +1211 +1212 +1213 +1214 +1215 +1216 +1217 +1218 +1219 +1220 +1221 +1222 +1223 +1224 +1225 +1226 +1227 +1228 +1229 +1230 +1231 +1232 +1233 +1234 +1235 +1236 +1237 +1238 +1239 +1240 +1241 +1242 +1243 +1244 +1245 +1246 +1247 +1248 +1249 +1250 +1251 +1252 +1253 +1254 +1255 +1256 +1257 +1258 +1259 +1260 +1261 +1262 +1263 +1264 +1265 +1266 +1267 +1268 +1269 +1270 +1271 +1272 +1273 +1274 +1275 +1276 +1277 +1278 +1279 +1280 +1281 +1282 +1283 +1284 +1285 +1286 +1287 +1288 +1289 +1290 +1291 +1292 +1293 +1294 +1295 +1296 +1297 +1298 +1299 +1300 +1301 +1302 +1303 +1304 +1305 +1306 +1307 +1308 +1309 +1310 +1311 +1312 +1313 +1314 +1315 +1316 +1317 +1318 +1319 +1320 +1321 +1322 +1323 +1324 +1325 +1326 +1327 +1328 +1329 +1330 +1331 +1332 +1333 +1334 +1335 +1336 +1337 +1338 +1339 +1340 +1341 +1342 +1343 +1344 +1345 +1346 +1347 +1348 +1349 +1350 +1351 +1352 +1353 +1354 +1355 +1356 +1357 +1358 +1359 +1360 +1361 +1362 +1363 +1364 +1365 +1366 +1367 +1368 +1369 +1370 +1371 +1372 +1373 +1374 +1375 +1376 +1377 +1378 +1379 +1380 +1381 +1382 +1383 +1384 +1385 +1386 +1387 +1388 +1389 +1390 +1391 +1392 +1393 +1394 +1395 +1396 +1397 +1398 +1399 +1400 +1401 +1402 +1403 +1404 +1405 +1406 +1407 +1408 +1409 +1410 +1411 +1412 +1413 +1414 +1415 +1416 +1417 +1418 +1419 +1420 +1421 +1422 +1423 +1424 +1425 +1426 +1427 +1428 +1429 +1430 +1431 +1432 +1433 +1434 +1435 +1436 +1437 +1438 +1439 +1440 +1441 +1442 +1443 +1444 +1445 +1446 +1447 +1448 +1449 +1450 +1451 +1452 +1453 +1454 +1455 +1456 +1457 +1458 +1459 +1460 +1461 +1462 +1463 +1464 +1465 +1466 +1467 +1468 +1469 +1470 +1471 +1472 +1473 +1474 +1475 +1476 +1477 +1478 +1479 +1480 +1481 +1482 +1483 +1484 +1485 +1486 +1487 +1488 +1489 +1490 +1491 +1492 +1493 +1494 +1495 +1496 +1497 +1498 +1499 +1500 +1501 +1502 +1503 +1504 +1505 +1506 +1507 +1508 +1509 +1510 +1511 +1512 +1513 +1514 +1515 +1516 +1517 +1518 +1519 +1520 +1521 +1522 +1523 +1524 +1525 +1526 +1527 +1528 +1529 +1530 +1531 +1532 +1533 +1534 +1535 +1536 +1537 +1538 +1539 +1540 +1541 +1542 +1543 +1544 +1545 +1546 +1547 +1548 +1549 +1550 +1551 +1552 +1553 +1554 +1555 +1556 +1557 +1558 +1559 +1560 +1561 +1562 +1563 +1564 +1565 +1566 +1567 +1568 +1569 +1570 +1571 +1572 +1573 +1574 +1575 +1576 +1577 +1578 +1579 +1580 +1581 +1582 +1583 +1584 +1585 +1586 +1587 +1588 +1589 +1590 +1591 +1592 +1593 +1594 +1595 +1596 +1597 +1598 +1599 +1600 +1601 +1602 +1603 +1604 +1605 +1606 +1607 +1608 +1609 +1610 +1611 +1612 +1613 +1614 +1615 +1616 +1617 +1618 +1619 +1620 +1621 +1622 +1623 +1624 +1625 +1626 +1627 +1628 +1629 +1630 +1631 +1632 +1633 +1634 +1635 +1636 +1637 +1638 +1639 +1640 +1641 +1642 +1643 +1644 +1645 +1646 +1647 +1648 +1649 +1650 +1651 +1652 +1653 +1654 +1655 +1656 +1657 +1658 +1659 +1660 +1661 +1662 +1663 +1664 +1665 +1666 +1667 +1668 +1669 +1670 +1671 +1672 +1673 +1674 +1675 +1676 +1677 +1678 +1679 +1680 +1681 +1682 +1683 +1684 +1685 +1686 +1687 +1688 +1689 +1690 +1691 +1692 +1693 +1694 +1695 +1696 +1697 +1698 +1699 +1700 +1701 +1702 +1703 +1704 +1705 +1706 +1707 +1708 +1709 +1710 +1711 +1712 +1713 +1714 +1715 +1716 +1717 +1718 +1719 +1720 +1721 +1722 +1723 +1724 +1725 +1726 +1727 +1728 +1729 +1730 +1731 +1732 +1733 +1734 +1735 +1736 +1737 +1738 +1739 +1740 +1741 +1742 +1743 +1744 +1745 +1746 +1747 +1748 +1749 +1750 +1751 +1752 +1753 +1754 +1755 +1756 +1757 +1758 +1759 +1760 +1761 +1762 +1763 +1764 +1765 +1766 +1767 +1768 +1769 +1770 +1771 +1772 +1773 +1774 +1775 +1776 +1777 +1778 +1779 +1780 +1781 +1782 +1783 +1784 +1785 +1786 +1787 +1788 +1789 +1790 +1791 +1792 +1793 +1794 +1795 +1796 +1797 +1798 +1799 +1800 +1801 +1802 +1803 +1804 +1805 +1806 +1807 +1808 +1809 +1810 +1811 +1812 +1813 +1814 +1815 +1816 +1817 +1818 +1819 +1820 +1821 +1822 +1823 +1824 +1825 +1826 +1827 +1828 +1829 +1830 +1831 +1832 +1833 +1834 +1835 +1836 +1837 +1838 +1839 +1840 +1841 +1842 +1843 +1844 +1845 +1846 +1847 +1848 +1849 +1850 +1851 +1852 +1853 +1854 +1855 +1856 +1857 +1858 +1859 +1860 +1861 +1862 +1863 +1864 +1865 +1866 +1867 +1868 +1869 +1870 +1871 +1872 +1873 +1874 +1875 +1876 +1877 +1878 +1879 +1880 +1881 +1882 +1883 +1884 +1885 +1886 +1887 +1888 +1889 +1890 +1891 +1892 +1893 +1894 +1895 +1896 +1897 +1898 +1899 +1900 +1901 +1902 +1903 +1904 +1905 +1906 +1907 +1908 +1909 +1910 +1911 +1912 +1913 +1914 +1915 +1916 +1917 +1918 +1919 +1920 +1921 +1922 +1923 +1924 +1925 +1926 +1927 +1928 +1929 +1930 +1931 +1932 +1933 +1934 +1935 +1936 +1937 +1938 +1939 +1940 +1941 +1942 +1943 +1944 +1945 +1946 +1947 +1948 +1949 +1950 +1951 +1952 +1953 +1954 +1955 +1956 +1957 +1958 +1959 +1960 +1961 +1962 +1963 +1964 +1965 +1966 +1967 +1968 +1969 +1970 +1971 +1972 +1973 +1974 +1975 +1976 +1977 +1978 +1979 +1980 +1981 +1982 +1983 +1984 +1985 +1986 +1987 +1988 +1989 +1990 +1991 +1992 +1993 +1994 +1995 +1996 +1997 +1998 +1999 +2000 +2001 +2002 +2003 +2004 +2005 +2006 +2007 +2008 +2009 +2010 +2011 +2012 +2013 +2014 +2015 +2016 +2017 +2018 +2019 +2020 +2021 +2022 +2023 +2024 +2025 +2026 +2027 +2028 +2029 +2030 +2031 +2032 +2033 +2034 +2035 +2036 +2037 +2038 +2039 +2040 +2041 +2042 +2043 +2044 +2045 +2046 +2047 +2048 +2049 +2050 +2051 +2052 +2053 +2054 +2055 +2056 +2057 +2058 +2059 +2060 +2061 +2062 +2063 +2064 +2065 +2066 +2067 +2068 +2069 +2070 +2071 +2072 +2073 +2074 +2075 +2076 +2077 +2078 +2079 +2080 +2081 +2082 +2083 +2084 +2085 +2086 +2087 +2088 +2089 +2090 +2091 +2092 +2093 +2094 +2095 +2096 +2097 +2098 +2099 +2100 +2101 +2102 +2103 +2104 +2105 +2106 +2107 +2108 +2109 +2110 +2111 +2112 +2113 +2114 +2115 +2116 +2117 +2118 +2119 +2120 +2121 +2122 +2123 +2124 +2125 +2126 +2127 +2128 +2129 +2130 +2131 +2132 +2133 +2134 +2135 +2136 +2137 +2138 +2139 +2140 +2141 +2142 +2143 +2144 +2145 +2146 +2147 +2148 +2149 +2150 +2151 +2152 +2153 +2154 +2155 +2156 +2157 +2158 +2159 +2160 +2161 +2162 +2163 +2164 +2165 +2166 +2167 +2168 +2169 +2170 +2171 +2172 +2173 +2174 +2175 +2176 +2177 +2178 +2179 +2180 +2181 +2182 +2183 +2184 +2185 +2186 +2187 +2188 +2189 +2190 +2191 +2192 +2193 +2194 +2195 +2196 +2197 +2198 +2199 +2200 +2201 +2202 +2203 +2204 +2205 +2206 +2207 +2208 +2209 +2210 +2211 +2212 +2213 +2214 +2215 +2216 +2217 +2218 +2219 +2220 +2221 +2222 +2223 +2224 +2225 +2226 +2227 +2228 +2229 +2230 +2231 +2232 +2233 +2234 +2235 +2236 +2237 +2238 +2239 +2240 +2241 +2242 +2243 +2244 +2245 +2246 +2247 +2248 +2249 +2250 +2251 +2252 +2253 +2254 +2255 +2256 +2257 +2258 +2259 +2260 +2261 +2262 +2263 +2264 +2265 +2266 +2267 +2268 +2269 +2270 +2271 +2272 +2273 +2274 +2275 +2276 +2277 +2278 +2279 +2280 +2281 +2282 +2283 +2284 +2285 +2286 +2287 +2288 +2289 +2290 +2291 +2292 +2293 +2294 +2295 +2296 +2297 +2298 +2299 +2300 +2301 +2302 +2303 +2304 +2305 +2306 +2307 +2308 +2309 +2310 +2311 +2312 +2313 +2314 +2315 +2316 +2317 +2318 +2319 +2320 +2321 +2322 +2323 +2324 +2325 +2326 +2327 +2328 +2329 +2330 +2331 +2332 +2333 +2334 +2335 +2336 +2337 +2338 +2339 +2340 +2341 +2342 +2343 +2344 +2345 +2346 +2347 +2348 +2349 +2350 +2351 +2352 +2353 +2354 +2355 +2356 +2357 +2358 +2359 +2360 +2361 +2362 +2363 +2364 +2365 +2366 +2367 +2368 +2369 +2370 +2371 +2372 +2373 +2374 +2375 +2376 +2377 +2378 +2379 +2380 +2381 +2382 +2383 +2384 +2385 +2386 +2387 +2388 +2389 +2390 +2391 +2392 +2393 +2394 +2395 +2396 +2397 +2398 +2399 +2400 +2401 +2402 +2403 +2404 +2405 +2406 +2407 +2408 +2409 +2410 +2411 +2412 +2413 +2414 +2415 +2416 +2417 +2418 +2419 +2420 +2421 +2422 +2423 +2424 +2425 +2426 +2427 +2428 +2429 +2430 +2431 +2432 +2433 +2434 +2435 +2436 +2437 +2438 +2439 +2440 +2441 +2442 +2443 +2444 +2445 +2446 +2447 +2448 +2449 +2450 +2451 +2452 +2453 +2454 +2455 +2456 +2457 +2458 +2459 +2460 +2461 +2462 +2463 +2464 +2465 +2466 +2467 +2468 +2469 +2470 +2471 +2472 +2473 +2474 +2475 +2476 +2477 +2478 +2479 +2480 +2481 +2482 +2483 +2484 +2485 +2486 +2487 +2488 +2489 +2490 +2491 +2492 +2493 +2494 +2495 +2496 +2497 +2498 +2499 +2500 +2501 +2502 +2503 +2504 +2505 +2506 +2507 +2508 +2509 +2510 +2511 +2512 +2513 +2514 +2515 +2516 +2517 +2518 +2519 +2520 +2521 +2522 +2523 +2524 +2525 +2526 +2527 +2528 +2529 +2530 +2531 +2532 +2533 +2534 +2535 +2536 +2537 +2538 +2539 +2540 +2541 +2542 +2543 +2544 +2545 +2546 +2547 +2548 +2549 +2550 +2551 +2552 +2553 +2554 +2555 +2556 +2557 +2558 +2559 +2560 +2561 +2562 +2563 +2564 +2565 +2566 +2567 +2568 +2569 +2570 +2571 +2572 +2573 +2574 +2575 +2576 +2577 +2578 +2579 +2580 +2581 +2582 +2583 +2584 +2585 +2586 +2587 +2588 +2589 +2590 +2591 +2592 +2593 +2594 +2595 +2596 +2597 +2598 +2599 +2600 +2601 +2602 +2603 +2604 +2605 +2606 +2607 +2608 +2609 +2610 +2611 +2612 +2613 +2614 +2615 +2616 +2617 +2618 +2619 +2620 +2621 +2622 +2623 +2624 +2625 +2626 +2627 +2628 +2629 +2630 +2631 +2632 +2633 +2634 +2635 +2636 +2637 +2638 +2639 +2640 +2641 +2642 +2643 +2644 +2645 +2646 +2647 +2648 +2649 +2650 +2651 +2652 +2653 +2654 +2655 +2656 +2657 +2658 +2659 +2660 +2661 +2662 +2663 +2664 +2665 +2666 +2667 +2668 +2669 +2670 +2671 +2672 +2673 +2674 +2675 +2676 +2677 +2678 +2679 +2680 +2681 +2682 +2683 +2684 +2685 +2686 +2687 +2688 +2689 +2690 +2691 +2692 +2693 +2694 +2695 +2696 +2697 +2698 +2699 +2700 +2701 +2702 +2703 +2704 +2705 +2706 +2707 +2708 +2709 +2710 +2711 +2712 +2713 +2714 +2715 +2716 +2717 +2718 +2719 +2720 +2721 +2722 +2723 +2724 +2725 +2726 +2727 +2728 +2729 +2730 +2731 +2732 +2733 +2734 +2735 +2736 +2737 +2738 +2739 +2740 +2741 +2742 +2743 +2744 +2745 +2746 +2747 +2748 +2749 +2750 +2751 +2752 +2753 +2754 +2755 +2756 +2757 +2758 +2759 +2760 +2761 +2762 +2763 +2764 +2765 +2766 +2767 +2768 +2769 +2770 +2771 +2772 +2773 +2774 +2775 +2776 +2777 +2778 +2779 +2780 +2781 +2782 +2783 +2784 +2785 +2786 +2787 +2788 +2789 +2790 +2791 +2792 +2793 +2794 +2795 +2796 +2797 +2798 +2799 +2800 +2801 +2802 +2803 +2804 +2805 +2806 +2807 +2808 +2809 +2810 +2811 +2812 +2813 +2814 +2815 +2816 +2817 +2818 +2819 +2820 +2821 +2822 +2823 +2824 +2825 +2826 +2827 +2828 +2829 +2830 +2831 +2832 +2833 +2834 +2835 +2836 +2837 +2838 +2839 +2840 +2841 +2842 +2843 +2844 +2845 +2846 +2847 +2848 +2849 +2850 +2851 +2852 +2853 +2854 +2855 +2856 +2857 +2858 +2859 +2860 +2861 +2862 +2863 +2864 +2865 +2866 +2867 +2868 +2869 +2870 +2871 +2872 +2873 +2874 +2875 +2876 +2877 +2878 +2879 +2880 +2881 +2882 +2883 +2884 +2885 +2886 +2887 +2888 +2889 +2890 +2891 +2892 +2893 +2894 +2895 +2896 +2897 +2898 +2899 +2900 +2901 +2902 +2903 +2904 +2905 +2906 +2907 +2908 +2909 +2910 +2911 +2912 +2913 +2914 +2915 +2916 +2917 +2918 +2919 +2920 +2921 +2922 +2923 +2924 +2925 +2926 +2927 +2928 +2929 +2930 +2931 +2932 +2933 +2934 +2935 +2936 +2937 +2938 +2939 +2940 +2941 +2942 +2943 +2944 +2945 +2946 +2947 +2948 +2949 +2950 +2951 +2952 +2953 +2954 +2955 +2956 +2957 +2958 +2959 +2960 +2961 +2962 +2963 +2964 +2965 +2966 +2967 +2968 +2969 +2970 +2971 +2972 +2973 +2974 +2975 +2976 +2977 +2978 +2979 +2980 +2981 +2982 +2983 +2984 +2985 +2986 +2987 +2988 +2989 +2990 +2991 +2992 +2993 +2994 +2995 +2996 +2997 +2998 +2999 +3000 +3001 +3002 +3003 +3004 +3005 +3006 +3007 +3008 +3009 +3010 +3011 +3012 +3013 +3014 +3015 +3016 +3017 +3018 +3019 +3020 +3021 +3022 +3023 +3024 +3025 +3026 +3027 +3028 +3029 +3030 +3031 +3032 +3033 +3034 +3035 +3036 +3037 +3038 +3039 +3040 +3041 +3042 +3043 +3044 +3045 +3046 +3047 +3048 +3049 +3050 +3051 +3052 +3053 +3054 +3055 +3056 +3057 +3058 +3059 +3060 +3061 +3062 +3063 +3064 +3065 +3066 +3067 +3068 +3069 +3070 +3071 +3072 +3073 +3074 +3075 +3076 +3077 +3078 +3079 +3080 +3081 +3082 +3083 +3084 +3085 +3086 +3087 +3088 +3089 +3090 +3091 +3092 +3093 +3094 +3095 +3096 +3097 +3098 +3099 +3100 +3101 +3102 +3103 +3104 +3105 +3106 +3107 +3108 +3109 +3110 +3111 +3112 +3113 +3114 +3115 +3116 +3117 +3118 +3119 +3120 +3121 +3122 +3123 +3124 +3125 +3126 +3127 +3128 +3129 +3130 +3131 +3132 +3133 +3134 +3135 +3136 +3137 +3138 +3139 +3140 +3141 +3142 +3143 +3144 +3145 +3146 +3147 +3148 +3149 +3150 +3151 +3152 +3153 +3154 +3155 +3156 +3157 +3158 +3159 +3160 +3161 +3162 +3163 +3164 +3165 +3166 +3167 +3168 +3169 +3170 +3171 +3172 +3173 +3174 +3175 +3176 +3177 +3178 +3179 +3180 +3181 +3182 +3183 +3184 +3185 +3186 +3187 +3188 +3189 +3190 +3191 +3192 +3193 +3194 +3195 +3196 +3197 +3198 +3199 +3200 +3201 +3202 +3203 +3204 +3205 +3206 +3207 +3208 +3209 +3210 +3211 +3212 +3213 +3214 +3215 +3216 +3217 +3218 +3219 +3220 +3221 +3222 +3223 +3224 +3225 +3226 +3227 +3228 +3229 +3230 +3231 +3232 +3233 +3234 +3235 +3236 +3237 +3238 +3239 +3240 +3241 +3242 +3243 +3244 +3245 +3246 +3247 +3248 +3249 +3250 +3251 +3252 +3253 +3254 +3255 +3256 +3257 +3258 +3259 +3260 +3261 +3262 +3263 +3264 +3265 +3266 +3267 +3268 +3269 +3270 +3271 +3272 +3273 +3274 +3275 +3276 +3277 +3278 +3279 +3280 +3281 +3282 +3283 +3284 +3285 +3286 +3287 +3288 +3289 +3290 +3291 +3292 +3293 +3294 +3295 +3296 +3297 +3298 +3299 +3300 +3301 +3302 +3303 +3304 +3305 +3306 +3307 +3308 +3309 +3310 +3311 +3312 +3313 +3314 +3315 +3316 +3317 +3318 +3319 +3320 +3321 +3322 +3323 +3324 +3325 +3326 +3327 +3328 +3329 +3330 +3331 +3332 +3333 +3334 +3335 +3336 +3337 +3338 +3339 +3340 +3341 +3342 +3343 +3344 +3345 +3346 +3347 +3348 +3349 +3350 +3351 +3352 +3353 +3354 +3355 +3356 +3357 +3358 +3359 +3360 +3361 +3362 +3363 +3364 +3365 +3366 +3367 +3368 +3369 +3370 +3371 +3372 +3373 +3374 +3375 +3376 +3377 +3378 +3379 +3380 +3381 +3382 +3383 +3384 +3385 +3386 +3387 +3388 +3389 +3390 +3391 +3392 +3393 +3394 +3395 +3396 +3397 +3398 +3399 +3400 +3401 +3402 +3403 +3404 +3405 +3406 +3407 +3408 +3409 +3410 +3411 +3412 +3413 +3414 +3415 +3416 +3417 +3418 +3419 +3420 +3421 +3422 +3423 +3424 +3425 +3426 +3427 +3428 +3429 +3430 +3431 +3432 +3433 +3434 +3435 +3436 +3437 +3438 +3439 +3440 +3441 +3442 +3443 +3444 +3445 +3446 +3447 +3448 +3449 +3450 +3451 +3452 +3453 +3454 +3455 +3456 +3457 +3458 +3459 +3460 +3461 +3462 +3463 +3464 +3465 +3466 +3467 +3468 +3469 +3470 +3471 +3472 +3473 +3474 +3475 +3476 +3477 +3478 +3479 +3480 +3481 +3482 +3483 +3484 +3485 +3486 +3487 +3488 +3489 +3490 +3491 +3492 +3493 +3494 +3495 +3496 +3497 +3498 +3499 +3500 +3501 +3502 +3503 +3504 +3505 +3506 +3507 +3508 +3509 +3510 +3511 +3512 +3513 +3514 +3515 +3516 +3517 +3518 +3519 +3520 +3521 +3522 +3523 +3524 +3525 +3526 +3527 +3528 +3529 +3530 +3531 +3532 +3533 +3534 +3535 +3536 +3537 +3538 +3539 +3540 +3541 +3542 +3543 +3544 +3545 +3546 +3547 +3548 +3549 +3550 +3551 +3552 +3553 +3554 +3555 +3556 +3557 +3558 +3559 +3560 +3561 +3562 +3563 +3564 +3565 +3566 +3567 +3568 +3569 +3570 +3571 +3572 +3573 +3574 +3575 +3576 +3577 +3578 +3579 +3580 +3581 +3582 +3583 +3584 +3585 +3586 +3587 +3588 +3589 +3590 +3591 +3592 +3593 +3594 +3595 +3596 +3597 +3598 +3599 +3600 +3601 +3602 +3603 +3604 +3605 +3606 +3607 +3608 +3609 +3610 +3611 +3612 +3613 +3614 +3615 +3616 +3617 +3618 +3619 +3620 +3621 +3622 +3623 +3624 +3625 +3626 +3627 +3628 +3629 +3630 +3631 +3632 +3633 +3634 +3635 +3636 +3637 +3638 +3639 +3640 +3641 +3642 +3643 +3644 +3645 +3646 +3647 +3648 +3649 +3650 +3651 +3652 +3653 +3654 +3655 +3656 +3657 +3658 +3659 +3660 +3661 +3662 +3663 +3664 +3665 +3666 +3667 +3668 +3669 +3670 +3671 +3672 +3673 +3674 +3675 +3676 +3677 +3678 +3679 +3680 +3681 +3682 +3683 +3684 +3685 +3686 +3687 +3688 +3689 +3690 +3691 +3692 +3693 +3694 +3695 +3696 +3697 +3698 +3699 +3700 +3701 +3702 +3703 +3704 +3705 +3706 +3707 +3708 +3709 +3710 +3711 +3712 +3713 +3714 +3715 +3716 +3717 +3718 +3719 +3720 +3721 +3722 +3723 +3724 +3725 +3726 +3727 +3728 +3729 +3730 +3731 +3732 +3733 +3734 +3735 +3736 +3737 +3738 +3739 +3740 +3741 +3742 +3743 +3744 +3745 +3746 +3747 +3748 +3749 +3750 +3751 +3752 +3753 +3754 +3755 +3756 +3757 +3758 +3759 +3760 +3761 +3762 +3763 +3764 +3765 +3766 +3767 +3768 +3769 +3770 +3771 +3772 +3773 +3774 +3775 +3776 +3777 +3778 +3779 +3780 +3781 +3782 +3783 +3784 +3785 +3786 +3787 +3788 +3789 +3790 +3791 +3792 +3793 +3794 +3795 +3796 +3797 +3798 +3799 +3800 +3801 +3802 +3803 +3804 +3805 +3806 +3807 +3808 +3809 +3810 +3811 +3812 +3813 +3814 +3815 +3816 +3817 +3818 +3819 +3820 +3821 +3822 +3823 +3824 +3825 +3826 +3827 +3828 +3829 +3830 +3831 +3832 +3833 +3834 +3835 +3836 +3837 +3838 +3839 +3840 +3841 +3842 +3843 +3844 +3845 +3846 +3847 +3848 +3849 +3850 +3851 +3852 +3853 +3854 +3855 +3856 +3857 +3858 +3859 +3860 +3861 +3862 +3863 +3864 +3865 +3866 +3867 +3868 +3869 +3870 +3871 +3872 +3873 +3874 +3875 +3876 +3877 +3878 +3879 +3880 +3881 +3882 +3883 +3884 +3885 +3886 +3887 +3888 +3889 +3890 +3891 +3892 +3893 +3894 +3895 +3896 +3897 +3898 +3899 +3900 +3901 +3902 +3903 +3904 +3905 +3906 +3907 +3908 +3909 +3910 +3911 +3912 +3913 +3914 +3915 +3916 +3917 +3918 +3919 +3920 +3921 +3922 +3923 +3924 +3925 +3926 +3927 +3928 +3929 +3930 +3931 +3932 +3933 +3934 +3935 +3936 +3937 +3938 +3939 +3940 +3941 +3942 +3943 +3944 +3945 +3946 +3947 +3948 +3949 +3950 +3951 +3952 +3953 +3954 +3955 +3956 +3957 +3958 +3959 +3960 +3961 +3962 +3963 +3964 +3965 +3966 +3967 +3968 +3969 +3970 +3971 +3972 +3973 +3974 +3975 +3976 +3977 +3978 +3979 +3980 +3981 +3982 +3983 +3984 +3985 +3986 +3987 +3988 +3989 +3990 +3991 +3992 +3993 +3994 +3995 +3996 +3997 +3998 +3999 +4000 +4001 +4002 +4003 +4004 +4005 +4006 +4007 +4008 +4009 +4010 +4011 +4012 +4013 +4014 +4015 +4016 +4017 +4018 +4019 +4020 +4021 +4022 +4023 +4024 +4025 +4026 +4027 +4028 +4029 +4030 +4031 +4032 +4033 +4034 +4035 +4036 +4037 +4038 +4039 +4040 +4041 +4042 +4043 +4044 +4045 +4046 +4047 +4048 +4049 +4050 +4051 +4052 +4053 +4054 +4055 +4056 +4057 +4058 +4059 +4060 +4061 +4062 +4063 +4064 +4065 +4066 +4067 +4068 +4069 +4070 +4071 +4072 +4073 +4074 +4075 +4076 +4077 +4078 +4079 +4080 +4081 +4082 +4083 +4084 +4085 +4086 +4087 +4088 +4089 +4090 +4091 +4092 +4093 +4094 +4095 +4096 +4097 +4098 +4099 +4100 +4101 +4102 +4103 +4104 +4105 +4106 +4107 +4108 +4109 +4110 +4111 +4112 +4113 +4114 +4115 +4116 +4117 +4118 +4119 +4120 +4121 +4122 +4123 +4124 +4125 +4126 +4127 +4128 +4129 +4130 +4131 +4132 +4133 +4134 +4135 +4136 +4137 +4138 +4139 +4140 +4141 +4142 +4143 +4144 +4145 +4146 +4147 +4148 +4149 +4150 +4151 +4152 +4153 +4154 +4155 +4156 +4157 +4158 +4159 +4160 +4161 +4162 +4163 +4164 +4165 +4166 +4167 +4168 +4169 +4170 +4171 +4172 +4173 +4174 +4175 +4176 +4177 +4178 +4179 +4180 +4181 +4182 +4183 +4184 +4185 +4186 +4187 +4188 +4189 +4190 +4191 +4192 +4193 +4194 +4195 +4196 +4197 +4198 +4199 +4200 +4201 +4202 +4203 +4204 +4205 +4206 +4207 +4208 +4209 +4210 +4211 +4212 +4213 +4214 +4215 +4216 +4217 +4218 +4219 +4220 +4221 +4222 +4223 +4224 +4225 +4226 +4227 +4228 +4229 +4230 +4231 +4232 +4233 +4234 +4235 +4236 +4237 +4238 +4239 +4240 +4241 +4242 +4243 +4244 +4245 +4246 +4247 +4248 +4249 +4250 +4251 +4252 +4253 +4254 +4255 +4256 +4257 +4258 +4259 +4260 +4261 +4262 +4263 +4264 +4265 +4266 +4267 +4268 +4269 +4270 +4271 +4272 +4273 +4274 +4275 +4276 +4277 +4278 +4279 +4280 +4281 +4282 +4283 +4284 +4285 +4286 +4287 +4288 +4289 +4290 +4291 +4292 +4293 +4294 +4295 +4296 +4297 +4298 +4299 +4300 +4301 +4302 +4303 +4304 +4305 +4306 +4307 +4308 +4309 +4310 +4311 +4312 +4313 +4314 +4315 +4316 +4317 +4318 +4319 +4320 +4321 +4322 +4323 +4324 +4325 +4326 +4327 +4328 +4329 +4330 +4331 +4332 +4333 +4334 +4335 +4336 +4337 +4338 +4339 +4340 +4341 +4342 +4343 +4344 +4345 +4346 +4347 +4348 +4349 +4350 +4351 +4352 +4353 +4354 +4355 +4356 +4357 +4358 +4359 +4360 +4361 +4362 +4363 +4364 +4365 +4366 +4367 +4368 +4369 +4370 +4371 +4372 +4373 +4374 +4375 +4376 +4377 +4378 +4379 +4380 +4381 +4382 +4383 +4384 +4385 +4386 +4387 +4388 +4389 +4390 +4391 +4392 +4393 +4394 +4395 +4396 +4397 +4398 +4399 +4400 +4401 +4402 +4403 +4404 +4405 +4406 +4407 +4408 +4409 +4410 +4411 +4412 +4413 +4414 +4415 +4416 +4417 +4418 +4419 +4420 +4421 +4422 +4423 +4424 +4425 +4426 +4427 +4428 +4429 +4430 +4431 +4432 +4433 +4434 +4435 +4436 +4437 +4438 +4439 +4440 +4441 +4442 +4443 +4444 +4445 +4446 +4447 +4448 +4449 +4450 +4451 +4452 +4453 +4454 +4455 +4456 +4457 +4458 +4459 +4460 +4461 +4462 +4463 +4464 +4465 +4466 +4467 +4468 +4469 +4470 +4471 +4472 +4473 +4474 +4475 +4476 +4477 +4478 +4479 +4480 +4481 +4482 +4483 +4484 +4485 +4486 +4487 +4488 +4489 +4490 +4491 +4492 +4493 +4494 +4495 +4496 +4497 +4498 +4499 +4500 +4501 +4502 +4503 +4504 +4505 +4506 +4507 +4508 +4509 +4510 +4511 +4512 +4513 +4514 +4515 +4516 +4517 +4518 +4519 +4520 +4521 +4522 +4523 +4524 +4525 +4526 +4527 +4528 +4529 +4530 +4531 +4532 +4533 +4534 +4535 +4536 +4537 +4538 +4539 +4540 +4541 +4542 +4543 +4544 +4545 +4546 +4547 +4548 +4549 +4550 +4551 +4552 +4553 +4554 +4555 +4556 +4557 +4558 +4559 +4560 +4561 +4562 +4563 +4564 +4565 +4566 +4567 +4568 +4569 +4570 +4571 +4572 +4573 +4574 +4575 +4576 +4577 +4578 +4579 +4580 +4581 +4582 +4583 +4584 +4585 +4586 +4587 +4588 +4589 +4590 +4591 +4592 +4593 +4594 +4595 +4596 +4597 +4598 +4599 +4600 +4601 +4602 +4603 +4604 +4605 +4606 +4607 +4608 +4609 +4610 +4611 +4612 +4613 +4614 +4615 +4616 +4617 +4618 +4619 +4620 +4621 +4622 +4623 +4624 +4625 +4626 +4627 +4628 +4629 +4630 +4631 +4632 +4633 +4634 +4635 +4636 +4637 +4638 +4639 +4640 +4641 +4642 +4643 +4644 +4645 +4646 +4647 +4648 +4649 +4650 +4651 +4652 +4653 +4654 +4655 +4656 +4657 +4658 +4659 +4660 +4661 +4662 +4663 +4664 +4665 +4666 +4667 +4668 +4669 +4670 +4671 +4672 +4673 +4674 +4675 +4676 +4677 +4678 +4679 +4680 +4681 +4682 +4683 +4684 +4685 +4686 +4687 +4688 +4689 +4690 +4691 +4692 +4693 +4694 +4695 +4696 +4697 +4698 +4699 +4700 +4701 +4702 +4703 +4704 +4705 +4706 +4707 +4708 +4709 +4710 +4711 +4712 +4713 +4714 +4715 +4716 +4717 +4718 +4719 +4720 +4721 +4722 +4723 +4724 +4725 +4726 +4727 +4728 +4729 +4730 +4731 +4732 +4733 +4734 +4735 +4736 +4737 +4738 +4739 +4740 +4741 +4742 +4743 +4744 +4745 +4746 +4747 +4748 +4749 +4750 +4751 +4752 +4753 +4754 +4755 +4756 +4757 +4758 +4759 +4760 +4761 +4762 +4763 +4764 +4765 +4766 +4767 +4768 +4769 +4770 +4771 +4772 +4773 +4774 +4775 +4776 +4777 +4778 +4779 +4780 +4781 +4782 +4783 +4784 +4785 +4786 +4787 +4788 +4789 +4790 +4791 +4792 +4793 +4794 +4795 +4796 +4797 +4798 +4799 +4800 +4801 +4802 +4803 +4804 +4805 +4806 +4807 +4808 +4809 +4810 +4811 +4812 +4813 +4814 +4815 +4816 +4817 +4818 +4819 +4820 +4821 +4822 +4823 +4824 +4825 +4826 +4827 +4828 +4829 +4830 +4831 +4832 +4833 +4834 +4835 +4836 +4837 +4838 +4839 +4840 +4841 +4842 +4843 +4844 +4845 +4846 +4847 +4848 +4849 +4850 +4851 +4852 +4853 +4854 +4855 +4856 +4857 +4858 +4859 +4860 +4861 +4862 +4863 +4864 +4865 +4866 +4867 +4868 +4869 +4870 +4871 +4872 +4873 +4874 +4875 +4876 +4877 +4878 +4879 +4880 +4881 +4882 +4883 +4884 +4885 +4886 +4887 +4888 +4889 +4890 +4891 +4892 +4893 +4894 +4895 +4896 +4897 +4898 +4899 +4900 +4901 +4902 +4903 +4904 +4905 +4906 +4907 +4908 +4909 +4910 +4911 +4912 +4913 +4914 +4915 +4916 +4917 +4918 +4919 +4920 +4921 +4922 +4923 +4924 +4925 +4926 +4927 +4928 +4929 +4930 +4931 +4932 +4933 +4934 +4935 +4936 +4937 +4938 +4939 +4940 +4941 +4942 +4943 +4944 +4945 +4946 +4947 +4948 +4949 +4950 +4951 +4952 +4953 +4954 +4955 +4956 +4957 +4958 +4959 +4960 +4961 +4962 +4963 +4964 +4965 +4966 +4967 +4968 +4969 +4970 +4971 +4972 +4973 +4974 +4975 +4976 +4977 +4978 +4979 +4980 +4981 +4982 +4983 +4984 +4985 +4986 +4987 +4988 +4989 +4990 +4991 +4992 +4993 +4994 +4995 +4996 +4997 +4998 +4999 +5000 +5001 +5002 +5003 +5004 +5005 +5006 +5007 +5008 +5009 +5010 +5011 +5012 +5013 +5014 +5015 +5016 +5017 +5018 +5019 +5020 +5021 +5022 +5023 +5024 +5025 +5026 +5027 +5028 +5029 +5030 +5031 +5032 +5033 +5034 +5035 +5036 +5037 +5038 +5039 +5040 +5041 +5042 +5043 +5044 +5045 +5046 +5047 +5048 +5049 +5050 +5051 +5052 +5053 +5054 +5055 +5056 +5057 +5058 +5059 +5060 +5061 +5062 +5063 +5064 +5065 +5066 +5067 +5068 +5069 +5070 +5071 +5072 +5073 +5074 +5075 +5076 +5077 +5078 +5079 +5080 +5081 +5082 +5083 +5084 +5085 +5086 +5087 +5088 +5089 +5090 +5091 +5092 +5093 +5094 +5095 +5096 +5097 +5098 +5099 +5100 +5101 +5102 +5103 +5104 +5105 +5106 +5107 +5108 +5109 +5110 +5111 +5112 +5113 +5114 +5115 +5116 +5117 +5118 +5119 +5120 +5121 +5122 +5123 +5124 +5125 +5126 +5127 +5128 +5129 +5130 +5131 +5132 +5133 +5134 +5135 +5136 +5137 +5138 +5139 +5140 +5141 +5142 +5143 +5144 +5145 +5146 +5147 +5148 +5149 +5150 +5151 +5152 +5153 +5154 +5155 +5156 +5157 +5158 +5159 +5160 +5161 +5162 +5163 +5164 +5165 +5166 +5167 +5168 +5169 +5170 +5171 +5172 +5173 +5174 +5175 +5176 +5177 +5178 +5179 +5180 +5181 +5182 +5183 +5184 +5185 +5186 +5187 +5188 +5189 +5190 +5191 +5192 +5193 +5194 +5195 +5196 +5197 +5198 +5199 +5200 +5201 +5202 +5203 +5204 +5205 +5206 +5207 +5208 +5209 +5210 +5211 +5212 +5213 +5214 +5215 +5216 +5217 +5218 +5219 +5220 +5221 +5222 +5223 +5224 +5225 +5226 +5227 +5228 +5229 +5230 +5231 +5232 +5233 +5234 +5235 +5236 +5237 +5238 +5239 +5240 +5241 +5242 +5243 +5244 +5245 +5246 +5247 +5248 +5249 +5250 +5251 +5252 +5253 +5254 +5255 +5256 +5257 +5258 +5259 +5260 +5261 +5262 +5263 +5264 +5265 +5266 +5267 +5268 +5269 +5270 +5271 +5272 +5273 +5274 +5275 +5276 +5277 +5278 +5279 +5280 +5281 +5282 +5283 +5284 +5285 +5286 +5287 +5288 +5289 +5290 +5291 +5292 +5293 +5294 +5295 +5296 +5297 +5298 +5299 +5300 +5301 +5302 +5303 +5304 +5305 +5306 +5307 +5308 +5309 +5310 +5311 +5312 +5313 +5314 +5315 +5316 +5317 +5318 +5319 +5320 +5321 +5322 +5323 +5324 +5325 +5326 +5327 +5328 +5329 +5330 +5331 +5332 +5333 +5334 +5335 +5336 +5337 +5338 +5339 +5340 +5341 +5342 +5343 +5344 +5345 +5346 +5347 +5348 +5349 +5350 +5351 +5352 +5353 +5354 +5355 +5356 +5357 +5358 +5359 +5360 +5361 +5362 +5363 +5364 +5365 +5366 +5367 +5368 +5369 +5370 +5371 +5372 +5373 +5374 +5375 +5376 +5377 +5378 +5379 +5380 +5381 +5382 +5383 +5384 +5385 +5386 +5387 +5388 +5389 +5390 +5391 +5392 +5393 +5394 +5395 +5396 +5397 +5398 +5399 +5400 +5401 +5402 +5403 +5404 +5405 +5406 +5407 +5408 +5409 +5410 +5411 +5412 +5413 +5414 +5415 +5416 +5417 +5418 +5419 +5420 +5421 +5422 +5423 +5424 +5425 +5426 +5427 +5428 +5429 +5430 +5431 +5432 +5433 +5434 +5435 +5436 +5437 +5438 +5439 +5440 +5441 +5442 +5443 +5444 +5445 +5446 +5447 +5448 +5449 +5450 +5451 +5452 +5453 +5454 +5455 +5456 +5457 +5458 +5459 +5460 +5461 +5462 +5463 +5464 +5465 +5466 +5467 +5468 +5469 +5470 +5471 +5472 +5473 +5474 +5475 +5476 +5477 +5478 +5479 +5480 +5481 +5482 +5483 +5484 +5485 +5486 +5487 +5488 +5489 +5490 +5491 +5492 +5493 +5494 +5495 +5496 +5497 +5498 +5499 +5500 +5501 +5502 +5503 +5504 +5505 +5506 +5507 +5508 +5509 +5510 +5511 +5512 +5513 +5514 +5515 +5516 +5517 +5518 +5519 +5520 +5521 +5522 +5523 +5524 +5525 +5526 +5527 +5528 +5529 +5530 +5531 +5532 +5533 +5534 +5535 +5536 +5537 +5538 +5539 +5540 +5541 +5542 +5543 +5544 +5545 +5546 +5547 +5548 +5549 +5550 +5551 +5552 +5553 +5554 +5555 +5556 +5557 +5558 +5559 +5560 +5561 +5562 +5563 +5564 +5565 +5566 +5567 +5568 +5569 +5570 +5571 +5572 +5573 +5574 +5575 +5576 +5577 +5578 +5579 +5580 +5581 +5582 +5583 +5584 +5585 +5586 +5587 +5588 +5589 +5590 +5591 +5592 +5593 +5594 +5595 +5596 +5597 +5598 +5599 +5600 +5601 +5602 +5603 +5604 +5605 +5606 +5607 +5608 +5609 +5610 +5611 +5612 +5613 +5614 +5615 +5616 +5617 +5618 +5619 +5620 +5621 +5622 +5623 +5624 +5625 +5626 +5627 +5628 +5629 +5630 +5631 +5632 +5633 +5634 +5635 +5636 +5637 +5638 +5639 +5640 +5641 +5642 +5643 +5644 +5645 +5646 +5647 +5648 +5649 +5650 +5651 +5652 +5653 +5654 +5655 +5656 +5657 +5658 +5659 +5660 +5661 +5662 +5663 +5664 +5665 +5666 +5667 +5668 +5669 +5670 +5671 +5672 +5673 +5674 +5675 +5676 +5677 +5678 +5679 +5680 +5681 +5682 +5683 +5684 +5685 +5686 +5687 +5688 +5689 +5690 +5691 +5692 +5693 +5694 +5695 +5696 +5697 +5698 +5699 +5700 +5701 +5702 +5703 +5704 +5705 +5706 +5707 +5708 +5709 +5710 +5711 +5712 +5713 +5714 +5715 +5716 +5717 +5718 +5719 +5720 +5721 +5722 +5723 +5724 +5725 +5726 +5727 +5728 +5729 +5730 +5731 +5732 +5733 +5734 +5735 +5736 +5737 +5738 +5739 +5740 +5741 +5742 +5743 +5744 +5745 +5746 +5747 +5748 +5749 +5750 +5751 +5752 +5753 +5754 +5755 +5756 +5757 +5758 +5759 +5760 +5761 +5762 +5763 +5764 +5765 +5766 +5767 +5768 +5769 +5770 +5771 +5772 +5773 +5774 +5775 +5776 +5777 +5778 +5779 +5780 +5781 +5782 +5783 +5784 +5785 +5786 +5787 +5788 +5789 +5790 +5791 +5792 +5793 +5794 +5795 +5796 +5797 +5798 +5799 +5800 +5801 +5802 +5803 +5804 +5805 +5806 +5807 +5808 +5809 +5810 +5811 +5812 +5813 +5814 +5815 +5816 +5817 +5818 +5819 +5820 +5821 +5822 +5823 +5824 +5825 +5826 +5827 +5828 +5829 +5830 +5831 +5832 +5833 +5834 +5835 +5836 +5837 +5838 +5839 +5840 +5841 +5842 +5843 +5844 +5845 +5846 +5847 +5848 +5849 +5850 +5851 +5852 +5853 +5854 +5855 +5856 +5857 +5858 +5859 +5860 +5861 +5862 +5863 +5864 +5865 +5866 +5867 +5868 +5869 +5870 +5871 +5872 +5873 +5874 +5875 +5876 +5877 +5878 +5879 +5880 +5881 +5882 +5883 +5884 +5885 +5886 +5887 +5888 +5889 +5890 +5891 +5892 +5893 +5894 +5895 +5896 +5897 +5898 +5899 +5900 +5901 +5902 +5903 +5904 +5905 +5906 +5907 +5908 +5909 +5910 +5911 +5912 +5913 +5914 +5915 +5916 +5917 +5918 +5919 +5920 +5921 +5922 +5923 +5924 +5925 +5926 +5927 +5928 +5929 +5930 +5931 +5932 +5933 +5934 +5935 +5936 +5937 +5938 +5939 +5940 +5941 +5942 +5943 +5944 +5945 +5946 +5947 +5948 +5949 +5950 +5951 +5952 +5953 +5954 +5955 +5956 +5957 +5958 +5959 +5960 +5961 +5962 +5963 +5964 +5965 +5966 +5967 +5968 +5969 +5970 +5971 +5972 +5973 +5974 +5975 +5976 +5977 +5978 +5979 +5980 +5981 +5982 +5983 +5984 +5985 +5986 +5987 +5988 +5989 +5990 +5991 +5992 +5993 +5994 +5995 +5996 +5997 +5998 +5999 +6000 +6001 +6002 +6003 +6004 +6005 +6006 +6007 +6008 +6009 +6010 +6011 +6012 +6013 +6014 +6015 +6016 +6017 +6018 +6019 +6020 +6021 +6022 +6023 +6024 +6025 +6026 +6027 +6028 +6029 +6030 +6031 +6032 +6033 +6034 +6035 +6036 +6037 +6038 +6039 +6040 +6041 +6042 +6043 +6044 +6045 +6046 +6047 +6048 +6049 +6050 +6051 +6052 +6053 +6054 +6055 +6056 +6057 +6058 +6059 +6060 +6061 +6062 +6063 +6064 +6065 +6066 +6067 +6068 +6069 +6070 +6071 +6072 +6073 +6074 +6075 +6076 +6077 +6078 +6079 +6080 +6081 +6082 +6083 +6084 +6085 +6086 +6087 +6088 +6089 +6090 +6091 +6092 +6093 +6094 +6095 +6096 +6097 +6098 +6099 +6100 +6101 +6102 +6103 +6104 +6105 +6106 +6107 +6108 +6109 +6110 +6111 +6112 +6113 +6114 +6115 +6116 +6117 +6118 +6119 +6120 +6121 +6122 +6123 +6124 +6125 +6126 +6127 +6128 +6129 +6130 +6131 +6132 +6133 +6134 +6135 +6136 +6137 +6138 +6139 +6140 +6141 +6142 +6143 +6144 +6145 +6146 +6147 +6148 +6149 +6150 +6151 +6152 +6153 +6154 +6155 +6156 +6157 +6158 +6159 +6160 +6161 +6162 +6163 +6164 +6165 +6166 +6167 +6168 +6169 +6170 +6171 +6172 +6173 +6174 +6175 +6176 +6177 +6178 +6179 +6180 +6181 +6182 +6183 +6184 +6185 +6186 +6187 +6188 +6189 +6190 +6191 +6192 +6193 +6194 +6195 +6196 +6197 +6198 +6199 +6200 +6201 +6202 +6203 +6204 +6205 +6206 +6207 +6208 +6209 +6210 +6211 +6212 +6213 +6214 +6215 +6216 +6217 +6218 +6219 +6220 +6221 +6222 +6223 +6224 +6225 +6226 +6227 +6228 +6229 +6230 +6231 +6232 +6233 +6234 +6235 +6236 +6237 +6238 +6239 +6240 +6241 +6242 +6243 +6244 +6245 +6246 +6247 +6248 +6249 +6250 +6251 +6252 +6253 +6254 +6255 +6256 +6257 +6258 +6259 +6260 +6261 +6262 +6263 +6264 +6265 +6266 +6267 +6268 +6269 +6270 +6271 +6272 +6273 +6274 +6275 +6276 +6277 +6278 +6279 +6280 +6281 +6282 +6283 +6284 +6285 +6286 +6287 +6288 +6289 +6290 +6291 +6292 +6293 +6294 +6295 +6296 +6297 +6298 +6299 +6300 +6301 +6302 +6303 +6304 +6305 +6306 +6307 +6308 +6309 +6310 +6311 +6312 +6313 +6314 +6315 +6316 +6317 +6318 +6319 +6320 +6321 +6322 +6323 +6324 +6325 +6326 +6327 +6328 +6329 +6330 +6331 +6332 +6333 +6334 +6335 +6336 +6337 +6338 +6339 +6340 +6341 +6342 +6343 +6344 +6345 +6346 +6347 +6348 +6349 +6350 +6351 +6352 +6353 +6354 +6355 +6356 +6357 +6358 +6359 +6360 +6361 +6362 +6363 +6364 +6365 +6366 +6367 +6368 +6369 +6370 +6371 +6372 +6373 +6374 +6375 +6376 +6377 +6378 +6379 +6380 +6381 +6382 +6383 +6384 +6385 +6386 +6387 +6388 +6389 +6390 +6391 +6392 +6393 +6394 +6395 +6396 +6397 +6398 +6399 +6400 +6401 +6402 +6403 +6404 +6405 +6406 +6407 +6408 +6409 +6410 +6411 +6412 +6413 +6414 +6415 +6416 +6417 +6418 +6419 +6420 +6421 +6422 +6423 +6424 +6425 +6426 +6427 +6428 +6429 +6430 +6431 +6432 +6433 +6434 +6435 +6436 +6437 +6438 +6439 +6440 +6441 +6442 +6443 +6444 +6445 +6446 +6447 +6448 +6449 +6450 +6451 +6452 +6453 +6454 +6455 +6456 +6457 +6458 +6459 +6460 +6461 +6462 +6463 +6464 +6465 +6466 +6467 +6468 +6469 +6470 +6471 +6472 +6473 +6474 +6475 +6476 +6477 +6478 +6479 +6480 +6481 +6482 +6483 +6484 +6485 +6486 +6487 +6488 +6489 +6490 +6491 +6492 +6493 +6494 +6495 +6496 +6497 +6498 +6499 +6500 +6501 +6502 +6503 +6504 +6505 +6506 +6507 +6508 +6509 +6510 +6511 +6512 +6513 +6514 +6515 +6516 +6517 +6518 +6519 +6520 +6521 +6522 +6523 +6524 +6525 +6526 +6527 +6528 +6529 +6530 +6531 +6532 +6533 +6534 +6535 +6536 +6537 +6538 +6539 +6540 +6541 +6542 +6543 +6544 +6545 +6546 +6547 +6548 +6549 +6550 +6551 +6552 +6553 +6554 +6555 +6556 +6557 +6558 +6559 +6560 +6561 +6562 +6563 +6564 +6565 +6566 +6567 +6568 +6569 +6570 +6571 +6572 +6573 +6574 +6575 +6576 +6577 +6578 +6579 +6580 +6581 +6582 +6583 +6584 +6585 +6586 +6587 +6588 +6589 +6590 +6591 +6592 +6593 +6594 +6595 +6596 +6597 +6598 +6599 +6600 +6601 +6602 +6603 +6604 +6605 +6606 +6607 +6608 +6609 +6610 +6611 +6612 +6613 +6614 +6615 +6616 +6617 +6618 +6619 +6620 +6621 +6622 +6623 +6624 +6625 +6626 +6627 +6628 +6629 +6630 +6631 +6632 +6633 +6634 +6635 +6636 +6637 +6638 +6639 +6640 +6641 +6642 +6643 +6644 +6645 +6646 +6647 +6648 +6649 +6650 +6651 +6652 +6653 +6654 +6655 +6656 +6657 +6658 +6659 +6660 +6661 +6662 +6663 +6664 +6665 +6666 +6667 +6668 +6669 +6670 +6671 +6672 +6673 +6674 +6675 +6676 +6677 +6678 +6679 +6680 +6681 +6682 +6683 +6684 +6685 +6686 +6687 +6688 +6689 +6690 +6691 +6692 +6693 +6694 +6695 +6696 +6697 +6698 +6699 +6700 +6701 +6702 +6703 +6704 +6705 +6706 +6707 +6708 +6709 +6710 +6711 +6712 +6713 +6714 +6715 +6716 +6717 +6718 +6719 +6720 +6721 +6722 +6723 +6724 +6725 +6726 +6727 +6728 +6729 +6730 +6731 +6732 +6733 +6734 +6735 +6736 +6737 +6738 +6739 +6740 +6741 +6742 +6743 +6744 +6745 +6746 +6747 +6748 +6749 +6750 +6751 +6752 +6753 +6754 +6755 +6756 +6757 +6758 +6759 +6760 +6761 +6762 +6763 +6764 +6765 +6766 +6767 +6768 +6769 +6770 +6771 +6772 +6773 +6774 +6775 +6776 +6777 +6778 +6779 +6780 +6781 +6782 +6783 +6784 +6785 +6786 +6787 +6788 +6789 +6790 +6791 +6792 +6793 +6794 +6795 +6796 +6797 +6798 +6799 +6800 +6801 +6802 +6803 +6804 +6805 +6806 +6807 +6808 +6809 +6810 +6811 +6812 +6813 +6814 +6815 +6816 +6817 +6818 +6819 +6820 +6821 +6822 +6823 +6824 +6825 +6826 +6827 +6828 +6829 +6830 +6831 +6832 +6833 +6834 +6835 +6836 +6837 +6838 +6839 +6840 +6841 +6842 +6843 +6844 +6845 +6846 +6847 +6848 +6849 +6850 +6851 +6852 +6853 +6854 +6855 +6856 +6857 +6858 +6859 +6860 +6861 +6862 +6863 +6864 +6865 +6866 +6867 +6868 +6869 +6870 +6871 +6872 +6873 +6874 +6875 +6876 +6877 +6878 +6879 +6880 +6881 +6882 +6883 +6884 +6885 +6886 +6887 +6888 +6889 +6890 +6891 +6892 +6893 +6894 +6895 +6896 +6897 +6898 +6899 +6900 +6901 +6902 +6903 +6904 +6905 +6906 +6907 +6908 +6909 +6910 +6911 +6912 +6913 +6914 +6915 +6916 +6917 +6918 +6919 +6920 +6921 +6922 +6923 +6924 +6925 +6926 +6927 +6928 +6929 +6930 +6931 +6932 +6933 +6934 +6935 +6936 +6937 +6938 +6939 +6940 +6941 +6942 +6943 +6944 +6945 +6946 +6947 +6948 +6949 +6950 +6951 +6952 +6953 +6954 +6955 +6956 +6957 +6958 +6959 +6960 +6961 +6962 +6963 +6964 +6965 +6966 +6967 +6968 +6969 +6970 +6971 +6972 +6973 +6974 +6975 +6976 +6977 +6978 +6979 +6980 +6981 +6982 +6983 +6984 +6985 +6986 +6987 +6988 +6989 +6990 +6991 +6992 +6993 +6994 +6995 +6996 +6997 +6998 +6999 +7000 +7001 +7002 +7003 +7004 +7005 +7006 +7007 +7008 +7009 +7010 +7011 +7012 +7013 +7014 +7015 +7016 +7017 +7018 +7019 +7020 +7021 +7022 +7023 +7024 +7025 +7026 +7027 +7028 +7029 +7030 +7031 +7032 +7033 +7034 +7035 +7036 +7037 +7038 +7039 +7040 +7041 +7042 +7043 +7044 +7045 +7046 +7047 +7048 +7049 +7050 +7051 +7052 +7053 +7054 +7055 +7056 +7057 +7058 +7059 +7060 +7061 +7062 +7063 +7064 +7065 +7066 +7067 +7068 +7069 +7070 +7071 +7072 +7073 +7074 +7075 +7076 +7077 +7078 +7079 +7080 +7081 +7082 +7083 +7084 +7085 +7086 +7087 +7088 +7089 +7090 +7091 +7092 +7093 +7094 +7095 +7096 +7097 +7098 +7099 +7100 +7101 +7102 +7103 +7104 +7105 +7106 +7107 +7108 +7109 +7110 +7111 +7112 +7113 +7114 +7115 +7116 +7117 +7118 +7119 +7120 +7121 +7122 +7123 +7124 +7125 +7126 +7127 +7128 +7129 +7130 +7131 +7132 +7133 +7134 +7135 +7136 +7137 +7138 +7139 +7140 +7141 +7142 +7143 +7144 +7145 +7146 +7147 +7148 +7149 +7150 +7151 +7152 +7153 +7154 +7155 +7156 +7157 +7158 +7159 +7160 +7161 +7162 +7163 +7164 +7165 +7166 +7167 +7168 +7169 +7170 +7171 +7172 +7173 +7174 +7175 +7176 +7177 +7178 +7179 +7180 +7181 +7182 +7183 +7184 +7185 +7186 +7187 +7188 +7189 +7190 +7191 +7192 +7193 +7194 +7195 +7196 +7197 +7198 +7199 +7200 +7201 +7202 +7203 +7204 +7205 +7206 +7207 +7208 +7209 +7210 +7211 +7212 +7213 +7214 +7215 +7216 +7217 +7218 +7219 +7220 +7221 +7222 +7223 +7224 +7225 +7226 +7227 +7228 +7229 +7230 +7231 +7232 +7233 +7234 +7235 +7236 +7237 +7238 +7239 +7240 +7241 +7242 +7243 +7244 +7245 +7246 +7247 +7248 +7249 +7250 +7251 +7252 +7253 +7254 +7255 +7256 +7257 +7258 +7259 +7260 +7261 +7262 +7263 +7264 +7265 +7266 +7267 +7268 +7269 +7270 +7271 +7272 +7273 +7274 +7275 +7276 +7277 +7278 +7279 +7280 +7281 +7282 +7283 +7284 +7285 +7286 +7287 +7288 +7289 +7290 +7291 +7292 +7293 +7294 +7295 +7296 +7297 +7298 +7299 +7300 +7301 +7302 +7303 +7304 +7305 +7306 +7307 +7308 +7309 +7310 +7311 +7312 +7313 +7314 +7315 +7316 +7317 +7318 +7319 +7320 +7321 +7322 +7323 +7324 +7325 +7326 +7327 +7328 +7329 +7330 +7331 +7332 +7333 +7334 +7335 +7336 +7337 +7338 +7339 +7340 +7341 +7342 +7343 +7344 +7345 +7346 +7347 +7348 +7349 +7350 +7351 +7352 +7353 +7354 +7355 +7356 +7357 +7358 +7359 +7360 +7361 +7362 +7363 +7364 +7365 +7366 +7367 +7368 +7369 +7370 +7371 +7372 +7373 +7374 +7375 +7376 +7377 +7378 +7379 +7380 +7381 +7382 +7383 +7384 +7385 +7386 +7387 +7388 +7389 +7390 +7391 +7392 +7393 +7394 +7395 +7396 +7397 +7398 +7399 +7400 +7401 +7402 +7403 +7404 +7405 +7406 +7407 +7408 +7409 +7410 +7411 +7412 +7413 +7414 +7415 +7416 +7417 +7418 +7419 +7420 +7421 +7422 +7423 +7424 +7425 +7426 +7427 +7428 +7429 +7430 +7431 +7432 +7433 +7434 +7435 +7436 +7437 +7438 +7439 +7440 +7441 +7442 +7443 +7444 +7445 +7446 +7447 +7448 +7449 +7450 +7451 +7452 +7453 +7454 +7455 +7456 +7457 +7458 +7459 +7460 +7461 +7462 +7463 +7464 +7465 +7466 +7467 +7468 +7469 +7470 +7471 +7472 +7473 +7474 +7475 +7476 +7477 +7478 +7479 +7480 +7481 +7482 +7483 +7484 +7485 +7486 +7487 +7488 +7489 +7490 +7491 +7492 +7493 +7494 +7495 +7496 +7497 +7498 +7499 +7500 +7501 +7502 +7503 +7504 +7505 +7506 +7507 +7508 +7509 +7510 +7511 +7512 +7513 +7514 +7515 +7516 +7517 +7518 +7519 +7520 +7521 +7522 +7523 +7524 +7525 +7526 +7527 +7528 +7529 +7530 +7531 +7532 +7533 +7534 +7535 +7536 +7537 +7538 +7539 +7540 +7541 +7542 +7543 +7544 +7545 +7546 +7547 +7548 +7549 +7550 +7551 +7552 +7553 +7554 +7555 +7556 +7557 +7558 +7559 +7560 +7561 +7562 +7563 +7564 +7565 +7566 +7567 +7568 +7569 +7570 +7571 +7572 +7573 +7574 +7575 +7576 +7577 +7578 +7579 +7580 +7581 +7582 +7583 +7584 +7585 +7586 +7587 +7588 +7589 +7590 +7591 +7592 +7593 +7594 +7595 +7596 +7597 +7598 +7599 +7600 +7601 +7602 +7603 +7604 +7605 +7606 +7607 +7608 +7609 +7610 +7611 +7612 +7613 +7614 +7615 +7616 +7617 +7618 +7619 +7620 +7621 +7622 +7623 +7624 +7625 +7626 +7627 +7628 +7629 +7630 +7631 +7632 +7633 +7634 +7635 +7636 +7637 +7638 +7639 +7640 +7641 +7642 +7643 +7644 +7645 +7646 +7647 +7648 +7649 +7650 +7651 +7652 +7653 +7654 +7655 +7656 +7657 +7658 +7659 +7660 +7661 +7662 +7663 +7664 +7665 +7666 +7667 +7668 +7669 +7670 +7671 +7672 +7673 +7674 +7675 +7676 +7677 +7678 +7679 +7680 +7681 +7682 +7683 +7684 +7685 +7686 +7687 +7688 +7689 +7690 +7691 +7692 +7693 +7694 +7695 +7696 +7697 +7698 +7699 +7700 +7701 +7702 +7703 +7704 +7705 +7706 +7707 +7708 +7709 +7710 +7711 +7712 +7713 +7714 +7715 +7716 +7717 +7718 +7719 +7720 +7721 +7722 +7723 +7724 +7725 +7726 +7727 +7728 +7729 +7730 +7731 +7732 +7733 +7734 +7735 +7736 +7737 +7738 +7739 +7740 +7741 +7742 +7743 +7744 +7745 +7746 +7747 +7748 +7749 +7750 +7751 +7752 +7753 +7754 +7755 +7756 +7757 +7758 +7759 +7760 +7761 +7762 +7763 +7764 +7765 +7766 +7767 +7768 +7769 +7770 +7771 +7772 +7773 +7774 +7775 +7776 +7777 +7778 +7779 +7780 +7781 +7782 +7783 +7784 +7785 +7786 +7787 +7788 +7789 +7790 +7791 +7792 +7793 +7794 +7795 +7796 +7797 +7798 +7799 +7800 +7801 +7802 +7803 +7804 +7805 +7806 +7807 +7808 +7809 +7810 +7811 +7812 +7813 +7814 +7815 +7816 +7817 +7818 +7819 +7820 +7821 +7822 +7823 +7824 +7825 +7826 +7827 +7828 +7829 +7830 +7831 +7832 +7833 +7834 +7835 +7836 +7837 +7838 +7839 +7840 +7841 +7842 +7843 +7844 +7845 +7846 +7847 +7848 +7849 +7850 +7851 +7852 +7853 +7854 +7855 +7856 +7857 +7858 +7859 +7860 +7861 +7862 +7863 +7864 +7865 +7866 +7867 +7868 +7869 +7870 +7871 +7872 +7873 +7874 +7875 +7876 +7877 +7878 +7879 +7880 +7881 +7882 +7883 +7884 +7885 +7886 +7887 +7888 +7889 +7890 +7891 +7892 +7893 +7894 +7895 +7896 +7897 +7898 +7899 +7900 +7901 +7902 +7903 +7904 +7905 +7906 +7907 +7908 +7909 +7910 +7911 +7912 +7913 +7914 +7915 +7916 +7917 +7918 +7919 +7920 +7921 +7922 +7923 +7924 +7925 +7926 +7927 +7928 +7929 +7930 +7931 +7932 +7933 +7934 +7935 +7936 +7937 +7938 +7939 +7940 +7941 +7942 +7943 +7944 +7945 +7946 +7947 +7948 +7949 +7950 +7951 +7952 +7953 +7954 +7955 +7956 +7957 +7958 +7959 +7960 +7961 +7962 +7963 +7964 +7965 +7966 +7967 +7968 +7969 +7970 +7971 +7972 +7973 +7974 +7975 +7976 +7977 +7978 +7979 +7980 +7981 +7982 +7983 +7984 +7985 +7986 +7987 +7988 +7989 +7990 +7991 +7992 +7993 +7994 +7995 +7996 +7997 +7998 +7999 +8000 +8001 +8002 +8003 +8004 +8005 +8006 +8007 +8008 +8009 +8010 +8011 +8012 +8013 +8014 +8015 +8016 +8017 +8018 +8019 +8020 +8021 +8022 +8023 +8024 +8025 +8026 +8027 +8028 +8029 +8030 +8031 +8032 +8033 +8034 +8035 +8036 +8037 +8038 +8039 +8040 +8041 +8042 +8043 +8044 +8045 +8046 +8047 +8048 +8049 +8050 +8051 +8052 +8053 +8054 +8055 +8056 +8057 +8058 +8059 +8060 +8061 +8062 +8063 +8064 +8065 +8066 +8067 +8068 +8069 +8070 +8071 +8072 +8073 +8074 +8075 +8076 +8077 +8078 +8079 +8080 +8081 +8082 +8083 +8084 +8085 +8086 +8087 +8088 +8089 +8090 +8091 +8092 +8093 +8094 +8095 +8096 +8097 +8098 +8099 +8100 +8101 +8102 +8103 +8104 +8105 +8106 +8107 +8108 +8109 +8110 +8111 +8112 +8113 +8114 +8115 +8116 +8117 +8118 +8119 +8120 +8121 +8122 +8123 +8124 +8125 +8126 +8127 +8128 +8129 +8130 +8131 +8132 +8133 +8134 +8135 +8136 +8137 +8138 +8139 +8140 +8141 +8142 +8143 +8144 +8145 +8146 +8147 +8148 +8149 +8150 +8151 +8152 +8153 +8154 +8155 +8156 +8157 +8158 +8159 +8160 +8161 +8162 +8163 +8164 +8165 +8166 +8167 +8168 +8169 +8170 +8171 +8172 +8173 +8174 +8175 +8176 +8177 +8178 +8179 +8180 +8181 +8182 +8183 +8184 +8185 +8186 +8187 +8188 +8189 +8190 +8191 +8192 +8193 +8194 +8195 +8196 +8197 +8198 +8199 +8200 +8201 +8202 +8203 +8204 +8205 +8206 +8207 +8208 +8209 +8210 +8211 +8212 +8213 +8214 +8215 +8216 +8217 +8218 +8219 +8220 +8221 +8222 +8223 +8224 +8225 +8226 +8227 +8228 +8229 +8230 +8231 +8232 +8233 +8234 +8235 +8236 +8237 +8238 +8239 +8240 +8241 +8242 +8243 +8244 +8245 +8246 +8247 +8248 +8249 +8250 +8251 +8252 +8253 +8254 +8255 +8256 +8257 +8258 +8259 +8260 +8261 +8262 +8263 +8264 +8265 +8266 +8267 +8268 +8269 +8270 +8271 +8272 +8273 +8274 +8275 +8276 +8277 +8278 +8279 +8280 +8281 +8282 +8283 +8284 +8285 +8286 +8287 +8288 +8289 +8290 +8291 +8292 +8293 +8294 +8295 +8296 +8297 +8298 +8299 +8300 +8301 +8302 +8303 +8304 +8305 +8306 +8307 +8308 +8309 +8310 +8311 +8312 +8313 +8314 +8315 +8316 +8317 +8318 +8319 +8320 +8321 +8322 +8323 +8324 +8325 +8326 +8327 +8328 +8329 +8330 +8331 +8332 +8333 +8334 +8335 +8336 +8337 +8338 +8339 +8340 +8341 +8342 +8343 +8344 +8345 +8346 +8347 +8348 +8349 +8350 +8351 +8352 +8353 +8354 +8355 +8356 +8357 +8358 +8359 +8360 +8361 +8362 +8363 +8364 +8365 +8366 +8367 +8368 +8369 +8370 +8371 +8372 +8373 +8374 +8375 +8376 +8377 +8378 +8379 +8380 +8381 +8382 +8383 +8384 +8385 +8386 +8387 +8388 +8389 +8390 +8391 +8392 +8393 +8394 +8395 +8396 +8397 +8398 +8399 +8400 +8401 +8402 +8403 +8404 +8405 +8406 +8407 +8408 +8409 +8410 +8411 +8412 +8413 +8414 +8415 +8416 +8417 +8418 +8419 +8420 +8421 +8422 +8423 +8424 +8425 +8426 +8427 +8428 +8429 +8430 +8431 +8432 +8433 +8434 +8435 +8436 +8437 +8438 +8439 +8440 +8441 +8442 +8443 +8444 +8445 +8446 +8447 +8448 +8449 +8450 +8451 +8452 +8453 +8454 +8455 +8456 +8457 +8458 +8459 +8460 +8461 +8462 +8463 +8464 +8465 +8466 +8467 +8468 +8469 +8470 +8471 +8472 +8473 +8474 +8475 +8476 +8477 +8478 +8479 +8480 +8481 +8482 +8483 +8484 +8485 +8486 +8487 +8488 +8489 +8490 +8491 +8492 +8493 +8494 +8495 +8496 +8497 +8498 +8499 +8500 +8501 +8502 +8503 +8504 +8505 +8506 +8507 +8508 +8509 +8510 +8511 +8512 +8513 +8514 +8515 +8516 +8517 +8518 +8519 +8520 +8521 +8522 +8523 +8524 +8525 +8526 +8527 +8528 +8529 +8530 +8531 +8532 +8533 +8534 +8535 +8536 +8537 +8538 +8539 +8540 +8541 +8542 +8543 +8544 +8545 +8546 +8547 +8548 +8549 +8550 +8551 +8552 +8553 +8554 +8555 +8556 +8557 +8558 +8559 +8560 +8561 +8562 +8563 +8564 +8565 +8566 +8567 +8568 +8569 +8570 +8571 +8572 +8573 +8574 +8575 +8576 +8577 +8578 +8579 +8580 +8581 +8582 +8583 +8584 +8585 +8586 +8587 +8588 +8589 +8590 +8591 +8592 +8593 +8594 +8595 +8596 +8597 +8598 +8599 +8600 +8601 +8602 +8603 +8604 +8605 +8606 +8607 +8608 +8609 +8610 +8611 +8612 +8613 +8614 +8615 +8616 +8617 +8618 +8619 +8620 +8621 +8622 +8623 +8624 +8625 +8626 +8627 +8628 +8629 +8630 +8631 +8632 +8633 +8634 +8635 +8636 +8637 +8638 +8639 +8640 +8641 +8642 +8643 +8644 +8645 +8646 +8647 +8648 +8649 +8650 +8651 +8652 +8653 +8654 +8655 +8656 +8657 +8658 +8659 +8660 +8661 +8662 +8663 +8664 +8665 +8666 +8667 +8668 +8669 +8670 +8671 +8672 +8673 +8674 +8675 +8676 +8677 +8678 +8679 +8680 +8681 +8682 +8683 +8684 +8685 +8686 +8687 +8688 +8689 +8690 +8691 +8692 +8693 +8694 +8695 +8696 +8697 +8698 +8699 +8700 +8701 +8702 +8703 +8704 +8705 +8706 +8707 +8708 +8709 +8710 +8711 +8712 +8713 +8714 +8715 +8716 +8717 +8718 +8719 +8720 +8721 +8722 +8723 +8724 +8725 +8726 +8727 +8728 +8729 +8730 +8731 +8732 +8733 +8734 +8735 +8736 +8737 +8738 +8739 +8740 +8741 +8742 +8743 +8744 +8745 +8746 +8747 +8748 +8749 +8750 +8751 +8752 +8753 +8754 +8755 +8756 +8757 +8758 +8759 +8760 +8761 +8762 +8763 +8764 +8765 +8766 +8767 +8768 +8769 +8770 +8771 +8772 +8773 +8774 +8775 +8776 +8777 +8778 +8779 +8780 +8781 +8782 +8783 +8784 +8785 +8786 +8787 +8788 +8789 +8790 +8791 +8792 +8793 +8794 +8795 +8796 +8797 +8798 +8799 +8800 +8801 +8802 +8803 +8804 +8805 +8806 +8807 +8808 +8809 +8810 +8811 +8812 +8813 +8814 +8815 +8816 +8817 +8818 +8819 +8820 +8821 +8822 +8823 +8824 +8825 +8826 +8827 +8828 +8829 +8830 +8831 +8832 +8833 +8834 +8835 +8836 +8837 +8838 +8839 +8840 +8841 +8842 +8843 +8844 +8845 +8846 +8847 +8848 +8849 +8850 +8851 +8852 +8853 +8854 +8855 +8856 +8857 +8858 +8859 +8860 +8861 +8862 +8863 +8864 +8865 +8866 +8867 +8868 +8869 +8870 +8871 +8872 +8873 +8874 +8875 +8876 +8877 +8878 +8879 +8880 +8881 +8882 +8883 +8884 +8885 +8886 +8887 +8888 +8889 +8890 +8891 +8892 +8893 +8894 +8895 +8896 +8897 +8898 +8899 +8900 +8901 +8902 +8903 +8904 +8905 +8906 +8907 +8908 +8909 +8910 +8911 +8912 +8913 +8914 +8915 +8916 +8917 +8918 +8919 +8920 +8921 +8922 +8923 +8924 +8925 +8926 +8927 +8928 +8929 +8930 +8931 +8932 +8933 +8934 +8935 +8936 +8937 +8938 +8939 +8940 +8941 +8942 +8943 +8944 +8945 +8946 +8947 +8948 +8949 +8950 +8951 +8952 +8953 +8954 +8955 +8956 +8957 +8958 +8959 +8960 +8961 +8962 +8963 +8964 +8965 +8966 +8967 +8968 +8969 +8970 +8971 +8972 +8973 +8974 +8975 +8976 +8977 +8978 +8979 +8980 +8981 +8982 +8983 +8984 +8985 +8986 +8987 +8988 +8989 +8990 +8991 +8992 +8993 +8994 +8995 +8996 +8997 +8998 +8999 +9000 +9001 +9002 +9003 +9004 +9005 +9006 +9007 +9008 +9009 +9010 +9011 +9012 +9013 +9014 +9015 +9016 +9017 +9018 +9019 +9020 +9021 +9022 +9023 +9024 +9025 +9026 +9027 +9028 +9029 +9030 +9031 +9032 +9033 +9034 +9035 +9036 +9037 +9038 +9039 +9040 +9041 +9042 +9043 +9044 +9045 +9046 +9047 +9048 +9049 +9050 +9051 +9052 +9053 +9054 +9055 +9056 +9057 +9058 +9059 +9060 +9061 +9062 +9063 +9064 +9065 +9066 +9067 +9068 +9069 +9070 +9071 +9072 +9073 +9074 +9075 +9076 +9077 +9078 +9079 +9080 +9081 +9082 +9083 +9084 +9085 +9086 +9087 +9088 +9089 +9090 +9091 +9092 +9093 +9094 +9095 +9096 +9097 +9098 +9099 +9100 +9101 +9102 +9103 +9104 +9105 +9106 +9107 +9108 +9109 +9110 +9111 +9112 +9113 +9114 +9115 +9116 +9117 +9118 +9119 +9120 +9121 +9122 +9123 +9124 +9125 +9126 +9127 +9128 +9129 +9130 +9131 +9132 +9133 +9134 +9135 +9136 +9137 +9138 +9139 +9140 +9141 +9142 +9143 +9144 +9145 +9146 +9147 +9148 +9149 +9150 +9151 +9152 +9153 +9154 +9155 +9156 +9157 +9158 +9159 +9160 +9161 +9162 +9163 +9164 +9165 +9166 +9167 +9168 +9169 +9170 +9171 +9172 +9173 +9174 +9175 +9176 +9177 +9178 +9179 +9180 +9181 +9182 +9183 +9184 +9185 +9186 +9187 +9188 +9189 +9190 +9191 +9192 +9193 +9194 +9195 +9196 +9197 +9198 +9199 +9200 +9201 +9202 +9203 +9204 +9205 +9206 +9207 +9208 +9209 +9210 +9211 +9212 +9213 +9214 +9215 +9216 +9217 +9218 +9219 +9220 +9221 +9222 +9223 +9224 +9225 +9226 +9227 +9228 +9229 +9230 +9231 +9232 +9233 +9234 +9235 +9236 +9237 +9238 +9239 +9240 +9241 +9242 +9243 +9244 +9245 +9246 +9247 +9248 +9249 +9250 +9251 +9252 +9253 +9254 +9255 +9256 +9257 +9258 +9259 +9260 +9261 +9262 +9263 +9264 +9265 +9266 +9267 +9268 +9269 +9270 +9271 +9272 +9273 +9274 +9275 +9276 +9277 +9278 +9279 +9280 +9281 +9282 +9283 +9284 +9285 +9286 +9287 +9288 +9289 +9290 +9291 +9292 +9293 +9294 +9295 +9296 +9297 +9298 +9299 +9300 +9301 +9302 +9303 +9304 +9305 +9306 +9307 +9308 +9309 +9310 +9311 +9312 +9313 +9314 +9315 +9316 +9317 +9318 +9319 +9320 +9321 +9322 +9323 +9324 +9325 +9326 +9327 +9328 +9329 +9330 +9331 +9332 +9333 +9334 +9335 +9336 +9337 +9338 +9339 +9340 +9341 +9342 +9343 +9344 +9345 +9346 +9347 +9348 +9349 +9350 +9351 +9352 +9353 +9354 +9355 +9356 +9357 +9358 +9359 +9360 +9361 +9362 +9363 +9364 +9365 +9366 +9367 +9368 +9369 +9370 +9371 +9372 +9373 +9374 +9375 +9376 +9377 +9378 +9379 +9380 +9381 +9382 +9383 +9384 +9385 +9386 +9387 +9388 +9389 +9390 +9391 +9392 +9393 +9394 +9395 +9396 +9397 +9398 +9399 +9400 +9401 +9402 +9403 +9404 +9405 +9406 +9407 +9408 +9409 +9410 +9411 +9412 +9413 +9414 +9415 +9416 +9417 +9418 +9419 +9420 +9421 +9422 +9423 +9424 +9425 +9426 +9427 +9428 +9429 +9430 +9431 +9432 +9433 +9434 +9435 +9436 +9437 +9438 +9439 +9440 +9441 +9442 +9443 +9444 +9445 +9446 +9447 +9448 +9449 +9450 +9451 +9452 +9453 +9454 +9455 +9456 +9457 +9458 +9459 +9460 +9461 +9462 +9463 +9464 +9465 +9466 +9467 +9468 +9469 +9470 +9471 +9472 +9473 +9474 +9475 +9476 +9477 +9478 +9479 +9480 +9481 +9482 +9483 +9484 +9485 +9486 +9487 +9488 +9489 +9490 +9491 +9492 +9493 +9494 +9495 +9496 +9497 +9498 +9499 +9500 +9501 +9502 +9503 +9504 +9505 +9506 +9507 +9508 +9509 +9510 +9511 +9512 +9513 +9514 +9515 +9516 +9517 +9518 +9519 +9520 +9521 +9522 +9523 +9524 +9525 +9526 +9527 +9528 +9529 +9530 +9531 +9532 +9533 +9534 +9535 +9536 +9537 +9538 +9539 +9540 +9541 +9542 +9543 +9544 +9545 +9546 +9547 +9548 +9549 +9550 +9551 +9552 +9553 +9554 +9555 +9556 +9557 +9558 +9559 +9560 +9561 +9562 +9563 +9564 +9565 +9566 +9567 +9568 +9569 +9570 +9571 +9572 +9573 +9574 +9575 +9576 +9577 +9578 +9579 +9580 +9581 +9582 +9583 +9584 +9585 +9586 +9587 +9588 +9589 +9590 +9591 +9592 +9593 +9594 +9595 +9596 +9597 +9598 +9599 +9600 +9601 +9602 +9603 +9604 +9605 +9606 +9607 +9608 +9609 +9610 +9611 +9612 +9613 +9614 +9615 +9616 +9617 +9618 +9619 +9620 +9621 +9622 +9623 +9624 +9625 +9626 +9627 +9628 +9629 +9630 +9631 +9632 +9633 +9634 +9635 +9636 +9637 +9638 +9639 +9640 +9641 +9642 +9643 +9644 +9645 +9646 +9647 +9648 +9649 +9650 +9651 +9652 +9653 +9654 +9655 +9656 +9657 +9658 +9659 +9660 +9661 +9662 +9663 +9664 +9665 +9666 +9667 +9668 +9669 +9670 +9671 +9672 +9673 +9674 +9675 +9676 +9677 +9678 +9679 +9680 +9681 +9682 +9683 +9684 +9685 +9686 +9687 +9688 +9689 +9690 +9691 +9692 +9693 +9694 +9695 +9696 +9697 +9698 +9699 +9700 +9701 +9702 +9703 +9704 +9705 +9706 +9707 +9708 +9709 +9710 +9711 +9712 +9713 +9714 +9715 +9716 +9717 +9718 +9719 +9720 +9721 +9722 +9723 +9724 +9725 +9726 +9727 +9728 +9729 +9730 +9731 +9732 +9733 +9734 +9735 +9736 +9737 +9738 +9739 +9740 +9741 +9742 +9743 +9744 +9745 +9746 +9747 +9748 +9749 +9750 +9751 +9752 +9753 +9754 +9755 +9756 +9757 +9758 +9759 +9760 +9761 +9762 +9763 +9764 +9765 +9766 +9767 +9768 +9769 +9770 +9771 +9772 +9773 +9774 +9775 +9776 +9777 +9778 +9779 +9780 +9781 +9782 +9783 +9784 +9785 +9786 +9787 +9788 +9789 +9790 +9791 +9792 +9793 +9794 +9795 +9796 +9797 +9798 +9799 +9800 +9801 +9802 +9803 +9804 +9805 +9806 +9807 +9808 +9809 +9810 +9811 +9812 +9813 +9814 +9815 +9816 +9817 +9818 +9819 +9820 +9821 +9822 +9823 +9824 +9825 +9826 +9827 +9828 +9829 +9830 +9831 +9832 +9833 +9834 +9835 +9836 +9837 +9838 +9839 +9840 +9841 +9842 +9843 +9844 +9845 +9846 +9847 +9848 +9849 +9850 +9851 +9852 +9853 +9854 +9855 +9856 +9857 +9858 +9859 +9860 +9861 +9862 +9863 +9864 +9865 +9866 +9867 +9868 +9869 +9870 +9871 +9872 +9873 +9874 +9875 +9876 +9877 +9878 +9879 +9880 +9881 +9882 +9883 +9884 +9885 +9886 +9887 +9888 +9889 +9890 +9891 +9892 +9893 +9894 +9895 +9896 +9897 +9898 +9899 +9900 +9901 +9902 +9903 +9904 +9905 +9906 +9907 +9908 +9909 +9910 +9911 +9912 +9913 +9914 +9915 +9916 +9917 +9918 +9919 +9920 +9921 +9922 +9923 +9924 +9925 +9926 +9927 +9928 +9929 +9930 +9931 +9932 +9933 +9934 +9935 +9936 +9937 +9938 +9939 +9940 +9941 +9942 +9943 +9944 +9945 +9946 +9947 +9948 +9949 +9950 +9951 +9952 +9953 +9954 +9955 +9956 +9957 +9958 +9959 +9960 +9961 +9962 +9963 +9964 +9965 +9966 +9967 +9968 +9969 +9970 +9971 +9972 +9973 +9974 +9975 +9976 +9977 +9978 +9979 +9980 +9981 +9982 +9983 +9984 +9985 +9986 +9987 +9988 +9989 +9990 +9991 +9992 +9993 +9994 +9995 +9996 +9997 +9998 +9999 +10000 +10001 +10002 +10003 +10004 +10005 +10006 +10007 +10008 +10009 +10010 +10011 +10012 +10013 +10014 +10015 +10016 +10017 +10018 +10019 +10020 +10021 +10022 +10023 +10024 +10025 +10026 +10027 +10028 +10029 +10030 +10031 +10032 +10033 +10034 +10035 +10036 +10037 +10038 +10039 +10040 +10041 +10042 +10043 +10044 +10045 +10046 +10047 +10048 +10049 +10050 +10051 +10052 +10053 +10054 +10055 +10056 +10057 +10058 +10059 +10060 +10061 +10062 +10063 +10064 +10065 +10066 +10067 +10068 +10069 +10070 +10071 +10072 +10073 +10074 +10075 +10076 +10077 +10078 +10079 +10080 +10081 +10082 +10083 +10084 +10085 +10086 +10087 +10088 +10089 +10090 +10091 +10092 +10093 +10094 +10095 +10096 +10097 +10098 +10099 +10100 +10101 +10102 +10103 +10104 +10105 +10106 +10107 +10108 +10109 +10110 +10111 +10112 +10113 +10114 +10115 +10116 +10117 +10118 +10119 +10120 +10121 +10122 +10123 +10124 +10125 +10126 +10127 +10128 +10129 +10130 +10131 +10132 +10133 +10134 +10135 +10136 +10137 +10138 +10139 +10140 +10141 +10142 +10143 +10144 +10145 +10146 +10147 +10148 +10149 +10150 +10151 +10152 +10153 +10154 +10155 +10156 +10157 +10158 +10159 +10160 +10161 +10162 +10163 +10164 +10165 +10166 +10167 +10168 +10169 +10170 +10171 +10172 +10173 +10174 +10175 +10176 +10177 +10178 +10179 +10180 +10181 +10182 +10183 +10184 +10185 +10186 +10187 +10188 +10189 +10190 +10191 +10192 +10193 +10194 +10195 +10196 +10197 +10198 +10199 +10200 +10201 +10202 +10203 +10204 +10205 +10206 +10207 +10208 +10209 +10210 +10211 +10212 +10213 +10214 +10215 +10216 +10217 +10218 +10219 +10220 +10221 +10222 +10223 +10224 +10225 +10226 +10227 +10228 +10229 +10230 +10231 +10232 +10233 +10234 +10235 +10236 +10237 +10238 +10239 +10240 +10241 +10242 +10243 +10244 +10245 +10246 +10247 +10248 +10249 +10250 +10251 +10252 +10253 +10254 +10255 +10256 +10257 +10258 +10259 +10260 +10261 +10262 +10263 +10264 +10265 +10266 +10267 +10268 +10269 +10270 +10271 +10272 +10273 +10274 +10275 +10276 +10277 +10278 +10279 +10280 +10281 +10282 +10283 +10284 +10285 +10286 +10287 +10288 +10289 +10290 +10291 +10292 +10293 +10294 +10295 +10296 +10297 +10298 +10299 +10300 +10301 +10302 +10303 +10304 +10305 +10306 +10307 +10308 +10309 +10310 +10311 +10312 +10313 +10314 +10315 +10316 +10317 +10318 +10319 +10320 +10321 +10322 +10323 +10324 +10325 +10326 +10327 +10328 +10329 +10330 +10331 +10332 +10333 +10334 +10335 +10336 +10337 +10338 +10339 +10340 +10341 +10342 +10343 +10344 +10345 +10346 +10347 +10348 +10349 +10350 +10351 +10352 +10353 +10354 +10355 +10356 +10357 +10358 +10359 +10360 +10361 +10362 +10363 +10364 +10365 +10366 +10367 +10368 +10369 +10370 +10371 +10372 +10373 +10374 +10375 +10376 +10377 +10378 +10379 +10380 +10381 +10382 +10383 +10384 +10385 +10386 +10387 +10388 +10389 +10390 +10391 +10392 +10393 +10394 +10395 +10396 +10397 +10398 +10399 +10400 +10401 +10402 +10403 +10404 +10405 +10406 +10407 +10408 +10409 +10410 +10411 +10412 +10413 +10414 +10415 +10416 +10417 +10418 +10419 +10420 +10421 +10422 +10423 +10424 +10425 +10426 +10427 +10428 +10429 +10430 +10431 +10432 +10433 +10434 +10435 +10436 +10437 +10438 +10439 +10440 +10441 +10442 +10443 +10444 +10445 +10446 +10447 +10448 +10449 +10450 +10451 +10452 +10453 +10454 +10455 +10456 +10457 +10458 +10459 +10460 +10461 +10462 +10463 +10464 +10465 +10466 +10467 +10468 +10469 +10470 +10471 +10472 +10473 +10474 +10475 +10476 +10477 +10478 +10479 +10480 +10481 +10482 +10483 +10484 +10485 +10486 +10487 +10488 +10489 +10490 +10491 +10492 +10493 +10494 +10495 +10496 +10497 +10498 +10499 +10500 +10501 +10502 +10503 +10504 +10505 +10506 +10507 +10508 +10509 +10510 +10511 +10512 +10513 +10514 +10515 +10516 +10517 +10518 +10519 +10520 +10521 +10522 +10523 +10524 +10525 +10526 +10527 +10528 +10529 +10530 +10531 +10532 +10533 +10534 +10535 +10536 +10537 +10538 +10539 +10540 +10541 +10542 +10543 +10544 +10545 +10546 +10547 +10548 +10549 +10550 +10551 +10552 +10553 +10554 +10555 +10556 +10557 +10558 +10559 +10560 +10561 +10562 +10563 +10564 +10565 +10566 +10567 +10568 +10569 +10570 +10571 +10572 +10573 +10574 +10575 +10576 +10577 +10578 +10579 +10580 +10581 +10582 +10583 +10584 +10585 +10586 +10587 +10588 +10589 +10590 +10591 +10592 +10593 +10594 +10595 +10596 +10597 +10598 +10599 +10600 +10601 +10602 +10603 +10604 +10605 +10606 +10607 +10608 +10609 +10610 +10611 +10612 +10613 +10614 +10615 +10616 +10617 +10618 +10619 +10620 +10621 +10622 +10623 +10624 +10625 +10626 +10627 +10628 +10629 +10630 +10631 +10632 +10633 +10634 +10635 +10636 +10637 +10638 +10639 +10640 +10641 +10642 +10643 +10644 +10645 +10646 +10647 +10648 +10649 +10650 +10651 +10652 +10653 +10654 +10655 +10656 +10657 +10658 +10659 +10660 +10661 +10662 +10663 +10664 +10665 +10666 +10667 +10668 +10669 +10670 +10671 +10672 +10673 +10674 +10675 +10676 +10677 +10678 +10679 +10680 +10681 +10682 +10683 +10684 +10685 +10686 +10687 +10688 +10689 +10690 +10691 +10692 +10693 +10694 +10695 +10696 +10697 +10698 +10699 +10700 +10701 +10702 +10703 +10704 +10705 +10706 +10707 +10708 +10709 +10710 +10711 +10712 +10713 +10714 +10715 +10716 +10717 +10718 +10719 +10720 +10721 +10722 +10723 +10724 +10725 +10726 +10727 +10728 +10729 +10730 +10731 +10732 +10733 +10734 +10735 +10736 +10737 +10738 +10739 +10740 +10741 +10742 +10743 +10744 +10745 +10746 +10747 +10748 +10749 +10750 +10751 +10752 +10753 +10754 +10755 +10756 +10757 +10758 +10759 +10760 +10761 +10762 +10763 +10764 +10765 +10766 +10767 +10768 +10769 +10770 +10771 +10772 +10773 +10774 +10775 +10776 +10777 +10778 +10779 +10780 +10781 +10782 +10783 +10784 +10785 +10786 +10787 +10788 +10789 +10790 +10791 +10792 +10793 +10794 +10795 +10796 +10797 +10798 +10799 +10800 +10801 +10802 +10803 +10804 +10805 +10806 +10807 +10808 +10809 +10810 +10811 +10812 +10813 +10814 +10815 +10816 +10817 +10818 +10819 +10820 +10821 +10822 +10823 +10824 +10825 +10826 +10827 +10828 +10829 +10830 +10831 +10832 +10833 +10834 +10835 +10836 +10837 +10838 +10839 +10840 +10841 +10842 +10843 +10844 +10845 +10846 +10847 +10848 +10849 +10850 +10851 +10852 +10853 +10854 +10855 +10856 +10857 +10858 +10859 +10860 +10861 +10862 +10863 +10864 +10865 +10866 +10867 +10868 +10869 +10870 +10871 +10872 +10873 +10874 +10875 +10876 +10877 +10878 +10879 +10880 +10881 +10882 +10883 +10884 +10885 +10886 +10887 +10888 +10889 +10890 +10891 +10892 +10893 +10894 +10895 +10896 +10897 +10898 +10899 +10900 +10901 +10902 +10903 +10904 +10905 +10906 +10907 +10908 +10909 +10910 +10911 +10912 +10913 +10914 +10915 +10916 +10917 +10918 +10919 +10920 +10921 +10922 +10923 +10924 +10925 +10926 +10927 +10928 +10929 +10930 +10931 +10932 +10933 +10934 +10935 +10936 +10937 +10938 +10939 +10940 +10941 +10942 +10943 +10944 +10945 +10946 +10947 +10948 +10949 +10950 +10951 +10952 +10953 +10954 +10955 +10956 +10957 +10958 +10959 +10960 +10961 +10962 +10963 +10964 +10965 +10966 +10967 +10968 +10969 +10970 +10971 +10972 +10973 +10974 +10975 +10976 +10977 +10978 +10979 +10980 +10981 +10982 +10983 +10984 +10985 +10986 +10987 +10988 +10989 +10990 +10991 +10992 +10993 +10994 +10995 +10996 +10997 +10998 +10999 +11000 diff --git a/pyk/regression-new/issue-1602/foo.test.out b/pyk/regression-new/issue-1602/foo.test.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/issue-1602/test.k b/pyk/regression-new/issue-1602/test.k new file mode 100644 index 00000000000..7e144064f93 --- /dev/null +++ b/pyk/regression-new/issue-1602/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Pgm ::= List{Int, ""} +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + configuration $PGM:Pgm + +endmodule diff --git a/pyk/regression-new/issue-1633/1.test b/pyk/regression-new/issue-1633/1.test new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/pyk/regression-new/issue-1633/1.test @@ -0,0 +1 @@ +foo diff --git a/pyk/regression-new/issue-1633/1.test.out b/pyk/regression-new/issue-1633/1.test.out new file mode 100644 index 00000000000..f5c5b1e7285 --- /dev/null +++ b/pyk/regression-new/issue-1633/1.test.out @@ -0,0 +1,3 @@ + + foo ~> .K + diff --git a/pyk/regression-new/issue-1633/10.test b/pyk/regression-new/issue-1633/10.test new file mode 100644 index 00000000000..63dbeda3d26 --- /dev/null +++ b/pyk/regression-new/issue-1633/10.test @@ -0,0 +1 @@ +u'f' diff --git a/pyk/regression-new/issue-1633/10.test.out b/pyk/regression-new/issue-1633/10.test.out new file mode 100644 index 00000000000..4ffdcd60518 --- /dev/null +++ b/pyk/regression-new/issue-1633/10.test.out @@ -0,0 +1,3 @@ + + u'f' ~> .K + diff --git a/pyk/regression-new/issue-1633/11.test b/pyk/regression-new/issue-1633/11.test new file mode 100644 index 00000000000..1ad8499212a --- /dev/null +++ b/pyk/regression-new/issue-1633/11.test @@ -0,0 +1 @@ +L'\n' diff --git a/pyk/regression-new/issue-1633/11.test.out b/pyk/regression-new/issue-1633/11.test.out new file mode 100644 index 00000000000..d32ee649765 --- /dev/null +++ b/pyk/regression-new/issue-1633/11.test.out @@ -0,0 +1,3 @@ + + L'\n' ~> .K + diff --git a/pyk/regression-new/issue-1633/12.test b/pyk/regression-new/issue-1633/12.test new file mode 100644 index 00000000000..14e24d41900 --- /dev/null +++ b/pyk/regression-new/issue-1633/12.test @@ -0,0 +1 @@ +"foobar" diff --git a/pyk/regression-new/issue-1633/12.test.out b/pyk/regression-new/issue-1633/12.test.out new file mode 100644 index 00000000000..149319da53f --- /dev/null +++ b/pyk/regression-new/issue-1633/12.test.out @@ -0,0 +1,3 @@ + + "foobar" ~> .K + diff --git a/pyk/regression-new/issue-1633/13.test b/pyk/regression-new/issue-1633/13.test new file mode 100644 index 00000000000..316e8ae977e --- /dev/null +++ b/pyk/regression-new/issue-1633/13.test @@ -0,0 +1 @@ +u8"\000" diff --git a/pyk/regression-new/issue-1633/13.test.out b/pyk/regression-new/issue-1633/13.test.out new file mode 100644 index 00000000000..754c0827681 --- /dev/null +++ b/pyk/regression-new/issue-1633/13.test.out @@ -0,0 +1,3 @@ + + u8"\000" ~> .K + diff --git a/pyk/regression-new/issue-1633/2.test b/pyk/regression-new/issue-1633/2.test new file mode 100644 index 00000000000..0d77d719b36 --- /dev/null +++ b/pyk/regression-new/issue-1633/2.test @@ -0,0 +1 @@ +foo0\uffff\Uffffffff diff --git a/pyk/regression-new/issue-1633/2.test.out b/pyk/regression-new/issue-1633/2.test.out new file mode 100644 index 00000000000..363f23728fa --- /dev/null +++ b/pyk/regression-new/issue-1633/2.test.out @@ -0,0 +1,3 @@ + + foo0\uffff\Uffffffff ~> .K + diff --git a/pyk/regression-new/issue-1633/3.test b/pyk/regression-new/issue-1633/3.test new file mode 100644 index 00000000000..60d3b2f4a4c --- /dev/null +++ b/pyk/regression-new/issue-1633/3.test @@ -0,0 +1 @@ +15 diff --git a/pyk/regression-new/issue-1633/3.test.out b/pyk/regression-new/issue-1633/3.test.out new file mode 100644 index 00000000000..db4e6bd820a --- /dev/null +++ b/pyk/regression-new/issue-1633/3.test.out @@ -0,0 +1,3 @@ + + 15 ~> .K + diff --git a/pyk/regression-new/issue-1633/4.test b/pyk/regression-new/issue-1633/4.test new file mode 100644 index 00000000000..8a7b8b7db20 --- /dev/null +++ b/pyk/regression-new/issue-1633/4.test @@ -0,0 +1 @@ +017 diff --git a/pyk/regression-new/issue-1633/4.test.out b/pyk/regression-new/issue-1633/4.test.out new file mode 100644 index 00000000000..f7b448d8ff1 --- /dev/null +++ b/pyk/regression-new/issue-1633/4.test.out @@ -0,0 +1,3 @@ + + 017 ~> .K + diff --git a/pyk/regression-new/issue-1633/5.test b/pyk/regression-new/issue-1633/5.test new file mode 100644 index 00000000000..de84fe89adb --- /dev/null +++ b/pyk/regression-new/issue-1633/5.test @@ -0,0 +1 @@ +0xffff diff --git a/pyk/regression-new/issue-1633/5.test.out b/pyk/regression-new/issue-1633/5.test.out new file mode 100644 index 00000000000..3475f07bfd7 --- /dev/null +++ b/pyk/regression-new/issue-1633/5.test.out @@ -0,0 +1,3 @@ + + 0xffff ~> .K + diff --git a/pyk/regression-new/issue-1633/6.test b/pyk/regression-new/issue-1633/6.test new file mode 100644 index 00000000000..ff27b02fc59 --- /dev/null +++ b/pyk/regression-new/issue-1633/6.test @@ -0,0 +1 @@ +0xfffful diff --git a/pyk/regression-new/issue-1633/6.test.out b/pyk/regression-new/issue-1633/6.test.out new file mode 100644 index 00000000000..054a88fb934 --- /dev/null +++ b/pyk/regression-new/issue-1633/6.test.out @@ -0,0 +1,3 @@ + + 0xfffful ~> .K + diff --git a/pyk/regression-new/issue-1633/7.test b/pyk/regression-new/issue-1633/7.test new file mode 100644 index 00000000000..17a5757b17c --- /dev/null +++ b/pyk/regression-new/issue-1633/7.test @@ -0,0 +1 @@ +0. diff --git a/pyk/regression-new/issue-1633/7.test.out b/pyk/regression-new/issue-1633/7.test.out new file mode 100644 index 00000000000..90b2720af9d --- /dev/null +++ b/pyk/regression-new/issue-1633/7.test.out @@ -0,0 +1,3 @@ + + 0. ~> .K + diff --git a/pyk/regression-new/issue-1633/8.test b/pyk/regression-new/issue-1633/8.test new file mode 100644 index 00000000000..f3ad81b76f0 --- /dev/null +++ b/pyk/regression-new/issue-1633/8.test @@ -0,0 +1 @@ +0xff.ffp-2 diff --git a/pyk/regression-new/issue-1633/8.test.out b/pyk/regression-new/issue-1633/8.test.out new file mode 100644 index 00000000000..2b51a5f66fa --- /dev/null +++ b/pyk/regression-new/issue-1633/8.test.out @@ -0,0 +1,3 @@ + + 0xff.ffp-2 ~> .K + diff --git a/pyk/regression-new/issue-1633/9.test b/pyk/regression-new/issue-1633/9.test new file mode 100644 index 00000000000..d5e868f41f7 --- /dev/null +++ b/pyk/regression-new/issue-1633/9.test @@ -0,0 +1 @@ +0.0L diff --git a/pyk/regression-new/issue-1633/9.test.out b/pyk/regression-new/issue-1633/9.test.out new file mode 100644 index 00000000000..ba604f8a12a --- /dev/null +++ b/pyk/regression-new/issue-1633/9.test.out @@ -0,0 +1,3 @@ + + 0.0L ~> .K + diff --git a/pyk/regression-new/issue-1633/Makefile b/pyk/regression-new/issue-1633/Makefile new file mode 100644 index 00000000000..d4aa86d74c6 --- /dev/null +++ b/pyk/regression-new/issue-1633/Makefile @@ -0,0 +1,6 @@ +DEF=lexical +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1633/lexical.k b/pyk/regression-new/issue-1633/lexical.k new file mode 100644 index 00000000000..4e4ea52e572 --- /dev/null +++ b/pyk/regression-new/issue-1633/lexical.k @@ -0,0 +1,63 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module LEXICAL-SORTS + syntax Identifier [token] + syntax IntConstant [token] + syntax FloatConstant [token] + syntax CharConstant [token] + syntax StringLiteral [token] +endmodule + +module LEXICAL-SYNTAX + imports LEXICAL-SORTS + + syntax Identifier ::= r"{IdentifierNonDigit}(({IdentifierNonDigit}|{Digit})*)" [token] + syntax lexical IdentifierNonDigit = r"{Nondigit}|{UniversalCharacterName}" + syntax lexical Nondigit = r"[_a-zA-Z]" + syntax lexical Digit = r"[0-9]" + + syntax lexical UniversalCharacterName = r"(\\\\u{HexQuad})|(\\\\U{HexQuad}{2})" + syntax lexical HexQuad = r"{HexDigit}{4}" + + syntax IntConstant ::= r"({DecConstant}|{OctConstant}|{HexConstant})({IntSuffix}?)" [token] + syntax lexical DecConstant = r"{NonzeroDigit}({Digit}*)" + syntax lexical OctConstant = r"0({OctDigit}*)" + syntax lexical HexConstant = r"{HexPrefix}({HexDigit}+)" + syntax lexical HexPrefix = r"0x|0X" + syntax lexical NonzeroDigit = r"[1-9]" + syntax lexical OctDigit = r"[0-7]" + syntax lexical HexDigit = r"[0-9a-fA-F]" + syntax lexical IntSuffix = r"{UnsignedSuffix}({LongSuffix}?)|{UnsignedSuffix}{LongLongSuffix}|{LongSuffix}({UnsignedSuffix}?)|{LongLongSuffix}({UnsignedSuffix}?)" + syntax lexical UnsignedSuffix = r"[uU]" + syntax lexical LongSuffix = r"[lL]" + syntax lexical LongLongSuffix = r"ll|LL" + + syntax FloatConstant ::= r"{DecFloatConstant}|{HexFloatConstant}" [token] + syntax lexical DecFloatConstant = r"{FractionalConstant}({ExponentPart}?)({FloatSuffix}?)|{DigitSeq}{ExponentPart}({FloatSuffix}?)" + syntax lexical HexFloatConstant = r"{HexPrefix}({HexFractionalConstant}|{HexDigitSeq}){BinaryExponentPart}({FloatSuffix}?)" + syntax lexical FractionalConstant = r"({DigitSeq}?)[.]{DigitSeq}|{DigitSeq}[.]" + syntax lexical ExponentPart = r"[eE]({Sign}?){DigitSeq}" + syntax lexical Sign = r"[+-]" + syntax lexical DigitSeq = r"{Digit}+" + syntax lexical HexFractionalConstant = r"({HexDigitSeq}?)[.]{HexDigitSeq}|{HexDigitSeq}[.]" + syntax lexical BinaryExponentPart = r"[pP]({Sign}?){DigitSeq}" + syntax lexical HexDigitSeq = r"{HexDigit}+" + syntax lexical FloatSuffix = r"[flFL]" + + syntax CharConstant ::= r"[LuU]?'{CCharSeq}'" [token] + syntax lexical CCharSeq = r"{CChar}+" + syntax lexical CChar = r"[^'\\n\\\\]|{EscapeSeq}" + syntax lexical EscapeSeq = r"{SimpleEscapeSeq}|{OctEscapeSeq}|{HexEscapeSeq}|{UniversalCharacterName}" + syntax lexical SimpleEscapeSeq = r"\\\\['\\\"?\\\\abfnrtv]" + syntax lexical OctEscapeSeq = r"\\\\{OctDigit}{1,3}" + syntax lexical HexEscapeSeq = r"\\\\x{HexDigit}+" + + syntax StringLiteral ::= r"{EncodingPrefix}?\\\"{SCharSeq}?\\\"" [token] + syntax lexical EncodingPrefix = r"u8|[uUL]" + syntax lexical SCharSeq = r"{SChar}+" + syntax lexical SChar = r"[^\\\"\\n\\\\]|{EscapeSeq}" +endmodule + +module LEXICAL + imports LEXICAL-SORTS + +endmodule diff --git a/pyk/regression-new/issue-1676-koreBytes/1.test b/pyk/regression-new/issue-1676-koreBytes/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-1676-koreBytes/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-1676-koreBytes/1.test.out b/pyk/regression-new/issue-1676-koreBytes/1.test.out new file mode 100644 index 00000000000..e44971b5eeb --- /dev/null +++ b/pyk/regression-new/issue-1676-koreBytes/1.test.out @@ -0,0 +1,16 @@ +/* T Fn D Sfa Cl */ +Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa Cl */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa Cl */ + kseq{}( + /* T Fn D Sfa Cli */ + /* Inj: */ inj{SortBytes{}, SortKItem{}}( + /* T Fn D Sfa Cl */ \dv{SortBytes{}}("") + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa Cl */ + Lbl'-LT-'generatedCounter'-GT-'{}(/* T Fn D Sfa Cl */ \dv{SortInt{}}("0")) +) diff --git a/pyk/regression-new/issue-1676-koreBytes/Makefile b/pyk/regression-new/issue-1676-koreBytes/Makefile new file mode 100644 index 00000000000..866adcfc5a3 --- /dev/null +++ b/pyk/regression-new/issue-1676-koreBytes/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KRUN_FLAGS=--output kore +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1676-koreBytes/test.k b/pyk/regression-new/issue-1676-koreBytes/test.k new file mode 100644 index 00000000000..4500cfb57b7 --- /dev/null +++ b/pyk/regression-new/issue-1676-koreBytes/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// testing that krun pretty prints corectly Bytes +// kx should replace krun though, so if this test +// prevents a future upgrade, it should be removed + +module TEST + imports BYTES + imports INT + + configuration $PGM:Int + rule 1 => Int2Bytes(0, 0, LE) +endmodule diff --git a/pyk/regression-new/issue-1682-korePrettyPrint/1.test b/pyk/regression-new/issue-1682-korePrettyPrint/1.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/issue-1682-korePrettyPrint/1.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/issue-1682-korePrettyPrint/1.test.out b/pyk/regression-new/issue-1682-korePrettyPrint/1.test.out new file mode 100644 index 00000000000..409d08dec4d --- /dev/null +++ b/pyk/regression-new/issue-1682-korePrettyPrint/1.test.out @@ -0,0 +1,16 @@ +/* T Fn D Sfa */ +Lbl'-LT-'generatedTop'-GT-'{}( + /* T Fn D Sfa */ + Lbl'-LT-'k'-GT-'{}( + /* T Fn D Sfa */ + kseq{}( + /* T Fn D Sfa */ + /* Inj: */ inj{SortInt{}, SortKItem{}}( + /* T Fn D Sfa */ Var'QuesUnds'Gen0:SortInt{} + ), + /* T Fn D Sfa Cl */ dotk{}() + ) + ), + /* T Fn D Sfa Cl */ + Lbl'-LT-'generatedCounter'-GT-'{}(/* T Fn D Sfa Cl */ \dv{SortInt{}}("0")) +) diff --git a/pyk/regression-new/issue-1682-korePrettyPrint/2.kast b/pyk/regression-new/issue-1682-korePrettyPrint/2.kast new file mode 100644 index 00000000000..f759e921b58 --- /dev/null +++ b/pyk/regression-new/issue-1682-korePrettyPrint/2.kast @@ -0,0 +1 @@ +inj { SortBool { }, SortKItem { } } ( Lblpred1 { } ( \dv { SortInt { } } ( "3" ) ) ) diff --git a/pyk/regression-new/issue-1682-korePrettyPrint/2.kast.out b/pyk/regression-new/issue-1682-korePrettyPrint/2.kast.out new file mode 100644 index 00000000000..5731d6473e6 --- /dev/null +++ b/pyk/regression-new/issue-1682-korePrettyPrint/2.kast.out @@ -0,0 +1 @@ +pred1(#token("3","Int")) diff --git a/pyk/regression-new/issue-1682-korePrettyPrint/Makefile b/pyk/regression-new/issue-1682-korePrettyPrint/Makefile new file mode 100644 index 00000000000..5d2a92499bc --- /dev/null +++ b/pyk/regression-new/issue-1682-korePrettyPrint/Makefile @@ -0,0 +1,11 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KRUN_FLAGS=--output kore +KOMPILE_FLAGS=--syntax-module TEST +KAST_FLAGS=--input kore + +include ../include/ktest.mak +# force krun instead of kx +KRUN_OR_KX=$(KRUN) diff --git a/pyk/regression-new/issue-1682-korePrettyPrint/test.k b/pyk/regression-new/issue-1682-korePrettyPrint/test.k new file mode 100644 index 00000000000..eed64262310 --- /dev/null +++ b/pyk/regression-new/issue-1682-korePrettyPrint/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + syntax X ::= "a" + configuration $PGM:X + rule a => ?_:Int + syntax Bool ::= pred1 ( Int ) [function, total, klabel(pred1), symbol, no-evaluators] +endmodule diff --git a/pyk/regression-new/issue-1683-cfgVarsWarns/1.test b/pyk/regression-new/issue-1683-cfgVarsWarns/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-1683-cfgVarsWarns/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-1683-cfgVarsWarns/1.test.out b/pyk/regression-new/issue-1683-cfgVarsWarns/1.test.out new file mode 100644 index 00000000000..0d59dfa81ff --- /dev/null +++ b/pyk/regression-new/issue-1683-cfgVarsWarns/1.test.out @@ -0,0 +1 @@ +[Error] krun: Configuration variable missing: $Foo. Use -cFoo= in the command line to set. diff --git a/pyk/regression-new/issue-1683-cfgVarsWarns/Makefile b/pyk/regression-new/issue-1683-cfgVarsWarns/Makefile new file mode 100644 index 00000000000..2aa02121f5e --- /dev/null +++ b/pyk/regression-new/issue-1683-cfgVarsWarns/Makefile @@ -0,0 +1,10 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST +KOMPILE_BACKEND=haskell +KRUN_FLAGS=-cA=.K + +include ../include/ktest.mak +%.$(EXT): kompile + $(KRUN_OR_LEGACY) $@ $(KRUN_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) $(CHECK) $@.out diff --git a/pyk/regression-new/issue-1683-cfgVarsWarns/test.k b/pyk/regression-new/issue-1683-cfgVarsWarns/test.k new file mode 100644 index 00000000000..69e6aebdb51 --- /dev/null +++ b/pyk/regression-new/issue-1683-cfgVarsWarns/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// error if a config variable is not initialized in command line +// warning if a variable is specified but not declared in the configuration + +module TEST + imports INT + configuration $PGM:Int + $Foo:Int +endmodule diff --git a/pyk/regression-new/issue-1683-cfgVarsWarns/test.k.out b/pyk/regression-new/issue-1683-cfgVarsWarns/test.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/issue-1760/Makefile b/pyk/regression-new/issue-1760/Makefile new file mode 100644 index 00000000000..7d52aa208a5 --- /dev/null +++ b/pyk/regression-new/issue-1760/Makefile @@ -0,0 +1 @@ +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-1760/test.k b/pyk/regression-new/issue-1760/test.k new file mode 100644 index 00000000000..7fc1b087108 --- /dev/null +++ b/pyk/regression-new/issue-1760/test.k @@ -0,0 +1,106 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + + syntax TokKat ::= "ZERO" [token] + |"ONE" [token] + + syntax Kat ::= TokKat [hook(KAT.Kat)] + syntax Kat ::= ".Kat" [function, total, hook(KAT.empty), impure] + +endmodule + +module TEST + imports BASIC-K + imports TEST-SYNTAX + imports BOOL + imports K-EQUAL +// -------------------------------------------------------------------------------- +// Boolean Algebra Part of KAT + + syntax Kat ::= Bool + | "notKat" Kat [function, total, klabel(notKat_), symbol, smt-hook(not), group(boolOperation), hook(KAT.not)] + > Kat "andKat" Kat [function, total, klabel(_andKat_), symbol, left, smt-hook(and), group(boolOperation), hook(KAT.and)] + | Kat "orKat" Kat [function, total, klabel(_orKat_), left, smt-hook(or), group(boolOperation), hook(KAT.or)] + | Kat "=/=Kat" Kat [function, total, klabel(_=/=Kat_), symbol, left, smt-hook(distinct), hook(KAT.ne)] + //| Kat "impliesKat" Kat [function, total, klabel(_impliesKat_), symbol, left, smt-hook(=>), group(boolOperation), hook(KAT.implies)] + + syntax Bool ::= Kat "==Kat" Kat [function, total, klabel(_==Kat_), symbol, left, smt-hook(=), hook(KAT.eq)] + + + syntax Kat ::= freshKat(Kat) [freshGenerator, function] + rule freshKat(I:Kat) => I + + rule notKat ONE => ZERO + rule notKat ZERO => ONE + + rule ONE andKat B:Kat => B:Kat + rule B:Kat andKat ONE => B:Kat + rule ZERO andKat _:Kat => ZERO + rule _:Kat andKat ZERO => ZERO + + rule ONE orKat _:Kat => ONE + rule _:Kat orKat ONE => ONE + rule ZERO orKat B:Kat => B + rule B:Kat orKat ZERO => B + +/* + rule ONE impliesKat B:Kat => B + rule ZERO impliesKat _:Kat => ONE + rule _:Kat impliesKat ONE => ONE + rule B:Kat impliesKat ZERO => notKat B + +*/ + + + // ----------- MODIFICATIONS for KAT ---- + rule I1:Kat =/=Kat I2:Kat => notKat(I1 ==Kat I2) + rule B1:Kat ==Kat B2:Kat => (B1 ==K B2) + + rule true:Bool => ONE + rule false:Bool => ZERO + + // -------------------------------------------------------------------------------- + // Kleene Algebra Part of KAT + + +/* + syntax Kat ::= "(" Kat ")" [bracket] + > left: + Kat "Kat*" [function, klabel(_starKat), symbol, left, smtlib(ka_star), hook(KAT.mul)] + > left: + Kat "Kat;" Kat [function, klabel(_seqKat_), symbol, left, smtlib(ka_seq), hook(KAT.seq)] + > left: + Kat "Kat|" Kat [function, klabel(_pllKat_), symbol, left, smtlib(ka_pll), hook(KAT.pll)] + +*/ + + syntax Kat ::= "(" Kat ")" [bracket] + > left: + Kat "Kat*" [function, klabel(_starKat), symbol, left, smtlib(ka_star), hook(KAT.mul)] + | Kat "Kat;" Kat [function, klabel(_seqKat_), symbol, left, smtlib(ka_seq), hook(KAT.seq)] + | Kat "Kat|" Kat [function, klabel(_pllKat_), symbol, left, smtlib(ka_pll), hook(KAT.pll)] + + + rule ONE Kat; B:Kat => B:Kat + rule B:Kat Kat; ONE => B:Kat + rule ZERO Kat; _:Kat => ZERO + rule _:Kat Kat; ZERO => ZERO + + // general sequential operation; why shouldn't this be used? + // rule A:Kat Kat; B:Kat => A ~> B + + + rule ONE Kat| _:Kat => ONE + rule _:Kat Kat| ONE => ONE + rule ZERO Kat| B:Kat => B + rule B:Kat Kat| ZERO => B + + // Kleene-Star Operator: + + rule _B:Kat Kat* => .Kat + rule B:Kat Kat* => B + rule B:Kat Kat* => B Kat; (B Kat*) + + + +endmodule diff --git a/pyk/regression-new/issue-1760/test.k.out b/pyk/regression-new/issue-1760/test.k.out new file mode 100644 index 00000000000..98dcbb73cf5 --- /dev/null +++ b/pyk/regression-new/issue-1760/test.k.out @@ -0,0 +1,20 @@ +[Warning] Compiler: Non exhaustive match detected: `.Kat_TEST-SYNTAX_Kat`(.KList) + Source(test.k) + Location(8,18,8,67) + 8 | syntax Kat ::= ".Kat" [function, total, hook(KAT.empty), impure] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Warning] Compiler: Non exhaustive match detected: `notKat_`(_) + Source(test.k) + Location(21,19,21,135) + 21 | | "notKat" Kat [function, total, klabel(notKat_), symbol, smt-hook(not), group(boolOperation), hook(KAT.not)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Warning] Compiler: Non exhaustive match detected: `_andKat_`(_,_) + Source(test.k) + Location(22,19,22,141) + 22 | > Kat "andKat" Kat [function, total, klabel(_andKat_), symbol, left, smt-hook(and), group(boolOperation), hook(KAT.and)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Warning] Compiler: Non exhaustive match detected: `_orKat__TEST_Kat_Kat_Kat`(_,_) + Source(test.k) + Location(23,19,23,130) + 23 | | Kat "orKat" Kat [function, total, klabel(_orKat_), left, smt-hook(or), group(boolOperation), hook(KAT.or)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/issue-1789-rhsOr/Makefile b/pyk/regression-new/issue-1789-rhsOr/Makefile new file mode 100644 index 00000000000..484079896ad --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell llvm +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/issue-1789-rhsOr/haskell/0.test b/pyk/regression-new/issue-1789-rhsOr/haskell/0.test new file mode 100644 index 00000000000..3fbedf693b5 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/haskell/0.test @@ -0,0 +1 @@ +-2 diff --git a/pyk/regression-new/issue-1789-rhsOr/haskell/0.test.out b/pyk/regression-new/issue-1789-rhsOr/haskell/0.test.out new file mode 100644 index 00000000000..34345ec0ac1 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/haskell/0.test.out @@ -0,0 +1,3 @@ + + -1 ~> .K + diff --git a/pyk/regression-new/issue-1789-rhsOr/haskell/1.test b/pyk/regression-new/issue-1789-rhsOr/haskell/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/haskell/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-1789-rhsOr/haskell/1.test.out b/pyk/regression-new/issue-1789-rhsOr/haskell/1.test.out new file mode 100644 index 00000000000..36e7b68b492 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/haskell/1.test.out @@ -0,0 +1,3 @@ + + 1 ~> .K + diff --git a/pyk/regression-new/issue-1789-rhsOr/haskell/Makefile b/pyk/regression-new/issue-1789-rhsOr/haskell/Makefile new file mode 100644 index 00000000000..6e61cde3281 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/haskell/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-1789-rhsOr/haskell/test.k b/pyk/regression-new/issue-1789-rhsOr/haskell/test.k new file mode 100644 index 00000000000..d194f335596 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/haskell/test.k @@ -0,0 +1,29 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + imports BOOL + + configuration split($PGM:Int) + syntax Int ::= split(Int) [function, total] + + rule split(V:Int) + => + ( + ( + {true #Equals (V >=Int 0)} + #And V + ) + #Or + ( + {false #Equals (V >=Int 0)} + #And (V +Int 1) + ) + ) + [label(xyzzy)] + +endmodule diff --git a/pyk/regression-new/issue-1789-rhsOr/llvm/1.test b/pyk/regression-new/issue-1789-rhsOr/llvm/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/llvm/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-1789-rhsOr/llvm/1.test.out b/pyk/regression-new/issue-1789-rhsOr/llvm/1.test.out new file mode 100644 index 00000000000..57f40cfaa37 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/llvm/1.test.out @@ -0,0 +1,8 @@ + + + b ~> .K + + + bar ~> .K + + diff --git a/pyk/regression-new/issue-1789-rhsOr/llvm/2.test b/pyk/regression-new/issue-1789-rhsOr/llvm/2.test new file mode 100644 index 00000000000..0cfbf08886f --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/llvm/2.test @@ -0,0 +1 @@ +2 diff --git a/pyk/regression-new/issue-1789-rhsOr/llvm/2.test.out b/pyk/regression-new/issue-1789-rhsOr/llvm/2.test.out new file mode 100644 index 00000000000..5f618e770e7 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/llvm/2.test.out @@ -0,0 +1,8 @@ + + + b ~> .K + + + baz ~> .K + + diff --git a/pyk/regression-new/issue-1789-rhsOr/llvm/Makefile b/pyk/regression-new/issue-1789-rhsOr/llvm/Makefile new file mode 100644 index 00000000000..cd3b760aed1 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/llvm/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-1789-rhsOr/llvm/test.k b/pyk/regression-new/issue-1789-rhsOr/llvm/test.k new file mode 100644 index 00000000000..ab60c784a33 --- /dev/null +++ b/pyk/regression-new/issue-1789-rhsOr/llvm/test.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + syntax Exp ::= "a" | "b" | "bar" | "baz" + syntax Exp ::= Int +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + configuration $PGM:Exp + .K + + rule 1 => a + _ => bar + + rule 2 => a + _ => baz + + rule a => b ... + bar #Or baz + +endmodule diff --git a/pyk/regression-new/issue-1844-noPGM/Makefile b/pyk/regression-new/issue-1844-noPGM/Makefile new file mode 100644 index 00000000000..484079896ad --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell llvm +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/issue-1844-noPGM/haskell/Makefile b/pyk/regression-new/issue-1844-noPGM/haskell/Makefile new file mode 100644 index 00000000000..1995e288491 --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/haskell/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm b/pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm new file mode 120000 index 00000000000..15762b6f222 --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm @@ -0,0 +1 @@ +../krun.nopgm \ No newline at end of file diff --git a/pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm.out b/pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm.out new file mode 100644 index 00000000000..f5c5b1e7285 --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/haskell/krun.nopgm.out @@ -0,0 +1,3 @@ + + foo ~> .K + diff --git a/pyk/regression-new/issue-1844-noPGM/haskell/test.k b/pyk/regression-new/issue-1844-noPGM/haskell/test.k new file mode 120000 index 00000000000..660db8abbec --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/haskell/test.k @@ -0,0 +1 @@ +../test.k \ No newline at end of file diff --git a/pyk/regression-new/issue-1844-noPGM/krun.nopgm b/pyk/regression-new/issue-1844-noPGM/krun.nopgm new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/issue-1844-noPGM/llvm/Makefile b/pyk/regression-new/issue-1844-noPGM/llvm/Makefile new file mode 100644 index 00000000000..1f58868a936 --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm b/pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm new file mode 120000 index 00000000000..15762b6f222 --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm @@ -0,0 +1 @@ +../krun.nopgm \ No newline at end of file diff --git a/pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm.out b/pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm.out new file mode 100644 index 00000000000..f5c5b1e7285 --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/llvm/krun.nopgm.out @@ -0,0 +1,3 @@ + + foo ~> .K + diff --git a/pyk/regression-new/issue-1844-noPGM/llvm/test.k b/pyk/regression-new/issue-1844-noPGM/llvm/test.k new file mode 120000 index 00000000000..660db8abbec --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/llvm/test.k @@ -0,0 +1 @@ +../test.k \ No newline at end of file diff --git a/pyk/regression-new/issue-1844-noPGM/test.k b/pyk/regression-new/issue-1844-noPGM/test.k new file mode 100644 index 00000000000..9e8848f4a5b --- /dev/null +++ b/pyk/regression-new/issue-1844-noPGM/test.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BOOL + + syntax FOO ::= "foo" + configuration foo +endmodule diff --git a/pyk/regression-new/issue-1879-kproveTrans/Makefile b/pyk/regression-new/issue-1879-kproveTrans/Makefile new file mode 100644 index 00000000000..4a4a7fdf418 --- /dev/null +++ b/pyk/regression-new/issue-1879-kproveTrans/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/issue-1879-kproveTrans/haskell/Makefile b/pyk/regression-new/issue-1879-kproveTrans/haskell/Makefile new file mode 100644 index 00000000000..7b97065a1b7 --- /dev/null +++ b/pyk/regression-new/issue-1879-kproveTrans/haskell/Makefile @@ -0,0 +1,5 @@ +DEF=test +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k b/pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k new file mode 100644 index 00000000000..d09c9646eee --- /dev/null +++ b/pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST-SPEC + imports TEST + + claim runLemma(3 +Int 7) => doneLemma(10) ... + +endmodule diff --git a/pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k.out b/pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-1879-kproveTrans/haskell/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-1879-kproveTrans/haskell/test.k b/pyk/regression-new/issue-1879-kproveTrans/haskell/test.k new file mode 100644 index 00000000000..12594e4fbcb --- /dev/null +++ b/pyk/regression-new/issue-1879-kproveTrans/haskell/test.k @@ -0,0 +1,31 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports BOOL + imports INT + + configuration $PGM:KItem + + syntax KItem ::= runLemma ( Step ) | doneLemma ( Step ) + // ------------------------------------------------------- + rule runLemma(S) => doneLemma(S) ... + + syntax Step ::= Int + // ------------------- + + syntax FInt ::= FInt ( value: Int , one: Int ) [klabel(FInt), symbol] + // --------------------------------------------------------------------- + + syntax FInt ::= "0FInt" "(" Int ")" [macro] + // ------------------------------------------- + rule 0FInt(ONE) => FInt(0, ONE) + + syntax FInt ::= rdiv ( FInt , FInt ) [function] + // ----------------------------------------------- + rule rdiv(FI1, FI2) => 0FInt(one(FI1)) requires value(FI2) ==Int 0 + +endmodule diff --git a/pyk/regression-new/issue-1952/1.test b/pyk/regression-new/issue-1952/1.test new file mode 100644 index 00000000000..89f5485362f --- /dev/null +++ b/pyk/regression-new/issue-1952/1.test @@ -0,0 +1 @@ +decodeBytes("UTF-8", encodeBytes("UTF-8", "issue-1952")) ==String "issue-1952" diff --git a/pyk/regression-new/issue-1952/1.test.out b/pyk/regression-new/issue-1952/1.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/issue-1952/1.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/issue-1952/Makefile b/pyk/regression-new/issue-1952/Makefile new file mode 100644 index 00000000000..e08052a139b --- /dev/null +++ b/pyk/regression-new/issue-1952/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST +KOMPILE_BACKEND=haskell + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-1952/test.k b/pyk/regression-new/issue-1952/test.k new file mode 100644 index 00000000000..43db9c9ebcb --- /dev/null +++ b/pyk/regression-new/issue-1952/test.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BYTES-STRING-ENCODE + imports BOOL + imports STRING +endmodule diff --git a/pyk/regression-new/issue-2075-2/1.test b/pyk/regression-new/issue-2075-2/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/issue-2075-2/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/issue-2075-2/1.test.out b/pyk/regression-new/issue-2075-2/1.test.out new file mode 100644 index 00000000000..191b6a80a8b --- /dev/null +++ b/pyk/regression-new/issue-2075-2/1.test.out @@ -0,0 +1,5 @@ + + + 1 + ~> .K + diff --git a/pyk/regression-new/issue-2075-2/Makefile b/pyk/regression-new/issue-2075-2/Makefile new file mode 100644 index 00000000000..19bb2550c38 --- /dev/null +++ b/pyk/regression-new/issue-2075-2/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST --top-cell KCell + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-2075-2/test.k b/pyk/regression-new/issue-2075-2/test.k new file mode 100644 index 00000000000..0127165f5e5 --- /dev/null +++ b/pyk/regression-new/issue-2075-2/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + configuration $PGM:K + + configuration 1 + + rule _:Int => initBarCell ... +endmodule diff --git a/pyk/regression-new/issue-2075/1.test b/pyk/regression-new/issue-2075/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/issue-2075/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/issue-2075/1.test.out b/pyk/regression-new/issue-2075/1.test.out new file mode 100644 index 00000000000..95258ffdfef --- /dev/null +++ b/pyk/regression-new/issue-2075/1.test.out @@ -0,0 +1,10 @@ + + + + 1 + ~> .K + + + 0 + + diff --git a/pyk/regression-new/issue-2075/Makefile b/pyk/regression-new/issue-2075/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/issue-2075/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-2075/test.k b/pyk/regression-new/issue-2075/test.k new file mode 100644 index 00000000000..bf7343b6b63 --- /dev/null +++ b/pyk/regression-new/issue-2075/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + configuration $PGM:K + 0 + + configuration 1 + + rule I:Int => initBarCell ... + I +endmodule diff --git a/pyk/regression-new/issue-2114/Makefile b/pyk/regression-new/issue-2114/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/issue-2114/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-2114/test.k b/pyk/regression-new/issue-2114/test.k new file mode 100644 index 00000000000..a63a6eb1d47 --- /dev/null +++ b/pyk/regression-new/issue-2114/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports A +endmodule + +module A + imports B +endmodule + +module B + imports private C + rule foo() => .K +endmodule + +module C + syntax Foo ::= foo() +endmodule diff --git a/pyk/regression-new/issue-2142-markConcrete/Makefile b/pyk/regression-new/issue-2142-markConcrete/Makefile new file mode 100644 index 00000000000..81402e126f9 --- /dev/null +++ b/pyk/regression-new/issue-2142-markConcrete/Makefile @@ -0,0 +1,9 @@ +DEF=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST --concrete-rules SERIALIZATION.keccak +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2142-markConcrete/test-spec.k b/pyk/regression-new/issue-2142-markConcrete/test-spec.k new file mode 100644 index 00000000000..aca223379e3 --- /dev/null +++ b/pyk/regression-new/issue-2142-markConcrete/test-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST-SPEC + imports TEST + + claim runLemma(keccak(_)) => doneLemma(0) ... + +endmodule diff --git a/pyk/regression-new/issue-2142-markConcrete/test-spec.k.out b/pyk/regression-new/issue-2142-markConcrete/test-spec.k.out new file mode 100644 index 00000000000..a3ac3a58e2a --- /dev/null +++ b/pyk/regression-new/issue-2142-markConcrete/test-spec.k.out @@ -0,0 +1,10 @@ + #Not ( { + 0 + #Equals + keccak ( _Gen0 ) + } ) +#And + + doneLemma ( keccak ( _Gen0 ) ) ~> _DotVar1 ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/issue-2142-markConcrete/test.k b/pyk/regression-new/issue-2142-markConcrete/test.k new file mode 100644 index 00000000000..da975299f67 --- /dev/null +++ b/pyk/regression-new/issue-2142-markConcrete/test.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module SERIALIZATION + imports INT + imports BYTES + + syntax Int ::= keccak ( Bytes ) [function, total, smtlib(smt_keccak)] + // -------------------------------------------------------------------------- + rule [keccak]: keccak(_) => 1 + +endmodule + +module TEST + imports SERIALIZATION + + syntax KItem ::= runLemma ( Step ) | doneLemma ( Step ) + // ------------------------------------------------------- + rule runLemma(S) => doneLemma(S) ... + + syntax Step ::= Int + // ------------------- + +endmodule diff --git a/pyk/regression-new/issue-2146-duplicateModules/Makefile b/pyk/regression-new/issue-2146-duplicateModules/Makefile new file mode 100644 index 00000000000..bfaeab40790 --- /dev/null +++ b/pyk/regression-new/issue-2146-duplicateModules/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +%.k %.md: dummy + $(KOMPILE) $(KOMPILE_FLAGS) --backend $(KOMPILE_BACKEND) $(DEBUG_FAIL) $@ --output-definition $(DEF)-kompiled 2>&1 | sed '1s!Source.*!Source...!' | sed 's!'`pwd`'/\(\./\)\{0,2\}!!g' $(CHECK) $@.out $(CHECK2) + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-2146-duplicateModules/test.k b/pyk/regression-new/issue-2146-duplicateModules/test.k new file mode 100644 index 00000000000..e719a84df84 --- /dev/null +++ b/pyk/regression-new/issue-2146-duplicateModules/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module LIST + +endmodule + +module TEST + imports LIST +endmodule diff --git a/pyk/regression-new/issue-2146-duplicateModules/test.k.out b/pyk/regression-new/issue-2146-duplicateModules/test.k.out new file mode 100644 index 00000000000..c89e57a5028 --- /dev/null +++ b/pyk/regression-new/issue-2146-duplicateModules/test.k.out @@ -0,0 +1,9 @@ +[Error] Outer Parser: Module LIST differs from previous declaration at Source... + Source(test.k) + Location(2,1,4,10) + . v~~~~~~~~~~ + 2 | module LIST + 3 | + 4 | endmodule + . ~~~~~~~~^ +[Error] Outer Parser: Had 1 outer parsing errors. diff --git a/pyk/regression-new/issue-2174-kprovexParseError/Makefile b/pyk/regression-new/issue-2174-kprovexParseError/Makefile new file mode 100644 index 00000000000..bf2664f4785 --- /dev/null +++ b/pyk/regression-new/issue-2174-kprovexParseError/Makefile @@ -0,0 +1,9 @@ +DEF=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST +KOMPILE_BACKEND=haskell +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2174-kprovexParseError/test-spec.k b/pyk/regression-new/issue-2174-kprovexParseError/test-spec.k new file mode 100644 index 00000000000..46cc2232a6a --- /dev/null +++ b/pyk/regression-new/issue-2174-kprovexParseError/test-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST-SPEC + imports TEST + + claim asdf ... + +endmodule diff --git a/pyk/regression-new/issue-2174-kprovexParseError/test-spec.k.out b/pyk/regression-new/issue-2174-kprovexParseError/test-spec.k.out new file mode 100644 index 00000000000..b46f0d9269d --- /dev/null +++ b/pyk/regression-new/issue-2174-kprovexParseError/test-spec.k.out @@ -0,0 +1,6 @@ +[Error] Inner Parser: Parse error: unexpected token '...' following token 'asdf'. + Source(test-spec.k) + Location(8,20,8,23) + 8 | claim asdf ... + . ^~~ +[Error] Compiler: Had 1 parsing errors. diff --git a/pyk/regression-new/issue-2174-kprovexParseError/test.k b/pyk/regression-new/issue-2174-kprovexParseError/test.k new file mode 100644 index 00000000000..da975299f67 --- /dev/null +++ b/pyk/regression-new/issue-2174-kprovexParseError/test.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module SERIALIZATION + imports INT + imports BYTES + + syntax Int ::= keccak ( Bytes ) [function, total, smtlib(smt_keccak)] + // -------------------------------------------------------------------------- + rule [keccak]: keccak(_) => 1 + +endmodule + +module TEST + imports SERIALIZATION + + syntax KItem ::= runLemma ( Step ) | doneLemma ( Step ) + // ------------------------------------------------------- + rule runLemma(S) => doneLemma(S) ... + + syntax Step ::= Int + // ------------------- + +endmodule diff --git a/pyk/regression-new/issue-2273/Makefile b/pyk/regression-new/issue-2273/Makefile new file mode 100644 index 00000000000..53881e3d0f0 --- /dev/null +++ b/pyk/regression-new/issue-2273/Makefile @@ -0,0 +1,13 @@ +DEF=a +EXT=a +KAST_FLAGS+=--sort Foo --no-exc-wrap + +include ../include/ktest.mak + + +%.kast: kompile +ifeq ($(TESTDIR),$(RESULTDIR)) + $(KAST) $@ $(KAST_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) $(CHECK) $@.out +else + $(KAST) $@ $(KAST_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) $(CHECK) $(RESULTDIR)/$(notdir $@).out +endif diff --git a/pyk/regression-new/issue-2273/a.k b/pyk/regression-new/issue-2273/a.k new file mode 100644 index 00000000000..400c79a0441 --- /dev/null +++ b/pyk/regression-new/issue-2273/a.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A-SYNTAX + imports DOMAINS-SYNTAX +endmodule + +module A + imports DOMAINS + rule I:Int => I in_keys(.Map) +endmodule diff --git a/pyk/regression-new/issue-2273/tests/1.a b/pyk/regression-new/issue-2273/tests/1.a new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-2273/tests/1.a @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-2273/tests/1.a.out b/pyk/regression-new/issue-2273/tests/1.a.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/issue-2273/tests/1.a.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/issue-2273/tests/kast-in1.kast b/pyk/regression-new/issue-2273/tests/kast-in1.kast new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/issue-2273/tests/kast-in1.kast @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/issue-2273/tests/kast-in1.kast.out b/pyk/regression-new/issue-2273/tests/kast-in1.kast.out new file mode 100644 index 00000000000..63a1926864f --- /dev/null +++ b/pyk/regression-new/issue-2273/tests/kast-in1.kast.out @@ -0,0 +1,5 @@ +[Error] Inner Parser: Could not find start symbol: Foo provided to kast CLI --sort + Source(tests/kast-in1.kast) + Location(1,1,1,2) + 1 | 1 + . ^ diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/Makefile b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/Makefile new file mode 100644 index 00000000000..280edb9c9b6 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k new file mode 100644 index 00000000000..22ad3d8d133 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + + rule (X +Int Y) +Int Z => Z +Int (X +Int Y) [simplification, symbolic(X), concrete(Y, Z)] + rule (X +Int Y) +Int Z => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + rule X +Int (Y +Int Z) => Z +Int (X +Int Y) [simplification, concrete(X, Y), symbolic(Z)] + rule X +Int (Y +Int Z) => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + rule final(n +Int M:Int) => 0 requires M >=Int 0 [simplification, concrete(M)] +endmodule + +module A1-SPEC + imports VERIFICATION + + claim [s1]: + run(5) => .K n => 0 + +endmodule diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k.out b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k new file mode 100644 index 00000000000..75a7d905305 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + + rule (X +Int Y) +Int Z => Z +Int (X +Int Y) [simplification, symbolic(X), concrete(Y, Z)] +endmodule + +module A2-SPEC + imports VERIFICATION + + claim [s1]: + run(5) => .K n => 0 + +endmodule diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k.out b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k.out new file mode 100644 index 00000000000..acf1216b897 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a2-spec.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Simplification rules expect function/functional/mlOp symbols at the top of the left hand side term. + Source(a2-spec.k) + Location(8,8,8,55) + 8 | rule (X +Int Y) +Int Z => Z +Int (X +Int Y) [simplification, symbolic(X), concrete(Y, Z)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k new file mode 100644 index 00000000000..d0366c666e6 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module A3-SPEC + imports TEST + + rule [unif-map]: { MAP [ K <- V ] #Equals MAP:Map [ K <- V' ] } => { V #Equals V' } [simplification] + + claim a => b MEM => MEM [ 3 <- ?C ] + ensures ?C <=Int 5 andBool 5 <=Int ?C +endmodule diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k.out b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a3-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k new file mode 100644 index 00000000000..53d7088a269 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" +// https://github.com/runtimeverification/k/issues/2587 + +module A4-SPEC + imports TEST + imports ML-SYNTAX + + claim c => 2 #And {3 #Equals n} + rule {n #Equals 3} => #Top [simplification, comm] // the comm attribute is stripped because it has a different meaning in the backend + // rule {3 #Equals n} => #Top [simplification] // should be generated by the above +endmodule diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k.out b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a4-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k new file mode 100644 index 00000000000..161080a8a05 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" +// https://github.com/runtimeverification/k/issues/2587 + +module A5-SPEC + imports TEST + imports ML-SYNTAX + + claim c => 2 #And n +Int n + rule n +Int n => #Top [simplification, comm] + // the comm attribute is stripped because it has a different meaning in the backend + // even if comm, the body is identical so we don't generate anything extra +endmodule diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k.out b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a5-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k new file mode 100644 index 00000000000..7e088198b95 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + + rule notAFunction => 1 [simplification] +endmodule + +module A6-SPEC + imports VERIFICATION + + claim [s1]: + run(5) => .K n => 0 + +endmodule diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k.out b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k.out new file mode 100644 index 00000000000..59b82fe8701 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/a6-spec.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Simplification rules expect function/functional/mlOp symbols at the top of the left hand side term. + Source(a6-spec.k) + Location(8,8,8,25) + 8 | rule notAFunction => 1 [simplification] + . ^~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/test.k b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/test.k new file mode 100644 index 00000000000..b8aedb3c847 --- /dev/null +++ b/pyk/regression-new/issue-2287-simpl-rules-in-kprovex/test.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + syntax Pgm ::= run(Int) +endmodule + +module TEST + imports DOMAINS + imports TEST-SYNTAX + configuration $PGM:Pgm 0 .Map + + syntax Int ::= final(Int) [function, total] + | "n" [function, total, no-evaluators] + syntax S ::= "notAFunction" | Int + | "a" | "b" | "c" + + rule run(0) => .K N:Int => final(N) + rule run(N:Int => N -Int 1) ... M:Int => M +Int 1 + requires N >Int 0 andBool N %Int 2 ==Int 0 + rule run(N:Int => N -Int 1) ... M:Int => 1 +Int M + requires N >Int 0 andBool N %Int 2 ==Int 1 + + rule a => b MEM => MEM [ 3 <- 5 ] + rule c => 2 +endmodule diff --git a/pyk/regression-new/issue-2315-id-quotes/1.test b/pyk/regression-new/issue-2315-id-quotes/1.test new file mode 100644 index 00000000000..9daeafb9864 --- /dev/null +++ b/pyk/regression-new/issue-2315-id-quotes/1.test @@ -0,0 +1 @@ +test diff --git a/pyk/regression-new/issue-2315-id-quotes/1.test.out b/pyk/regression-new/issue-2315-id-quotes/1.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/issue-2315-id-quotes/1.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/issue-2315-id-quotes/2.test b/pyk/regression-new/issue-2315-id-quotes/2.test new file mode 100644 index 00000000000..180cf832802 --- /dev/null +++ b/pyk/regression-new/issue-2315-id-quotes/2.test @@ -0,0 +1 @@ +test2 diff --git a/pyk/regression-new/issue-2315-id-quotes/2.test.out b/pyk/regression-new/issue-2315-id-quotes/2.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/issue-2315-id-quotes/2.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/issue-2315-id-quotes/Makefile b/pyk/regression-new/issue-2315-id-quotes/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/issue-2315-id-quotes/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-2315-id-quotes/test.k b/pyk/regression-new/issue-2315-id-quotes/test.k new file mode 100644 index 00000000000..321ba8878c7 --- /dev/null +++ b/pyk/regression-new/issue-2315-id-quotes/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports ID + imports BOOL + imports K-EQUAL + imports STRING + imports INT + + syntax Bool ::= "test" [function] + | "test2" [function] + + // Evaluates to true if the Id constructed by String2Id contains extra quotes + rule test => String2Id("x") ==K #token("\"x\"", "Id") + + // Test that hooks producing a result of sort String are wrapped + rule test2 => Int2String(2) ==K "2" +endmodule diff --git a/pyk/regression-new/issue-2321-kprovexCrash/Makefile b/pyk/regression-new/issue-2321-kprovexCrash/Makefile new file mode 100644 index 00000000000..994a5810d71 --- /dev/null +++ b/pyk/regression-new/issue-2321-kprovexCrash/Makefile @@ -0,0 +1,9 @@ +DEF=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2321-kprovexCrash/test-spec.k b/pyk/regression-new/issue-2321-kprovexCrash/test-spec.k new file mode 100644 index 00000000000..ba5716e7808 --- /dev/null +++ b/pyk/regression-new/issue-2321-kprovexCrash/test-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST-SPEC + imports TEST + + claim + #assert i ( 1 , 0 ) ==Int 0 => .K + requires true #And ( #Forall X. { i ( X, 0 ) #Equals 0 } ) + +endmodule diff --git a/pyk/regression-new/issue-2321-kprovexCrash/test-spec.k.out b/pyk/regression-new/issue-2321-kprovexCrash/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2321-kprovexCrash/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2321-kprovexCrash/test.k b/pyk/regression-new/issue-2321-kprovexCrash/test.k new file mode 100644 index 00000000000..4a1a3043d98 --- /dev/null +++ b/pyk/regression-new/issue-2321-kprovexCrash/test.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BOOL + imports INT + + syntax Exp ::= Int | Bool + | pair(Int, Int) [klabel(pair), symbol] + + syntax KItem ::= "#assume" Exp [klabel(assume), symbol] + rule #assume true => .K + rule #assume false => #Bottom + + syntax KItem ::= "#assert" Exp [klabel(assert), symbol] + | "#fail" + rule #assert true => .K + rule #assert false => #fail + +// Uninterpreted functions + syntax Int ::= i(Int, Int) [function, total, no-evaluators, smtlib(fi), klabel(i)] +endmodule diff --git a/pyk/regression-new/issue-2356-koreDecode/1.test b/pyk/regression-new/issue-2356-koreDecode/1.test new file mode 100644 index 00000000000..4a4a9f24166 --- /dev/null +++ b/pyk/regression-new/issue-2356-koreDecode/1.test @@ -0,0 +1 @@ +#fail , ?_0 , _V_9 , ^-_<>& \ No newline at end of file diff --git a/pyk/regression-new/issue-2356-koreDecode/1.test.out b/pyk/regression-new/issue-2356-koreDecode/1.test.out new file mode 100644 index 00000000000..6b98532dbb7 --- /dev/null +++ b/pyk/regression-new/issue-2356-koreDecode/1.test.out @@ -0,0 +1,3 @@ + + #fail , ?_0 , _V_9 , ^-_<>& , .Exps ~> .K + diff --git a/pyk/regression-new/issue-2356-koreDecode/Makefile b/pyk/regression-new/issue-2356-koreDecode/Makefile new file mode 100644 index 00000000000..c9683103752 --- /dev/null +++ b/pyk/regression-new/issue-2356-koreDecode/Makefile @@ -0,0 +1,10 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KAST_FLAGS=-i kore -o pretty + +include ../include/ktest.mak + +result2.kore.kast: kompile + ${K_BIN}/kore-print result.kore.kast $(CHECK) result.kore.kast.out diff --git a/pyk/regression-new/issue-2356-koreDecode/result.kore.kast b/pyk/regression-new/issue-2356-koreDecode/result.kore.kast new file mode 100644 index 00000000000..5c2a77c1802 --- /dev/null +++ b/pyk/regression-new/issue-2356-koreDecode/result.kore.kast @@ -0,0 +1,37 @@ +/* Fl Fn D Sfa Cl */ +Lbl'-LT-'generatedTop'-GT-'{}( + /* Fl Fn D Sfa Cl */ + Lbl'-LT-'k'-GT-'{}( + /* Fl Fn D Sfa Cl */ + kseq{}( + /* Fl Fn D Sfa Cli */ + /* Inj: */ inj{SortExps{}, SortKItem{}}( + /* Fl Fn D Sfa Cl */ + Lbl'UndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps{}( + /* Fl Fn D Sfa Cl */ + Lbl'Hash'fail'Unds'TEST-SYNTAX'Unds'Exp{}(), + /* Fl Fn D Sfa Cl */ + Lbl'UndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps{}( + /* Fl Fn D Sfa Cl */ + Lbl'QuesUnds'0'Unds'TEST-SYNTAX'Unds'Exp{}(), + /* Fl Fn D Sfa Cl */ + Lbl'UndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps{}( + /* Fl Fn D Sfa Cl */ + Lbl'Unds'V'Unds'9'Unds'TEST-SYNTAX'Unds'Exp{}(), + /* Fl Fn D Sfa Cl */ + Lbl'UndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps{}( + /* Fl Fn D Sfa Cl */ + Lbl'Xor-'-'Unds-LT--GT-And-Unds'TEST-SYNTAX'Unds'Exp{}(), + /* Fl Fn D Sfa Cl */ + Lbl'Stop'List'LBraQuotUndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps'QuotRBraUnds'Exps{}() + ) + ) + ) + ) + ), + /* Fl Fn D Sfa Cl */ dotk{}() + ) + ), + /* Fl Fn D Sfa Cl */ + Lbl'-LT-'generatedCounter'-GT-'{}(/* Fl Fn D Sfa Cl */ \dv{SortInt{}}("0")) +) diff --git a/pyk/regression-new/issue-2356-koreDecode/result.kore.kast.out b/pyk/regression-new/issue-2356-koreDecode/result.kore.kast.out new file mode 100644 index 00000000000..6b98532dbb7 --- /dev/null +++ b/pyk/regression-new/issue-2356-koreDecode/result.kore.kast.out @@ -0,0 +1,3 @@ + + #fail , ?_0 , _V_9 , ^-_<>& , .Exps ~> .K + diff --git a/pyk/regression-new/issue-2356-koreDecode/result2.kore.kast b/pyk/regression-new/issue-2356-koreDecode/result2.kore.kast new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/issue-2356-koreDecode/test.k b/pyk/regression-new/issue-2356-koreDecode/test.k new file mode 100644 index 00000000000..323fc7541b8 --- /dev/null +++ b/pyk/regression-new/issue-2356-koreDecode/test.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + syntax Exps ::= List{Exp,","} + + syntax Exp ::= "#fail" | "?_0" | "_V_9" | "^-_<>&" +endmodule + +module TEST + imports TEST-SYNTAX + configuration $PGM:Exps +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/Makefile b/pyk/regression-new/issue-2812-kprove-filter-claims/Makefile new file mode 100644 index 00000000000..99ac9266ab6 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=$(filter-out Makefile, $(wildcard *)) +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/claims/Makefile b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/Makefile new file mode 100644 index 00000000000..51609d1ccb5 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. +KPROVE_FLAGS+=--claims VERIFICATION.s1 + +include ../../../../include/kframework/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k new file mode 100644 index 00000000000..89cd472ce5b --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + + rule (X +Int Y) +Int Z => Z +Int (X +Int Y) [simplification, symbolic(X), concrete(Y, Z)] + rule (X +Int Y) +Int Z => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + rule X +Int (Y +Int Z) => Z +Int (X +Int Y) [simplification, concrete(X, Y), symbolic(Z)] + rule X +Int (Y +Int Z) => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + rule final(n +Int M:Int) => 0 requires M >=Int 0 [simplification, concrete(M)] + + claim [s1]: + run(5) => .K n => 0 + +endmodule + +module A1-SPEC + imports VERIFICATION + +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k.out b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k new file mode 100644 index 00000000000..254dd000d1c --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + rule [s1]: notAFunction => 1 [simplification] + + claim run(5) => .K n => 0 +endmodule + +module A2-SPEC + imports VERIFICATION +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k.out b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k.out new file mode 100644 index 00000000000..cb8c4112977 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/a2-spec.k.out @@ -0,0 +1 @@ +[Error] Critical: Unused filtering labels: [VERIFICATION.s1] diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/claims/test.k b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/test.k new file mode 100644 index 00000000000..b8aedb3c847 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/claims/test.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + syntax Pgm ::= run(Int) +endmodule + +module TEST + imports DOMAINS + imports TEST-SYNTAX + configuration $PGM:Pgm 0 .Map + + syntax Int ::= final(Int) [function, total] + | "n" [function, total, no-evaluators] + syntax S ::= "notAFunction" | Int + | "a" | "b" | "c" + + rule run(0) => .K N:Int => final(N) + rule run(N:Int => N -Int 1) ... M:Int => M +Int 1 + requires N >Int 0 andBool N %Int 2 ==Int 0 + rule run(N:Int => N -Int 1) ... M:Int => 1 +Int M + requires N >Int 0 andBool N %Int 2 ==Int 1 + + rule a => b MEM => MEM [ 3 <- 5 ] + rule c => 2 +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/Makefile b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/Makefile new file mode 100644 index 00000000000..c6bcabd1fc1 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. +KPROVE_FLAGS+=--exclude VERIFICATION.fail1 --exclude VERIFICATION.fail2 + +include ../../../../include/kframework/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k new file mode 100644 index 00000000000..a39c83d4ead --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + + rule (X +Int Y) +Int Z => Z +Int (X +Int Y) [simplification, symbolic(X), concrete(Y, Z)] + rule (X +Int Y) +Int Z => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + rule X +Int (Y +Int Z) => Z +Int (X +Int Y) [simplification, concrete(X, Y), symbolic(Z)] + rule X +Int (Y +Int Z) => Y +Int (X +Int Z) [simplification, concrete(X, Z), symbolic(Y)] + rule final(n +Int M:Int) => 0 requires M >=Int 0 [simplification, concrete(M)] + + claim [pass1]: + run(5) => .K n => 0 + claim [fail1]: 1 => 2 + claim [fail2]: 1 => 3 + +endmodule + +module A1-SPEC + imports VERIFICATION + +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k.out b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/a1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/test.k b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/test.k new file mode 100644 index 00000000000..b8aedb3c847 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/exclude/test.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + syntax Pgm ::= run(Int) +endmodule + +module TEST + imports DOMAINS + imports TEST-SYNTAX + configuration $PGM:Pgm 0 .Map + + syntax Int ::= final(Int) [function, total] + | "n" [function, total, no-evaluators] + syntax S ::= "notAFunction" | Int + | "a" | "b" | "c" + + rule run(0) => .K N:Int => final(N) + rule run(N:Int => N -Int 1) ... M:Int => M +Int 1 + requires N >Int 0 andBool N %Int 2 ==Int 0 + rule run(N:Int => N -Int 1) ... M:Int => 1 +Int M + requires N >Int 0 andBool N %Int 2 ==Int 1 + + rule a => b MEM => MEM [ 3 <- 5 ] + rule c => 2 +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/Makefile b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/Makefile new file mode 100644 index 00000000000..87ad4facbb3 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. +KPROVE_FLAGS+=--trusted VERIFICATION.s1 + +include ../../../../include/kframework/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k new file mode 100644 index 00000000000..34bb6b7d4a5 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + + +module VERIFICATION + imports TEST + + claim [s1]: + 1 => 2 // should fail but marked as trusted whould pass + +endmodule + +module A1-SPEC + imports VERIFICATION + +endmodule diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k.out b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/a1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/test.k b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/test.k new file mode 100644 index 00000000000..b8aedb3c847 --- /dev/null +++ b/pyk/regression-new/issue-2812-kprove-filter-claims/trusted/test.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports DOMAINS-SYNTAX + syntax Pgm ::= run(Int) +endmodule + +module TEST + imports DOMAINS + imports TEST-SYNTAX + configuration $PGM:Pgm 0 .Map + + syntax Int ::= final(Int) [function, total] + | "n" [function, total, no-evaluators] + syntax S ::= "notAFunction" | Int + | "a" | "b" | "c" + + rule run(0) => .K N:Int => final(N) + rule run(N:Int => N -Int 1) ... M:Int => M +Int 1 + requires N >Int 0 andBool N %Int 2 ==Int 0 + rule run(N:Int => N -Int 1) ... M:Int => 1 +Int M + requires N >Int 0 andBool N %Int 2 ==Int 1 + + rule a => b MEM => MEM [ 3 <- 5 ] + rule c => 2 +endmodule diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/Makefile b/pyk/regression-new/issue-2909-allow-anywhere-haskell/Makefile new file mode 100644 index 00000000000..499a5de9c65 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=check haskell llvm +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/Makefile b/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/Makefile new file mode 100644 index 00000000000..9d30a022e07 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/Makefile @@ -0,0 +1,4 @@ +KOMPILE_FLAGS=-w2e -w all --allow-anywhere-haskell --syntax-module TEST +KOMPILE_BACKEND=haskell + +include ../../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k b/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k new file mode 100644 index 00000000000..c3509066a8e --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + rule 1 => 2 [anywhere] +endmodule diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k.out b/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k.out new file mode 100644 index 00000000000..7d1767e2afb --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/check/test.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Removed anywhere rule for Haskell backend execution; this may change the behavior of your code. + Source(test.k) + Location(5,8,5,14) + 5 | rule 1 => 2 [anywhere] + . ^~~~~~ diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test new file mode 100644 index 00000000000..eb28ef4401b --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test @@ -0,0 +1 @@ +foo() diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test.out b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test.out new file mode 100644 index 00000000000..3128e931236 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/1.test.out @@ -0,0 +1,3 @@ + + baz ( ) ~> .K + diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/Makefile b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/Makefile new file mode 100644 index 00000000000..f0fb4349c51 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST --allow-anywhere-haskell -w none + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/test.k b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/test.k new file mode 100644 index 00000000000..ecbdbbfc091 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/haskell/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + syntax Foo ::= foo() | bar() | baz() + + rule foo() => bar() [anywhere, priority(20)] + rule foo() => baz() +endmodule diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test new file mode 100644 index 00000000000..eb28ef4401b --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test @@ -0,0 +1 @@ +foo() diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test.out b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test.out new file mode 100644 index 00000000000..a7b2838a785 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/1.test.out @@ -0,0 +1,3 @@ + + bar ( ) ~> .K + diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/Makefile b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/Makefile new file mode 100644 index 00000000000..27691b6a095 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST --allow-anywhere-haskell -w none + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/test.k b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/test.k new file mode 100644 index 00000000000..ecbdbbfc091 --- /dev/null +++ b/pyk/regression-new/issue-2909-allow-anywhere-haskell/llvm/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + syntax Foo ::= foo() | bar() | baz() + + rule foo() => bar() [anywhere, priority(20)] + rule foo() => baz() +endmodule diff --git a/pyk/regression-new/issue-3035-antileft/Makefile b/pyk/regression-new/issue-3035-antileft/Makefile new file mode 100644 index 00000000000..63c65635864 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=llvm haskell +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/issue-3035-antileft/haskell/1.test b/pyk/regression-new/issue-3035-antileft/haskell/1.test new file mode 100644 index 00000000000..828b6467540 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/1.test @@ -0,0 +1 @@ +foo(1) diff --git a/pyk/regression-new/issue-3035-antileft/haskell/1.test.out b/pyk/regression-new/issue-3035-antileft/haskell/1.test.out new file mode 100644 index 00000000000..a7b2838a785 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/1.test.out @@ -0,0 +1,3 @@ + + bar ( ) ~> .K + diff --git a/pyk/regression-new/issue-3035-antileft/haskell/2.test b/pyk/regression-new/issue-3035-antileft/haskell/2.test new file mode 100644 index 00000000000..c031825f72f --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/2.test @@ -0,0 +1 @@ +foo(0) diff --git a/pyk/regression-new/issue-3035-antileft/haskell/2.test.out b/pyk/regression-new/issue-3035-antileft/haskell/2.test.out new file mode 100644 index 00000000000..3128e931236 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/2.test.out @@ -0,0 +1,3 @@ + + baz ( ) ~> .K + diff --git a/pyk/regression-new/issue-3035-antileft/haskell/3.test b/pyk/regression-new/issue-3035-antileft/haskell/3.test new file mode 100644 index 00000000000..6b298828ee3 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/3.test @@ -0,0 +1 @@ +foo(-10) diff --git a/pyk/regression-new/issue-3035-antileft/haskell/3.test.out b/pyk/regression-new/issue-3035-antileft/haskell/3.test.out new file mode 100644 index 00000000000..4c47f811c60 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/3.test.out @@ -0,0 +1,3 @@ + + foo ( -10 ) ~> .K + diff --git a/pyk/regression-new/issue-3035-antileft/haskell/Makefile b/pyk/regression-new/issue-3035-antileft/haskell/Makefile new file mode 100644 index 00000000000..1995e288491 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-3035-antileft/haskell/test.k b/pyk/regression-new/issue-3035-antileft/haskell/test.k new file mode 100644 index 00000000000..9008ebf695d --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/haskell/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BOOL + imports INT + + syntax Foo ::= foo(Int) | bar() | baz() + + rule foo(I) => bar() requires I >Int 0 [priority(40)] + rule foo(I) => baz() requires I >=Int 0 [priority(60)] +endmodule diff --git a/pyk/regression-new/issue-3035-antileft/llvm/1.test b/pyk/regression-new/issue-3035-antileft/llvm/1.test new file mode 100644 index 00000000000..828b6467540 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/1.test @@ -0,0 +1 @@ +foo(1) diff --git a/pyk/regression-new/issue-3035-antileft/llvm/1.test.out b/pyk/regression-new/issue-3035-antileft/llvm/1.test.out new file mode 100644 index 00000000000..a7b2838a785 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/1.test.out @@ -0,0 +1,3 @@ + + bar ( ) ~> .K + diff --git a/pyk/regression-new/issue-3035-antileft/llvm/2.test b/pyk/regression-new/issue-3035-antileft/llvm/2.test new file mode 100644 index 00000000000..c031825f72f --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/2.test @@ -0,0 +1 @@ +foo(0) diff --git a/pyk/regression-new/issue-3035-antileft/llvm/2.test.out b/pyk/regression-new/issue-3035-antileft/llvm/2.test.out new file mode 100644 index 00000000000..3128e931236 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/2.test.out @@ -0,0 +1,3 @@ + + baz ( ) ~> .K + diff --git a/pyk/regression-new/issue-3035-antileft/llvm/3.test b/pyk/regression-new/issue-3035-antileft/llvm/3.test new file mode 100644 index 00000000000..6b298828ee3 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/3.test @@ -0,0 +1 @@ +foo(-10) diff --git a/pyk/regression-new/issue-3035-antileft/llvm/3.test.out b/pyk/regression-new/issue-3035-antileft/llvm/3.test.out new file mode 100644 index 00000000000..e622a7befef --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/3.test.out @@ -0,0 +1,3 @@ + + #foo ( -10 ) ~> .K + diff --git a/pyk/regression-new/issue-3035-antileft/llvm/Makefile b/pyk/regression-new/issue-3035-antileft/llvm/Makefile new file mode 100644 index 00000000000..1f58868a936 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/issue-3035-antileft/llvm/test.k b/pyk/regression-new/issue-3035-antileft/llvm/test.k new file mode 100644 index 00000000000..922c1f72436 --- /dev/null +++ b/pyk/regression-new/issue-3035-antileft/llvm/test.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BOOL + imports INT + + syntax Foo ::= foo(Int) | #foo(Int) | bar() | baz() + + rule foo(I) => #foo(I) + rule #foo(I) => bar() requires I >Int 0 [priority(40)] + rule #foo(I) => baz() requires I >=Int 0 [priority(60)] +endmodule diff --git a/pyk/regression-new/issue-313/Makefile b/pyk/regression-new/issue-313/Makefile new file mode 100644 index 00000000000..7d52aa208a5 --- /dev/null +++ b/pyk/regression-new/issue-313/Makefile @@ -0,0 +1 @@ +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-313/test.k b/pyk/regression-new/issue-313/test.k new file mode 100644 index 00000000000..2a1570e3b02 --- /dev/null +++ b/pyk/regression-new/issue-313/test.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST +imports DOMAINS + +configuration + $PGM:Exp + + 0 + + + 1 + + +syntax Exp ::= "bar" | Int +rule bar => 10 + + 0 + ... + +endmodule diff --git a/pyk/regression-new/issue-313/test.k.out b/pyk/regression-new/issue-313/test.k.out new file mode 100644 index 00000000000..77ca3d29192 --- /dev/null +++ b/pyk/regression-new/issue-313/test.k.out @@ -0,0 +1,5 @@ +[Error] Compiler: Expected to find sort FooCell in the children of cell with klabel + while executing phase "concretizing configuration" on sentence at + Source(test.k) + Location(16,6,20,17) +[Warning] Compiler: Could not find main syntax module with name TEST-SYNTAX in definition. Use --syntax-module to specify one. Using TEST as default. diff --git a/pyk/regression-new/issue-3285-nonexistent-concrete-rule/Makefile b/pyk/regression-new/issue-3285-nonexistent-concrete-rule/Makefile new file mode 100644 index 00000000000..fd1043a5f53 --- /dev/null +++ b/pyk/regression-new/issue-3285-nonexistent-concrete-rule/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. +KOMPILE_FLAGS+=--concrete-rules "FAKE.fake,TEST.assoc,TEST.fake,TEST.distrib" + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k b/pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k new file mode 100644 index 00000000000..6b8cb509cf4 --- /dev/null +++ b/pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX +imports INT-SYNTAX +syntax Exp ::= Int + | Exp "+" Exp + | Exp "*" Exp +endmodule + +module TEST +imports TEST-SYNTAX +imports INT + +rule [assoc]: (X + Y) + Z => X + (Y + Z) +rule [distrib]: X * (Y + Z) => (X * Y) + (X * Z) + +endmodule \ No newline at end of file diff --git a/pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k.out b/pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k.out new file mode 100644 index 00000000000..4218628a2d1 --- /dev/null +++ b/pyk/regression-new/issue-3285-nonexistent-concrete-rule/test.k.out @@ -0,0 +1 @@ +[Error] Critical: Unused concrete rule labels: [FAKE.fake, TEST.fake] diff --git a/pyk/regression-new/issue-3385/Makefile b/pyk/regression-new/issue-3385/Makefile new file mode 100644 index 00000000000..eb6bcc03f17 --- /dev/null +++ b/pyk/regression-new/issue-3385/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS+=--syntax-module TEST --concrete-rules "TEST.f-of-a-is-b" + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-3385/test.k b/pyk/regression-new/issue-3385/test.k new file mode 100644 index 00000000000..76a454b1c7c --- /dev/null +++ b/pyk/regression-new/issue-3385/test.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports K-EQUAL + syntax Thing ::= "a" [token] + | "b" [token] + | "c" [token] + syntax Thing ::= f ( Thing ) [ function, total ] + + rule [f-of-a-is-b] : f(A) => b requires A ==K a // [concrete] + rule [f-otherwise] : f(_) => c [owise] +endmodule diff --git a/pyk/regression-new/issue-3385/test.k.out b/pyk/regression-new/issue-3385/test.k.out new file mode 100644 index 00000000000..496234940b6 --- /dev/null +++ b/pyk/regression-new/issue-3385/test.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: Found concrete attribute without simplification attribute on function with one or more non-concrete rules. + Source(test.k) + Location(9,24,9,50) + 9 | rule [f-of-a-is-b] : f(A) => b requires A ==K a // [concrete] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/issue-3446/Makefile b/pyk/regression-new/issue-3446/Makefile new file mode 100644 index 00000000000..7d52aa208a5 --- /dev/null +++ b/pyk/regression-new/issue-3446/Makefile @@ -0,0 +1 @@ +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-3446/a.kast b/pyk/regression-new/issue-3446/a.kast new file mode 100644 index 00000000000..f46d387bf94 --- /dev/null +++ b/pyk/regression-new/issue-3446/a.kast @@ -0,0 +1 @@ +( \ No newline at end of file diff --git a/pyk/regression-new/issue-3446/a.kast.out b/pyk/regression-new/issue-3446/a.kast.out new file mode 100644 index 00000000000..91278d962bb --- /dev/null +++ b/pyk/regression-new/issue-3446/a.kast.out @@ -0,0 +1,5 @@ +[Error] Inner Parser: Parse error: unexpected end of file following token '('. + Source(a.kast) + Location(1,2,1,2) + 1 | ( + . ^ diff --git a/pyk/regression-new/issue-3446/test.k b/pyk/regression-new/issue-3446/test.k new file mode 100644 index 00000000000..42a98e6ac81 --- /dev/null +++ b/pyk/regression-new/issue-3446/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX + syntax Pgm ::= "(" ")" +endmodule + +module TEST + imports TEST-SYNTAX +endmodule diff --git a/pyk/regression-new/issue-3446/test.k.out b/pyk/regression-new/issue-3446/test.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/issue-3450-kprove-fresh/Makefile b/pyk/regression-new/issue-3450-kprove-fresh/Makefile new file mode 100644 index 00000000000..55e04773355 --- /dev/null +++ b/pyk/regression-new/issue-3450-kprove-fresh/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k b/pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k new file mode 100644 index 00000000000..ab545b16b6d --- /dev/null +++ b/pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module EXPLICIT-SPEC + imports TEST + + claim quux => .K + .K => ?C + .K => ?C + GC => GC +Int 1 +endmodule diff --git a/pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k.out b/pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-3450-kprove-fresh/explicit-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k b/pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k new file mode 100644 index 00000000000..faa3ab4d4df --- /dev/null +++ b/pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module IMPLICIT-SPEC + imports TEST + + claim quux => .K + .K => ?C + .K => ?C +endmodule diff --git a/pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k.out b/pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/issue-3450-kprove-fresh/implicit-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/issue-3450-kprove-fresh/test.k b/pyk/regression-new/issue-3450-kprove-fresh/test.k new file mode 100644 index 00000000000..c30b52d6233 --- /dev/null +++ b/pyk/regression-new/issue-3450-kprove-fresh/test.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX + syntax Pgm ::= "quux" +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + configuration $PGM:Pgm + .K + .K + + rule quux => .K + .K => !C:Int + .K => !C:Int +endmodule diff --git a/pyk/regression-new/issue-3520-freshConfig/Makefile b/pyk/regression-new/issue-3520-freshConfig/Makefile new file mode 100644 index 00000000000..a9848a031c6 --- /dev/null +++ b/pyk/regression-new/issue-3520-freshConfig/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--enable-search +KRUN_FLAGS=--pattern " V:K " + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-3520-freshConfig/run.test b/pyk/regression-new/issue-3520-freshConfig/run.test new file mode 100644 index 00000000000..d44e18fb93b --- /dev/null +++ b/pyk/regression-new/issue-3520-freshConfig/run.test @@ -0,0 +1 @@ +start diff --git a/pyk/regression-new/issue-3520-freshConfig/run.test.out b/pyk/regression-new/issue-3520-freshConfig/run.test.out new file mode 100644 index 00000000000..96642dc1cde --- /dev/null +++ b/pyk/regression-new/issue-3520-freshConfig/run.test.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + done ~> .K +} diff --git a/pyk/regression-new/issue-3520-freshConfig/test.k b/pyk/regression-new/issue-3520-freshConfig/test.k new file mode 100644 index 00000000000..122cf7acb78 --- /dev/null +++ b/pyk/regression-new/issue-3520-freshConfig/test.k @@ -0,0 +1,68 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module OTHER-MODULE + imports INT + + configuration + + !_C:Int + !_:Int + + +endmodule + +module TEST-SYNTAX + + syntax Program ::= "start" | "done" + +endmodule + +module TEST + imports TEST-SYNTAX + imports BOOL + imports INT + imports LIST + imports OTHER-MODULE + + configuration + $PGM:Program + !_A:Int + !_A:Int + !_B:Int + !_:Int + + + syntax KItem ::= assertEqual( List ) + | assertEqual( Int, List ) + | assertNotEqual( List ) + | assertNotEqual( Int, List ) + + rule assertEqual( .List ) => .K + rule assertEqual( ListItem(X:Int) REST ) => assertEqual( X, REST ) ~> assertEqual( REST ) + + rule assertEqual( _, .List ) => .K + rule assertEqual( X, ListItem( X ) REST ) => assertEqual( X, REST ) + + rule assertNotEqual( .List ) => .K + rule assertNotEqual( ListItem(X:Int) REST ) => assertNotEqual( X, REST ) ~> assertNotEqual( REST ) + + rule assertNotEqual( _, .List ) => .K + rule assertNotEqual( X, ListItem( Y ) REST ) => assertNotEqual( X, REST ) requires X =/=Int Y + + rule start => !_A:Int + + rule A:Int + => assertEqual( ListItem( B ) ListItem( C ) ) + ~> assertNotEqual( ListItem( A ) ListItem( B ) ListItem( D ) ListItem( E ) ListItem( F ) ListItem( G ) ) + ~> done + ... + + B + C + D + E + + F + G + + +endmodule diff --git a/pyk/regression-new/issue-3604-counterCell/1.test b/pyk/regression-new/issue-3604-counterCell/1.test new file mode 100644 index 00000000000..56a6051ca2b --- /dev/null +++ b/pyk/regression-new/issue-3604-counterCell/1.test @@ -0,0 +1 @@ +1 \ No newline at end of file diff --git a/pyk/regression-new/issue-3604-counterCell/1.test.out b/pyk/regression-new/issue-3604-counterCell/1.test.out new file mode 100644 index 00000000000..bf27d10b0a5 --- /dev/null +++ b/pyk/regression-new/issue-3604-counterCell/1.test.out @@ -0,0 +1,8 @@ + + + 2 ~> .K + + + 4 + + diff --git a/pyk/regression-new/issue-3604-counterCell/Makefile b/pyk/regression-new/issue-3604-counterCell/Makefile new file mode 100644 index 00000000000..b46362c03c6 --- /dev/null +++ b/pyk/regression-new/issue-3604-counterCell/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-3604-counterCell/test.k b/pyk/regression-new/issue-3604-counterCell/test.k new file mode 100644 index 00000000000..89510d38670 --- /dev/null +++ b/pyk/regression-new/issue-3604-counterCell/test.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX +endmodule +module MIR-CONFIG + imports TEST-SYNTAX + configuration + $PGM:Int + 4 +endmodule +module TEST + imports TEST-SYNTAX + imports MIR-CONFIG + rule 1 => 2 +endmodule diff --git a/pyk/regression-new/issue-3647-debugTokens/Makefile b/pyk/regression-new/issue-3647-debugTokens/Makefile new file mode 100644 index 00000000000..ccb655ff627 --- /dev/null +++ b/pyk/regression-new/issue-3647-debugTokens/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KAST_FLAGS=--debug-tokens + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-3647-debugTokens/a.test.kast b/pyk/regression-new/issue-3647-debugTokens/a.test.kast new file mode 100644 index 00000000000..0d8c763edc3 --- /dev/null +++ b/pyk/regression-new/issue-3647-debugTokens/a.test.kast @@ -0,0 +1,14 @@ +1 + 2 + aaaaaaaaaaaa + + + + + + + + + + ++ 10000000 ++ "str" ++ "long str that breaks alighnment" diff --git a/pyk/regression-new/issue-3647-debugTokens/a.test.kast.out b/pyk/regression-new/issue-3647-debugTokens/a.test.kast.out new file mode 100644 index 00000000000..903a7ba1fd5 --- /dev/null +++ b/pyk/regression-new/issue-3647-debugTokens/a.test.kast.out @@ -0,0 +1,15 @@ +|"Match" | (location) | Terminal | +|---------------------------------------------------------------------------------|---------------|---------------------| +|"1" | (1,1,1,2) | r"[\\+-]?[0-9]+" | +|"+" | (1,3,1,4) | "+" | +|"2" | (1,5,1,6) | r"[\\+-]?[0-9]+" | +|"+" | (1,7,1,8) | "+" | +|"aaaaaaaaaaaa" | (1,9,1,21) | r"[a-z][a-zA-Z0-9]*"| +|"+" | (12,1,12,2) | "+" | +|"10000000" | (12,3,12,11) | r"[\\+-]?[0-9]+" | +|"+" | (13,1,13,2) | "+" | +|"\"str\"" | (13,3,13,8) | r"[\\\"](([^\\\"\\n\\r\\\\])|([\\\\][nrtf\\\"\\\\])|([\\\\][x][0-9a-fA-F]{2})|([\\\\][u][0-9a-fA-F]{4})|([\\\\][U][0-9a-fA-F]{8}))*[\\\"]"| +|"+" | (14,1,14,2) | "+" | +|"\"long str that breaks alighnment\"" | (14,3,14,103) | r"[\\\"](([^\\\"\\n\\r\\\\])|([\\\\][nrtf\\\"\\\\])|([\\\\][x][0-9a-fA-F]{2})|([\\\\][u][0-9a-fA-F]{4})|([\\\\][U][0-9a-fA-F]{8}))*[\\\"]"| +|"" | (15,1,15,1) | "" | + diff --git a/pyk/regression-new/issue-3647-debugTokens/b.test.kast b/pyk/regression-new/issue-3647-debugTokens/b.test.kast new file mode 100644 index 00000000000..f845bb7df41 --- /dev/null +++ b/pyk/regression-new/issue-3647-debugTokens/b.test.kast @@ -0,0 +1 @@ +1 + 2 + aaa diff --git a/pyk/regression-new/issue-3647-debugTokens/b.test.kast.out b/pyk/regression-new/issue-3647-debugTokens/b.test.kast.out new file mode 100644 index 00000000000..1525daf1bc8 --- /dev/null +++ b/pyk/regression-new/issue-3647-debugTokens/b.test.kast.out @@ -0,0 +1,9 @@ +|"Match" | (location) | Terminal | +|--------|------------|---------------------| +|"1" | (1,1,1,2) | r"[\\+-]?[0-9]+" | +|"+" | (1,3,1,4) | "+" | +|"2" | (1,5,1,6) | r"[\\+-]?[0-9]+" | +|"+" | (1,7,1,8) | "+" | +|"aaa" | (1,9,1,12) | r"[a-z][a-zA-Z0-9]*"| +|"" | (2,1,2,1) | "" | + diff --git a/pyk/regression-new/issue-3647-debugTokens/test.k b/pyk/regression-new/issue-3647-debugTokens/test.k new file mode 100644 index 00000000000..d86627086a1 --- /dev/null +++ b/pyk/regression-new/issue-3647-debugTokens/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX + imports INT-SYNTAX + imports ID-SYNTAX + imports STRING-SYNTAX + syntax Exp ::= Exp "+" Exp [left] | Int | Id | String +endmodule + +module TEST + imports TEST-SYNTAX + configuration $PGM:Exp + +endmodule diff --git a/pyk/regression-new/issue-3672-debugParse/Makefile b/pyk/regression-new/issue-3672-debugParse/Makefile new file mode 100644 index 00000000000..1968723661c --- /dev/null +++ b/pyk/regression-new/issue-3672-debugParse/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KAST_FLAGS=--debug-parse +PIPEFAIL= +CHECK=$(CONSIDER_ERRORS) $(REMOVE_PATHS) | diff - + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-3672-debugParse/a.test.kast b/pyk/regression-new/issue-3672-debugParse/a.test.kast new file mode 100644 index 00000000000..cd52da9e230 --- /dev/null +++ b/pyk/regression-new/issue-3672-debugParse/a.test.kast @@ -0,0 +1 @@ +1 ++ 2 diff --git a/pyk/regression-new/issue-3672-debugParse/a.test.kast.out b/pyk/regression-new/issue-3672-debugParse/a.test.kast.out new file mode 100644 index 00000000000..b956ca56a31 --- /dev/null +++ b/pyk/regression-new/issue-3672-debugParse/a.test.kast.out @@ -0,0 +1,11 @@ +[Error] Inner Parser: Parse error: unexpected token '+' following token '+'. +Additional parsing diagnostic information: + Attempting to apply production: + syntax Exp ::= Exp "+" Exp + produced partial term: + `_+__TEST-SYNTAX_Exp_Exp_Exp`(#token("1","Int")) + + Source(a.test.kast) + Location(1,4,1,5) + 1 | 1 ++ 2 + . ^ diff --git a/pyk/regression-new/issue-3672-debugParse/b.test.kast b/pyk/regression-new/issue-3672-debugParse/b.test.kast new file mode 100644 index 00000000000..46983123c98 --- /dev/null +++ b/pyk/regression-new/issue-3672-debugParse/b.test.kast @@ -0,0 +1 @@ +1 + 5 * a / 2 diff --git a/pyk/regression-new/issue-3672-debugParse/b.test.kast.out b/pyk/regression-new/issue-3672-debugParse/b.test.kast.out new file mode 100644 index 00000000000..c8b57d92320 --- /dev/null +++ b/pyk/regression-new/issue-3672-debugParse/b.test.kast.out @@ -0,0 +1,11 @@ +[Error] Inner Parser: Parse error: unexpected token 'a' following token '*'. +Additional parsing diagnostic information: + Attempting to apply production: + syntax Exp ::= Exp "*" Exp + produced partial term: + `_*__TEST-SYNTAX_Exp_Exp_Exp`(`_+__TEST-SYNTAX_Exp_Exp_Exp`(#token("1","Int"),#token("5","Int"))) + + Source(b.test.kast) + Location(1,9,1,10) + 1 | 1 + 5 * a / 2 + . ^ diff --git a/pyk/regression-new/issue-3672-debugParse/test.k b/pyk/regression-new/issue-3672-debugParse/test.k new file mode 100644 index 00000000000..4df6720621a --- /dev/null +++ b/pyk/regression-new/issue-3672-debugParse/test.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX + imports UNSIGNED-INT-SYNTAX + imports ID-SYNTAX + + syntax Exp ::= Int + | "-" Exp [group(neg)] + | Exp "+" Exp [left, group(add)] + | Exp "-" Exp [left, group(sub)] + | Exp "*" Exp [left, group(mul)] + | Exp "/" Exp [left, group(div)] + | "(" Exp ")" [bracket] + + syntax priority neg > mul div > add sub +endmodule + +module TEST + imports TEST-SYNTAX + configuration $PGM:Exp +endmodule diff --git a/pyk/regression-new/issue-3996-unary-symbol-list/Makefile b/pyk/regression-new/issue-3996-unary-symbol-list/Makefile new file mode 100644 index 00000000000..6dcb01ba312 --- /dev/null +++ b/pyk/regression-new/issue-3996-unary-symbol-list/Makefile @@ -0,0 +1,5 @@ +DEF=int-list +TESTDIR=. +KOMPILE_FLAGS=--syntax-module INT-LIST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-3996-unary-symbol-list/int-list.k b/pyk/regression-new/issue-3996-unary-symbol-list/int-list.k new file mode 100644 index 00000000000..ebaa7295977 --- /dev/null +++ b/pyk/regression-new/issue-3996-unary-symbol-list/int-list.k @@ -0,0 +1,4 @@ +module INT-LIST + imports INT-SYNTAX + syntax Ints ::= List{Int, ","} [symbol(int-list), terminator-symbol(.int-list)] +endmodule diff --git a/pyk/regression-new/issue-425/Makefile b/pyk/regression-new/issue-425/Makefile new file mode 100644 index 00000000000..ac7bf4eb2d0 --- /dev/null +++ b/pyk/regression-new/issue-425/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-425/test.k b/pyk/regression-new/issue-425/test.k new file mode 100644 index 00000000000..a7f552b80bf --- /dev/null +++ b/pyk/regression-new/issue-425/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports LIST + imports STRING + + configuration + $PGM:K + .List + .List + + +endmodule diff --git a/pyk/regression-new/issue-567/Makefile b/pyk/regression-new/issue-567/Makefile new file mode 100644 index 00000000000..ac7bf4eb2d0 --- /dev/null +++ b/pyk/regression-new/issue-567/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-567/test.k b/pyk/regression-new/issue-567/test.k new file mode 100644 index 00000000000..609b0e360b1 --- /dev/null +++ b/pyk/regression-new/issue-567/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-COMMON + imports INT-SYNTAX + imports BOOL + + syntax ShiftInst ::= Int "=" "shift" Int "," Int [hybrid, seqstrict(2,3)] + +endmodule + +module TEST + imports TEST-COMMON + imports DEFAULT-STRATEGY + + syntax KResult ::= Int + + configuration $PGM:K +endmodule diff --git a/pyk/regression-new/issue-582/1.test b/pyk/regression-new/issue-582/1.test new file mode 100644 index 00000000000..b927254a05c --- /dev/null +++ b/pyk/regression-new/issue-582/1.test @@ -0,0 +1 @@ +5 + 2 diff --git a/pyk/regression-new/issue-582/1.test.out b/pyk/regression-new/issue-582/1.test.out new file mode 100644 index 00000000000..7a725d8aac2 --- /dev/null +++ b/pyk/regression-new/issue-582/1.test.out @@ -0,0 +1,3 @@ + + 7 ~> .K + diff --git a/pyk/regression-new/issue-582/Makefile b/pyk/regression-new/issue-582/Makefile new file mode 100644 index 00000000000..3dcb5d65dc6 --- /dev/null +++ b/pyk/regression-new/issue-582/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KRUN_FLAGS=--parser ./test-parser +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/issue-582/test-parser b/pyk/regression-new/issue-582/test-parser new file mode 100755 index 00000000000..678a0f316c3 --- /dev/null +++ b/pyk/regression-new/issue-582/test-parser @@ -0,0 +1 @@ +cat "$1" | kast - --output kore diff --git a/pyk/regression-new/issue-582/test.k b/pyk/regression-new/issue-582/test.k new file mode 100644 index 00000000000..72c3fb8dc0c --- /dev/null +++ b/pyk/regression-new/issue-582/test.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + syntax KResult ::= Int + syntax Exp ::= Int | Exp "+" Exp [strict] + rule I1:Int + I2:Int => I1 +Int I2 +endmodule diff --git a/pyk/regression-new/issue-946/Makefile b/pyk/regression-new/issue-946/Makefile new file mode 100644 index 00000000000..b8e41e7fce1 --- /dev/null +++ b/pyk/regression-new/issue-946/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak +krun: kompile + $(KRUN_OR_LEGACY) $(KRUN_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CHECK) output diff --git a/pyk/regression-new/issue-946/output b/pyk/regression-new/issue-946/output new file mode 100644 index 00000000000..696efbb523e --- /dev/null +++ b/pyk/regression-new/issue-946/output @@ -0,0 +1,13 @@ + + + start ~> .K + + + 1 |-> ListItem ( 2 ) + ListItem ( 3 ) + ListItem ( 4 ) + 5 |-> ListItem ( 6 ) + ListItem ( 7 ) + 8 |-> ListItem ( 9 ) + + diff --git a/pyk/regression-new/issue-946/test.k b/pyk/regression-new/issue-946/test.k new file mode 100644 index 00000000000..df55b30c985 --- /dev/null +++ b/pyk/regression-new/issue-946/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports MAP + imports LIST + + syntax KItem ::= "start" + configuration start + 1 |-> ListItem(2) ListItem(3) ListItem(4) + 5 |-> ListItem(6) ListItem(7) + 8 |-> ListItem(9) +endmodule diff --git a/pyk/regression-new/issue-999/Makefile b/pyk/regression-new/issue-999/Makefile new file mode 100644 index 00000000000..643add39cbd --- /dev/null +++ b/pyk/regression-new/issue-999/Makefile @@ -0,0 +1,4 @@ +DEF=kat +EXT=kat + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/issue-999/kat.k b/pyk/regression-new/issue-999/kat.k new file mode 100644 index 00000000000..ad420232c57 --- /dev/null +++ b/pyk/regression-new/issue-999/kat.k @@ -0,0 +1,106 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module KAT-SYNTAX + + syntax TokKat ::= "ZERO" [token] + |"ONE" [token] + + syntax Kat ::= TokKat [hook(KAT.Kat)] + syntax Kat ::= ".Kat" [function, total, hook(KAT.empty), impure] + +endmodule + +module KAT + imports BASIC-K + imports KAT-SYNTAX + imports BOOL + imports K-EQUAL +// -------------------------------------------------------------------------------- +// Boolean Algebra Part of KAT + + syntax Kat ::= Bool + | "notKat" Kat [function, total, klabel(notKat_), symbol, smt-hook(not), group(boolOperation), hook(KAT.not)] + > Kat "andKat" Kat [function, total, klabel(_andKat_), symbol, left, smt-hook(and), group(boolOperation), hook(KAT.and)] + | Kat "orKat" Kat [function, total, klabel(_orKat_), left, smt-hook(or), group(boolOperation), hook(KAT.or)] + | Kat "=/=Kat" Kat [function, total, klabel(_=/=Kat_), symbol, left, smt-hook(distinct), hook(KAT.ne)] + //| Kat "impliesKat" Kat [function, total, klabel(_impliesKat_), symbol, left, smt-hook(=>), group(boolOperation), hook(KAT.implies)] + + syntax Bool ::= Kat "==Kat" Kat [function, total, klabel(_==Kat_), symbol, left, smt-hook(=), hook(KAT.eq)] + + + syntax Kat ::= freshKat(Kat) [freshGenerator, function] + rule freshKat(I:Kat) => I + + rule notKat ONE => ZERO + rule notKat ZERO => ONE + + rule ONE andKat B:Kat => B:Kat + rule B:Kat andKat ONE => B:Kat + rule ZERO andKat _:Kat => ZERO + rule _:Kat andKat ZERO => ZERO + + rule ONE orKat _:Kat => ONE + rule _:Kat orKat ONE => ONE + rule ZERO orKat B:Kat => B + rule B:Kat orKat ZERO => B + +/* + rule ONE impliesKat B:Kat => B + rule ZERO impliesKat _:Kat => ONE + rule _:Kat impliesKat ONE => ONE + rule B:Kat impliesKat ZERO => notKat B + +*/ + + + // ----------- MODIFICATIONS for KAT ---- + rule I1:Kat =/=Kat I2:Kat => notKat(I1 ==Kat I2) + rule B1:Kat ==Kat B2:Kat => (B1 ==K B2) + + rule true:Bool => ONE + rule false:Bool => ZERO + + // -------------------------------------------------------------------------------- + // Kleene Algebra Part of KAT + + +/* + syntax Kat ::= "(" Kat ")" [bracket] + > left: + Kat "Kat*" [function, klabel(_starKat), symbol, left, smtlib(ka_star), hook(KAT.mul)] + > left: + Kat "Kat;" Kat [function, klabel(_seqKat_), symbol, left, smtlib(ka_seq), hook(KAT.seq)] + > left: + Kat "Kat|" Kat [function, klabel(_pllKat_), symbol, left, smtlib(ka_pll), hook(KAT.pll)] + +*/ + + syntax Kat ::= "(" Kat ")" [bracket] + > left: + Kat "Kat*" [function, klabel(_starKat), symbol, left, smtlib(ka_star), hook(KAT.mul)] + | Kat "Kat;" Kat [function, klabel(_seqKat_), symbol, left, smtlib(ka_seq), hook(KAT.seq)] + | Kat "Kat|" Kat [function, klabel(_pllKat_), symbol, left, smtlib(ka_pll), hook(KAT.pll)] + + + rule ONE Kat; B:Kat => B:Kat + rule B:Kat Kat; ONE => B:Kat + rule ZERO Kat; _:Kat => ZERO + rule _:Kat Kat; ZERO => ZERO + + // general sequential operation; why shouldn't this be used? + // rule A:Kat Kat; B:Kat => A ~> B + + + rule ONE Kat| _:Kat => ONE + rule _:Kat Kat| ONE => ONE + rule ZERO Kat| B:Kat => B + rule B:Kat Kat| ZERO => B + + // Kleene-Star Operator: + + rule _B:Kat Kat* => .Kat + rule B:Kat Kat* => B + rule B:Kat Kat* => B Kat; (B Kat*) + + + +endmodule diff --git a/pyk/regression-new/issue-999/kat.k.out b/pyk/regression-new/issue-999/kat.k.out new file mode 100644 index 00000000000..d4a92c54985 --- /dev/null +++ b/pyk/regression-new/issue-999/kat.k.out @@ -0,0 +1,20 @@ +[Warning] Compiler: Non exhaustive match detected: `.Kat_KAT-SYNTAX_Kat`(.KList) + Source(kat.k) + Location(8,18,8,67) + 8 | syntax Kat ::= ".Kat" [function, total, hook(KAT.empty), impure] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Warning] Compiler: Non exhaustive match detected: `notKat_`(_) + Source(kat.k) + Location(21,19,21,135) + 21 | | "notKat" Kat [function, total, klabel(notKat_), symbol, smt-hook(not), group(boolOperation), hook(KAT.not)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Warning] Compiler: Non exhaustive match detected: `_andKat_`(_,_) + Source(kat.k) + Location(22,19,22,141) + 22 | > Kat "andKat" Kat [function, total, klabel(_andKat_), symbol, left, smt-hook(and), group(boolOperation), hook(KAT.and)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Warning] Compiler: Non exhaustive match detected: `_orKat__KAT_Kat_Kat_Kat`(_,_) + Source(kat.k) + Location(23,19,23,130) + 23 | | Kat "orKat" Kat [function, total, klabel(_orKat_), left, smt-hook(or), group(boolOperation), hook(KAT.or)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/pyk/regression-new/ite-bug/Makefile b/pyk/regression-new/ite-bug/Makefile new file mode 100644 index 00000000000..dc79a44e386 --- /dev/null +++ b/pyk/regression-new/ite-bug/Makefile @@ -0,0 +1,13 @@ +DEF=ite-bug +EXT=ite +TESTDIR=. +KOMPILE_BACKEND=haskell + +%-spec.k %-spec.md: kompile +ifeq ($(TESTDIR),$(RESULTDIR)) + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $@.out +else + $(KPROVE) $@ $(KPROVE_FLAGS) $(DEBUG) --definition $(DEF)-kompiled $(CONSIDER_ERRORS) $(REMOVE_PATHS) | sed 's!kore-exec: \[[0-9]*\]!kore-exec: []!g' $(CHECK) $(RESULTDIR)/$(notdir $@).out +endif + +include ../include/ktest.mak diff --git a/pyk/regression-new/ite-bug/failing-1-spec.k b/pyk/regression-new/ite-bug/failing-1-spec.k new file mode 100644 index 00000000000..6088952b1b5 --- /dev/null +++ b/pyk/regression-new/ite-bug/failing-1-spec.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FAILING-1-SPEC + imports ITE-BUG + claim JUMPI 2 bool2Word(_X .K + 0 => 1 +endmodule diff --git a/pyk/regression-new/ite-bug/failing-1-spec.k.out b/pyk/regression-new/ite-bug/failing-1-spec.k.out new file mode 100644 index 00000000000..23ca14b17f9 --- /dev/null +++ b/pyk/regression-new/ite-bug/failing-1-spec.k.out @@ -0,0 +1,21 @@ +kore-exec: [] Warning (WarnStuckClaimState): + The configuration's term doesn't unify with the destination's term and the configuration cannot be rewritten further. Location: failing-1-spec.k:4:11-5:28 +Context: + (InfoReachability) while checking the implication + #Ceil ( bool2Word ( _X + + .K + + + 2 + +
+[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/ite-bug/failing-2-spec.k b/pyk/regression-new/ite-bug/failing-2-spec.k new file mode 100644 index 00000000000..5567e46a4fc --- /dev/null +++ b/pyk/regression-new/ite-bug/failing-2-spec.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module FAILING-2-SPEC + imports ITE-BUG + claim JUMPI 2 bool2Word(_X .K + 0 => 2 +endmodule diff --git a/pyk/regression-new/ite-bug/failing-2-spec.k.out b/pyk/regression-new/ite-bug/failing-2-spec.k.out new file mode 100644 index 00000000000..8cdca897a5d --- /dev/null +++ b/pyk/regression-new/ite-bug/failing-2-spec.k.out @@ -0,0 +1,21 @@ +kore-exec: [] Warning (WarnStuckClaimState): + The configuration's term doesn't unify with the destination's term and the configuration cannot be rewritten further. Location: failing-2-spec.k:4:11-5:28 +Context: + (InfoReachability) while checking the implication + #Ceil ( bool2Word ( _X + + .K + + + 1 + + +#And + { + 0 + #Equals + bool2Word ( _X $PGM:Pgm + 0 + + rule JUMPI _DEST I => .K ... + PCOUNT => PCOUNT +Int 1 + requires I ==Int 0 + + rule JUMPI DEST I => .K ... + _PCOUNT => DEST + requires I =/=Int 0 + + rule bool2Word( B:Bool ) => 1 requires B + rule bool2Word( B:Bool ) => 0 requires notBool B + + rule bool2Word(A) ==K 0 => notBool(A) [simplification] + rule bool2Word(A) ==K 1 => A [simplification] + rule bool2Word(A) =/=K 0 => A [simplification] + rule bool2Word(A) =/=K 1 => notBool(A) [simplification] + +endmodule diff --git a/pyk/regression-new/ite-bug/passing-spec.k b/pyk/regression-new/ite-bug/passing-spec.k new file mode 100644 index 00000000000..c1f537a43a6 --- /dev/null +++ b/pyk/regression-new/ite-bug/passing-spec.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module PASSING-SPEC + imports ITE-BUG + claim JUMPI 2 bool2Word(X .K + 0 => #if (X +endmodule diff --git a/pyk/regression-new/ite-bug/passing-spec.k.out b/pyk/regression-new/ite-bug/passing-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/ite-bug/passing-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/itp/Makefile b/pyk/regression-new/itp/Makefile new file mode 100644 index 00000000000..5d002609d31 --- /dev/null +++ b/pyk/regression-new/itp/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=nat-assoc nth-ancestor +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/itp/nat-assoc/Makefile b/pyk/regression-new/itp/nat-assoc/Makefile new file mode 100644 index 00000000000..88252b78818 --- /dev/null +++ b/pyk/regression-new/itp/nat-assoc/Makefile @@ -0,0 +1,8 @@ +DEF=nat +EXT=nat +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS= +KPROVE_FLAGS= + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/itp/nat-assoc/assoc-spec.k b/pyk/regression-new/itp/nat-assoc/assoc-spec.k new file mode 100644 index 00000000000..97fab62f0ec --- /dev/null +++ b/pyk/regression-new/itp/nat-assoc/assoc-spec.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// CafeOBJ-style proof of addition associativity +// https://pdfs.semanticscholar.org/16b0/a31be7de330027dfffc3c9521d5d4424e4cd.pdf + +module ASSOC-SPEC + imports NAT + + // induction hypothesis: + rule (I:Nat + J:Nat) + k => I:Nat + (J:Nat + k) [simplification] + + // Prove associativity: (i + j) + k = i +(j + k) + // by induction on k + + // base case proof for 0: + claim I:Nat + (J:Nat + z) => (I:Nat + J:Nat) + z + + // proof of induction step for (s k): + claim (I:Nat + J:Nat) + s(k) => I:Nat + (J:Nat + s(k)) + + // QED {end of proof for associativity of (_+_)} +endmodule diff --git a/pyk/regression-new/itp/nat-assoc/assoc-spec.k.out b/pyk/regression-new/itp/nat-assoc/assoc-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/itp/nat-assoc/assoc-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/itp/nat-assoc/nat.k b/pyk/regression-new/itp/nat-assoc/nat.k new file mode 100644 index 00000000000..77aad47fe32 --- /dev/null +++ b/pyk/regression-new/itp/nat-assoc/nat.k @@ -0,0 +1,23 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// CafeOBJ-style proof of addition associativity +// https://pdfs.semanticscholar.org/16b0/a31be7de330027dfffc3c9521d5d4424e4cd.pdf + +module NAT-SYNTAX + syntax Nat ::= "z" + | s(Nat) + | Nat "+" Nat [function] + + // declaring constants as arbitrary values + syntax Nat ::= "k" [function, no-evaluators] +endmodule + +module NAT + imports NAT-SYNTAX + + configuration + $PGM:Nat + + + rule N:Nat + z => N + rule N:Nat + s(M) => s(N + M) +endmodule diff --git a/pyk/regression-new/itp/nth-ancestor/Makefile b/pyk/regression-new/itp/nth-ancestor/Makefile new file mode 100644 index 00000000000..4d0925eeb96 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/Makefile @@ -0,0 +1,8 @@ +DEF=verification +EXT=chain +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS= +KPROVE_FLAGS= + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/itp/nth-ancestor/chain.k b/pyk/regression-new/itp/nth-ancestor/chain.k new file mode 100644 index 00000000000..1c2a2c0c6e8 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/chain.k @@ -0,0 +1,89 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +/* + Coq-style proof of `ancestor_means` + https://github.com/runtimeverification/casper-proofs/blob/master/Core/AccountableSafety.v +*/ + +requires "proof-script.k" + +module CHAIN-SYNTAX + +endmodule + +module CHAIN + + imports PROOF-SCRIPT + imports CHAIN-SYNTAX + imports INT + imports BOOL + + /* + (* abstract representation of a block tree *) + Variable hash_parent : rel Hash. + + Notation "h1 <~ h2" := (hash_parent h1 h2) (at level 50). + + Definition hash_ancestor h1 h2 := + connect hash_parent h1 h2. + + Notation "h1 <~* h2" := (hash_ancestor h1 h2) (at level 50). + + Lemma hash_ancestor_base : forall h1 h2, + h1 <~ h2 -> h1 <~* h2. + Proof. + by apply/connect1. + Qed. + + Lemma hash_ancestor_step : forall h1 h2 h3, + h1 <~ h2 -> h2 <~* h3 -> h1 <~* h3. + Proof. + move => h1 h2 h3. + move/connect1. + by apply/connect_trans. + Qed. + */ + + syntax Pred ::= Int "<~" Int + | Int "<~*" Int + + rule + apply("<~*.i") => .K ... + B1 <~ B2 => B1 <~* B2 + + rule + apply("<~*.i") => .K ... + B1 <~ B2 and B2 <~* B3 => B1 <~* B3 + + /* + (* predicate stating first hash is ancestor of second hash at the indicated distance *) + Inductive nth_ancestor : nat -> Hash -> Hash -> Prop := + | nth_ancestor_0 : forall h1, nth_ancestor 0 h1 h1 + | nth_ancestor_nth : forall n h1 h2 h3, + nth_ancestor n h1 h2 -> h2 <~ h3 -> + nth_ancestor n.+1 h1 h3. + */ + + syntax Pred ::= nth(Int, Int, Int) + | block(Int) + | Int "==" Int + + rule + apply("nth.i") => .K ... + block(B) => nth(0, B, B) + + rule + apply("nth.i") => .K ... + nth(N, B1, B2) and B2 <~ B3 + => nth(N +Int 1, B1, B3) + + rule + apply("nth.e") => .K ... + nth(0, B1, B2) => B1 == B2 + + rule + apply("nth.e") => .K ... + nth(N, B1, B3) + => nth(N -Int 1, B1, ?B2:Int) and ?B2 <~ B3 + requires N >Int 0 + +endmodule diff --git a/pyk/regression-new/itp/nth-ancestor/nth1-spec.k b/pyk/regression-new/itp/nth-ancestor/nth1-spec.k new file mode 100644 index 00000000000..4bc560b3861 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/nth1-spec.k @@ -0,0 +1,51 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +/* + Coq-style proof of `ancestor_means` + https://github.com/runtimeverification/casper-proofs/blob/master/Core/AccountableSafety.v +*/ +/* + Lemma ancestor_means : + forall n parent new, + nth_ancestor n parent new -> n > 0 -> parent <~* new. + Proof. + elim => //=. + move => n IH parent new Hn. + inversion Hn; subst. + case Hn0: (n == 0). + move/eqP: Hn0 H0 -> => Hnt Hlt. + inversion Hnt; subst. + by apply/connect1. + move/negP/negP: Hn0 => Hn0 Hltn. + have Hnn: 0 < n. + apply: neq0_lt0n. + by apply/negP/negP. + move: (IH _ _ H0 Hnn) => Hp. + apply: connect_trans; eauto. + by apply/connect1. +*/ + +// base case +module NTH1-SPEC + imports V + + claim + nth(1, B1, B2) => B1 <~* B2 +

.Map => ?_

+ apply("nth.e") + ~> store2("p1", "p2") + ~> load("p1") + ~> apply("nth.e") + ~> load("p2") + ~> apply("lemma") + ~> apply("<~*.i") + => .K + + claim + apply("lemma") => .K ... + B1 == B2 and B2 <~ B3 => B1 <~ B3 + [trusted] +endmodule + +module V + imports CHAIN +endmodule diff --git a/pyk/regression-new/itp/nth-ancestor/nth1-spec.k.out b/pyk/regression-new/itp/nth-ancestor/nth1-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/nth1-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/itp/nth-ancestor/nth2-spec.k b/pyk/regression-new/itp/nth-ancestor/nth2-spec.k new file mode 100644 index 00000000000..e3cea5cb470 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/nth2-spec.k @@ -0,0 +1,63 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +/* + Coq-style proof of `ancestor_means` + https://github.com/runtimeverification/casper-proofs/blob/master/Core/AccountableSafety.v +*/ +/* + Lemma ancestor_means : + forall n parent new, + nth_ancestor n parent new -> n > 0 -> parent <~* new. + Proof. + elim => //=. + move => n IH parent new Hn. + inversion Hn; subst. + case Hn0: (n == 0). + move/eqP: Hn0 H0 -> => Hnt Hlt. + inversion Hnt; subst. + by apply/connect1. + move/negP/negP: Hn0 => Hn0 Hltn. + have Hnn: 0 < n. + apply: neq0_lt0n. + by apply/negP/negP. + move: (IH _ _ H0 Hnn) => Hp. + apply: connect_trans; eauto. + by apply/connect1. +*/ + +// inductive case +module NTH2-SPEC + imports VERIFICATION + + claim + nth(k(N) +Int 1, B1, B2) => B1 <~* B2 +

.Map => ?_

+ apply("nth.e") + ~> store2("p1", "p2") + ~> load("p1") + ~> apply("ih") + ~> load("p2") + ~> apply("lemma") + => .K + requires k(N) >Int 0 andBool const(N) + + // induction hypothesis + claim + apply("ih") => .K ... + nth(k(N), B1, B2) => B1 <~* B2 + requires k(N) >Int 0 andBool const(N) + [trusted] + + /* + Lemma hash_ancestor_intro' : + forall h1 h2 h3, h1 <~* h2 -> h2 <~ h3 -> h1 <~* h3. + Proof. + move => h1 h2 h3 H1 H2. + apply: connect_trans; eauto. + by apply/connect1. + Qed. + */ + claim + apply("lemma") => .K ... + B1 <~* B2 and B2 <~ B3 => B1 <~* B3 + [trusted] +endmodule diff --git a/pyk/regression-new/itp/nth-ancestor/nth2-spec.k.out b/pyk/regression-new/itp/nth-ancestor/nth2-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/nth2-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/itp/nth-ancestor/proof-script.k b/pyk/regression-new/itp/nth-ancestor/proof-script.k new file mode 100644 index 00000000000..e8e91b82bb7 --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/proof-script.k @@ -0,0 +1,44 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// K ITP proof script language + +module PROOF-SCRIPT + + imports STRING + imports MAP + imports K-EQUAL + + configuration + $PGM:Script + .K // workspace +

.Map

// premises +
+ + syntax Pred ::= Pred "and" Pred + | "none" + | Bool + + syntax Script ::= apply(String) + | load(String) + | store1(String) + | store2(String, String) + + rule [load]: + load(N) => .K ... + X => #if X ==K none + #then M [ N ] + #else X and { M [ N ] }:>Pred + #fi +

M

+ + rule [store1]: + store1(N) => .K ... + X => none +

M => M [ N <- X ]

+ + rule [store2]: + store2(N1,N2) => .K ... + X1 and X2 => none +

M => M [ N1 <- X1 ] + [ N2 <- X2 ]

+ +endmodule diff --git a/pyk/regression-new/itp/nth-ancestor/verification.k b/pyk/regression-new/itp/nth-ancestor/verification.k new file mode 100644 index 00000000000..36cdab0140c --- /dev/null +++ b/pyk/regression-new/itp/nth-ancestor/verification.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "chain.k" + +module VERIFICATION-SYNTAX +endmodule + +module VERIFICATION + imports VERIFICATION-SYNTAX + imports CHAIN + + syntax Bool ::= const(Int) [function, smtlib(con), no-evaluators] + + syntax Int ::= k(Int) [function, total, injective, smtlib(k), no-evaluators] + + rule (k(N) +Int 1) -Int 1 => k(N) [simplification] +endmodule diff --git a/pyk/regression-new/json-input/Makefile b/pyk/regression-new/json-input/Makefile new file mode 100644 index 00000000000..1f352b8d26b --- /dev/null +++ b/pyk/regression-new/json-input/Makefile @@ -0,0 +1,6 @@ +DEF=json-in +EXT=json-in +TESTDIR=. +KAST_FLAGS=--expand-macros --input json --output pretty + +include ../include/ktest.mak diff --git a/pyk/regression-new/json-input/json-in.k b/pyk/regression-new/json-input/json-in.k new file mode 100644 index 00000000000..923bb891257 --- /dev/null +++ b/pyk/regression-new/json-input/json-in.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module JSON-IN-SYNTAX + imports INT + imports ML-SYNTAX + + syntax Pgm ::= init ( Int ) [macro] + rule init(0) => { 3 #Equals 4 } + rule init(1) => { 3 #Equals 3 } + configuration $PGM:Pgm +endmodule + +module JSON-IN + imports JSON-IN-SYNTAX +endmodule diff --git a/pyk/regression-new/json-input/json-in1.json.kast b/pyk/regression-new/json-input/json-in1.json.kast new file mode 100644 index 00000000000..30d441bca4b --- /dev/null +++ b/pyk/regression-new/json-input/json-in1.json.kast @@ -0,0 +1 @@ +{"format":"KAST","version":3,"term":{"node":"KApply","label":{"node":"KLabel","name":"#Equals","params":[{"node":"KSort","name":"K"},{"node":"KSort","name":"K"}]},"arity":2,"args":[{"node":"KToken","sort":{"node":"KSort","name":"Int"},"token":"3"},{"node":"KToken","sort":{"node":"KSort","name":"Int"},"token":"4"}]}} diff --git a/pyk/regression-new/json-input/json-in1.json.kast.out b/pyk/regression-new/json-input/json-in1.json.kast.out new file mode 100644 index 00000000000..a31c87355da --- /dev/null +++ b/pyk/regression-new/json-input/json-in1.json.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 4 +} diff --git a/pyk/regression-new/json-input/json-in2.json.kast b/pyk/regression-new/json-input/json-in2.json.kast new file mode 100644 index 00000000000..96f8666c7bd --- /dev/null +++ b/pyk/regression-new/json-input/json-in2.json.kast @@ -0,0 +1 @@ +{"format":"KAST","version":3,"term":{"node":"KApply","label":{"node":"KLabel","name":"#Equals","params":[{"node":"KSort","name":"K"},{"node":"KSort","name":"K"}]},"arity":2,"args":[{"node":"KToken","sort":{"node":"KSort","name":"Int"},"token":"3"},{"node":"KToken","sort":{"node":"KSort","name":"Int"},"token":"3"}]}} diff --git a/pyk/regression-new/json-input/json-in2.json.kast.out b/pyk/regression-new/json-input/json-in2.json.kast.out new file mode 100644 index 00000000000..6f25cca1eef --- /dev/null +++ b/pyk/regression-new/json-input/json-in2.json.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 3 +} diff --git a/pyk/regression-new/json-input/json-in3.json.kast b/pyk/regression-new/json-input/json-in3.json.kast new file mode 100644 index 00000000000..1111042542f --- /dev/null +++ b/pyk/regression-new/json-input/json-in3.json.kast @@ -0,0 +1 @@ +{"format":"KAST","version":3,"term":{"node":"KApply","label":{"node":"KLabel","name":"#And","params":[{"node":"KSort","name":"K"}]},"variable":false,"arity":2,"args":[{"node":"KApply","label":{"node":"KLabel","name":"","params":[]},"variable":false,"arity":1,"args":[{"node":"KVariable","name":"N"}]},{"node":"KApply","label":{"node":"KLabel","name":"_>=Int_","params":[]},"variable":false,"arity":2,"args":[{"node":"KVariable","name":"N"},{"node":"KToken","sort":{"node":"KSort","name":"Int"},"token":"0"}]}]}} diff --git a/pyk/regression-new/json-input/json-in3.json.kast.out b/pyk/regression-new/json-input/json-in3.json.kast.out new file mode 100644 index 00000000000..661adfab740 --- /dev/null +++ b/pyk/regression-new/json-input/json-in3.json.kast.out @@ -0,0 +1,5 @@ + + N + +#And + N >=Int 0 diff --git a/pyk/regression-new/kast-bison-bytes/.gitignore b/pyk/regression-new/kast-bison-bytes/.gitignore new file mode 100644 index 00000000000..d9bdfa756dc --- /dev/null +++ b/pyk/regression-new/kast-bison-bytes/.gitignore @@ -0,0 +1 @@ +bison_parser diff --git a/pyk/regression-new/kast-bison-bytes/1.kast-bison b/pyk/regression-new/kast-bison-bytes/1.kast-bison new file mode 100644 index 00000000000..3de1fdff60f --- /dev/null +++ b/pyk/regression-new/kast-bison-bytes/1.kast-bison @@ -0,0 +1 @@ +b"\x00\x0f" diff --git a/pyk/regression-new/kast-bison-bytes/1.kast-bison.out b/pyk/regression-new/kast-bison-bytes/1.kast-bison.out new file mode 100644 index 00000000000..21040ca5946 --- /dev/null +++ b/pyk/regression-new/kast-bison-bytes/1.kast-bison.out @@ -0,0 +1 @@ +inj{SortBytes{}, SortPgm{}}(\dv{SortBytes{}}("\x00\x0f")) diff --git a/pyk/regression-new/kast-bison-bytes/Makefile b/pyk/regression-new/kast-bison-bytes/Makefile new file mode 100644 index 00000000000..ebe4f7ee378 --- /dev/null +++ b/pyk/regression-new/kast-bison-bytes/Makefile @@ -0,0 +1,8 @@ +DEF=kast-in +EXT=kast-in +TESTDIR=. +KOMPILE_BACKEND=llvm +KAST_FLAGS=--gen-parser +CHECK=| diff - + +include ../include/ktest.mak diff --git a/pyk/regression-new/kast-bison-bytes/kast-in.k b/pyk/regression-new/kast-bison-bytes/kast-in.k new file mode 100644 index 00000000000..cdf4b6a64bd --- /dev/null +++ b/pyk/regression-new/kast-bison-bytes/kast-in.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-IN-SYNTAX + imports BYTES-SYNTAX + + syntax Pgm ::= Bytes +endmodule + +module KAST-IN + imports KAST-IN-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/kast-bison/.gitignore b/pyk/regression-new/kast-bison/.gitignore new file mode 100644 index 00000000000..d9bdfa756dc --- /dev/null +++ b/pyk/regression-new/kast-bison/.gitignore @@ -0,0 +1 @@ +bison_parser diff --git a/pyk/regression-new/kast-bison/1.kast-bison b/pyk/regression-new/kast-bison/1.kast-bison new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/kast-bison/1.kast-bison @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/kast-bison/1.kast-bison.out b/pyk/regression-new/kast-bison/1.kast-bison.out new file mode 100644 index 00000000000..64e4dac5ac3 --- /dev/null +++ b/pyk/regression-new/kast-bison/1.kast-bison.out @@ -0,0 +1 @@ +inj{SortInt{}, SortPgm{}}(\dv{SortInt{}}("1")) diff --git a/pyk/regression-new/kast-bison/Makefile b/pyk/regression-new/kast-bison/Makefile new file mode 100644 index 00000000000..ebe4f7ee378 --- /dev/null +++ b/pyk/regression-new/kast-bison/Makefile @@ -0,0 +1,8 @@ +DEF=kast-in +EXT=kast-in +TESTDIR=. +KOMPILE_BACKEND=llvm +KAST_FLAGS=--gen-parser +CHECK=| diff - + +include ../include/ktest.mak diff --git a/pyk/regression-new/kast-bison/kast-in.k b/pyk/regression-new/kast-bison/kast-in.k new file mode 100644 index 00000000000..c76ef7c627b --- /dev/null +++ b/pyk/regression-new/kast-bison/kast-in.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-IN-SYNTAX + imports INT-SYNTAX + + syntax Pgm ::= Int +endmodule + +module KAST-IN + imports KAST-IN-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/kast-default-output/Makefile b/pyk/regression-new/kast-default-output/Makefile new file mode 100644 index 00000000000..30113bb70c4 --- /dev/null +++ b/pyk/regression-new/kast-default-output/Makefile @@ -0,0 +1,6 @@ +DEF=kast-out +EXT=kast-out +TESTDIR=. +KAST_FLAGS=--expand-macros --no-substitution-filtering + +include ../include/ktest.mak diff --git a/pyk/regression-new/kast-default-output/kast-out.k b/pyk/regression-new/kast-default-output/kast-out.k new file mode 100644 index 00000000000..57076427164 --- /dev/null +++ b/pyk/regression-new/kast-default-output/kast-out.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-OUT-SYNTAX + imports INT-SYNTAX + imports ML-SYNTAX + + syntax Pgm ::= init ( Int ) [macro] + rule init(0) => { 3 #Equals 4 } + rule init(1) => { 3 #Equals 3 } +endmodule + +module KAST-OUT + imports KAST-OUT-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/kast-default-output/kast-out1.kast b/pyk/regression-new/kast-default-output/kast-out1.kast new file mode 100644 index 00000000000..32a7d20708e --- /dev/null +++ b/pyk/regression-new/kast-default-output/kast-out1.kast @@ -0,0 +1 @@ +init(0) diff --git a/pyk/regression-new/kast-default-output/kast-out1.kast.out b/pyk/regression-new/kast-default-output/kast-out1.kast.out new file mode 100644 index 00000000000..55a8a8cd288 --- /dev/null +++ b/pyk/regression-new/kast-default-output/kast-out1.kast.out @@ -0,0 +1 @@ +#Equals(#token("3","Int"),#token("4","Int")) diff --git a/pyk/regression-new/kast-default-output/kast-out2.kast b/pyk/regression-new/kast-default-output/kast-out2.kast new file mode 100644 index 00000000000..ee04e473c4e --- /dev/null +++ b/pyk/regression-new/kast-default-output/kast-out2.kast @@ -0,0 +1 @@ +init(1) diff --git a/pyk/regression-new/kast-default-output/kast-out2.kast.out b/pyk/regression-new/kast-default-output/kast-out2.kast.out new file mode 100644 index 00000000000..85588b6b687 --- /dev/null +++ b/pyk/regression-new/kast-default-output/kast-out2.kast.out @@ -0,0 +1 @@ +#Equals(#token("3","Int"),#token("3","Int")) diff --git a/pyk/regression-new/kast-input/Makefile b/pyk/regression-new/kast-input/Makefile new file mode 100644 index 00000000000..a20a05c3f3d --- /dev/null +++ b/pyk/regression-new/kast-input/Makefile @@ -0,0 +1,6 @@ +DEF=kast-in +EXT=kast-in +TESTDIR=. +KAST_FLAGS=--expand-macros --input kast --output pretty --no-substitution-filtering + +include ../include/ktest.mak diff --git a/pyk/regression-new/kast-input/kast-in.k b/pyk/regression-new/kast-input/kast-in.k new file mode 100644 index 00000000000..7a85329c5e8 --- /dev/null +++ b/pyk/regression-new/kast-input/kast-in.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-IN-SYNTAX + imports INT-SYNTAX + imports ML-SYNTAX + + syntax Pgm ::= init ( Int ) [macro] + rule init(0) => { 3 #Equals 4 } + rule init(1) => { 3 #Equals 3 } +endmodule + +module KAST-IN + imports KAST-IN-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/kast-input/kast-in1.kast b/pyk/regression-new/kast-input/kast-in1.kast new file mode 100644 index 00000000000..71b39745ac6 --- /dev/null +++ b/pyk/regression-new/kast-input/kast-in1.kast @@ -0,0 +1,2 @@ +#Equals(#token("3","Int"),#token("4","Int")) + diff --git a/pyk/regression-new/kast-input/kast-in1.kast.out b/pyk/regression-new/kast-input/kast-in1.kast.out new file mode 100644 index 00000000000..a31c87355da --- /dev/null +++ b/pyk/regression-new/kast-input/kast-in1.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 4 +} diff --git a/pyk/regression-new/kast-input/kast-in2.kast b/pyk/regression-new/kast-input/kast-in2.kast new file mode 100644 index 00000000000..3adc8984db7 --- /dev/null +++ b/pyk/regression-new/kast-input/kast-in2.kast @@ -0,0 +1,2 @@ +#Equals(#token("3","Int"),#token("3","Int")) + diff --git a/pyk/regression-new/kast-input/kast-in2.kast.out b/pyk/regression-new/kast-input/kast-in2.kast.out new file mode 100644 index 00000000000..6f25cca1eef --- /dev/null +++ b/pyk/regression-new/kast-input/kast-in2.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 3 +} diff --git a/pyk/regression-new/kast-kore-input/Makefile b/pyk/regression-new/kast-kore-input/Makefile new file mode 100644 index 00000000000..59238beb877 --- /dev/null +++ b/pyk/regression-new/kast-kore-input/Makefile @@ -0,0 +1,8 @@ +DEF=kast-in +EXT=kast-in +TESTDIR=. +KOMPILE_BACKEND=haskell +export KOMPILE_BACKEND +KAST_FLAGS=--input kore --output pretty + +include ../include/ktest.mak diff --git a/pyk/regression-new/kast-kore-input/kast-in.k b/pyk/regression-new/kast-kore-input/kast-in.k new file mode 100644 index 00000000000..7a85329c5e8 --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-IN-SYNTAX + imports INT-SYNTAX + imports ML-SYNTAX + + syntax Pgm ::= init ( Int ) [macro] + rule init(0) => { 3 #Equals 4 } + rule init(1) => { 3 #Equals 3 } +endmodule + +module KAST-IN + imports KAST-IN-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/kast-kore-input/kast-in1.kast b/pyk/regression-new/kast-kore-input/kast-in1.kast new file mode 100644 index 00000000000..69c41063020 --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in1.kast @@ -0,0 +1 @@ +\equals{SortInt{},SortInt{}}(\dv{SortInt{}}("3"),\dv{SortInt{}}("4")) diff --git a/pyk/regression-new/kast-kore-input/kast-in1.kast.out b/pyk/regression-new/kast-kore-input/kast-in1.kast.out new file mode 100644 index 00000000000..a31c87355da --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in1.kast.out @@ -0,0 +1,5 @@ +{ + 3 +#Equals + 4 +} diff --git a/pyk/regression-new/kast-kore-input/kast-in2.kast b/pyk/regression-new/kast-kore-input/kast-in2.kast new file mode 100644 index 00000000000..cc48b837d4a --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in2.kast @@ -0,0 +1 @@ +\equals{SortInt{},SortInt{}}(X:SortInt{},\dv{SortInt{}}("4")) diff --git a/pyk/regression-new/kast-kore-input/kast-in2.kast.out b/pyk/regression-new/kast-kore-input/kast-in2.kast.out new file mode 100644 index 00000000000..9ea5b3d438a --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in2.kast.out @@ -0,0 +1,5 @@ +{ + X +#Equals + 4 +} diff --git a/pyk/regression-new/kast-kore-input/kast-in3.kast b/pyk/regression-new/kast-kore-input/kast-in3.kast new file mode 100644 index 00000000000..bc9cf9103f1 --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in3.kast @@ -0,0 +1 @@ +\equals{SortInt{},SortInt{}}(@X:SortInt{},\dv{SortInt{}}("4")) diff --git a/pyk/regression-new/kast-kore-input/kast-in3.kast.out b/pyk/regression-new/kast-kore-input/kast-in3.kast.out new file mode 100644 index 00000000000..78e50d46ddd --- /dev/null +++ b/pyk/regression-new/kast-kore-input/kast-in3.kast.out @@ -0,0 +1,5 @@ +{ + @X +#Equals + 4 +} diff --git a/pyk/regression-new/kast-rule/Makefile b/pyk/regression-new/kast-rule/Makefile new file mode 100644 index 00000000000..5d3ee3c5a71 --- /dev/null +++ b/pyk/regression-new/kast-rule/Makefile @@ -0,0 +1,6 @@ +DEF=kast-in +EXT=kast-in +TESTDIR=. +KAST_FLAGS=--expand-macros --input rule + +include ../include/ktest.mak diff --git a/pyk/regression-new/kast-rule/kast-in.k b/pyk/regression-new/kast-rule/kast-in.k new file mode 100644 index 00000000000..c74a672ec4a --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KAST-IN-SYNTAX + imports INT-SYNTAX + imports ML-SYNTAX + + syntax Pgm ::= init ( Int ) [macro] + rule init(0) => { 3 #Equals 4 } + rule init(1) => { 3 #Equals 3 } +endmodule + +module KAST-IN + imports KAST-IN-SYNTAX + imports INT + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/kast-rule/kast-in1.kast b/pyk/regression-new/kast-rule/kast-in1.kast new file mode 100644 index 00000000000..339b3ea1bd9 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in1.kast @@ -0,0 +1 @@ +A:Int => 1 diff --git a/pyk/regression-new/kast-rule/kast-in1.kast.out b/pyk/regression-new/kast-rule/kast-in1.kast.out new file mode 100644 index 00000000000..0ce61cae011 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in1.kast.out @@ -0,0 +1 @@ +A=>#token("1","Int") diff --git a/pyk/regression-new/kast-rule/kast-in2.kast b/pyk/regression-new/kast-rule/kast-in2.kast new file mode 100644 index 00000000000..6f89da6a937 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in2.kast @@ -0,0 +1 @@ + init(0) => 2 diff --git a/pyk/regression-new/kast-rule/kast-in2.kast.out b/pyk/regression-new/kast-rule/kast-in2.kast.out new file mode 100644 index 00000000000..20cc7663998 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in2.kast.out @@ -0,0 +1 @@ +``(#Equals(#token("3","Int"),#token("4","Int"))=>#token("2","Int")) diff --git a/pyk/regression-new/kast-rule/kast-in3.kast b/pyk/regression-new/kast-rule/kast-in3.kast new file mode 100644 index 00000000000..32d84747f94 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in3.kast @@ -0,0 +1 @@ + . diff --git a/pyk/regression-new/kast-rule/kast-in3.kast.out b/pyk/regression-new/kast-rule/kast-in3.kast.out new file mode 100644 index 00000000000..e3fb4ac292d --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in3.kast.out @@ -0,0 +1 @@ +``(.K) diff --git a/pyk/regression-new/kast-rule/kast-in4.kast b/pyk/regression-new/kast-rule/kast-in4.kast new file mode 100644 index 00000000000..cd61ba7f650 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in4.kast @@ -0,0 +1 @@ +A +Int B => 3 diff --git a/pyk/regression-new/kast-rule/kast-in4.kast.out b/pyk/regression-new/kast-rule/kast-in4.kast.out new file mode 100644 index 00000000000..33267fb721e --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in4.kast.out @@ -0,0 +1 @@ +`_+Int_`(A,B)=>#token("3","Int") diff --git a/pyk/regression-new/kast-rule/kast-in5.kast b/pyk/regression-new/kast-rule/kast-in5.kast new file mode 100644 index 00000000000..d3177dd6b94 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in5.kast @@ -0,0 +1 @@ + .K 0 diff --git a/pyk/regression-new/kast-rule/kast-in5.kast.out b/pyk/regression-new/kast-rule/kast-in5.kast.out new file mode 100644 index 00000000000..e5f91335ae6 --- /dev/null +++ b/pyk/regression-new/kast-rule/kast-in5.kast.out @@ -0,0 +1 @@ +``(``(.K),``(#token("0","Int"))) diff --git a/pyk/regression-new/kdep-options/Makefile b/pyk/regression-new/kdep-options/Makefile new file mode 100644 index 00000000000..dacea835ad1 --- /dev/null +++ b/pyk/regression-new/kdep-options/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=remake-depend simple +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/kdep-options/remake-depend/Makefile b/pyk/regression-new/kdep-options/remake-depend/Makefile new file mode 100644 index 00000000000..1cfc069a844 --- /dev/null +++ b/pyk/regression-new/kdep-options/remake-depend/Makefile @@ -0,0 +1,5 @@ +DEF=$(basename $@) +KOMPILED_DIR=$(DEF)-kompiled +KDEP_FLAGS= --remake-depend --output-definition OutputDirectoryTest/$(KOMPILED_DIR) --no-prelude + +include ../../../../include/kframework/ktest-kdep.mak diff --git a/pyk/regression-new/kdep-options/remake-depend/a.k b/pyk/regression-new/kdep-options/remake-depend/a.k new file mode 100644 index 00000000000..55db4b155f9 --- /dev/null +++ b/pyk/regression-new/kdep-options/remake-depend/a.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "b.k" + +module A + imports B +endmodule diff --git a/pyk/regression-new/kdep-options/remake-depend/a.k.out b/pyk/regression-new/kdep-options/remake-depend/a.k.out new file mode 100644 index 00000000000..f052c1c27d0 --- /dev/null +++ b/pyk/regression-new/kdep-options/remake-depend/a.k.out @@ -0,0 +1,10 @@ +OutputDirectoryTest/a-kompiled/timestamp : \ + a.k \ + b.k \ + +DEPEND_FILE=$(lastword $(MAKEFILE_LIST)) +$(DEPEND_FILE) : \ + $(wildcard \ + a.k \ + b.k \ + ) diff --git a/pyk/regression-new/kdep-options/remake-depend/b.k b/pyk/regression-new/kdep-options/remake-depend/b.k new file mode 100644 index 00000000000..60af4a042a3 --- /dev/null +++ b/pyk/regression-new/kdep-options/remake-depend/b.k @@ -0,0 +1,3 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module B +endmodule diff --git a/pyk/regression-new/kdep-options/remake-depend/b.k.out b/pyk/regression-new/kdep-options/remake-depend/b.k.out new file mode 100644 index 00000000000..349dbaab699 --- /dev/null +++ b/pyk/regression-new/kdep-options/remake-depend/b.k.out @@ -0,0 +1,8 @@ +OutputDirectoryTest/b-kompiled/timestamp : \ + b.k \ + +DEPEND_FILE=$(lastword $(MAKEFILE_LIST)) +$(DEPEND_FILE) : \ + $(wildcard \ + b.k \ + ) diff --git a/pyk/regression-new/kdep-options/simple/IncludeDirTest/d.k b/pyk/regression-new/kdep-options/simple/IncludeDirTest/d.k new file mode 100644 index 00000000000..67a4c225cb6 --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/IncludeDirTest/d.k @@ -0,0 +1,3 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module D +endmodule diff --git a/pyk/regression-new/kdep-options/simple/Makefile b/pyk/regression-new/kdep-options/simple/Makefile new file mode 100644 index 00000000000..d6d83efa51e --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/Makefile @@ -0,0 +1,5 @@ +DEF=$(basename $@) +KOMPILED_DIR=$(DEF)-kompiled +KDEP_FLAGS= --output-definition OutputDirectoryTest/$(KOMPILED_DIR) --no-prelude -I IncludeDirTest + +include ../../../../include/kframework/ktest-kdep.mak diff --git a/pyk/regression-new/kdep-options/simple/a.k b/pyk/regression-new/kdep-options/simple/a.k new file mode 100644 index 00000000000..8105c1e1cdb --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/a.k @@ -0,0 +1,8 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "b.k" +requires "c.k" + +module A + imports B + imports C +endmodule diff --git a/pyk/regression-new/kdep-options/simple/a.k.out b/pyk/regression-new/kdep-options/simple/a.k.out new file mode 100644 index 00000000000..a499e392e00 --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/a.k.out @@ -0,0 +1,6 @@ +OutputDirectoryTest/a-kompiled/timestamp : \ + IncludeDirTest/d.k \ + a.k \ + b.k \ + c.k \ + diff --git a/pyk/regression-new/kdep-options/simple/b.k b/pyk/regression-new/kdep-options/simple/b.k new file mode 100644 index 00000000000..60af4a042a3 --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/b.k @@ -0,0 +1,3 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module B +endmodule diff --git a/pyk/regression-new/kdep-options/simple/b.k.out b/pyk/regression-new/kdep-options/simple/b.k.out new file mode 100644 index 00000000000..842d5d01bc7 --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/b.k.out @@ -0,0 +1,3 @@ +OutputDirectoryTest/b-kompiled/timestamp : \ + b.k \ + diff --git a/pyk/regression-new/kdep-options/simple/c.k b/pyk/regression-new/kdep-options/simple/c.k new file mode 100644 index 00000000000..568b5e84e0a --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/c.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "d.k" + +module C + imports D +endmodule diff --git a/pyk/regression-new/kdep-options/simple/c.k.out b/pyk/regression-new/kdep-options/simple/c.k.out new file mode 100644 index 00000000000..d9d20a1212c --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/c.k.out @@ -0,0 +1,4 @@ +OutputDirectoryTest/c-kompiled/timestamp : \ + IncludeDirTest/d.k \ + c.k \ + diff --git a/pyk/regression-new/kdep-options/simple/outDirTest.k b/pyk/regression-new/kdep-options/simple/outDirTest.k new file mode 100644 index 00000000000..ef3b5eae2e9 --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/outDirTest.k @@ -0,0 +1,3 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module OUTDIRTEST +endmodule diff --git a/pyk/regression-new/kdep-options/simple/outDirTest.k.out b/pyk/regression-new/kdep-options/simple/outDirTest.k.out new file mode 100644 index 00000000000..595e1a5bb02 --- /dev/null +++ b/pyk/regression-new/kdep-options/simple/outDirTest.k.out @@ -0,0 +1,3 @@ +OutputDirectoryTest/outDirTest-kompiled/timestamp : \ + outDirTest.k \ + diff --git a/pyk/regression-new/kompiled-directory/Makefile b/pyk/regression-new/kompiled-directory/Makefile new file mode 100644 index 00000000000..18cac52339b --- /dev/null +++ b/pyk/regression-new/kompiled-directory/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=default nested +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/kompiled-directory/default/1.test b/pyk/regression-new/kompiled-directory/default/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/kompiled-directory/default/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/kompiled-directory/default/1.test.in b/pyk/regression-new/kompiled-directory/default/1.test.in new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/kompiled-directory/default/1.test.out b/pyk/regression-new/kompiled-directory/default/1.test.out new file mode 100644 index 00000000000..717a3d4863f --- /dev/null +++ b/pyk/regression-new/kompiled-directory/default/1.test.out @@ -0,0 +1,3 @@ + + "test-kompiled" ~> .K + diff --git a/pyk/regression-new/kompiled-directory/default/Makefile b/pyk/regression-new/kompiled-directory/default/Makefile new file mode 100644 index 00000000000..2f2140ad8b0 --- /dev/null +++ b/pyk/regression-new/kompiled-directory/default/Makefile @@ -0,0 +1,10 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS+=--syntax-module TEST +KOMPILE_BACKEND=llvm + +include ../../../../include/kframework/ktest.mak + +CHECK := $(REMOVE_PATHS) $(CHECK) +update-results: CHECK := $(REMOVE_PATHS) $(CHECK) diff --git a/pyk/regression-new/kompiled-directory/default/test.k b/pyk/regression-new/kompiled-directory/default/test.k new file mode 100644 index 00000000000..cc280a0e90b --- /dev/null +++ b/pyk/regression-new/kompiled-directory/default/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + imports K-REFLECTION + + syntax K ::= Int + + rule _:Int => #kompiledDirectory() +endmodule diff --git a/pyk/regression-new/kompiled-directory/nested/1.test b/pyk/regression-new/kompiled-directory/nested/1.test new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/kompiled-directory/nested/1.test @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/kompiled-directory/nested/1.test.in b/pyk/regression-new/kompiled-directory/nested/1.test.in new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/kompiled-directory/nested/1.test.out b/pyk/regression-new/kompiled-directory/nested/1.test.out new file mode 100644 index 00000000000..74be058c8fa --- /dev/null +++ b/pyk/regression-new/kompiled-directory/nested/1.test.out @@ -0,0 +1,3 @@ + + "some/nested/path/test-kompiled" ~> .K + diff --git a/pyk/regression-new/kompiled-directory/nested/Makefile b/pyk/regression-new/kompiled-directory/nested/Makefile new file mode 100644 index 00000000000..a76fb7fb586 --- /dev/null +++ b/pyk/regression-new/kompiled-directory/nested/Makefile @@ -0,0 +1,15 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS+=--syntax-module TEST +DEFDIR=some/nested/path + +include ../../../../include/kframework/ktest.mak + +CHECK := $(REMOVE_PATHS) $(CHECK) +update-results: CHECK := $(REMOVE_PATHS) $(CHECK) + +clean: + rm -rf $(KOMPILED_DIR) .depend-tmp .depend .kompile-* .krun-* .kprove-* kore-exec.tar.gz + cd some/nested/path && rm -rf $(KOMPILED_DIR) .depend-tmp .depend .kompile-* .krun-* .kprove-* kore-exec.tar.gz || true diff --git a/pyk/regression-new/kompiled-directory/nested/test.k b/pyk/regression-new/kompiled-directory/nested/test.k new file mode 100644 index 00000000000..cc280a0e90b --- /dev/null +++ b/pyk/regression-new/kompiled-directory/nested/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + imports K-REFLECTION + + syntax K ::= Int + + rule _:Int => #kompiledDirectory() +endmodule diff --git a/pyk/regression-new/kompiled-directory/some/nested/path/.empty b/pyk/regression-new/kompiled-directory/some/nested/path/.empty new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/kore-brackets/Makefile b/pyk/regression-new/kore-brackets/Makefile new file mode 100644 index 00000000000..8c49b6e9ff6 --- /dev/null +++ b/pyk/regression-new/kore-brackets/Makefile @@ -0,0 +1,8 @@ +DEF=korebrkt +EXT=korebrkt +TESTDIR=. +KOMPILE_BACKEND=kore +export KOMPILE_BACKEND +DEBUG=--debug + +include ../include/ktest.mak diff --git a/pyk/regression-new/kore-brackets/korebrkt.k b/pyk/regression-new/kore-brackets/korebrkt.k new file mode 100644 index 00000000000..9e35ccb2b8b --- /dev/null +++ b/pyk/regression-new/kore-brackets/korebrkt.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module KOREBRKT-SYNTAX + imports INT + + syntax {Sort} Sort ::= "[" Sort "]" [bracket] +endmodule + +module KOREBRKT + imports KOREBRKT-SYNTAX + + configuration $PGM:Int +endmodule diff --git a/pyk/regression-new/kore-issue-2253/Makefile b/pyk/regression-new/kore-issue-2253/Makefile new file mode 100644 index 00000000000..3a72e3aad98 --- /dev/null +++ b/pyk/regression-new/kore-issue-2253/Makefile @@ -0,0 +1,8 @@ +DEF=arr +EXT=arr +TESTDIR=. +KOMPILE_BACKEND=haskell +export KOMPILE_BACKEND +KOMPILE_FLAGS=--syntax-module ARR + +include ../include/ktest.mak diff --git a/pyk/regression-new/kore-issue-2253/arr.k b/pyk/regression-new/kore-issue-2253/arr.k new file mode 100644 index 00000000000..4b91121d5af --- /dev/null +++ b/pyk/regression-new/kore-issue-2253/arr.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "domains.md" + +module ARR + imports DOMAINS + imports ARRAY + imports LIST + + configuration + $PGM:KItem + +endmodule diff --git a/pyk/regression-new/kore-issue-2253/make.arr b/pyk/regression-new/kore-issue-2253/make.arr new file mode 100644 index 00000000000..31a91791ad5 --- /dev/null +++ b/pyk/regression-new/kore-issue-2253/make.arr @@ -0,0 +1 @@ +makeArray(10, 0) [0] diff --git a/pyk/regression-new/kore-issue-2253/make.arr.out b/pyk/regression-new/kore-issue-2253/make.arr.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/kore-issue-2253/make.arr.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/kore-issue-2253/updateAll.arr b/pyk/regression-new/kore-issue-2253/updateAll.arr new file mode 100644 index 00000000000..f7e12750885 --- /dev/null +++ b/pyk/regression-new/kore-issue-2253/updateAll.arr @@ -0,0 +1 @@ +makeArray(10, 0) [0 <- 1] diff --git a/pyk/regression-new/kore-issue-2253/updateAll.arr.out b/pyk/regression-new/kore-issue-2253/updateAll.arr.out new file mode 100644 index 00000000000..65536d800b5 --- /dev/null +++ b/pyk/regression-new/kore-issue-2253/updateAll.arr.out @@ -0,0 +1,3 @@ + + arr ( ListItem ( 1 ) , 10 , 0 ) ~> .K + diff --git a/pyk/regression-new/kprove-append/Makefile b/pyk/regression-new/kprove-append/Makefile new file mode 100644 index 00000000000..999658a5478 --- /dev/null +++ b/pyk/regression-new/kprove-append/Makefile @@ -0,0 +1,8 @@ +DEF=def +EXT=def +KOMPILE_BACKEND=haskell +TESTDIR=. +KPROVE_FLAGS=--spec-module DEF-SPEC +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-append/def-spec.k b/pyk/regression-new/kprove-append/def-spec.k new file mode 100644 index 00000000000..df7007fd3ee --- /dev/null +++ b/pyk/regression-new/kprove-append/def-spec.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DEF-SPEC + imports DEF + claim (a ~> _ => .K) ... +endmodule diff --git a/pyk/regression-new/kprove-append/def-spec.k.out b/pyk/regression-new/kprove-append/def-spec.k.out new file mode 100644 index 00000000000..6ef9eb30615 --- /dev/null +++ b/pyk/regression-new/kprove-append/def-spec.k.out @@ -0,0 +1,9 @@ + #Not ( { + _DotVar1 + #Equals + a ~> _Gen0 ~> _DotVar1 ~> .K + } ) +#And + + a ~> _Gen0 ~> _DotVar1 ~> .K + diff --git a/pyk/regression-new/kprove-append/def.k b/pyk/regression-new/kprove-append/def.k new file mode 100644 index 00000000000..254e64c73a0 --- /dev/null +++ b/pyk/regression-new/kprove-append/def.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "domains.md" + +module DEF-SYNTAX + imports MAP + imports BOOL + + syntax Foo ::= "a" | "b" | "c" +endmodule + +module DEF + imports DEF-SYNTAX + + rule a => b ... +endmodule diff --git a/pyk/regression-new/kprove-branchingAllowed/Makefile b/pyk/regression-new/kprove-branchingAllowed/Makefile new file mode 100644 index 00000000000..8a96f027738 --- /dev/null +++ b/pyk/regression-new/kprove-branchingAllowed/Makefile @@ -0,0 +1,8 @@ +DEF=def +EXT=def +KOMPILE_BACKEND=haskell +TESTDIR=. +KPROVE_FLAGS=--branching-allowed 1 --spec-module DEF-SPEC +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-branchingAllowed/def-spec.k b/pyk/regression-new/kprove-branchingAllowed/def-spec.k new file mode 100644 index 00000000000..a52f86f72fb --- /dev/null +++ b/pyk/regression-new/kprove-branchingAllowed/def-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DEF-SPEC + imports DEF + + claim a => d + +endmodule diff --git a/pyk/regression-new/kprove-branchingAllowed/def-spec.k.out b/pyk/regression-new/kprove-branchingAllowed/def-spec.k.out new file mode 100644 index 00000000000..b007f9d9950 --- /dev/null +++ b/pyk/regression-new/kprove-branchingAllowed/def-spec.k.out @@ -0,0 +1,7 @@ + + b ~> .K + +#Or + + c ~> .K + diff --git a/pyk/regression-new/kprove-branchingAllowed/def.k b/pyk/regression-new/kprove-branchingAllowed/def.k new file mode 100644 index 00000000000..88648cf15f5 --- /dev/null +++ b/pyk/regression-new/kprove-branchingAllowed/def.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DEF-SYNTAX + imports MAP + imports BOOL + + syntax Foo ::= "a" | "b" | "c" | "d" + + configuration $PGM:Foo + + rule a => b + rule a => c + rule b => d + rule c => d + +endmodule + +module DEF + imports DEF-SYNTAX +endmodule diff --git a/pyk/regression-new/kprove-error-status/Makefile b/pyk/regression-new/kprove-error-status/Makefile new file mode 100644 index 00000000000..6ba8e2cb153 --- /dev/null +++ b/pyk/regression-new/kprove-error-status/Makefile @@ -0,0 +1,8 @@ +DEF=verif +EXT=verif +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 | sed -n '/^\[Error\]/p' diff --git a/pyk/regression-new/kprove-error-status/crash-spec.k b/pyk/regression-new/kprove-error-status/crash-spec.k new file mode 100644 index 00000000000..b54482f3006 --- /dev/null +++ b/pyk/regression-new/kprove-error-status/crash-spec.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module CRASH-SPEC + imports VERIF + + claim doIt(foo) => doIt(0) ... + claim crash(foo) => doIt(0) ... + +endmodule diff --git a/pyk/regression-new/kprove-error-status/crash-spec.k.out b/pyk/regression-new/kprove-error-status/crash-spec.k.out new file mode 100644 index 00000000000..b770d0e2a28 --- /dev/null +++ b/pyk/regression-new/kprove-error-status/crash-spec.k.out @@ -0,0 +1 @@ +[Error] Critical: Haskell Backend execution failed with code 1 and produced no output. diff --git a/pyk/regression-new/kprove-error-status/stuck-claim-spec.k b/pyk/regression-new/kprove-error-status/stuck-claim-spec.k new file mode 100644 index 00000000000..53e7e5596c2 --- /dev/null +++ b/pyk/regression-new/kprove-error-status/stuck-claim-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module VERIFICATION + imports VERIF +endmodule + +module STUCK-CLAIM-SPEC + imports VERIFICATION + + claim addCounter(N:Int) => 1 ... + C:Int => ?_ + S:Int => ?S:Int + requires + N >=Int 0 + ensures + ?S ==Int S +Int N *Int C +Int (N -Int 1) *Int N /Int 2 +endmodule diff --git a/pyk/regression-new/kprove-error-status/stuck-claim-spec.k.out b/pyk/regression-new/kprove-error-status/stuck-claim-spec.k.out new file mode 100644 index 00000000000..3bbc4ea66b9 --- /dev/null +++ b/pyk/regression-new/kprove-error-status/stuck-claim-spec.k.out @@ -0,0 +1 @@ +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/kprove-error-status/verif.k b/pyk/regression-new/kprove-error-status/verif.k new file mode 100644 index 00000000000..d7dac9a9a36 --- /dev/null +++ b/pyk/regression-new/kprove-error-status/verif.k @@ -0,0 +1,28 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module VERIF-SYNTAX + imports INT + + syntax Int ::= "foo" [macro] + rule foo => 3 + + syntax Pgm ::= doIt ( Int ) + syntax Pgm ::= addCounter ( Int ) + syntax Pgm ::= crash ( Int ) [function,hook(KREFLECTION.printKORE)] +endmodule + +module VERIF + imports VERIF-SYNTAX + imports BYTES + + configuration $PGM:Pgm 1 0 + + rule addCounter(0) => .K ... + rule addCounter(Times:Int => Times -Int 1) ... + C:Int => C +Int 1 + S:Int => S +Int C + requires Times >Int 0 + + rule doIt(I => I -Int 1) ... requires I >Int 0 + +endmodule diff --git a/pyk/regression-new/kprove-error-status/verif.k.out b/pyk/regression-new/kprove-error-status/verif.k.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/kprove-haskell/sum-spec.k b/pyk/regression-new/kprove-haskell/sum-spec.k new file mode 100644 index 00000000000..46a73cfe5a7 --- /dev/null +++ b/pyk/regression-new/kprove-haskell/sum-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module VERIFICATION + imports VERIF +endmodule + +module SUM-SPEC + imports VERIFICATION + + claim addCounter(N:Int) => .K ... + C:Int => ?_ + S:Int => ?S:Int + requires + N >=Int 0 + ensures + ?S ==Int S +Int N *Int C +Int (N -Int 1) *Int N /Int 2 +endmodule diff --git a/pyk/regression-new/kprove-haskell/sum-spec.k.out b/pyk/regression-new/kprove-haskell/sum-spec.k.out new file mode 100644 index 00000000000..3b312d93000 --- /dev/null +++ b/pyk/regression-new/kprove-haskell/sum-spec.k.out @@ -0,0 +1,13 @@ +APRProof: 3b7070ca4603e18d26d032c0fe64dd71ffadc2c63dae9d57315e8e471a371bd3 + status: ProofStatus.PASSED + admitted: False + nodes: 5 + pending: 0 + failing: 0 + vacuous: 0 + stuck: 0 + terminal: 0 + refuted: 0 + bounded: 0 + execution time: 0s +Subproofs: 0 diff --git a/pyk/regression-new/kprove-java/Makefile b/pyk/regression-new/kprove-java/Makefile new file mode 100644 index 00000000000..84838586f52 --- /dev/null +++ b/pyk/regression-new/kprove-java/Makefile @@ -0,0 +1,13 @@ +DEF=demo +EXT=demo +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module DEMO +KPROVE_FLAGS= + +CONSIDER_PROVER_ERRORS=2>&1 + +export KOMPILE_BACKEND +export KPROVE_FLAGS + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-java/demo.k b/pyk/regression-new/kprove-java/demo.k new file mode 100644 index 00000000000..f398a843904 --- /dev/null +++ b/pyk/regression-new/kprove-java/demo.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DEMO + imports DOMAINS + configuration .K +endmodule diff --git a/pyk/regression-new/kprove-java/rhs-vars-broken-spec.k b/pyk/regression-new/kprove-java/rhs-vars-broken-spec.k new file mode 100644 index 00000000000..b4a817d8c53 --- /dev/null +++ b/pyk/regression-new/kprove-java/rhs-vars-broken-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// test error messages + +requires "demo.k" + +module VERIFICATION + imports DEMO +endmodule + +module RHS-VARS-BROKEN-SPEC + imports VERIFICATION + + claim .K => _ + + claim .K => A +endmodule diff --git a/pyk/regression-new/kprove-java/rhs-vars-broken-spec.k.out b/pyk/regression-new/kprove-java/rhs-vars-broken-spec.k.out new file mode 100644 index 00000000000..0336325a1b5 --- /dev/null +++ b/pyk/regression-new/kprove-java/rhs-vars-broken-spec.k.out @@ -0,0 +1,16 @@ +[Error] Compiler: Found variable _ on right hand side of rule, not bound on left hand side. Did you mean "?_"? + Source(rhs-vars-broken-spec.k) + Location(13,20,13,21) + 13 | claim .K => _ + . ^ +[Error] Compiler: Found variable A on right hand side of rule, not bound on left hand side. Did you mean "?A"? + Source(rhs-vars-broken-spec.k) + Location(15,20,15,21) + 15 | claim .K => A + . ^ +[Warning] Compiler: Variable 'A' defined but not used. Prefix variable name with underscore if this is intentional. + Source(rhs-vars-broken-spec.k) + Location(15,20,15,21) + 15 | claim .K => A + . ^ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/kprove-macro-exp-productions/Makefile b/pyk/regression-new/kprove-macro-exp-productions/Makefile new file mode 100644 index 00000000000..0566eee07bd --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp-productions/Makefile @@ -0,0 +1,11 @@ +DEF=main +EXT=a +TESTDIR=. +RESULTDIR=. + +KOMPILE_FLAGS=--syntax-module MAIN +KOMPILE_BACKEND?=haskell + +KPROVE_FLAGS= + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-macro-exp-productions/main.k b/pyk/regression-new/kprove-macro-exp-productions/main.k new file mode 100644 index 00000000000..f4eac723069 --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp-productions/main.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DATA + imports INT + imports BOOL + + syntax Bool ::= #range ( Int, Int ) [macro] + rule #range(5, I) => 0 <=Int I andBool I 0 <=Int I andBool I $PGM:Pgm + .K + + syntax Pgm ::= "a" | "b" + + rule a => b ... + +endmodule diff --git a/pyk/regression-new/kprove-macro-exp-productions/test-spec.k b/pyk/regression-new/kprove-macro-exp-productions/test-spec.k new file mode 100644 index 00000000000..99d3fe16b46 --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp-productions/test-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "main.k" + +module VERIFICATION + imports MAIN + + rule #range(8, X) => true requires #range(5, X) [smt-lemma, simplification] +endmodule + +module TEST-SPEC + imports VERIFICATION + + claim a => b ... + .K + +endmodule diff --git a/pyk/regression-new/kprove-macro-exp-productions/test-spec.k.out b/pyk/regression-new/kprove-macro-exp-productions/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp-productions/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/kprove-macro-exp/Makefile b/pyk/regression-new/kprove-macro-exp/Makefile new file mode 100644 index 00000000000..0566eee07bd --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp/Makefile @@ -0,0 +1,11 @@ +DEF=main +EXT=a +TESTDIR=. +RESULTDIR=. + +KOMPILE_FLAGS=--syntax-module MAIN +KOMPILE_BACKEND?=haskell + +KPROVE_FLAGS= + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-macro-exp/main.k b/pyk/regression-new/kprove-macro-exp/main.k new file mode 100644 index 00000000000..f4eac723069 --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp/main.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DATA + imports INT + imports BOOL + + syntax Bool ::= #range ( Int, Int ) [macro] + rule #range(5, I) => 0 <=Int I andBool I 0 <=Int I andBool I $PGM:Pgm + .K + + syntax Pgm ::= "a" | "b" + + rule a => b ... + +endmodule diff --git a/pyk/regression-new/kprove-macro-exp/test-spec.k b/pyk/regression-new/kprove-macro-exp/test-spec.k new file mode 100644 index 00000000000..99d3fe16b46 --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp/test-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "main.k" + +module VERIFICATION + imports MAIN + + rule #range(8, X) => true requires #range(5, X) [smt-lemma, simplification] +endmodule + +module TEST-SPEC + imports VERIFICATION + + claim a => b ... + .K + +endmodule diff --git a/pyk/regression-new/kprove-macro-exp/test-spec.k.out b/pyk/regression-new/kprove-macro-exp/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/kprove-macro-exp/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/kprove-markdown/Makefile b/pyk/regression-new/kprove-markdown/Makefile new file mode 100644 index 00000000000..9e5eb4a825d --- /dev/null +++ b/pyk/regression-new/kprove-markdown/Makefile @@ -0,0 +1,8 @@ +DEF=verification +EXT=set-balance +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module SET-BALANCE +TESTDIR=. +KPROVE_FLAGS=--md-selector 'keep&!(discard|k)' + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-markdown/set-balance-spec.md b/pyk/regression-new/kprove-markdown/set-balance-spec.md new file mode 100644 index 00000000000..480047a37a5 --- /dev/null +++ b/pyk/regression-new/kprove-markdown/set-balance-spec.md @@ -0,0 +1,67 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +Balances Module Specifications +============================== + +```keep +module SET-BALANCE-SPEC + imports VERIFICATION +``` + +```k +ignore thie code block! +``` + +### `total_balance` tests + +```keep + claim totalBalance(AID) => 50 + + AID + 30 + 20 + ... + +``` + +### No Zero-Balance Accounts Exist + +This property shows that `set_balance` will not result in a zero-balance attack. +**TODO**: Generalize to any EntryAction. +**TODO**: Assertions about log events. + +```discard + rule set_balance(Root, WHO, FREE_BALANCE', RESERVED_BALANCE') => . ... + TOTAL_ISSUANCE => TOTAL_ISSUANCE +Int ( FREE_BALANCE' -Int FREE_BALANCE ) +Int ( RESERVED_BALANCE' -Int RESERVED_BALANCE ) + EXISTENTIAL_DEPOSIT + + WHO + FREE_BALANCE => FREE_BALANCE' + RESERVED_BALANCE => RESERVED_BALANCE' + ... + + requires #inWidth(96, TOTAL_ISSUANCE +Int (FREE_BALANCE' -Int FREE_BALANCE)) + andBool #inWidth(96, TOTAL_ISSUANCE +Int (FREE_BALANCE' -Int FREE_BALANCE) +Int (RESERVED_BALANCE' -Int RESERVED_BALANCE)) + andBool EXISTENTIAL_DEPOSIT <=Int FREE_BALANCE' + andBool EXISTENTIAL_DEPOSIT <=Int RESERVED_BALANCE' +``` + +```keep + claim set_balance_reserved ( WHO , RESERVED_BALANCE' ) => .K ... + EXISTENTIAL_DEPOSIT + TOTAL_ISSUANCE +Int ( FREE_BALANCE' -Int FREE_BALANCE ) => TOTAL_ISSUANCE +Int ( FREE_BALANCE' -Int FREE_BALANCE ) +Int ( RESERVED_BALANCE' -Int RESERVED_BALANCE ) + + WHO + FREE_BALANCE' + RESERVED_BALANCE => RESERVED_BALANCE' + ... + + requires #inWidth(96, TOTAL_ISSUANCE +Int (FREE_BALANCE' -Int FREE_BALANCE) +Int (RESERVED_BALANCE' -Int RESERVED_BALANCE)) + andBool EXISTENTIAL_DEPOSIT <=Int RESERVED_BALANCE' +``` + +```keep +endmodule +``` diff --git a/pyk/regression-new/kprove-markdown/set-balance-spec.md.out b/pyk/regression-new/kprove-markdown/set-balance-spec.md.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/kprove-markdown/set-balance-spec.md.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/kprove-markdown/set-balance.md b/pyk/regression-new/kprove-markdown/set-balance.md new file mode 100644 index 00000000000..70de4bea28d --- /dev/null +++ b/pyk/regression-new/kprove-markdown/set-balance.md @@ -0,0 +1,768 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +`set_balance` spec +================== + +State Model +----------- + +```k + +module SET-BALANCE + imports INT + imports DOMAINS + imports COLLECTIONS + + configuration + + $ACTION:Action + 0 + .List + .Result + .List + 0 + 0 + 0 + 0 + + + .AccountId:AccountId + 0 + 0 + 0 + 0 + 0 + .Nonce + .Set + + + +``` + +Data +---- + +- An `AccountId` is an `Int`. +- An `Origin` is an `AccountId`, `Root`, or `None`. +- A `Nonce` is an optional `Int`. +- An `Event` records some happenning. + +```k + syntax AccountId ::= ".AccountId" | Int + // --------------------------------------- + + syntax Origin ::= AccountId | ".Root" | ".None" + // ----------------------------------------------- + + syntax Nonce ::= ".Nonce" | Int + // ------------------------------- + + syntax Event ::= DustEvent ( Int ) + // ---------------------------------- +``` + +Some predicates which help specifying behavior: + +- `#inWidth`: Specify that a given number is in some bitwidth. + +```k + syntax Bool ::= #inWidth(Int, Int) [function, total] + // --------------------------------------------------------- + rule #inWidth(N, M) => 0 <=Int M andBool M free_balance(WHO) +Int reserved_balance(WHO) +``` + +### `free_balance` + +Gets the free balance of an account. + +Other than when this module is executing, this will never be strictly between +`EXISTENTIAL_DEPOSIT` and zero. + +```k + syntax Int ::= "free_balance" "(" AccountId ")" [function, total] + // ---------------------------------------------------------------------- + rule free_balance(_) => 0 [owise] + rule [[ free_balance(WHO) => FREE_BALANCE ]] + + WHO + FREE_BALANCE + ... + +``` + +### `reserved_balance` + +Gets the reserved balance of an account. + +Other than when this module is executing, this will never be strictly between +`EXISTENTIAL_DEPOSIT` and zero. + +```k + syntax Int ::= "reserved_balance" "(" AccountId ")" [function, total] + // -------------------------------------------------------------------------- + rule reserved_balance(_) => 0 [owise] + rule [[ reserved_balance(WHO) => FREE_BALANCE ]] + + WHO + FREE_BALANCE + ... + +``` + +### `can_slash` + +Determines if an account’s free balance is over the value provided. This is +often used to determine if an account has enough balance to cover a potential +slash, hence the name. + +```k + syntax Bool ::= "can_slash" "(" AccountId "," Int ")" [function, total] + // ---------------------------------------------------------------------------- + rule can_slash(_, _) => false + rule [[ can_slash(WHO, AMOUNT) => FREE_BALANCE >=Int AMOUNT ]] + + WHO + FREE_BALANCE + ... + +``` + +### `total_issuance` + +Retrieves the total outstanding amount of currency outstanding. This will +always be equal to the sum of all free and reserved balances in all active +accounts, except when the balances module is executing. + +```k + syntax Int ::= "total_issuance" [function, total] + // ------------------------------------------------------ + rule [[ total_issuance => TOTAL_ISSUANCE ]] + TOTAL_ISSUANCE +``` + +### `issue` + +Issues currency, creating an imbalance. + +This is not specified, since these semantics do not include the concept of an +imbalance. Without the concept of destructors and move semantics, it would be +almost impossible to use correctly. + +### `burn` + +Burns currency. + +This is not part of the semantics for the same reason `burn` is not. + +Actions and Results +------------------- + +An `Action` is an execution step (or the result of an execution step). +An `EntryAction` is an `Action` that can be invoked externally. +A `Result` is considered an `Action`, as is an `EntryAction`. + +```k + syntax Action ::= Result | EntryAction + // -------------------------------------- +``` + +### `account_exists` + +```k + syntax Bool ::= "account_exists" "(" AccountId ")" [function, total] + // ------------------------------------------------------------------------- + rule account_exists(_) => false [owise] + rule [[ account_exists(WHO) => true ]] + WHO ... +``` + +### `create_account` + +```k + syntax Action ::= "create_account" "(" AccountId ")" + // ---------------------------------------------------- + rule create_account(WHO) => .K ... + ( .Bag => WHO ... ) ... +``` + +### `set_free_balance` + +- Updates an accounts balance if the new balance is above the existential threshold. +- Kills the account if the balance goes below the existential threshold and the reserved balance is non-zero. +- Reaps the account if the balance goes below the existential threshold and the reserved balance is zero. + +```k + syntax Action ::= "set_free_balance" "(" AccountId "," Int ")" + // -------------------------------------------------------------- + rule (.K => create_account(WHO)) ~> set_free_balance(WHO, _) ... + requires notBool account_exists(WHO) + + rule [free-account-updated]: + set_free_balance(WHO, BALANCE) => .K ... + EXISTENTIAL_DEPOSIT + + WHO + _ => BALANCE + ... + + requires EXISTENTIAL_DEPOSIT <=Int BALANCE + + rule [free-account-killed]: + set_free_balance(WHO, BALANCE) => .K ... + ... (.List => ListItem(DustEvent(FREE_BALANCE))) + EXISTENTIAL_DEPOSIT + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int BALANCE + + WHO + _ => .Nonce + FREE_BALANCE => 0 + RESERVED_BALANCE + ... + + requires BALANCE set_free_balance(WHO, BALANCE) => .K ... + ... (.List => ListItem(DustEvent(FREE_BALANCE))) + EXISTENTIAL_DEPOSIT + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int BALANCE + + ( + WHO + FREE_BALANCE + 0 + ... + + => .Bag + ) + ... + + requires BALANCE (.K => create_account(WHO)) ~> set_reserved_balance(WHO, _) ... + requires notBool account_exists(WHO) + + rule [reserved-account-updated]: + set_reserved_balance(WHO, BALANCE) => .K ... + EXISTENTIAL_DEPOSIT + + WHO + _ => BALANCE + ... + + requires EXISTENTIAL_DEPOSIT <=Int BALANCE + + rule [reserved-account-killed]: + set_reserved_balance(WHO, BALANCE) => .K ... + ... (.List => ListItem(DustEvent(RESERVED_BALANCE))) + EXISTENTIAL_DEPOSIT + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int BALANCE + + WHO + _ => .Nonce + FREE_BALANCE + RESERVED_BALANCE => 0 + ... + + requires BALANCE set_reserved_balance(WHO, BALANCE) => .K ... + ... (.List => ListItem(DustEvent(RESERVED_BALANCE))) + EXISTENTIAL_DEPOSIT + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int BALANCE + + ( + WHO + 0 + RESERVED_BALANCE + ... + + => .Bag + ) + ... + + requires BALANCE set_balance(_, WHO, FREE_BALANCE, RESERVED_BALANCE) + => set_balance_free(WHO, FREE_BALANCE) + ~> set_balance_reserved(WHO, RESERVED_BALANCE) + ... + +``` + +Helpers for calling `set_free_balance` and `set_reserved_balance`. + +* Sets the new free balance +* Emits an imbalance event +* Helper function for `set_balance` + +```k + syntax Action ::= "set_balance_free" "(" AccountId "," Int ")" + syntax Action ::= "set_balance_reserved" "(" AccountId "," Int ")" + // ------------------------------------------------------------------ + rule [balance-set-free]: + set_balance_free(WHO, FREE_BALANCE') => set_free_balance(WHO, FREE_BALANCE') ... + ISSUANCE => ISSUANCE +Int (FREE_BALANCE' -Int free_balance(WHO)) + requires #inWidth(96, ISSUANCE +Int (FREE_BALANCE' -Int free_balance(WHO))) + + rule [balance-set-reserved]: + set_balance_reserved(WHO, RESERVED_BALANCE') => set_reserved_balance(WHO, RESERVED_BALANCE') ... + ISSUANCE => ISSUANCE +Int (RESERVED_BALANCE' -Int reserved_balance(WHO)) + requires #inWidth(96, ISSUANCE +Int (RESERVED_BALANCE' -Int reserved_balance(WHO))) +``` + +### `transfer_raw` + +Transfer some liquid free balance to another account. + +`transfer` will set the `FreeBalance` of the sender and receiver. +It will decrease the total issuance of the system by the `TransferFee`. +If the sender's account is below the existential deposit as a result +of the transfer, the account will be reaped. + +The dispatch origin for this call must be `Signed` by the transactor. + +```k + syntax ExistenceRequirement ::= "AllowDeath" + | "KeepAlive" + + syntax EntryAction ::= transfer(Origin, AccountId, Int) + | "transfer_keep_alive" "(" Origin "," AccountId "," Int ")" + // --------------------------------------------------------------------------------- + + syntax Action ::= rawTransfer(AccountId, AccountId, Int, ExistenceRequirement) + // ------------------------------------------------------------------------------ + rule [transfer-to-raw]: + transfer(ORIGIN:AccountId, DESTINATION, AMOUNT) + => rawTransfer(ORIGIN, DESTINATION, AMOUNT, AllowDeath) + ... + + + rule [transfer-keep-alive]: + transfer_keep_alive(ORIGIN:AccountId, DESTINATION, AMOUNT) + => rawTransfer(ORIGIN, DESTINATION, AMOUNT, KeepAlive) + ... + + + rule (.K => create_account(DESTINATION)) ~> rawTransfer(ORIGIN, DESTINATION, _, _) ... + requires account_exists(ORIGIN) + andBool notBool account_exists(DESTINATION) + + rule [transfer-self]: + rawTransfer(ORIGIN:AccountId, ORIGIN, _, _) => .K ... + requires account_exists(ORIGIN) + + rule [transfer-existing-account]: + rawTransfer(ORIGIN, DESTINATION, AMOUNT, EXISTENCE_REQUIREMENT) + => set_free_balance(ORIGIN, SOURCE_BALANCE -Int AMOUNT -Int FEE) + ~> set_free_balance(DESTINATION, DESTINATION_BALANCE +Int AMOUNT) + ... + + ISSUANCE => ISSUANCE -Int FEE + EXISTENTIAL_DEPOSIT + FEE + + + ORIGIN + SOURCE_BALANCE + ... + + + DESTINATION + DESTINATION_BALANCE + ... + + + requires ORIGIN =/=K DESTINATION + andBool DESTINATION_BALANCE >Int 0 + andBool SOURCE_BALANCE >=Int (AMOUNT +Int FEE) + andBool ensure_can_withdraw(ORIGIN, Transfer, SOURCE_BALANCE -Int AMOUNT -Int FEE) + andBool (EXISTENCE_REQUIREMENT ==K AllowDeath orBool SOURCE_BALANCE -Int AMOUNT -Int FEE >Int EXISTENTIAL_DEPOSIT) + + rule [transfer-create-account]: + rawTransfer(ORIGIN:AccountId, DESTINATION, AMOUNT, EXISTENCE_REQUIREMENT) + => set_free_balance(ORIGIN, SOURCE_BALANCE -Int AMOUNT -Int CREATION_FEE) + ~> set_free_balance(DESTINATION, AMOUNT) + ... + + ISSUANCE => ISSUANCE -Int CREATION_FEE + EXISTENTIAL_DEPOSIT + CREATION_FEE + + + ORIGIN + SOURCE_BALANCE + ... + + + DESTINATION + 0 + 0 + ... + + ... + + requires ORIGIN =/=K DESTINATION + andBool SOURCE_BALANCE >=Int (AMOUNT +Int CREATION_FEE) + andBool EXISTENTIAL_DEPOSIT <=Int AMOUNT + andBool ensure_can_withdraw(ORIGIN, Transfer, SOURCE_BALANCE -Int AMOUNT -Int CREATION_FEE) + andBool (EXISTENCE_REQUIREMENT ==K AllowDeath orBool SOURCE_BALANCE -Int AMOUNT -Int CREATION_FEE >=Int EXISTENTIAL_DEPOSIT) +``` + +### `force_transfer` + +Force a transfer from any account to any other account. This can only be done by root. + +```k + syntax EntryAction ::= "force_transfer" "(" Origin "," AccountId "," AccountId "," Int ")" + // ------------------------------------------------------------------------------------------ + rule [force-transfer]: + force_transfer(.Root, SOURCE, DESTINATION, AMOUNT) => transfer(SOURCE, DESTINATION, AMOUNT) ... +``` + +### `withdraw` + +Withdraw funds from an account. + +```k + syntax EntryAction ::= withdraw(AccountId, Int, WithdrawReason, ExistenceRequirement) + // ------------------------------------------------------------------------------------- + rule [withdraw]: // K really needs where clauses + withdraw(WHO, AMOUNT, REASON, EXISTENCE_REQUIREMENT) + => withdrawInner(WHO, AMOUNT, AMOUNT -Int free_balance(WHO), REASON, EXISTENCE_REQUIREMENT) + ... + + + syntax Action ::= withdrawInner(AccountId, Int, Int, WithdrawReason, ExistenceRequirement) + // ------------------------------------------------------------------------------------------ + rule [withdrawInner]: + withdrawInner(WHO, AMOUNT, NEW_BALANCE, REASON, EXISTENCE_REQUIREMENT) + => set_free_balance(WHO, NEW_BALANCE) + ... + + ISSUANCE => ISSUANCE -Int AMOUNT + EXISTENTIAL_DEPOSIT + requires NEW_BALANCE >=Int 0 + andBool ensure_can_withdraw(WHO, REASON, NEW_BALANCE) + andBool (EXISTENCE_REQUIREMENT ==K AllowDeath orBool NEW_BALANCE >=Int EXISTENTIAL_DEPOSIT) +``` + +Call Frames +----------- + +Function call and return. + +```k + syntax CallFrame ::= frame(continuation: K) + syntax Action ::= call ( Action ) + | return ( Result ) + // ----------------------------------- + rule [call]: + call(Action) ~> CONT => Action + .List => ListItem(frame(CONT)) ... + + rule [return]: + return(R) ~> _ => CONT + _ => R + ListItem(frame(CONT)) => .List ... + + rule [return-unit]: + .K => CONT + _ => .Result + ListItem(frame(CONT)) => .List ... +``` + +Ensure that a given amount can be withdrawn from an account. + +**FIXME**: we do not account for multiple withdrawl reasons, due to K’s +lacking polymorphism. + +```k + syntax WithdrawReason ::= "TransactionPayment" + | "Transfer" + | "Reserve" + | "Fee" + | "Tip" + // ------------------------------- + + + syntax Bool ::= "ensure_can_withdraw" "(" AccountId "," WithdrawReason "," Int ")" [function, total] + // --------------------------------------------------------------------------------------------------------- + rule ensure_can_withdraw(_, _, _) => true [owise] + + rule [[ ensure_can_withdraw(WHO, Transfer #Or Reserve, BALANCE) => false ]] + + WHO + VESTING_BALANCE + ... + + requires VESTING_BALANCE false ]] + NOW + + WHO + ACCOUNT_LOCKS + ... + + requires activeLocks(ACCOUNT_LOCKS, NOW, REASON, BALANCE) + + syntax LockID ::= "Election" + | "Staking" + | "Democracy" + | "Phragmen" + // ---------------------------- + + syntax AccountLock ::= lock ( id: LockID, until: Int, amount: Int, reasons: Set ) + // --------------------------------------------------------------------------------- + + syntax Bool ::= activeLock (AccountLock, Int, WithdrawReason, Int ) [function] + | activeLocks(Set, Int, WithdrawReason, Int ) [function] + | activeLocks(List, Int, WithdrawReason, Int, Bool) [function, klabel(activeLocksAux)] + // ----------------------------------------------------------------------------------------------------------- + rule activeLock(AL, NOW, REASON, BALANCE) => NOW activeLocks(Set2List(ALS), NOW, REASON, BALANCE, false) + + rule activeLocks(.List, _, _, _, RESULT) => RESULT + rule activeLocks((ListItem(AL) => .List) _, NOW, REASON, BALANCE, RESULT => RESULT orBool activeLock(AL, NOW, REASON, BALANCE)) +``` + +Slashing and repatriation of reserved balances +---------------------------------------------- + +The first of these is also used by `slash`. + +* `slash_reserved` +* `repatriate_reserved` + +```k + syntax Action ::= "slash_reserved" "(" AccountId "," Int ")" + // ------------------------------------------------------------ + rule [slash-reserved]: + slash_reserved(ACCOUNT, AMOUNT) + => set_reserved_balance(ACCOUNT, maxInt(0, RESERVED_BALANCE -Int AMOUNT)) + ... + + + + ACCOUNT + RESERVED_BALANCE + ... + + + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int minInt(RESERVED_BALANCE, AMOUNT) + + syntax Action ::= "repatriate_reserved" "(" AccountId "," AccountId "," Int ")" + // ------------------------------------------------------------------------------- + rule [repatriate-reserved]: + repatriate_reserved(SLASHED, BENEFICIARY, AMOUNT) + => set_free_balance(BENEFICIARY, BENEFICIARY_FREE_BALANCE +Int minInt(SLASHED_RESERVED_BALANCE, AMOUNT)) + ~> set_reserved_balance(SLASHED, SLASHED_RESERVED_BALANCE -Int minInt(SLASHED_RESERVED_BALANCE, AMOUNT)) + ... + + + + SLASHED + SLASHED_RESERVED_BALANCE + ... + + + BENEFICIARY + BENEFICIARY_RESERVED_BALANCE + BENEFICIARY_FREE_BALANCE + ... + + + requires BENEFICIARY_FREE_BALANCE +Int BENEFICIARY_RESERVED_BALANCE >Int 0 + andBool SLASHED =/=K BENEFICIARY + + rule [repatriate-reserved-same-account]: + repatriate_reserved(SLASHED, SLASHED, AMOUNT) => unreserve(SLASHED, AMOUNT) ... +``` + +### Slashing + +Used to punish a node for violating the protocol. + +```k + syntax EntryAction ::= slash ( AccountId , Int ) + // ------------------------------------------------ + rule [slash]: + slash(ACCOUNT, AMOUNT) => set_free_balance(ACCOUNT, FREE_BALANCE -Int AMOUNT) ... + + + ACCOUNT + FREE_BALANCE + ... + + + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int AMOUNT + requires FREE_BALANCE >=Int AMOUNT + + rule [slash-empty-free]: + slash(ACCOUNT, AMOUNT) + => set_free_balance(ACCOUNT, 0) + ~> slash_reserved(ACCOUNT, AMOUNT -Int FREE_BALANCE) + ... + + + + ACCOUNT + FREE_BALANCE + ... + + + TOTAL_ISSUANCE => TOTAL_ISSUANCE -Int FREE_BALANCE + requires FREE_BALANCE reserve(ACCOUNT, AMOUNT) + => set_reserved_balance(ACCOUNT, FREE_BALANCE +Int AMOUNT) + ~> set_free_balance(ACCOUNT, FREE_BALANCE -Int AMOUNT) + ... + + + + ACCOUNT + FREE_BALANCE + _ + ... + + + requires FREE_BALANCE >=Int AMOUNT + andBool ensure_can_withdraw(ACCOUNT, Reserve, FREE_BALANCE -Int AMOUNT) + + syntax Action ::= unreserve ( AccountId , Int ) + // ----------------------------------------------- + rule [unreserve]: + unreserve(ACCOUNT, AMOUNT) + => set_free_balance(ACCOUNT, FREE_BALANCE +Int minInt(AMOUNT, RESERVED_BALANCE)) + ~> set_reserved_balance(ACCOUNT, FREE_BALANCE -Int minInt(AMOUNT, RESERVED_BALANCE)) + ... + + + + ACCOUNT + FREE_BALANCE + RESERVED_BALANCE + ... + + +``` + +Vesting +------- + +* `locked_at` ― amount currently locked +* `vesting_balance` ― get the balance that cannot currently be withdrawn. + +```k + syntax Int ::= "locked_at" "(" AccountId ")" [function, total] + // ------------------------------------------------------------------- + rule [[ locked_at(WHO) => maxInt(0, VESTING_BALANCE -Int (PER_BLOCK *Int maxInt(0, NOW -Int STARTING_BLOCK))) ]] + NOW + + WHO + VESTING_BALANCE + STARTING_BLOCK + PER_BLOCK + ... + + + syntax Int ::= "vesting_balance" "(" AccountId ")" [function, total] + // ------------------------------------------------------------------------- + rule [[ vesting_balance(WHO) => minInt(FREE_BALANCE, locked_at(WHO)) ]] + + WHO + FREE_BALANCE + ... + +``` + +Deposits +-------- + +Deposit into an existing account. + +```k + syntax EntryAction ::= "deposit_into_existing" "(" AccountId "," Int ")" + // ------------------------------------------------------------------------ + rule [deposit-into-existing]: + deposit_into_existing(WHO, AMOUNT) => .K ... + TOTAL_ISSUANCE => TOTAL_ISSUANCE +Int AMOUNT + + WHO + FREE_BALANCE => FREE_BALANCE +Int AMOUNT + ... + + requires FREE_BALANCE >Int 0 +``` + +End of module + +```k +endmodule +``` diff --git a/pyk/regression-new/kprove-markdown/verification.k b/pyk/regression-new/kprove-markdown/verification.k new file mode 100644 index 00000000000..5f2eafcc7c9 --- /dev/null +++ b/pyk/regression-new/kprove-markdown/verification.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "set-balance.md" + +module VERIFICATION + imports SET-BALANCE + + syntax Action ::= totalBalance ( AccountId ) + // -------------------------------------------- + rule totalBalance(AID) => total_balance(AID) ... +endmodule diff --git a/pyk/regression-new/kprove-smt-lemma/Makefile b/pyk/regression-new/kprove-smt-lemma/Makefile new file mode 100644 index 00000000000..4a4a7fdf418 --- /dev/null +++ b/pyk/regression-new/kprove-smt-lemma/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/kprove-smt-lemma/haskell/Makefile b/pyk/regression-new/kprove-smt-lemma/haskell/Makefile new file mode 100644 index 00000000000..24ea2ac400a --- /dev/null +++ b/pyk/regression-new/kprove-smt-lemma/haskell/Makefile @@ -0,0 +1,8 @@ +DEF=verif +EXT=verif +TESTDIR=../tests +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module VERIF +export KORE_EXEC_OPTS=--log-level error + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/kprove-smt-lemma/haskell/verif.k b/pyk/regression-new/kprove-smt-lemma/haskell/verif.k new file mode 120000 index 00000000000..0b4de4b270a --- /dev/null +++ b/pyk/regression-new/kprove-smt-lemma/haskell/verif.k @@ -0,0 +1 @@ +../verif.k \ No newline at end of file diff --git a/pyk/regression-new/kprove-smt-lemma/tests/test-spec.k b/pyk/regression-new/kprove-smt-lemma/tests/test-spec.k new file mode 100644 index 00000000000..a6404d35eaf --- /dev/null +++ b/pyk/regression-new/kprove-smt-lemma/tests/test-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SPEC + imports VERIF + + claim step foo(_) => ok ... +endmodule diff --git a/pyk/regression-new/kprove-smt-lemma/tests/test-spec.k.out b/pyk/regression-new/kprove-smt-lemma/tests/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/kprove-smt-lemma/tests/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/kprove-smt-lemma/verif.k b/pyk/regression-new/kprove-smt-lemma/verif.k new file mode 100644 index 00000000000..6ba89635105 --- /dev/null +++ b/pyk/regression-new/kprove-smt-lemma/verif.k @@ -0,0 +1,22 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module VERIF + imports DOMAINS + + configuration $PGM:Pgm + + syntax Pgm ::= "step" Int + | "ok" + | "fail" + rule step I => ok ... + requires I step I => ok ... + requires I ==Int 1 + rule step I => fail ... + requires notBool (I I %Int 2 [concrete] + rule foo(_) true [simplification, smt-lemma] + +endmodule diff --git a/pyk/regression-new/kprove-var-equals/Makefile b/pyk/regression-new/kprove-var-equals/Makefile new file mode 100644 index 00000000000..c7dbb1b61df --- /dev/null +++ b/pyk/regression-new/kprove-var-equals/Makefile @@ -0,0 +1,8 @@ +DEF=var-eq +EXT=test +KOMPILE_FLAGS=--syntax-module VAR-EQ +KOMPILE_BACKEND?=haskell + +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/kprove-var-equals/var-eq-spec.k b/pyk/regression-new/kprove-var-equals/var-eq-spec.k new file mode 100644 index 00000000000..cc0d4b4dae0 --- /dev/null +++ b/pyk/regression-new/kprove-var-equals/var-eq-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +//Test that 2 vars with the same name but different sort are distinct. +//Before te fix they got mixed up in the [trusted] rules, in Java Backend, due to function caching+spec rule pre-processing. + +requires "var-eq.k" + +module VAR-EQ-SPEC + imports VAR-EQ + + claim _VAR:ATerm => a3 ... [trusted] + claim _VAR:BTerm => b3 ... [trusted] + + claim a1 => a3 ... + claim b1 => b3 ... + +endmodule diff --git a/pyk/regression-new/kprove-var-equals/var-eq-spec.k.out b/pyk/regression-new/kprove-var-equals/var-eq-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/kprove-var-equals/var-eq-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/kprove-var-equals/var-eq.k b/pyk/regression-new/kprove-var-equals/var-eq.k new file mode 100644 index 00000000000..5c8b4309761 --- /dev/null +++ b/pyk/regression-new/kprove-var-equals/var-eq.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module VAR-EQ + + configuration + $PGM:K + + + syntax ATerm ::= "a1" | "a2" | "a3" + syntax BTerm ::= "b1" | "b2" | "b3" + + rule a1 => a2 + rule b1 => b2 + +endmodule diff --git a/pyk/regression-new/krun-deserialize/Makefile b/pyk/regression-new/krun-deserialize/Makefile new file mode 100644 index 00000000000..e965fcf585b --- /dev/null +++ b/pyk/regression-new/krun-deserialize/Makefile @@ -0,0 +1,9 @@ +MAKEFILE_PATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +DEF=imp +EXT=imp +TESTDIR=. +KOMPILE_BACKEND=llvm +export KOMPILE_BACKEND +KRUN_FLAGS=--parser "cat" + +include ../include/ktest.mak diff --git a/pyk/regression-new/krun-deserialize/imp.k b/pyk/regression-new/krun-deserialize/imp.k new file mode 100644 index 00000000000..c7391ae1ebe --- /dev/null +++ b/pyk/regression-new/krun-deserialize/imp.k @@ -0,0 +1,66 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module IMP-SYNTAX + imports DOMAINS-SYNTAX + + syntax AExp ::= Int | Id + | "-" Int [format(%1%2)] + | AExp "/" AExp [left, strict, color(pink)] + > AExp "+" AExp [left, strict, color(pink)] + | "(" AExp ")" [bracket] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict, color(pink)] + | "!" BExp [strict, color(pink)] + > BExp "&&" BExp [left, strict(1), color(pink)] + | "(" BExp ")" [bracket] + syntax Block ::= "{" "}" + | "{" Stmt "}" [format(%1%i%n%2%d%n%3)] + syntax Stmt ::= Block + | Id "=" AExp ";" [strict(2), color(pink), format(%1 %2 %3%4)] + | "if" "(" BExp ")" + Block "else" Block [strict(1), colors(yellow, white, white, yellow), format(%1 %2%3%4 %5 %6 %7)] + | "while" "(" BExp ")" Block [colors(yellow,white,white), format(%1 %2%3%4 %5)] + > Stmt Stmt [left, format(%1%n%2)] + + syntax Pgm ::= "int" Ids ";" Stmt [format(%1 %2%3%n%4), colors(yellow,pink)] + syntax Ids ::= List{Id,","} [format(%1%2 %3)] +endmodule + +module IMP + imports IMP-SYNTAX + imports DOMAINS + + syntax KResult ::= Int | Bool + + configuration + $PGM:Pgm + .Map + + + rule X:Id => I ... ... X |-> I ... + + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I1 => 0 -Int I1 + + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false + + rule {} => .K + rule {S} => S + + rule X = I:Int; => .K ... ... X |-> (_ => I) ... + + rule S1:Stmt S2:Stmt => S1 ~> S2 + + rule if (true) S else _ => S + rule if (false) _ else S => S + + rule while (B) S => if (B) {S while (B) S} else {} + + rule int (X,Xs => Xs);_ Rho:Map (.Map => X|->0) + requires notBool (X in keys(Rho)) + rule int .Ids; S => S +endmodule diff --git a/pyk/regression-new/krun-deserialize/sum.kore.imp b/pyk/regression-new/krun-deserialize/sum.kore.imp new file mode 100644 index 00000000000..4118ccef45e --- /dev/null +++ b/pyk/regression-new/krun-deserialize/sum.kore.imp @@ -0,0 +1 @@ +Lblint'UndsSClnUndsUnds'IMP-SYNTAX'Unds'Pgm'Unds'Ids'Unds'Stmt{}(Lbl'UndsCommUndsUnds'IMP-SYNTAX'Unds'Ids'Unds'Id'Unds'Ids{}(\dv{SortId{}}("n"),Lbl'UndsCommUndsUnds'IMP-SYNTAX'Unds'Ids'Unds'Id'Unds'Ids{}(\dv{SortId{}}("sum"),Lbl'Stop'List'LBraQuotUndsCommUndsUnds'IMP-SYNTAX'Unds'Ids'Unds'Id'Unds'Ids'QuotRBraUnds'Ids{}())),Lbl'UndsUndsUnds'IMP-SYNTAX'Unds'Stmt'Unds'Stmt'Unds'Stmt{}(Lbl'UndsUndsUnds'IMP-SYNTAX'Unds'Stmt'Unds'Stmt'Unds'Stmt{}(Lbl'UndsEqlsUndsSClnUnds'IMP-SYNTAX'Unds'Stmt'Unds'Id'Unds'AExp{}(\dv{SortId{}}("n"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("100"))),Lbl'UndsEqlsUndsSClnUnds'IMP-SYNTAX'Unds'Stmt'Unds'Id'Unds'AExp{}(\dv{SortId{}}("sum"),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lblwhile'LParUndsRParUndsUnds'IMP-SYNTAX'Unds'Stmt'Unds'BExp'Unds'Block{}(Lbl'BangUndsUnds'IMP-SYNTAX'Unds'BExp'Unds'BExp{}(Lbl'Unds-LT-EqlsUndsUnds'IMP-SYNTAX'Unds'BExp'Unds'AExp'Unds'AExp{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("n")),inj{SortInt{}, SortAExp{}}(\dv{SortInt{}}("0")))),Lbl'LBraUndsRBraUnds'IMP-SYNTAX'Unds'Block'Unds'Stmt{}(Lbl'UndsUndsUnds'IMP-SYNTAX'Unds'Stmt'Unds'Stmt'Unds'Stmt{}(Lbl'UndsEqlsUndsSClnUnds'IMP-SYNTAX'Unds'Stmt'Unds'Id'Unds'AExp{}(\dv{SortId{}}("sum"),Lbl'UndsPlusUndsUnds'IMP-SYNTAX'Unds'AExp'Unds'AExp'Unds'AExp{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("sum")),inj{SortId{}, SortAExp{}}(\dv{SortId{}}("n")))),Lbl'UndsEqlsUndsSClnUnds'IMP-SYNTAX'Unds'Stmt'Unds'Id'Unds'AExp{}(\dv{SortId{}}("n"),Lbl'UndsPlusUndsUnds'IMP-SYNTAX'Unds'AExp'Unds'AExp'Unds'AExp{}(inj{SortId{}, SortAExp{}}(\dv{SortId{}}("n")),Lbl-'UndsUnds'IMP-SYNTAX'Unds'AExp'Unds'Int{}(\dv{SortInt{}}("1"))))))))) \ No newline at end of file diff --git a/pyk/regression-new/krun-deserialize/sum.kore.imp.out b/pyk/regression-new/krun-deserialize/sum.kore.imp.out new file mode 100644 index 00000000000..d6373fd27e4 --- /dev/null +++ b/pyk/regression-new/krun-deserialize/sum.kore.imp.out @@ -0,0 +1,9 @@ + + + .K + + + n |-> 0 + sum |-> 5050 + + diff --git a/pyk/regression-new/let-priority/1.test b/pyk/regression-new/let-priority/1.test new file mode 100644 index 00000000000..b7be391e808 --- /dev/null +++ b/pyk/regression-new/let-priority/1.test @@ -0,0 +1 @@ +test(49) diff --git a/pyk/regression-new/let-priority/1.test.out b/pyk/regression-new/let-priority/1.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/let-priority/1.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/let-priority/2.test b/pyk/regression-new/let-priority/2.test new file mode 100644 index 00000000000..4b51aa768e9 --- /dev/null +++ b/pyk/regression-new/let-priority/2.test @@ -0,0 +1 @@ +test(50) diff --git a/pyk/regression-new/let-priority/2.test.out b/pyk/regression-new/let-priority/2.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/let-priority/2.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/let-priority/3.test b/pyk/regression-new/let-priority/3.test new file mode 100644 index 00000000000..6e85bfd19ae --- /dev/null +++ b/pyk/regression-new/let-priority/3.test @@ -0,0 +1 @@ +test(51) diff --git a/pyk/regression-new/let-priority/3.test.out b/pyk/regression-new/let-priority/3.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/let-priority/3.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/let-priority/4.test b/pyk/regression-new/let-priority/4.test new file mode 100644 index 00000000000..d6e7b662819 --- /dev/null +++ b/pyk/regression-new/let-priority/4.test @@ -0,0 +1 @@ +test(99) diff --git a/pyk/regression-new/let-priority/4.test.out b/pyk/regression-new/let-priority/4.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/let-priority/4.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/let-priority/5.test b/pyk/regression-new/let-priority/5.test new file mode 100644 index 00000000000..19391d8ff14 --- /dev/null +++ b/pyk/regression-new/let-priority/5.test @@ -0,0 +1 @@ +test(100) diff --git a/pyk/regression-new/let-priority/5.test.out b/pyk/regression-new/let-priority/5.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/let-priority/5.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/let-priority/6.test b/pyk/regression-new/let-priority/6.test new file mode 100644 index 00000000000..5284e8ce622 --- /dev/null +++ b/pyk/regression-new/let-priority/6.test @@ -0,0 +1 @@ +test(101) diff --git a/pyk/regression-new/let-priority/6.test.out b/pyk/regression-new/let-priority/6.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/let-priority/6.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/let-priority/Makefile b/pyk/regression-new/let-priority/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/let-priority/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/let-priority/test.k b/pyk/regression-new/let-priority/test.k new file mode 100644 index 00000000000..0460a7e2f34 --- /dev/null +++ b/pyk/regression-new/let-priority/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX +endmodule + +module TEST + imports DOMAINS + + syntax Bool ::= test(Int) [function] + rule test(I) => + #let X = I #in + X <=Int 100 andBool X >=Int 50 +endmodule diff --git a/pyk/regression-new/let-test/1.test b/pyk/regression-new/let-test/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/let-test/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/let-test/1.test.out b/pyk/regression-new/let-test/1.test.out new file mode 100644 index 00000000000..36e7b68b492 --- /dev/null +++ b/pyk/regression-new/let-test/1.test.out @@ -0,0 +1,3 @@ + + 1 ~> .K + diff --git a/pyk/regression-new/let-test/Makefile b/pyk/regression-new/let-test/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/let-test/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/let-test/test.k b/pyk/regression-new/let-test/test.k new file mode 100644 index 00000000000..f7f07a8717b --- /dev/null +++ b/pyk/regression-new/let-test/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports K-EQUAL + imports BOOL + + syntax Exp ::= foo(Exp) | Int + + rule 0 => #let FOO = 1 #in FOO + rule 2 => #let FOO = 3 #in #let BAR = FOO #in BAR + rule E:Exp => #let foo(F) = E #in #let BAR = F #in #let BAZ = BAR +Int 1 #in foo(BAZ) + requires E =/=K foo(1) andBool notBool isInt(E) [owise] + +endmodule diff --git a/pyk/regression-new/list-in-bug/Makefile b/pyk/regression-new/list-in-bug/Makefile new file mode 100644 index 00000000000..cd43b645da9 --- /dev/null +++ b/pyk/regression-new/list-in-bug/Makefile @@ -0,0 +1,5 @@ +DEF=list-in +EXT=listin +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/list-in-bug/list-in.k b/pyk/regression-new/list-in-bug/list-in.k new file mode 100644 index 00000000000..222245bf03d --- /dev/null +++ b/pyk/regression-new/list-in-bug/list-in.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module LIST-IN-SYNTAX + imports INT + syntax Pgm ::= test ( Int ) +endmodule + +module LIST-IN + imports LIST-IN-SYNTAX + imports LIST + + configuration $PGM:Pgm + + rule test( 1 ) => 3 in .List ... + rule test( 2 ) => 3 in ListItem ( 3 ) ... + rule test( 3 ) => 4 in ListItem ( 3 ) ListItem ( 4 ) ListItem ( 5 ) ... + rule test( 4 ) => 1 in ListItem ( 3 ) ListItem ( 4 ) ListItem ( 5 ) ... +endmodule diff --git a/pyk/regression-new/list-in-bug/test1.listin b/pyk/regression-new/list-in-bug/test1.listin new file mode 100644 index 00000000000..63f8fa96065 --- /dev/null +++ b/pyk/regression-new/list-in-bug/test1.listin @@ -0,0 +1 @@ +test(1) diff --git a/pyk/regression-new/list-in-bug/test1.listin.out b/pyk/regression-new/list-in-bug/test1.listin.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/list-in-bug/test1.listin.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/list-in-bug/test2.listin b/pyk/regression-new/list-in-bug/test2.listin new file mode 100644 index 00000000000..2767316f784 --- /dev/null +++ b/pyk/regression-new/list-in-bug/test2.listin @@ -0,0 +1 @@ +test(2) diff --git a/pyk/regression-new/list-in-bug/test2.listin.out b/pyk/regression-new/list-in-bug/test2.listin.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/list-in-bug/test2.listin.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/list-in-bug/test3.listin b/pyk/regression-new/list-in-bug/test3.listin new file mode 100644 index 00000000000..ce01517607e --- /dev/null +++ b/pyk/regression-new/list-in-bug/test3.listin @@ -0,0 +1 @@ +test(3) diff --git a/pyk/regression-new/list-in-bug/test3.listin.out b/pyk/regression-new/list-in-bug/test3.listin.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/list-in-bug/test3.listin.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/list-in-bug/test4.listin b/pyk/regression-new/list-in-bug/test4.listin new file mode 100644 index 00000000000..91f69acd478 --- /dev/null +++ b/pyk/regression-new/list-in-bug/test4.listin @@ -0,0 +1 @@ +test(4) diff --git a/pyk/regression-new/list-in-bug/test4.listin.out b/pyk/regression-new/list-in-bug/test4.listin.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/list-in-bug/test4.listin.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/llvm-kompile-type/Makefile b/pyk/regression-new/llvm-kompile-type/Makefile new file mode 100644 index 00000000000..4ad488afe24 --- /dev/null +++ b/pyk/regression-new/llvm-kompile-type/Makefile @@ -0,0 +1,11 @@ +KLLVMLIB=$(abspath $(CURDIR)/../../../lib/kllvm) +KOMPILE_FLAGS=--llvm-kompile-type library --llvm-kompile-output interpreter -ccopt $(KLLVMLIB)/llvm/main/main.ll +export KOMPILE_FLAGS + +all: + $(MAKE) -C ../imp-llvm clean + $(MAKE) -C ../imp-llvm + $(MAKE) -C ../imp-llvm clean + +clean: +update-results: diff --git a/pyk/regression-new/llvm-krun/Makefile b/pyk/regression-new/llvm-krun/Makefile new file mode 100644 index 00000000000..7818cef6a34 --- /dev/null +++ b/pyk/regression-new/llvm-krun/Makefile @@ -0,0 +1,35 @@ +DEF=test +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS+=--gen-glr-bison-parser + +CHECK=| diff - test.out +LLVM_KRUN_FLAGS=-p -d ./test-kompiled + +.PHONY: all clean korefile kore prettyfile pretty +all: korefile kore prettyfile pretty + +korefile: test.kore + $(LLVM_KRUN) $(LLVM_KRUN_FLAGS) \ + -c PGM $< Foo korefile $(CHECK) + +kore: test.kore + $(LLVM_KRUN) $(LLVM_KRUN_FLAGS) \ + -c PGM "$$(cat $<)" Foo kore $(CHECK) + +prettyfile: test.in kompile + $(LLVM_KRUN) $(LLVM_KRUN_FLAGS) \ + -c PGM $< Foo prettyfile $(CHECK) + +pretty: test.in kompile + $(LLVM_KRUN) $(LLVM_KRUN_FLAGS) \ + -c PGM "$$(cat $<)" Foo pretty $(CHECK) + +test.kore: test.in kompile + ./test-kompiled/parser_PGM $< > $@ + +include ../include/ktest.mak + +clean: + rm -rf test.kore $(KOMPILED_DIR) .depend-tmp .depend .kompile-* .krun-* .kprove-* kore-exec.tar.gz + +update-results: CHECK=> test.out diff --git a/pyk/regression-new/llvm-krun/test.in b/pyk/regression-new/llvm-krun/test.in new file mode 100644 index 00000000000..eb28ef4401b --- /dev/null +++ b/pyk/regression-new/llvm-krun/test.in @@ -0,0 +1 @@ +foo() diff --git a/pyk/regression-new/llvm-krun/test.k b/pyk/regression-new/llvm-krun/test.k new file mode 100644 index 00000000000..6ae9dde9040 --- /dev/null +++ b/pyk/regression-new/llvm-krun/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + syntax Foo ::= foo() | bar() +endmodule + +module TEST + imports TEST-SYNTAX + rule foo() => bar() +endmodule diff --git a/pyk/regression-new/llvm-krun/test.out b/pyk/regression-new/llvm-krun/test.out new file mode 100644 index 00000000000..a7b2838a785 --- /dev/null +++ b/pyk/regression-new/llvm-krun/test.out @@ -0,0 +1,3 @@ + + bar ( ) ~> .K + diff --git a/pyk/regression-new/llvm-string2base/1.inttest b/pyk/regression-new/llvm-string2base/1.inttest new file mode 100644 index 00000000000..200ca35aa29 --- /dev/null +++ b/pyk/regression-new/llvm-string2base/1.inttest @@ -0,0 +1 @@ +intparse ( "+123" ) diff --git a/pyk/regression-new/llvm-string2base/1.inttest.out b/pyk/regression-new/llvm-string2base/1.inttest.out new file mode 100644 index 00000000000..6141616a500 --- /dev/null +++ b/pyk/regression-new/llvm-string2base/1.inttest.out @@ -0,0 +1,3 @@ + + 123 ~> .K + diff --git a/pyk/regression-new/llvm-string2base/Makefile b/pyk/regression-new/llvm-string2base/Makefile new file mode 100644 index 00000000000..e6be6fbe159 --- /dev/null +++ b/pyk/regression-new/llvm-string2base/Makefile @@ -0,0 +1,6 @@ +DEF=int-parse +EXT=inttest +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/llvm-string2base/int-parse.k b/pyk/regression-new/llvm-string2base/int-parse.k new file mode 100644 index 00000000000..a6912c5d613 --- /dev/null +++ b/pyk/regression-new/llvm-string2base/int-parse.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module INT-PARSE-SYNTAX + imports INT + imports STRING + syntax Pgm ::= intparse ( String ) +endmodule + +module INT-PARSE + imports INT-PARSE-SYNTAX + + configuration $PGM:Pgm + + rule intparse ( I ) => String2Base ( I , 10) ... +endmodule diff --git a/pyk/regression-new/locations/1.test b/pyk/regression-new/locations/1.test new file mode 100644 index 00000000000..a6c4141a4c6 --- /dev/null +++ b/pyk/regression-new/locations/1.test @@ -0,0 +1,2 @@ +5 + +6 diff --git a/pyk/regression-new/locations/1.test.out b/pyk/regression-new/locations/1.test.out new file mode 100644 index 00000000000..75736c11f49 --- /dev/null +++ b/pyk/regression-new/locations/1.test.out @@ -0,0 +1 @@ +Lbl'-LT-'generatedTop'-GT-'{}(Lbl'-LT-'k'-GT-'{}(kseq{}(inj{SortLocation{}, SortKItem{}}(LblLoc'LParUndsCommUndsCommUndsCommUndsCommUndsCommUndsRParUnds'TEST'Unds'Location'Unds'Exp'Unds'String'Unds'Int'Unds'Int'Unds'Int'Unds'Int{}(Lbl'UndsPlusUndsUnds'TEST-SYNTAX'Unds'Exp'Unds'Exp'Unds'Exp{}(Lbl'Hash'location{SortExp{}}(Lbl'UndsUnds'TEST-SYNTAX'Unds'Exp'Unds'Int{}(\dv{SortInt{}}("5")),\dv{SortString{}}("1.test"),\dv{SortInt{}}("1"),\dv{SortInt{}}("0"),\dv{SortInt{}}("1"),\dv{SortInt{}}("0")),Lbl'Hash'location{SortExp{}}(Lbl'UndsUnds'TEST-SYNTAX'Unds'Exp'Unds'Int{}(\dv{SortInt{}}("6")),\dv{SortString{}}("1.test"),\dv{SortInt{}}("2"),\dv{SortInt{}}("1"),\dv{SortInt{}}("2"),\dv{SortInt{}}("1"))),\dv{SortString{}}("1.test"),\dv{SortInt{}}("1"),\dv{SortInt{}}("0"),\dv{SortInt{}}("2"),\dv{SortInt{}}("1"))),dotk{}())),Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0"))) diff --git a/pyk/regression-new/locations/Makefile b/pyk/regression-new/locations/Makefile new file mode 100644 index 00000000000..3be1d839350 --- /dev/null +++ b/pyk/regression-new/locations/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--gen-bison-parser +KRUN_FLAGS=-o kore + +include ../include/ktest.mak diff --git a/pyk/regression-new/locations/test.k b/pyk/regression-new/locations/test.k new file mode 100644 index 00000000000..3c7819daa14 --- /dev/null +++ b/pyk/regression-new/locations/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports UNSIGNED-INT-SYNTAX + syntax Exp [locations] + syntax Exp ::= Exp "+" Exp | Int [klabel(IntConst)] +endmodule + +module TEST + imports TEST-SYNTAX + imports K-LOCATIONS + + syntax Location ::= Loc(Exp, String, Int, Int, Int, Int) + rule #location(E:Exp, File, L1, C1, L2, C2) => Loc(E, File, L1, C1, L2, C2) +endmodule diff --git a/pyk/regression-new/locations2/1.test b/pyk/regression-new/locations2/1.test new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/locations2/1.test.out b/pyk/regression-new/locations2/1.test.out new file mode 100644 index 00000000000..a7f1b69fdc5 --- /dev/null +++ b/pyk/regression-new/locations2/1.test.out @@ -0,0 +1 @@ +Lbl'-LT-'generatedTop'-GT-'{}(Lbl'-LT-'k'-GT-'{}(kseq{}(inj{SortLocation{}, SortKItem{}}(LblLoc'LParUndsCommUndsCommUndsCommUndsCommUndsCommUndsRParUnds'TEST'Unds'Location'Unds'Exp'Unds'String'Unds'Int'Unds'Int'Unds'Int'Unds'Int{}(Lbl'Unds'TEST-SYNTAX'Unds'Exp{}(),\dv{SortString{}}("1.test"),\dv{SortInt{}}("1"),\dv{SortInt{}}("1"),\dv{SortInt{}}("1"),\dv{SortInt{}}("1"))),dotk{}())),Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0"))) diff --git a/pyk/regression-new/locations2/Makefile b/pyk/regression-new/locations2/Makefile new file mode 100644 index 00000000000..3be1d839350 --- /dev/null +++ b/pyk/regression-new/locations2/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--gen-bison-parser +KRUN_FLAGS=-o kore + +include ../include/ktest.mak diff --git a/pyk/regression-new/locations2/test.k b/pyk/regression-new/locations2/test.k new file mode 100644 index 00000000000..062f6ab5959 --- /dev/null +++ b/pyk/regression-new/locations2/test.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports STRING + imports INT + +syntax Exp [locations] +syntax Exp ::= "" [klabel(foo)] +endmodule + +module TEST + imports TEST-SYNTAX + imports K-LOCATIONS + +syntax Location ::= Loc(Exp, String, Int, Int, Int, Int) +rule #location(E:Exp, File, L1, C1, L2, C2) => Loc(E, File, L1, C1, L2, C2) + +endmodule diff --git a/pyk/regression-new/locations3/1.test b/pyk/regression-new/locations3/1.test new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/pyk/regression-new/locations3/1.test @@ -0,0 +1 @@ +foo diff --git a/pyk/regression-new/locations3/1.test.out b/pyk/regression-new/locations3/1.test.out new file mode 100644 index 00000000000..a9125e91275 --- /dev/null +++ b/pyk/regression-new/locations3/1.test.out @@ -0,0 +1 @@ +Lbl'-LT-'generatedTop'-GT-'{}(Lbl'-LT-'k'-GT-'{}(kseq{}(inj{SortLocation{}, SortKItem{}}(LblLoc'LParUndsCommUndsCommUndsCommUndsCommUndsCommUndsRParUnds'TEST'Unds'Location'Unds'Exps'Unds'String'Unds'Int'Unds'Int'Unds'Int'Unds'Int{}(Lbl'UndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps{}(Lbl'Stop'List'LBraQuotUndsCommUndsUnds'TEST-SYNTAX'Unds'Exps'Unds'Exp'Unds'Exps'QuotRBraUnds'Exps{}(),Lblfoo'Unds'TEST-SYNTAX'Unds'Exp{}()),\dv{SortString{}}("1.test"),\dv{SortInt{}}("1"),\dv{SortInt{}}("0"),\dv{SortInt{}}("1"),\dv{SortInt{}}("2"))),dotk{}())),Lbl'-LT-'generatedCounter'-GT-'{}(\dv{SortInt{}}("0"))) diff --git a/pyk/regression-new/locations3/Makefile b/pyk/regression-new/locations3/Makefile new file mode 100644 index 00000000000..f04eb7d363c --- /dev/null +++ b/pyk/regression-new/locations3/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--gen-bison-parser --bison-lists +KRUN_FLAGS=-o kore + +include ../include/ktest.mak diff --git a/pyk/regression-new/locations3/test.k b/pyk/regression-new/locations3/test.k new file mode 100644 index 00000000000..001c24a23c2 --- /dev/null +++ b/pyk/regression-new/locations3/test.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports STRING + imports INT + +syntax Exps [locations] +syntax Exps ::= NeList{Exp,","} +syntax Exp ::= "foo" +endmodule + +module TEST + imports TEST-SYNTAX + imports K-LOCATIONS + +configuration $PGM:Exps + +syntax Location ::= Loc(Exps, String, Int, Int, Int, Int) +rule #location(E:Exps, File, L1, C1, L2, C2) => Loc(E, File, L1, C1, L2, C2) + +endmodule diff --git a/pyk/regression-new/lub/Makefile b/pyk/regression-new/lub/Makefile new file mode 100644 index 00000000000..ac7bf4eb2d0 --- /dev/null +++ b/pyk/regression-new/lub/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/lub/test.k b/pyk/regression-new/lub/test.k new file mode 100644 index 00000000000..9d25e5198f3 --- /dev/null +++ b/pyk/regression-new/lub/test.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + + syntax IntPtr ::= PtrValue + syntax PtrValue ::= SymLoc + syntax SymLoc + syntax IntPtr ::= EncodedPtr + syntax BitValue ::= EncodedPtr + syntax Encodable ::= PtrValue + syntax BitValueOrEncodable ::= BitValue | Encodable + + syntax EncodedPtr ::= encodedPtr(PtrValue) + syntax Bool ::= sameBase(IntPtr, IntPtr) [function] + rule sameBase(_, (encodedPtr(S:SymLoc) => S)) +endmodule diff --git a/pyk/regression-new/lub2/Makefile b/pyk/regression-new/lub2/Makefile new file mode 100644 index 00000000000..ac7bf4eb2d0 --- /dev/null +++ b/pyk/regression-new/lub2/Makefile @@ -0,0 +1,5 @@ +DEF=test +EXT=test +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/lub2/test.k b/pyk/regression-new/lub2/test.k new file mode 100644 index 00000000000..adaee8dad0a --- /dev/null +++ b/pyk/regression-new/lub2/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BOOL + imports K-EQUAL + + syntax KItem ::= foo() | bar() + + rule foo() => #if true #then bar() #else .K #fi ~> bar() ... + +endmodule diff --git a/pyk/regression-new/macro_vars-productions/Makefile b/pyk/regression-new/macro_vars-productions/Makefile new file mode 100644 index 00000000000..8c4e705222a --- /dev/null +++ b/pyk/regression-new/macro_vars-productions/Makefile @@ -0,0 +1,5 @@ +DEF=macro-vars +EXT=macro-vars +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/macro_vars-productions/macro-vars.k b/pyk/regression-new/macro_vars-productions/macro-vars.k new file mode 100644 index 00000000000..91f0ddb9f12 --- /dev/null +++ b/pyk/regression-new/macro_vars-productions/macro-vars.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module MACRO-VARS-SYNTAX +endmodule +module MACRO-VARS + imports MACRO-VARS-SYNTAX + imports DOMAINS + syntax KResult ::= Int | Bool + syntax CPPType ::= bar(Set, CPPSimpleType) + syntax CPPSimpleType ::= scopedEnum() | unscopedEnum() + syntax Foo ::= foo(CPPType) + syntax K ::= inverseConvertType(CPPType, Foo) [function] + rule inverseConvertType(cppEnumType, foo((cppEnumType #as T::CPPType => underlyingType(T)))) + syntax CPPType ::= underlyingType(CPPType) [function] + syntax CPPType ::= "cppEnumType" [macro] + rule cppEnumType => bar(_, scopedEnum() #Or unscopedEnum() ) [unboundVariables(_)] + syntax Int ::= A ( Int ) [macro] + rule A ( N ) => N +Int 1 + rule A ( N ) => N [simplification] +endmodule diff --git a/pyk/regression-new/macro_vars/Makefile b/pyk/regression-new/macro_vars/Makefile new file mode 100644 index 00000000000..8c4e705222a --- /dev/null +++ b/pyk/regression-new/macro_vars/Makefile @@ -0,0 +1,5 @@ +DEF=macro-vars +EXT=macro-vars +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/macro_vars/macro-vars.k b/pyk/regression-new/macro_vars/macro-vars.k new file mode 100644 index 00000000000..b2edad67695 --- /dev/null +++ b/pyk/regression-new/macro_vars/macro-vars.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module MACRO-VARS-SYNTAX +endmodule +module MACRO-VARS + imports MACRO-VARS-SYNTAX + imports DOMAINS + syntax KResult ::= Int | Bool + syntax CPPType ::= bar(Set, CPPSimpleType) + syntax CPPSimpleType ::= scopedEnum() | unscopedEnum() + syntax Foo ::= foo(CPPType) + syntax K ::= inverseConvertType(CPPType, Foo) [function] + rule inverseConvertType(cppEnumType, foo((cppEnumType #as T::CPPType => underlyingType(T)))) + syntax CPPType ::= underlyingType(CPPType) [function] + syntax CPPType ::= "cppEnumType" [macro] + rule cppEnumType => bar(_, scopedEnum() #Or unscopedEnum() ) [unboundVariables(_)] + + syntax Int ::= "hookedMacro" [macro] + rule hookedMacro => 5 + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/Makefile b/pyk/regression-new/map-symbolic-tests-haskell/Makefile new file mode 100644 index 00000000000..d423cede213 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/Makefile @@ -0,0 +1,10 @@ +DEF=map-tests +EXT=mtest +TESTDIR=. +KOMPILE_BACKEND=haskell +KPROVE_FLAGS=--warnings none +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment b/pyk/regression-new/map-symbolic-tests-haskell/assignment new file mode 100644 index 00000000000..e593529337a --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment @@ -0,0 +1,31 @@ +claim assignment ( .Map [ x <- 3 ] ) => . +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Y in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool notBool Y in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool notBool Z in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool notBool Y in_keys(MAP) andBool Z in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X andBool Y in_keys(MAP) andBool Z in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X andBool notBool Y in_keys(MAP) andBool notBool Z in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X andBool X in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X andBool notBool X in_keys(MAP) +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z ==K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z =/=K X +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z ==K Y +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z =/=K Y +claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z =/=K Y andBool Z =/=K X +claim assignment ( (X:MyId |-> 3 1 |-> 4) [ 0 <- 5 ] ) => . requires X =/=K 1 +claim assignment ( (X:MyId |-> 4) [ X <- 3 ] ) => . +claim assignment ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] ) => . requires X =/=K y +claim assignment ( ( X:MyId |-> BAL_TO:Int Y:MyId |-> BAL_FROM:Int MAP:Map ) [ Y <- BAL_FROM -Int 30 ] ) => . requires X =/=K Y +claim assignment ( ( foo ( X:MyId ) |-> BAL_TO:Int foo ( Y:MyId ) |-> BAL_FROM:Int MAP:Map ) [ foo ( Y ) <- BAL_FROM -Int 30 ] ) => . requires X =/=K Y +claim assignment ( ( foo ( X:MyId ) |-> BAL_TO:Int foo ( Y:MyId ) |-> BAL_FROM:Int MAP:Map ) [ foo ( Y ) <- BAL_FROM -Int 30 ] ) => . requires foo ( X ) =/=K foo ( Y ) diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k new file mode 100644 index 00000000000..52b5835a706 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-1-SPEC + imports MAP-TESTS + + claim assignment ( .Map [ x <- 3 ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k.out new file mode 100644 index 00000000000..04f36403fb2 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-1-spec.k.out @@ -0,0 +1,4 @@ + + assignmentResult ( x |-> 3 ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k new file mode 100644 index 00000000000..80e73f7b1e4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-10-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k.out new file mode 100644 index 00000000000..2a7e45597cf --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-10-spec.k.out @@ -0,0 +1,23 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( ( MAP [ Y:MyId <- 2 ] + X:MyId |-> 1 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k new file mode 100644 index 00000000000..cd4cc5b1bd5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-11-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool notBool Y in_keys(MAP) andBool Z in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k.out new file mode 100644 index 00000000000..194b181bb6e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-11-spec.k.out @@ -0,0 +1,36 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( ( MAP + X:MyId |-> 1 ) [ Z:MyId <- 3 ] + Y:MyId |-> 2 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k new file mode 100644 index 00000000000..9e0cda42c18 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-12-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k.out new file mode 100644 index 00000000000..1eb38739f38 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-12-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + assignmentResult ( MAP [ Z:MyId <- 3 ] + X:MyId |-> 1 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k new file mode 100644 index 00000000000..132043e107b --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-13-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k.out new file mode 100644 index 00000000000..e03feffdf4e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-13-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( MAP [ Y:MyId <- 2 ] + Z:MyId |-> 3 ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k new file mode 100644 index 00000000000..b42e53dd6e7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-14-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k.out new file mode 100644 index 00000000000..c05d7e4ffc4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-14-spec.k.out @@ -0,0 +1,29 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( MAP [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] + X:MyId |-> 1 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k new file mode 100644 index 00000000000..8b2f20f85b9 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-15-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X andBool Y in_keys(MAP) andBool Z in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k.out new file mode 100644 index 00000000000..d2babfa1ae5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-15-spec.k.out @@ -0,0 +1,41 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( MAP [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] + X:MyId |-> 1 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k new file mode 100644 index 00000000000..f6f30fe71c6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-16-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X andBool notBool Y in_keys(MAP) andBool notBool Z in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k.out new file mode 100644 index 00000000000..a2fbfc2853d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-16-spec.k.out @@ -0,0 +1,43 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( MAP + X:MyId |-> 1 + Y:MyId |-> 2 + Z:MyId |-> 3 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k new file mode 100644 index 00000000000..4dc9f1c10a2 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-17-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k.out new file mode 100644 index 00000000000..5ad762f31e7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-17-spec.k.out @@ -0,0 +1,11 @@ + + assignmentResult ( MAP + Z:MyId |-> 3 ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k new file mode 100644 index 00000000000..eb756a57dc0 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-18-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X andBool X in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-18-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k new file mode 100644 index 00000000000..34a47dc3267 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-19-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X andBool notBool X in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k.out new file mode 100644 index 00000000000..5ad762f31e7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-19-spec.k.out @@ -0,0 +1,11 @@ + + assignmentResult ( MAP + Z:MyId |-> 3 ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k new file mode 100644 index 00000000000..46428eb3b85 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-2-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k.out new file mode 100644 index 00000000000..68657e9575e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-2-spec.k.out @@ -0,0 +1,11 @@ + + assignmentResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k new file mode 100644 index 00000000000..62ecac6afd8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-20-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k.out new file mode 100644 index 00000000000..1a514fd8295 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-20-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( MAP [ Z:MyId <- 3 ] + Y:MyId |-> 2 ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k new file mode 100644 index 00000000000..4630a5ae740 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-21-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k.out new file mode 100644 index 00000000000..f82d539dae5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-21-spec.k.out @@ -0,0 +1,11 @@ + + assignmentResult ( ( MAP + Z:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k new file mode 100644 index 00000000000..f0c6068bc31 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-22-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k.out new file mode 100644 index 00000000000..6aeb2e54cfd --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-22-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + assignmentResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k new file mode 100644 index 00000000000..e727c702751 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-23-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k.out new file mode 100644 index 00000000000..58e112c1038 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-23-spec.k.out @@ -0,0 +1,11 @@ + + assignmentResult ( ( MAP + X:MyId |-> 1 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k new file mode 100644 index 00000000000..c5662652299 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-24-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k.out new file mode 100644 index 00000000000..07dac286f09 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-24-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k new file mode 100644 index 00000000000..eb5999d5a2d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-25-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k.out new file mode 100644 index 00000000000..63e0b4e3b87 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-25-spec.k.out @@ -0,0 +1,23 @@ + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + assignmentResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k new file mode 100644 index 00000000000..7249d07b0fb --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-26-SPEC + imports MAP-TESTS + + claim assignment ( (X:MyId |-> 3 1 |-> 4) [ 0 <- 5 ] ) => . requires X =/=K 1 + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k.out new file mode 100644 index 00000000000..e1cf516097e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-26-spec.k.out @@ -0,0 +1,6 @@ + + assignmentResult ( 0 |-> 5 + 1 |-> 4 + X:MyId |-> 3 ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k new file mode 100644 index 00000000000..58858e9e20d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-27-SPEC + imports MAP-TESTS + + claim assignment ( (X:MyId |-> 4) [ X <- 3 ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k.out new file mode 100644 index 00000000000..23e498ef777 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-27-spec.k.out @@ -0,0 +1,4 @@ + + assignmentResult ( X:MyId |-> 3 ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k new file mode 100644 index 00000000000..cdd4f6b3cf3 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-28-SPEC + imports MAP-TESTS + + claim assignment ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] ) => . requires X =/=K y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k.out new file mode 100644 index 00000000000..03be4ebd4f2 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-28-spec.k.out @@ -0,0 +1,11 @@ + #Not ( { + X + #Equals + y + } ) +#And + + assignmentResult ( ( X:MyId |-> 3 ) [ x <- 5 ] + y |-> 4 ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k new file mode 100644 index 00000000000..1ef3dfb179f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-29-SPEC + imports MAP-TESTS + + claim assignment ( ( X:MyId |-> BAL_TO:Int Y:MyId |-> BAL_FROM:Int MAP:Map ) [ Y <- BAL_FROM -Int 30 ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k.out new file mode 100644 index 00000000000..90ecbc75397 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-29-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + assignmentResult ( MAP + X:MyId |-> BAL_TO:Int + Y:MyId |-> BAL_FROM +Int -30 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k new file mode 100644 index 00000000000..bae4c88e977 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-3-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k.out new file mode 100644 index 00000000000..72d2cd93778 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-3-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + assignmentResult ( ( MAP [ Y:MyId <- 2 ] + X:MyId |-> 1 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k new file mode 100644 index 00000000000..7cf23d73586 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-30-SPEC + imports MAP-TESTS + + claim assignment ( ( foo ( X:MyId ) |-> BAL_TO:Int foo ( Y:MyId ) |-> BAL_FROM:Int MAP:Map ) [ foo ( Y ) <- BAL_FROM -Int 30 ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k.out new file mode 100644 index 00000000000..59e97dc1f20 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-30-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + assignmentResult ( MAP + foo ( X ) |-> BAL_TO:Int + foo ( Y ) |-> BAL_FROM +Int -30 ) ~> .K + +#And + { + false + #Equals + foo ( X ) in_keys ( MAP ) + } +#And + { + false + #Equals + foo ( Y ) in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k new file mode 100644 index 00000000000..05164ed7a60 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-31-SPEC + imports MAP-TESTS + + claim assignment ( ( foo ( X:MyId ) |-> BAL_TO:Int foo ( Y:MyId ) |-> BAL_FROM:Int MAP:Map ) [ foo ( Y ) <- BAL_FROM -Int 30 ] ) => . requires foo ( X ) =/=K foo ( Y ) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k.out new file mode 100644 index 00000000000..59e97dc1f20 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-31-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + assignmentResult ( MAP + foo ( X ) |-> BAL_TO:Int + foo ( Y ) |-> BAL_FROM +Int -30 ) ~> .K + +#And + { + false + #Equals + foo ( X ) in_keys ( MAP ) + } +#And + { + false + #Equals + foo ( Y ) in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k new file mode 100644 index 00000000000..0c490748c3b --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-4-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Y in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k.out new file mode 100644 index 00000000000..1c96eb52939 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-4-spec.k.out @@ -0,0 +1,23 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + assignmentResult ( ( MAP [ Y:MyId <- 2 ] + X:MyId |-> 1 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k new file mode 100644 index 00000000000..7f6f4856e18 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-5-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool notBool Y in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k.out new file mode 100644 index 00000000000..c8388ef3d07 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-5-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + assignmentResult ( ( MAP + X:MyId |-> 1 + Y:MyId |-> 2 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k new file mode 100644 index 00000000000..b83ed0e8783 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-6-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k.out new file mode 100644 index 00000000000..b1d03039558 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-6-spec.k.out @@ -0,0 +1,11 @@ + + assignmentResult ( ( MAP + Y:MyId |-> 2 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k new file mode 100644 index 00000000000..6e9e555c596 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-7-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool Z in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k.out new file mode 100644 index 00000000000..933e35f8f5f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-7-spec.k.out @@ -0,0 +1,17 @@ + + assignmentResult ( ( MAP + Y:MyId |-> 2 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k new file mode 100644 index 00000000000..b87a8606481 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-8-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y ==K X andBool notBool Z in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k.out new file mode 100644 index 00000000000..b33937607b7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-8-spec.k.out @@ -0,0 +1,17 @@ + + assignmentResult ( ( MAP + Y:MyId |-> 2 ) [ Z:MyId <- 3 ] ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k new file mode 100644 index 00000000000..d7406467d57 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module ASSIGNMENT-9-SPEC + imports MAP-TESTS + + claim assignment ( (MAP:Map X:MyId |-> 1) [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k.out new file mode 100644 index 00000000000..f2b94680eac --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/assignment-9-spec.k.out @@ -0,0 +1,23 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + + assignmentResult ( MAP [ Y:MyId <- 2 ] [ Z:MyId <- 3 ] + X:MyId |-> 1 ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/gen-tests.sh b/pyk/regression-new/map-symbolic-tests-haskell/gen-tests.sh new file mode 100755 index 00000000000..375d63c7e62 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/gen-tests.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +for test_list in assignment lookup inkeys remove; do + i=1 + while read line; do + spec_file="$test_list-$i-spec.k" + module_name="$(echo $test_list | tr '[:lower:]' '[:upper:]')" + if [[ ! -f "$spec_file" ]] && [[ ! -f "failing/$spec_file" ]]; then + { echo "// Copyright (c) 2019 K Team. All Rights Reserved." + echo "// generated by gen-tests.sh" + echo "" + echo "requires \"map-tests.k\"" + echo "" + echo "module $module_name-$i-SPEC" + echo " imports MAP-TESTS" + echo "" + echo " $line" + echo "" + echo "endmodule" + } > $spec_file + make CHECK='> ' $spec_file + fi + i=$((i + 1)) + done < $test_list +done diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys b/pyk/regression-new/map-symbolic-tests-haskell/inkeys new file mode 100644 index 00000000000..e401b45430c --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys @@ -0,0 +1,17 @@ +claim inkeys ( X:MyId in_keys ( .Map ) ) => . +claim inkeys ( X:MyId in_keys ( M:Map X |-> 0 ) ) => . +claim inkeys ( Y:MyId in_keys ( M:Map X:MyId |-> 0 ) ) => . +claim inkeys ( Y:MyId in_keys ( M:Map X:MyId |-> 0 ) ) => . requires Y in_keys(M) +claim inkeys ( Y:MyId in_keys ( M:Map X:MyId |-> 0 ) ) => . requires notBool Y in_keys(M) +claim inkeys ( X:MyId in_keys ( Z:MyId |-> 1 M:Map X |-> 0 ) ) => . +claim inkeys ( Y:MyId in_keys ( Z:MyId |-> 1 M:Map X:MyId |-> 0 ) ) => . +claim inkeys ( Y:MyId in_keys ( Z:MyId |-> 1 M:Map X:MyId |-> 0 ) ) => . requires Y in_keys(M) +claim inkeys ( Y:MyId in_keys ( Z:MyId |-> 1 M:Map X:MyId |-> 0 ) ) => . requires notBool Y in_keys(M) +claim inkeys ( X:MyId in_keys ( M:Map [ X <- 0 ] ) ) => . +claim inkeys ( Y:MyId in_keys ( M:Map [ X:MyId <- 0 ] ) ) => . +claim inkeys ( Y:MyId in_keys ( M:Map [ X:MyId <- 0 ] ) ) => . requires Y in_keys(M) +claim inkeys ( Y:MyId in_keys ( M:Map [ X:MyId <- 0 ] ) ) => . requires notBool Y in_keys(M) +claim inkeys ( X:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X <- 0 ] ) ) => . +claim inkeys ( Y:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) => . +claim inkeys ( Y:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) => . requires Y in_keys(M) +claim inkeys ( Y:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) => . requires notBool Y in_keys(M) diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k new file mode 100644 index 00000000000..b4b551efd6d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-1-SPEC + imports MAP-TESTS + + claim inkeys ( X:MyId in_keys ( .Map ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k.out new file mode 100644 index 00000000000..4d9c2d14419 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-1-spec.k.out @@ -0,0 +1,4 @@ + + inkeysResult ( false ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k new file mode 100644 index 00000000000..28a0627ac05 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-10-SPEC + imports MAP-TESTS + + claim inkeys ( X:MyId in_keys ( M:Map [ X <- 0 ] ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k.out new file mode 100644 index 00000000000..48015db08b6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-10-spec.k.out @@ -0,0 +1,4 @@ + + inkeysResult ( true ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k new file mode 100644 index 00000000000..41590a34e6e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-11-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map [ X:MyId <- 0 ] ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k.out new file mode 100644 index 00000000000..514f3f8c50b --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-11-spec.k.out @@ -0,0 +1,4 @@ + + inkeysResult ( Y:MyId in_keys ( M [ X:MyId <- 0 ] ) ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k new file mode 100644 index 00000000000..102ad1be65d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-12-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map [ X:MyId <- 0 ] ) ) => . requires Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k.out new file mode 100644 index 00000000000..e9af914197f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-12-spec.k.out @@ -0,0 +1,10 @@ + + inkeysResult ( true ) ~> .K + +#And + { + true + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k new file mode 100644 index 00000000000..b85b5fb94ca --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-13-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map [ X:MyId <- 0 ] ) ) => . requires notBool Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k.out new file mode 100644 index 00000000000..5341a783dd9 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-13-spec.k.out @@ -0,0 +1,10 @@ + + inkeysResult ( Y:MyId in_keys ( M [ X:MyId <- 0 ] ) ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k new file mode 100644 index 00000000000..db99b236ac5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-14-SPEC + imports MAP-TESTS + + claim inkeys ( X:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X <- 0 ] ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k.out new file mode 100644 index 00000000000..48015db08b6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-14-spec.k.out @@ -0,0 +1,4 @@ + + inkeysResult ( true ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k new file mode 100644 index 00000000000..1de5ba9e319 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-15-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k.out new file mode 100644 index 00000000000..b771ede30b9 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-15-spec.k.out @@ -0,0 +1,4 @@ + + inkeysResult ( Y:MyId in_keys ( M [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k new file mode 100644 index 00000000000..11a347aa1da --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-16-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) => . requires Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k.out new file mode 100644 index 00000000000..e9af914197f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-16-spec.k.out @@ -0,0 +1,10 @@ + + inkeysResult ( true ) ~> .K + +#And + { + true + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k new file mode 100644 index 00000000000..cedc4b9affd --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-17-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) => . requires notBool Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k.out new file mode 100644 index 00000000000..a5a23d8b800 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-17-spec.k.out @@ -0,0 +1,10 @@ + + inkeysResult ( Y:MyId in_keys ( M [ Z:MyId <- 1 ] [ X:MyId <- 0 ] ) ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k new file mode 100644 index 00000000000..44d2b434689 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-2-SPEC + imports MAP-TESTS + + claim inkeys ( X:MyId in_keys ( M:Map X |-> 0 ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k.out new file mode 100644 index 00000000000..641ddf25a36 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-2-spec.k.out @@ -0,0 +1,10 @@ + + inkeysResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k new file mode 100644 index 00000000000..0c5cc8ca067 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-3-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map X:MyId |-> 0 ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k.out new file mode 100644 index 00000000000..97ca0973e16 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-3-spec.k.out @@ -0,0 +1,11 @@ + + inkeysResult ( Y:MyId in_keys ( M + ( X:MyId |-> 0 ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k new file mode 100644 index 00000000000..e3709766d88 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-4-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map X:MyId |-> 0 ) ) => . requires Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k.out new file mode 100644 index 00000000000..fb728cd77f6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-4-spec.k.out @@ -0,0 +1,17 @@ + + inkeysResult ( Y:MyId in_keys ( M + ( X:MyId |-> 0 ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +#And + { + true + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k new file mode 100644 index 00000000000..1b1922d5ace --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-5-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( M:Map X:MyId |-> 0 ) ) => . requires notBool Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k.out new file mode 100644 index 00000000000..81c334857fe --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-5-spec.k.out @@ -0,0 +1,17 @@ + + inkeysResult ( Y:MyId in_keys ( M + ( X:MyId |-> 0 ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +#And + { + false + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k new file mode 100644 index 00000000000..979b38eb9fa --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-6-SPEC + imports MAP-TESTS + + claim inkeys ( X:MyId in_keys ( Z:MyId |-> 1 M:Map X |-> 0 ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k.out new file mode 100644 index 00000000000..2a3706b56b3 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-6-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + inkeysResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +#And + { + false + #Equals + Z:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k new file mode 100644 index 00000000000..b50f4f63cb0 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-7-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( Z:MyId |-> 1 M:Map X:MyId |-> 0 ) ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k.out new file mode 100644 index 00000000000..8f0a817be1f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-7-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + inkeysResult ( Y:MyId in_keys ( M + X:MyId |-> 0 + ( Z:MyId |-> 1 ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +#And + { + false + #Equals + Z:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k new file mode 100644 index 00000000000..02f94e85cfd --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-8-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( Z:MyId |-> 1 M:Map X:MyId |-> 0 ) ) => . requires Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k.out new file mode 100644 index 00000000000..63f6df0e0ad --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-8-spec.k.out @@ -0,0 +1,30 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + inkeysResult ( Y:MyId in_keys ( M + X:MyId |-> 0 + ( Z:MyId |-> 1 ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +#And + { + false + #Equals + Z:MyId in_keys ( M ) + } +#And + { + true + #Equals + Y:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k new file mode 100644 index 00000000000..9ea1455efdb --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module INKEYS-9-SPEC + imports MAP-TESTS + + claim inkeys ( Y:MyId in_keys ( Z:MyId |-> 1 M:Map X:MyId |-> 0 ) ) => . requires notBool Y in_keys(M) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k.out new file mode 100644 index 00000000000..646f6e501d0 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/inkeys-9-spec.k.out @@ -0,0 +1,30 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + inkeysResult ( Y:MyId in_keys ( M + X:MyId |-> 0 + ( Z:MyId |-> 1 ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( M ) + } +#And + { + false + #Equals + Y:MyId in_keys ( M ) + } +#And + { + false + #Equals + Z:MyId in_keys ( M ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup b/pyk/regression-new/map-symbolic-tests-haskell/lookup new file mode 100644 index 00000000000..1c26bf760fe --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup @@ -0,0 +1,55 @@ +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y ==K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z ==K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z ==K Y +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K Y +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z ==K X andBool Y =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1 Y:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y +claim lookup ( (MAP:Map Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y +claim lookup ( (X:MyId |-> 1 MAP:Map Y:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y +claim lookup ( (Y:MyId |-> 1 MAP:Map X:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y +claim lookup ( (X:MyId |-> 1 Y:MyId |-> 2 MAP:Map) [ Y:MyId ] ) => . requires X =/=K Y +claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2 MAP:Map) [ Y:MyId ] ) => . requires X =/=K Y +claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] ) => . requires X =/=K x +claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] ) => . requires X =/=K y +claim lookup ( (y |-> 4) [ x ] ==K 4 ) => . +claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] ) => . +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y ==K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z =/=K Y +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z ==K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z ==K Y +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K Y +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K Y andBool Z =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K Y andBool Z ==K X andBool Y =/=K X +claim lookup ( (MAP:Map X:MyId |-> 1 Y:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y +claim lookup ( (MAP:Map Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y +claim lookup ( (X:MyId |-> 1 MAP:Map Y:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y +claim lookup ( (Y:MyId |-> 1 MAP:Map X:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y +claim lookup ( (X:MyId |-> 1 Y:MyId |-> 2 MAP:Map) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y +claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2 MAP:Map) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y +claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] orDefault 0 ) => . requires X =/=K x +claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] orDefault 0 ) => . requires X =/=K y +claim lookup ( ( (y |-> 4) [ x ] orDefault 0 ) ==K 4 ) => . +claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . +claim lookup ( (X:MyId |-> 1 Y:MyId |-> 2) [ Z:MyId ] orDefault 0 ) => . requires Z =/=K X andBool Z =/=K Y +claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X ==K Y andBool Y in_keys(MAP) +claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y andBool Y in_keys(MAP) +claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X ==K Y andBool notBool Y in_keys(MAP) +claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y andBool notBool Y in_keys(MAP) diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k new file mode 100644 index 00000000000..ce1b3a5990c --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-1-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k.out new file mode 100644 index 00000000000..0dac91b0b62 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-1-spec.k.out @@ -0,0 +1,18 @@ + + lookupResult ( MAP + ( Y:MyId |-> 2 ) [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP + ( Y:MyId |-> 2 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k new file mode 100644 index 00000000000..91c5a75c50e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-10-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k.out new file mode 100644 index 00000000000..cd12dfc775f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-10-spec.k.out @@ -0,0 +1,11 @@ + + lookupResult ( ( MAP + Z:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k new file mode 100644 index 00000000000..901e8d4b94f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-11-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k.out new file mode 100644 index 00000000000..9a4244f1b63 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-11-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + lookupResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k new file mode 100644 index 00000000000..0d848b89d6d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-12-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k.out new file mode 100644 index 00000000000..bf60f18b8f8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-12-spec.k.out @@ -0,0 +1,10 @@ + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k new file mode 100644 index 00000000000..7e137ea3f74 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-13-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k.out new file mode 100644 index 00000000000..db998288e7b --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-13-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP + ( X:MyId |-> 1 ) [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k new file mode 100644 index 00000000000..767fbde659a --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-14-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k.out new file mode 100644 index 00000000000..ce1fe8830ee --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-14-spec.k.out @@ -0,0 +1,35 @@ + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k new file mode 100644 index 00000000000..c8e6c3c022f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-15-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z ==K X andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k.out new file mode 100644 index 00000000000..a194a5d80f4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-15-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k new file mode 100644 index 00000000000..5db5c85ea05 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-16-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1 Y:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k.out new file mode 100644 index 00000000000..49298c88f66 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-16-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k new file mode 100644 index 00000000000..bbe7943e067 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-17-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k.out new file mode 100644 index 00000000000..2da595957ff --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-17-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k new file mode 100644 index 00000000000..48ac2f6d178 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-18-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 1 MAP:Map Y:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k.out new file mode 100644 index 00000000000..49298c88f66 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-18-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k new file mode 100644 index 00000000000..fdbd5e70e70 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-19-SPEC + imports MAP-TESTS + + claim lookup ( (Y:MyId |-> 1 MAP:Map X:MyId |-> 2) [ Y:MyId ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k.out new file mode 100644 index 00000000000..2da595957ff --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-19-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k new file mode 100644 index 00000000000..a1e0eb3bda3 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-2-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k.out new file mode 100644 index 00000000000..0629a755702 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-2-spec.k.out @@ -0,0 +1,10 @@ + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k new file mode 100644 index 00000000000..3df20db3cc8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-20-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 1 Y:MyId |-> 2 MAP:Map) [ Y:MyId ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k.out new file mode 100644 index 00000000000..49298c88f66 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-20-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k new file mode 100644 index 00000000000..50cb5695208 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-21-SPEC + imports MAP-TESTS + + claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2 MAP:Map) [ Y:MyId ] ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k.out new file mode 100644 index 00000000000..2da595957ff --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-21-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k new file mode 100644 index 00000000000..415b70368f7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-22-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] ) => . requires X =/=K x + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k.out new file mode 100644 index 00000000000..67a86b16d42 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-22-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + x + } ) +#And + #Not ( { + X + #Equals + y + } ) +#And + + lookupResult ( 3 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k new file mode 100644 index 00000000000..1d98890eeda --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-23-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] ) => . requires X =/=K y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k.out new file mode 100644 index 00000000000..a07d902b9a6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-23-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + y + } ) +#And + + lookupResult ( ( X:MyId |-> 3 ) [ x <- 5 ] [ X:MyId ] ~> .K ) ~> .K + +#And + { + true + #Equals + X:MyId in_keys ( ( X:MyId |-> 3 ) [ x <- 5 ] + ( y |-> 4 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k new file mode 100644 index 00000000000..4714dea4c8a --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-24-SPEC + imports MAP-TESTS + + claim lookup ( (y |-> 4) [ x ] ==K 4 ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-24-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k new file mode 100644 index 00000000000..95292b7158e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-25-SPEC + imports MAP-TESTS + + claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k.out new file mode 100644 index 00000000000..cbdbc4c0ccc --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-25-spec.k.out @@ -0,0 +1,10 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k new file mode 100644 index 00000000000..2f1fd5f5675 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-26-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k.out new file mode 100644 index 00000000000..743319429f7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-26-spec.k.out @@ -0,0 +1,11 @@ + + lookupResult ( MAP + ( Y:MyId |-> 2 ) [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k new file mode 100644 index 00000000000..2704b7a4e45 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-27-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k.out new file mode 100644 index 00000000000..0629a755702 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-27-spec.k.out @@ -0,0 +1,10 @@ + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k new file mode 100644 index 00000000000..e1e83a60888 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-28-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k.out new file mode 100644 index 00000000000..2c3d84a3c6a --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-28-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k new file mode 100644 index 00000000000..05b96c6b2a2 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-29-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k.out new file mode 100644 index 00000000000..984e5ed52e5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-29-spec.k.out @@ -0,0 +1,11 @@ + + lookupResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k new file mode 100644 index 00000000000..2583239a04e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-3-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k.out new file mode 100644 index 00000000000..2f1572a54d5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-3-spec.k.out @@ -0,0 +1,29 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP + ( Y:MyId |-> 2 ) ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k new file mode 100644 index 00000000000..ab31429be61 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-30-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k.out new file mode 100644 index 00000000000..d4a18a22447 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-30-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k new file mode 100644 index 00000000000..92d526c56d6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-31-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k.out new file mode 100644 index 00000000000..5937b3bae8d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-31-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Y:MyId <- 2 ] [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k new file mode 100644 index 00000000000..906313d0da4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-32-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k.out new file mode 100644 index 00000000000..651414a4e07 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-32-spec.k.out @@ -0,0 +1,23 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k new file mode 100644 index 00000000000..4756ee24a67 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-33-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k.out new file mode 100644 index 00000000000..67940035b68 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-33-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k new file mode 100644 index 00000000000..7071d044e81 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-34-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k.out new file mode 100644 index 00000000000..b69ce043a9e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-34-spec.k.out @@ -0,0 +1,28 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k new file mode 100644 index 00000000000..a4ef90bc391 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-35-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k.out new file mode 100644 index 00000000000..f36f7d498ef --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-35-spec.k.out @@ -0,0 +1,11 @@ + + lookupResult ( ( MAP + Z:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k new file mode 100644 index 00000000000..8090052e421 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-36-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k.out new file mode 100644 index 00000000000..631beacda95 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-36-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + lookupResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k new file mode 100644 index 00000000000..a10afcaf4fd --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-37-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k.out new file mode 100644 index 00000000000..bf60f18b8f8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-37-spec.k.out @@ -0,0 +1,10 @@ + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k new file mode 100644 index 00000000000..312a4b7ccc8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-38-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k.out new file mode 100644 index 00000000000..c9ade8542ae --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-38-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP + ( X:MyId |-> 1 ) [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k new file mode 100644 index 00000000000..046e4d10e59 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-39-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k.out new file mode 100644 index 00000000000..c9fd2f0a215 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-39-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Z:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k new file mode 100644 index 00000000000..f98448f4358 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-4-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k.out new file mode 100644 index 00000000000..2cb38567a95 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-4-spec.k.out @@ -0,0 +1,18 @@ + + lookupResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- 2 ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k new file mode 100644 index 00000000000..3541822939f --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-40-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] orDefault 0 ) => . requires Z =/=K Y andBool Z ==K X andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k.out new file mode 100644 index 00000000000..a194a5d80f4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-40-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k new file mode 100644 index 00000000000..f0bf3170e0e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-41-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1 Y:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k.out new file mode 100644 index 00000000000..49298c88f66 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-41-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k new file mode 100644 index 00000000000..adddbe3c6d8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-42-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k.out new file mode 100644 index 00000000000..2da595957ff --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-42-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k new file mode 100644 index 00000000000..b959a345625 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-43-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 1 MAP:Map Y:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k.out new file mode 100644 index 00000000000..49298c88f66 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-43-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k new file mode 100644 index 00000000000..d1ca57689f1 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-44-SPEC + imports MAP-TESTS + + claim lookup ( (Y:MyId |-> 1 MAP:Map X:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k.out new file mode 100644 index 00000000000..2da595957ff --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-44-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k new file mode 100644 index 00000000000..5cdbf30937c --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-45-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 1 Y:MyId |-> 2 MAP:Map) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k.out new file mode 100644 index 00000000000..49298c88f66 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-45-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k new file mode 100644 index 00000000000..129c0d72791 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-46-SPEC + imports MAP-TESTS + + claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2 MAP:Map) [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k.out new file mode 100644 index 00000000000..2da595957ff --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-46-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k new file mode 100644 index 00000000000..e4d25e138aa --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-47-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] orDefault 0 ) => . requires X =/=K x + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k.out new file mode 100644 index 00000000000..67a86b16d42 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-47-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + x + } ) +#And + #Not ( { + X + #Equals + y + } ) +#And + + lookupResult ( 3 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k new file mode 100644 index 00000000000..f5840f4c54d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-48-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 3 y |-> 4) [ x <- 5 ] [ X ] orDefault 0 ) => . requires X =/=K y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k.out new file mode 100644 index 00000000000..157487b2acb --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-48-spec.k.out @@ -0,0 +1,10 @@ + #Not ( { + X + #Equals + y + } ) +#And + + lookupResult ( ( X:MyId |-> 3 ) [ x <- 5 ] [ X:MyId ] orDefault 0 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k new file mode 100644 index 00000000000..17eafe82a3b --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-49-SPEC + imports MAP-TESTS + + claim lookup ( ( (y |-> 4) [ x ] orDefault 0 ) ==K 4 ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k.out new file mode 100644 index 00000000000..7939b808008 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-49-spec.k.out @@ -0,0 +1,4 @@ + + lookupResult ( false ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k new file mode 100644 index 00000000000..14e080a7644 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-5-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k.out new file mode 100644 index 00000000000..7cdce262bef --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-5-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k new file mode 100644 index 00000000000..fbf55a8f850 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-50-SPEC + imports MAP-TESTS + + claim lookup ( (Y:MyId |-> 1 X:MyId |-> 2) [ Y:MyId ] orDefault 0 ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k.out new file mode 100644 index 00000000000..cbdbc4c0ccc --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-50-spec.k.out @@ -0,0 +1,10 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( 1 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k new file mode 100644 index 00000000000..050e2aa9349 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-51-SPEC + imports MAP-TESTS + + claim lookup ( (X:MyId |-> 1 Y:MyId |-> 2) [ Z:MyId ] orDefault 0 ) => . requires Z =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k.out new file mode 100644 index 00000000000..9f3db7fbec5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-51-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( 0 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k new file mode 100644 index 00000000000..cd58e314cd7 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-52-SPEC + imports MAP-TESTS + + claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X ==K Y andBool Y in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k.out new file mode 100644 index 00000000000..1f7ebb952c2 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-52-spec.k.out @@ -0,0 +1,10 @@ + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + true + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k new file mode 100644 index 00000000000..34e0075c041 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-53-SPEC + imports MAP-TESTS + + claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y andBool Y in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k.out new file mode 100644 index 00000000000..625871c933c --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-53-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( MAP [ Y:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + true + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k new file mode 100644 index 00000000000..a6584620e78 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-54-SPEC + imports MAP-TESTS + + claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X ==K Y andBool notBool Y in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k.out new file mode 100644 index 00000000000..264bd40f6f1 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-54-spec.k.out @@ -0,0 +1,10 @@ + + lookupResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k new file mode 100644 index 00000000000..d7fb105a28a --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-55-SPEC + imports MAP-TESTS + + claim lookup ( MAP:Map [ X:MyId <- 1 ] [ Y:MyId ] orDefault 0 ) => . requires X =/=K Y andBool notBool Y in_keys(MAP) + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k.out new file mode 100644 index 00000000000..c1b630d93cd --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-55-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + lookupResult ( MAP [ Y:MyId ] orDefault 0 ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k new file mode 100644 index 00000000000..5dd746f6269 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-6-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k.out new file mode 100644 index 00000000000..74ad1d808f4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-6-spec.k.out @@ -0,0 +1,35 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Y:MyId <- 2 ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- 2 ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k new file mode 100644 index 00000000000..964e14d9a59 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-7-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k.out new file mode 100644 index 00000000000..d9cb8e6ac76 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-7-spec.k.out @@ -0,0 +1,30 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k new file mode 100644 index 00000000000..ff905d3d4b0 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-8-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k.out new file mode 100644 index 00000000000..444d98fae28 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-8-spec.k.out @@ -0,0 +1,23 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + lookupResult ( 2 ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Z:MyId <- 2 ] + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k new file mode 100644 index 00000000000..4f9e7a85a25 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module LOOKUP-9-SPEC + imports MAP-TESTS + + claim lookup ( (MAP:Map X:MyId |-> 1) [Y:MyId <- 2] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k.out new file mode 100644 index 00000000000..04bb5fcd8e4 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/lookup-9-spec.k.out @@ -0,0 +1,41 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + lookupResult ( MAP [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- 2 ] + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/map-tests.k b/pyk/regression-new/map-symbolic-tests-haskell/map-tests.k new file mode 100644 index 00000000000..9fdca60abb0 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/map-tests.k @@ -0,0 +1,27 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module MAP-TESTS-SYNTAX + imports MAP + imports INT + imports K-EQUAL + imports BOOL + + syntax MyId ::= "x" | "y" | "z" | foo ( MyId ) + + syntax Test ::= Int | Map + | lookup ( K ) | assignment ( Map ) | inkeys ( Bool ) + | lookupResult ( K ) | assignmentResult ( Map ) | inkeysResult ( Bool ) + | remove ( K ) | removeResult ( K ) +endmodule + +module MAP-TESTS + imports MAP-TESTS-SYNTAX + imports MAP-SYMBOLIC + + configuration $PGM:Test + + rule lookup ( K ) => lookupResult ( K ) + rule assignment ( M ) => assignmentResult ( M ) + rule inkeys ( M ) => inkeysResult ( M ) + rule remove ( K ) => removeResult ( K ) +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove b/pyk/regression-new/map-symbolic-tests-haskell/remove new file mode 100644 index 00000000000..adc5a288996 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove @@ -0,0 +1,18 @@ +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y ==K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z ==K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z ==K Y +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K Y +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z =/=K X +claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z ==K X andBool Y =/=K X +claim remove ( (X:MyId |-> 3 y |-> 4) [ x <- undef ] [ X ] ) => . requires X =/=K x +claim remove ( (X:MyId |-> 3 y |-> 4) [ x <- undef ] [ X ] ) => . requires X =/=K y +claim remove ( (X:MyId |-> 1 Y:MyId |-> 2) [ X <- undef ] ) => . diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k new file mode 100644 index 00000000000..acad77397f8 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-1-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k.out new file mode 100644 index 00000000000..fc1bfc75635 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-1-spec.k.out @@ -0,0 +1,16 @@ + + removeResult ( MAP [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k new file mode 100644 index 00000000000..25f8bec902e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-10-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k.out new file mode 100644 index 00000000000..b3b62b265c3 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-10-spec.k.out @@ -0,0 +1,18 @@ + + removeResult ( ( MAP + Z:MyId |-> 1 ) [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + Z:MyId |-> 1 ) [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k new file mode 100644 index 00000000000..9f34191b9ef --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-11-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k.out new file mode 100644 index 00000000000..e603669c646 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-11-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + X + #Equals + Z + } ) +#And + + removeResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k new file mode 100644 index 00000000000..f9581f21555 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-12-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-12-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k new file mode 100644 index 00000000000..5e4946e6092 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-13-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k.out new file mode 100644 index 00000000000..a028ffcb2f0 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-13-spec.k.out @@ -0,0 +1,24 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + removeResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k new file mode 100644 index 00000000000..27e2f5d1b45 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-14-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k.out new file mode 100644 index 00000000000..ba4641f5174 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-14-spec.k.out @@ -0,0 +1,30 @@ + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + removeResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k new file mode 100644 index 00000000000..4b0d3d34e0e --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-15-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Z =/=K Y andBool Z ==K X andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k.out new file mode 100644 index 00000000000..2d4ad85e134 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-15-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + removeResult ( 1 ~> .K ) ~> .K + +#And + { + false + #Equals + Z:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k new file mode 100644 index 00000000000..4afdd52c481 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-16-SPEC + imports MAP-TESTS + + claim remove ( (X:MyId |-> 3 y |-> 4) [ x <- undef ] [ X ] ) => . requires X =/=K x + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k.out new file mode 100644 index 00000000000..ff0614369d6 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-16-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + x + } ) +#And + #Not ( { + X + #Equals + y + } ) +#And + + removeResult ( 3 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k new file mode 100644 index 00000000000..ee789a9ac23 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-17-SPEC + imports MAP-TESTS + + claim remove ( (X:MyId |-> 3 y |-> 4) [ x <- undef ] [ X ] ) => . requires X =/=K y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k.out new file mode 100644 index 00000000000..fa3926a96b2 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-17-spec.k.out @@ -0,0 +1,29 @@ + #Not ( { + X + #Equals + y + } ) +#And + + removeResult ( ( X:MyId |-> 3 ) [ x <- undef ] [ X:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + y in_keys ( ( X:MyId |-> 3 ) [ x <- undef ] ) + } +#And + { + true + #Equals + X:MyId in_keys ( ( X:MyId |-> 3 ) [ x <- undef ] + ( y |-> 4 ) ) + } +#And + { + true + #Equals + X:MyId in_keys ( ( X:MyId |-> 3 ) [ x <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k new file mode 100644 index 00000000000..0c02789bf24 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-18-SPEC + imports MAP-TESTS + + claim remove ( (X:MyId |-> 1 Y:MyId |-> 2) [ X <- undef ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k.out new file mode 100644 index 00000000000..ef11f602a26 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-18-spec.k.out @@ -0,0 +1,10 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + removeResult ( Y:MyId |-> 2 ~> .K ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k new file mode 100644 index 00000000000..225a3c5e142 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-2-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-2-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k new file mode 100644 index 00000000000..8d6ac441ea3 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-3-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k.out new file mode 100644 index 00000000000..96824265437 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-3-spec.k.out @@ -0,0 +1,22 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + removeResult ( MAP [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + Y:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k new file mode 100644 index 00000000000..5e030288ae5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-4-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k.out new file mode 100644 index 00000000000..41fc0869506 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-4-spec.k.out @@ -0,0 +1,18 @@ + + removeResult ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + true + #Equals + Z:MyId in_keys ( ( MAP + X:MyId |-> 1 ) [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k new file mode 100644 index 00000000000..9ab6f2a6571 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-5-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k.out new file mode 100644 index 00000000000..7e6deb3be2a --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-5-spec.k.out @@ -0,0 +1,30 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + removeResult ( MAP [ Y:MyId <- undef ] + ( X:MyId |-> 1 ) [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + X:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k new file mode 100644 index 00000000000..67d907d550b --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-6-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k.out new file mode 100644 index 00000000000..048743628ab --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-6-spec.k.out @@ -0,0 +1,41 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + + removeResult ( MAP [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + X:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] + ( X:MyId |-> 1 ) ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k new file mode 100644 index 00000000000..dfa841a67c3 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-7-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k.out new file mode 100644 index 00000000000..9560852e322 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-7-spec.k.out @@ -0,0 +1,36 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + removeResult ( MAP [ Y:MyId <- undef ] + ( X:MyId |-> 1 ) [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + X:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] + ( X:MyId |-> 1 ) ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k new file mode 100644 index 00000000000..3d02035cf4d --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-8-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-8-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k b/pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k new file mode 100644 index 00000000000..bea2ec8ab5c --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "map-tests.k" + +module REMOVE-9-SPEC + imports MAP-TESTS + + claim remove ( (MAP:Map X:MyId |-> 1) [Y:MyId <- undef] [ Z:MyId ] ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k.out b/pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k.out new file mode 100644 index 00000000000..002f80c46fb --- /dev/null +++ b/pyk/regression-new/map-symbolic-tests-haskell/remove-9-spec.k.out @@ -0,0 +1,47 @@ + #Not ( { + X + #Equals + Y + } ) +#And + #Not ( { + X + #Equals + Z + } ) +#And + #Not ( { + Y + #Equals + Z + } ) +#And + + removeResult ( MAP [ Y:MyId <- undef ] [ Z:MyId ] ~> .K ) ~> .K + +#And + { + false + #Equals + X:MyId in_keys ( MAP ) + } +#And + { + false + #Equals + X:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] + ( X:MyId |-> 1 ) ) + } +#And + { + true + #Equals + Z:MyId in_keys ( MAP [ Y:MyId <- undef ] ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/markdownSelectors/1.test b/pyk/regression-new/markdownSelectors/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/markdownSelectors/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/markdownSelectors/1.test.out b/pyk/regression-new/markdownSelectors/1.test.out new file mode 100644 index 00000000000..c992a0b410b --- /dev/null +++ b/pyk/regression-new/markdownSelectors/1.test.out @@ -0,0 +1,8 @@ + + + 2 ~> .K + + + 0 + + diff --git a/pyk/regression-new/markdownSelectors/Makefile b/pyk/regression-new/markdownSelectors/Makefile new file mode 100644 index 00000000000..3689862a395 --- /dev/null +++ b/pyk/regression-new/markdownSelectors/Makefile @@ -0,0 +1,10 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--md-selector '(k|keep) & !discard' +KPROVE_FLAGS+=--md-selector k + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/markdownSelectors/a-spec.md b/pyk/regression-new/markdownSelectors/a-spec.md new file mode 100644 index 00000000000..e352a0e4698 --- /dev/null +++ b/pyk/regression-new/markdownSelectors/a-spec.md @@ -0,0 +1,11 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +```k +requires "test.md" + +module A-SPEC + +endmodule +``` diff --git a/pyk/regression-new/markdownSelectors/a-spec.md.out b/pyk/regression-new/markdownSelectors/a-spec.md.out new file mode 100644 index 00000000000..f803415da8b --- /dev/null +++ b/pyk/regression-new/markdownSelectors/a-spec.md.out @@ -0,0 +1,9 @@ +[Error] Outer Parser: Module TEST differs from previous declaration at Source(test.md) and Location(11,1,40,10). This can happen if --md-selector differs for kompile and kprove + Source(test.md) + Location(11,1,40,10) + . v~~~~~~~~~~ + 11 | module TEST + | ... + 40 | endmodule + . ~~~~~~~~^ +[Error] Outer Parser: Had 1 outer parsing errors. diff --git a/pyk/regression-new/markdownSelectors/test.md b/pyk/regression-new/markdownSelectors/test.md new file mode 100644 index 00000000000..d6a3517a6ef --- /dev/null +++ b/pyk/regression-new/markdownSelectors/test.md @@ -0,0 +1,41 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +Test +==== +```k +module TEST-SYNTAX + imports INT +endmodule +module TEST + imports INT +``` + +```{.k} + configuration $PGM:K 0 +``` + +```{.discard} + rule 0 => 1 +``` + +```{.keep} + rule 0 => 1 +``` + +```{.k .keep} + rule 1 => 2 +``` + +```{.k .discard .numberLines startFrom="0"} + rule 2 => 3 +``` + +```{.keep .discard} + rule 0 => 1 +``` + +```k +endmodule +``` diff --git a/pyk/regression-new/minimization-issue/Makefile b/pyk/regression-new/minimization-issue/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/minimization-issue/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/minimization-issue/test.k b/pyk/regression-new/minimization-issue/test.k new file mode 100644 index 00000000000..053f07a74a3 --- /dev/null +++ b/pyk/regression-new/minimization-issue/test.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports LIST + +syntax List ::= foo(List, List) [function] + +rule foo(.List, (.List ListItem(_I::Int))) => .List + +endmodule diff --git a/pyk/regression-new/mint-llvm/1.test b/pyk/regression-new/mint-llvm/1.test new file mode 100644 index 00000000000..e6c20af11f2 --- /dev/null +++ b/pyk/regression-new/mint-llvm/1.test @@ -0,0 +1 @@ +~ 0 diff --git a/pyk/regression-new/mint-llvm/1.test.out b/pyk/regression-new/mint-llvm/1.test.out new file mode 100644 index 00000000000..e47041d3610 --- /dev/null +++ b/pyk/regression-new/mint-llvm/1.test.out @@ -0,0 +1,3 @@ + + 255p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/10.test b/pyk/regression-new/mint-llvm/10.test new file mode 100644 index 00000000000..b4ea6b0ce72 --- /dev/null +++ b/pyk/regression-new/mint-llvm/10.test @@ -0,0 +1 @@ +6 & 3 diff --git a/pyk/regression-new/mint-llvm/10.test.out b/pyk/regression-new/mint-llvm/10.test.out new file mode 100644 index 00000000000..800bedfe8d5 --- /dev/null +++ b/pyk/regression-new/mint-llvm/10.test.out @@ -0,0 +1,3 @@ + + 2p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/11.test b/pyk/regression-new/mint-llvm/11.test new file mode 100644 index 00000000000..561c98339b5 --- /dev/null +++ b/pyk/regression-new/mint-llvm/11.test @@ -0,0 +1 @@ +6 ^ 3 diff --git a/pyk/regression-new/mint-llvm/11.test.out b/pyk/regression-new/mint-llvm/11.test.out new file mode 100644 index 00000000000..2e8ffd3faad --- /dev/null +++ b/pyk/regression-new/mint-llvm/11.test.out @@ -0,0 +1,3 @@ + + 5p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/12.test b/pyk/regression-new/mint-llvm/12.test new file mode 100644 index 00000000000..ed397dc7848 --- /dev/null +++ b/pyk/regression-new/mint-llvm/12.test @@ -0,0 +1 @@ +6 | 3 diff --git a/pyk/regression-new/mint-llvm/12.test.out b/pyk/regression-new/mint-llvm/12.test.out new file mode 100644 index 00000000000..808e7301b89 --- /dev/null +++ b/pyk/regression-new/mint-llvm/12.test.out @@ -0,0 +1,3 @@ + + 7p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/13.test b/pyk/regression-new/mint-llvm/13.test new file mode 100644 index 00000000000..5931e02915d --- /dev/null +++ b/pyk/regression-new/mint-llvm/13.test @@ -0,0 +1 @@ +-1 < 0 diff --git a/pyk/regression-new/mint-llvm/13.test.out b/pyk/regression-new/mint-llvm/13.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/mint-llvm/13.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/mint-llvm/14.test b/pyk/regression-new/mint-llvm/14.test new file mode 100644 index 00000000000..a6f6cea5aa6 --- /dev/null +++ b/pyk/regression-new/mint-llvm/14.test @@ -0,0 +1 @@ +-1 <= -1 diff --git a/pyk/regression-new/mint-llvm/14.test.out b/pyk/regression-new/mint-llvm/14.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/mint-llvm/14.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/mint-llvm/15.test b/pyk/regression-new/mint-llvm/15.test new file mode 100644 index 00000000000..dc88f709d8f --- /dev/null +++ b/pyk/regression-new/mint-llvm/15.test @@ -0,0 +1 @@ +127 > -1 diff --git a/pyk/regression-new/mint-llvm/15.test.out b/pyk/regression-new/mint-llvm/15.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/mint-llvm/15.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/mint-llvm/16.test b/pyk/regression-new/mint-llvm/16.test new file mode 100644 index 00000000000..5a6f10b6610 --- /dev/null +++ b/pyk/regression-new/mint-llvm/16.test @@ -0,0 +1 @@ +-128 >= -128 diff --git a/pyk/regression-new/mint-llvm/16.test.out b/pyk/regression-new/mint-llvm/16.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/mint-llvm/16.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/mint-llvm/17.test b/pyk/regression-new/mint-llvm/17.test new file mode 100644 index 00000000000..ab52d7d38b6 --- /dev/null +++ b/pyk/regression-new/mint-llvm/17.test @@ -0,0 +1 @@ +0 == 15 diff --git a/pyk/regression-new/mint-llvm/17.test.out b/pyk/regression-new/mint-llvm/17.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/mint-llvm/17.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/mint-llvm/18.test b/pyk/regression-new/mint-llvm/18.test new file mode 100644 index 00000000000..22041932f6b --- /dev/null +++ b/pyk/regression-new/mint-llvm/18.test @@ -0,0 +1 @@ +5 != 5 diff --git a/pyk/regression-new/mint-llvm/18.test.out b/pyk/regression-new/mint-llvm/18.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/mint-llvm/18.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/mint-llvm/2.test b/pyk/regression-new/mint-llvm/2.test new file mode 100644 index 00000000000..089e81f6f5e --- /dev/null +++ b/pyk/regression-new/mint-llvm/2.test @@ -0,0 +1 @@ +- 1 diff --git a/pyk/regression-new/mint-llvm/2.test.out b/pyk/regression-new/mint-llvm/2.test.out new file mode 100644 index 00000000000..e47041d3610 --- /dev/null +++ b/pyk/regression-new/mint-llvm/2.test.out @@ -0,0 +1,3 @@ + + 255p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/3.test b/pyk/regression-new/mint-llvm/3.test new file mode 100644 index 00000000000..289c83e43fb --- /dev/null +++ b/pyk/regression-new/mint-llvm/3.test @@ -0,0 +1 @@ +5 * 7 diff --git a/pyk/regression-new/mint-llvm/3.test.out b/pyk/regression-new/mint-llvm/3.test.out new file mode 100644 index 00000000000..ac252f1ff5f --- /dev/null +++ b/pyk/regression-new/mint-llvm/3.test.out @@ -0,0 +1,3 @@ + + 35p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/4.test b/pyk/regression-new/mint-llvm/4.test new file mode 100644 index 00000000000..5aad57c1d64 --- /dev/null +++ b/pyk/regression-new/mint-llvm/4.test @@ -0,0 +1 @@ +-7 / 3 diff --git a/pyk/regression-new/mint-llvm/4.test.out b/pyk/regression-new/mint-llvm/4.test.out new file mode 100644 index 00000000000..1cb1e20b00b --- /dev/null +++ b/pyk/regression-new/mint-llvm/4.test.out @@ -0,0 +1,3 @@ + + 254p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/5.test b/pyk/regression-new/mint-llvm/5.test new file mode 100644 index 00000000000..c319e001a54 --- /dev/null +++ b/pyk/regression-new/mint-llvm/5.test @@ -0,0 +1 @@ +-7 % 3 diff --git a/pyk/regression-new/mint-llvm/5.test.out b/pyk/regression-new/mint-llvm/5.test.out new file mode 100644 index 00000000000..e47041d3610 --- /dev/null +++ b/pyk/regression-new/mint-llvm/5.test.out @@ -0,0 +1,3 @@ + + 255p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/6.test b/pyk/regression-new/mint-llvm/6.test new file mode 100644 index 00000000000..41f4e4b8b78 --- /dev/null +++ b/pyk/regression-new/mint-llvm/6.test @@ -0,0 +1 @@ +64 + 64 diff --git a/pyk/regression-new/mint-llvm/6.test.out b/pyk/regression-new/mint-llvm/6.test.out new file mode 100644 index 00000000000..fb44327445a --- /dev/null +++ b/pyk/regression-new/mint-llvm/6.test.out @@ -0,0 +1,3 @@ + + 128p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/7.test b/pyk/regression-new/mint-llvm/7.test new file mode 100644 index 00000000000..727be8e4336 --- /dev/null +++ b/pyk/regression-new/mint-llvm/7.test @@ -0,0 +1 @@ +10 - 2 diff --git a/pyk/regression-new/mint-llvm/7.test.out b/pyk/regression-new/mint-llvm/7.test.out new file mode 100644 index 00000000000..700c9c04028 --- /dev/null +++ b/pyk/regression-new/mint-llvm/7.test.out @@ -0,0 +1,3 @@ + + 8p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/8.test b/pyk/regression-new/mint-llvm/8.test new file mode 100644 index 00000000000..c75a1fa4ddd --- /dev/null +++ b/pyk/regression-new/mint-llvm/8.test @@ -0,0 +1 @@ +1 << 7 diff --git a/pyk/regression-new/mint-llvm/8.test.out b/pyk/regression-new/mint-llvm/8.test.out new file mode 100644 index 00000000000..fb44327445a --- /dev/null +++ b/pyk/regression-new/mint-llvm/8.test.out @@ -0,0 +1,3 @@ + + 128p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/9.test b/pyk/regression-new/mint-llvm/9.test new file mode 100644 index 00000000000..eee55de3c7d --- /dev/null +++ b/pyk/regression-new/mint-llvm/9.test @@ -0,0 +1 @@ +127 >> 6 diff --git a/pyk/regression-new/mint-llvm/9.test.out b/pyk/regression-new/mint-llvm/9.test.out new file mode 100644 index 00000000000..1cf46473bea --- /dev/null +++ b/pyk/regression-new/mint-llvm/9.test.out @@ -0,0 +1,3 @@ + + 1p8 ~> .K + diff --git a/pyk/regression-new/mint-llvm/Makefile b/pyk/regression-new/mint-llvm/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/mint-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/mint-llvm/test.k b/pyk/regression-new/mint-llvm/test.k new file mode 100644 index 00000000000..5dbeaa91811 --- /dev/null +++ b/pyk/regression-new/mint-llvm/test.k @@ -0,0 +1,55 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports MINT + + syntax MInt{8} + syntax Number ::= Int | MInt{8} + + syntax AExp ::= Number + | "~" AExp [strict] + | "-" AExp [strict] + > AExp "*" AExp [strict] + | AExp "/" AExp [strict] + | AExp "%" AExp [strict] + > AExp "+" AExp [strict] + | AExp "-" AExp [strict] + > AExp ">>" AExp [strict] + | AExp "<<" AExp [strict] + > AExp "&" AExp [strict] + > AExp "^" AExp [strict] + > AExp "|" AExp [strict] + + syntax BExp ::= Bool + | AExp "<" AExp [strict] + | AExp "<=" AExp [strict] + | AExp ">" AExp [strict] + | AExp ">=" AExp [strict] + | AExp "==" AExp [strict] + | AExp "!=" AExp [strict] + + syntax KResult ::= MInt{8} | Bool + + rule I:Int => Int2MInt(I)::MInt{8} + + rule ~ I => ~MInt I + rule - I => --MInt I + rule I * J => I *MInt J + rule I / J => I /sMInt J + rule I % J => I %sMInt J + rule I + J => I +MInt J + rule I - J => I -MInt J + rule I >> J => I >>aMInt J + rule I << J => I < I &MInt J + rule I ^ J => I xorMInt J + rule I | J => I |MInt J + + rule I < J => I I <=sMInt J + rule I > J => I >sMInt J + rule I >= J => I >=sMInt J + rule I == J => I ==MInt J + rule I != J => I =/=MInt J + +endmodule diff --git a/pyk/regression-new/mutable-bytes/Makefile b/pyk/regression-new/mutable-bytes/Makefile new file mode 100644 index 00000000000..5efe0edce09 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=default mutable +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/mutable-bytes/default/Makefile b/pyk/regression-new/mutable-bytes/default/Makefile new file mode 100644 index 00000000000..1f58868a936 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/default/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/mutable-bytes/default/a.test b/pyk/regression-new/mutable-bytes/default/a.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/default/a.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/mutable-bytes/default/a.test.out b/pyk/regression-new/mutable-bytes/default/a.test.out new file mode 100644 index 00000000000..3154efc6e40 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/default/a.test.out @@ -0,0 +1,11 @@ + + + d ~> .K + + + b"bob__" + + + b"alice" + + diff --git a/pyk/regression-new/mutable-bytes/default/test.k b/pyk/regression-new/mutable-bytes/default/test.k new file mode 100644 index 00000000000..063402d76a5 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/default/test.k @@ -0,0 +1,21 @@ +module TEST + imports BYTES + imports INT-SYNTAX + + configuration + + $PGM + .Bytes + .Bytes + + + syntax KItem ::= "a" | "b" | "c" | "d" | "e" + + rule a => b + _ => b"alice" + rule b => c + B + _ => B + rule c => d + B => replaceAtBytes(B, 0:Int, b"bob__") +endmodule diff --git a/pyk/regression-new/mutable-bytes/mutable/Makefile b/pyk/regression-new/mutable-bytes/mutable/Makefile new file mode 100644 index 00000000000..4491d1c42e2 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/mutable/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST --llvm-mutable-bytes + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/mutable-bytes/mutable/a.test b/pyk/regression-new/mutable-bytes/mutable/a.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/mutable/a.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/mutable-bytes/mutable/a.test.out b/pyk/regression-new/mutable-bytes/mutable/a.test.out new file mode 100644 index 00000000000..5a954ce83fc --- /dev/null +++ b/pyk/regression-new/mutable-bytes/mutable/a.test.out @@ -0,0 +1,11 @@ + + + d ~> .K + + + b"bob__" + + + b"bob__" + + diff --git a/pyk/regression-new/mutable-bytes/mutable/test.k b/pyk/regression-new/mutable-bytes/mutable/test.k new file mode 100644 index 00000000000..063402d76a5 --- /dev/null +++ b/pyk/regression-new/mutable-bytes/mutable/test.k @@ -0,0 +1,21 @@ +module TEST + imports BYTES + imports INT-SYNTAX + + configuration + + $PGM + .Bytes + .Bytes + + + syntax KItem ::= "a" | "b" | "c" | "d" | "e" + + rule a => b + _ => b"alice" + rule b => c + B + _ => B + rule c => d + B => replaceAtBytes(B, 0:Int, b"bob__") +endmodule diff --git a/pyk/regression-new/no-dup-rules/Makefile b/pyk/regression-new/no-dup-rules/Makefile new file mode 100644 index 00000000000..472cf308c96 --- /dev/null +++ b/pyk/regression-new/no-dup-rules/Makefile @@ -0,0 +1,5 @@ +DEF=no-dup-rules +EXT=ndr +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/no-dup-rules/no-dup-rules.k b/pyk/regression-new/no-dup-rules/no-dup-rules.k new file mode 100644 index 00000000000..14881511234 --- /dev/null +++ b/pyk/regression-new/no-dup-rules/no-dup-rules.k @@ -0,0 +1,40 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module NO-DUP-RULES-INIT + imports STRING-BUFFER + imports MAP + imports COLLECTIONS + imports INT + imports BOOL + + syntax KResult ::= Int + + syntax Int ::= #parseHexWord ( String ) [function] + | #parseWord ( String ) [function] + // -------------------------------------------------- + rule #parseHexWord("") => 0 + rule #parseHexWord("0x") => 0 + rule #parseHexWord(S) => String2Base(replaceAll(S, "0x", ""), 16) requires (S =/=String "") andBool (S =/=String "0x") + + rule #parseWord("") => 0 + rule #parseWord(S) => #parseHexWord(S) requires lengthString(S) >=Int 2 andBool substrString(S, 0, 2) ==String "0x" + rule #parseWord(S) => String2Int(S) [owise] +endmodule + +module NO-DUP-RULES-SYNTAX + imports STRING + imports NO-DUP-RULES-INIT + + configuration + $PGM:Int + + syntax Exp ::= Ccall ( BExp ) [strict] + // -------------------------------------- + + syntax BExp ::= Bool +endmodule + +module NO-DUP-RULES + imports NO-DUP-RULES-SYNTAX + imports K-REFLECTION +endmodule diff --git a/pyk/regression-new/no-dup-rules/test.ndr b/pyk/regression-new/no-dup-rules/test.ndr new file mode 100644 index 00000000000..bb98eb1182e --- /dev/null +++ b/pyk/regression-new/no-dup-rules/test.ndr @@ -0,0 +1 @@ +#parseWord ( "0002324" ) diff --git a/pyk/regression-new/no-dup-rules/test.ndr.out b/pyk/regression-new/no-dup-rules/test.ndr.out new file mode 100644 index 00000000000..a0ccf2e05f6 --- /dev/null +++ b/pyk/regression-new/no-dup-rules/test.ndr.out @@ -0,0 +1,3 @@ + + 2324 ~> .K + diff --git a/pyk/regression-new/no-pattern/1.test b/pyk/regression-new/no-pattern/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/no-pattern/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/no-pattern/1.test.out b/pyk/regression-new/no-pattern/1.test.out new file mode 100644 index 00000000000..0382a5c0256 --- /dev/null +++ b/pyk/regression-new/no-pattern/1.test.out @@ -0,0 +1,7 @@ + + 1 ~> .K + +#Or + + 2 ~> .K + diff --git a/pyk/regression-new/no-pattern/Makefile b/pyk/regression-new/no-pattern/Makefile new file mode 100644 index 00000000000..3ac944b4544 --- /dev/null +++ b/pyk/regression-new/no-pattern/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS+=--enable-search --syntax-module TEST +KRUN_FLAGS+=--search-final --no-pattern + +include ../include/ktest.mak diff --git a/pyk/regression-new/no-pattern/test.k b/pyk/regression-new/no-pattern/test.k new file mode 100644 index 00000000000..844b47d011b --- /dev/null +++ b/pyk/regression-new/no-pattern/test.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + rule 0 => 1 + rule 0 => 2 +endmodule diff --git a/pyk/regression-new/nomain/Makefile b/pyk/regression-new/nomain/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/nomain/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/nomain/test.k b/pyk/regression-new/nomain/test.k new file mode 100644 index 00000000000..295f75915df --- /dev/null +++ b/pyk/regression-new/nomain/test.k @@ -0,0 +1,6 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + + configuration $PGM:K + +endmodule diff --git a/pyk/regression-new/non-executable/Makefile b/pyk/regression-new/non-executable/Makefile new file mode 100644 index 00000000000..1223923fff1 --- /dev/null +++ b/pyk/regression-new/non-executable/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell llvm rewrite-check +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/non-executable/haskell/1.test b/pyk/regression-new/non-executable/haskell/1.test new file mode 100644 index 00000000000..1079a423a6a --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/1.test @@ -0,0 +1 @@ +f(423) diff --git a/pyk/regression-new/non-executable/haskell/1.test.out b/pyk/regression-new/non-executable/haskell/1.test.out new file mode 100644 index 00000000000..a76356d70a6 --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/1.test.out @@ -0,0 +1,3 @@ + + 423 ~> .K + diff --git a/pyk/regression-new/non-executable/haskell/2.test b/pyk/regression-new/non-executable/haskell/2.test new file mode 100644 index 00000000000..06b44cc1ec7 --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/2.test @@ -0,0 +1 @@ +f(2) diff --git a/pyk/regression-new/non-executable/haskell/2.test.out b/pyk/regression-new/non-executable/haskell/2.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/2.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/non-executable/haskell/3.test b/pyk/regression-new/non-executable/haskell/3.test new file mode 100644 index 00000000000..262fe687c05 --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/3.test @@ -0,0 +1 @@ +g(34, 576) diff --git a/pyk/regression-new/non-executable/haskell/3.test.out b/pyk/regression-new/non-executable/haskell/3.test.out new file mode 100644 index 00000000000..187fd58d771 --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/3.test.out @@ -0,0 +1,3 @@ + + 4567 ~> .K + diff --git a/pyk/regression-new/non-executable/haskell/Makefile b/pyk/regression-new/non-executable/haskell/Makefile new file mode 100644 index 00000000000..6e61cde3281 --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/non-executable/haskell/test.k b/pyk/regression-new/non-executable/haskell/test.k new file mode 100644 index 00000000000..e2897cf2e9d --- /dev/null +++ b/pyk/regression-new/non-executable/haskell/test.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Int ::= f(Int) [function] + syntax KItem ::= g(Int, Int) [function] +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + rule f(X) => 100 +Int X [non-executable] + rule f(X) => X requires X >=Int 100 [priority(199)] + rule f(_) => 0 [owise] + + rule g(X, Y) => X +Int Y [non-executable, priority(1)] + rule g(X, Y) => X requires X >=Int Y + rule g(_, _) => 4567 [owise] +endmodule diff --git a/pyk/regression-new/non-executable/llvm/1.test b/pyk/regression-new/non-executable/llvm/1.test new file mode 100644 index 00000000000..1079a423a6a --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/1.test @@ -0,0 +1 @@ +f(423) diff --git a/pyk/regression-new/non-executable/llvm/1.test.out b/pyk/regression-new/non-executable/llvm/1.test.out new file mode 100644 index 00000000000..a76356d70a6 --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/1.test.out @@ -0,0 +1,3 @@ + + 423 ~> .K + diff --git a/pyk/regression-new/non-executable/llvm/2.test b/pyk/regression-new/non-executable/llvm/2.test new file mode 100644 index 00000000000..06b44cc1ec7 --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/2.test @@ -0,0 +1 @@ +f(2) diff --git a/pyk/regression-new/non-executable/llvm/2.test.out b/pyk/regression-new/non-executable/llvm/2.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/2.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/non-executable/llvm/3.test b/pyk/regression-new/non-executable/llvm/3.test new file mode 100644 index 00000000000..262fe687c05 --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/3.test @@ -0,0 +1 @@ +g(34, 576) diff --git a/pyk/regression-new/non-executable/llvm/3.test.out b/pyk/regression-new/non-executable/llvm/3.test.out new file mode 100644 index 00000000000..187fd58d771 --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/3.test.out @@ -0,0 +1,3 @@ + + 4567 ~> .K + diff --git a/pyk/regression-new/non-executable/llvm/Makefile b/pyk/regression-new/non-executable/llvm/Makefile new file mode 100644 index 00000000000..cd3b760aed1 --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/non-executable/llvm/test.k b/pyk/regression-new/non-executable/llvm/test.k new file mode 100644 index 00000000000..e2897cf2e9d --- /dev/null +++ b/pyk/regression-new/non-executable/llvm/test.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Int ::= f(Int) [function] + syntax KItem ::= g(Int, Int) [function] +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + rule f(X) => 100 +Int X [non-executable] + rule f(X) => X requires X >=Int 100 [priority(199)] + rule f(_) => 0 [owise] + + rule g(X, Y) => X +Int Y [non-executable, priority(1)] + rule g(X, Y) => X requires X >=Int Y + rule g(_, _) => 4567 [owise] +endmodule diff --git a/pyk/regression-new/non-executable/rewrite-check/Makefile b/pyk/regression-new/non-executable/rewrite-check/Makefile new file mode 100644 index 00000000000..f25fb175d61 --- /dev/null +++ b/pyk/regression-new/non-executable/rewrite-check/Makefile @@ -0,0 +1 @@ +include ../../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/non-executable/rewrite-check/test.k b/pyk/regression-new/non-executable/rewrite-check/test.k new file mode 100644 index 00000000000..87793a7783a --- /dev/null +++ b/pyk/regression-new/non-executable/rewrite-check/test.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports INT-SYNTAX + + syntax Int ::= f(Int) [function] + syntax KItem ::= g(Int, Int) +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + + rule f(X) => 100 +Int X [non-executable] + rule f(X) => X requires X >=Int 100 [priority(199)] + rule f(_) => 0 [owise] + + rule g(X, Y) => X +Int Y [non-executable, priority(1)] + rule g(X, Y) => X requires X >=Int Y + rule g(_, _) => 4567 [owise] +endmodule diff --git a/pyk/regression-new/non-executable/rewrite-check/test.k.out b/pyk/regression-new/non-executable/rewrite-check/test.k.out new file mode 100644 index 00000000000..c669156ac95 --- /dev/null +++ b/pyk/regression-new/non-executable/rewrite-check/test.k.out @@ -0,0 +1,6 @@ +[Error] Compiler: non-executable attribute is only supported on function rules. + Source(test.k) + Location(17,8,17,27) + 17 | rule g(X, Y) => X +Int Y [non-executable, priority(1)] + . ^~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 1 structural errors. diff --git a/pyk/regression-new/nonexhaustive/Makefile b/pyk/regression-new/nonexhaustive/Makefile new file mode 100644 index 00000000000..a5e31ecb0ea --- /dev/null +++ b/pyk/regression-new/nonexhaustive/Makefile @@ -0,0 +1,4 @@ +KOMPILE_FLAGS=-w2e -w all -Wno useless-rule +KOMPILE_BACKEND=llvm + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/nonexhaustive/test.k b/pyk/regression-new/nonexhaustive/test.k new file mode 100644 index 00000000000..2184bbd768e --- /dev/null +++ b/pyk/regression-new/nonexhaustive/test.k @@ -0,0 +1,117 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "substitution.md" + +module TEST-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + imports STRING + imports BYTES + imports LIST + imports MAP + imports SET + imports FLOAT + imports BOOL + imports KVAR + imports STRING-BUFFER + +syntax Int ::= foo(Int) [function, total] +rule foo(0) => 0 +rule foo(1) => 0 +rule foo(2) => 0 + +syntax Int ::= foo2(Foo) [function, total] +syntax Foo ::= bar() | baz() + +rule foo2(bar()) => 0 + +syntax Int ::= foo2a(Bar) [function, total] +syntax Bar ::= stuff(Foo) | Foo +rule foo2a(bar()) => 0 +rule foo2a(baz()) => 0 +rule foo2a(stuff(bar())) => 0 + +syntax Int ::= foo3(String) [function, total] +rule foo3("") => 0 +rule foo3("0") => 0 +rule foo3("1") => 0 +rule foo3("2") => 0 + +syntax Int ::= foo4(Bytes) [function, total] + +syntax Int ::= foo5(List) [function, total] +rule foo5(.List) => 0 +rule foo5(ListItem(_)) => 0 +rule foo5(ListItem(_) ListItem(_) ListItem(_) _) => 0 +rule foo5(ListItem(_) ListItem(0)) => 0 + +syntax Int ::= foo6(Map, KItem) [function, total] +rule foo6(.Map, _) => 0 +rule foo6(X |-> _ _::Map, X) => 0 + +syntax Int ::= foo7(Map) [function, total] +rule foo7(.Map) => 0 +rule foo7(_ |-> _) => 0 +rule foo7(_ |-> _ _ |-> _ _ |-> _ _::Map) => 0 +rule foo7(_ |-> _ 0 |-> _) => 0 + +syntax Int ::= foo8(Map, KItem) [function, total] +rule foo8(.Map, _) => 0 +rule foo8(X |-> _, X) => 0 +rule foo8(_ |-> _, _) => 0 +rule foo8(_ |-> _ _ |-> _ _::Map, _) => 0 + +syntax Int ::= foo9(Map) [function, total] +rule foo9(_ |-> _) => 0 +rule foo9(_ |-> _ _ |-> _ _::Map) => 0 + +syntax Int ::= foo6(Set, KItem) [function, total] +rule foo6(.Set, _) => 0 +rule foo6(SetItem(X) _::Set, X) => 0 + +syntax Int ::= foo7(Set) [function, total] +rule foo7(.Set) => 0 +rule foo7(SetItem(_)) => 0 +rule foo7(SetItem(_) SetItem(_) SetItem(_) _::Set) => 0 +rule foo7(SetItem(_) SetItem(0)) => 0 + +syntax Int ::= foo8(Set, KItem) [function, total] +rule foo8(.Set, _) => 0 +rule foo8(SetItem(X), X) => 0 +rule foo8(SetItem(_), _) => 0 +rule foo8(SetItem(_) SetItem(_) _::Set, _) => 0 + +syntax Int ::= foo9(Set) [function, total] +rule foo9(SetItem(_)) => 0 +rule foo9(SetItem(_) SetItem(_) _) => 0 + +syntax Int ::= foo10(Float) [function, total] +rule foo10(0.0) => 0 +rule foo10(1.0) => 0 +rule foo10(2.0) => 0 +rule foo10(0.0F) => 0 +rule foo10(0.0f) => 0 + +syntax Int ::= foo10a(Float) [function, total] +rule foo10a(0.0f) => 0 + +syntax Int ::= foo11(Bool) [function, total] +rule foo11(true) => 0 + +syntax Int ::= foo11a(Bool) [function, total] +rule foo11a(false) => 0 + +syntax KVar ::= "_0" [token] | "_1" [token] | "_2" [token] +syntax Int ::= foo12(KVar) [function, total] +rule foo12(_0) => 0 +rule foo12(_1) => 0 +rule foo12(_2) => 0 + +syntax Int ::= foo13(StringBuffer) [function, total] + +syntax Int ::= used() [function] +rule used() => foo13(.StringBuffer) +Int foo4(.Bytes) + +endmodule diff --git a/pyk/regression-new/nonexhaustive/test.k.out b/pyk/regression-new/nonexhaustive/test.k.out new file mode 100644 index 00000000000..5ae37fa6dee --- /dev/null +++ b/pyk/regression-new/nonexhaustive/test.k.out @@ -0,0 +1,56 @@ +[Error] Compiler: Non exhaustive match detected: `foo(_)_TEST_Int_Int`(#token("3","Int")) + Source(test.k) + Location(20,16,20,42) + 20 | syntax Int ::= foo(Int) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo2(_)_TEST_Int_Foo`(`baz()_TEST_Foo`(.KList)) + Source(test.k) + Location(25,16,25,43) + 25 | syntax Int ::= foo2(Foo) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo2a(_)_TEST_Int_Bar`(`stuff(_)_TEST_Bar_Foo`(`baz()_TEST_Foo`(.KList))) + Source(test.k) + Location(30,16,30,44) + 30 | syntax Int ::= foo2a(Bar) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo3(_)_TEST_Int_String`(#token("\"3\"","String")) + Source(test.k) + Location(36,16,36,46) + 36 | syntax Int ::= foo3(String) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo4(_)_TEST_Int_Bytes`(_) + Source(test.k) + Location(42,16,42,45) + 42 | syntax Int ::= foo4(Bytes) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo10(_)_TEST_Int_Float`(#token("3.0","Float")) + Source(test.k) + Location(90,16,90,46) + 90 | syntax Int ::= foo10(Float) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo10a(_)_TEST_Int_Float`(#token("0.0","Float")) + Source(test.k) + Location(97,16,97,47) + 97 | syntax Int ::= foo10a(Float) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo11(_)_TEST_Int_Bool`(#token("false","Bool")) + Source(test.k) + Location(100,16,100,45) + 100 | syntax Int ::= foo11(Bool) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo11a(_)_TEST_Int_Bool`(#token("true","Bool")) + Source(test.k) + Location(103,16,103,46) + 103 | syntax Int ::= foo11a(Bool) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo12(_)_TEST_Int_KVar`(#token("_3","KVar")) + Source(test.k) + Location(107,16,107,45) + 107 | syntax Int ::= foo12(KVar) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Non exhaustive match detected: `foo13(_)_TEST_Int_StringBuffer`(_) + Source(test.k) + Location(112,16,112,53) + 112 | syntax Int ::= foo13(StringBuffer) [function, total] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 11 pattern matching errors. diff --git a/pyk/regression-new/or-haskell/Makefile b/pyk/regression-new/or-haskell/Makefile new file mode 100644 index 00000000000..8fc19b422b8 --- /dev/null +++ b/pyk/regression-new/or-haskell/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=../or-llvm +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/or-haskell/test.k b/pyk/regression-new/or-haskell/test.k new file mode 120000 index 00000000000..3f233bbf9e6 --- /dev/null +++ b/pyk/regression-new/or-haskell/test.k @@ -0,0 +1 @@ +../or-llvm/test.k \ No newline at end of file diff --git a/pyk/regression-new/or-llvm/1.test b/pyk/regression-new/or-llvm/1.test new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/pyk/regression-new/or-llvm/1.test @@ -0,0 +1 @@ +foo diff --git a/pyk/regression-new/or-llvm/1.test.out b/pyk/regression-new/or-llvm/1.test.out new file mode 100644 index 00000000000..1df1743bbfc --- /dev/null +++ b/pyk/regression-new/or-llvm/1.test.out @@ -0,0 +1,8 @@ + + + 0 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/10.test b/pyk/regression-new/or-llvm/10.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/or-llvm/10.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/or-llvm/10.test.out b/pyk/regression-new/or-llvm/10.test.out new file mode 100644 index 00000000000..8f71d37e868 --- /dev/null +++ b/pyk/regression-new/or-llvm/10.test.out @@ -0,0 +1,8 @@ + + + a ~> .K + + + 1 + + diff --git a/pyk/regression-new/or-llvm/11.test b/pyk/regression-new/or-llvm/11.test new file mode 100644 index 00000000000..61780798228 --- /dev/null +++ b/pyk/regression-new/or-llvm/11.test @@ -0,0 +1 @@ +b diff --git a/pyk/regression-new/or-llvm/11.test.out b/pyk/regression-new/or-llvm/11.test.out new file mode 100644 index 00000000000..4dcdbf7d5a4 --- /dev/null +++ b/pyk/regression-new/or-llvm/11.test.out @@ -0,0 +1,8 @@ + + + b ~> .K + + + 1 + + diff --git a/pyk/regression-new/or-llvm/2.test b/pyk/regression-new/or-llvm/2.test new file mode 100644 index 00000000000..5716ca5987c --- /dev/null +++ b/pyk/regression-new/or-llvm/2.test @@ -0,0 +1 @@ +bar diff --git a/pyk/regression-new/or-llvm/2.test.out b/pyk/regression-new/or-llvm/2.test.out new file mode 100644 index 00000000000..1df1743bbfc --- /dev/null +++ b/pyk/regression-new/or-llvm/2.test.out @@ -0,0 +1,8 @@ + + + 0 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/3.test b/pyk/regression-new/or-llvm/3.test new file mode 100644 index 00000000000..76018072e09 --- /dev/null +++ b/pyk/regression-new/or-llvm/3.test @@ -0,0 +1 @@ +baz diff --git a/pyk/regression-new/or-llvm/3.test.out b/pyk/regression-new/or-llvm/3.test.out new file mode 100644 index 00000000000..1df1743bbfc --- /dev/null +++ b/pyk/regression-new/or-llvm/3.test.out @@ -0,0 +1,8 @@ + + + 0 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/4.test b/pyk/regression-new/or-llvm/4.test new file mode 100644 index 00000000000..c55933e26e1 --- /dev/null +++ b/pyk/regression-new/or-llvm/4.test @@ -0,0 +1 @@ +test(foo) diff --git a/pyk/regression-new/or-llvm/4.test.out b/pyk/regression-new/or-llvm/4.test.out new file mode 100644 index 00000000000..be47d5cf86a --- /dev/null +++ b/pyk/regression-new/or-llvm/4.test.out @@ -0,0 +1,8 @@ + + + 2 ~> test ( foo ~> .K ) ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/5.test b/pyk/regression-new/or-llvm/5.test new file mode 100644 index 00000000000..e25090f8cda --- /dev/null +++ b/pyk/regression-new/or-llvm/5.test @@ -0,0 +1 @@ +test(bar) diff --git a/pyk/regression-new/or-llvm/5.test.out b/pyk/regression-new/or-llvm/5.test.out new file mode 100644 index 00000000000..059f59012be --- /dev/null +++ b/pyk/regression-new/or-llvm/5.test.out @@ -0,0 +1,8 @@ + + + 2 ~> test ( bar ~> .K ) ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/6.test b/pyk/regression-new/or-llvm/6.test new file mode 100644 index 00000000000..82f449fba61 --- /dev/null +++ b/pyk/regression-new/or-llvm/6.test @@ -0,0 +1 @@ +test(test2(baz,baz)) diff --git a/pyk/regression-new/or-llvm/6.test.out b/pyk/regression-new/or-llvm/6.test.out new file mode 100644 index 00000000000..f3b6b693bf8 --- /dev/null +++ b/pyk/regression-new/or-llvm/6.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/7.test b/pyk/regression-new/or-llvm/7.test new file mode 100644 index 00000000000..243c12c2fe0 --- /dev/null +++ b/pyk/regression-new/or-llvm/7.test @@ -0,0 +1 @@ +test(test(test2(baz,baz))) diff --git a/pyk/regression-new/or-llvm/7.test.out b/pyk/regression-new/or-llvm/7.test.out new file mode 100644 index 00000000000..f3b6b693bf8 --- /dev/null +++ b/pyk/regression-new/or-llvm/7.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/8.test b/pyk/regression-new/or-llvm/8.test new file mode 100644 index 00000000000..531d6aedc48 --- /dev/null +++ b/pyk/regression-new/or-llvm/8.test @@ -0,0 +1 @@ +stuff(test(test3(baz,2))) diff --git a/pyk/regression-new/or-llvm/8.test.out b/pyk/regression-new/or-llvm/8.test.out new file mode 100644 index 00000000000..0b72b5651c1 --- /dev/null +++ b/pyk/regression-new/or-llvm/8.test.out @@ -0,0 +1,8 @@ + + + 2 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/9.test b/pyk/regression-new/or-llvm/9.test new file mode 100644 index 00000000000..f05ea65939b --- /dev/null +++ b/pyk/regression-new/or-llvm/9.test @@ -0,0 +1 @@ +stuff(test(test(test3(baz,2)))) diff --git a/pyk/regression-new/or-llvm/9.test.out b/pyk/regression-new/or-llvm/9.test.out new file mode 100644 index 00000000000..0b72b5651c1 --- /dev/null +++ b/pyk/regression-new/or-llvm/9.test.out @@ -0,0 +1,8 @@ + + + 2 ~> .K + + + 0 + + diff --git a/pyk/regression-new/or-llvm/Makefile b/pyk/regression-new/or-llvm/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/or-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/or-llvm/test.k b/pyk/regression-new/or-llvm/test.k new file mode 100644 index 00000000000..4903859ca7e --- /dev/null +++ b/pyk/regression-new/or-llvm/test.k @@ -0,0 +1,23 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST + imports INT + imports BOOL + imports ML-SYNTAX + imports BASIC-K + + configuration $PGM:K 0 + + syntax KItem ::= "foo" | "bar" | "baz" | test(K) | test2(K, K) | test3(K, Int) | stuff(K) + rule foo #Or bar #Or baz => 0 + rule (.K => 2) ~> test(foo #Or bar) + rule test(test2(baz,_) #Or test(test2(baz,_))) => 1 + rule stuff(test(test3(baz,V:Int) #Or test(test3(baz,V:Int)))) => V + + syntax KItem ::= "macro" [macro] + rule macro => a #Or b + syntax Foo ::= "a" + syntax Bar ::= "b" + rule macro ... 0 => 1 + +endmodule diff --git a/pyk/regression-new/overload/Makefile b/pyk/regression-new/overload/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/overload/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/overload/exp.test b/pyk/regression-new/overload/exp.test new file mode 100644 index 00000000000..c2dd4496210 --- /dev/null +++ b/pyk/regression-new/overload/exp.test @@ -0,0 +1 @@ +E().x diff --git a/pyk/regression-new/overload/exp.test.out b/pyk/regression-new/overload/exp.test.out new file mode 100644 index 00000000000..acdaffbbc93 --- /dev/null +++ b/pyk/regression-new/overload/exp.test.out @@ -0,0 +1,3 @@ + + E ( ) . x ~> .K + diff --git a/pyk/regression-new/overload/lval.test b/pyk/regression-new/overload/lval.test new file mode 100644 index 00000000000..01809623228 --- /dev/null +++ b/pyk/regression-new/overload/lval.test @@ -0,0 +1 @@ +L().x diff --git a/pyk/regression-new/overload/lval.test.out b/pyk/regression-new/overload/lval.test.out new file mode 100644 index 00000000000..9fbc8d8cdd8 --- /dev/null +++ b/pyk/regression-new/overload/lval.test.out @@ -0,0 +1,3 @@ + + done ( ) ~> .K + diff --git a/pyk/regression-new/overload/test.k b/pyk/regression-new/overload/test.k new file mode 100644 index 00000000000..4def9d98c6b --- /dev/null +++ b/pyk/regression-new/overload/test.k @@ -0,0 +1,13 @@ +module TEST + imports ID + + syntax LVal ::= L() + syntax Exp ::= E() + | LVal + + syntax Exp ::= Exp "." Id [overload(_._)] + syntax LVal ::= LVal "." Id [overload(_._)] + + syntax KItem ::= done() + rule _:LVal => done() +endmodule diff --git a/pyk/regression-new/owise-haskell/Makefile b/pyk/regression-new/owise-haskell/Makefile new file mode 100644 index 00000000000..400f29ca6cb --- /dev/null +++ b/pyk/regression-new/owise-haskell/Makefile @@ -0,0 +1,8 @@ +DEF=demo +EXT=demo +TESTDIR=tests +KOMPILE_BACKEND=haskell +export KOMPILE_BACKEND +KOMPILE_FLAGS=--syntax-module DEMO + +include ../include/ktest.mak diff --git a/pyk/regression-new/owise-haskell/demo.k b/pyk/regression-new/owise-haskell/demo.k new file mode 100644 index 00000000000..5fad8da5e2d --- /dev/null +++ b/pyk/regression-new/owise-haskell/demo.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DEMO + imports BOOL + + syntax S ::= "a" | f(S) + syntax Bool ::= S "lt" S [function] + rule a lt f(_X) => true + rule f(X) lt f(Y) => X lt Y + rule _X lt _Y => false [owise] +endmodule diff --git a/pyk/regression-new/owise-haskell/tests/1.demo b/pyk/regression-new/owise-haskell/tests/1.demo new file mode 100644 index 00000000000..b3a8d180c95 --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/1.demo @@ -0,0 +1 @@ +a lt f(a) diff --git a/pyk/regression-new/owise-haskell/tests/1.demo.out b/pyk/regression-new/owise-haskell/tests/1.demo.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/1.demo.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/owise-haskell/tests/2.demo b/pyk/regression-new/owise-haskell/tests/2.demo new file mode 100644 index 00000000000..0aafa66fdff --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/2.demo @@ -0,0 +1 @@ +f(a) lt f(f(a)) diff --git a/pyk/regression-new/owise-haskell/tests/2.demo.out b/pyk/regression-new/owise-haskell/tests/2.demo.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/2.demo.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/owise-haskell/tests/3.demo b/pyk/regression-new/owise-haskell/tests/3.demo new file mode 100644 index 00000000000..3ba41029532 --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/3.demo @@ -0,0 +1 @@ +a lt a diff --git a/pyk/regression-new/owise-haskell/tests/3.demo.out b/pyk/regression-new/owise-haskell/tests/3.demo.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/3.demo.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/owise-haskell/tests/4.demo b/pyk/regression-new/owise-haskell/tests/4.demo new file mode 100644 index 00000000000..ee6823beb6e --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/4.demo @@ -0,0 +1 @@ +f(a) lt f(a) diff --git a/pyk/regression-new/owise-haskell/tests/4.demo.out b/pyk/regression-new/owise-haskell/tests/4.demo.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/owise-haskell/tests/4.demo.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/parse-c/Makefile b/pyk/regression-new/parse-c/Makefile new file mode 100644 index 00000000000..bf9b0479702 --- /dev/null +++ b/pyk/regression-new/parse-c/Makefile @@ -0,0 +1,16 @@ +DEF=c18-translation +EXT=kc +TESTDIR=. +KOMPILE_FLAGS+=--bison-lists --gen-glr-bison-parser +test: test.kore + $(KPRINT) c18-translation-kompiled test.kore | diff - test.ref + +test.kore: test.c kompile + ./c18-translation-kompiled/parser_PGM test.c > test.kore +include ../include/ktest.mak + +clean: + rm -rf test.kore c18-translation-kompiled + + +KRUN_OR_LEGACY=./cparse diff --git a/pyk/regression-new/parse-c/c18-syntax.k b/pyk/regression-new/parse-c/c18-syntax.k new file mode 100644 index 00000000000..cd05dbacb33 --- /dev/null +++ b/pyk/regression-new/parse-c/c18-syntax.k @@ -0,0 +1,341 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module C-LEXICAL-SORTS + syntax Identifier + syntax Constant ::= Char + syntax StringLiteral + syntax Char +endmodule + +module C-LEXICAL + imports C-LEXICAL-SORTS + + imports ID-SYNTAX + imports FLOAT-SYNTAX + imports STRING-SYNTAX + + syntax Identifier ::= Id + syntax Constant ::= IntConstant | Float + syntax StringLiteral ::= String + + syntax IntConstant ::= r"(([1-9][0-9]*)|(0[0-7]*)|(0[xX][0-9a-fA-F]+))(([uU][lL]?)|([uU]((ll)|(LL)))|([lL][uU]?)|(((ll)|(LL))[uU]?))?" [token] + syntax Char ::= r"[LuU]?'(([^'\\n\\\\])|(\\\\['\\\"?\\\\abfnrtv])|(\\\\[0-7]{3})|(\\\\x[0-9a-fA-F]+)|(\\\\u[0-9a-fA-F]{4})|(\\\\U[0-9a-fA-F]{8}))+'" [token] + +endmodule + +module C18-COMMON + imports C-LEXICAL-SORTS + + // \section(A.2.1) + + syntax Exp ::= Identifier + | Constant + | StringLiteral + | "(" Exp ")" [bracket] + | "_Generic" "(" Exp "," GenericAssocs ")" + > Exp "[" Exp "]" + | Exp "(" Exps ")" + | Exp "(" ")" + | Exp "." Identifier + | Exp "->" Identifier + | Exp "++" + | Exp "--" + | "(" TypeName ")" "{" Inits "}" + | "(" TypeName ")" "{" Inits "," "}" + > "++" Exp + | "--" Exp + | "&" Exp + | "*" Exp + | "+" Exp + | "-" Exp + | "~" Exp + | "!" Exp + | "sizeof" Exp + | "sizeof" "(" TypeName ")" + | "_Alignof" "(" TypeName ")" + > "(" TypeName ")" Exp + > left: + Exp "*" Exp + | Exp "/" Exp + | Exp "%" Exp + > left: + Exp "+" Exp + | Exp "-" Exp + > left: + Exp "<<" Exp + | Exp ">>" Exp + > left: + Exp "<" Exp + | Exp ">" Exp + | Exp "<=" Exp + | Exp ">=" Exp + > left: + Exp "==" Exp + | Exp "==" Exp + > left: + Exp "&" Exp + > left: + Exp "^" Exp + > left: + Exp "|" Exp + > left: + Exp "&&" Exp + > left: + Exp "||" Exp + > right: + Exp "?" Exp ":" Exp + > right: + Exp "=" Exp [group(assign)] + | Exp "*=" Exp [group(assign)] + | Exp "/=" Exp [group(assign)] + | Exp "%=" Exp [group(assign)] + | Exp "+=" Exp [group(assign)] + | Exp "-=" Exp [group(assign)] + | Exp "<<=" Exp [group(assign)] + | Exp ">>=" Exp [group(assign)] + | Exp "&=" Exp [group(assign)] + | Exp "^=" Exp [group(assign)] + | Exp "|=" Exp [group(assign)] + > left: + Exp "," Exp [group(comma)] + syntax priority assignExp > comma + syntax priority constantExp > assign + + syntax GenericAssocs ::= NeList{GenericAssoc,","} + + syntax GenericAssoc ::= TypeName ":" Exp [group(assignExp)] + | "default" ":" Exp [group(assignExp)] + + syntax Exps ::= Exp [klabel(arg), group(assignExp)] + | Exps "," Exp [group(assignExp)] + + // \section(A.2.2) + + syntax Decl ::= DeclSpecifiers InitDecls ";" + | DeclSpecifiers ";" + | StaticAssertDecl + + syntax DeclSpecifiers ::= NeList{DeclSpecifier,""} + + syntax DeclSpecifier ::= StorageClassSpecifier + | TypeSpecifier + | TypeQualifier + | FunctionSpecifier + | AlignmentSpecifier + + syntax InitDecls ::= NeList{InitDecl,","} + + syntax InitDecl ::= Declarator + | Declarator "=" Init + + syntax StorageClassSpecifier ::= "typedef" + | "extern" + | "static" + | "_Thread_local" + | "auto" + | "register" + + syntax TypeSpecifier ::= "void" + | "char" + | "short" + | "int" + | "long" + | "float" + | "double" + | "signed" + | "unsigned" + | "_Bool" + | "_Complex" + | AtomicTypeSpecifier + | "struct" Identifier "{" StructDecls "}" + | "struct" "{" StructDecls "}" + | "struct" Identifier + | "union" Identifier "{" StructDecls "}" + | "union" "{" StructDecls "}" + | "union" Identifier + | "enum" Identifier "{" Enumerators "}" + | "enum" "{" Enumerators "}" + | "enum" Identifier "{" Enumerators "," "}" + | "enum" "{" Enumerators "," "}" + | "enum" Identifier + | Identifier + + syntax AtomicTypeSpecifier ::= "_Atomic" "(" TypeName ")" + + syntax StructDecls ::= NeList{StructDecl,""} + + syntax StructDecl ::= SpecifierQuals StructDeclarators ";" + | SpecifierQuals ";" + | StaticAssertDecl + + syntax SpecifierQuals ::= NeList{SpecifierQual,""} + + syntax SpecifierQual ::= TypeSpecifier + | TypeQualifier + + syntax StructDeclarators ::= NeList{StructDeclarator,","} + + syntax StructDeclarator ::= Declarator + | Declarator ":" Exp [group(constantExp)] + | ":" Exp [group(constantExp)] + + syntax Enumerators ::= NeList{Enumerator,","} + + syntax Enumerator ::= Identifier + | Identifier "=" Exp [group(constantExp)] + + syntax TypeQualifier ::= "const" | "restrict" | "volatile" | "_Atomic" + syntax FunctionSpecifier ::= "inline" | "_Noreturn" + syntax AlignmentSpecifier ::= "_Alignas" "(" TypeName ")" + | "_Alignas" "(" Exp ")" + + syntax Declarator ::= Pointer DirectDeclarator + | DirectDeclarator + + syntax DirectDeclarator ::= Identifier + | "(" Declarator ")" + | DirectDeclarator "[" TypeQualifiers Exp "]" + | DirectDeclarator "[" TypeQualifiers "]" + | DirectDeclarator "[" Exp "]" + | DirectDeclarator "[" "]" + | DirectDeclarator "[" "static" TypeQualifiers Exp "]" + | DirectDeclarator "[" "static" Exp "]" + | DirectDeclarator "[" TypeQualifiers "static" Exp "]" + | DirectDeclarator "[" TypeQualifiers "*" "]" + | DirectDeclarator "[" "*" "]" + | DirectDeclarator "(" ParamTypeList ")" + | DirectDeclarator "(" Identifiers ")" + | DirectDeclarator "(" ")" + + syntax FunctionDeclarator ::= Pointer FunctionDirectDeclarator + | FunctionDirectDeclarator + + syntax FunctionDirectDeclarator ::= "(" FunctionDeclarator ")" + | DirectDeclarator "(" ParamTypeList ")" + | DirectDeclarator "(" Identifiers ")" + | DirectDeclarator "(" ")" + + syntax Pointer ::= "*" + | "*" TypeQualifiers + | "*" Pointer + | "*" TypeQualifiers Pointer + + syntax TypeQualifiers ::= NeList{TypeQualifier,""} + + syntax ParamTypeList ::= Params + | Params "," "..." + + syntax Params ::= NeList{ParamDecl,","} + + syntax ParamDecl ::= DeclSpecifiers Declarator + | DeclSpecifiers + | DeclSpecifiers AbstractDeclarator + + syntax Identifiers ::= NeList{Identifier,","} + + syntax TypeName ::= SpecifierQuals + | SpecifierQuals AbstractDeclarator + + syntax AbstractDeclarator ::= Pointer + | DirectAbstractDeclarator + | Pointer DirectAbstractDeclarator + + syntax DirectAbstractDeclarator ::= "(" AbstractDeclarator ")" + | "[" "]" + | "[" TypeQualifiers "]" + | "[" TypeQualifiers Exp "]" + | DirectAbstractDeclarator "[" Exp "]" + | "[" "static" Exp "]" + | "[" "static" TypeQualifiers Exp "]" + | DirectAbstractDeclarator "[" "static" Exp "]" + | DirectAbstractDeclarator "[" "static" TypeQualifiers Exp "]" + | DirectAbstractDeclarator "[" TypeQualifiers "static" Exp "]" + | "[" TypeQualifiers "static" Exp "]" + | "[" "*" "]" + | DirectAbstractDeclarator "[" "*" "]" + | "(" ")" + | "(" ParamTypeList ")" + | DirectAbstractDeclarator "(" ")" + | DirectAbstractDeclarator "(" ParamTypeList ")" + + syntax Init ::= Exp [klabel(initExp), group(assignExp)] + | "{" Inits "}" + | "{" Inits "," "}" + + syntax Inits ::= NeList{InitDesignation,","} + + syntax InitDesignation ::= Init | Designators "=" Init + + syntax Designators ::= NeList{Designator,""} + + syntax Designator ::= "[" Exp "]" + | "." Identifier + + syntax StaticAssertDecl ::= "_Static_assert" "(" Exp "," StringLiteral ")" ";" + + // \section(A.2.3) + + syntax Stmt ::= Identifier ":" Stmt + | "case" Exp ":" Stmt + | "default" ":" Stmt + | CompoundStmt + | ";" + | Exp ";" + | "if" "(" Exp ")" Stmt + | "if" "(" Exp ")" Stmt "else" Stmt [avoid] + | "switch" "(" Exp ")" Stmt + | "while" "(" Exp ")" Stmt + | "do" Stmt "while" "(" Exp ")" ";" + | "for" "(" ";" ";" ")" Stmt + | "for" "(" ";" Exp ";" ")" Stmt + | "for" "(" ";" Exp ";" Exp ")" Stmt + | "for" "(" ";" ";" Exp ")" Stmt + | "for" "(" Exp ";" ";" ")" Stmt + | "for" "(" Exp ";" Exp ";" ")" Stmt + | "for" "(" Exp ";" Exp ";" Exp ")" Stmt + | "for" "(" Exp ";" ";" Exp ")" Stmt + | "for" "(" Decl ";" ")" Stmt + | "for" "(" Decl Exp ";" ")" Stmt + | "for" "(" Decl Exp ";" Exp ")" Stmt + | "for" "(" Decl ";" Exp ")" Stmt + | "goto" Identifier + | "continue" ";" + | "break" ";" + | "return" ";" + | "return" Exp ";" + + + syntax CompoundStmt ::= "{" BlockItems "}" [format(%1%i%n%2%d%n%3)] + | "{" "}" [format(%1%2)] + + syntax BlockItems ::= NeList{BlockItem,""} [format(%1%n%3)] + syntax BlockItem ::= Decl | Stmt + + // \section(A.2.4) + + syntax TranslationUnit ::= NeList{ExtDecl,""} [format(%1%n%3)] + + syntax ExtDecl ::= FunDefn | Decl + + syntax FunDefn ::= DeclSpecifiers FunctionDeclarator Decls CompoundStmt [format(%1 %2%n%i%3%d %4)] + | DeclSpecifiers FunctionDeclarator CompoundStmt [format(%1 %2 %3)] + + syntax Decls ::= NeList{Decl,""} + +endmodule + +module C18-BASE + imports C18-COMMON + imports ID + imports STRING + imports INT + imports FLOAT + + syntax Identifier ::= Id + syntax Constant ::= Int | Float | Id + syntax StringLiteral ::= String +endmodule + +module C18-SYNTAX + imports C18-COMMON + imports C-LEXICAL +endmodule diff --git a/pyk/regression-new/parse-c/c18-translation.k b/pyk/regression-new/parse-c/c18-translation.k new file mode 100644 index 00000000000..2bec3d05aae --- /dev/null +++ b/pyk/regression-new/parse-c/c18-translation.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "c18-syntax.k" + +module C18-TRANSLATION-SYNTAX + imports C18-SYNTAX +endmodule + +module C18-TRANSLATION + imports C18-BASE + imports K-AMBIGUITIES + + configuration $PGM:TranslationUnit + +endmodule diff --git a/pyk/regression-new/parse-c/cparse b/pyk/regression-new/parse-c/cparse new file mode 100755 index 00000000000..ea6615671a3 --- /dev/null +++ b/pyk/regression-new/parse-c/cparse @@ -0,0 +1,5 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../../bin +pgm=$1 +shift +llvm-krun -c PGM "$pgm" Pgm prettyfile -p "$@" -d "$(dirname "$0")/c18-translation-kompiled" diff --git a/pyk/regression-new/parse-c/test.c b/pyk/regression-new/parse-c/test.c new file mode 100644 index 00000000000..89e3af53be2 --- /dev/null +++ b/pyk/regression-new/parse-c/test.c @@ -0,0 +1,34 @@ +typedef int *T; + +typedef int AA; + +int main() { + T (x); + S (x); + T * y; + int U, z; + U * z; + func((T) * x); + func((U) * z); + + int AA; + int BB = AA * 2; + + typedef int CC; +} + +void foo() { + AA bb; + float AA; +} + +void bar() { + AA AA; + int BB = AA * 2; +} + +typedef char C; + +void baz() { + int aa = sizeof(C), C, bb = sizeof(C); +} diff --git a/pyk/regression-new/parse-c/test.ref b/pyk/regression-new/parse-c/test.ref new file mode 100644 index 00000000000..2fa20709a5b --- /dev/null +++ b/pyk/regression-new/parse-c/test.ref @@ -0,0 +1,31 @@ +.TranslationUnit +.DeclSpecifiers typedef int .InitDecls , * T ; +amb ( .DeclSpecifiers typedef int AA ; , .DeclSpecifiers typedef int .InitDecls , AA ; ) +.DeclSpecifiers int main ( ) { + .BlockItems + amb ( .DeclSpecifiers T .InitDecls , ( x ) ; , T ( x ) ; ) + amb ( .DeclSpecifiers S .InitDecls , ( x ) ; , S ( x ) ; ) + amb ( T * y ; , .DeclSpecifiers T .InitDecls , * y ; ) + .DeclSpecifiers int .InitDecls , U , z ; + amb ( U * z ; , .DeclSpecifiers U .InitDecls , * z ; ) + func ( amb ( T * x , ( .SpecifierQuals T ) * x ) ) ; + func ( amb ( U * z , ( .SpecifierQuals U ) * z ) ) ; + amb ( .DeclSpecifiers int AA ; , .DeclSpecifiers int .InitDecls , AA ; ) + .DeclSpecifiers int .InitDecls , BB = AA * 2 ; + amb ( .DeclSpecifiers typedef int CC ; , .DeclSpecifiers typedef int .InitDecls , CC ; ) +} +.DeclSpecifiers void foo ( ) { + .BlockItems + amb ( .DeclSpecifiers AA bb ; , .DeclSpecifiers AA .InitDecls , bb ; ) + amb ( .DeclSpecifiers float AA ; , .DeclSpecifiers float .InitDecls , AA ; ) +} +.DeclSpecifiers void bar ( ) { + .BlockItems + amb ( .DeclSpecifiers AA AA ; , .DeclSpecifiers AA .InitDecls , AA ; ) + .DeclSpecifiers int .InitDecls , BB = AA * 2 ; +} +amb ( .DeclSpecifiers typedef char C ; , .DeclSpecifiers typedef char .InitDecls , C ; ) +.DeclSpecifiers void baz ( ) { + .BlockItems + .DeclSpecifiers int .InitDecls , aa = amb ( sizeof C , sizeof ( .SpecifierQuals C ) ) , C , bb = amb ( sizeof C , sizeof ( .SpecifierQuals C ) ) ; +} diff --git a/pyk/regression-new/parseNonPgm/1.test b/pyk/regression-new/parseNonPgm/1.test new file mode 100755 index 00000000000..dbc2187ca4f --- /dev/null +++ b/pyk/regression-new/parseNonPgm/1.test @@ -0,0 +1 @@ +5+6; diff --git a/pyk/regression-new/parseNonPgm/1.test.out b/pyk/regression-new/parseNonPgm/1.test.out new file mode 100644 index 00000000000..ecc2e8d42da --- /dev/null +++ b/pyk/regression-new/parseNonPgm/1.test.out @@ -0,0 +1,8 @@ +11 + + .Pgm ~> .K + + + print + + diff --git a/pyk/regression-new/parseNonPgm/Makefile b/pyk/regression-new/parseNonPgm/Makefile new file mode 100644 index 00000000000..9f22508c58d --- /dev/null +++ b/pyk/regression-new/parseNonPgm/Makefile @@ -0,0 +1,9 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS+=--gen-bison-parser +KRUN_FLAGS+=print + +include ../include/ktest.mak + +KRUN_OR_LEGACY=./test diff --git a/pyk/regression-new/parseNonPgm/test b/pyk/regression-new/parseNonPgm/test new file mode 100755 index 00000000000..ce773cc3d8f --- /dev/null +++ b/pyk/regression-new/parseNonPgm/test @@ -0,0 +1,6 @@ +#!/bin/bash +export PATH=$PATH:"$(dirname "$0")"/../../../bin +pgm="$1" +mode="$2" +shift; shift; shift; shift; shift +llvm-krun -c PGM "$pgm" Pgm prettyfile -c MODE "$mode" Mode pretty -p "$@" -d "$(dirname "$0")/test-kompiled" diff --git a/pyk/regression-new/parseNonPgm/test.k b/pyk/regression-new/parseNonPgm/test.k new file mode 100644 index 00000000000..030bc5c1db2 --- /dev/null +++ b/pyk/regression-new/parseNonPgm/test.k @@ -0,0 +1,40 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + imports UNSIGNED-INT-SYNTAX + + syntax Pgm ::= List{Stmt,""} + + syntax Stmt ::= Exp ";" [strict] + + syntax Exp ::= Int + | "-" Int + | Exp "+" Exp [left, strict] +endmodule + +module MODE + + syntax Mode ::= "print" | "noprint" + +endmodule + +module TEST + imports TEST-SYNTAX + imports MODE + imports INT + imports K-IO + imports STRING + + configuration $PGM:Pgm $MODE:Mode + + syntax KResult ::= Int + + rule _I:Int ; => .K ... noprint + rule I:Int ; => #write(1, Int2String(I)) ... print + + rule I + I2 => I +Int I2 + rule - I => 0 -Int I + + rule S::Stmt S'::Pgm => S ~> S' + + +endmodule diff --git a/pyk/regression-new/pattern-macro-productions/1.test b/pyk/regression-new/pattern-macro-productions/1.test new file mode 100644 index 00000000000..83f9c3ea417 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/1.test @@ -0,0 +1 @@ +t(0, 1, float) diff --git a/pyk/regression-new/pattern-macro-productions/1.test.out b/pyk/regression-new/pattern-macro-productions/1.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/1.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro-productions/2.test b/pyk/regression-new/pattern-macro-productions/2.test new file mode 100644 index 00000000000..b2423542e37 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/2.test @@ -0,0 +1 @@ +t(0, 1, double) diff --git a/pyk/regression-new/pattern-macro-productions/2.test.out b/pyk/regression-new/pattern-macro-productions/2.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/2.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro-productions/3.test b/pyk/regression-new/pattern-macro-productions/3.test new file mode 100644 index 00000000000..7e4348ed4da --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/3.test @@ -0,0 +1 @@ +t(0, 1, int) diff --git a/pyk/regression-new/pattern-macro-productions/3.test.out b/pyk/regression-new/pattern-macro-productions/3.test.out new file mode 100644 index 00000000000..a004df41e02 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/3.test.out @@ -0,0 +1,3 @@ + + t (... m1: 0 , m2: 1 , st: int ) ~> .K + diff --git a/pyk/regression-new/pattern-macro-productions/4.test b/pyk/regression-new/pattern-macro-productions/4.test new file mode 100644 index 00000000000..086da9a736d --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/4.test @@ -0,0 +1 @@ +t(0, 0, int) diff --git a/pyk/regression-new/pattern-macro-productions/4.test.out b/pyk/regression-new/pattern-macro-productions/4.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/4.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro-productions/5.test b/pyk/regression-new/pattern-macro-productions/5.test new file mode 100644 index 00000000000..8c861820d10 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/5.test @@ -0,0 +1 @@ +stuff(tv(t(0, 0, int), t(0, 0, int))) diff --git a/pyk/regression-new/pattern-macro-productions/5.test.out b/pyk/regression-new/pattern-macro-productions/5.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/5.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro-productions/6.test b/pyk/regression-new/pattern-macro-productions/6.test new file mode 100644 index 00000000000..7afe5646e04 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/6.test @@ -0,0 +1 @@ +stuff(te(t(0, 0, int), t(0, 0, int))) diff --git a/pyk/regression-new/pattern-macro-productions/6.test.out b/pyk/regression-new/pattern-macro-productions/6.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/6.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro-productions/7.test b/pyk/regression-new/pattern-macro-productions/7.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/7.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/pattern-macro-productions/7.test.out b/pyk/regression-new/pattern-macro-productions/7.test.out new file mode 100644 index 00000000000..36e7b68b492 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/7.test.out @@ -0,0 +1,3 @@ + + 1 ~> .K + diff --git a/pyk/regression-new/pattern-macro-productions/Makefile b/pyk/regression-new/pattern-macro-productions/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/pattern-macro-productions/test.k b/pyk/regression-new/pattern-macro-productions/test.k new file mode 100644 index 00000000000..8c8e3254005 --- /dev/null +++ b/pyk/regression-new/pattern-macro-productions/test.k @@ -0,0 +1,40 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports BOOL + +syntax SimpleType ::= "int" | "float" | "double" + +syntax Type ::= t(m1: Int, m2: Int, st: SimpleType) + +syntax Type ::= "floatingType" [macro] + | "intType" [macro] + +rule floatingType => t(_, _, (float #Or double)) [unboundVariables(_)] + +rule floatingType => .K + +rule intType => t(Foo, Foo, int) [unboundVariables(Foo)] + +rule intType => .K + +syntax RHold ::= te(K, Type) +syntax RValue ::= tv(K, Type) +syntax KItem ::= RValue +syntax KItem ::= RHold +syntax KItem ::= Type + +syntax Expression ::= arithOp(K, K) [macro] + | stuff(K) + | Int + +rule arithOp(L:K, _R:K) => stuff(L) + +rule arithOp(_L:RValue, _R::RValue) => .K +rule arithOp(te(t(0, 0, int), t(0, 0, int)), _R::RValue) => .K + +syntax Expression ::= stuff2(K) [macro] +rule stuff2(_:K) => 0 +rule stuff2(.K) => 1 + +endmodule diff --git a/pyk/regression-new/pattern-macro/1.test b/pyk/regression-new/pattern-macro/1.test new file mode 100644 index 00000000000..83f9c3ea417 --- /dev/null +++ b/pyk/regression-new/pattern-macro/1.test @@ -0,0 +1 @@ +t(0, 1, float) diff --git a/pyk/regression-new/pattern-macro/1.test.out b/pyk/regression-new/pattern-macro/1.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro/1.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro/2.test b/pyk/regression-new/pattern-macro/2.test new file mode 100644 index 00000000000..b2423542e37 --- /dev/null +++ b/pyk/regression-new/pattern-macro/2.test @@ -0,0 +1 @@ +t(0, 1, double) diff --git a/pyk/regression-new/pattern-macro/2.test.out b/pyk/regression-new/pattern-macro/2.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro/2.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro/3.test b/pyk/regression-new/pattern-macro/3.test new file mode 100644 index 00000000000..7e4348ed4da --- /dev/null +++ b/pyk/regression-new/pattern-macro/3.test @@ -0,0 +1 @@ +t(0, 1, int) diff --git a/pyk/regression-new/pattern-macro/3.test.out b/pyk/regression-new/pattern-macro/3.test.out new file mode 100644 index 00000000000..a004df41e02 --- /dev/null +++ b/pyk/regression-new/pattern-macro/3.test.out @@ -0,0 +1,3 @@ + + t (... m1: 0 , m2: 1 , st: int ) ~> .K + diff --git a/pyk/regression-new/pattern-macro/4.test b/pyk/regression-new/pattern-macro/4.test new file mode 100644 index 00000000000..086da9a736d --- /dev/null +++ b/pyk/regression-new/pattern-macro/4.test @@ -0,0 +1 @@ +t(0, 0, int) diff --git a/pyk/regression-new/pattern-macro/4.test.out b/pyk/regression-new/pattern-macro/4.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro/4.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro/5.test b/pyk/regression-new/pattern-macro/5.test new file mode 100644 index 00000000000..8c861820d10 --- /dev/null +++ b/pyk/regression-new/pattern-macro/5.test @@ -0,0 +1 @@ +stuff(tv(t(0, 0, int), t(0, 0, int))) diff --git a/pyk/regression-new/pattern-macro/5.test.out b/pyk/regression-new/pattern-macro/5.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro/5.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro/6.test b/pyk/regression-new/pattern-macro/6.test new file mode 100644 index 00000000000..7afe5646e04 --- /dev/null +++ b/pyk/regression-new/pattern-macro/6.test @@ -0,0 +1 @@ +stuff(te(t(0, 0, int), t(0, 0, int))) diff --git a/pyk/regression-new/pattern-macro/6.test.out b/pyk/regression-new/pattern-macro/6.test.out new file mode 100644 index 00000000000..3983fd868e3 --- /dev/null +++ b/pyk/regression-new/pattern-macro/6.test.out @@ -0,0 +1,3 @@ + + .K + diff --git a/pyk/regression-new/pattern-macro/7.test b/pyk/regression-new/pattern-macro/7.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/pattern-macro/7.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/pattern-macro/7.test.out b/pyk/regression-new/pattern-macro/7.test.out new file mode 100644 index 00000000000..36e7b68b492 --- /dev/null +++ b/pyk/regression-new/pattern-macro/7.test.out @@ -0,0 +1,3 @@ + + 1 ~> .K + diff --git a/pyk/regression-new/pattern-macro/Makefile b/pyk/regression-new/pattern-macro/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/pattern-macro/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/pattern-macro/test.k b/pyk/regression-new/pattern-macro/test.k new file mode 100644 index 00000000000..6b77a78316a --- /dev/null +++ b/pyk/regression-new/pattern-macro/test.k @@ -0,0 +1,37 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports BOOL + +syntax SimpleType ::= "int" | "float" | "double" + +syntax Type ::= t(m1: Int, m2: Int, st: SimpleType) + +syntax Type ::= "floatingType" [macro] + | "intType" [macro] + +rule floatingType => t(_, _, (float #Or double)) [unboundVariables(_)] + +rule floatingType => .K + +rule intType => t(Foo, Foo, int) [unboundVariables(Foo)] + +rule intType => .K + +syntax RHold ::= te(K, Type) +syntax RValue ::= tv(K, Type) +syntax KItem ::= RValue +syntax KItem ::= RHold +syntax KItem ::= Type + +syntax Expression ::= arithOp(K, K) [macro] + | stuff(K) | Int +rule arithOp(L:K, _R:K) => stuff(L) +rule arithOp(_L:RValue, _R::RValue) => .K +rule arithOp(te(t(0, 0, int), t(0, 0, int)), _R::RValue) => .K + +syntax Expression ::= stuff2(K) [macro] +rule stuff2(_:K) => 0 +rule stuff2(.K) => 1 + +endmodule diff --git a/pyk/regression-new/pedanticAttributes/Makefile b/pyk/regression-new/pedanticAttributes/Makefile new file mode 100644 index 00000000000..cc7bdd31d1f --- /dev/null +++ b/pyk/regression-new/pedanticAttributes/Makefile @@ -0,0 +1,2 @@ +KOMPILE_FLAGS=-w none --syntax-module TEST +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/pedanticAttributes/test.k b/pyk/regression-new/pedanticAttributes/test.k new file mode 100644 index 00000000000..64cdc97e98f --- /dev/null +++ b/pyk/regression-new/pedanticAttributes/test.k @@ -0,0 +1,5 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + syntax Int ::= r"[\\+-]?[0-9]+" [prefer, token, prec(2), badAtt(10)] + | Int "+" Int [group(badAttButOkay),badAtt,function] +endmodule diff --git a/pyk/regression-new/pedanticAttributes/test.k.out b/pyk/regression-new/pedanticAttributes/test.k.out new file mode 100644 index 00000000000..d9782745ca4 --- /dev/null +++ b/pyk/regression-new/pedanticAttributes/test.k.out @@ -0,0 +1,11 @@ +[Error] Compiler: Unrecognized attributes: [badAtt] + Source(test.k) + Location(3,18,3,71) + 3 | syntax Int ::= r"[\\+-]?[0-9]+" [prefer, token, prec(2), badAtt(10)] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Unrecognized attributes: [badAtt] + Source(test.k) + Location(4,18,4,68) + 4 | | Int "+" Int [group(badAttButOkay),badAtt,function] + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 2 structural errors. diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/Makefile b/pyk/regression-new/pl-tutorial/1_k/1_lambda/Makefile new file mode 100644 index 00000000000..7b416045c99 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=lesson_8 + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/Makefile b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/Makefile new file mode 100644 index 00000000000..b9c8dd737de --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/Makefile @@ -0,0 +1,8 @@ +DEF=lambda +EXT=lambda +KOMPILE_FLAGS=--gen-bison-parser + +%/arithmetic-div-zero.lambda: + true + +include ../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/lambda.k b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/lambda.k new file mode 100644 index 00000000000..c78b92a7b37 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/lambda.k @@ -0,0 +1,51 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "substitution.md" + +module LAMBDA-SYNTAX + imports DOMAINS-SYNTAX + imports KVAR-SYNTAX + + syntax Val ::= KVar + | "lambda" KVar "." Exp [binder] + syntax Exp ::= Val + | Exp Exp [strict, left] + | "(" Exp ")" [bracket] + + syntax Val ::= Int | Bool + syntax Exp ::= "-" Int + > Exp "*" Exp [strict, left] + | Exp "/" Exp [strict] + > Exp "+" Exp [strict, left] + > Exp "<=" Exp [strict] + + syntax Exp ::= "if" Exp "then" Exp "else" Exp [strict(1)] + + syntax Exp ::= "let" KVar "=" Exp "in" Exp [macro] + rule let X = E in E':Exp => (lambda X . E') E + + syntax Exp ::= "letrec" KVar KVar "=" Exp "in" Exp [macro] + | "mu" KVar "." Exp [binder] + rule letrec F:KVar X = E in E' => let F = mu F . lambda X . E in E' +endmodule + +module LAMBDA + imports LAMBDA-SYNTAX + imports SUBSTITUTION + imports DOMAINS + + syntax KResult ::= Val + + rule (lambda X:KVar . E:Exp) V:Val => E[V / X] + + rule - I => 0 -Int I + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 + rule I1 + I2 => I1 +Int I2 + rule I1 <= I2 => I1 <=Int I2 + + rule if true then E else _ => E + rule if false then _ else E => E + + rule mu X . E => E[(mu X . E) / X] +endmodule diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic-div-zero.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic-div-zero.lambda new file mode 100644 index 00000000000..a6b7d5920c6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic-div-zero.lambda @@ -0,0 +1 @@ +1/(2/3) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda new file mode 100644 index 00000000000..4893f8b5b19 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda @@ -0,0 +1 @@ +(1 + 2 * 3) / 4 <= 1 diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/arithmetic.lambda.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda new file mode 100644 index 00000000000..6209d1d1fb2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda @@ -0,0 +1 @@ +(lambda z.(z z)) (lambda x.lambda y.(x y)) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda.out new file mode 100644 index 00000000000..b4b7c6bcf32 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/closed-variable-capture.lambda.out @@ -0,0 +1,3 @@ + + lambda y . ( ( lambda x . lambda y0 . ( x y0 ) ) y ) ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda new file mode 100644 index 00000000000..54c86722d88 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda @@ -0,0 +1,7 @@ +let fix = lambda f . ( + (lambda x . (f (lambda y . (x x y)))) + (lambda x . (f (lambda y . (x x y)))) + ) +in let f = fix (lambda f . lambda x . + (if x <= 1 then 1 else (x * (f (x + -1))))) + in (f 10) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda.out new file mode 100644 index 00000000000..c36a0d86ee6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let-fix.lambda.out @@ -0,0 +1,3 @@ + + 3628800 ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda new file mode 100644 index 00000000000..3d0a415af36 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda @@ -0,0 +1,6 @@ +let f = lambda x . ( + (lambda t . lambda x . (t t x)) + (lambda f . lambda x . (if x <= 1 then 1 else (x * (f f (x + -1))))) + x + ) +in (f 10) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda.out new file mode 100644 index 00000000000..c36a0d86ee6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-let.lambda.out @@ -0,0 +1,3 @@ + + 3628800 ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda new file mode 100644 index 00000000000..2bdce53ba41 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda @@ -0,0 +1,2 @@ +letrec f x = if x <= 1 then 1 else (x * (f (x + -1))) +in (f 10) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda.out new file mode 100644 index 00000000000..c36a0d86ee6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/factorial-letrec.lambda.out @@ -0,0 +1,3 @@ + + 3628800 ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda new file mode 100644 index 00000000000..b779adc6851 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda @@ -0,0 +1 @@ +(mu f . lambda x . if x <=1 then x else ((f (x + -1)) + (f (x + -2)))) 7 diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda.out new file mode 100644 index 00000000000..dac8354871c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/fibbo.lambda.out @@ -0,0 +1,3 @@ + + 13 ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda new file mode 100644 index 00000000000..793931475bc --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda @@ -0,0 +1 @@ +a (((lambda x.lambda y.x) y) z) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda.out new file mode 100644 index 00000000000..556ded2448b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/free-variable-capture.lambda.out @@ -0,0 +1,3 @@ + + a y ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda new file mode 100644 index 00000000000..beeea9eda4a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda @@ -0,0 +1 @@ +lambda x . x diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda.out new file mode 100644 index 00000000000..9476ee41bee --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/identity.lambda.out @@ -0,0 +1,3 @@ + + lambda x . x ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda new file mode 100644 index 00000000000..f82975e8ed3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda @@ -0,0 +1 @@ +if 2<=1 then 3/0 else 10 diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda.out new file mode 100644 index 00000000000..1b239a340ff --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/if.lambda.out @@ -0,0 +1,3 @@ + + 10 ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda new file mode 100644 index 00000000000..fc3ecccc3ec --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda @@ -0,0 +1,5 @@ +let a=1 in + let b=2 in + let c=3 in + let d=4 in + ((a+b*c)/d <= a) diff --git a/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda.out b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/1_lambda/lesson_8/tests/lets.lambda.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/Makefile b/pyk/regression-new/pl-tutorial/1_k/2_imp/Makefile new file mode 100644 index 00000000000..227f5151f05 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=lesson_4 + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/Makefile b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/Makefile new file mode 100644 index 00000000000..77b34d53021 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/Makefile @@ -0,0 +1,5 @@ +DEF=imp +EXT=imp +KOMPILE_FLAGS=--gen-glr-bison-parser + +include ../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/imp.k b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/imp.k new file mode 100644 index 00000000000..b4d156a8a0d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/imp.k @@ -0,0 +1,65 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module IMP-SYNTAX + imports DOMAINS-SYNTAX + syntax AExp ::= Int | Id + | "-" Int + | AExp "/" AExp [left, strict] + | "(" AExp ")" [bracket] + > AExp "+" AExp [left, strict] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict] + | "!" BExp [strict] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1)] + syntax Block ::= "{" "}" + | "{" Stmt "}" + syntax Stmt ::= Block + | Id "=" AExp ";" [strict(2)] + | "if" "(" BExp ")" + Block "else" Block [strict(1)] + | "while" "(" BExp ")" Block + > Stmt Stmt [left] + syntax Pgm ::= "int" Ids ";" Stmt + syntax Ids ::= List{Id,","} +endmodule + + +module IMP + imports IMP-SYNTAX + imports DOMAINS + syntax KResult ::= Int | Bool + + configuration + $PGM:Pgm + .Map + + +// AExp + rule X:Id => I ... ... X |-> I ... + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I1 => 0 -Int I1 +// BExp + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false +// Block + rule {} => .K + rule {S} => S +// Stmt + rule X = I:Int; => .K ... ... X |-> (_ => I) ... + rule S1:Stmt S2:Stmt => S1 ~> S2 + rule if (true) S else _ => S + rule if (false) _ else S => S + rule while (B) S => if (B) {S while (B) S} else {} +// Pgm + rule int (X,Xs => Xs);_ Rho:Map (.Map => X|->0) + requires notBool (X in keys(Rho)) + rule int .Ids; S => S + +// verification ids + syntax Id ::= "n" [token] + | "sum" [token] +endmodule diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp new file mode 100644 index 00000000000..49bef5c2a89 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp @@ -0,0 +1,19 @@ +// This program tests the Collatz conjecture for all numbers up to m +// and accumulates the total number of steps in s. + +int m, n, q, r, s; +m = 10; +while (!(m<=2)) { + n = m; + m = m + -1; + while (!(n<=1)) { + s = s+1; + q = n/2; + r = q+q+1; + if (r<=n) { + n = n+n+n+1; // n becomes 3*n+1 if odd + } else {n=q;} // or n/2 if even + } +} + +// s should be 66 when m is 10 diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp.out b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp.out new file mode 100644 index 00000000000..746da717cb6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/collatz.imp.out @@ -0,0 +1,12 @@ + + + .K + + + m |-> 2 + n |-> 1 + q |-> 1 + r |-> 3 + s |-> 66 + + diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp new file mode 100644 index 00000000000..f5ff7e26c1c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp @@ -0,0 +1,26 @@ +// This program counts in s all the prime numbers up to m. + +int i, m, n, q, r, s, t, x, y, z; +m = 10; n = 2; +while (n <= m) { + // checking primality of n and writing t to 1 or 0 + i = 2; q = n/i; t = 1; + while (i<=q && 1<=t) { + x = i; + y = q; + // fast multiplication (base 2) algorithm + z = 0; + while (!(x <= 0)) { + q = x/2; + r = q+q+1; + if (r <= x) { z = z+y; } else {} + x = q; + y = y+y; + } // end fast multiplication + if (n <= z) { t = 0; } else { i = i+1; q = n/i; } + } // end checking primality + if (1 <= t) { s = s+1; } else {} + n = n+1; +} + +// s should be 4 when m = 10. diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp.out b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp.out new file mode 100644 index 00000000000..702afd61a3a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/primes.imp.out @@ -0,0 +1,17 @@ + + + .K + + + i |-> 2 + m |-> 10 + n |-> 11 + q |-> 0 + r |-> 1 + s |-> 4 + t |-> 0 + x |-> 0 + y |-> 20 + z |-> 10 + + diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp new file mode 100644 index 00000000000..23e8bb6df0d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp @@ -0,0 +1,12 @@ +// This program calculates in sum +// the sum of numbers from 1 to n. + +int n, sum; +n = 100; +sum = 0; +while (!(n <= 0)) { + sum = sum + n; + n = n + -1; +} + +// sum should be 5050 when n is 100 diff --git a/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp.out b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp.out new file mode 100644 index 00000000000..d6373fd27e4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/2_imp/lesson_4/tests/sum.imp.out @@ -0,0 +1,9 @@ + + + .K + + + n |-> 0 + sum |-> 5050 + + diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/Makefile b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/Makefile new file mode 100644 index 00000000000..5169723aa4c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=lesson_5 + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile new file mode 100644 index 00000000000..e3bdeffd19c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile @@ -0,0 +1,24 @@ +MAKEFILE_PATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +SUBMAKES=$(MAKEFILE_PATH)/Makefile.det $(MAKEFILE_PATH)/Makefile.nondet +SUBCLEAN=$(addsuffix .clean,$(SUBMAKES)) +SUBUPDATE=$(addsuffix .update,$(SUBMAKES)) +SUBKOMPILE=$(addsuffix .kompile,$(SUBMAKES)) + +.PHONY: all update-results clean $(SUBMAKES) $(SUBCLEAN) $(SUBUPDATE) $(SUBKOMPILE) + +all: $(SUBMAKES) +clean: $(SUBCLEAN) +update-results: $(SUBUPDATE) +kompile: $(SUBKOMPILE) + +$(SUBMAKES): + $(MAKE) -e -f $@ + +$(SUBCLEAN): %.clean: + $(MAKE) -e -f $* clean + +$(SUBUPDATE): %.update: + $(MAKE) -e -f $* update-results + +$(SUBKOMPILE): %.kompile: + $(MAKE) -e -f $* kompile diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.det b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.det new file mode 100644 index 00000000000..dc4a67b9200 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.det @@ -0,0 +1,12 @@ +TESTDIR=tests/deterministic +DEFDIR=det +DEF=lambda +EXT=lambda +KOMPILE_FLAGS=--gen-bison-parser + +%/arithmetic-div-zero.lambda: + true + +include ../../../../../../include/kframework/ktest.mak +KOMPILE_FLAGS=--enable-search --syntax-module LAMBDA +KRUN_FLAGS=--pattern " V:K " diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.nondet b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.nondet new file mode 100644 index 00000000000..0b41b678e6f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/Makefile.nondet @@ -0,0 +1,11 @@ +TESTDIR=tests/nondeterministic +DEFDIR=nondet +DEF=lambda +EXT=lambda +KOMPILE_FLAGS=--syntax-module LAMBDA --enable-search +KRUN_FLAGS=--search --pattern " V:K " + +include ../../../../../../include/kframework/ktest.mak + +tests/nondeterministic/arithmetic-div-zero.lambda: + true diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/lambda.k b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/lambda.k new file mode 100644 index 00000000000..bd867e19825 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/lambda.k @@ -0,0 +1,63 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module LAMBDA + imports DOMAINS + + configuration + $PGM:Exp + .Map + .Map + + + syntax Exp ::= Id + | "lambda" Id "." Exp + | Exp Exp [strict, left] + | "(" Exp ")" [bracket] + + syntax Val ::= closure(Map,Id,Exp) + syntax Exp ::= Val + syntax KResult ::= Val + + rule lambda X:Id . E => closure(Rho,X,E) ... + Rho + rule closure(Rho,X,E) V:Val => E ~> Rho' ... + Rho' => Rho[X <- !N] + ... .Map => (!N:Int |-> V) ... + rule X => V ... + ... X |-> N ... + ... N |-> V ... + rule _:Val ~> (Rho => .K) ... _ => Rho + + syntax Val ::= Int | Bool + syntax Exp ::= Exp "*" Exp [strict, left] + | Exp "/" Exp [strict] + > Exp "+" Exp [strict, left] + > Exp "<=" Exp [strict] + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 + rule I1 + I2 => I1 +Int I2 + rule I1 <= I2 => I1 <=Int I2 + + syntax Exp ::= "if" Exp "then" Exp "else" Exp [strict(1)] + rule if true then E else _ => E + rule if false then _ else E => E + + syntax Exp ::= "let" Id "=" Exp "in" Exp [macro] + rule let X = E in E':Exp => (lambda X . E') E + + syntax Exp ::= "letrec" Id Id "=" Exp "in" Exp [macro] + | "mu" Id "." Exp + rule letrec F:Id X = E in E' => let F = mu F . lambda X . E in E' + + syntax Exp ::= muclosure(Map,Exp) + rule mu X . E => muclosure(Rho[X <- !N], E) ... + Rho + ... .Map => (!N:Int |-> muclosure(Rho[X <- !N], E)) ... + rule muclosure(Rho,E) => E ~> Rho' ... + Rho' => Rho + + syntax Exp ::= "callcc" Exp [strict] + syntax Val ::= cc(Map,K) + rule (callcc V:Val => V cc(Rho,K)) ~> K Rho + rule cc(Rho,K) V:Val ~> _ => V ~> K _ => Rho +endmodule diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda new file mode 100644 index 00000000000..54c86722d88 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda @@ -0,0 +1,7 @@ +let fix = lambda f . ( + (lambda x . (f (lambda y . (x x y)))) + (lambda x . (f (lambda y . (x x y)))) + ) +in let f = fix (lambda f . lambda x . + (if x <= 1 then 1 else (x * (f (x + -1))))) + in (f 10) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda.out new file mode 100644 index 00000000000..5522f66a662 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let-fix.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3628800 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda new file mode 100644 index 00000000000..3d0a415af36 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda @@ -0,0 +1,6 @@ +let f = lambda x . ( + (lambda t . lambda x . (t t x)) + (lambda f . lambda x . (if x <= 1 then 1 else (x * (f f (x + -1))))) + x + ) +in (f 10) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda.out new file mode 100644 index 00000000000..5522f66a662 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-let.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3628800 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda new file mode 100644 index 00000000000..2bdce53ba41 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda @@ -0,0 +1,2 @@ +letrec f x = if x <= 1 then 1 else (x * (f (x + -1))) +in (f 10) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda.out new file mode 100644 index 00000000000..5522f66a662 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/factorial-letrec.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3628800 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda new file mode 100644 index 00000000000..b779adc6851 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda @@ -0,0 +1 @@ +(mu f . lambda x . if x <=1 then x else ((f (x + -1)) + (f (x + -2)))) 7 diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda.out new file mode 100644 index 00000000000..e4b5bd52b91 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/deterministic/fibbo.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 13 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic-div-zero.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic-div-zero.lambda new file mode 100644 index 00000000000..a6b7d5920c6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic-div-zero.lambda @@ -0,0 +1 @@ +1/(2/3) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda new file mode 100644 index 00000000000..4893f8b5b19 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda @@ -0,0 +1 @@ +(1 + 2 * 3) / 4 <= 1 diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda.out new file mode 100644 index 00000000000..cbb93410323 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/arithmetic.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + true ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda new file mode 100644 index 00000000000..c717d54a8bc --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda @@ -0,0 +1,2 @@ +let x = 1 in + ((callcc lambda k . (let x = 2 in (k x))) + x) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env1.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda new file mode 100644 index 00000000000..cafc58e5706 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda @@ -0,0 +1,4 @@ +let x = 1 in + let a = callcc lambda k . (let x = 2 in (k x)) in + let b = x in + (a + b) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-env2.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda new file mode 100644 index 00000000000..61582c62876 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda @@ -0,0 +1,5 @@ +let x = 1 in +let x = 2 in +((callcc (lambda k . +let x = 3 in +(k x))) * 10 + x) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda.out new file mode 100644 index 00000000000..147dbafd04d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/callcc-with-let.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 32 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda new file mode 100644 index 00000000000..6209d1d1fb2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda @@ -0,0 +1 @@ +(lambda z.(z z)) (lambda x.lambda y.(x y)) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda.out new file mode 100644 index 00000000000..370d2457649 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/closed-variable-capture.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + closure ( x |-> 1 , y , x y ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda new file mode 100644 index 00000000000..793931475bc --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda @@ -0,0 +1 @@ +a (((lambda x.lambda y.x) y) z) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda.out new file mode 100644 index 00000000000..90350803d19 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/free-variable-capture.lambda.out @@ -0,0 +1,23 @@ + { + V:K + #Equals + a ~> #freezer___LAMBDA_Exp_Exp_Exp0_ ( ( lambda x . lambda y . x ) y z ~> .K ) ~> .K + } +#Or + { + V:K + #Equals + y ~> #freezer___LAMBDA_Exp_Exp_Exp1_ ( closure ( .Map , x , lambda y . x ) ~> .K ) ~> #freezer___LAMBDA_Exp_Exp_Exp0_ ( z ~> .K ) ~> #freezer___LAMBDA_Exp_Exp_Exp1_ ( a ~> .K ) ~> .K + } +#Or + { + V:K + #Equals + y ~> #freezer___LAMBDA_Exp_Exp_Exp1_ ( lambda x . lambda y . x ~> .K ) ~> #freezer___LAMBDA_Exp_Exp_Exp0_ ( z ~> .K ) ~> #freezer___LAMBDA_Exp_Exp_Exp1_ ( a ~> .K ) ~> .K + } +#Or + { + V:K + #Equals + z ~> #freezer___LAMBDA_Exp_Exp_Exp1_ ( ( lambda x . lambda y . x ) y ~> .K ) ~> #freezer___LAMBDA_Exp_Exp_Exp1_ ( a ~> .K ) ~> .K + } diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda new file mode 100644 index 00000000000..beeea9eda4a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda @@ -0,0 +1 @@ +lambda x . x diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda.out new file mode 100644 index 00000000000..216e622c91a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/identity.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + closure ( .Map , x , x ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda new file mode 100644 index 00000000000..f82975e8ed3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda @@ -0,0 +1 @@ +if 2<=1 then 3/0 else 10 diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda.out new file mode 100644 index 00000000000..0c63378c2f4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/if.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 10 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda new file mode 100644 index 00000000000..fc3ecccc3ec --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda @@ -0,0 +1,5 @@ +let a=1 in + let b=2 in + let c=3 in + let d=4 in + ((a+b*c)/d <= a) diff --git a/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda.out b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda.out new file mode 100644 index 00000000000..cbb93410323 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/3_lambda++/lesson_5/tests/nondeterministic/lets.lambda.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + true ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/Makefile b/pyk/regression-new/pl-tutorial/1_k/4_imp++/Makefile new file mode 100644 index 00000000000..b5e53295b37 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=lesson_7 + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile new file mode 100644 index 00000000000..cf7c2dc60ac --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile @@ -0,0 +1,24 @@ +MAKEFILE_PATH := $(dir $(abspath $(lastword $(MAKEFILE_LIST)))) +SUBMAKES=$(MAKEFILE_PATH)/Makefile.concrete $(MAKEFILE_PATH)/Makefile.proof +SUBCLEAN=$(addsuffix .clean,$(SUBMAKES)) +SUBUPDATE=$(addsuffix .update,$(SUBMAKES)) +SUBKOMPILE=$(addsuffix .kompile,$(SUBMAKES)) + +.PHONY: all update-results clean $(SUBMAKES) $(SUBCLEAN) $(SUBUPDATE) $(SUBKOMPILE) + +all: $(SUBMAKES) +clean: $(SUBCLEAN) +update-results: $(SUBUPDATE) +kompile: $(SUBKOMPILE) + +$(SUBMAKES): + $(MAKE) -e -f $@ + +$(SUBCLEAN): %.clean: + $(MAKE) -e -f $* clean + +$(SUBUPDATE): %.update: + $(MAKE) -e -f $* update-results + +$(SUBKOMPILE): %.kompile: + $(MAKE) -e -f $* kompile diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.concrete b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.concrete new file mode 100644 index 00000000000..85cb5ffe588 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.concrete @@ -0,0 +1,15 @@ +DEF=imp +DEFDIR=concrete +KOMPILED=$(DEFDIR)/$(DEF)-kompiled +EXT=imp +KOMPILE_FLAGS+=--gen-glr-bison-parser --enable-search +KRUN_FLAGS=--output none + +include ../../../../../../include/kframework/ktest.mak + + +tests/div.imp: kompile + cat $@.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(KOMPILED) --search $(CHECK) $@.out + +tests/spawn.imp: kompile + cat $@.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(KOMPILED) --search --pattern " ListItem(_) ListItem(_) ListItem(#buffer(Out:String)) " $(CHECK) $@.out diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.proof b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.proof new file mode 100644 index 00000000000..e685b969d20 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/Makefile.proof @@ -0,0 +1,9 @@ +DEF=imp +DEFDIR=proof +EXT=imp +KOMPILE_BACKEND=haskell +KRUN_FLAGS=--output none +TESTDIR=tests/proofs + +include ../../../../../../include/kframework/ktest.mak +KPROVE_OR_LEGACY=$(KPROVE) diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/imp.k b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/imp.k new file mode 100644 index 00000000000..aa24cbf2fac --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/imp.k @@ -0,0 +1,113 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module IMP-SYNTAX + imports DOMAINS-SYNTAX + syntax AExp ::= Int | String | Id + | "++" Id + | "read" "(" ")" + | "-" Int + | "(" AExp ")" [bracket] + > AExp "/" AExp [left, strict, group(division)] + > AExp "+" AExp [left, strict] + > "spawn" Block + > Id "=" AExp [strict(2)] + syntax BExp ::= Bool + | AExp "<=" AExp [seqstrict] + | "!" BExp [strict] + | "(" BExp ")" [bracket] + > BExp "&&" BExp [left, strict(1)] + syntax Block ::= "{" Stmts "}" + syntax Stmt ::= Block + | AExp ";" [strict] + | "if" "(" BExp ")" + Block "else" Block [strict(1)] + | "while" "(" BExp ")" Block + | "int" Ids ";" + | "print" "(" AExps ")" ";" + | "halt" ";" + > "join" AExp ";" [strict] + + syntax Ids ::= List{Id,","} [overload(exps)] + syntax AExps ::= List{AExp,","} [overload(exps)] + syntax Stmts ::= List{Stmt,""} + syntax AExps ::= Ids +endmodule + + +module IMP + imports IMP-SYNTAX + imports DOMAINS + syntax KResult ::= Int | Bool | String + + configuration + + + 0 + $PGM:Stmts + .Map + + + .Map + .List + .List + + +// AExp + rule X:Id => I ... + ... X |-> N ... + ... N |-> I ... [group(lookup)] + rule ++X => I +Int 1 ... + ... X |-> N ... + ... N |-> (I => I +Int 1) ... [group(increment)] + rule read() => I ... + ListItem(I:Int) => .List ... [group(read)] + rule I1 / I2 => I1 /Int I2 requires I2 =/=Int 0 + rule I1 + I2 => I1 +Int I2 + rule - I => 0 -Int I + rule Str1 + Str2 => Str1 +String Str2 +// BExp + rule I1 <= I2 => I1 <=Int I2 + rule ! T => notBool T + rule true && B => B + rule false && _ => false +// Block + rule {Ss} => Ss ~> Rho ... Rho + rule Rho => .K ... _ => Rho +// Stmt + rule _:Int; => .K + rule X = I:Int => I ... + ... X |-> N ... + ... N |-> (_ => I) ... [group(assignment)] + rule if (true) S else _ => S + rule if (false) _ else S => S + rule while (B) S => if (B) {S while (B) S} else {.Stmts} + + rule int (X,Xs => Xs); ... + Rho => Rho[X <- !N:Int] + ... .Map => !N |-> 0 ... + rule int .Ids; => .K + + syntax Printable ::= Int | String +/* currently it is necessary to subsort Printable to AExp, + but future K should be able to infer that automatically. */ + syntax AExp ::= Printable + context print(HOLE:AExp, _AEs:AExps); + rule print(P:Printable,AEs => AEs); ... + ... .List => ListItem(P) [group(print)] + rule print(.AExps); => .K + + rule halt; ~> _ => .K + + rule spawn S => !T:Int +Int 1 ... Rho + (.Bag => ... S Rho !T +Int 1 ...) + rule join(T:Int); => .K ... + ... .K T ... + +// Stmts + rule .Stmts => .K + rule S:Stmt Ss:Stmts => S ~> Ss + +// verification ids + syntax Id ::= "n" [token] + | "sum" [token] +endmodule diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp new file mode 100644 index 00000000000..49bef5c2a89 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp @@ -0,0 +1,19 @@ +// This program tests the Collatz conjecture for all numbers up to m +// and accumulates the total number of steps in s. + +int m, n, q, r, s; +m = 10; +while (!(m<=2)) { + n = m; + m = m + -1; + while (!(n<=1)) { + s = s+1; + q = n/2; + r = q+q+1; + if (r<=n) { + n = n+n+n+1; // n becomes 3*n+1 if odd + } else {n=q;} // or n/2 if even + } +} + +// s should be 66 when m is 10 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/collatz.imp.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp new file mode 100644 index 00000000000..46da85aa150 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp @@ -0,0 +1,3 @@ +int x,y; +x = 1; +y = ++x / (++x / x); diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp.out new file mode 100644 index 00000000000..33c4a2e721f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/div.imp.out @@ -0,0 +1,104 @@ + { + Result:GeneratedTopCell + #Equals + + + + + 0 + + + .K + + + x |-> 0 + y |-> 1 + + + + + 0 |-> 3 + 1 |-> 1 + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + 0 + + + .K + + + x |-> 0 + y |-> 1 + + + + + 0 |-> 3 + 1 |-> 2 + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> .K ) ) + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + + + 0 + + + .K + + + x |-> 0 + y |-> 1 + + + + + 0 |-> 3 + 1 |-> 3 + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> .K ) ) + + + } diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp new file mode 100644 index 00000000000..20f11c0ca8d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp @@ -0,0 +1,5 @@ +print("Input two numbers: "); +int x,y; +x = read(); +y = read(); +print("Their sum is: ", x+y, "\n"); diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.in b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.in new file mode 100644 index 00000000000..654d526942a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.in @@ -0,0 +1 @@ +2 3 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.out new file mode 100644 index 00000000000..863e2ef1a21 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/io.imp.out @@ -0,0 +1 @@ +Input two numbers: Their sum is: 5 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp new file mode 100644 index 00000000000..357c8e05992 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp @@ -0,0 +1,15 @@ +int x; +x=1; +print("Line 3: x = ", x, "\n"); +{ + int x; + x=2; + print("Line 7: x = ", x, "\n"); + { + int x; + x=3; + print("Line 11: x = ", x, "\n"); + } + print("Line 13: x = ", x, "\n"); +} +print("Line 15: x = ", x, "\n"); diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp.out new file mode 100644 index 00000000000..9053d517a80 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/locals.imp.out @@ -0,0 +1,5 @@ +Line 3: x = 1 +Line 7: x = 2 +Line 11: x = 3 +Line 13: x = 2 +Line 15: x = 1 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp new file mode 100644 index 00000000000..f5ff7e26c1c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp @@ -0,0 +1,26 @@ +// This program counts in s all the prime numbers up to m. + +int i, m, n, q, r, s, t, x, y, z; +m = 10; n = 2; +while (n <= m) { + // checking primality of n and writing t to 1 or 0 + i = 2; q = n/i; t = 1; + while (i<=q && 1<=t) { + x = i; + y = q; + // fast multiplication (base 2) algorithm + z = 0; + while (!(x <= 0)) { + q = x/2; + r = q+q+1; + if (r <= x) { z = z+y; } else {} + x = q; + y = y+y; + } // end fast multiplication + if (n <= z) { t = 0; } else { i = i+1; q = n/i; } + } // end checking primality + if (1 <= t) { s = s+1; } else {} + n = n+1; +} + +// s should be 4 when m = 10. diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/primes.imp.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k new file mode 100644 index 00000000000..f46213e393a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k @@ -0,0 +1,76 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module SUM-SPEC + imports IMP + +claim + ... + + while (!(n <= 0)) { + sum = sum + n; + n = n + -1; + } + => + .K + ... + ... + n |-> LN:Int + sum |-> LSUM:Int + ... + ... + + ListItem ( #buffer ( "\n" ~> . ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> . ) ) + + ... + LN |-> (N:Int => 0) + LSUM |-> (S:Int => S +Int ((N +Int 1) *Int N /Int 2)) + ... + _ +requires N >=Int 0 + +claim + ... + + int n, sum; + n = N:Int; + sum = 0; + while (!(n <= 0)) { + sum = sum + n; + n = n + -1; + } + => + .K + ... + + .Map + => + n |-> ?LN:Int + sum |-> ?LSUM:Int + + ... + + ListItem ( #buffer ( "\n" ~> . ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "" ~> . ) ) + + + .Map + => + ?LN |-> 0 + ?LSUM |-> ((N +Int 1) *Int N /Int 2) + + C:Int => C +Int 2 +requires N >=Int 0 +endmodule diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/proofs/sum-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp new file mode 100644 index 00000000000..3f2353fa50b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp @@ -0,0 +1,8 @@ +int x; +print("x = "); +x=read(); +int t1; t1 = spawn {x=x/2;}; +int t2; t2 = spawn { /* join(t1); */ x=x+10;}; // uncomment for fully sync +join(t1); +join(t2); +print(x,"\n"); diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.in b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.in new file mode 100644 index 00000000000..409940768f2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.in @@ -0,0 +1 @@ +23 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.out new file mode 100644 index 00000000000..576aee71db3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/spawn.imp.out @@ -0,0 +1,23 @@ + { + Out:String + #Equals + "x = 11\n" + } +#Or + { + Out:String + #Equals + "x = 16\n" + } +#Or + { + Out:String + #Equals + "x = 21\n" + } +#Or + { + Out:String + #Equals + "x = 33\n" + } diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp new file mode 100644 index 00000000000..7b86a9676aa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp @@ -0,0 +1,14 @@ +int n, s; +while (true) { + print("Add numbers up to (<= 0 to quit)? "); + n = read(); + if (n <= 0) { halt; } + else { + s = 0; + while (!(n <= 0)) { + s = s + n; + n = n + -1; + } + print("Sum = ", s, "\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.in b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.in new file mode 100644 index 00000000000..58d2fb64991 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.in @@ -0,0 +1 @@ +10 0 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.out new file mode 100644 index 00000000000..0fc5f17aa09 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum-io.imp.out @@ -0,0 +1,2 @@ +Add numbers up to (<= 0 to quit)? Sum = 55 +Add numbers up to (<= 0 to quit)? \ No newline at end of file diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp new file mode 100644 index 00000000000..23e8bb6df0d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp @@ -0,0 +1,12 @@ +// This program calculates in sum +// the sum of numbers from 1 to n. + +int n, sum; +n = 100; +sum = 0; +while (!(n <= 0)) { + sum = sum + n; + n = n + -1; +} + +// sum should be 5050 when n is 100 diff --git a/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp.out b/pyk/regression-new/pl-tutorial/1_k/4_imp++/lesson_7/tests/sum.imp.out new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/Makefile b/pyk/regression-new/pl-tutorial/1_k/5_types/Makefile new file mode 100644 index 00000000000..dea4f792a17 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=lesson_6 + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/Makefile b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/Makefile new file mode 100644 index 00000000000..21a5199e96c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/Makefile @@ -0,0 +1,7 @@ +DEF=lambda +EXT=lambda +KOMPILE_FLAGS=--syntax-module LAMBDA +KOMPILE_BACKEND?=haskell +KRUN_FLAGS=--search --pattern " T:Type ... " --smt none + +include ../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/lambda.k b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/lambda.k new file mode 100644 index 00000000000..7e99c1cc69e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/lambda.k @@ -0,0 +1,71 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module LAMBDA + imports DOMAINS + + syntax Exp ::= Int | Bool | Id + | "(" Exp ")" [bracket] + | Exp Exp [left] + > Exp "*" Exp [left] + | Exp "/" Exp + > Exp "+" Exp [left] + > Exp "<=" Exp + > "lambda" Id "." Exp + | "if" Exp "then" Exp "else" Exp + | "let" Id "=" Exp "in" Exp [macro] + | "letrec" Id Id "=" Exp "in" Exp [macro] + | "mu" Id "." Exp + + syntax Type ::= "int" | "bool" + | Type "->" Type + | "(" Type ")" [bracket] + + syntax Exp ::= Type + syntax KResult ::= Type + + configuration + + $PGM:Exp + .Map + + + + rule _I:Int => int + rule _B:Bool => bool + rule X:Id => T ... ... X |-> T ... + + rule E1 * E2 => int ... Rho + (.Bag => E1 = int Rho + E2 = int Rho ) + rule E1 / E2 => int ... Rho + (.Bag => E1 = int Rho + E2 = int Rho ) + rule E1 + E2 => int ... Rho + (.Bag => E1 = int Rho + E2 = int Rho ) + rule E1 <= E2 => bool ... Rho + (.Bag => E1 = int Rho + E2 = int Rho ) + + rule lambda X . E => ?Tx:Type -> ?Te:Type ... TEnv + (.Bag => E = ?Te TEnv[X <- ?Tx] ) + + rule E1 E2 => ?T:Type ... Rho + (.Bag => E1 = ?T2 -> ?T Rho + E2 = ?T2:Type Rho ) + + rule if E then E1 else E2 => ?T:Type ... Rho + (.Bag => E = bool Rho + E1 = ?T Rho + E2 = ?T Rho ) + + rule let X = E in E' => (lambda X . E') E + rule letrec F X = E in E' => let F = mu F . lambda X . E in E' + rule mu X . E => ?T:Type ... TEnv + (.Bag => E = ?T TEnv[X <- ?T] ) + + syntax KItem ::= Exp "=" Exp [seqstrict] + rule T:Type = T:Type => .K ... + + rule ... .K ... => .Bag +endmodule diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda new file mode 100644 index 00000000000..ba7492930ff --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda @@ -0,0 +1,2 @@ +lambda f . lambda g . lambda x . + g (f x) diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda.out new file mode 100644 index 00000000000..3220d12434b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/composition.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + ( ?Tx1:Type -> ?T3:Type ) -> ( ( ?T3:Type -> ?Te1:Type ) -> ( ?Tx1:Type -> ?Te1:Type ) ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda new file mode 100644 index 00000000000..fb7526f6008 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda @@ -0,0 +1,2 @@ +let f = lambda x . x +in f 1 diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda.out new file mode 100644 index 00000000000..69edbebff8d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/identity.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + int +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda new file mode 100644 index 00000000000..e9552f6add1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda @@ -0,0 +1,2 @@ +lambda x . lambda y . lambda z . + if x then y else z diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda.out new file mode 100644 index 00000000000..b7573f7c308 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/if.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + bool -> ( ?Tx1:Type -> ( ?Tx1:Type -> ?Tx1:Type ) ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda new file mode 100644 index 00000000000..904c3605a25 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda @@ -0,0 +1,2 @@ +letrec f x = 3 +in f diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda.out new file mode 100644 index 00000000000..e04be3eb1fe --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/letrec.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + ?Tx0:Type -> int +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda new file mode 100644 index 00000000000..adcaed2d35d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda @@ -0,0 +1,6 @@ +let f1 = lambda x . x in + let f2 = f1 in + let f3 = f2 in + let f4 = f3 in + let f5 = f4 in + if (f5 true) then f2 else f3 diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda.out new file mode 100644 index 00000000000..af1189d50cc --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/nested-lets.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + bool -> bool +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda new file mode 100644 index 00000000000..07a2ec99dbe --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda @@ -0,0 +1 @@ +lambda x . lambda y . x + y diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda.out new file mode 100644 index 00000000000..9a517a768bb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/plus.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + int -> ( int -> int ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda new file mode 100644 index 00000000000..317fe5f31de --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda @@ -0,0 +1,2 @@ +let id = lambda x . x +in if (id true) then (id 1) else (id 2) diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda.out new file mode 100644 index 00000000000..88b8f237d0e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-1-fails.lambda.out @@ -0,0 +1 @@ +#Bottom diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda new file mode 100644 index 00000000000..34495cd24ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda @@ -0,0 +1,2 @@ +let id = lambda x . x +in id id diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda.out new file mode 100644 index 00000000000..88b8f237d0e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/polymorphic-identity-2-fails.lambda.out @@ -0,0 +1 @@ +#Bottom diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda new file mode 100644 index 00000000000..e8307bf4b11 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda @@ -0,0 +1,4 @@ +let x = 1 +in let f = lambda a . x + in let x = true + in f 3 diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda.out new file mode 100644 index 00000000000..69edbebff8d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-1.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + int +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda new file mode 100644 index 00000000000..a6f3061a091 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda @@ -0,0 +1,6 @@ +let y = 0 +in letrec f x = if x <= 0 + then y + else let y = true + in f (x + 1) + in f 1 diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda.out new file mode 100644 index 00000000000..69edbebff8d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/static-scoping-2.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + int +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda new file mode 100644 index 00000000000..f15e7b2d4af --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda @@ -0,0 +1,6 @@ +// the parenthese around let should not be needed; +// i'll fix this as soon as the priorities work + +lambda f . lambda x . lambda y . ( + (f x y) + x + (let x = y in x) +) diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda.out new file mode 100644 index 00000000000..ceb7058b162 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-1.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + ( int -> ( int -> int ) ) -> ( int -> ( int -> int ) ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda new file mode 100644 index 00000000000..f87649cf68d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda @@ -0,0 +1,3 @@ +lambda x . + let f = lambda y . if true then y else x + in (lambda x . f 0) diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda.out new file mode 100644 index 00000000000..829838d9b3e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-2.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + int -> ( ?Tx1:Type -> int ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda new file mode 100644 index 00000000000..1e0632a2e7e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda @@ -0,0 +1,2 @@ +lambda x . let f = lambda y . if true then x 7 else x y + in f diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda.out new file mode 100644 index 00000000000..c6867398756 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-3.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + ( int -> ?Te1:Type ) -> ( int -> ?Te1:Type ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda new file mode 100644 index 00000000000..eccee5178cf --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda @@ -0,0 +1,3 @@ +lambda x . let f = lambda x . x + in let d = (f x) + 1 + in x diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda.out new file mode 100644 index 00000000000..296beb950dc --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-4.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + int -> int +} diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda new file mode 100644 index 00000000000..1bf68eb4a6a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda @@ -0,0 +1,2 @@ +lambda x . let f = lambda y . x y + in let z = x 0 in f diff --git a/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda.out b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda.out new file mode 100644 index 00000000000..6ae15df0ad5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/5_types/lesson_6/tests/tricky-5.lambda.out @@ -0,0 +1,5 @@ +{ + T:Type +#Equals + ( int -> ?Tx1:Type ) -> ( int -> ?Tx1:Type ) +} diff --git a/pyk/regression-new/pl-tutorial/1_k/Makefile b/pyk/regression-new/pl-tutorial/1_k/Makefile new file mode 100644 index 00000000000..ff3949e672c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/1_k/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=1_lambda 2_imp 3_lambda++ 4_imp++ 5_types + +include ../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/Makefile b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/Makefile new file mode 100644 index 00000000000..d39218687f2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/Makefile @@ -0,0 +1,20 @@ +DEF=simple-untyped +EXT=simple +TESTDIR=tests/* +KOMPILE_FLAGS=--enable-search +KOMPILE_BACKEND?=llvm +KRUN_FLAGS=--output none --smt none + +include ../../../../../../include/kframework/ktest.mak + +tests/threads/threads_05.simple: kompile + cat $@.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(DEF)-kompiled --search --bound 5 $(CHECK) $@.out + +tests/exceptions/exceptions_07.simple \ +tests/threads/threads_01.simple \ +tests/threads/threads_02.simple \ +tests/threads/threads_04.simple \ +tests/threads/threads_06.simple \ +tests/threads/threads_09.simple \ +tests/diverse/div-nondet.simple: kompile + cat $@.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(DEF)-kompiled --search --pattern ' ListItem(#ostream(1)) ListItem("off") ListItem(#buffer(S:String)) ' $(CHECK) $@.out diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/simple-untyped.md b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/simple-untyped.md new file mode 100644 index 00000000000..758fb5f11a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/simple-untyped.md @@ -0,0 +1,1171 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +# SIMPLE — Untyped + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +Author: Traian Florin Șerbănuță (traian.serbanuta@unibuc.ro) +Organization: University of Bucharest + + +## Abstract + +This is the **K** semantic definition of the untyped SIMPLE language. +SIMPLE is intended to be a pedagogical and research language that captures +the essence of the imperative programming paradigm, extended with several +features often encountered in imperative programming languages. +A program consists of a set of global variable declarations and +function definitions. Like in C, function definitions cannot be +nested and each program must have one function called `main`, +which is invoked when the program is executed. To make it more +interesting and to highlight some of **K**'s strengths, SIMPLE includes +the following features in addition to the conventional imperative +expression and statement constructs: + +* Multidimensional arrays and array references. An array evaluates + to an array reference, which is a special value holding a location (where + the elements of the array start) together with the size of the array; + the elements of the array can be array references themselves (particularly + when the array is multi-dimensional). Array references are ordinary values, + so they can be assigned to variables and passed/received by functions. + +* Functions and function values. Functions can have zero or + more parameters and can return abruptly using a `return` statement. + SIMPLE follows a call-by-value parameter passing style, with static scoping. + Function names evaluate to function abstractions, which hereby become ordinary + values in the language, same like the array references. + +* Blocks with locals. SIMPLE variables can be declared + anywhere, their scope being from the place where they are declared + until the end of the most nested enclosing block. + +* Input/Output. The expression `read()` evaluates to the + next value in the input buffer, and the statement `write(e)` + evaluates `e` and outputs its value to the output buffer. The + input and output buffers are lists of values. + +* Exceptions. SIMPLE has parametric exceptions (the value thrown as + an exception can be caught and bound). + +* Concurrency via dynamic thread creation/termination and + synchronization. One can spawn a thread to execute any statement. + The spawned thread shares with its parent its environment at creation time. + Threads can be synchronized via a join command which blocks the current thread + until the joined thread completes, via re-entrant locks which can be acquired + and released, as well as through rendezvous commands. + + +Like in many other languages, some of SIMPLE's constructs can be +desugared into a smaller set of basic constructs. We do that at the end +of the syntax module, and then we only give semantics to the core constructs. + +__Note__: This definition is commented slightly more than others, because it is +intended to be one of the first non-trivial definitions that the new +user of **K** sees. We recommend the beginner user to first check the +language definitions discussed in the **K** tutorial. + +```k +module SIMPLE-UNTYPED-SYNTAX + imports DOMAINS-SYNTAX +``` + +## Syntax + +We start by defining the SIMPLE syntax. The language constructs discussed +above have the expected syntax and evaluation strategies. Recall that in **K** +we annotate the syntax with appropriate strictness attributes, thus giving +each language construct the desired evaluation strategy. + +## Identifiers + +Recall from the **K** tutorial that identifiers are builtin and come under the +syntactic category `Id`. The special identifier for the function +`main` belongs to all programs, and plays a special role in the semantics, +so we declare it explicitly. This would not be necessary if the identifiers +were all included automatically in semantic definitions, but that is not +possible because of parsing reasons (e.g., **K** variables used to match +concrete identifiers would then be ambiguously parsed as identifiers). They +are only included in the parser generated to parse programs (and used by the +`kast` tool). Consequently, we have to explicitly declare all the +concrete identifiers that play a special role in the semantics, like +`main` below. + +```k + syntax Id ::= "main" [token] +``` + +## Declarations + +There are two types of declarations: for variables (including arrays) and +for functions. We are going to allow declarations of the form +`var x=10, a[10,10], y=23;`, which is why we allow the `var` +keyword to take a list of expressions. The non-terminals used in the two +productions below are defined shortly. + +```k + syntax Stmt ::= "var" Exps ";" + | "function" Id "(" Ids ")" Block +``` +## Expressions + +The expression constructs below are standard. Increment (`++`) takes +an expression rather than a variable because it can also increment an array +element. Recall that the syntax we define in **K** is what we call _the syntax +of the semantics_: while powerful enough to define non-trivial syntaxes +(thanks to the underlying SDF technology that we use), we typically refrain +from defining precise syntaxes, that is, ones which accept precisely the +well-formed programs (that would not be possible anyway in general). That job +is deferred to type systems, which can also be defined in **K**. In other words, +we are not making any effort to guarantee syntactically that only variables +or array elements are passed to the increment construct, we allow any +expression. Nevertheless, we will only give semantics to those, so expressions +of the form `++5`, which parse (but which will be rejected by our type +system in the typed version of SIMPLE later), will get stuck when executed. +Arrays can be multidimensional and can hold other arrays, so their +lookup operation takes a list of expressions as argument and applies to an +expression (which can in particular be another array lookup), respectively. +The construct `sizeOf` gives the size of an array in number of elements +of its first dimension. Note that almost all constructs are strict. The only +constructs which are not strict are the increment (since its first argument +gets updated, so it cannot be evaluated), the input read which takes no +arguments so strictness is irrelevant for it, the logical and and or constructs +which are short-circuited, the thread spawning construct which creates a new +thread executing the argument expression and return its unique identifier to +the creating thread (so it cannot just evaluate its argument in place), and the +assignment which is only strict in its second argument (for the same reason as +the increment). + +```k + syntax Exp ::= Int | Bool | String | Id + | "(" Exp ")" [bracket] + | "++" Exp + > Exp "[" Exps "]" [strict] + > Exp "(" Exps ")" [strict] + | "-" Exp [strict] + | "sizeOf" "(" Exp ")" [strict] + | "read" "(" ")" + > left: + Exp "*" Exp [strict, left] + | Exp "/" Exp [strict, left] + | Exp "%" Exp [strict, left] + > left: + Exp "+" Exp [strict, left] + | Exp "-" Exp [strict, left] + > non-assoc: + Exp "<" Exp [strict, non-assoc] + | Exp "<=" Exp [strict, non-assoc] + | Exp ">" Exp [strict, non-assoc] + | Exp ">=" Exp [strict, non-assoc] + | Exp "==" Exp [strict, non-assoc] + | Exp "!=" Exp [strict, non-assoc] + > "!" Exp [strict] + > left: + Exp "&&" Exp [strict(1), left] + | Exp "||" Exp [strict(1), left] + > "spawn" Block + > Exp "=" Exp [strict(2), right] +``` + +We also need comma-separated lists of identifiers and of expressions. +Moreover, we want them to be strict, that is, to evaluate to lists of results +whenever requested (e.g., when they appear as strict arguments of +the constructs above). + +```k + syntax Ids ::= List{Id,","} [overload(Exps)] + syntax Exps ::= List{Exp,","} [overload(Exps), strict] // automatically hybrid now + syntax Exps ::= Ids + syntax Val + syntax Vals ::= List{Val,","} [overload(Exps)] + syntax Bottom + syntax Bottoms ::= List{Bottom,","} [overload(Exps)] + syntax Ids ::= Bottoms +``` + +## Statements + +Most of the statement constructs are standard for imperative languages. +We syntactically distinguish between empty and non-empty blocks, because we +chose `Stmts` not to be a (`;`-separated) list of +`Stmt`. Variables can be declared anywhere inside a block, their scope +ending with the block. Expressions are allowed to be used for their side +effects only (followed by a semicolon `;`). Functions are allowed +to abruptly return. The exceptions are parametric, i.e., one can throw a value +which is bound to the variable declared by `catch`. Threads can be +dynamically created and terminated, and can synchronize with `join`, +`acquire`, `release` and `rendezvous`. Note that the +strictness attributes obey the intended evaluation strategy of the various +constructs. In particular, the if-then-else construct is strict only in its +first argument (the if-then construct will be desugared into if-then-else), +while the loop constructs are not strict in any arguments. The `print` +statement construct is variadic, that is, it takes an arbitrary number of +arguments. + +```k + syntax Block ::= "{" "}" + | "{" Stmt "}" + + syntax Stmt ::= Block + | Exp ";" [strict] + | "if" "(" Exp ")" Block "else" Block [avoid, strict(1)] + | "if" "(" Exp ")" Block [macro] + | "while" "(" Exp ")" Block + | "for" "(" Stmt Exp ";" Exp ")" Block [macro] + | "return" Exp ";" [strict] + | "return" ";" [macro] + | "print" "(" Exps ")" ";" [strict] +// NOTE: print strict allows non-deterministic evaluation of its arguments +// Either keep like this but document, or otherwise make Exps seqstrict. +// Of define and use a different expression list here, which is seqstrict. + | "try" Block "catch" "(" Id ")" Block + | "throw" Exp ";" [strict] + | "join" Exp ";" [strict] + | "acquire" Exp ";" [strict] + | "release" Exp ";" [strict] + | "rendezvous" Exp ";" [strict] +``` + +The reason we allow `Stmts` as the first argument of `for` +instead of `Stmt` is because we want to allow more than one statement +to be executed when the loop is initialized. Also, as seens shorly, macros +may expand one statement into more statements; for example, an initialized +variable declaration statement `var x=0;` desugars into two statements, +namely `var x; x=0;`, so if we use `Stmt` instead of `Stmts` +in the production of `for` above then we risk that the macro expansion +of statement `var x=0;` happens before the macro expansion of `for`, +also shown below, in which case the latter would not apply anymore because +of syntactic mismatch. + +```k + syntax Stmt ::= Stmt Stmt [right] + +// I wish I were able to write the following instead, but confuses the parser. +// +// syntax Stmts ::= List{Stmt,""} +// syntax Top ::= Stmt | "function" Id "(" Ids ")" Block +// syntax Pgm ::= List{Top,""} +// +// With that, I could have also eliminated the empty block +``` + +## Desugared Syntax + +This part desugars some of SIMPLE's language constructs into core ones. +We only want to give semantics to core constructs, so we get rid of the +derived ones before we start the semantics. All desugaring macros below are +straightforward. +```k + rule if (E) S => if (E) S else {} + rule for(Start Cond; Step) {S} => {Start while (Cond) {S Step;}} + rule for(Start Cond; Step) {} => {Start while (Cond) {Step;}} + rule var E1:Exp, E2:Exp, Es:Exps; => var E1; var E2, Es; + rule var X:Id = E; => var X; X = E; +``` + +For the semantics, we can therefore assume from now on that each +conditional has both branches, that there are only `while` loops, and +that each variable is declared alone and without any initialization as part of +the declaration. +```k +endmodule + + +module SIMPLE-UNTYPED + imports SIMPLE-UNTYPED-SYNTAX + imports DOMAINS +``` + +## Basic Semantic Infrastructure + +Before one starts adding semantic rules to a **K** definition, one needs to +define the basic semantic infrastructure consisting of definitions for +`values` and `configuration`. As discussed in the definitions +in the **K** tutorial, the values are needed to know when to stop applying +the heating rules and when to start applying the cooling rules corresponding +to strictness or context declarations. The configuration serves as a backbone +for the process of configuration abstraction which allows users to only +mention the relevant cells in each semantic rule, the rest of the configuration +context being inferred automatically. Although in some cases the configuration +could be automatically inferred from the rules, we believe that it is very +useful for language designers/semanticists to actually think of and design +their configuration explicitly, so the current implementation of **K** requires +one to define it. + +## Values + +We here define the values of the language that the various fragments of +programs evaluate to. First, integers and Booleans are values. As discussed, +arrays evaluate to special array reference values holding (1) a location from +where the array's elements are contiguously allocated in the store, and +(2) the size of the array. Functions evaluate to function values as +λ-abstractions (we do not need to evaluate functions to closures +because each function is executed in the fixed global environment and +function definitions cannot be nested). Like in IMP and other +languages, we finally tell the tool that values are **K** results. + +```k + syntax Val ::= Int | Bool | String + | array(Int,Int) + | lambda(Ids,Stmt) + syntax Exp ::= Val + syntax Exps ::= Vals + syntax Val ::= Bottom + syntax Vals ::= Bottoms + syntax KResult ::= Val + | Vals // TODO: should not need this +``` +The inclusion of values in expressions follows the methodology of +syntactic definitions (like, e.g., in SOS): extend the syntax of the language +to encompass all values and additional constructs needed to give semantics. +In addition to that, it allows us to write the semantic rules using the +original syntax of the language, and to parse them with the same (now extended +with additional values) parser. If writing the semantics directly on the **K** +AST, using the associated labels instead of the syntactic constructs, then one +would not need to include values in expressions. + +## Configuration + +The **K** configuration of SIMPLE consists of a top level cell, `T`, +holding a `threads` cell, a global environment map cell `genv` +mapping the global variables and function names to their locations, a shared +store map cell `store` mapping each location to some value, a set cell +`busy` holding the locks which have been acquired but not yet released +by threads, a set cell `terminated` holding the unique identifiers of +the threads which already terminated (needed for `join`), `input` +and `output` list cells, and a `nextLoc` cell holding a natural +number indicating the next available location. Unlike in the small languages +in the **K** tutorial, where we used the fresh predicate to generate fresh +locations, in larger languages, like SIMPLE, we prefer to explicitly manage +memory. The location counter in `nextLoc` models an actual physical +location in the store; for simplicity, we assume arbitrarily large memory and +no garbage collection. The `threads` cell contains one `thread` +cell for each existing thread in the program. Note that the thread cell has +multiplicity `*`, which means that at any given moment there could be zero, +one or more `thread` cells. Each `thread` cell contains a +computation cell `k`, a `control` cell holding the various +control structures needed to jump to certain points of interest in the program +execution, a local environment map cell `env` mapping the thread local +variables to locations in the store, and finally a `holds` map cell +indicating what locks have been acquired by the thread and not released so far +and how many times (SIMPLE's locks are re-entrant). The `control` cell +currently contains only two subcells, a function stack `fstack` which +is a list and an exception stack `xstack` which is also a list. +One can add more control structures in the `control` cell, such as a +stack for break/continue of loops, etc., if the language is extended with more +control-changing constructs. Note that all cells except for `k` are +also initialized, in that they contain a ground term of their corresponding +sort. The `k` cell is initialized with the program that will be passed +to the **K** tool, as indicated by the `$PGM` variable, followed by the +`execute` task (defined shortly). +```k + // the syntax declarations below are required because the sorts are + // referenced directly by a production and, because of the way KIL to KORE + // is implemented, the configuration syntax is not available yet + // should simply work once KIL is removed completely + // check other definitions for this hack as well + + syntax ControlCell + syntax ControlCellFragment + + configuration + + + -1 + $PGM:Stmt ~> execute + //
// TODO(KORE): support latex annotations #1799 + + .List + .List + + //
// TODO(KORE): support latex annotations #1799 + .Map + .Map +
+
+ //
// TODO(KORE): support latex annotations #1799 + .Map + .Map + .Set + .Set + //
// TODO(KORE): support latex annotations #1799 + .List + .List + 0 +
+``` + +## Declarations and Initialization + +We start by defining the semantics of declarations (for variables, +arrays and functions). + +## Variable Declaration + +The SIMPLE syntax was desugared above so that each variable is +declared alone and its initialization is done as a separate statement. +The semantic rule below matches resulting variable declarations of the +form `var X;` on top of the `k` cell +(indeed, note that the `k` cell is complete, or round, to the +left, and is torn, or ruptured, to the right), allocates a fresh +location `L` in the store which is initialized with a special value +`⊥` (indeed, the unit `.`, or nothing, is matched anywhere +in the map ‒note the tears at both sides‒ and replaced with the +mapping `L ↦ ⊥`), and binds `X` to `L` in the local +environment shadowing previous declarations of `X`, if any. +This possible shadowing of `X` requires us to therefore update the +entire environment map, which is expensive and can significantly slow +down the execution of larger programs. On the other hand, since we know +that `L` is not already bound in the store, we simply add the binding +`L ↦ ⊥` to the store, thus avoiding a potentially complete +traversal of the the store map in order to update it. We prefer the approach +used for updating the store whenever possible, because, in addition to being +faster, it offers more true concurrency than the latter; indeed, according +to the concurrent semantics of `K`, the store is not frozen while +`L ↦ ⊥` is added to it, while the environment is frozen during the +update operation `Env[L/X]`. The variable declaration command is +also removed from the top of the computation cell and the fresh location +counter is incremented. The undefined symbol `⊥` added in the store +is of sort `KItem`, instead of `Val`, on purpose; this way, the +store lookup rules will get stuck when one attempts to lookup an +uninitialized location. All the above happen in one transactional step, +with the rule below. Note also how configuration abstraction allows us to +only mention the needed cells; indeed, as the configuration above states, +the `k` and `env` cells are actually located within a +`thread` cell within the `threads` cell, but one needs +not mention these: the configuration context of the rule is +automatically transformed to match the declared configuration +structure. +```k + syntax KItem ::= "undefined" + + rule var X:Id; => .K ... + Env => Env[X <- L] + ... .Map => L |-> undefined ... + L => L +Int 1 +``` + +## Array Declaration + +The **K** semantics of the uni-dimensional array declaration is somehow similar +to the above declaration of ordinary variables. First, note the +context declaration below, which requests the evaluation of the array +dimension. Once evaluated, say to a natural number `N`, then +`N +Int 1` locations are allocated in the store for +an array of size `N`, the additional location (chosen to be the first +one allocated) holding the array reference value. The array reference +value `array(L,N)` states that the array has size `N` and its +elements are located contiguously in the store starting with location +`L`. The operation `L … L' ↦ V`, defined at the end of this +file in the auxiliary operation section, initializes each location in +the list `L … L'` to `V`. Note that, since the dimensions of +array declarations can be arbitrary expressions, this virtually means +that we can dynamically allocate memory in SIMPLE by means of array +declarations. + +```k + context var _:Id[HOLE]; + + rule var X:Id[N:Int]; => .K ... + Env => Env[X <- L] + ... .Map => L |-> array(L +Int 1, N) + (L +Int 1) ... (L +Int N) |-> undefined ... + L => L +Int 1 +Int N + requires N >=Int 0 +``` + +SIMPLE allows multi-dimensional arrays. For semantic simplicity, we +desugar them all into uni-dimensional arrays by code transformation. +This way, we only need to give semantics to uni-dimensional arrays. +First, note that the context rule above actually evaluates all the array +dimensions (that's why we defined the expression lists strict!): +Upon evaluating the array dimensions, the code generation rule below +desugars multi-dimensional array declaration to uni-dimensional declarations. +To this aim, we introduce two special unique variable identifiers, +`$1` and `$2`. The first variable, `$1`, iterates +through and initializes each element of the first dimension with an array +of the remaining dimensions, declared as variable `$2`: +```k + syntax Id ::= "$1" [token] | "$2" [token] + rule var X:Id[N1:Int, N2:Int, Vs:Vals]; + => var X[N1]; + { + for(var $1 = 0; $1 <= N1 - 1; ++$1) { + var $2[N2, Vs]; + X[$1] = $2; + } + } +``` +Ideally, one would like to perform syntactic desugarings like the one +above before the actual semantics. Unfortunately, that was not possible in +this case because the dimension expressions of the multi-dimensional array need +to be evaluated first. Indeed, the desugaring rule above does not work if the +dimensions of the declared array are arbitrary expressions, because they can +have side effects (e.g., `a[++x,++x]`) and those side effects would be +propagated each time the expression is evaluated in the desugaring code (note +that both the loop condition and the nested multi-dimensional declaration +would need to evaluate the expressions given as array dimensions). + +## Function declaration + +Functions are evaluated to λ-abstractions and stored like any other +values in the store. A binding is added into the environment for the function +name to the location holding its body. Similarly to the C language, SIMPLE +only allows function declarations at the top level of the program. More +precisely, the subsequent semantics of SIMPLE only works well when one +respects this requirement. Indeed, the simplistic context-free parser +generated by the grammar above is more generous than we may want, in that it +allows function declarations anywhere any declaration is allowed, including +inside arbitrary blocks. However, as the rule below shows, we are `not` +storing the declaration environment with the λ-abstraction value as +closures do. Instead, as seen shortly, we switch to the global environment +whenever functions are invoked, which is consistent with our requirement that +functions should only be declared at the top. Thus, if one declares local +functions, then one may see unexpected behaviors (e.g., when one shadows a +global variable before declaring a local function). The type checker of +SIMPLE, also defined in **K** (see `examples/simple/typed/static`), +discards programs which do not respect this requirement. + +```k + rule function F(Xs) S => .K ... + Env => Env[F <- L] + ... .Map => L |-> lambda(Xs, S) ... + L => L +Int 1 +``` + +When we are done with the first pass (pre-processing), the computation +cell `k` contains only the token `execute` (see the configuration +declaration above, where the computation item `execute` was placed +right after the program in the `k` cell of the initial configuration) +and the cell `genv` is empty. In this case, we have to call +`main()` and to initialize the global environment by transferring the +contents of the local environment into it. We prefer to do it this way, as +opposed to processing all the top level declarations directly within the global +environment, because we want to avoid duplication of semantics: the syntax of +the global declarations is identical to that of their corresponding local +declarations, so the semantics of the latter suffices provided that we copy +the local environment into the global one once we are done with the +pre-processing. We want this separate pre-processing step precisely because +we want to create the global environment. All (top-level) functions end up +having their names bound in the global environment and, as seen below, they +are executed in that same global environment; all these mean, in particular, +that the functions "see" each other, allowing for mutual recursion, etc. + +```k + syntax KItem ::= "execute" + rule execute => main(.Exps); + Env + .Map => Env +``` + +## Expressions + +We next define the **K** semantics of all the expression constructs. + +## Variable lookup + +When a variable `X` is the first computational task, and `X` is bound to some +location `L` in the environment, and `L` is mapped to some value `V` in the +store, then we rewrite `X` into `V`: +```k + rule X:Id => V ... + ... X |-> L ... + ... L |-> V:Val ... [group(lookup)] +``` +Note that the rule above excludes reading `⊥`, because `⊥` is not +a value and `V` is checked at runtime to be a value. + +## Variable/Array increment + +This is tricky, because we want to allow both `++x` and `++a[5]`. +Therefore, we need to extract the lvalue of the expression to increment. +To do that, we state that the expression to increment should be wrapped +by the auxiliary `lvalue` operation and then evaluated. The semantics +of this auxiliary operation is defined at the end of this file. For now, all +we need to know is that it takes an expression and evaluates to a location +value. Location values, also defined at the end of the file, are integers +wrapped with the operation `loc`, to distinguish them from ordinary +integers. +```k + context ++(HOLE => lvalue(HOLE)) + rule ++loc(L) => I +Int 1 ... + ... L |-> (I => I +Int 1) ... [group(increment)] +``` + +## Arithmetic operators + +There is nothing special about the following rules. They rewrite the +language constructs to their library counterparts when their arguments +become values of expected sorts: +```k + rule I1 + I2 => I1 +Int I2 + rule Str1 + Str2 => Str1 +String Str2 + rule I1 - I2 => I1 -Int I2 + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 requires I2 =/=K 0 + rule I1 % I2 => I1 %Int I2 requires I2 =/=K 0 + rule - I => 0 -Int I + rule I1 < I2 => I1 I1 <=Int I2 + rule I1 > I2 => I1 >Int I2 + rule I1 >= I2 => I1 >=Int I2 +``` +The equality and inequality constructs reduce to syntactic comparison +of the two argument values (which is what the equality on `K` terms does). +```k + rule V1:Val == V2:Val => V1 ==K V2 + rule V1:Val != V2:Val => V1 =/=K V2 +``` +The logical negation is clear, but the logical conjunction and disjunction +are short-circuited: +```k + rule ! T => notBool(T) + rule true && E => E + rule false && _ => false + rule true || _ => true + rule false || E => E +``` + +## Array lookup + +Untyped SIMPLE does not check array bounds (the dynamically typed version of +it, in `examples/simple/typed/dynamic`, does check for array out of +bounds). The first rule below desugars the multi-dimensional array access to +uni-dimensional array access; recall that the array access operation was +declared strict, so all sub-expressions involved are already values at this +stage. The second rule rewrites the array access to a lookup operation at a +precise location; we prefer to do it this way to avoid locking the store. +The semantics of the auxiliary `lookup` operation is straightforward, +and is defined at the end of the file. +```k +// The [anywhere] feature is underused, because it would only be used +// at the top of the computation or inside the lvalue wrapper. So it +// may not be worth, or we may need to come up with a special notation +// allowing us to enumerate contexts for [anywhere] rules. + rule V:Val[N1:Int, N2:Int, Vs:Vals] => V[N1][N2, Vs] + [anywhere] + + rule array(L,_)[N:Int] => lookup(L +Int N) + [anywhere] +``` + +## Size of an array + +The size of the array is stored in the array reference value, and the +`sizeOf` construct was declared strict, so: + +```k + rule sizeOf(array(_,N)) => N +``` + +## Function call + +Function application was strict in both its arguments, so we can +assume that both the function and its arguments are evaluated to +values (the former expected to be a λ-abstraction). The first +rule below matches a well-formed function application on top of the +computation and performs the following steps atomically: it switches +to the function body followed by `return;` (for the case in +which the function does not use an explicit return statement); it +pushes the remaining computation, the current environment, and the +current control data onto the function stack (the remaining +computation can thus also be discarded from the computation cell, +because an unavoidable subsequent `return` statement ‒see +above‒ will always recover it from the stack); it switches the +current environment (which is being pushed on the function stack) to +the global environment, which is where the free variables in the +function body should be looked up; it binds the formal parameters to +fresh locations in the new environment, and stores the actual +arguments to those locations in the store (this latter step is easily +done by reducing the problem to variable declarations, whose semantics +we have already defined; the auxiliary operation `mkDecls` is +defined at the end of the file). The second rule pops the +computation, the environment and the control data from the function +stack when a `return` statement is encountered as the next +computational task, passing the returned value to the popped +computation (the popped computation was the context in which the +returning function was called). Note that the pushing/popping of the +control data is crucial. Without it, one may have a function that +contains an exception block with a return statement inside, which +would put the `xstack` cell in an inconsistent state (since the +exception block modifies it, but that modification should be +irrelevant once the function returns). We add an artificial +`nothing` value to the language, which is returned by the +nulary `return;` statements. +```k + syntax KItem ::= (Map,K,ControlCellFragment) + + rule lambda(Xs,S)(Vs:Vals) ~> K => mkDecls(Xs,Vs) S return; + + .List => ListItem((Env,K,C)) ... + C + + Env => GEnv + GEnv + + rule return(V:Val); ~> _ => V ~> K + + ListItem((Env,K,C)) => .List ... + (_ => C) + + _ => Env + + syntax Val ::= "nothing" + rule return; => return nothing; +``` +Like for division-by-zero, it is left unspecified what happens +when the `nothing` value is used in domain calculations. For +example, from the the perspective of the language semantics, +`7 +Int nothing` can evaluate to anything, or +may not evaluate at all (be undefined). If one wants to make sure that +such artificial values are never misused, then one needs to define a static +checker (also using **K**, like our the type checker in +`examples/simple/typed/static`) and reject programs that do. +Note that, unlike the undefined symbol `⊥` which had the sort `K` +instead of `Val`, we defined `nothing` to be a value. That +is because, as explained above, we do not want the program to get +stuck when nothing is returned by a function. Instead, we want the +behavior to be unspecified; in particular, if one is careful to never +use the returned value in domain computation, like it happens when we +call a function for its side effects (e.g., with a statement of the +form `f(x);`), then the program does not get stuck. + +## Read + +The `read()` expression construct simply evaluates to the next +input value, at the same time discarding the input value from the +`in` cell. + +```k + rule read() => I ... ListItem(I:Int) => .List ... [group(read)] +``` + +## Assignment + +In SIMPLE, like in C, assignments are expression constructs and not statement +constructs. To make it a statement all one needs to do is to follow it by a +semi-colon `;` (see the semantics for expression statements below). +Like for the increment, we want to allow assignments not only to variables but +also to array elements, e.g., `e1[e2] = e3` where `e1` evaluates +to an array reference, `e2` to a natural number, and `e3` to any +value. Thus, we first compute the lvalue of the left-hand-side expression +that appears in an assignment, and then we do the actual assignment to the +resulting location: +```k + context (HOLE => lvalue(HOLE)) = _ + + rule loc(L) = V:Val => V ... ... L |-> (_ => V) ... + [group(assignment)] +``` + +## Statements + +We next define the **K** semantics of statements. + +## Blocks + +Empty blocks are simply discarded, as shown in the first rule below. +For non-empty blocks, we schedule the enclosed statement but we have to +make sure the environment is recovered after the enclosed statement executes. +Recall that we allow local variable declarations, whose scope is the block +enclosing them. That is the reason for which we have to recover the +environment after the block. This allows us to have a very simple semantics +for variable declarations, as we did above. One can make the two rules below +computational if one wants them to count as computational steps. + +```k + rule {} => .K + rule { S } => S ~> setEnv(Env) ... Env +``` +The basic definition of environment recovery is straightforward and +given in the section on auxiliary constructs at the end of the file. + +There are two common alternatives to the above semantics of blocks. +One is to keep track of the variables which are declared in the block and only +recover those at the end of the block. This way one does more work for +variable declarations but conceptually less work for environment recovery; we +say `conceptually` because it is not clear that it is indeed the case that +one does less work when AC matching is involved. The other alternative is to +work with a stack of environments instead of a flat environment, and push the +current environment when entering a block and pop it when exiting it. This +way, one does more work when accessing variables (since one has to search the +variable in the environment stack in a top-down manner), but on the other hand +uses smaller environments and the definition gets closer to an implementation. +Based on experience with dozens of language semantics and other **K** definitions, +we have found that our approach above is the best trade-off between elegance +and efficiency (especially since rewrite engines have built-in techniques to +lazily copy terms, by need, thus not creating unnecessary copies), +so it is the one that we follow in general. + +## Sequential composition + +Sequential composition is desugared into **K**'s builtin sequentialization +operation (recall that, like in C, the semi-colon `;` is not a +statement separator in SIMPLE — it is either a statement terminator or a +construct for a statement from an expression). Note that **K** allows +to define the semantics of SIMPLE in such a way that statements eventually +dissolve from the top of the computation when they are completed; this is in +sharp contrast to (artificially) `evaluating` them to a special +`skip` statement value and then getting rid of that special value, as +it is the case in other semantic approaches (where everything must evaluate +to something). This means that once `S₁` completes in the rule below, `S₂` +becomes automatically the next computation item without any additional +(explicit or implicit) rules. +```k + rule S1:Stmt S2:Stmt => S1 ~> S2 +``` + +A subtle aspect of the rule above is that `S₁` is declared to have sort +`Stmts` and not `Stmt`. That is because desugaring macros can indeed +produce left associative sequential composition of statements. For example, +the code `var x=0; x=1;` is desugared to +`(var x; x=0;) x=1;`, so although originally the first term of +the sequential composition had sort `Stmt`, after desugaring it became +of sort `Stmts`. Note that the attribute `[right]` associated +to the sequential compositon production is an attribute of the syntax, and not +of the semantics: e.g., it tells the parser to parse +`var x; x=0; x=1;` as `var x; (x=0; x=1;)`, but it +does not tell the rewrite engine to rewrite `(var x; x=0;) x=1;` to +`var x; (x=0; x=1;)`. + +## Expression statements + +Expression statements are only used for their side effects, so their result +value is simply discarded. Common examples of expression statements are ones +of the form `++x;`, `x=e;`, `e1[e2]=e3;`, etc. +```k + rule _:Val; => .K +``` + +## Conditional + +Since the conditional was declared with the `strict(1)` attribute, we +can assume that its first argument will eventually be evaluated. The rules +below cover the only two possibilities in which the conditional is allowed to +proceed (otherwise the rewriting process gets stuck). +```k + rule if ( true) S else _ => S + rule if (false) _ else S => S +``` + +## While loop + +The simplest way to give the semantics of the while loop is by unrolling. +Note, however, that its unrolling is only allowed when the while loop reaches +the top of the computation (to avoid non-termination of unrolling). The +simple while loop semantics below works because our while loops in SIMPLE are +indeed very basic. If we allowed break/continue of loops then we would need +a completely different semantics, which would also involve the `control` cell. +```k + rule while (E) S => if (E) {S while(E)S} +``` + +## Print + +The `print` statement was strict, so all its arguments are now +evaluated (recall that `print` is variadic). We append each of +its evaluated arguments to the output buffer, and discard the residual +`print` statement with an empty list of arguments. +```k + rule print(V:Val, Es:Vals => Es); ... ... .List => ListItem(V) + [group(print)] + rule print(.Vals); => .K +``` + +## Exceptions + +SIMPLE allows parametric exceptions, in that one can throw and catch a +particular value. The statement `try S₁ catch(X) S₂` +proceeds with the evaluation of `S₁`. If `S₁` evaluates normally, i.e., +without any exception thrown, then `S₂` is discarded and the execution +continues normally. If `S₁` throws an exception with a statement of the +form `throw E`, then `E` is first evaluated to some value `V` +(`throw` was declared to be strict), then `V` is bound to `X`, then +`S₂` is evaluated in the new environment while the reminder of `S₁` is +discarded, then the environment is recovered and the execution continues +normally with the statement following the `try S₁ catch(X) S₂` statement. +Exceptions can be nested and the statements in the +`catch` part (`S₂` in our case) can throw exceptions to the +upper level. One should be careful with how one handles the control data +structures here, so that the abrupt changes of control due to exception +throwing and to function returns interact correctly with each other. +For example, we want to allow function calls inside the statement `S₁` in +a `try S₁ catch(X) S₂` block which can throw an exception +that is not caught by the function but instead is propagated to the +`try S₁ catch(X) S₂` block that called the function. +Therefore, we have to make sure that the function stack as well as other +potential control structures are also properly modified when the exception +is thrown to correctly recover the execution context. This can be easily +achieved by pushing/popping the entire current control context onto the +exception stack. The three rules below modularly do precisely the above. +```k + syntax KItem ::= (Id,Stmt,K,Map,ControlCellFragment) + + syntax KItem ::= "popx" + + rule (try S1 catch(X) {S2} => S1 ~> popx) ~> K + + .List => ListItem((X, S2, K, Env, C)) ... + C + + Env + + rule popx => .K ... + ListItem(_) => .List ... + + rule throw V:Val; ~> _ => { var X = V; S2 } ~> K + + ListItem((X, S2, K, Env, C)) => .List ... + (_ => C) + + _ => Env +``` +The catch statement `S₂` needs to be executed in the original environment, +but where the thrown value `V` is bound to the catch variable `X`. We here +chose to rely on two previously defined constructs when giving semantics to +the catch part of the statement: (1) the variable declaration with +initialization, for binding `X` to `V`; and (2) the block construct for +preventing `X` from shadowing variables in the original environment upon the +completion of `S₂`. + +## Threads + +SIMPLE's threads can be created and terminated dynamically, and can +synchronize by acquiring and releasing re-entrant locks and by rendezvous. +We discuss the seven rules giving the semantics of these operations below. + +## Thread creation + +Threads can be created by any other threads using the `spawn S` +construct. The spawn expression construct evaluates to the unique identifier +of the newly created thread and, at the same time, a new thread cell is added +into the configuration, initialized with the `S` statement and sharing the +same environment with the parent thread. Note that the newly created +`thread` cell is torn. That means that the remaining cells are added +and initialized automatically as described in the definition of SIMPLE's +configuration. This is part of **K**'s configuration abstraction mechanism. +```k + rule ... + spawn S => !T:Int ... + Env + ... + (.Bag => ... + S + Env + !T + ...) +``` + +## Thread termination + +Dually to the above, when a thread terminates its assigned computation (the +contents of its `k` cell) is empty, so the thread can be dissolved. +However, since no discipline is imposed on how locks are acquired and released, +it can be the case that a terminating thread still holds locks. Those locks +must be released, so other threads attempting to acquire them do not deadlock. +We achieve that by removing all the locks held by the terminating thread in its +`holds` cell from the set of busy locks in the `busy` cell +(`keys(H)` returns the domain of the map `H` as a set, that is, only +the locks themselves ignoring their multiplicity). As seen below, a lock is +added to the `busy` cell as soon as it is acquired for the first time +by a thread. The unique identifier of the terminated thread is also collected +into the `terminated` cell, so the `join` construct knows which +threads have terminated. +```k + rule (... .K H T ... => .Bag) + Busy => Busy -Set keys(H) + ... .Set => SetItem(T) ... +``` + +## Thread joining + +Thread joining is now straightforward: all we need to do is to check whether +the identifier of the thread to be joined is in the `terminated` cell. +If yes, then the `join` statement dissolves and the joining thread +continues normally; if not, then the joining thread gets stuck. +```k + rule join T:Int; => .K ... + ... SetItem(T) ... +``` + +## Acquire lock + +There are two cases to distinguish when a thread attempts to acquire a lock +(in SIMPLE any value can be used as a lock): +(1) The thread does not currently have the lock, in which case it has to +take it provided that the lock is not already taken by another thread (see +the side condition of the first rule). +(2) The thread already has the lock, in which case it just increments its +counter for the lock (the locks are re-entrant). These two cases are captured +by the two rules below: +```k + rule acquire V:Val; => .K ... + ... .Map => V |-> 0 ... + Busy (.Set => SetItem(V)) + requires (notBool(V in Busy)) [group(acquire)] + + rule acquire V; => .K ... + ... V:Val |-> (N => N +Int 1) ... +``` + +## Release lock + +Similarly, there are two corresponding cases to distinguish when a thread +releases a lock: +(1) The thread holds the lock more than once, in which case all it needs to do +is to decrement the lock counter. +(2) The thread holds the lock only once, in which case it needs to remove it +from its `holds` cell and also from the the shared `busy` cell, +so other threads can acquire it if they need to. +```k + rule release V:Val; => .K ... + ... V |-> (N => N -Int 1) ... + requires N >Int 0 + + rule release V; => .K ... ... V:Val |-> 0 => .Map ... + ... SetItem(V) => .Set ... +``` + +## Rendezvous synchronization + +In addition to synchronization through acquire and release of locks, SIMPLE +also provides a construct for rendezvous synchronization. A thread whose next +statement to execute is `rendezvous(V)` gets stuck until another +thread reaches an identical statement; when that happens, the two threads +drop their rendezvous statements and continue their executions. If three +threads happen to have an identical rendezvous statement as their next +statement, then precisely two of them will synchronize and the other will +remain blocked until another thread reaches a similar rendezvous statement. +The rule below is as simple as it can be. Note, however, that, again, it is +**K**'s mechanism for configuration abstraction that makes it work as desired: +since the only cell which can multiply containing a `k` cell inside is +the `thread` cell, the only way to concretize the rule below to the +actual configuration of SIMPLE is to include each `k` cell in a +`thread` cell. +```k + rule rendezvous V:Val; => .K ... + rendezvous V; => .K ... [group(rendezvous)] +``` + +## Auxiliary declarations and operations + +In this section we define all the auxiliary constructs used in the +above semantics. + +## Making declarations + +The `mkDecls` auxiliary construct turns a list of identifiers +and a list of values in a sequence of corresponding variable +declarations. +```k + syntax Stmt ::= mkDecls(Ids,Vals) [function] + rule mkDecls((X:Id, Xs:Ids), (V:Val, Vs:Vals)) => var X=V; mkDecls(Xs,Vs) + rule mkDecls(.Ids,.Vals) => {} +``` + +## Location lookup + +The operation below is straightforward. Note that we place it in the same +`lookup` group as the variable lookup rule defined above. This way, +both rules will be considered transitions when we include the `lookup` +tag in the transition option of `kompile`. +```k + syntax Exp ::= lookup(Int) + rule lookup(L) => V ... ... L |-> V:Val ... [group(lookup)] +``` + +## Environment recovery + +We have already discussed the environment recovery auxiliary operation in the +IMP++ tutorial: +```k +// TODO: eliminate the env wrapper, like we did in IMP++ + + syntax KItem ::= setEnv(Map) + rule setEnv(Env) => .K ... _ => Env +``` +While theoretically sufficient, the basic definition for environment +recovery alone is suboptimal. Consider a loop `while (E)S`, +whose semantics (see above) was given by unrolling. `S` +is a block. Then the semantics of blocks above, together with the +unrolling semantics of the while loop, will yield a computation +structure in the `k` cell that increasingly grows, adding a new +environment recovery task right in front of the already existing sequence of +similar environment recovery tasks (this phenomenon is similar to the ``tail +recursion'' problem). Of course, when we have a sequence of environment +recovery tasks, we only need to keep the last one. The elegant rule below +does precisely that, thus avoiding the unnecessary computation explosion +problem: +```k + rule (setEnv(_) => .K) ~> setEnv(_) +``` +In fact, the above follows a common convention in **K** for recovery +operations of cell contents: the meaning of a computation task of the form +`cell(C)` that reaches the top of the computation is that the current +contents of cell `cell` is discarded and gets replaced with `C`. We +did not add support for these special computation tasks in our current +implementation of **K**, so we need to define them as above. + +## lvalue and loc + +For convenience in giving the semantics of constructs like the increment and +the assignment, that we want to operate the same way on variables and on +array elements, we used an auxiliary `lvalue(E)` construct which was +expected to evaluate to the lvalue of the expression `E`. This is only +defined when `E` has an lvalue, that is, when `E` is either a variable or +evaluates to an array element. `lvalue(E)` evaluates to a value of +the form `loc(L)`, where `L` is the location where the value of `E` +can be found; for clarity, we use `loc` to structurally distinguish +natural numbers from location values. In giving semantics to `lvalue` +there are two cases to consider. (1) If `E` is a variable, then all we need +to do is to grab its location from the environment. (2) If `E` is an array +element, then we first evaluate the array and its index in order to identify +the exact location of the element of concern, and then return that location; +the last rule below works because its preceding context declarations ensure +that the array and its index are evaluated, and then the rule for array lookup +(defined above) rewrites the evaluated array access construct to its +corresponding store lookup operation. +```k +// For parsing reasons, we prefer to allow lvalue to take a K + + syntax Exp ::= lvalue(K) + syntax Val ::= loc(Int) + +// Local variable + + rule lvalue(X:Id => loc(L)) ... ... X |-> L:Int ... + +// Array element: evaluate the array and its index; +// then the array lookup rule above applies. + + context lvalue(_::Exp[HOLE::Exps]) + context lvalue(HOLE::Exp[_::Exps]) + +// Finally, return the address of the desired object member + + rule lvalue(lookup(L:Int) => loc(L)) +``` + +## Initializing multiple locations + +The following operation initializes a sequence of locations with the same +value: +```k + syntax Map ::= Int "..." Int "|->" K [function] + rule N...M |-> _ => .Map requires N >Int M + rule N...M |-> K => N |-> K (N +Int 1)...M |-> K requires N <=Int M +``` +The semantics of SIMPLE is now complete. Make sure you kompile the +definition with the right options in order to generate the desired model. +No kompile options are needed if you only only want to execute the definition +(and thus get an interpreter), but if you want to search for a different +program behaviors then you need to kompile with the transition option +including rule groups such as lookup, increment, acquire, etc. See the +IMP++ tutorial for what the transition option means how to use it. +```k +endmodule +``` + +Go to [Lesson 2, SIMPLE typed static](../2_typed/1_static/simple-typed-static.md) diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple new file mode 100644 index 00000000000..1acb1a9d80a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple @@ -0,0 +1,19 @@ +// Program testing Collatz' conjecture up to a user-provided number. + +function collatz(n) { + var s=0; + print("Testing Collatz' conjecture for n = ",n," ... "); + while (n > 1) { + s = s+1; + if (n == (n/2)*2) { n = n/2; } + else { n = 3*n+1; } + } + print("Done! It took ",s," steps.\n"); +} + +function main() { + print("Testing Collatz' conjecture up to what number? "); + var m = read(); + for (var i=1; i<=m; ++i) { collatz(i); } + print("Done. It appears to hold.\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.in new file mode 100644 index 00000000000..7ed6ff82de6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.in @@ -0,0 +1 @@ +5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.out new file mode 100644 index 00000000000..36f5bb94345 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/collatz.simple.out @@ -0,0 +1,6 @@ +Testing Collatz' conjecture up to what number? Testing Collatz' conjecture for n = 1 ... Done! It took 0 steps. +Testing Collatz' conjecture for n = 2 ... Done! It took 1 steps. +Testing Collatz' conjecture for n = 3 ... Done! It took 7 steps. +Testing Collatz' conjecture for n = 4 ... Done! It took 2 steps. +Testing Collatz' conjecture for n = 5 ... Done! It took 5 steps. +Done. It appears to hold. diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple new file mode 100644 index 00000000000..69bb70ce725 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple @@ -0,0 +1,15 @@ +// Program manifesting several behaviors, including an undefined one. +// However, to make it generate all those behaviors, you need to add +// the "superheat" tag to the division and the "supercool" tag to the +// variable lookup and increment rules. + +function main() { + var x = 1 ; + print(++ x / (++ x / x),"\n"); +} + +// 0 +// 1 +// 2 +// 3 +// undefined (gets stuck with division-by-zero at top of computation) diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple.out new file mode 100644 index 00000000000..4de9334ab45 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/div-nondet.simple.out @@ -0,0 +1,17 @@ + { + S:String + #Equals + "1\n" + } +#Or + { + S:String + #Equals + "2\n" + } +#Or + { + S:String + #Equals + "3\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple new file mode 100644 index 00000000000..3ca915e8409 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple @@ -0,0 +1,15 @@ +// The following program calculates the factorial of a user-provided number. + +function factorial(y) { + print("Factorial of ", y, " is: "); + var t=1; + for(var i=1; i<=y; ++i) { + t = t*i; + } + return t; +} + +function main() { + print("Input a natural number: "); + print(factorial(read()),"\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.in new file mode 100644 index 00000000000..7ed6ff82de6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.in @@ -0,0 +1 @@ +5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.out new file mode 100644 index 00000000000..3755534a6a4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/factorial.simple.out @@ -0,0 +1 @@ +Input a natural number: Factorial of 5 is: 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple new file mode 100644 index 00000000000..f172974e120 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple @@ -0,0 +1,77 @@ +var x, a[10]; + +function incx() { + ++x; +} + +function zero() { + return 0; +} + +function id(x) { + return x; +} + +function double(x) { + return 2*x; +} + +function hoincx() { + return incx; +} + +function hozero() { + return zero; +} + +function hoid() { + return id; +} + +function hodouble() { + return double; +} + +function app0(f) { + f(); +} + +function app1(f) { + return f(); +} + +function app2(f,x) { + return f(x); +} + +function map(f,x) { + for (var i = 0; i <= sizeOf(x) - 1; ++i) { + x[i] = app2(f,x[i]); + } +} + +function printall() { + print("x = ",x, "; a[] = "); + for (var i = 0; i <= sizeOf(a) - 1; ++i) { + print(a[i], " "); + } + print("\n"); +} + +function main() { + x = 0; var i; + for (var i=0; i <= sizeOf(a) - 1; ++i) { + a[i]=i; + } + printall(); + hoincx()(); + print(x," ", hozero()()," ", hoid()(7)," ", hodouble()(7),"\n"); + id(hoincx())(); + print(x," ", id(hozero())()," ", + id(hoid())(7)," ", id(hodouble())(7),"\n"); + app0(id(hoincx())); + print(x," ", app1(id(hozero()))," ", + app2(id(hoid()),7)," ", app2(id(hodouble()),7),"\n"); + map(double,a); + printall(); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple.out new file mode 100644 index 00000000000..5cf2aefc9d7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/higher-order.simple.out @@ -0,0 +1,5 @@ +x = 0; a[] = 0 1 2 3 4 5 6 7 8 9 +1 0 7 14 +2 0 7 14 +3 0 7 14 +x = 3; a[] = 0 2 4 6 8 10 12 14 16 18 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple new file mode 100644 index 00000000000..9074c56a620 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple @@ -0,0 +1,57 @@ +// This program tests multi-dimensional arrays. + +function readArray(a) { + var m = sizeOf(a) - 1, n = sizeOf(a[0]) - 1; + for(var i=0; i<=m; ++i) { + print("Line ",i+1," (",n+1," elements): "); + for(var j=0; j<=n; ++j) { a[i][j] = read(); } + } +} + +function printArray(a) { + var m = sizeOf(a) - 1, n = sizeOf(a[0]) - 1; + for(var i=0; i<=m; ++i) { + print("Line ",i+1," (",n+1," elements):"); + for(var j=0; j<=n; ++j) { print(" ",a[i,j]); } + print("\n"); + } +} + +function transArray(a) { + var m = sizeOf(a) - 1, n = sizeOf(a[0]) - 1, b[n+1,m+1]; + for (var i=0; i<=m; ++i) { + for (var j=0; j<=n; ++j) { + b[j,i] = a[i,j]; + } + } + return b; +} + +function mulArray(a,b) { + var m = sizeOf(a) - 1, n = sizeOf(b) - 1, p = sizeOf(b[0]) - 1, c[m+1,p+1]; + for (var i=0; i<=m; ++i) { + for (var j=0; j<=p; ++j) { + c[i,j] = 0; + for (var k=0; k<=n; ++k) { + c[i,j] = c[i,j] + a[i,k] * b[k,j]; + } + } + } + return c; +} + +function main() { + print("Input the number of lines and columns (two natural numbers): "); + var x = read(), y = read(), a[x,y]; + readArray(a); + print("Your matrix is:\n"); + printArray(a); + print("The transpose of your matrix is:\n"); + printArray(transArray(a)); + print("You matrix multiplied with its transpose is:\n"); + printArray(mulArray(a,transArray(a))); + print("The transpose of your matrix multiplied with your matrix is:\n"); + printArray(mulArray(transArray(a),a)); +} + +// Should output what it says. diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.in new file mode 100644 index 00000000000..a025221804f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.in @@ -0,0 +1,4 @@ +2 4 1 +5 7 8 27 + +1 2 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.out new file mode 100644 index 00000000000..cfa7774db49 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/matrix.simple.out @@ -0,0 +1,16 @@ +Input the number of lines and columns (two natural numbers): Line 1 (4 elements): Line 2 (4 elements): Your matrix is: +Line 1 (4 elements): 1 5 7 8 +Line 2 (4 elements): 27 1 2 3 +The transpose of your matrix is: +Line 1 (2 elements): 1 27 +Line 2 (2 elements): 5 1 +Line 3 (2 elements): 7 2 +Line 4 (2 elements): 8 3 +You matrix multiplied with its transpose is: +Line 1 (2 elements): 139 70 +Line 2 (2 elements): 70 743 +The transpose of your matrix multiplied with your matrix is: +Line 1 (4 elements): 730 32 61 89 +Line 2 (4 elements): 32 26 37 43 +Line 3 (4 elements): 61 37 53 62 +Line 4 (4 elements): 89 43 62 73 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/nonterminating/dekker.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/nonterminating/dekker.simple new file mode 100644 index 00000000000..dfcd79d2e3d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/nonterminating/dekker.simple @@ -0,0 +1,31 @@ +// This is Dekker's algorithm for mutual exclusion. +// This program is not meant to be executed, it is meant to be model checked. + +var flag1=false, flag2=false, critical1=false, critical2=false, turn=1; + +function dekker1() { + flag1 = true; turn = 2; + while (flag2 && turn==2) { } + // Enter critical section + critical1 = true; + // Critical stuff ... + // Leave critical section + critical1 = false; + flag1 = false; +} + +function dekker2() { + flag2 = true; turn = 1; + while(flag1 && turn==1) { } + // Enter critical section + critical2 = true; + // Critical stuff ... + // Leave critical section + critical2 = false; + flag2 = false; +} + +function main() { + spawn { while(true) { dekker1(); } }; + spawn { while(true) { dekker2(); } }; +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple new file mode 100644 index 00000000000..cd27913971c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple @@ -0,0 +1,133 @@ +function init(n) { + var x[n]; + print("Type ",n," numbers: "); + for (var i = 0; i <= n - 1; ++i) { + x[i] = read(); + } + print("Finished reading the ",n," numbers\n"); + return x; +} + +function printArray(x) { + print("\n"); + for (var i = 0; i <= sizeOf(x) - 1; ++i) { + print(x[i]," "); + } + print("\n"); +} + +function reverse(x) { + var n = sizeOf(x); + for (var i = 0; i <= n/2 - 1; ++i) { + var t = x[i]; + x[i] = x[n - i - 1]; + x[n - i - 1] = t; + } +} + +function map(m,f,x) { + for (var i = 0; i <= sizeOf(f) - 1; ++i) { + print(m[i]); + f[i](x); + } +} + +function insertionSort(x) { + for (var i = 1; i <= sizeOf(x) - 1; ++i) { + var v = x[i], j = i - 1; + while (j > 0 && x[j] > v) { // doing the loop only up to 1 + x[j + 1] = x[j]; + j = j - 1; + } + if (x[0] > v) { + x[1] = x[0]; + x[0] = v; + } + else { + x[j+1] = v; + } + } +} + +function bubbleSort(v) { + var n = sizeOf(v); + for (var i = 0; i <= n - 1; ++i) { + for (var j = 0; j <= n - 2; ++j) { + if (v[j] > v[j+1]) { + var t = v[j+1]; + v[j+1] = v[j]; + v[j] = t; + } + } + } +} + +function siftDown(x, root, bottom) { + var done = false, maxChild; + while (root*2 <= bottom && !done) { + if (root*2 == bottom) { + maxChild = root*2; + } + else { + if (x[root*2] > x[root*2 + 1]) { + maxChild = root*2; + } + else { + maxChild = root*2 + 1; + } + } + if (x[root] < x[maxChild]) { + var t = x[root]; + x[root] = x[maxChild]; + x[maxChild] = t; + root = maxChild; + } + else { + done = true; + } + } +} + +function heapSort(x) { + var n = sizeOf(x), i = n/2 - 1; + while (i >= 0) { + siftDown(x, i, n - 1); + i = i - 1; + } + i = n - 1; + while (i >= 1 ) { + var t = x[0]; + x[0] = x[i] ; + x[i] = t; + siftDown(x, 0, i - 1); + i = i - 1; + } +} + +function main() { + print("Size of the array to sort = "); + var x = init(read()), m[11], f[11]; + m[ 0] = "The original unsorted array is:"; + f[ 0] = printArray; + m[ 1] = "Reversing the array ... "; + f[ 1] = reverse; + m[ 2] = "Done!\nThe reversed array is:"; + f[ 2] = printArray; + m[ 3] = "Sorting the array using insertion sort ... "; + f[ 3] = insertionSort; + m[ 4] = "Done!\nThe resulting array is:"; + f[ 4] = printArray; + m[ 5] = "Reversing the array ... "; + f[ 5] = reverse; + m[ 6] = "Done!\nSorting the array using bubble sort ... "; + f[ 6] = bubbleSort; + m[ 7] = "Done!\nThe resulting array is:"; + f[ 7] = printArray; + m[ 8] = "Reversing the array ... "; + f[ 8] = reverse; + m[ 9] = "Done!\nSorting the array using heap sort ... "; + f[ 9] = heapSort; + m[10] = "Done!\nThe resulting array is:"; + f[10] = printArray; + map(m,f,x); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.in new file mode 100644 index 00000000000..affeff1b77d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.in @@ -0,0 +1 @@ +5 71 23 43 23 91 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.out new file mode 100644 index 00000000000..33d6eab60b1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/diverse/sortings.simple.out @@ -0,0 +1,17 @@ +Size of the array to sort = Type 5 numbers: Finished reading the 5 numbers +The original unsorted array is: +71 23 43 23 91 +Reversing the array ... Done! +The reversed array is: +91 23 43 23 71 +Sorting the array using insertion sort ... Done! +The resulting array is: +23 23 43 71 91 +Reversing the array ... Done! +Sorting the array using bubble sort ... Done! +The resulting array is: +23 23 43 71 91 +Reversing the array ... Done! +Sorting the array using heap sort ... Done! +The resulting array is: +23 23 43 71 91 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple new file mode 100644 index 00000000000..286310542ef --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple @@ -0,0 +1,16 @@ +function main() { + var e = 100; + try { + var x = 5; + if (x >= 0) { + throw x+2; + } + print(20); // should not be printed + } catch(e) { + print(e," "); // should print 7 + } + print(e," "); // should print 100 + print(10,"\n"); +} + +// 7 100 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple.out new file mode 100644 index 00000000000..7b132801145 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_01.simple.out @@ -0,0 +1 @@ +7 100 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple new file mode 100644 index 00000000000..7db057348c8 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple @@ -0,0 +1,20 @@ +function main() { + try { + foo(); + } + catch(e) { + print(e,"\n"); // should print 7 + } +} + +function foo() { + try { + throw 5; + print(17); // should not be printed + } catch(e) { + throw e + 2; // throws 7 + } + throw 1; // should not be reached +} + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple.out new file mode 100644 index 00000000000..7f8f011eb73 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_02.simple.out @@ -0,0 +1 @@ +7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple new file mode 100644 index 00000000000..48afe1c2142 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple @@ -0,0 +1,8 @@ +function main() { + var x = 1; + try { x = x + 1; throw x; x = x/0;} // division by zero unreachable + catch(y) {x = y+1;} + print(x,"\n"); +} + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_03.simple.out @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple new file mode 100644 index 00000000000..7a61fb7ab1e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple @@ -0,0 +1,8 @@ +function main() { + var x = 1; + try { var x = 5; throw x; var y = x/0;} // division by zero unreachable + catch(y) {y = y + 2; print(y," ");} // new y here, the one declared by catch + print(x,"\n"); +} + +// 7 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple.out new file mode 100644 index 00000000000..ddcbc88bbd9 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_04.simple.out @@ -0,0 +1 @@ +7 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple new file mode 100644 index 00000000000..cfc04f1988f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple @@ -0,0 +1,23 @@ +var x; + +function f(y) { + var t = 1; + try{ + print(t," "); + throw 5; + print(8); // not reachable + } catch(p) { + print(p+10," "); + } + for (var i = 1; i <= y; ++i) { + t = t*i; + } + return t; +} + +function main() { + x = 5; + print(f(x),"\n"); +} + +// 1 15 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple.out new file mode 100644 index 00000000000..fbf9c69a420 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_05.simple.out @@ -0,0 +1 @@ +1 15 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple new file mode 100644 index 00000000000..a9c638d522a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple @@ -0,0 +1,22 @@ +var x; + +function f(y) { + var t = 1; + try { + print(t," "); + print(8," "); + } catch(p) { + print(p+10); // not reachable + } + for (var i = 1; i <= y; ++i) { + t = t*i; + } + return t; +} + +function main() { + x = 5; + print(f(x),"\n"); +} + +// 1 8 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple.out new file mode 100644 index 00000000000..c870614bb54 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_06.simple.out @@ -0,0 +1 @@ +1 8 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple new file mode 100644 index 00000000000..525e6624878 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple @@ -0,0 +1,13 @@ +function main() { + var e; + try { + var x = 2; + print(x," "); + throw ++x + x; + } + catch(e) { + print(e,"\n"); + } +} + +// 2 6 or 2 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple.out new file mode 100644 index 00000000000..dc9481f15aa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_07.simple.out @@ -0,0 +1,11 @@ + { + S:String + #Equals + "2 5\n" + } +#Or + { + S:String + #Equals + "2 6\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple new file mode 100644 index 00000000000..fffe4e19933 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple @@ -0,0 +1,27 @@ +function main() { + var e; + try { + try { + try { + try { + var x = 1; + print(x," "); + throw ++x; + } catch(e) { + print(e," "); + throw ++e; + } + } catch(e) { + print(e," "); + throw ++e; + } + } catch(e) { + print(e," "); + throw ++e; + } + } catch(e) { + print(e,"\n"); + } +} + +// 1 2 3 4 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple.out new file mode 100644 index 00000000000..aacb59525ae --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_08.simple.out @@ -0,0 +1 @@ +1 2 3 4 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple new file mode 100644 index 00000000000..a8cf116fd9b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple @@ -0,0 +1,24 @@ +var x, y, z; + +function g() { + throw 15; +} + +function f() { + g(); +} + +function main() { + x = 5; + y = 10; + + try { + f(); + } catch(y) { + print(y," "); + } + print(x," "); + print(y,"\n"); +} + +// 15 5 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple.out new file mode 100644 index 00000000000..122f99335df --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_09.simple.out @@ -0,0 +1 @@ +15 5 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple new file mode 100644 index 00000000000..9ea38f082a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple @@ -0,0 +1,13 @@ +var x; + +function main() { + x = 5; + try { + throw 3; + print(x); // should not print this + } catch(y) { + print(y,"\n"); // should print this + } +} + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_10.simple.out @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple new file mode 100644 index 00000000000..00231715c3c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple @@ -0,0 +1,20 @@ +var i, j; + +function main() { + i = 0; + while (++i <= 3) { + print(i," "); + } + try { + throw j=1; + i = 10; + print(i); // should not print this + } catch(j) { + i = 20; + print(i," "); // should print this + } + i = 15; + print(i,"\n"); +} + +// 1 2 3 20 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple.out new file mode 100644 index 00000000000..9c355295cd4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_11.simple.out @@ -0,0 +1 @@ +1 2 3 20 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple new file mode 100644 index 00000000000..0b7e2a3130f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple @@ -0,0 +1,19 @@ +var i, j; + +function main() { + i = 0; + while (++i <= 3) { + print(i," "); + } + try { + i = 10; + print(i," "); + } catch(j) { + i = 20; + print(i); // should not print this + } + i = 15; + print(i,"\n"); +} + +// 1 2 3 10 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple.out new file mode 100644 index 00000000000..6c235065269 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_12.simple.out @@ -0,0 +1 @@ +1 2 3 10 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple new file mode 100644 index 00000000000..8cb5312f439 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple @@ -0,0 +1,10 @@ +function main() { + try { + throw 4; + } catch (e) { + print(e," "); + } + print(42,"\n"); +} + +// 4 42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple.out new file mode 100644 index 00000000000..2efb20f3379 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_13.simple.out @@ -0,0 +1 @@ +4 42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple new file mode 100644 index 00000000000..cc9af929c9f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple @@ -0,0 +1,10 @@ +function main() { + try { + 15; + } catch(e) { + print(e); // should not print this + } + print(42,"\n"); +} + +// 42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple.out new file mode 100644 index 00000000000..d81cc0710eb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_14.simple.out @@ -0,0 +1 @@ +42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple new file mode 100644 index 00000000000..bc3d09beb0d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple @@ -0,0 +1,15 @@ +function main() { + try { + 1; + try { + 2; + } catch(a) { + print(2); // should not print this + } + throw 1; + } catch(b) { + print(1,"\n"); // should print this + } +} + +// 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/exceptions/exceptions_15.simple.out @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple new file mode 100644 index 00000000000..37784f02796 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple @@ -0,0 +1,10 @@ +// Simple multithreaded program with two behaviors. + +function main() { + var x = 5; + spawn { x = 7; }; + print(x,"\n"); +} + +// 5 +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple.out new file mode 100644 index 00000000000..5cf1e3bfbf0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_01.simple.out @@ -0,0 +1,11 @@ + { + S:String + #Equals + "5\n" + } +#Or + { + S:String + #Equals + "7\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple new file mode 100644 index 00000000000..ec0ac2ae68e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple @@ -0,0 +1,14 @@ +// Simple multithreaded program with two output behaviors +// but with three overall behaviors + +function main() { + var x; + spawn { x = 7; }; + x = 5; + print(x,"\n"); +} + +// 5 +// 5 (yes, it admits two behaviors where the output is 5, one in which the +// store ends up with value 5 and another with value 7 at the location of x) +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple.out new file mode 100644 index 00000000000..5cf1e3bfbf0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_02.simple.out @@ -0,0 +1,11 @@ + { + S:String + #Equals + "5\n" + } +#Or + { + S:String + #Equals + "7\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple new file mode 100644 index 00000000000..a821db514bb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple @@ -0,0 +1,15 @@ +// Normally, one would think that the program below has only two behaviors. +// However, it has four, due to the race on the output buffer. + +function main() { + spawn { + var x = 2; + print(x," "); + }; + spawn { + var x = 3; + print(x," "); + }; +} + +// 4 solutions, namely all interleavings of "2_" and "3_", where "_" is space diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple.out new file mode 100644 index 00000000000..84487b38466 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_04.simple.out @@ -0,0 +1,23 @@ + { + S:String + #Equals + "2 3 " + } +#Or + { + S:String + #Equals + "3 2 " + } +#Or + { + S:String + #Equals + "23 " + } +#Or + { + S:String + #Equals + "32 " + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple new file mode 100644 index 00000000000..8ef0ac36460 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple @@ -0,0 +1,13 @@ +// Program which has infinitely many bahaviors. + +var x, y; + +function main() { + x = 1; + y = 0; + spawn { x = 0; }; + while (1 <= x) { + y = y+1; + } + print(y,"\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple.out new file mode 100644 index 00000000000..46862f7b28d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_05.simple.out @@ -0,0 +1,199 @@ + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 0 + 2 |-> lambda ( .Bottoms , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Bottoms ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( -1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "0\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 1 + 2 |-> lambda ( .Bottoms , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Bottoms ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( -1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "1\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 2 + 2 |-> lambda ( .Bottoms , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Bottoms ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( -1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "2\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 3 + 2 |-> lambda ( .Bottoms , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Bottoms ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( -1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "3\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 4 + 2 |-> lambda ( .Bottoms , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Bottoms ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( -1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "4\n" ~> .K ) ) + + + 3 + + + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple new file mode 100644 index 00000000000..b06d874697a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple @@ -0,0 +1,10 @@ +function main() { + var x; + print("x = "); + x=read(); + var t1 = spawn {x=x/2;}; + var t2 = spawn {x=x+10;}; + join(t1); // comment out for more behaviors + join(t2); // comment out for more behaviors + print(x,"\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.in new file mode 100644 index 00000000000..f599e28b8ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.in @@ -0,0 +1 @@ +10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.out new file mode 100644 index 00000000000..d9a4dfed140 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_06.simple.out @@ -0,0 +1,23 @@ + { + S:String + #Equals + "x = 5\n" + } +#Or + { + S:String + #Equals + "x = 10\n" + } +#Or + { + S:String + #Equals + "x = 15\n" + } +#Or + { + S:String + #Equals + "x = 20\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple new file mode 100644 index 00000000000..2963a17410e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple @@ -0,0 +1,13 @@ +// Fully synchronized + +function main() { + var x; + print("x = "); + x=read(); + var t1 = spawn {x=x/2;}; + var t2 = spawn {join(t1); x=x+10;}; + join(t2); + print(x,"\n"); +} + +// 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.in new file mode 100644 index 00000000000..f599e28b8ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.in @@ -0,0 +1 @@ +10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.out new file mode 100644 index 00000000000..7d95b26c089 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_07.simple.out @@ -0,0 +1 @@ +x = 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple new file mode 100644 index 00000000000..00e78e89792 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple @@ -0,0 +1,15 @@ +// Poorly synchronized program which has two behaviors. + +function main() { + var x = 1; + spawn { + x=x+1; + rendezvous 1; + }; + x=x+1; + rendezvous 1; + print(x,"\n"); +} + +// 2 +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple.out new file mode 100644 index 00000000000..7c95a880074 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_09.simple.out @@ -0,0 +1,11 @@ + { + S:String + #Equals + "2\n" + } +#Or + { + S:String + #Equals + "3\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple new file mode 100644 index 00000000000..db879a35bfc --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple @@ -0,0 +1,18 @@ +// Well-synchronized program which has only one behavior. + +function main() { + var x = 1; + spawn { + acquire 1; + x=x+1; + release 1; + rendezvous 1; + }; + acquire 1; + x=x+1; + release 1; + rendezvous 1; + print(x,"\n"); +} + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_10.simple.out @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple new file mode 100644 index 00000000000..39bcd8809ec --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple @@ -0,0 +1,22 @@ +// This is a well-synchronized program, which has only one behavior. + +function main() { + var x = 1; + spawn { + rendezvous 1; + print(x," "); + rendezvous 2; + }; + spawn { + rendezvous 3; + print(x,"\n"); + rendezvous 4; + }; + print(x," "); + x = x+1; + rendezvous 1; rendezvous 2; + x = x+1; + rendezvous 3; rendezvous 4; +} + +// 1 2 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple.out new file mode 100644 index 00000000000..b85905ec0b9 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_11.simple.out @@ -0,0 +1 @@ +1 2 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple new file mode 100644 index 00000000000..fb586e471fa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple @@ -0,0 +1,46 @@ +// This program shows an interesting situation which can happen in many +// language designs: something which looks correct is actually wrong: + +var x; + +function main() { + var n = 5; + x = 1; + for (var i = 1; i <= n; ++i) { + var t=i; + spawn { + multX(t); + }; + } + for (var i=1; i<=n; ++i) { + rendezvous i; + } + print(x,"\n"); +} + +function multX(v) { + acquire 0; + x = x*v; + release 0; + rendezvous v; +} + +// 120, but also many many other behaviors ... + +// The problem is that "spawn multX(i);" does not evaluate the "i" argument, +// it only spawns a thread calculating the expression statement "multX(i);". +// It can be possible that the loop counter "i" is incremented right after the +// spawning but before the evaluation of the expression "multX(i)". In fact, +// it can be the case that all the spawned "multX(i);" statements will evaluate +// their "multX(i)" function calls after the main loop terminates. The threads +// will still see the "i" counter in their environments, but that will hold +// the value 6. Thus, in this case, all threads compute "multX(6)"! You can +// see all these "unexpected" behaviors if you use the search option in krun. +// (please make n smaller, e.g. 2, because theare are LOTS of behaviors here!) +// +// To fix this problem , replace loop "for(i=1;i<=n;++i) {spawn {multX(i);};}" +// with "for(i=1;i<=n;++i) {var t=i; spawn {multX(t);};}". Now, each thread +// sees its own local "t", which has the right value and does not change. +// Now the search option in krun only shows you solutions which output the +// correct factorial. (like before, please make n smaller (2?) when running +// the search option in krun, because theare are LOTS of behaviors here!) diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple.out new file mode 100644 index 00000000000..52bd8e43afb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/1_untyped/tests/threads/threads_12.simple.out @@ -0,0 +1 @@ +120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/Makefile b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/Makefile new file mode 100644 index 00000000000..3b2c8fda3c8 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/Makefile @@ -0,0 +1,8 @@ +DEF=simple-typed-static +EXT=simple +TESTDIR?=../programs/* +RESULTDIR=tests +KOMPILE_FLAGS=--enable-search +KRUN_FLAGS=--pattern " .Bag " --smt none + +include ../../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/simple-typed-static.md b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/simple-typed-static.md new file mode 100644 index 00000000000..0311f68db0d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/simple-typed-static.md @@ -0,0 +1,658 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +# SIMPLE — Typed — Static + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +Author: Traian Florin Șerbănuță (traian.serbanuta@unibuc.ro) +Organization: University of Bucharest + +## Abstract + +This is the **K** definition of the static semantics of the typed SIMPLE +language, or in other words, a type system for the typed SIMPLE +language in **K**. We do not re-discuss the various features of the +SIMPLE language here. The reader is referred to the untyped version of +the language for such discussions. We here only focus on the new and +interesting problems raised by the addition of type declarations, and +what it takes to devise a type system/checker for the language. + +When designing a type system for a language, no matter in what +paradigm, we have to decide upon the intended typing policy. Note +that we can have multiple type systems for the same language, one for +each typing policy. For example, should we accept programs which +don't have a main function? Or should we allow functions that do not +return explicitly? Or should we allow functions whose type expects +them to return a value (say an `int`) to use a plain +`return;` statement, which returns no value, like in C? +And so on and so forth. Typically, there are two opposite tensions +when designing a type system. On the one hand, you want your type +system to be as permissive as possible, that is, to accept as many +programs that do not get stuck when executed with the untyped +semantics as possible; this will keep the programmers using your +language happy. On the other hand, you want your type system to have +a reasonable performance when implemented; this will keep both the +programmers and the implementers of your language happy. For example, +a type system for rejecting programs that could perform +division-by-zero is not expected to be feasible in general. A simple +guideline when designing typing policies is to imagine how the +semantics of the untyped language may get stuck and try to prevent +those situations from happening. + +Before we give the **K** type system of SIMPLE formally, we discuss, +informally, the intended typing policy: + +* Each program should contain a `main()` function. Indeed, + the untyped SIMPLE semantics will get stuck on any program which does + not have a `main` function. + +* Each primitive value has its own type, which can be `int` + `bool`, or `string`. There is also a type `void` + for nonexistent values, for example for the result of a function meant + to return no value (but only be used for its side effects, like a + procedure). + +* The syntax of untyped SIMPLE is extended to allow type + declarations for all the variables, including array variables. This is + done in a C/Java-style. For example, `int x;` or + `int x=7, y=x+3;`, or `int[][][] a[10,20];` + (the latter defines a `10 × 20` matrix of arrays of integers). + Recall from untyped SIMPLE that, unlike in C/Java, our multi-dimensional + arrays use comma-separated arguments, although they have the array-of-array + semantics. + +* Functions are also typed in a C/Java style. However, since in SIMPLE + we allow functions to be passed to and returned by other functions, we also + need function types. We will use the conventional higher-order arrow-notation + for function types, but will separate the argument types with commas. For + example, a function returning an array of `bool` elements and + taking as argument an array `x` of two-integer-argument functions + returning an integer, is declared using a syntax of the form + `bool[] f(((int,int)->int)[] x) { ... }` + and has the type `((int,int)->int)[] -> bool[]`. + +* We allow any variable declarations at the top level. Functions + can only be declared at the top level. Each function can only access the + other functions and variables declared at the top level, or its own locally + declared variables. SIMPLE has static scoping. + +* The various expression and statement constructs take only elements of + the expected types. + +* Increment and assignment can operate both on variables and on array + elements. For example, if `f` has type `int->int[][]` and + function `g` has the type `int->int`, then the + increment expression `++f(7)[g(2),g(3)]` is valid. + +* Functions should only return values of their declared result + type. To give the programmers more flexibility, we allow functions to + use `return;` statements to terminate without returning an + actual value, or to not explicitly use any return statement, + regardless of their declared return type. This flexibility can be + handy when writing programs using certain functions only for their + side effects. Nevertheless, as the dynamic semantics shows, a return + value is automatically generated when an explicit `return` + statement is not encountered. + +* For simplicity, we here limit exceptions to only throw and catch + integer values. We let it as an exercise to the reader to extend the + semantics to allow throwing and catching arbitrary-type exceptions. + Like in programming languages like Java, one can go even further and + define a semantics where thrown exceptions are propagated through + try-catch statements until one of the corresponding type is found. + We will do this when we define the KOOL language, not here. + To keep the definition if SIMPLE simple, here we do not attempt to + reject programs which throw uncaught exceptions. + +Like in untyped SIMPLE, some constructs can be desugared into a +smaller set of basic constructs. In general, it should be clear why a +program does not type by looking at the top of the `k` cells in +its stuck configuration. + +```k +module SIMPLE-TYPED-STATIC-SYNTAX + imports DOMAINS-SYNTAX +``` + +## Syntax + +The syntax of typed SIMPLE extends that of untyped SIMPLE with support +for declaring types to variables and functions. +```k + syntax Id ::= "main" [token] +``` + +## Types + +Primitive, array and function types, as well as lists (or tuples) of types. +The lists of types are useful for function arguments. +```k + syntax Type ::= "void" | "int" | "bool" | "string" + | Type "[" "]" + | "(" Type ")" [bracket] + > Types "->" Type + + syntax Types ::= List{Type,","} [overload(exps)] +``` + +## Declarations + +Variable and function declarations have the expected syntax. For variables, +we basically just replaced the `var` keyword of untyped SIMPLE with a +type. For functions, besides replacing the `function` keyword with a +type, we also introduce a new syntactic category for typed variables, +`Param`, and lists over it. +```k + syntax Param ::= Type Id + syntax Params ::= List{Param,","} + + syntax Stmt ::= Type Exps ";" + | Type Id "(" Params ")" Block +``` + +## Expressions + +The syntax of expressions is identical to that in untyped SIMPLE, +except for the logical conjunction and disjunction which have +different strictness attributes, because they now have different +evaluation strategies. +```k + syntax Exp ::= Int | Bool | String | Id + | "(" Exp ")" [bracket] + | "++" Exp + > Exp "[" Exps "]" [strict] + > Exp "(" Exps ")" [strict] + | "-" Exp [strict] + | "sizeOf" "(" Exp ")" [strict] + | "read" "(" ")" + > left: + Exp "*" Exp [strict, left] + | Exp "/" Exp [strict, left] + | Exp "%" Exp [strict, left] + > left: + Exp "+" Exp [strict, left] + | Exp "-" Exp [strict, left] + > non-assoc: + Exp "<" Exp [strict, non-assoc] + | Exp "<=" Exp [strict, non-assoc] + | Exp ">" Exp [strict, non-assoc] + | Exp ">=" Exp [strict, non-assoc] + | Exp "==" Exp [strict, non-assoc] + | Exp "!=" Exp [strict, non-assoc] + > "!" Exp [strict] + > left: + Exp "&&" Exp [strict, left] + | Exp "||" Exp [strict, left] + > "spawn" Block + > Exp "=" Exp [strict(2), right] +``` +Note that `spawn` has not been declared strict. This may +seem unexpected, because the child thread shares the same environment +with the parent thread, so from a typing perspective the spawned +statement makes the same sense in a child thread as it makes in the +parent thread. The reason for not declaring it strict is because we +want to disallow programs where the spawned thread calls the +`return` statement, because those programs would get stuck in +the dynamic semantics. The type semantics of spawn below will reject +such programs. + +We still need lists of expressions, defined below, but note that we do +not need lists of identifiers anymore. They have been replaced by the lists +of parameters. +```k + syntax Exps ::= List{Exp,","} [strict, overload(exps)] +``` + +## Statements + +The statements have the same syntax as in untyped SIMPLE, except for +the exceptions, which now type their parameter. Note that, unlike in untyped +SIMPLE, all statement constructs which have arguments and are not desugared +are strict, including the conditional and the `while`. Indeed, from a +typing perspective, they are all strict: first type their arguments and then +type the actual construct. +```k + syntax Block ::= "{" "}" + | "{" Stmt "}" + + syntax Stmt ::= Block + | Exp ";" [strict] + | "if" "(" Exp ")" Block "else" Block [avoid, strict] + | "if" "(" Exp ")" Block [macro] + | "while" "(" Exp ")" Block [strict] + | "for" "(" Stmt Exp ";" Exp ")" Block [macro] + | "return" Exp ";" [strict] + | "return" ";" + | "print" "(" Exps ")" ";" [strict] + | "try" Block "catch" "(" Param ")" Block [strict(1)] + | "throw" Exp ";" [strict] + | "join" Exp ";" [strict] + | "acquire" Exp ";" [strict] + | "release" Exp ";" [strict] + | "rendezvous" Exp ";" [strict] +``` +Note that the sequential composition is now sequentially strict, +because, unlike in the dynamic semantics where statements dissolved, +they now reduce to the `stmt` type, which is a result. +```k + syntax Stmt ::= Stmt Stmt [seqstrict, right] +``` +## Desugaring macros + +We use the same desugaring macros like in untyped SIMPLE, but, of +course, including the types of the involved variables. +```k + rule if (E) S => if (E) S else {} + rule for(Start Cond; Step) {S:Stmt} => {Start while(Cond){S Step;}} + rule for(Start Cond; Step) {} => {Start while(Cond){Step;}} + rule T:Type E1:Exp, E2:Exp, Es:Exps; => T E1; T E2, Es; [anywhere] + rule T:Type X:Id = E; => T X; X = E; [anywhere] + +endmodule + + +module SIMPLE-TYPED-STATIC + imports SIMPLE-TYPED-STATIC-SYNTAX + imports DOMAINS +``` + +## Static semantics + +Here we define the type system of SIMPLE. Like concrete semantics, +type systems defined in **K** are also executable. However, **K** type +systems turn into type checkers instead of interpreters when executed. + +The typing process is done in two (overlapping) phases. In the first +phase the global environment is built, which contains type bindings +for all the globally declared variables and functions. For functions, +the declared types will be ``trusted'' during the first phase and +simply bound to their corresponding function names and placed in the +global type environment. At the same time, type-checking tasks that +the function bodies indeed respect their claimed types are generated. +All these tasks are (concurrently) verified during the second phase. +This way, all the global variable and function declarations are +available in the global type environment and can be used in order to +type-check each function code. This is consistent with the semantics +of untyped SIMPLE, where functions can access all the global variables +and can call any other function declared in the same program. The +two phases may overlap because of the **K** concurrent semantics. For +example, a function task can be started while the first phase is still +running; moreover, it may even complete before the first phase does, +namely when all the global variables and functions that it needs have +already been processed and made available in the global environment by +the first phase task. + +## Extended syntax and results + +The idea is to start with a configuration holding the program to type +in one of its cells, then apply rewrite rules on it mixing types and +language syntax, and eventually obtain a type instead of the original +program. In other words, the program reduces to its type using +the **K** rules giving the type system of the language. In doing so, +additional typing tasks for function bodies are generated and solved +the same way. If this rewriting process gets stuck, then we say that +the program is not well-typed. Otherwise the program is well-typed +(by definition). We did not need types for statements and for blocks +as part of the typed SIMPLE syntax, because programmers are not allowed +to use such types explicitly. However, we are going to need them in the +type system, because blocks and statements reduce to them. + +We start by allowing types to be used inside expressions and statements in +our language. This way, types can be used together with language syntax in +subsequent **K** rules without any parsing errors. Like in the type system of +IMP++ in the **K** tutorial, we prefer to group the block and statement types +under one syntactic sub-category of types, because this allows us to more +compactly state that certain terms can be either blocks or statements. Also, +since programs and fragments of program will reduce to their types, in order +for the strictness and context declarations to be executable we state that +types are results (same like we did in the IMP++ tutorial). +```k + syntax Exp ::= Type + syntax Exps ::= Types + syntax BlockOrStmtType ::= "block" | "stmt" + syntax Type ::= BlockOrStmtType + syntax Block ::= BlockOrStmtType + syntax KResult ::= Type + | Types //TODO: remove this, eventually +``` + +## Configuration + +The configuration of our type system consists of a `tasks` cell +holding various typing `task` cells, and a global type environment. +Each task includes a `k` cell holding the code to type, a `tenv` +cell holding the local type environment, and a `return` cell holding +the return type of the currently checked function. The latter is needed in +order to check whether return statements return values of the expected type. +Initially, the program is placed in a `k` cell inside a +`task` cell. Since the cells with multiplicity `?` are not +included in the initial configuration, the `task` cell holding +the original program in its `k` cell will contain no other +subcells. +```k + configuration + + + $PGM:Stmt + .Map + void + + +//
+ .Map +
+``` + +## Variable declarations + +Variable declarations type as statements, that is, they reduce to the +type `stmt`. There are only two cases that need to be +considered: when a simple variable is declared and when an array +variable is declared. The macros at the end of the syntax module +above take care of reducing other variable declarations, including +ones where the declared variables are initialized, to only these two +cases. The first case has two subcases: when the variable declaration +is global (i.e., the `task` cell contains only the `k` +cell), in which case it is added to the global type environment +checking at the same time that the variable has not been already +declared; and when the variable declaration is local (i.e., a +`tenv` cell is available), in which case it is simply added to +the local type environment, possibly shadowing previous homonymous +variables. The third case reduces to the second, incrementally moving +the array dimension into the type until the array becomes a simple +variable. +```k + rule T:Type X:Id; => stmt ... + Rho (.Map => X |-> T) + requires notBool(X in keys(Rho)) + rule T:Type X:Id; => stmt ... Rho => Rho[X <- T] + + context _:Type _::Exp[HOLE::Exps]; +// The rule below may need to sort E to Exp in the future, if the +// parser gets stricter; without that information, it may not be able +// to complete the LHS into T E[int,Ts],.Exps; (and similarly for the RHS) + rule T:Type E:Exp[int,Ts:Types]; => T[] E[Ts]; +// I want to write the rule below as _:Type (E:Exp[.Types] => E), +// but the list completion seems to not work well with that. + rule T:Type E:Exp[.Types]; => T E; +``` + +## Function declarations + +Functions are allowed to be declared only at the top level (the +`task` cell holds only its `k` subcell). Each function +declaration reduces to a variable declaration (a binding of its name +to its declared function type), but also adds a task into the +`tasks` cell. The task consists of a typing of the statement +declaring all the function parameters followed by the function body, +together with the expected return type of the function. The +`getTypes` and `mkDecls` functions, defined at the end of +the file in the section on auxiliary operations, extracts the list of +types and makes a sequence of variable declarations from a list of +function parameters, respectively. Note that, although in the dynamic +semantics we include a terminating `return` statement at the +end of the function body to eliminate from the analysis the case when +the function does not provide an explicit return, we do not need to +include such a similar `return` statement here. That's because +the `return` statements type to `stmt` anyway, and the +entire code of the function body needs to type anyway. +```k + rule T:Type F:Id(Ps:Params) S => getTypes(Ps)->T F; ... + (.Bag => + mkDecls(Ps) S .Map T + ) +``` + +## Checking if `main()` exists} + +Once the entire program is processed (generating appropriate tasks +to type check its function bodies), we can dissolve the main +`task` cell (the one holding only a `k` subcell). Since +we want to enforce that programs include a main function, we also +generate a function task executing `main()` to ensure that it +types (remove this task creation if you do not want your type system +to reject programs without a `main` function). +```k + rule stmt => main(.Exps); (.Bag => .Map ) +``` + +## Collecting the terminated tasks + +Similarly, once a non-main task (i.e., one which contains a +`tenv` subcells) is completed using the subsequent rules (i.e., +its `k` cell holds only the `block` or `stmt` +type), we can dissolve its corresponding cell. Note that it is +important to ensure that we only dissolve tasks containing a +`tenv` cell with the rule below, because the main task should +`not` dissolve this way! It should do what the above rule says. +In the end, there should be no task cell left in the configuration +when the program correctly type checks. +```k + rule ... _:BlockOrStmtType _ ... => .Bag +``` + +## Basic values + +The first three rewrite rules below reduce the primitive values to +their types, as we typically do when we define type systems in **K**. +```k + rule _:Int => int + rule _:Bool => bool + rule _:String => string +``` + +## Variable lookup + +There are three cases to distinguish for variable lookup: (1) if the +variable is bound in the local type environment, then look its type up +there; (2) if a local environment exists and the variable is not bound +in it, then look its type up in the global environment; (3) finally, +if there is no local environment, meaning that we are executing the +top-level pass, then look the variable's type up in the global +environment, too. +```k + rule X:Id => T ... ... X |-> T ... + + rule X:Id => T ... Rho ... X |-> T ... + requires notBool(X in keys(Rho)) + + rule X:Id => T ... ... X |-> T ... +``` + +## Increment + +We want the increment operation to apply to any lvalue, including +array elements, not only to variables. For that reason, we define a +special context extracting the type of the argument of the increment +operation only if that argument is an lvalue. Otherwise the rewriting +process gets stuck. The operation `ltype` is defined at the +end of this file, in the auxiliary operation section. It essentially +acts as a filter, getting stuck if its argument is not an lvalue and +letting it reduce otherwise. The type of the lvalue is expected to be +an integer in order to be allowed to be incremented, as seen in the +rule `++ int => int` below. +```k + context ++(HOLE => ltype(HOLE)) + rule ++ int => int +``` + +## Common expression constructs + +The rules below are straightforward and self-explanatory: +```k + rule int + int => int + rule string + string => string + rule int - int => int + rule int * int => int + rule int / int => int + rule int % int => int + rule - int => int + rule int < int => bool + rule int <= int => bool + rule int > int => bool + rule int >= int => bool + rule T:Type == T => bool + rule T:Type != T => bool + rule bool && bool => bool + rule bool || bool => bool + rule ! bool => bool +``` + +## Array access and size + +Array access requires each index to type to an integer, and the +array type to be at least as deep as the number of indexes: +```k +// NOTE: +// We used to need parentheses in the RHS, to avoid capturing Ts as an attribute +// Let's hope that is not a problem anymore. + + rule (T[])[int, Ts:Types] => T[Ts] + rule T:Type[.Types] => T +``` +`sizeOf` only needs to check that its argument is an array: +```k + rule sizeOf(_T[]) => int +``` + +## Input/Output + +The read expression construct types to an integer, while print types +to a statement provided that all its arguments type to integers or +strings. +```k + rule read() => int + + rule print(T:Type, Ts => Ts); requires T ==K int orBool T ==K string + rule print(.Types); => stmt +``` + +## Assignment + +The special context and the rule for assignment below are similar +to those for increment: the LHS of the assignment must be an lvalue +and, in that case, it must have the same type as the RHS, which then +becomes the type of the assignment. +```k + context (HOLE => ltype(HOLE)) = _ + rule T:Type = T => T +``` + +## Function application and return + +Function application requires the type of the function and the +types of the passed values to be compatible. Note that a special case +is needed to handle the no-argument case: +```k + rule (Ts:Types -> T)(Ts) => T requires Ts =/=K .Types + rule (void -> T)(.Types) => T +``` +The returned value must have the same type as the declared +function return type. If an empty return is encountered, than +we should check that we are in a function (and not a thread) +context, that is, a `return` cell must be available: +```k + rule return T:Type; => stmt ... T + rule return; => stmt ... _ +``` + +## Blocks + +To avoid having to recover type environments after blocks, we prefer +to start a new task for block body, making sure that the new task +is passed the same type environment and return cells. The value +returned by `return` statements must have the same type as +stated in the `return` cell. The `print` variadic +function is allowed to only print integers and strings. The thrown +exceptions can only have integer type. +```k + rule {} => block + + rule {S} => block ... Rho R + (.Bag => S Rho R ) +``` + +## Expression statement + +```k + rule _:Type; => stmt +``` + +## Conditional and `while` loop + +```k + rule if (bool) block else block => stmt + rule while (bool) block => stmt +``` + +## Exceptions + +We currently force the parameters of exceptions to only be integers. +Moreover, for simplicity, we assume that integer exceptions can be +thrown from anywhere, including from functions which do not define +any try-catch block (with the currently unchecked ‒also for +simplicity‒ expectation that the caller functions would catch those +exceptions). +```k + rule try block catch(int X:Id) {S} => {int X; S} + rule try block catch(int X:Id) {} => {int X;} + rule throw int; => stmt +``` + +## Concurrency + +Nothing special about typing the concurrency constructs, except that +we do not want the spawned thread to return, so we do not include any +`return` cell in the new task cell for the thread statement. +Same like with the functions above, we do not check for thrown +exceptions which are not caught. +```k + rule spawn S => int ... Rho + (.Bag => S Rho ) + rule join int; => stmt + rule acquire _:Type; => stmt + rule release _:Type; => stmt + rule rendezvous _:Type; => stmt + + rule _:BlockOrStmtType _:BlockOrStmtType => stmt +``` + +## Auxiliary constructs + +The function `mkDecls` turns a list of parameters into a +list of variable declarations. +```k + syntax Stmt ::= mkDecls(Params) [function] + rule mkDecls(T:Type X:Id, Ps:Params) => T X; mkDecls(Ps) + rule mkDecls(.Params) => {} +``` +The `ltype` context allows only expressions which have an +lvalue to evaluate. +```k + syntax LValue ::= Id + rule isLValue(_:Exp[_:Exps]) => true + syntax Exp ::= LValue // K should be able to infer this + // if not added, then it gets stuck with an Id on k cell + +// Instead of the second LValue production above you can use a rule: +// rule isLValue(_:Exp[_:Exps]) => true + + syntax Exp ::= ltype(Exp) +// context ltype(HOLE:LValue) +// The above context does not work due to some error, so we write instead + context ltype(HOLE) requires isLValue(HOLE) +``` +The function `getTypes` is the same as in SIMPLE typed dynamic. +```k + syntax Types ::= getTypes(Params) [function] + rule getTypes(T:Type _:Id) => T, .Types // I would like to not use .Types + rule getTypes(T:Type _:Id, P, Ps) => T, getTypes(P,Ps) + rule getTypes(.Params) => void, .Types + +endmodule +``` + +Go to [Lesson 3, SIMPLE typed dynamic](../2_dynamic/simple-typed-dynamic.md) diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/collatz.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/collatz.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/collatz.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/dekker.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/dekker.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/dekker.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/div-nondet.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/div-nondet.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/div-nondet.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_01.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_01.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_01.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_02.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_02.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_02.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_03.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_03.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_03.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_04.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_04.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_04.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_05.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_05.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_05.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_06.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_06.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_06.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_07.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_07.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_07.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_08.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_08.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_08.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_09.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_09.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_09.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_10.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_10.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_10.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_11.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_11.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_11.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_12.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_12.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_12.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_13.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_13.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_13.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_14.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_14.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_14.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_15.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_15.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_15.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_16.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_16.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/exceptions_16.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/factorial.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/factorial.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/factorial.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/higher-order.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/higher-order.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/higher-order.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/matrix.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/matrix.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/matrix.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/sortings.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/sortings.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/sortings.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_01.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_01.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_01.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_02.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_02.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_02.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_03.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_03.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_03.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_04.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_04.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_04.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_05.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_05.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_05.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_06.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_06.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_06.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_07.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_07.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_07.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_08.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_08.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_08.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_09.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_09.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_09.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_10.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_10.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_10.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_11.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_11.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_11.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_12.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_12.simple.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/1_static/tests/threads_12.simple.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/Makefile b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/Makefile new file mode 100644 index 00000000000..fb9f892712b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/Makefile @@ -0,0 +1,25 @@ +DEF=simple-typed-dynamic +EXT=simple +TESTDIR?=../programs/* +RESULTDIR=tests +KOMPILE_FLAGS=--enable-search +KRUN_FLAGS=--output none + +%/threads/threads_05.simple: kompile + cat tests/threads_05.simple.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(DEF)-kompiled --search --bound 5 $(CHECK) tests/threads_05.simple.out + +%/exceptions/exceptions_07.simple \ +%/threads/threads_01.simple \ +%/threads/threads_02.simple \ +%/threads/threads_04.simple \ +%/threads/threads_06.simple \ +%/threads/threads_09.simple \ +%/diverse/div-nondet.simple: kompile + cat tests/$(notdir $@).in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(DEF)-kompiled --search --pattern ' ListItem(#ostream(1)) ListItem("off") ListItem(#buffer(S:String)) ' $(CHECK) tests/$(notdir $@).out + +%/diverse/dekker.simple \ +%/threads/threads_03.simple \ +%/threads/threads_08.simple: kompile + true + +include ../../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/simple-typed-dynamic.md b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/simple-typed-dynamic.md new file mode 100644 index 00000000000..1dd5beb6854 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/simple-typed-dynamic.md @@ -0,0 +1,602 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +# SIMPLE — Typed — Dynamic + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +Author: Traian Florin Șerbănuță (traian.serbanuta@unibuc.ro) +Organization: University of Bucharest + +## Abstract + +This is the **K** dynamic semantics of the typed SIMPLE language. +It is very similar to the semantics of the untyped SIMPLE, the +difference being that we now dynamically check the typing policy +described in the static semantics of typed SIMPLE. Because of the +dynamic nature of the semantics, we can also perform some additional +checks which were not possible in the static semantics, such as +memory leaks due to accessing an array out of its bounds. We will +highlight the differences between the dynamically typed and the +untyped SIMPLE as we proceed with the semantics. We recommend the +reader to consult the typing policy and the syntax of types discussed +in the static semantics of the typed SIMPLE language. +```k +module SIMPLE-TYPED-DYNAMIC-SYNTAX + imports DOMAINS-SYNTAX +``` +## Syntax + +The syntax of typed SIMPLE extends that of untyped SIMPLE with support +for declaring types to variables and functions. + +The syntax below is identical to that of the static semantics of typed +SIMPLE. However, the **K** strictness attributes are like those of the untyped +SIMPLE, to capture the desired evaluation strategies of the various language +constructs. +```k + syntax Id ::= "main" [token] +``` + +## Types + +```k + syntax Type ::= "void" | "int" | "bool" | "string" + | Type "[" "]" + | "(" Type ")" [bracket] + > Types "->" Type + syntax Types ::= List{Type,","} +``` + +## Declarations + +```k + syntax Param ::= Type Id + syntax Params ::= List{Param,","} + + syntax Stmt ::= Type Exps ";" + | Type Id "(" Params ")" Block +``` + +## Expressions + +```k + syntax Exp ::= Int | Bool | String | Id + | "(" Exp ")" [bracket] + | "++" Exp + > Exp "[" Exps "]" [strict] + > Exp "(" Exps ")" [strict] + | "-" Exp [strict] + | "sizeOf" "(" Exp ")" [strict] + | "read" "(" ")" + > left: + Exp "*" Exp [strict, left] + | Exp "/" Exp [strict, left] + | Exp "%" Exp [strict, left] + > left: + Exp "+" Exp [strict, left] + | Exp "-" Exp [strict, left] + > non-assoc: + Exp "<" Exp [strict, non-assoc] + | Exp "<=" Exp [strict, non-assoc] + | Exp ">" Exp [strict, non-assoc] + | Exp ">=" Exp [strict, non-assoc] + | Exp "==" Exp [strict, non-assoc] + | Exp "!=" Exp [strict, non-assoc] + > "!" Exp [strict] + > left: + Exp "&&" Exp [strict(1), left] + | Exp "||" Exp [strict(1), left] + > "spawn" Block + > Exp "=" Exp [strict(2), right] +``` +Like in the static semantics, there is no need for lists of identifiers +(because we now have lists of parameters). +```k + syntax Exps ::= List{Exp,","} [strict, overload(exps)] + syntax Val + syntax Vals ::= List{Val,","} [overload(exps)] +``` + +## Statements + +```k + syntax Block ::= "{" "}" + | "{" Stmt "}" + + syntax Stmt ::= Block + | Exp ";" [strict] + | "if" "(" Exp ")" Block "else" Block [avoid, strict(1)] + | "if" "(" Exp ")" Block [macro] + | "while" "(" Exp ")" Block + | "for" "(" Stmt Exp ";" Exp ")" Block [macro] + | "print" "(" Exps ")" ";" [strict] + | "return" Exp ";" [strict] + | "return" ";" + | "try" Block "catch" "(" Param ")" Block + | "throw" Exp ";" [strict] + | "join" Exp ";" [strict] + | "acquire" Exp ";" [strict] + | "release" Exp ";" [strict] + | "rendezvous" Exp ";" [strict] + + syntax Stmt ::= Stmt Stmt [right] +``` +The same desugaring macros like in the statically typed SIMPLE. +```k + rule if (E) S => if (E) S else {} + rule for(Start Cond; Step) {S:Stmt} => {Start while(Cond){S Step;}} + rule for(Start Cond; Step) {} => {Start while(Cond){Step;}} + rule T:Type E1:Exp, E2:Exp, Es:Exps; => T E1; T E2, Es; [anywhere] + rule T:Type X:Id = E; => T X; X = E; [anywhere] + +endmodule + + +module SIMPLE-TYPED-DYNAMIC + imports SIMPLE-TYPED-DYNAMIC-SYNTAX + imports DOMAINS +``` + +## Semantics + +### Values and results + +These are similar to those of untyped SIMPLE, except that the array +references and the function abstrations now also hold their types. +These types are needed in order to easily compute the type of any +value in the language (see the auxiliary `typeOf` operation at +the end of this module). +```k + syntax Val ::= Int | Bool | String + | array(Type,Int,Int) + | lambda(Type,Params,Stmt) + syntax Exp ::= Val + syntax Exps ::= Vals + syntax KResult ::= Val + | Vals // TODO: should not need this +``` + +### Configuration + +The configuration is almost identical to that of untyped SIMPLE, +except for a `return` cell inside the `control` cell. +This `return` cell will hold, like in the static semantics of +typed SIMPLE, the expected type of the value returned by the function +being executed. The contents of this cell will be set whenever a +function is invoked and will be checked whenever the evaluation of the +function body encounters an explicit `return` statement. +```k + // the syntax declarations below are required because the sorts are + // referenced directly by a production and, because of the way KIL to KORE + // is implemented, the configuration syntax is not available yet + // should simply work once KIL is removed completely + // check other definitions for this hack as well + + syntax ControlCell + syntax ControlCellFragment + + configuration + + + 0 + ($PGM:Stmt ~> execute) +//
+ + .List + .List + void + +//
+ .Map + .Map +
+
+//
+ .Map + .Map + .Set + .Set + .List + .List + 0 +
+``` + +## Declarations and Initialization + +### Variable Declaration + +The `undefined` construct is now parameterized by a type. +A main difference between untyped SIMPLE and dynamically typed SIMPLE +is that the latter assigns a type to each of its locations and that +type cannot be changed during the execution of the program. We do not +do any memory management in our semantic definitions here, so +locations cannot be reclaimed, garbage collected and/or reused. Each +location corresponds precisely to an allocated variable or array +element, whose type was explicitly or implicitly declared in the +program and does not change. It is therefore safe to type each +location and then never allow that type to change. The typed +undefined values effectively assign both a type and an undefined value +to a location. +```k + syntax KItem ::= undefined(Type) + + rule T:Type X:Id; => .K ... + Env => Env[X <- L] + ... .Map => L |-> undefined(T) ... + L:Int => L +Int 1 +``` + +### Array Declaration + +The dynamic semantics of typed array declarations is similar to that +in untyped SIMPLE, but we have to make sure that we associate the +right type to the allocated locations. +```k + rule T:Type X:Id[N:Int]; => .K ... + Env => Env[X <- L] + ... .Map => L |-> array(T, L +Int 1, N) + (L +Int 1)...(L +Int N) |-> undefined(T) ... + L:Int => L +Int 1 +Int N + requires N >=Int 0 + + context _:Type _::Exp[HOLE::Exps]; +``` +The desugaring of multi-dimensional arrays into unidimensional +ones is also similar to that in untyped SIMPLE, although we have to +make sure that all the declared variables have the right types. The +auxiliary operation `T`, defined at the end of the file, +adds the length of `Vs` dimensions to the type `T`. +```k +// TODO: Check the desugaring below to be consistent with the one for untyped simple + + syntax Id ::= "$1" [token] | "$2" [token] + rule T:Type X:Id[N1:Int, N2:Int, Vs:Vals]; + => T[] X[N1]; + { + T[][] $1=X; + for(int $2=0; $2 <= N1 - 1; ++$2) { + T X[N2,Vs]; + $1[$2] = X; + } + } +``` + +### Function declaration + +Store all function parameters, as well as the return type, as part +of the lambda abstraction. In the spirit of dynamic typing, we will +make sure that parameters are well typed when the function is invoked. +```k + rule T:Type F:Id(Ps:Params) S => .K ... + Env => Env[F <- L] + ... .Map => L |-> lambda(T, Ps, S) ... + L => L +Int 1 +``` + +### Calling `main()` + +When done with the first pass, call `main()`. +```k + syntax KItem ::= "execute" + rule execute => main(.Exps); + Env + .Map => Env +``` + +### Expressions + +### Variable lookup + +```k + rule X:Id => V ... + ... X |-> L ... + ... L |-> V:Val ... [group(lookup)] +``` + +### Variable/Array increment + +```k + context ++(HOLE => lvalue(HOLE)) + rule ++loc(L) => I +Int 1 ... + ... L |-> (I:Int => I +Int 1) ... [group(increment)] +``` + +### Arithmetic operators + +```k + rule I1 + I2 => I1 +Int I2 + rule Str1 + Str2 => Str1 +String Str2 + rule I1 - I2 => I1 -Int I2 + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 requires I2 =/=K 0 + rule I1 % I2 => I1 %Int I2 requires I2 =/=K 0 + rule - I => 0 -Int I + rule I1 < I2 => I1 I1 <=Int I2 + rule I1 > I2 => I1 >Int I2 + rule I1 >= I2 => I1 >=Int I2 + rule V1:Val == V2:Val => V1 ==K V2 + rule V1:Val != V2:Val => V1 =/=K V2 + rule ! T => notBool(T) + rule true && E => E + rule false && _ => false + rule true || _ => true + rule false || E => E +``` + +### Array lookup + +Check array bounds, as part of the dynamic typing policy. +```k +// Same comment as for simple untyped regarding [anywhere] + rule V:Val[N1:Int, N2:Int, Vs:Vals] => V[N1][N2, Vs] + [anywhere] + +// Same comment as for simple untyped regarding [anywhere] + rule array(_:Type, L:Int, M:Int)[N:Int] => lookup(L +Int N) + requires N >=Int 0 andBool N N +``` + +### Function call + +Define function call and return together, to see their relationship. +Note that the operation `mkDecls` now declares properly typed +instantiated variables, and that the semantics of `return` also +checks that that type of the returned value is expected one. +```k + syntax KItem ::= (Type,Map,K,ControlCellFragment) + + rule lambda(T,Ps,S)(Vs:Vals) ~> K => mkDecls(Ps,Vs) S return; + + .List => ListItem((T',Env,K,C)) ... + T' => T + C + + Env => GEnv + GEnv + + rule return V:Val; ~> _ => V ~> K + + ListItem((T',Env,K,C)) => .List ... + T => T' + (_ => C) + + _ => Env + requires typeOf(V) ==K T // check the type of the returned value +``` +Like the `undefined` above, `nothing` also gets +tagged with a type now. The empty `return` statement is +completed to return the `nothing` value tagged as expected. +```k + syntax Val ::= nothing(Type) + rule return; => return nothing(T); ... T +``` + +### Read + +```k + rule read() => I ... ListItem(I:Int) => .List ... [group(read)] +``` + +### Assignment + +The assignment now checks that the type of the assigned location is +preserved: +```k + context (HOLE => lvalue(HOLE)) = _ + + rule loc(L) = V:Val => V ... ... L |-> (V' => V) ... + requires typeOf(V) ==K typeOf(V') [group(assignment)] +``` + +### Statements + +### Blocks + +```k + rule {} => .K + rule { S } => S ~> setEnv(Env) ... Env +``` + +### Sequential composition + +```k + rule S1:Stmt S2:Stmt => S1 ~> S2 +``` + +### Expression statements + +```k + rule _:Val; => .K +``` + +### Conditional + +```k + rule if ( true) S else _ => S + rule if (false) _ else S => S +``` + +### While loop + +```k + rule while (E) S => if (E) {S while(E)S} +``` + +### Print + +We only allow printing integers and strings: +```k + rule print(V:Val, Es => Es); ... ... .List => ListItem(V) + requires typeOf(V) ==K int orBool typeOf(V) ==K string [group(print)] + rule print(.Vals); => .K +``` + +### Exceptions + +Exception parameters are now typed, but note that the semantics below +works correctly only when the thrown exception has the same type as +the innermost try-catch paramete. To keep things simple, for the time +being we can assume that SIMPLE only throws and catches integer +values, in which case our semantics below works fine: +```k + syntax KItem ::= (Param,Stmt,K,Map,ControlCellFragment) // Param instead of Id + + syntax KItem ::= "popx" + + rule (try S1 catch(P) S2 => S1 ~> popx) ~> K + + .List => ListItem((P, S2, K, Env, C)) ... + C + + Env + + rule popx => .K ... + ListItem(_) => .List ... + + rule throw V:Val; ~> _ => { T X = V; S2 } ~> K + + ListItem((T:Type X:Id, S2, K, Env, C)) => .List ... + (_ => C) + + _ => Env +``` + +### Threads + +### Thread creation + +```k + rule ... + spawn S => !T:Int +Int 1 ... + Env + ... + (.Bag => ... + S + Env + !T +Int 1 + ...) +``` + +### Thread termination + +```k + rule (... .K H T ... => .Bag) + Busy => Busy -Set keys(H) + ... .Set => SetItem(T) ... +``` + +### Thread joining + +```k + rule join T:Int; => .K ... + ... SetItem(T) ... +``` + +### Acquire lock + +```k + rule acquire V:Val; => .K ... + ... .Map => V |-> 0 ... + Busy (.Set => SetItem(V)) + requires (notBool(V in Busy:Set)) [group(acquire)] + + rule acquire V; => .K ... + ... V:Val |-> (N:Int => N +Int 1) ... +``` + +### Release lock + +```k + rule release V:Val; => .K ... + ... V |-> (N => N:Int -Int 1) ... + requires N >Int 0 + + rule release V; => .K ... ... V:Val |-> 0 => .Map ... + ... SetItem(V) => .Set ... +``` + +### Rendezvous synchronization + +```k + rule rendezvous V:Val; => .K ... + rendezvous V; => .K ... [group(rendezvous)] +``` + +### Auxiliary declarations and operations + +Turns a list of parameters and a list of instance values for them +into a list of variable declarations. +```k + syntax Stmt ::= mkDecls(Params,Vals) [function] + rule mkDecls((T:Type X:Id, Ps:Params), (V:Val, Vs:Vals)) + => T X=V; mkDecls(Ps,Vs) + rule mkDecls(.Params,.Vals) => {} +``` +Location lookup. +```k + syntax Exp ::= lookup(Int) // see NOTES.md for why Exp instead of KItem + rule lookup(L) => V ... ... L |-> V:Val ... [group(lookup)] +``` +Environment recovery. +```k +// TODO: same comment regarding setEnv(...) as for simple untyped + + syntax KItem ::= setEnv(Map) + rule setEnv(Env) => .K ... _ => Env + rule (setEnv(_) => .K) ~> setEnv(_) +``` +lvalue and loc +```k + syntax Exp ::= lvalue(K) + syntax Val ::= loc(Int) + + rule lvalue(X:Id => loc(L)) ... ... X |-> L:Int ... + + //context lvalue(_[HOLE]) + //context lvalue(HOLE[_]) + context lvalue(_::Exp[HOLE::Exps]) + context lvalue(HOLE::Exp[_::Exps]) + + rule lvalue(lookup(L:Int) => loc(L)) +``` +Adds the corresponding depth to an array type +```k + syntax Type ::= Type "<" Vals ">" [function] + rule T:Type<_,Vs:Vals> => T[] + rule T:Type<.Vals> => T +``` +Sequences of locations. +```k + syntax Map ::= Int "..." Int "|->" K [function] + rule N...M |-> _ => .Map requires N >Int M + rule N...M |-> K => N |-> K (N +Int 1)...M |-> K requires N <=Int M + +// Type of a value. + syntax Type ::= typeOf(K) [function] + rule typeOf(_:Int) => int + rule typeOf(_:Bool) => bool + rule typeOf(_:String) => string + rule typeOf(array(T,_,_)) => (T[]) // () needed! K parses [] as "no tags" + rule typeOf(lambda(T,Ps,_)) => getTypes(Ps) -> T + rule typeOf(undefined(T)) => T + rule typeOf(nothing(T)) => T +``` +List of types of a parameter. +```k + syntax Types ::= getTypes(Params) [function] + rule getTypes(T:Type _:Id) => T, .Types // I would like to not use .Types + rule getTypes(T:Type _:Id, P, Ps) => T, getTypes(P,Ps) + rule getTypes(.Params) => void, .Types +endmodule +``` diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.in new file mode 100644 index 00000000000..7ed6ff82de6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.in @@ -0,0 +1 @@ +5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.out new file mode 100644 index 00000000000..36f5bb94345 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/collatz.simple.out @@ -0,0 +1,6 @@ +Testing Collatz' conjecture up to what number? Testing Collatz' conjecture for n = 1 ... Done! It took 0 steps. +Testing Collatz' conjecture for n = 2 ... Done! It took 1 steps. +Testing Collatz' conjecture for n = 3 ... Done! It took 7 steps. +Testing Collatz' conjecture for n = 4 ... Done! It took 2 steps. +Testing Collatz' conjecture for n = 5 ... Done! It took 5 steps. +Done. It appears to hold. diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/div-nondet.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/div-nondet.simple.out new file mode 100644 index 00000000000..4de9334ab45 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/div-nondet.simple.out @@ -0,0 +1,17 @@ + { + S:String + #Equals + "1\n" + } +#Or + { + S:String + #Equals + "2\n" + } +#Or + { + S:String + #Equals + "3\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_01.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_01.simple.out new file mode 100644 index 00000000000..7b132801145 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_01.simple.out @@ -0,0 +1 @@ +7 100 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_02.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_02.simple.out new file mode 100644 index 00000000000..7f8f011eb73 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_02.simple.out @@ -0,0 +1 @@ +7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_03.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_03.simple.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_03.simple.out @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_04.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_04.simple.out new file mode 100644 index 00000000000..ddcbc88bbd9 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_04.simple.out @@ -0,0 +1 @@ +7 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_05.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_05.simple.out new file mode 100644 index 00000000000..fbf9c69a420 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_05.simple.out @@ -0,0 +1 @@ +1 15 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_06.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_06.simple.out new file mode 100644 index 00000000000..c870614bb54 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_06.simple.out @@ -0,0 +1 @@ +1 8 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_07.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_07.simple.out new file mode 100644 index 00000000000..020bb1522ea --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_07.simple.out @@ -0,0 +1,3 @@ + S ==K "2 5\n" +#Or + S ==K "2 6\n" diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_08.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_08.simple.out new file mode 100644 index 00000000000..aacb59525ae --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_08.simple.out @@ -0,0 +1 @@ +1 2 3 4 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_09.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_09.simple.out new file mode 100644 index 00000000000..122f99335df --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_09.simple.out @@ -0,0 +1 @@ +15 5 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_10.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_10.simple.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_10.simple.out @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_11.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_11.simple.out new file mode 100644 index 00000000000..9c355295cd4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_11.simple.out @@ -0,0 +1 @@ +1 2 3 20 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_12.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_12.simple.out new file mode 100644 index 00000000000..6c235065269 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_12.simple.out @@ -0,0 +1 @@ +1 2 3 10 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_13.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_13.simple.out new file mode 100644 index 00000000000..2efb20f3379 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_13.simple.out @@ -0,0 +1 @@ +4 42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_14.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_14.simple.out new file mode 100644 index 00000000000..d81cc0710eb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_14.simple.out @@ -0,0 +1 @@ +42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_15.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_15.simple.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_15.simple.out @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_16.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_16.simple.out new file mode 100644 index 00000000000..25c77a97862 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/exceptions_16.simple.out @@ -0,0 +1 @@ +100 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.in new file mode 100644 index 00000000000..7ed6ff82de6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.in @@ -0,0 +1 @@ +5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.out new file mode 100644 index 00000000000..3755534a6a4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/factorial.simple.out @@ -0,0 +1 @@ +Input a natural number: Factorial of 5 is: 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/higher-order.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/higher-order.simple.out new file mode 100644 index 00000000000..5cf2aefc9d7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/higher-order.simple.out @@ -0,0 +1,5 @@ +x = 0; a[] = 0 1 2 3 4 5 6 7 8 9 +1 0 7 14 +2 0 7 14 +3 0 7 14 +x = 3; a[] = 0 2 4 6 8 10 12 14 16 18 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.in new file mode 100644 index 00000000000..0dad15c60ac --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.in @@ -0,0 +1 @@ +2 4 1 5 7 8 27 1 2 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.out new file mode 100644 index 00000000000..cfa7774db49 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/matrix.simple.out @@ -0,0 +1,16 @@ +Input the number of lines and columns (two natural numbers): Line 1 (4 elements): Line 2 (4 elements): Your matrix is: +Line 1 (4 elements): 1 5 7 8 +Line 2 (4 elements): 27 1 2 3 +The transpose of your matrix is: +Line 1 (2 elements): 1 27 +Line 2 (2 elements): 5 1 +Line 3 (2 elements): 7 2 +Line 4 (2 elements): 8 3 +You matrix multiplied with its transpose is: +Line 1 (2 elements): 139 70 +Line 2 (2 elements): 70 743 +The transpose of your matrix multiplied with your matrix is: +Line 1 (4 elements): 730 32 61 89 +Line 2 (4 elements): 32 26 37 43 +Line 3 (4 elements): 61 37 53 62 +Line 4 (4 elements): 89 43 62 73 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.in new file mode 100644 index 00000000000..affeff1b77d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.in @@ -0,0 +1 @@ +5 71 23 43 23 91 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.out new file mode 100644 index 00000000000..33d6eab60b1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/sortings.simple.out @@ -0,0 +1,17 @@ +Size of the array to sort = Type 5 numbers: Finished reading the 5 numbers +The original unsorted array is: +71 23 43 23 91 +Reversing the array ... Done! +The reversed array is: +91 23 43 23 71 +Sorting the array using insertion sort ... Done! +The resulting array is: +23 23 43 71 91 +Reversing the array ... Done! +Sorting the array using bubble sort ... Done! +The resulting array is: +23 23 43 71 91 +Reversing the array ... Done! +Sorting the array using heap sort ... Done! +The resulting array is: +23 23 43 71 91 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_01.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_01.simple.out new file mode 100644 index 00000000000..fb9711a9300 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_01.simple.out @@ -0,0 +1,3 @@ + S ==K "5\n" +#Or + S ==K "7\n" diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_02.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_02.simple.out new file mode 100644 index 00000000000..fb9711a9300 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_02.simple.out @@ -0,0 +1,3 @@ + S ==K "5\n" +#Or + S ==K "7\n" diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_03.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_03.simple.out new file mode 100644 index 00000000000..b1bd38b62a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_03.simple.out @@ -0,0 +1 @@ +13 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_04.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_04.simple.out new file mode 100644 index 00000000000..f15d02b5969 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_04.simple.out @@ -0,0 +1,3 @@ + S ==K "2 3 " +#Or + S ==K "3 2 " diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_05.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_05.simple.out new file mode 100644 index 00000000000..5414948e6ea --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_05.simple.out @@ -0,0 +1,199 @@ + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 0 + 2 |-> lambda ( void , .Params , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Vals ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( 1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "0\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 1 + 2 |-> lambda ( void , .Params , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Vals ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( 1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "1\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 2 + 2 |-> lambda ( void , .Params , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Vals ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( 1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "2\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 3 + 2 |-> lambda ( void , .Params , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Vals ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( 1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "3\n" ~> .K ) ) + + + 3 + + + } +#Or + { + Result:GeneratedTopCell + #Equals + + + .ThreadCellMap + + + main |-> 2 + x |-> 0 + y |-> 1 + + + 0 |-> 0 + 1 |-> 4 + 2 |-> lambda ( void , .Params , { x = 1 ; y = 0 ; spawn { x = 0 ; } ; while ( 1 <= x ) { y = y + 1 ; } print ( y , "\n" , .Vals ) ; } ) + + + .Set + + + SetItem ( 0 ) + SetItem ( 1 ) + + + ListItem ( #buffer ( "\n" ~> .K ) ) + ListItem ( "off" ) + ListItem ( #istream ( 0 ) ) + + + ListItem ( #ostream ( 1 ) ) + ListItem ( "off" ) + ListItem ( #buffer ( "4\n" ~> .K ) ) + + + 3 + + + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.in new file mode 100644 index 00000000000..f599e28b8ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.in @@ -0,0 +1 @@ +10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.out new file mode 100644 index 00000000000..675f219355a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_06.simple.out @@ -0,0 +1,7 @@ + S ==K "x = 5\n" +#Or + S ==K "x = 10\n" +#Or + S ==K "x = 15\n" +#Or + S ==K "x = 20\n" diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.in b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.in new file mode 100644 index 00000000000..f599e28b8ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.in @@ -0,0 +1 @@ +10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.out new file mode 100644 index 00000000000..7d95b26c089 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_07.simple.out @@ -0,0 +1 @@ +x = 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_08.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_08.simple.out new file mode 100644 index 00000000000..2bd6132359a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_08.simple.out @@ -0,0 +1 @@ +1123452345 \ No newline at end of file diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_09.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_09.simple.out new file mode 100644 index 00000000000..d5356378afe --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_09.simple.out @@ -0,0 +1,3 @@ + S ==K "2\n" +#Or + S ==K "3\n" diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_10.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_10.simple.out new file mode 100644 index 00000000000..00750edc07d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_10.simple.out @@ -0,0 +1 @@ +3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_11.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_11.simple.out new file mode 100644 index 00000000000..b85905ec0b9 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_11.simple.out @@ -0,0 +1 @@ +1 2 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_12.simple.out b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_12.simple.out new file mode 100644 index 00000000000..52bd8e43afb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/2_dynamic/tests/threads_12.simple.out @@ -0,0 +1 @@ +120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/collatz.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/collatz.simple new file mode 100644 index 00000000000..dc0920800ce --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/collatz.simple @@ -0,0 +1,19 @@ +// Program testing Collatz' conjecture up to a user-provided number. + +void collatz(int n) { + int s=0; + print("Testing Collatz' conjecture for n = ",n," ... "); + while (n > 1) { + s = s+1; + if (n == (n/2)*2) { n = n/2; } + else { n = 3*n+1; } + } + print("Done! It took ",s," steps.\n"); +} + +void main() { + print("Testing Collatz' conjecture up to what number? "); + int m = read(); + for (int i=1; i<=m; ++i) { collatz(i); } + print("Done. It appears to hold.\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/dekker.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/dekker.simple new file mode 100644 index 00000000000..fa4ff9fa902 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/dekker.simple @@ -0,0 +1,32 @@ +// This is Dekker's algorithm for mutual exclusion. +// This program is not meant to be executed, it is meant to be model checked. + +bool flag1 = false, flag2 = false, critical1 = false, critical2 = false; +int turn = 1; + +void dekker1() { + flag1 = true; turn = 2; + while (flag2 && turn==2) { } + // Enter critical section + critical1 = true; + // Critical stuff ... + // Leave critical section + critical1 = false; + flag1 = false; +} + +void dekker2() { + flag2 = true; turn = 1; + while(flag1 && turn==1) { } + // Enter critical section + critical2 = true; + // Critical stuff ... + // Leave critical section + critical2 = false; + flag2 = false; +} + +void main() { + spawn { while(true) { dekker1(); } }; + spawn { while(true) { dekker2(); } }; +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/div-nondet.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/div-nondet.simple new file mode 100644 index 00000000000..20a98665511 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/div-nondet.simple @@ -0,0 +1,15 @@ +// Program manifesting several behaviors, including an undefined one. +// However, to make it generate all those behaviors, you need to add +// the "superheat" tag to the division and the "supercool" tag to the +// variable lookup and increment rules. + +void main() { + int x = 1 ; + print(++ x / (++ x / x),"\n"); +} + +// 0 +// 1 +// 2 +// 3 +// undefined (gets stuck with division-by-zero at top of computation) diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/factorial.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/factorial.simple new file mode 100644 index 00000000000..0ba95243e9d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/factorial.simple @@ -0,0 +1,15 @@ +// The following program calculates the factorial of a user-provided number. + +int factorial(int y) { + print("Factorial of ", y, " is: "); + int t=1; + for(int i=1; i<=y; ++i) { + t = t*i; + } + return t; +} + +void main() { + print("Input a natural number: "); + print(factorial(read()),"\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/higher-order.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/higher-order.simple new file mode 100644 index 00000000000..026e52f9d14 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/higher-order.simple @@ -0,0 +1,89 @@ +int x, a[10]; + +void incx() { + ++x; +} + +int zero() { + return 0; +} + +int id(int x) { + return x; +} + +void->void id0(void->void f) { + return f; +} + +void->int id1(void->int f) { + return f; +} + +int->int id2(int->int f) { + return f; +} + +int double(int x) { + return 2*x; +} + +void->void hoincx() { + return incx; +} + +void->int hozero() { + return zero; +} + +int->int hoid() { + return id; +} + +int->int hodouble() { + return double; +} + +void app0(void->void f) { + f(); +} + +int app1(void->int f) { + return f(); +} + +int app2(int->int f, int x) { + return f(x); +} + +void map(int->int f, int[] x) { + for (int i = 0; i <= sizeOf(x) - 1; ++i) { + x[i] = app2(f,x[i]); + } +} + +void printall() { + print("x = ",x, "; a[] = "); + for (int i = 0; i <= sizeOf(a) - 1; ++i) { + print(a[i], " "); + } + print("\n"); +} + +void main() { + x = 0; + for (int i=0; i <= sizeOf(a) - 1; ++i) { + a[i]=i; + } + printall(); + hoincx()(); + print(x," ", hozero()()," ", hoid()(7)," ", hodouble()(7),"\n"); + id0(hoincx())(); + print(x," ", id1(hozero())()," ", + id2(hoid())(7)," ", id2(hodouble())(7),"\n"); + app0(id0(hoincx())); + print(x," ", app1(id1(hozero()))," ", + app2(id2(hoid()),7)," ", app2(id2(hodouble()),7),"\n"); + map(double,a); + printall(); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/matrix.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/matrix.simple new file mode 100644 index 00000000000..c77830219a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/matrix.simple @@ -0,0 +1,57 @@ +// This program tests multi-dimensional arrays. + +void readArray(int[][] a) { + int m = sizeOf(a) - 1, n = sizeOf(a[0]) - 1; + for(int i=0; i<=m; ++i) { + print("Line ",i+1," (",n+1," elements): "); + for(int j=0; j<=n; ++j) { a[i][j] = read(); } + } +} + +void printArray(int[][] a) { + int m = sizeOf(a) - 1, n = sizeOf(a[0]) - 1; + for(int i=0; i<=m; ++i) { + print("Line ",i+1," (",n+1," elements):"); + for(int j=0; j<=n; ++j) { print(" ",a[i,j]); } + print("\n"); + } +} + +int[][] transArray(int[][] a) { + int m = sizeOf(a) - 1, n = sizeOf(a[0]) - 1, b[n+1,m+1]; + for (int i=0; i<=m; ++i) { + for (int j=0; j<=n; ++j) { + b[j,i] = a[i,j]; + } + } + return b; +} + +int[][] mulArray(int[][] a, int[][] b) { + int m = sizeOf(a) - 1, n = sizeOf(b) - 1, p = sizeOf(b[0]) - 1, c[m+1,p+1]; + for (int i=0; i<=m; ++i) { + for (int j=0; j<=p; ++j) { + c[i,j] = 0; + for (int k=0; k<=n; ++k) { + c[i,j] = c[i,j] + a[i,k] * b[k,j]; + } + } + } + return c; +} + +void main() { + print("Input the number of lines and columns (two natural numbers): "); + int x = read(), y = read(), a[x,y]; + readArray(a); + print("Your matrix is:\n"); + printArray(a); + print("The transpose of your matrix is:\n"); + printArray(transArray(a)); + print("You matrix multiplied with its transpose is:\n"); + printArray(mulArray(a,transArray(a))); + print("The transpose of your matrix multiplied with your matrix is:\n"); + printArray(mulArray(transArray(a),a)); +} + +// Should output what it says. diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/sortings.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/sortings.simple new file mode 100644 index 00000000000..86c857c303a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/diverse/sortings.simple @@ -0,0 +1,136 @@ +int[] init(int n) { + int x[n]; + print("Type ",n," numbers: "); + for (int i = 0; i <= n - 1; ++i) { + x[i] = read(); + } + print("Finished reading the ",n," numbers\n"); + return x; +} + +void printArray(int[] x) { + print("\n"); + for (int i = 0; i <= sizeOf(x) - 1; ++i) { + print(x[i]," "); + } + print("\n"); +} + +void reverse(int[] x) { + int n = sizeOf(x); + for (int i = 0; i <= n/2 - 1; ++i) { + int t = x[i]; + x[i] = x[n - i - 1]; + x[n - i - 1] = t; + } +} + +void map(string[] m, (int[] -> void)[] f, int[] x) { + for (int i = 0; i <= sizeOf(f) - 1; ++i) { + print(m[i]); + f[i](x); + } +} + +void insertionSort(int[] x) { + for (int i = 1; i <= sizeOf(x) - 1; ++i) { + int v = x[i], j = i - 1; + while (j > 0 && x[j] > v) { // doing the loop only up to 1 + x[j + 1] = x[j]; + j = j - 1; + } + if (x[0] > v) { + x[1] = x[0]; + x[0] = v; + } + else { + x[j+1] = v; + } + } +} + +void bubbleSort(int[] v) { + int n = sizeOf(v); + for (int i = 0; i <= n - 1; ++i) { + for (int j = 0; j <= n - 2; ++j) { + if (v[j] > v[j+1]) { + int t = v[j+1]; + v[j+1] = v[j]; + v[j] = t; + } + } + } +} + +void siftDown(int[] x, int root, int bottom) { + bool done = false; + int maxChild; + while (root*2 <= bottom && !done) { + if (root*2 == bottom) { + maxChild = root*2; + } + else { + if (x[root*2] > x[root*2 + 1]) { + maxChild = root*2; + } + else { + maxChild = root*2 + 1; + } + } + if (x[root] < x[maxChild]) { + int t = x[root]; + x[root] = x[maxChild]; + x[maxChild] = t; + root = maxChild; + } + else { + done = true; + } + } +} + +void heapSort(int[] x) { + int n = sizeOf(x), i = n/2 - 1; + while (i >= 0) { + siftDown(x, i, n - 1); + i = i - 1; + } + i = n - 1; + while (i >= 1 ) { + int t = x[0]; + x[0] = x[i] ; + x[i] = t; + siftDown(x, 0, i - 1); + i = i - 1; + } +} + +void main() { + print("Size of the array to sort = "); + int[] x = init(read()); + string m[11]; + int[] -> void f[11]; + m[ 0] = "The original unsorted array is:"; + f[ 0] = printArray; + m[ 1] = "Reversing the array ... "; + f[ 1] = reverse; + m[ 2] = "Done!\nThe reversed array is:"; + f[ 2] = printArray; + m[ 3] = "Sorting the array using insertion sort ... "; + f[ 3] = insertionSort; + m[ 4] = "Done!\nThe resulting array is:"; + f[ 4] = printArray; + m[ 5] = "Reversing the array ... "; + f[ 5] = reverse; + m[ 6] = "Done!\nSorting the array using bubble sort ... "; + f[ 6] = bubbleSort; + m[ 7] = "Done!\nThe resulting array is:"; + f[ 7] = printArray; + m[ 8] = "Reversing the array ... "; + f[ 8] = reverse; + m[ 9] = "Done!\nSorting the array using heap sort ... "; + f[ 9] = heapSort; + m[10] = "Done!\nThe resulting array is:"; + f[10] = printArray; + map(m,f,x); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_01.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_01.simple new file mode 100644 index 00000000000..2a4ad4f1db7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_01.simple @@ -0,0 +1,16 @@ +void main() { + int e = 100; + try { + int x = 5; + if (x >= 0) { + throw x+2; + } + print(20); // should not be printed + } catch(int e) { + print(e," "); // should print 7 + } + print(e," "); // should print 100 + print(10,"\n"); +} + +// 7 100 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_02.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_02.simple new file mode 100644 index 00000000000..dd31ec99c12 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_02.simple @@ -0,0 +1,20 @@ +void main() { + try { + foo(); + } + catch(int e) { + print(e,"\n"); // should print 7 + } +} + +void foo() { + try { + throw 5; + print(17); // should not be printed + } catch(int e) { + throw e + 2; // throws 7 + } + throw 1; // should not be reached +} + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_03.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_03.simple new file mode 100644 index 00000000000..4ec65e3ad2e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_03.simple @@ -0,0 +1,8 @@ +void main() { + int x = 1; + try { x = x + 1; throw x; x = x/0;} // division by zero unreachable + catch(int y) {x = y+1;} + print(x,"\n"); +} + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_04.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_04.simple new file mode 100644 index 00000000000..3bd10418881 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_04.simple @@ -0,0 +1,8 @@ +void main() { + int x = 1; + try { int x = 5; throw x; int y = x/0;} // division by zero unreachable + catch(int y) {y = y + 2; print(y," ");} // new y here, the one declared by catch + print(x,"\n"); +} + +// 7 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_05.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_05.simple new file mode 100644 index 00000000000..1edf149735a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_05.simple @@ -0,0 +1,23 @@ +int x; + +int f(int y) { + int t = 1; + try{ + print(t," "); + throw 5; + print(8); // not reachable + } catch(int p) { + print(p+10," "); + } + for (int i = 1; i <= y; ++i) { + t = t*i; + } + return t; +} + +void main() { + x = 5; + print(f(x),"\n"); +} + +// 1 15 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_06.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_06.simple new file mode 100644 index 00000000000..023dc5feefa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_06.simple @@ -0,0 +1,22 @@ +int x; + +int f(int y) { + int t = 1; + try { + print(t," "); + print(8," "); + } catch(int p) { + print(p+10); // not reachable + } + for (int i = 1; i <= y; ++i) { + t = t*i; + } + return t; +} + +void main() { + x = 5; + print(f(x),"\n"); +} + +// 1 8 120 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_07.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_07.simple new file mode 100644 index 00000000000..5a17ae9a370 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_07.simple @@ -0,0 +1,12 @@ +void main() { + try { + int x = 2; + print(x," "); + throw ++x + x; + } + catch(int e) { + print(e,"\n"); + } +} + +// 2 6 or 2 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_08.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_08.simple new file mode 100644 index 00000000000..676afff660c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_08.simple @@ -0,0 +1,26 @@ +void main() { + try { + try { + try { + try { + int x = 1; + print(x," "); + throw ++x; + } catch(int e) { + print(e," "); + throw ++e; + } + } catch(int e) { + print(e," "); + throw ++e; + } + } catch(int e) { + print(e," "); + throw ++e; + } + } catch(int e) { + print(e,"\n"); + } +} + +// 1 2 3 4 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_09.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_09.simple new file mode 100644 index 00000000000..d4fb88eaf6a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_09.simple @@ -0,0 +1,24 @@ +int x, y, z; + +void g() { + throw 15; +} + +void f() { + g(); +} + +void main() { + x = 5; + y = 10; + + try { + f(); + } catch(int y) { + print(y," "); + } + print(x," "); + print(y,"\n"); +} + +// 15 5 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_10.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_10.simple new file mode 100644 index 00000000000..3a1b0bef3da --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_10.simple @@ -0,0 +1,13 @@ +int x; + +void main() { + x = 5; + try { + throw 3; + print(x); // should not print this + } catch(int y) { + print(y,"\n"); // should print this + } +} + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_11.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_11.simple new file mode 100644 index 00000000000..8b3df6ebc2d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_11.simple @@ -0,0 +1,20 @@ +int i, j; + +void main() { + i = 0; + while (++i <= 3) { + print(i," "); + } + try { + throw j=1; + i = 10; + print(i); // should not print this + } catch(int j) { + i = 20; + print(i," "); // should print this + } + i = 15; + print(i,"\n"); +} + +// 1 2 3 20 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_12.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_12.simple new file mode 100644 index 00000000000..288b94d9f8f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_12.simple @@ -0,0 +1,19 @@ +int i; + +void main() { + i = 0; + while (++i <= 3) { + print(i," "); + } + try { + i = 10; + print(i," "); + } catch(int j) { + i = 20; + print(i); // should not print this + } + i = 15; + print(i,"\n"); +} + +// 1 2 3 10 15 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_13.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_13.simple new file mode 100644 index 00000000000..795ef15af0a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_13.simple @@ -0,0 +1,10 @@ +void main() { + try { + throw 4; + } catch (int e) { + print(e," "); + } + print(42,"\n"); +} + +// 4 42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_14.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_14.simple new file mode 100644 index 00000000000..b430dd1bf84 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_14.simple @@ -0,0 +1,10 @@ +void main() { + try { + 15; + } catch(int e) { + print(e); // should not print this + } + print(42,"\n"); +} + +// 42 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_15.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_15.simple new file mode 100644 index 00000000000..9cf0e41a427 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_15.simple @@ -0,0 +1,15 @@ +void main() { + try { + 1; + try { + 2; + } catch(int a) { + print(2); // should not print this + } + throw 1; + } catch(int b) { + print(1,"\n"); // should print this + } +} + +// 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_16.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_16.simple new file mode 100644 index 00000000000..a727f769295 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/exceptions/exceptions_16.simple @@ -0,0 +1,15 @@ +void main() { + int e = 100; + try { + int x = 5; + if (x >= 0) { + throw x+2; + } + print(20); // should not be printed + } catch(int e) { + } + print(e," "); // should print 100 + print(10,"\n"); +} + +// 7 100 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_01.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_01.simple new file mode 100644 index 00000000000..9e275aafb0c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_01.simple @@ -0,0 +1,10 @@ +// Simple multithreaded program with two behaviors. + +void main() { + int x = 5; + spawn { x = 7; }; + print(x,"\n"); +} + +// 5 +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_02.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_02.simple new file mode 100644 index 00000000000..85c775b56d3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_02.simple @@ -0,0 +1,14 @@ +// Simple multithreaded program with two output behaviors +// but with three overall behaviors + +void main() { + int x; + spawn { x = 7; }; + x = 5; + print(x,"\n"); +} + +// 5 +// 5 (yes, it admits two behaviors where the output is 5, one in which the +// store ends up with value 5 and another with value 7 at the location of x) +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_03.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_03.simple new file mode 100644 index 00000000000..1951cdaf0c7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_03.simple @@ -0,0 +1,11 @@ +// This is a poorly synchronized program, which has lots of behaviors. + +void main() { + int x = 5; + spawn {x=x+2;}; + spawn {x=x*2;}; + spawn {x=11;}; + spawn {print(x,"\n");}; +} + +// The search option of krun finds 42 solutions in total! diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_04.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_04.simple new file mode 100644 index 00000000000..2215b97b381 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_04.simple @@ -0,0 +1,15 @@ +// Normally, one would think that the program below has only two behaviors. +// However, it has four, due to the race on the output buffer. + +void main() { + spawn { + int x = 2; + print(x," "); + }; + spawn { + int x = 3; + print(x," "); + }; +} + +// 4 solutions, namely all interleavings of "2_" and "3_", where "_" is space diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_05.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_05.simple new file mode 100644 index 00000000000..73f4c380e3f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_05.simple @@ -0,0 +1,13 @@ +// Program which has infinitely many bahaviors. + +int x, y; + +void main() { + x=1; + y=0; + spawn { x=0; }; + while (1<=x) { + y = y+1; + } + print(y,"\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_06.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_06.simple new file mode 100644 index 00000000000..24a3a5fcadf --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_06.simple @@ -0,0 +1,10 @@ +void main() { + int x; + print("x = "); + x=read(); + int t1 = spawn {x=x/2;}; + int t2 = spawn {x=x+10;}; + join(t1); // comment out for more behaviors + join(t2); // comment out for more behaviors + print(x,"\n"); +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_07.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_07.simple new file mode 100644 index 00000000000..8e45c3d6dff --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_07.simple @@ -0,0 +1,13 @@ +// Fully synchronized + +void main() { + int x; + print("x = "); + x=read(); + int t1 = spawn {x=x/2;}; + int t2 = spawn {join(t1); x=x+10;}; + join(t2); + print(x,"\n"); +} + +// 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_08.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_08.simple new file mode 100644 index 00000000000..b773d45a555 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_08.simple @@ -0,0 +1,57 @@ +// Program that tests both exceptions and threads. The threads are not +// synchronized and indeed manifest into lots of different behaviors. + +void main() { + spawn { + int e; + try { + try { + try { + try { + int x = 1; + print(x); + throw ++x; + } catch(int e) { + print(e); + throw ++e; + } + } catch(int e) { + print(e); + throw ++e; + } + } catch(int e) { + print(e); + throw ++e; + } + } catch(int e) { + print(e); + } + }; + spawn { + int e; + try { + try { + try { + try { + int x = 1; + print(x); + throw ++x; + } catch(int e) { + print(e); + throw ++e; + } + } catch(int e) { + print(e); + throw ++e; + } + } catch(int e) { + print(e); + throw ++e; + } + } catch(int e) { + print(e); + } + }; +} + +// 221 solutions, each outputing two 1, two 2, two 3, two 4 and two 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_09.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_09.simple new file mode 100644 index 00000000000..452783fedd5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_09.simple @@ -0,0 +1,15 @@ +// Poorly synchronized program which has two behaviors. + +void main() { + int x = 1; + spawn { + x=x+1; + rendezvous 1; + }; + x=x+1; + rendezvous 1; + print(x,"\n"); +} + +// 2 +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_10.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_10.simple new file mode 100644 index 00000000000..6cbfab7a133 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_10.simple @@ -0,0 +1,18 @@ +// Well-synchronized program which has only one behavior. + +void main() { + int x = 1; + spawn { + acquire 1; + x=x+1; + release 1; + rendezvous 1; + }; + acquire 1; + x=x+1; + release 1; + rendezvous 1; + print(x,"\n"); +} + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_11.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_11.simple new file mode 100644 index 00000000000..6b861169bc2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_11.simple @@ -0,0 +1,22 @@ +// This is a well-synchronized program, which has only one behavior. + +void main() { + int x = 1; + spawn { + rendezvous 1; + print(x," "); + rendezvous 2; + }; + spawn { + rendezvous 3; + print(x,"\n"); + rendezvous 4; + }; + print(x," "); + x = x+1; + rendezvous 1; rendezvous 2; + x = x+1; + rendezvous 3; rendezvous 4; +} + +// 1 2 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_12.simple b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_12.simple new file mode 100644 index 00000000000..5ecd55fba97 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/2_typed/programs/threads/threads_12.simple @@ -0,0 +1,46 @@ +// This program shows an interesting situation which can happen in many +// language designs: something which looks correct is actually wrong: + +int x; + +void main() { + int n = 5; + x = 1; + for (int i=1; i<=n; ++i) { + int t=i; + spawn { + multX(t); + }; + } + for (int i=1; i<=n; ++i) { + rendezvous i; + } + print(x,"\n"); +} + +void multX(int v) { + acquire 0; + x = x*v; + release 0; + rendezvous v; +} + +// 120, but also many many other behaviors ... + +// The problem is that "spawn multX(i);" does not evaluate the "i" argument, +// it only spawns a thread calculating the expression statement "multX(i);". +// It can be possible that the loop counter "i" is incremented right after the +// spawning but before the evaluation of the expression "multX(i)". In fact, +// it can be the case that all the spawned "multX(i);" statements will evaluate +// their "multX(i)" function calls after the main loop terminates. The threads +// will still see the "i" counter in their environments, but that will hold +// the value 6. Thus, in this case, all threads compute "multX(6)"! You can +// see all these "unexpected" behaviors if you use the search option in krun. +// (please make n smaller, e.g. 2, because theare are LOTS of behaviors here!) +// +// To fix this problem , replace loop "for(i=1;i<=n;++i) {spawn {multX(i);};}" +// with "for(i=1;i<=n;++i) {var t=i; spawn {multX(t);};}". Now, each thread +// sees its own local "t", which has the right value and does not change. +// Now the search option in krun only shows you solutions which output the +// correct factorial. (like before, please make n smaller (2?) when running +// the search option in krun, because theare are LOTS of behaviors here!) diff --git a/pyk/regression-new/pl-tutorial/2_languages/1_simple/Makefile b/pyk/regression-new/pl-tutorial/2_languages/1_simple/Makefile new file mode 100644 index 00000000000..d0b33e79308 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/1_simple/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=1_untyped 2_typed/1_static 2_typed/2_dynamic + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/Makefile b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/Makefile new file mode 100644 index 00000000000..3f8c5c069ca --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/Makefile @@ -0,0 +1,8 @@ +DEF=kool-untyped +EXT=kool +KRUN_FLAGS=--output none + +%/threads.kool: kompile + true + +include ../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/kool-untyped.md b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/kool-untyped.md new file mode 100644 index 00000000000..fe977281c2a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/kool-untyped.md @@ -0,0 +1,1055 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +# KOOL — Untyped + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +Author: Traian Florin Șerbănuță (traian.serbanuta@unibuc.ro) +Organization: University of Bucharest + + +## Abstract + +This is the **K** semantic definition of the untyped KOOL language. KOOL +is aimed at being a pedagogical and research language that captures +the essence of the object-oriented programming paradigm. Its untyped +variant discussed here is simpler than the typed one, ignoring several +intricate aspects of types in the presence of objects. A program +consists of a set of class declarations. Each class can extend at +most one other class (KOOL is single-inheritance). A class can +declare a set of fields and a set of methods, all public and called +the class' _members_. Specifically, KOOL includes the +following features: + +* Class declarations, where a class may or may not explicitly + extend another class. In case a class does not explicitly extend + another class, then it is assumed that it extends the default top-most + and empty (i.e., no members) class called `Object`. Each class + is required to declare precisely one homonymous method, called its + _constructor_. Each valid program should contain one class + named `Main`, whose constructor, `Main()`, takes no + arguments. The execution of a program consists of creating an object + instance of class `Main` and invoking the constructor + `Main()` on it, that is, of executing `new Main();`. + +* All features of SIMPLE (see `examples/simple/untyped`), + i.e., multidimensional arrays, function (here called "method") + abstractions with call-by-value parameter passing style and static + scoping, blocks with locals, input/output, parametric exceptions, and + concurrency via dynamic thread creation/termination and synchronization. + The only change in the syntax of SIMPLE when imported in KOOL is the + function declaration keyword, `function`, which is changed into + `method`. The exact same desugaring macros from SIMPLE are + also included in KOOL. We can think of KOOL's classes as embedding + SIMPLE programs (extended with OO constructs, as discussed next). + +* Object creation using the `new C(e1,...,en)` + expression construct. An object instance of class `C` is first + created and then the constructor `C(e1,...,en)` is implicitly + called on that object. KOOL only allows (and requires) one + constructor per class. The class constructor can be called either + implicitly during a new object creation for the class, or explicitly. + The superclass constructor is **not** implicitly invoked when a + class constructor is invoked; if you want to invoke the superclass + constructor from a subclass constructor then you have to do it + explicitly. + +* An expression construct `this`, which evaluates to the + current object. + +* An expression construct `super`, which is used (only) in + combination with member lookup (see next) to refer to a superclass + field or method. + +* A member lookup expression construct `e.x`, where `e` + is an expression (either an expression expected to evaluate to an object + or the `super` construct) and `x` is a class member name, + that is, a field or a method name. + +* Expression constructs `e instanceOf C` and + `(C) e`, where `e` is an expression expected + to evaluate to an object and `C` a class name. The former + tells whether the class of `e` is a subclass of `C`, + that is, whether `e` can be used as an instance of `C`, + and the latter changes the class of `e` to `C`. These + operations always succeed: the former returns a Boolean value, while + the latter changes the current class of `e` to `C` + regardless of whether it is safe to do so or not. The typed version + of KOOL will check the safety of casting by ensuring that the instance + class of the object is a subclass of `C`. In untyped KOOL we + do not want to perform this check because we want to allow the + programmer maximum of flexibility: if one always accesses only + available members, then the program can execute successfully despite + the potentially unsafe cast. + +There are some specific aspects of KOOL that need to be discussed. + +First, KOOL is higher-order, allowing function abstractions to be +treated like any other values in the language. For example, if +`m` is a method of object `e` then `e.m` +evaluates to the corresponding function abstraction. The function +abstraction is in fact a closure, because in addition to the method +parameters and body it also encapsulates the object value (i.e., the +environment of the object together with its current class—see below) +that `e` evaluates to. This way, function abstractions can be +invoked anywhere and have the capability to change the state of their +object. For example, if `m` is a method of object `e` +which increments a field `c` of `e` when invoked, and if +`getm` is another method of `e` which simply returns +`m` when invoked, then the double application +`(e.getm())()` has the same effect as `e.m()`, that is, +increments the counter `c` of `e`. Note that the +higher-order nature of KOOL was not originally planned; it came as a +natural consequence of evaluating methods to closures and we decided +to keep it. If you do not like it then do not use it. + +Second, since all the fields and methods are public in KOOL and since +they can be redeclared in subclasses, it is not immediately clear how +to lookup the member `x` when we write `e.x` and +`e` is different from `super`. We distinguish two cases, +depending on whether `e.x` occurs in a method invocation +context (i.e., `e.x(...)`) or in a field context. KOOL has +dynamic method dispatch, so if `e.x` is invoked as a method +then `x` will be searched for starting with the instance class of +the object value to which `e` evaluates. If `e.x` +occurs in a non-method-invocation context then `x` will be +treated as a field (although it may hold a method closure due to the +higher-order nature of KOOL) and thus will be searched starting with +the current class of the object value of `e` (which, because of +`this` and casting, may be different from its instance class). +In order to achieve the above, each object value will consist of a +pair holding the current class of the object and an environment stack +with one layer for each class in the object's instance class hierarchy. + +Third, although KOOL is dynamic method dispatch, its capabilities +described above are powerful enough to allow us to mimic static +method dispatch. For example, suppose that you want to invoke method +`m()` statically. Then all you need to do is to declare a +local variable and bind it to `m`, for example `var staticm = m;`, and +then call `staticm()`. This works because +`staticm` is first bound to the method closure that `m` +evaluates to, and then looked up as any local variable when invoked. +We only enable the dynamic method dispatch when we have an object +member on an application position, e.g., `m()`. + +In what follows, we limit our comments to the new, KOOL-specific +aspects of the language. We refer the reader to the untyped SIMPLE +language for documentation on the the remaining features, because +those were all borrowed from SIMPLE. +```k +module KOOL-UNTYPED-SYNTAX + imports DOMAINS-SYNTAX +``` + +## Syntax + +The syntax of KOOL extends that of SIMPLE with object-oriented +constructs. We removed from the **K** annotated syntax of SIMPLE two +constructs, namely the one for function declarations (because we want +to call them `methods` now) and the one for function application +(because application is not strict in the first argument +anymore—needs to initiate dynamic method dispatch). The additional +syntax includes: + +* First, we need a new dedicated identifier, `Object`, for + the default top-most class. +* Second, we rename the `function` keyword of SIMPLE into `method`. +* Third, we add syntax for class declarations together with a + macro making classes which extend nothing to extend `Object`. +* Fourth, we change the strictness attribute of application + into `strict(2)`. +* Finally, we add syntax and corresponding strictness + for the KOOL object-oriented constructs. + +```k + syntax Id ::= "Object" [token] | "Main" [token] + + syntax Stmt ::= "var" Exps ";" + | "method" Id "(" Ids ")" Block // called "function" in SIMPLE + | "class" Id Block // KOOL + | "class" Id "extends" Id Block // KOOL + + syntax Exp ::= Int | Bool | String | Id + | "this" // KOOL + | "super" // KOOL + | "(" Exp ")" [bracket] + | "++" Exp + | Exp "instanceOf" Id [strict(1)] // KOOL + | "(" Id ")" Exp [strict(2)] // KOOL cast + | "new" Id "(" Exps ")" [strict(2)] // KOOL + | Exp "." Id // KOOL + > Exp "[" Exps "]" [strict] + > Exp "(" Exps ")" [strict(2)] // was strict in SIMPLE + | "-" Exp [strict] + | "sizeOf" "(" Exp ")" [strict] + | "read" "(" ")" + > left: + Exp "*" Exp [strict, left] + | Exp "/" Exp [strict, left] + | Exp "%" Exp [strict, left] + > left: + Exp "+" Exp [strict, left] + | Exp "-" Exp [strict, left] + > non-assoc: + Exp "<" Exp [strict, non-assoc] + | Exp "<=" Exp [strict, non-assoc] + | Exp ">" Exp [strict, non-assoc] + | Exp ">=" Exp [strict, non-assoc] + | Exp "==" Exp [strict, non-assoc] + | Exp "!=" Exp [strict, non-assoc] + > "!" Exp [strict] + > left: + Exp "&&" Exp [strict(1), left] + | Exp "||" Exp [strict(1), left] + > "spawn" Block + > Exp "=" Exp [strict(2), right] + + syntax Ids ::= List{Id,","} + + syntax Exps ::= List{Exp,","} [strict, overload(exps)] + syntax Val + syntax Vals ::= List{Val,","} [overload(exps)] + + syntax Block ::= "{" "}" + | "{" Stmt "}" + + syntax Stmt ::= Block + | Exp ";" [strict] + | "if" "(" Exp ")" Block "else" Block [avoid, strict(1)] + | "if" "(" Exp ")" Block [macro] + | "while" "(" Exp ")" Block + | "for" "(" Stmt Exp ";" Exp ")" Block [macro] + | "return" Exp ";" [strict] + | "return" ";" [macro] + | "print" "(" Exps ")" ";" [strict] + | "try" Block "catch" "(" Id ")" Block + | "throw" Exp ";" [strict] + | "join" Exp ";" [strict] + | "acquire" Exp ";" [strict] + | "release" Exp ";" [strict] + | "rendezvous" Exp ";" [strict] + + syntax Stmt ::= Stmt Stmt [right] +``` + + +Old desugaring rules, from SIMPLE +```k + rule if (E) S => if (E) S else {} + rule for(Start Cond; Step) {S} => {Start while (Cond) {S Step;}} + rule var E1::Exp, E2::Exp, Es::Exps; => var E1; var E2, Es; [anywhere] + rule var X::Id = E; => var X; X = E; [anywhere] +``` +New desugaring rule +```k + rule class C:Id S => class C extends Object S // KOOL + +endmodule +``` + +## Semantics + +We first discuss the new configuration of KOOL, which extends that of +SIMPLE. Then we include the semantics of the constructs borrowed from +SIMPLE unchanged; we refrain from discussing those, because they were +already discussed in the **K** definition of SIMPLE. Then we discuss +changes to SIMPLE's semantics needed for the more general meaning of +the previous SIMPLE constructs (for example for thread spawning, +assignment, etc.). Finally, we discuss in detail the +semantics of the additional KOOL constructs. +```k +module KOOL-UNTYPED + imports KOOL-UNTYPED-SYNTAX + imports DOMAINS +``` + +## Configuration + +KOOL removes one cell and adds two nested cells to the configuration +of SIMPLE. The cell which is removed is the one holding the global +environment, because a KOOL program consists of a set of classes only, +with no global declarations. In fact, since informally speaking each +KOOL class now includes a SIMPLE program, it is safe to say that the +global variables in SIMPLE became class fields in KOOL. Let us now +discuss the new cells that are added to the configuration of SIMPLE. + +* The cell `crntObj` holds data pertaining to the current + object, that is, the object environment in which the code in cell + `k` executes: `crntClass` holds the current class (which + can change as methods of the current object are invoked); + `envStack` holds the stack of environments as a list, + each layer corresponding to one class in the objects' instance class + hierarchy; `location`, which is optional, holds the location in + the store where the current object is or has to be located (this is + useful both for method closures and for the semantics of object + creation). + +* The cell `classes` holds all the declared classes, each + class being held in its own `class` cell which contains a name + (`className`), a parent (`extends`), and the actual + member declarations (`declarations`). + +```k + // the syntax declarations below are required because the sorts are + // referenced directly by a production and, because of the way KIL to KORE + // is implemented, the configuration syntax is not available yet + // should simply work once KIL is removed completely + // check other definitions for this hack as well + syntax EnvCell + syntax ControlCell + syntax EnvStackCell + syntax CrntObjCellFragment + + configuration + + + $PGM:Stmt ~> execute + //
// TODO(KORE): support latex annotations #1799 + + .List + .List + //
// TODO(KORE): support latex annotations #1799 + // KOOL + Object + .List + .K + +
+ //
// TODO(KORE): support latex annotations #1799 + .Map + .Map + 0 +
+
+ //
// TODO(KORE): support latex annotations #1799 + .Map + .Set + .Set + .List + .List + 0 + //
// TODO(KORE): support latex annotations #1799 + // KOOL + + // the Map has as its key the first child of the cell, + // in this case the className cell. + Main + Object + .K + + +
+``` + +## Unchanged Semantics from untyped SIMPLE + +The semantics below is taken over from SIMPLE unchanged. +The semantics of function declaration and invocation, including the +use of the special `lambda` abstraction value, needs to change +in order to account for the fact that methods are now invoked into +their object's environment. The semantics of function return actually +stays unchanged. Also, the semantics of program initialization is +different: now we have to create an instance of the `Main` +class which also calls the constructor `Main()`, while in +SIMPLE we only had to invoke the function `Main()`. +Finally, the semantics of thread spawning needs to change, too: the +parent thread needs to also share its object environment with the +spawned thread (in addition to its local environment, like in SIMPLE). +This is needed in order to be able to spawn method invokations under +dynamic method dispatch; for example, `spawn { run(); }` +will need to look up the method `run()` in the newly created +thread, operation which will most likely fail unless the child thread +sees the object environment of the parent thread. Note that the +`spawn` statement of KOOL is more permissive than the threads +of Java. In fact, the latter can be implemented in terms of our +`spawn`—see the program `threads.kool` for a sketch. + +Below is a subset of the values of SIMPLE, which are also values +of KOOL. We will add other values later in the semantics, such as +object and method closures. +```k + syntax Val ::= Int | Bool | String + | array(Int,Int) + syntax Exp ::= Val + syntax Exps ::= Vals + syntax KResult ::= Val + syntax KResult ::= Vals +``` +The semantics below are taken verbatim from the untyped SIMPLE +definition. +```k + syntax KItem ::= "undefined" + + rule var X:Id; => .K ... + Env => Env[X <- L] + ... .Map => L |-> undefined ... + L:Int => L +Int 1 + + + context var _:Id[HOLE]; + + rule var X:Id[N:Int]; => .K ... + Env => Env[X <- L] + ... .Map => L |-> array(L +Int 1, N) + (L +Int 1) ... (L +Int N) |-> undefined ... + L:Int => L +Int 1 +Int N + requires N >=Int 0 + + + syntax Id ::= "$1" [token] | "$2" [token] + rule var X:Id[N1:Int, N2:Int, Vs:Vals]; + => var X[N1]; + { + var $1=X; + for(var $2=0; $2 <= N1 - 1; ++$2) { + var X[N2,Vs]; + $1[$2] = X; + } + } + + + rule X:Id => V ... + ... X |-> L ... + ... L |-> V:Val ... [group(lookup)] + + + context ++(HOLE => lvalue(HOLE)) + rule ++loc(L) => I +Int 1 ... + ... L |-> (I:Int => I +Int 1) ... [group(increment)] + + + rule I1 + I2 => I1 +Int I2 + rule Str1 + Str2 => Str1 +String Str2 + rule I1 - I2 => I1 -Int I2 + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 requires I2 =/=K 0 + rule I1 % I2 => I1 %Int I2 requires I2 =/=K 0 + rule - I => 0 -Int I + rule I1 < I2 => I1 I1 <=Int I2 + rule I1 > I2 => I1 >Int I2 + rule I1 >= I2 => I1 >=Int I2 + + rule V1:Val == V2:Val => V1 ==K V2 + rule V1:Val != V2:Val => V1 =/=K V2 + rule ! T => notBool(T) + rule true && E => E + rule false && _ => false + rule true || _ => true + rule false || E => E + + + rule V:Val[N1:Int, N2:Int, Vs:Vals] => V[N1][N2, Vs] + [anywhere] + + rule array(L,_)[N:Int] => lookup(L +Int N) + [anywhere] + + + rule sizeOf(array(_,N)) => N +``` + +The semantics of function application needs to change into dynamic +method dispatch invocation, which is defined shortly. However, +interestingly, the semantics of return stays unchanged. +```k + rule return(V:Val); ~> _ => V ~> K + + ListItem(fstackFrame(Env,K,XS, CO )) => .List ... + _ => XS + _ => CO + + _ => Env + + syntax Val ::= "nothing" + rule return; => return nothing; + + + rule read() => I ... ListItem(I:Int) => .List ... [group(read)] + + + context (HOLE => lvalue(HOLE)) = _ + + rule loc(L) = V:Val => V ... ... L |-> (_ => V) ... + [group(assignment)] + + + rule {} => .K + rule { S } => S ~> setEnv(Env) ... Env + + + rule S1::Stmt S2::Stmt => S1 ~> S2 + + rule _:Val; => .K + + rule if ( true) S else _ => S + rule if (false) _ else S => S + + rule while (E) S => if (E) {S while(E)S} + + rule print(V:Val, Es => Es); ... ... .List => ListItem(V) + [group(print)] + rule print(.Vals); => .K + + + syntax KItem ::= xstackFrame(Id,Stmt,K,Map,K) + // TODO(KORE): drop the additional production once parsing issue #1842 is fixed + | (Id,Stmt,K,Map,K) + + syntax KItem ::= "popx" + + rule (try S1 catch(X) {S2} => S1 ~> popx) ~> K + + .List => ListItem(xstackFrame(X, S2, K, Env, C)) ... + C + + Env + + rule popx => .K ... + ListItem(_) => .List ... + + rule throw V:Val; ~> _ => { var X = V; S2 } ~> K + + ListItem(xstackFrame(X, S2, K, Env, C)) => .List ... + (_ => C) + + _ => Env +``` +Thread spawning needs a new semantics, because we want the child +thread to also share the object environment with its parent. The new +semantics of thread spawning will be defined shortly. However, +interestingly, the other concurrency constructs keep their semantics +from SIMPLE unchanged. +```k + // TODO(KORE): ..Bag should be . throughout this definition #1772 + rule (... .K H T ... => .Bag) + /* + rule (... . H T ... => .) + */ + Busy => Busy -Set keys(H) + ... .Set => SetItem(T) ... + + rule join T:Int; => .K ... + ... SetItem(T) ... + + rule acquire V:Val; => .K ... + ... .Map => V |-> 0 ... + Busy (.Set => SetItem(V)) + requires (notBool(V in Busy:Set)) [group(acquire)] + + rule acquire V; => .K ... + ... V:Val |-> (N:Int => N +Int 1) ... + + rule release V:Val; => .K ... + ... V |-> (N => N:Int -Int 1) ... + requires N >Int 0 + + rule release V; => .K ... ... V:Val |-> 0 => .Map ... + ... SetItem(V) => .Set ... + + rule rendezvous V:Val; => .K ... + rendezvous V; => .K ... [group(rendezvous)] +``` + +## Unchanged auxiliary operations from untyped SIMPLE + +```k + syntax Stmt ::= mkDecls(Ids,Vals) [function] + rule mkDecls((X:Id, Xs:Ids), (V:Val, Vs:Vals)) => var X=V; mkDecls(Xs,Vs) + rule mkDecls(.Ids,.Vals) => {} + + // TODO(KORE): clarify sort inferences #1803 + syntax Exp ::= lookup(Int) + /* + syntax KItem ::= lookup(Int) + */ + rule lookup(L) => V ... ... L |-> V:Val ... [group(lookup)] + + syntax KItem ::= setEnv(Map) + rule setEnv(Env) => .K ... _ => Env + rule (setEnv(_) => .K) ~> setEnv(_) + // TODO: How can we make sure that the second rule above applies before the first one? + // Probably we'll deal with this using strategies, eventually. + + syntax Exp ::= lvalue(K) + syntax Val ::= loc(Int) + + rule lvalue(X:Id => loc(L)) ... ... X |-> L:Int ... + + context lvalue(_::Exp[HOLE::Exps]) + context lvalue(HOLE::Exp[_::Exps]) + + rule lvalue(lookup(L:Int) => loc(L)) + + + syntax Map ::= Int "..." Int "|->" K [function] + rule N...M |-> _ => .Map requires N >Int M + rule N...M |-> K => N |-> K (N +Int 1)...M |-> K requires N <=Int M +``` + +## Changes to the existing untyped SIMPLE semantics + +When we extend a language, sometimes we need to do more than just add +new language constructs and semantics for them. Sometimes we want to +also extend the semantics of existing language constructs, in order to +get more from them. + +## Program initialization + +In SIMPLE, once all the global declarations were processed, the +function `main()` was invoked. In KOOL, the global +declarations are classes, and their specific semantics is given +shortly; essentially, they are pre-processed one by one and added +into the `class` cell structure in the configuration. +Once all the classes are processed, the computation item +`execute`, which was placed right after the program in the +initial configuration, is reached. In SIMPLE, the program was +initialized by calling the method `main()`. In KOOL, the +program is initialized by creating an object instance of class +`Main`. This will also implicitly call the method +`Main()` (the `Main` class constructor). The emptiness +of the `env` cell below is just a sanity check, to make sure +that the user has not declared anything but classes at the top level +of the program. +```k + syntax KItem ::= "execute" + rule execute => new Main(.Exps); .Map +``` +The semantics of `new` (defined below) requires the +execution of all the class' declarations (and also of its +superclasses'). + + +## Object and method closures + +Before we can define the semantics of method application (previously +called function application in SIMPLE), we need to add two more values +to the language, namely object and method closures: +```k + syntax Val ::= objectClosure(Id, List) + | methodClosure(Id,Int,Ids,Stmt) +``` +An object value consists of an `objectClosure`-wrapped bag +containing the current class of the object and the environment stack +of the object. The current class of an object will always be one of +the classes mapped to an environment in the environment stack of the +object. A method closure encapsulates the method's parameters and +code (last two arguments), as well as the object context in which the +method code should execute. This object context includes the current +class of the object (the first argument of `methodClosure`) and +the object environment stack (located in the object stored at the +location specified as the second argument of `methodClosure`). + + +## Method application + +KOOL has a complex mechanism to invoke methods, because it allows both +dynamic method dispatch and methods as first-class-citizen values (the +latter making it a higher-order language). The invocation mechanism +will be defined later. What is sufficient to know for now is that +the two arguments of the application construct eventually reduce to +values, the first being a method closure and the latter a list of +values. The semantics of the method closure application is then as +expected: the local environment and control are stacked, then we +switch to method closure's class and object environment and execute +the method body. The `mkDecls` construct is the one that came +with the unchanged semantics of SIMPLE above. +```k + syntax KItem ::= fstackFrame(Map,K,List,K) + // TODO(KORE): drop the additional production once parsing issue #1842 is fixed + | (Map,K,K) + + rule methodClosure(Class,OL,Xs,S)(Vs:Vals) ~> K + => mkDecls(Xs,Vs) S return; + Env => .Map + ... OL |-> objectClosure(_, EnvStack)... + //
// TODO(KORE): support latex annotations #1799 + + XS + .List => ListItem(fstackFrame(Env, K, XS, Obj' )) + ... + Obj' => Class EnvStack + +``` + +## Spawn + +We want to extend the semantics of `spawn` to also share the +current object environment with the child thread, in addition to the +current environment. This extension will allow us to also use method +invocations in the spawned statements, which will be thus looked up as +expected, using dynamic method dispatch. This lookup operation would +fail if the child thread did not have access to its parent's object +environment. +```k + rule ... + spawn S => !T:Int ... + Env + Obj + ... + (.Bag => ... + S + Env + !T + Obj + ...) +``` + +## Semantics of the new KOOL constructs + +## Class declaration + +Initially, the classes forming the program are moved into their +corresponding cells: +```k + rule class Class1 extends Class2 { S } => .K ... + ... (.Bag => + Class1 + Class2 + S + ) + ... +``` + +## Method declaration + +Like in SIMPLE, method names are added to the environment and bound +to their code. However, unlike in SIMPLE where each function was +executed in the same environment, namely the program global +environment, a method in KOOL needs to be executed into its object's +environment. Thus, methods evaluate to closures, which encapsulate +their object's context (i.e., the current class and environment stack +of the object) in addition to method's parameters and body. This +approach to bind method names to method closures in the environment +will also allow objects to pass their methods to other objects, to +dynamically change their methods by assigning them other method +closures, and even to allow all these to be done from other objects. +This gives the KOOL programmer a lot of power; one should use this +power wisely, though, because programs can become easily hard to +understand and reason about if one overuses these features. +```k + rule method F:Id(Xs:Ids) S => .K ... + Class:Id + OL:Int + Env => Env[F <- L] + ... .Map => L |-> methodClosure(Class,OL,Xs,S) ... + L => L +Int 1 +``` + +## New + +The semantics of `new` consists of two actions: memory +allocation for the new object and execution of the corresponding +constructor. Then the created object is returned as the result of the +`new` operation; the value returned by the constructor, if any, +is discarded. The current environment and object are stored onto the +stack and recovered after new (according to the semantics of +`return` borrowed from SIMPLE, when the statement +`return this;` in the rule below is reached and evaluated), +because the object creation part of `new` will destroy them. +The rule below also initializes the object creation process by +emptying the local environment and the current object, and allocating +a location in the store where the created object will be eventually +stored (this is what the `storeObj` task after the object +creation task in the rule below will do—its rule is defined +shortly). The location where the object will be stored is also made +available in the `crntObj` cell, so that method closures can +refer to it (see rule above). +```k + syntax KItem ::= "envStackFrame" "(" Id "," Map ")" + + rule new Class:Id(Vs:Vals) ~> K + => create(Class) ~> storeObj ~> Class(Vs); return this; + Env => .Map + L:Int => L +Int 1 + //
// TODO(KORE): support latex annotations #1799 + XS + Obj + => Object + ListItem(envStackFrame(Object, .Map)) + L + + .List => ListItem(fstackFrame(Env, K, XS, Obj )) ... + +``` +The creation of a new object (the memory allocation part only) is +a recursive process, requiring to first create an object for the +superclass. A memory object representation is a layered structure: +for each class on the path from the instance class to the root of the +hierarchy there is a layer including the memory allocated for the +members (both fields and methods) of that class. +```k + syntax KItem ::= create(Id) + + rule create(Class:Id) + => create(Class1) ~> setCrntClass(Class) ~> S ~> addEnvLayer ... + Class + Class1:Id + S + + rule create(Object) => .K ... +``` +The next operation sets the current class of the current object. +This is necessary to be done at each layer, because the current class +of the object is enclosed as part of the method closures (see the +semantics of method declarations above). +```k + syntax KItem ::= setCrntClass(Id) + + rule setCrntClass(C) => .K ... + _ => C +``` +The next operation adds a new tagged environment layer to the +current object and gets ready for the next layer by clearing the +environment (note that `create` expects the environment to be +empty). +```k + syntax KItem ::= "addEnvLayer" + + rule addEnvLayer => .K ... + Env => .Map + Class:Id + .List => ListItem(envStackFrame(Class, Env)) ... +``` +The following operation stores the created object at the location +reserved by `new`. Note that the location reserved by +`new` was temporarily stored in the `crntObj` cell +precisely for this purpose. Now that the newly created object is +stored at its location and that all method closures are aware of it, +the location is unnecessary and thus we delete it from the +`crntObj` cell. +```k + syntax KItem ::= "storeObj" + + rule storeObj => .K ... + CC ES ( L:Int => .Bag) + ... .Map => L |-> objectClosure(CC, ES) ... +``` + +## Self reference + +The semantics of `this` is straightforward: evaluate to the +current object. +```k + rule this => objectClosure(CC, ES) ... + CC ES +``` + +## Object member access + +We can access an object member (field or method) either explicitly, +using the construct `e.x`, or implicitly, using only the member +name `x` directly. The borrowed semantics of SIMPLE will +already lookup a sole name in the local environment. The first rule +below reduces implicit member access to explicit access when the name +cannot be found in the local environment. There are two cases to +analyze for explicit object member access, depending upon whether the +object is a proper object or it is just a redirection to the parent +class via the construct `super`. In the first case, we +evaluate the object expression and lookup the member starting with the +current class (static scoping). Note the use of the conditional +evaluation context. In the second case, we just lookup the member +starting with the superclass of the current class. In both cases, +the `lookupMember` task eventually yields a `lookup(L)` +task for some appropriate location `L`, which will be further +solved with the corresponding rule borrowed from SIMPLE. Note that the +current object is not altered by `super`, so future method +invocations see the entire object, as needed for dynamic method dispatch. +```k + rule X:Id => this . X ... Env:Map + requires notBool(X in keys(Env)) + + context HOLE._::Id requires (HOLE =/=K super) + +// TODO: explain how Assoc matching has been replaced with two rules here. +// Maybe also improve it a bit. + +/* rule objectClosure( Class:Id + ... envStackFrame(Class,EnvC) EStack ) + . X:Id + => lookupMember(envStackFrame(Class,EnvC) EStack, X) */ + + rule objectClosure(Class:Id, ListItem(envStackFrame(Class,Env)) EStack) + . X:Id + => lookupMember(ListItem(envStackFrame(Class,Env)) EStack, X) + rule objectClosure(Class:Id, (ListItem(envStackFrame(Class':Id,_)) => .List) _) + . _X:Id + requires Class =/=K Class' + +/* rule super . X => lookupMember(EStack, X) ... + Class + ... envStackFrame(Class,EnvC) EStack */ + rule super . X => lookupMember(EStack, X) ... + Class:Id + ListItem(envStackFrame(Class,_)) EStack + rule super . _X ... + Class + ListItem(envStackFrame(Class':Id,_)) => .List ... + requires Class =/=K Class' +``` +## Method invocation + +Unlike in SIMPLE, in KOOL application was declared strict only in its +second argument. That is because we want to ensure dynamic method +dispatch when the first argument is a method access. As a +consequence, we need to consider all the cases of interest for the +first argument and to explicitly say what to do in each case. In all +cases except for method access in a proper object (i.e., not +`super`), we want the same behavior for the first argument as +if it was not in a method invocation position. When it is a member +access (the third rule below), we look it up starting with the +instance class of the corresponding object. This ensures dynamic +dispatch for methods; it actually dynamically dispatches field +accesses, too, which is correct in KOOL, because one can assign method +closures to fields and the field appeared in a method invocation +context. The last context declaration below says that method +applications or array accesses are also allowed as first argument to +applications; that is because methods are allowed to return methods +and arrays are allowed to hold methods in KOOL, since it is +higher-order. If that is the case, then we want to evaluate the +method call or the array access. +```k + rule (X:Id => V)(_:Exps) ... + ... X |-> L ... + ... L |-> V:Val ... [group(lookup)] + + rule (X:Id => this . X)(_:Exps) ... + Env + requires notBool(X in keys(Env)) + + context HOLE._::Id(_) requires HOLE =/=K super + + rule (objectClosure(_, EStack) . X + => lookupMember(EStack, X:Id))(_:Exps) + +/* rule (super . X + => lookupMember(EStack,X))(_:Exps)... + Class + ... envStackFrame(Class,_) EStack */ + rule (super . X + => lookupMember(EStack,X))(_:Exps)... + Class + ListItem(envStackFrame(Class,_)) EStack + rule (super . _X)(_:Exps) ... + Class + ListItem(envStackFrame(Class':Id,_)) => .List ... + requires Class =/=K Class' + + // TODO(KORE): fix getKLabel #1801 + rule (A:Exp(B:Exps))(C:Exps) => A(B) ~> #freezerFunCall(C) + rule (A:Exp[B:Exps])(C:Exps) => A[B] ~> #freezerFunCall(C) + rule V:Val ~> #freezerFunCall(C:Exps) => V(C) + syntax KItem ::= "#freezerFunCall" "(" K ")" + /* + context HOLE(_:Exps) + requires getKLabel(HOLE) ==K #klabel(`_(_)`) orBool getKLabel(HOLE) ==K #klabel(`_[_]`) + */ +``` +Eventually, each of the rules above produces a `lookup(L)` +task as a replacement for the method. When that happens, we just +lookup the value at location `L`: +```k + rule (lookup(L) => V)(_:Exps) ... ... L |-> V:Val ... + [group(lookup)] +``` +The value `V` looked up above is expected to be a method closure, +in which case the semantics of method application given above will +apply. Otherwise, the execution will get stuck. + + +## Instance Of + +It searches the object environment for a layer corresponding to the +desired class. It returns `true` iff it can find the class, +otherwise it returns `false`; it only gets stuck when its first +argument does not evaluate to an object. +```k + rule objectClosure(_, ListItem(envStackFrame(C,_)) _) + instanceOf C => true + + rule objectClosure(_, (ListItem(envStackFrame(C,_)) => .List) _) + instanceOf C' requires C =/=K C' +//TODO: remove the sort cast ::Id of C above, when sort inference bug fixed + + rule objectClosure(_, .List) instanceOf _ => false +``` + +## Cast + +In untyped KOOL, we prefer to not check the validity of casting. In +other words, any cast is allowed on any object, simply changing the +current class of the object to the desired class. The execution will +get stuck later if one attempts to access a field which is not +available. Moreover, the execution may complete successfully even +in the presence of invalid casts, provided that each accessed member +during the current execution is, or happens to be, available. +```k + rule (C) objectClosure(_ , EnvStack) => objectClosure(C ,EnvStack) +``` + +## KOOL-specific auxiliary declarations and operations + +Here we define all the auxiliary constructs used in the above +KOOL-specific semantics (those used in the SIMPLE fragment +have already been defined in a corresponding section above). + +## Objects as lvalues + +The current machinery borrowed with the semantics of SIMPLE allows us +to enrich the set of lvalues, this way allowing new means to assign +values to locations. In KOOL, we want object member names to be +lvalues, so that we can assign values to them using the already +existing machinery. The first rule below ensures that the object is +always explicit, the evaluation context enforces the object to be +evaluated, and finally the second rule initiates the lookup for the +member's location based on the current class of the object. +```k + rule lvalue(X:Id => this . X) ... Env + requires notBool(X in keys(Env)) + + context lvalue((HOLE . _)::Exp) + +/* rule lvalue(objectClosure( C + ... envStackFrame(C,EnvC) EStack ) + . X + => lookupMember( envStackFrame(C,EnvC) EStack , + X)) */ + rule lvalue(objectClosure(Class, ListItem(envStackFrame(Class,Env)) EStack) + . X + => lookupMember(ListItem(envStackFrame(Class,Env)) EStack, + X)) + rule lvalue(objectClosure(Class, (ListItem(envStackFrame(Class':Id,_)) => .List) _) + . _X) + requires Class =/=K Class' +``` + +## Lookup member + +It searches for the given member in the given environment stack, +starting with the most concrete class and going up in the hierarchy. +```k + // TODO(KORE): clarify sort inferences #1803 + syntax Exp ::= lookupMember(List, Id) [function] + /* + syntax KItem ::= lookupMember(EnvStackCell,Id) [function] + */ + +// rule lookupMember( envStackFrame(_, ... X|->L ...) ..., X) +// => lookup(L) + rule lookupMember(ListItem(envStackFrame(_, X|->L _)) _, X) + => lookup(L) + +// rule lookupMember( envStackFrame(_, Env ) => .List ..., X) +// requires notBool(X in keys(Env)) + rule lookupMember(ListItem(envStackFrame(_, Env)) Rest, X) => + lookupMember(Rest, X) + requires notBool(X in keys(Env)) +//TODO: beautify the above + +endmodule +``` + +Go to [Lesson 2, KOOL typed dynamic](../2_typed/1_dynamic/kool-typed-dynamic.md). diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool new file mode 100644 index 00000000000..211a2c6aa68 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool @@ -0,0 +1,39 @@ +// Testing cast +// This program is OK in untyped KOOL, but it will be statically rejected +// by the type system of typed KOOL. + +class A { + var x; + method A() { + x=10; + } + method getA() { + return x; + } +} + +class B extends A { + var x; + method B() { + super.A(); + x=20; + } + method getB() { + return x; + } +} + +class Main { + method Main() { + var b = new B(), a = (A) b; + print("b.x = ", b.x, "\n"); + print("a.x = ", a.x, "\n"); + print("a.getB() = ", a.getB(), "\n"); // this should not type check. why? + print("a.getA() = ", a.getA(), "\n"); + } +} + +// b.x = 20 +// a.x = 10 +// a.getB() = 20 +// a.getA() = 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool.out new file mode 100644 index 00000000000..f1cc7fec100 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-1.kool.out @@ -0,0 +1,4 @@ +b.x = 20 +a.x = 10 +a.getB() = 20 +a.getA() = 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool new file mode 100644 index 00000000000..a009faba7c9 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool @@ -0,0 +1,34 @@ +// This program is correct here in the untyped version of KOOL, but +// it will be rejected by the type checker and will get stuck for +// various reasons in typed KOOL. See the same program there for more +// details. For now, imagine that each variable starting with letter +// x (or y, or z) will have the type X (or Y, or Z), and follow the +// comments on the right. + +class X { method X() {} } +class Y extends X { method Y() {} } +class Z extends X { method Z() {} } + +class Main { + method Main() { + var x = new X(); + var y = new Y(); + var z = new Z(); + var xy = new Y(); // "var" is "X" in typed KOOL; ok (Y subclass of X) + var xz = new Z(); // ok (Z is a subclass of X) + var yz = new Z(); // incompatible types; typed KOOL will get stuck + var y1 = new X(); // X is not a Y + var z1 = new X(); // X is not a Z + var x1 = y; // ok (Y is subclass of X) + var x2 = z; // ok (Z is subclass of X) + var y1 = (Y) x; // types ok but produces runtime error in typed KOOL + var z1 = (Z) x; // types ok but produces runtime error in typed KOOL + var y2 = (Y) x1; // types and runs ok (x1 is type Y) + var z2 = (Z) x2; // types and runs ok (x2 is type Z) + var y3 = (Y) z; // inconvertible types + var z3 = (Z) y; // inconvertible types + var o = z; // "o" declared of type "Object" in typed KOOL + var o1 = (Y) o; // types ok but produces runtime error in typed KOOL + print("OK\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool.out new file mode 100644 index 00000000000..d86bac9de59 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/cast-2.kool.out @@ -0,0 +1 @@ +OK diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool new file mode 100644 index 00000000000..5e7040c0f05 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool @@ -0,0 +1,31 @@ +// Testing new, constructor, method invocation. + +class C { + var i,j; + method C(x) { + i = x; + j = ++x; + } + method add(d) { + i = i+d; + j = j-d; + } + method print2() { + print(i, " ", j, "\n"); + } +} + +class Main { + var a,b,o; + method Main(){ + a = b = 5; + o = new C(a); + o.print2(); + o.add(++b); + o.print2(); + } +} + + +// 5 6 +// 11 0 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool.out new file mode 100644 index 00000000000..fec2f75c9e7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/constructor.kool.out @@ -0,0 +1,2 @@ +5 6 +11 0 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool new file mode 100644 index 00000000000..8d0dc600a1a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool @@ -0,0 +1,21 @@ +// Testing dynamic method dispatch + +class C1 { + method C1() {} + method m1() { return 1; } + method m2() { return m1(); } +} + +class C2 extends C1 { + method C2() {} + method m1() { return 2; } +} + +class Main { + method Main() { + var o1 = new C1(), o2 = new C2(); + print(o1.m1(), " ", o1.m2(), " ", o2.m1(), " ", o2.m2(), "\n"); + } +} + +// 1 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool.out new file mode 100644 index 00000000000..1409b1c7c80 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-1.kool.out @@ -0,0 +1 @@ +1 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool new file mode 100644 index 00000000000..21a7811d86b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool @@ -0,0 +1,23 @@ +// Testing dynamic method dispatch + +class C1 { + method C1() {} + method m1() { return 1; } + method m2() { return 100; } + method m3() { return m2(); } +} + +class C2 extends C1 { + method C2() {} + method m2() { return 2; } +} + +class Main { + method Main() { + var o1 = new C1(), o2 = new C2(); + print(o1.m1(), " ", o1.m2(), " ", o1.m3(), " ", + o2.m1(), " ", o2.m2(), " ", o2.m3(), "\n"); + } +} + +// 1 100 100 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool.out new file mode 100644 index 00000000000..fc18a986b58 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-2.kool.out @@ -0,0 +1 @@ +1 100 100 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool new file mode 100644 index 00000000000..9eb457970b7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool @@ -0,0 +1,57 @@ +// This program illustrates a very interesting aspect of the typed version of +// KOOL, namely that if a method of type t1 -> t2 is overridden with +// one of type t1' -> t2', then it should be the case that t2' is a +// subtype of t2 and that t1 is a subtype of t1'. See the same +// program in typed KOOL for more comments in this. For now, just +// follow the control flow of this program keeping in mind that in the +// typed version of KOOL the variables a, b and c will have the types A, +// B, and C, respectively, and note how the type of method m1 is being +// made more concrete when overridden in class C. + +class A { + var x; + method A() { + x = 1; + } + method m1(b) { // meant to have type B->B + b.y = 10; + return b; + } +} + +class B extends A { + var y; + method B() { + super.A(); + y = 100; + } + method m2(b) { + return m1(b); // HOT-SPOT! If we override m1 into one of type C1->C2, + // then it should be the case that C1 <= B and B >= C2. + } +} + +class C extends B { + var z; + method C() { + super.B(); + z = 1000; + } + method m1(a) { + z = a.x; + return this; + } +} + +class Main { + method Main() { + var a = new A(), b = new B(), c = new C(); + print(b.y, " ", c.z, "\n"); + print((b.m2(b)).y, " ", (c.m2(b)).y, "\n"); + print(b.y, " ", c.z, "\n"); + } +} + +// 100 100 +// 10 100 +// 10 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool.out new file mode 100644 index 00000000000..7d443857d52 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/dynamic-dispatch-3.kool.out @@ -0,0 +1,3 @@ +100 1000 +10 100 +10 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool new file mode 100644 index 00000000000..b376873d08e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool @@ -0,0 +1,27 @@ +// This program tests the basic functionality of exceptions. + +class Main { + + method foo() { + try { + throw 5; + print(17); // should not be printed + } + catch(e) { + throw e + 2; // throws 7 + } + throw 1; // should not be reached + } + + method Main() { + try { + foo(); + } + catch(e) { + print(e,"\n"); // should print 7 + } + } + +} + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool.out new file mode 100644 index 00000000000..7f8f011eb73 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-1.kool.out @@ -0,0 +1 @@ +7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool new file mode 100644 index 00000000000..f8c52dc4b06 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool @@ -0,0 +1,45 @@ +// This tests throwing and catching objects. This is, in fact, how exceptions +// are expected to be handled in object-oriented languages. + +class Exception { + var v; + method Exception(v) { + print("Exception ", v, " thrown!\n"); + this.v = v; + } + method get() { + return v; + } +} + +class Exception2 extends Exception { + method Exception2(v) { + Exception(v); + } +} + +class Main { + + method foo() { + try { + throw new Exception(5); + print(17); // should not be printed + } catch(e) { // "Exception2 e" in typed KOOL + throw new Exception2(e.get() + 2); // unreachable in typed KOOl! + } + throw new Exception(-1); // should not be reached + } + + method Main() { + try { + foo(); + } catch(e) { + print(e.get(),"\n"); // should print 7 (5 in typed KOOL) + } + } + +} + +// Exception 5 thrown! +// Exception 7 thrown! +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool.out new file mode 100644 index 00000000000..3d6918359da --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/exceptions-2.kool.out @@ -0,0 +1,3 @@ +Exception 5 thrown! +Exception 7 thrown! +7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool new file mode 100644 index 00000000000..a74eb8f7b60 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool @@ -0,0 +1,15 @@ +// Testing recursion + +class Main { + method f(x) { + if (x <= 1) { return 1; } + else { return x * f(x - 1); } + } + method Main() { + print(f(f(5)), "\n"); + } +} + +// (5!)! + + diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool.out new file mode 100644 index 00000000000..02041646d6c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/factorial.kool.out @@ -0,0 +1 @@ +6689502913449127057588118054090372586752746333138029810295671352301633557244962989366874165271984981308157637893214090552534408589408121859898481114389650005964960521256960000000000000000000000000000 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/failing/cycle.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/failing/cycle.kool new file mode 100644 index 00000000000..31534cf2c17 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/failing/cycle.kool @@ -0,0 +1,19 @@ +// This program shows a cycle in the class hierachy. None of the +// dynamic semantics catches it, both of them hanging on creating a +// new object. The program should run if you don't create any new object. + +class C1 extends C2 { + method C1() { } +} + +class C2 extends C1 { + method C2() { } +} + +class Main { + method Main() { +// Should work if you comment next line + new C1(); + print("No cycle detected\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool new file mode 100644 index 00000000000..5f917dce2ed --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool @@ -0,0 +1,34 @@ +// Testing shadowing of a field by another field and +// whether the object stack environment works. + +class C1 { + var x, y; + method C1() {} + method setx1(v) { x = v; } + method sety1(v) { y = v; } + method getx1() { return x; } + method gety1() { return y; } +} + +class C2 extends C1 { + var y; + method C2() {} + method sety2(v) { y = v; } + method getx2() { return x; } + method gety2() { return y; } +} + +class Main { + method Main() { + var o2 = new C2(); + o2.setx1(11); + o2.sety1(12); + o2.sety2(99); + print(o2.getx1(), " "); + print(o2.gety1(), " "); + print(o2.getx2(), " "); + print(o2.gety2(), "\n"); + } +} + +// 11 12 11 99 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool.out new file mode 100644 index 00000000000..f5d5226a299 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-1.kool.out @@ -0,0 +1 @@ +11 12 11 99 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool new file mode 100644 index 00000000000..76da636ba59 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool @@ -0,0 +1,29 @@ +// Testing local variable shadowing a field + +class C { + var f; + method C(v) { + f = v; + } + method get() { return f; } +} + +class G { + var o; + method G(o) { + this.o = o; + } + method d() { + var f = 9; + return (o.get()); + } +} + +class Main { + method Main() { + var t = new C(1), y = new G(t); + print(y.d(), "\n"); + } +} + +// 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field-shadowing-2.kool.out @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool new file mode 100644 index 00000000000..4e269e70756 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool @@ -0,0 +1,10 @@ +// Testing field initialization and access. + +class Main { + var a=3; + method Main() { + print("a = ", a, "\n"); + } +} + +// a = 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool.out new file mode 100644 index 00000000000..367805cb8ae --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/field.kool.out @@ -0,0 +1 @@ +a = 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool new file mode 100644 index 00000000000..7500409c703 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool @@ -0,0 +1,9 @@ +// Testing main + +class Main { + method Main() { + print("Hello world!\n"); + } +} + +// Hello world! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool.out new file mode 100644 index 00000000000..cd0875583aa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/hello-world.kool.out @@ -0,0 +1 @@ +Hello world! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool new file mode 100644 index 00000000000..13852aef426 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool @@ -0,0 +1,38 @@ +// Testing instance of + +class C { + method C() {} + method test() { + print("Instance of class C"); + if (this instanceOf C1) { print(1); } + if (this instanceOf C2) { print(2); } + if (this instanceOf C3) { print(3); } + print("\n"); + } +} + +class C1 extends C { + method C1() {} +} + +class C2 extends C { + method C2() {} +} + +class C3 extends C { + method C3() {} +} + +class Main { + method Main() { + (new C()).test(); + (new C1()).test(); + (new C2()).test(); + (new C3()).test(); + } +} + +// Instance of class C +// Instance of class C1 +// Instance of class C2 +// Instance of class C3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool.out new file mode 100644 index 00000000000..0ca66380ed7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/instanceOf.kool.out @@ -0,0 +1,4 @@ +Instance of class C +Instance of class C1 +Instance of class C2 +Instance of class C3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/matrix.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/matrix.kool new file mode 100644 index 00000000000..f45071ac15a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/1_untyped/tests/matrix.kool @@ -0,0 +1,99 @@ +// This program tests multi-dimensional arrays. + +class Matrix { + var lines, columns, matrix; + + method Matrix(x,y) { + lines = x; + columns = y; + var a[x,y]; + matrix = a; + } + + method readMatrix() { + for (var i=0; i 0 && array[j] > v) { // doing the loop only up to 1 + array[j + 1] = array[j]; + j = j - 1; + } + if (array[0] > v) { + array[1] = array[0]; + array[0] = v; + } else { array[j+1] = v; } + } + } + + method bubbleSort() { + for (var i=0; i array[j + 1]) { + var t = array[j + 1]; + array[j + 1] = array[j]; + array[j] = t; + } + } + } + } + + method siftDown(root, bottom) { + var done = false, maxChild; + while (root*2 <= bottom && !done) { + if (root*2 == bottom) { + maxChild = root*2; + } + else { + if (array[root*2] > array[root*2 + 1]) { + maxChild = root*2; + } + else { + maxChild = root*2 + 1; + } + } + if (array[root] < array[maxChild]) { + var t = array[root]; + array[root] = array[maxChild]; + array[maxChild] = t; + root = maxChild; + } + else { + done = true; + } + } + } + + method heapSort() { + var i = size/2 - 1; + while (i >= 0) { + siftDown(i, size - 1); + i = i - 1; + } + i = size - 1; + while (i >= 1 ) { + var t = array[0]; + array[0] = array[i] ; + array[i] = t; + siftDown(0, i - 1); + i = i - 1; + } + } + +} + + +class Main { + + method map(m,f) { + for (var i=0; i Types "->" Type + syntax Types ::= List{Type,","} +``` + +## Declarations + +```k + syntax Param ::= Type Id + syntax Params ::= List{Param,","} + + syntax Stmt ::= Type Exps ";" [avoid] + | Type Id "(" Params ")" Block // stays like in typed SIMPLE + | "class" Id Block // KOOL + | "class" Id "extends" Id Block // KOOL +``` + +## Expressions + +```k + syntax Exp ::= Int | Bool | String | Id + | "this" // KOOL + | "super" // KOOL + | "(" Exp ")" [bracket] + | "++" Exp + | Exp "instanceOf" Id [strict(1)] // KOOL + | "(" Id ")" Exp [strict(2)] // KOOL cast + | "new" Id "(" Exps ")" [strict(2)] // KOOL + | Exp "." Id // KOOL + > Exp "[" Exps "]" [strict] + > Exp "(" Exps ")" [strict(2)] // was strict in SIMPLE + | "-" Exp [strict] + | "sizeOf" "(" Exp ")" [strict] + | "read" "(" ")" + > left: + Exp "*" Exp [strict, left] + | Exp "/" Exp [strict, left] + | Exp "%" Exp [strict, left] + > left: + Exp "+" Exp [strict, left] + | Exp "-" Exp [strict, left] + > non-assoc: + Exp "<" Exp [strict, non-assoc] + | Exp "<=" Exp [strict, non-assoc] + | Exp ">" Exp [strict, non-assoc] + | Exp ">=" Exp [strict, non-assoc] + | Exp "==" Exp [strict, non-assoc] + | Exp "!=" Exp [strict, non-assoc] + > "!" Exp [strict] + > left: + Exp "&&" Exp [strict(1), left] + | Exp "||" Exp [strict(1), left] + > "spawn" Block + > Exp "=" Exp [strict(2), right] + + syntax Exps ::= List{Exp,","} [strict, overload(exps)] + syntax Val + syntax Vals ::= List{Val,","} [overload(exps)] +``` + +## Statements + +```k + syntax Block ::= "{" "}" + | "{" Stmt "}" + + syntax Stmt ::= Block + | Exp ";" [strict] + | "if" "(" Exp ")" Block "else" Block [avoid, strict(1)] + | "if" "(" Exp ")" Block [macro] + | "while" "(" Exp ")" Block + | "for" "(" Stmt Exp ";" Exp ")" Block [macro] + | "print" "(" Exps ")" ";" [strict] + | "return" Exp ";" [strict] + | "return" ";" + | "try" Block "catch" "(" Param ")" Block + | "throw" Exp ";" [strict] + | "join" Exp ";" [strict] + | "acquire" Exp ";" [strict] + | "release" Exp ";" [strict] + | "rendezvous" Exp ";" [strict] + + syntax Stmt ::= Stmt Stmt [right] +``` + +## Desugaring macros + +```k + rule if (E) S => if (E) S else {} + rule for(Start Cond; Step) {S::Stmt} => {Start while(Cond){S Step;}} + rule T::Type E1::Exp, E2::Exp, Es::Exps; => T E1; T E2, Es; [anywhere] + rule T::Type X::Id = E; => T X; X = E; [anywhere] + + rule class C:Id S => class C extends Object S // KOOL + +endmodule +``` + +## Semantics + +We first discuss the new configuration, then we include the semantics of +the constructs borrowed from SIMPLE which stay unchanged, then those +whose semantics had to change, and finally the semantics of the +KOOL-specific constructs. +```k +module KOOL-TYPED-DYNAMIC + imports KOOL-TYPED-DYNAMIC-SYNTAX + imports DOMAINS +``` + +## Configuration + +The configuration of dynamically typed KOOL is almost identical to +that of its untyped variant. The only difference is the cell +`return`, inside the `control` cell, whose role is to +hold the expected return type of the invoked method. That is because +we want to dynamically check that the value that a method returns has +the expected type. +```k + // the syntax declarations below are required because the sorts are + // referenced directly by a production and, because of the way KIL to KORE + // is implemented, the configuration syntax is not available yet + // should simply work once KIL is removed completely + // check other definitions for this hack as well + syntax EnvCell + syntax ControlCellFragment + syntax EnvStackCell + syntax CrntObjCellFragment + + configuration + + + ($PGM:Stmt ~> execute) + //
// TODO(KORE): support latex annotations #1799 + + .List + .List + void // KOOL + //
// TODO(KORE): support latex annotations #1799 + // KOOL + Object + .List + .K + +
+ //
// TODO(KORE): support latex annotations #1799 + .Map + .Map + 0 +
+
+ //
// TODO(KORE): support latex annotations #1799 + .Map + .Set + .Set + .List + .List + 0 + //
// TODO(KORE): support latex annotations #1799 + // KOOL + + Main + Object + .K + + +
+``` + +## Unchanged semantics from dynamically typed SIMPLE + +The semantics below is taken over from dynamically typed SIMPLE +unchanged. Like for untyped KOOL, the semantics of function/method +declaration and invocation, and of program initialization needs to +change. Moreover, due to subtyping, the semantics of several imported +SIMPLE constructs can be made more general, such as that of the +return statement, that of the assignment, and that of the exceptions. +We removed all these from the imported semantics of SIMPLE below and +gave their modified semantics right after, together with the extended +semantics of thread spawning (which is identical to that of untyped +KOOL). +```k + syntax Val ::= Int | Bool | String + | array(Type,Int,Int) + syntax Exp ::= Val + syntax Exps ::= Vals + syntax KResult ::= Val + syntax KResult ::= Vals + + + syntax KItem ::= undefined(Type) + + rule T:Type X:Id; => .K ... + Env => Env[X <- L] + ... .Map => L |-> undefined(T) ... + L:Int => L +Int 1 + + + rule T:Type X:Id[N:Int]; => .K ... + Env => Env[X <- L] + ... .Map => L |-> array(T, L +Int 1, N) + (L +Int 1)...(L +Int N) |-> undefined(T) ... + L:Int => L +Int 1 +Int N + requires N >=Int 0 + + context _:Type _::Exp[HOLE::Exps]; + + + syntax Id ::= "$1" [token] | "$2" [token] + rule T:Type X:Id[N1:Int, N2:Int, Vs:Vals]; + => T[] X[N1]; + { + T[][] $1=X; + for(int $2=0; $2 <= N1 - 1; ++$2) { + T X[N2,Vs]; + $1[$2] = X; + } + } + + + rule X:Id => V ... + ... X |-> L ... + ... L |-> V:Val ... [group(lookup)] + + + context ++(HOLE => lvalue(HOLE)) + rule ++loc(L) => I +Int 1 ... + ... L |-> (I:Int => I +Int 1) ... [group(increment)] + + + rule I1 + I2 => I1 +Int I2 + rule Str1 + Str2 => Str1 +String Str2 + rule I1 - I2 => I1 -Int I2 + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 requires I2 =/=K 0 + rule I1 % I2 => I1 %Int I2 requires I2 =/=K 0 + rule - I => 0 -Int I + rule I1 < I2 => I1 I1 <=Int I2 + rule I1 > I2 => I1 >Int I2 + rule I1 >= I2 => I1 >=Int I2 + rule V1:Val == V2:Val => V1 ==K V2 + rule V1:Val != V2:Val => V1 =/=K V2 + rule ! T => notBool(T) + rule true && E => E + rule false && _ => false + rule true || _ => true + rule false || E => E + + + rule V:Val[N1:Int, N2:Int, Vs:Vals] => V[N1][N2, Vs] + [anywhere] + + rule array(_:Type, L:Int, M:Int)[N:Int] => lookup(L +Int N) + requires N >=Int 0 andBool N N + + + syntax Val ::= nothing(Type) + rule return; => return nothing(T); ... T + + + rule read() => I ... ListItem(I:Int) => .List ... [group(read)] + + + context (HOLE => lvalue(HOLE)) = _ + + + rule {} => .K + rule { S } => S ~> setEnv(Env) ... Env + + + rule S1:Stmt S2:Stmt => S1 ~> S2 + + + rule _:Val; => .K + + + rule if ( true) S else _ => S + rule if (false) _ else S => S + + + rule while (E) S => if (E) {S while(E)S} + + + rule print(V:Val, Es => Es); ... ... .List => ListItem(V) + requires typeOf(V) ==K int orBool typeOf(V) ==K string [group(print)] + rule print(.Vals); => .K + + + rule (... .K H T ... => .Bag) + Busy => Busy -Set keys(H) + ... .Set => SetItem(T) ... + + rule join T:Int; => .K ... + ... SetItem(T) ... + + rule acquire V:Val; => .K ... + ... .Map => V |-> 0 ... + Busy (.Set => SetItem(V)) + requires (notBool(V in Busy:Set)) [group(acquire)] + + rule acquire V; => .K ... + ... V:Val |-> (N:Int => N +Int 1) ... + + rule release V:Val; => .K ... + ... V |-> (N => N:Int -Int 1) ... + requires N >Int 0 + + rule release V; => .K ... ... V:Val |-> 0 => .Map ... + ... SetItem(V) => .Set ... + + rule rendezvous V:Val; => .K ... + rendezvous V; => .K ... [group(rendezvous)] +``` + +## Unchanged auxiliary operations from dynamically typed SIMPLE + +```k + syntax Stmt ::= mkDecls(Params,Vals) [function] + rule mkDecls((T:Type X:Id, Ps:Params), (V:Val, Vs:Vals)) + => T X=V; mkDecls(Ps,Vs) + rule mkDecls(.Params,.Vals) => {} + + syntax Exp ::= lookup(Int) + rule lookup(L) => V ... ... L |-> V:Val ... [group(lookup)] + + syntax KItem ::= setEnv(Map) + rule setEnv(Env) => .K ... _ => Env + rule (setEnv(_) => .K) ~> setEnv(_) + + syntax Exp ::= lvalue(K) + syntax Val ::= loc(Int) + rule lvalue(X:Id => loc(L)) ... ... X |-> L:Int ... + + context lvalue(_::Exp[HOLE::Exps]) + context lvalue(HOLE::Exp[_::Exps]) + + rule lvalue(lookup(L:Int) => loc(L)) + + syntax Type ::= Type "<" Vals ">" [function] + rule T:Type<_,Vs:Vals> => T[] + rule T:Type<.Vals> => T + + syntax Map ::= Int "..." Int "|->" K [function] + rule N...M |-> _ => .Map requires N >Int M + rule N...M |-> K => N |-> K (N +Int 1)...M |-> K requires N <=Int M + + syntax Type ::= typeOf(K) [function] + rule typeOf(_:Int) => int + rule typeOf(_:Bool) => bool + rule typeOf(_:String) => string + rule typeOf(array(T,_,_)) => (T[]) + rule typeOf(undefined(T)) => T + rule typeOf(nothing(T)) => T + + syntax Types ::= getTypes(Params) [function] + rule getTypes(T:Type _:Id) => T, .Types + rule getTypes(T:Type _:Id, P, Ps) => T, getTypes(P,Ps) + rule getTypes(.Params) => void, .Types +``` + +## Changes to the existing dynamically typed SIMPLE semantics + +We extend/change the semantics of several SIMPLE constructs in order +to take advantage of the richer KOOL semantic infrastructure and thus +get more from the existing SIMPLE constructs. + + +## Program initialization + +Like in untyped KOOL. +```k + syntax KItem ::= "execute" + rule execute => new Main(.Exps); .Map +``` + +## Method application + +The only change to untyped KOOL's values is that method closures are +now typed (their first argument holds their type): +```k + syntax Val ::= objectClosure(Id,List) + | methodClosure(Type,Id,Int,Params,Stmt) +``` +The type held by a method clossure will be the entire type of the +method, not only its result type like the lambda-closure of typed +SIMPLE. The reason for this change comes from the the need to +dynamically upcast values when passed to contexts where values of +superclass types are expected; since we want method closures to be +first-class-citizen values in our language, we have to be able to +dynamically upcast them, and in order to do that elegantly it is +convenient to store the entire ``current type'' of the method closure +instead of just its result type. Note that this was unnecessary in +the semantics of the dynamically typed SIMPLE language. + +Method closure application needs to also set a new return type in +the `return` cell, like in dynamically typed SIMPLE, in order +for the values returned by its body to be checked against the return +type of the method. To do this correctly, we also need to stack the +current status of the `return` cell and then pop it when the +method returns. We have to do the same with the current object +environment, so we group them together in the stack frame. +```k + syntax KItem ::= fstackFrame(Map, K, List, Type, K) + + rule methodClosure(_->T,Class,OL,Ps,S)(Vs:Vals) ~> K + => mkDecls(Ps,Vs) S return; + Env => .Map + ... OL |-> objectClosure(_, EStack)... + //
// TODO(KORE): support latex annotations #1799 + + .List => ListItem(fstackFrame(Env, K, XS, T', Obj' )) ... + XS + T' => T + Obj' => Class EStack + +``` +At method return, we have to check that the type of the returned +value is a subtype of the expected return type. Moreover, if that is +the case, then we also upcast the returned value to one of the +expected type. The computation item `unsafeCast(V,T)` changes +the typeof `V` to `T` without any additional checks; however, it only +does it when `V` is an object or a method, otherwise it returns `V` +unchanged. +```k + rule return V:Val; ~> _ + => subtype(typeOf(V), T) ~> true? ~> unsafeCast(V, T) ~> K + + + ListItem(fstackFrame(Env, K, XS, RT, CO )) => .List ... + _ => XS + T:Type => RT + _ => CO + + _ => Env +``` + +## Assignment + +Typed KOOL allows to assign subtype instance values to supertype +lvalues. The semantics of assignment below is similar in spirit to +dynamically typed SIMPLE's, but a check is performed that the assigned +value's type is a subtype of the location's type. If that is the +case, then the assigned value is returned as a result and stored, but +it is upcast appropriately first, so the context will continue to see +a value of the expected type of the location. Note that the type of a +location is implicit in the type of its contents and it never changes +during the execution of a program; its type is assigned when the +location is allocated and initialized, and then only type-preserving +values are allowed to be stored in each location. +```k + rule loc(L) = V:Val + => subtype(typeOf(V),typeOf(V')) ~> true? + ~> unsafeCast(V, typeOf(V')) ... + ... L |-> (V' => unsafeCast(V, typeOf(V'))) ... + [group(assignment)] +``` + +## Typed exceptions + +Exceptions are propagated now until a catch that can handle them is +encountered. +```k + syntax KItem ::= xstackFrame(Param, Stmt, K, Map, K) + syntax KItem ::= "popx" + + rule (try S1 catch(P) S2 => S1 ~> popx) ~> K + + .List => ListItem(xstackFrame(P, S2, K, Env, C)) ... + C + + Env + + rule popx => .K ... + ListItem(_) => .List ... + + rule throw V:Val; ~> _ + => if (subtype(typeOf(V),T)) { T X = V; S2 } else { throw V; } ~> K + + + ListItem(xstackFrame(T:Type X:Id, S2, K, Env, C)) => .List ... + (_ => C) + + _ => Env +``` + +## Spawn + +Like in untyped KOOL. +```k + rule ... + spawn S => !T:Int ... + Env + Obj + ... + (.Bag => ... + S + Env + !T + Obj + ...) +``` + +## Semantics of the new KOOL constructs + +## Class declaration + +Like in untyped KOOL. +```k + rule class Class1 extends Class2 { S } => .K ... + ... (.Bag => + Class1 + Class2 + S + ) + ... +``` + +## Method declaration + +Methods are now typed and we need to store their types in their +closures, so that their type contract can be checked at invocation +time. The rule below is conceptually similar to that of untyped KOOL; +the only difference is the addition of the types. +```k + rule T:Type F:Id(Ps:Params) S => .K ... + C + OL + Env => Env[F <- L] + ... .Map => L|->methodClosure(getTypes(Ps)->T,C,OL,Ps,S) ... + L => L +Int 1 +``` + +## New + +The semantics of `new` in dynamically typed KOOL is also +similar to that in untyped KOOL, the main difference being the +management of the return types. Indeed, when a new object is created +we also have to stack the current type in the `return` cell in +order to be recovered after the creation of the new object. Only the +first rule below needs to be changed; the others are identical to +those in untyped KOOL. +```k + syntax KItem ::= envStackFrame(Id, Map) + + rule new Class:Id(Vs:Vals) ~> K + => create(Class) ~> (storeObj ~> ((Class(Vs)); return this;)) + Env => .Map + L:Int => L +Int 1 + //
// TODO(KORE): support latex annotations #1799 + + XS + Obj + => Object + ListItem(envStackFrame(Object, .Map)) + L + + T => Class + .List => ListItem(fstackFrame(Env, K, XS, T, Obj)) ... + + + syntax KItem ::= create(Id) + + rule create(Class:Id) + => create(Class1) ~> setCrntClass(Class) ~> S ~> addEnvLayer ... + Class + Class1:Id + S + + rule create(Object) => .K ... + + syntax KItem ::= setCrntClass(Id) + + rule setCrntClass(C) => .K ... + _ => C + + syntax KItem ::= "addEnvLayer" + + rule addEnvLayer => .K ... + Env => .Map + Class:Id + .List => ListItem(envStackFrame(Class, Env)) ... + + syntax KItem ::= "storeObj" + + rule storeObj => .K ... + + Class + EStack + ( L:Int => .Bag) + + ... .Map => L |-> objectClosure(Class, EStack) ... +``` + +## Self reference + +Like in untyped KOOL. +```k + rule this => objectClosure(Class, EStack) ... + + Class + EStack + ... + +``` + +## Object member access + +Like in untyped KOOL. +```k + rule X:Id => this . X ... Env:Map + requires notBool(X in keys(Env)) + + context HOLE . _::Id requires (HOLE =/=K super) + +/* rule objectClosure( Class:Id + ... ListItem((Class,EnvC:EnvCell)) EStack ) + . X:Id + => lookupMember( ListItem((Class,EnvC)) EStack , X) */ + rule objectClosure(Class:Id, + ListItem(envStackFrame(Class,Env)) EStack) + . X:Id + => lookupMember(ListItem(envStackFrame(Class,Env)) EStack, X) + rule objectClosure(Class:Id, + (ListItem(envStackFrame(Class':Id,_)) => .List) _EStack) + . _X:Id + requires Class =/=K Class' + +/* rule super . X => lookupMember(EStack, X) ... + Class + ... ListItem((Class,EnvC:EnvCell)) EStack */ + rule super . X => lookupMember(EStack, X) ... + Class:Id + ListItem(envStackFrame(Class,_)) EStack + rule super . _X ... + Class:Id + (ListItem(envStackFrame(Class':Id,_)) => .List) _EStack + requires Class =/=K Class' +``` + +## Method invocation + +The method lookup is the same as in untyped KOOL. +```k + rule (X:Id => V)(_:Exps) ... + ... X |-> L ... + ... L |-> V:Val ... [group(lookup)] + + rule (X:Id => this . X)(_:Exps) ... + Env + requires notBool(X in keys(Env)) + + context HOLE._::Id(_) requires HOLE =/=K super + + rule (objectClosure(_, EStack) . X + => lookupMember(EStack, X:Id))(_:Exps) + +/* rule (super . X + => lookupMember(EStack,X))(_:Exps)... + Class + ... ListItem((Class,_)) EStack */ + rule (super . X + => lookupMember(EStack,X))(_:Exps)... + Class:Id + ListItem(envStackFrame(Class,_)) EStack + rule (super . _X)(_:Exps)... + Class:Id + (ListItem(envStackFrame(Class':Id,_)) => .List) _EStack + requires Class =/=K Class' + + // TODO(KORE): fix getKLabel #1801 + rule (A:Exp(B:Exps))(C:Exps) => A(B) ~> #freezerFunCall(C) + rule (A:Exp[B:Exps])(C:Exps) => A[B] ~> #freezerFunCall(C) + rule V:Val ~> #freezerFunCall(C:Exps) => V(C) + syntax KItem ::= "#freezerFunCall" "(" K ")" + /* + context HOLE(_:Exps) + requires getKLabel HOLE ==KLabel '_`(_`) orBool getKLabel HOLE ==KLabel '_`[_`] + */ + + rule (lookup(L) => V)(_:Exps) ... ... L |-> V:Val ... + [group(lookup)] +``` + +## Instance of + +Like in untyped KOOL. +```k + rule objectClosure(_, ListItem(envStackFrame(C,_)) _) + instanceOf C => true + + rule objectClosure(_, (ListItem(envStackFrame(C::Id,_)) => .List) _) + instanceOf C' requires C =/=K C' + + rule objectClosure(_, .List) instanceOf _ => false +``` + +## Cast + +Unlike in untyped KOOL, in typed KOOL we actually check that the object +can indeed be cast to the claimed type. +```k + rule (C:Id) objectClosure(Irrelevant, EStack) + => objectClosure(Irrelevant, EStack) instanceOf C ~> true? + ~> objectClosure(C, EStack) +``` + +## KOOL-specific auxiliary declarations and operations + +## Objects as lvalues + +Like in untyped KOOL. +```k + rule lvalue(X:Id => this . X) ... Env + requires notBool(X in keys(Env)) + + context lvalue((HOLE . _)::Exp) + +/* rule lvalue(objectClosure( C + ... ListItem((C,EnvC:EnvCell)) EStack ) + . X + => lookupMember( ListItem((C,EnvC)) EStack , + X)) */ + rule lvalue(objectClosure(C:Id, + ListItem(envStackFrame(C,Env)) EStack) + . X + => lookupMember(ListItem(envStackFrame(C,Env)) EStack, + X)) + rule lvalue(objectClosure(C, + (ListItem(envStackFrame(C',_)) => .List) _EStack) + . _X) + requires C =/=K C' +``` + +## Lookup member + +Like in untyped KOOL. +```k + syntax Exp ::= lookupMember(List,Id) [function] + + rule lookupMember(ListItem(envStackFrame(_, X |-> L _)) _, X) => lookup(L) + + // TODO: fix rule below as shown once we support functions with deep rewrites + // rule lookupMember( ListItem((_, Env )) => .List + // ..., X) + // requires notBool(X in keys(Env)) + rule lookupMember(ListItem(envStackFrame(_, Env)) L, X) + => lookupMember(L, X) + requires notBool(X in keys(Env)) +``` + +## `typeOf` for the additional values} + +```k + rule typeOf(objectClosure(C,_)) => C + rule typeOf(methodClosure(T:Type,_,_,_Ps:Params,_)) => T +``` + +## Subtype checking + +The subclass relation induces a subtyping relation. +```k + syntax Exp ::= subtype(Types,Types) + + rule subtype(T:Type, T) => true + + rule subtype(C1:Id, C:Id) => subtype(C2, C) ... + C1 + C2:Id + requires C1 =/=K C + + rule subtype(Object,Class:Id) => false + requires Class =/=K Object + + rule subtype(Ts1->T2,Ts1'->T2') => subtype(((T2)::Type,Ts1'),((T2')::Type,Ts1)) + +// Note that the following rule would be wrong! +// rule subtype(T[],T'[]) => subtype(T,T') + + rule subtype((T:Type,Ts),(T':Type,Ts')) => subtype(T,T') && subtype(Ts,Ts') + requires Ts =/=K .Types + rule subtype(.Types,.Types) => true +``` + +## Unsafe Casting + +Performs unsafe casting. One should only use it in combination with +the subtype relation above. +```k + syntax Val ::= unsafeCast(Val,Type) [function] + + rule unsafeCast(objectClosure(_,EStack), C:Id) + => objectClosure(C,EStack) + + rule unsafeCast(methodClosure(_T',C,OL,Ps,S), T) => methodClosure(T,C,OL,Ps,S) + + rule unsafeCast(V:Val, T:Type) => V requires typeOf(V) ==K T +``` + +## Generic guard + +A generic computational guard: it allows the computation to continue +only if a prefix guard evaluates to true. +```k + syntax KItem ::= "true?" + rule true ~> true? => .K + +endmodule +``` + +Go to [Lesson 3, KOOL typed static](../2_static/kool-typed-static.md). diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-1.kool.out new file mode 100644 index 00000000000..f1cc7fec100 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-1.kool.out @@ -0,0 +1,4 @@ +b.x = 20 +a.x = 10 +a.getB() = 20 +a.getA() = 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-2.kool.out new file mode 100644 index 00000000000..d86bac9de59 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/cast-2.kool.out @@ -0,0 +1 @@ +OK diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.in b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.in new file mode 100644 index 00000000000..f599e28b8ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.in @@ -0,0 +1 @@ +10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.out new file mode 100644 index 00000000000..5be199e0e74 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/collatz.kool.out @@ -0,0 +1,11 @@ +Testing Collatz' conjecture up to what number? Testing Collatz' conjecture for n = 1 ... Done! It took 0 steps. +Testing Collatz' conjecture for n = 2 ... Done! It took 1 steps. +Testing Collatz' conjecture for n = 3 ... Done! It took 7 steps. +Testing Collatz' conjecture for n = 4 ... Done! It took 2 steps. +Testing Collatz' conjecture for n = 5 ... Done! It took 5 steps. +Testing Collatz' conjecture for n = 6 ... Done! It took 8 steps. +Testing Collatz' conjecture for n = 7 ... Done! It took 16 steps. +Testing Collatz' conjecture for n = 8 ... Done! It took 3 steps. +Testing Collatz' conjecture for n = 9 ... Done! It took 19 steps. +Testing Collatz' conjecture for n = 10 ... Done! It took 6 steps. +Done. It appears to hold. diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/constructor.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/constructor.kool.out new file mode 100644 index 00000000000..fec2f75c9e7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/constructor.kool.out @@ -0,0 +1,2 @@ +5 6 +11 0 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-1.kool.out new file mode 100644 index 00000000000..1409b1c7c80 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-1.kool.out @@ -0,0 +1 @@ +1 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-2.kool.out new file mode 100644 index 00000000000..fc18a986b58 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-2.kool.out @@ -0,0 +1 @@ +1 100 100 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-3.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-3.kool.out new file mode 100644 index 00000000000..7d443857d52 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/dynamic-dispatch-3.kool.out @@ -0,0 +1,3 @@ +100 1000 +10 100 +10 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-1.kool.out new file mode 100644 index 00000000000..7f8f011eb73 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-1.kool.out @@ -0,0 +1 @@ +7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-2.kool.out new file mode 100644 index 00000000000..829309fe17c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/exceptions-2.kool.out @@ -0,0 +1,2 @@ +Exception 5 thrown! +5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/factorial.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/factorial.kool.out new file mode 100644 index 00000000000..02041646d6c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/factorial.kool.out @@ -0,0 +1 @@ +6689502913449127057588118054090372586752746333138029810295671352301633557244962989366874165271984981308157637893214090552534408589408121859898481114389650005964960521256960000000000000000000000000000 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-1.kool.out new file mode 100644 index 00000000000..f5d5226a299 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-1.kool.out @@ -0,0 +1 @@ +11 12 11 99 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-2.kool.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field-shadowing-2.kool.out @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field.kool.out new file mode 100644 index 00000000000..367805cb8ae --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/field.kool.out @@ -0,0 +1 @@ +a = 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/function-types.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/function-types.kool.out new file mode 100644 index 00000000000..89954484f4d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/function-types.kool.out @@ -0,0 +1,2 @@ +OK +Done diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/hello-world.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/hello-world.kool.out new file mode 100644 index 00000000000..cd0875583aa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/hello-world.kool.out @@ -0,0 +1 @@ +Hello world! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/instanceOf.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/instanceOf.kool.out new file mode 100644 index 00000000000..0ca66380ed7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/instanceOf.kool.out @@ -0,0 +1,4 @@ +Instance of class C +Instance of class C1 +Instance of class C2 +Instance of class C3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.in b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.in new file mode 100644 index 00000000000..74ab2a5ced3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.in @@ -0,0 +1,3 @@ +2 3 +1 2 3 +4 5 6 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.out new file mode 100644 index 00000000000..e6bf3faa79a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/matrix.kool.out @@ -0,0 +1,18 @@ +Input the number of lines and columns (two natural numbers): Line 1 (3 elements): Line 2 (3 elements): Your matrix is: +Line 1 (3 elements): 1 2 3 +Line 2 (3 elements): 4 5 6 +Here is a copy of your matrix: +Line 1 (3 elements): 1 2 3 +Line 2 (3 elements): 4 5 6 +The transpose of your matrix is: +Line 1 (2 elements): 1 4 +Line 2 (2 elements): 2 5 +Line 3 (2 elements): 3 6 +You matrix multiplied with its transpose is: +Line 1 (2 elements): 14 32 +Line 2 (2 elements): 32 77 +The transpose of your matrix multiplied with your matrix is: +Line 1 (3 elements): 17 22 27 +Line 2 (3 elements): 22 29 36 +Line 3 (3 elements): 27 36 45 +Done. diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/method-sharing.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/method-sharing.kool.out new file mode 100644 index 00000000000..926717b11de --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/method-sharing.kool.out @@ -0,0 +1 @@ +0 1 2 3 4 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/new.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/new.kool.out new file mode 100644 index 00000000000..6f4c91b65a3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/new.kool.out @@ -0,0 +1 @@ +a = 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/odd-even.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/odd-even.kool.out new file mode 100644 index 00000000000..d00491fd7e5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/odd-even.kool.out @@ -0,0 +1 @@ +1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/point.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/point.kool.out new file mode 100644 index 00000000000..df74d13dc53 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/point.kool.out @@ -0,0 +1,3 @@ +x = 4, y = 6 +x = 17, y = 28 +color = 87 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/return-object.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/return-object.kool.out new file mode 100644 index 00000000000..f599e28b8ab --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/return-object.kool.out @@ -0,0 +1 @@ +10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.in b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.in new file mode 100644 index 00000000000..2e4e2cbc91e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.in @@ -0,0 +1,2 @@ +4 +5 1 4 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.out new file mode 100644 index 00000000000..06c1dbc21f2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/sorting.kool.out @@ -0,0 +1,17 @@ +Size of the array to sort = Type 4 numbers: Finished reading the 4 numbers +The original unsorted array is: +5 1 4 2 +Reversing the array ... Done! +The reversed array is: +2 4 1 5 +Sorting the array using insertion sort ... Done! +The resulting array is: +1 2 4 5 +Reversing the array ... Done! +Sorting the array using bubble sort ... Done! +The resulting array is: +1 2 4 5 +Reversing the array ... Done! +Sorting the array using heap sort ... Done! +The resulting array is: +1 2 4 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-1.kool.out new file mode 100644 index 00000000000..bb95160cb6e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-1.kool.out @@ -0,0 +1 @@ +33 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-2.kool.out new file mode 100644 index 00000000000..af636789f04 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-2.kool.out @@ -0,0 +1,3 @@ +2 2 3 +11 3 3 +11 111 111 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-3.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-3.kool.out new file mode 100644 index 00000000000..48f16b831de --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/super-3.kool.out @@ -0,0 +1 @@ +100 200 1 20 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-explicit.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-explicit.kool.out new file mode 100644 index 00000000000..b1bd38b62a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-explicit.kool.out @@ -0,0 +1 @@ +13 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-implicit.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-implicit.kool.out new file mode 100644 index 00000000000..b1bd38b62a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/this-implicit.kool.out @@ -0,0 +1 @@ +13 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/threads.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/threads.kool.out new file mode 100644 index 00000000000..ec635144f60 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/threads.kool.out @@ -0,0 +1 @@ +9 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/tree-sum.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/tree-sum.kool.out new file mode 100644 index 00000000000..48082f72f08 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/1_dynamic/tests/tree-sum.kool.out @@ -0,0 +1 @@ +12 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/Makefile b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/Makefile new file mode 100644 index 00000000000..486f2d0272c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/Makefile @@ -0,0 +1,14 @@ +DEF=kool-typed-static +EXT=kool +KOMPILE_FLAGS=--enable-search +KRUN_FLAGS=--output none +TESTDIR?=../programs +RESULTDIR=tests + +%/cycle.kool: kompile + cat tests/cycle.kool.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(DEF)-kompiled --search --pattern ' ListItem(#ostream(1)) ListItem("off") ListItem(#buffer(S:String)) ' $(CHECK) tests/cycle.kool.out + +%/return-object.kool: kompile + true + +include ../../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/kool-typed-static.md b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/kool-typed-static.md new file mode 100644 index 00000000000..7c55495b60f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/kool-typed-static.md @@ -0,0 +1,900 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +# KOOL — Typed — Static + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +Author: Traian Florin Șerbănuță (traian.serbanuta@unibuc.ro) +Organization: University of Bucharest + + +## Abstract + +This is the **K** static semantics of the typed KOOL language. +It extends the static semantics of typed SIMPLE with static semantics +for the object-oriented constructs. Also, the static semantics of +some of the existing SIMPLE constructs need to change, in order to +become more generous with regards to the set of accepted programs, +mostly due to subtyping. For example, the assignment construct +`x = e` required that both the variable `x` and the +expression `e` had the same type in SIMPLE. In KOOL, the type +of `e` can be a subtype of the type of `x`. +Specifically, we define the following typing policy for KOOL, +everything else not mentioned below borrowing its semantics from +SIMPLE: + +* Each class `C` yields a homonymous type, which can be + explicitly used in programs to type variables and methods, possibly in + combination with other types. + +* Since now we have user-defined types, we check that each type + used in a KOOL program is well-formed, that is, it is constructed only + from primitive and class types corresponding to declared classes. + +* Class members and their types form a **class type + environment**. Each class will have such a type environment. + Each member in a class is allowed to be declared only once. Since in + KOOL we allow methods to be assigned to fields, we make no distinction + between field and method members; in other words, we reject programs + declaring both a field and a method with the same name. + +* If an identifier is not found in the local type environment, it + will be searched for in the current class type environment. If not + there, then it will be searched for in its superclass' type + environment. And so on and so forth. If not found until the + `Object` class is reached, a typing error is reported. + +* The assignment allows variables to be assigned values of + more concrete types. The result type of the assignment expression + construct will be the (more abstract) type of the assigned variable, + and not the (more concrete) type of the expression, like in Java. + +* Exceptions are changed (from SIMPLE) to allow throwing and + catching only objects, like in Java. Also, unlike in SIMPLE, we do + not check whether the type of the thrown exception matches the type of + the caught variable, because exceptions can be caught by other + `try/catch` blocks, even by ones in other methods. To avoid + having to annotate each method with what exceptions it can throw, we + prefer to not check the type safety of exceptions (although this is an + excellent homework!). We only check that the `try` block + type-checks and that the `catch` block type-checks after we bind + the caught variable to its claimed type. + +* Class declarations are not allowed to have any cycles in their + extends relation. Such cycles would lead to non-termination of + `new`, as it actually does in the dynamic semantics of KOOL + where no such circularity checks are performed. + +* Methods overriding other methods should be in the right subtyping + relationship with the overridden methods: co-variant in the codomain + and contra-variant in the domain. + +```k +module KOOL-TYPED-STATIC-SYNTAX + imports DOMAINS-SYNTAX +``` + +## Syntax + +The syntax of statically typed KOOL is identical to that of +dynamically typed KOOL, they both taking as input the same programs. +What differs is the **K** strictness attributes. Like in statically +typed SIMPLE, almost all language constructs are strict now, since we +want each to type its arguments almost all the time. Like in the +other two KOOL definitions, we prefer to copy and then modify/extend +the syntax of statically typed SIMPLE. + +**Note**: This paragraph is old, now we can do things better. We keep +it here only for historical reasons, to see how much we used to suffer :) + +**Annoying K-tool technical problem:** +Currently, the **K** tool treats the "non-terminal" productions (i.e., +productions consisting of just one non-terminal), also called +"subsorting" production, differently from the other productions. +Specifically, it does not insert a node in the AST for them. This may +look desirable at first, but it has a big problem: it does not allow +us to treat the subsort differently in different context. For +example, since we want _`Id`_ to be both a type (a class name) and a +program variable, and since we want expressions to reduce to their +types, we are in an impossible situations in which we do not know how +to treat an identifier in the semantics: as a type, i.e., a result of +computations, or as a program variable, i.e., a non-result. Ideally, +we would like to tag the identifiers at parse-time with their local +interpretation, but that, unfortunately, is not possible with the +current parsing capabilities of the **K** tool, because it requires to +insert additional information in the AST for the subsort productions. +This will be fixed soon. Until then, unfortunately, we have to do the +job of the parser manually. Instead of subsorting _`Id`_ directly +to _`Type`_, we "wrap" it first, say with a wrapper called +`class(...)`, exactly how the parser should have done. +The major drawback of this is that all the typed KOOL programs +in `kool/typed/programs` need to also be modified to always +declare class types accordingly. The modified programs can be found +in `kool/typed/static/programs`. So make sure you execute the +static semantics of KOOL using the modified programs. To avoid seeing +the wrapper in the generated documentation, we associate it an +"invisibility" latex attribute below. +```k + syntax Id ::= "Object" [token] | "Main" [token] +``` + +## Types + +```k + syntax Type ::= "void" | "int" | "bool" | "string" + | Id [klabel("class"), symbol, avoid] // see next + | Type "[" "]" + | "(" Type ")" [bracket] + > Types "->" Type + + syntax Types ::= List{Type,","} [overload(exps)] +``` + +## Declarations + +```k + syntax Param ::= Type Id + syntax Params ::= List{Param,","} + + syntax Stmt ::= Type Exps ";" [avoid] + | Type Id "(" Params ")" Block + | "class" Id Block + | "class" Id "extends" Id Block +``` + +## Expressions + +```k + syntax FieldReference ::= Exp "." Id [strict(1)] + syntax ArrayReference ::= Exp "[" Exps "]" [strict] + + syntax Exp ::= Int | Bool | String | Id + | "this" + | "super" + | "(" Exp ")" [bracket] + | "++" Exp + | Exp "instanceOf" Id [strict(1)] + | "(" Id ")" Exp [strict(2)] + | "new" Id "(" Exps ")" [strict(2)] + > Exp "(" Exps ")" [strict] + | "-" Exp [strict] + | "sizeOf" "(" Exp ")" [strict] + | "read" "(" ")" + > left: + Exp "*" Exp [strict, left] + | Exp "/" Exp [strict, left] + | Exp "%" Exp [strict, left] + > left: + Exp "+" Exp [strict, left] + | Exp "-" Exp [strict, left] + > non-assoc: + Exp "<" Exp [strict, non-assoc] + | Exp "<=" Exp [strict, non-assoc] + | Exp ">" Exp [strict, non-assoc] + | Exp ">=" Exp [strict, non-assoc] + | Exp "==" Exp [strict, non-assoc] + | Exp "!=" Exp [strict, non-assoc] + > "!" Exp [strict] + > left: + Exp "&&" Exp [strict, left] + | Exp "||" Exp [strict, left] + > "spawn" Block // not strict: to check return and exceptions + > Exp "=" Exp [strict(2), right] + + syntax Exp ::= FieldReference | ArrayReference + syntax priority _.__KOOL-TYPED-STATIC-SYNTAX > _[_]_KOOL-TYPED-STATIC-SYNTAX > _(_)_KOOL-TYPED-STATIC-SYNTAX + + syntax Exps ::= List{Exp,","} [strict, overload(exps)] +``` + +## Statements + +```k + syntax Block ::= "{" "}" + | "{" Stmt "}" + + syntax Stmt ::= Block + | Exp ";" [strict] + | "if" "(" Exp ")" Block "else" Block [avoid, strict] + | "if" "(" Exp ")" Block [macro] + | "while" "(" Exp ")" Block [strict] + | "for" "(" Stmt Exp ";" Exp ")" Block [macro] + | "return" Exp ";" [strict] + | "return" ";" + | "print" "(" Exps ")" ";" [strict] + | "try" Block "catch" "(" Param ")" Block [strict(1)] + | "throw" Exp ";" [strict] + | "join" Exp ";" [strict] + | "acquire" Exp ";" [strict] + | "release" Exp ";" [strict] + | "rendezvous" Exp ";" [strict] + + syntax Stmt ::= Stmt Stmt [seqstrict, right] +``` + +## Desugaring macros + +```k + rule if (E) S => if (E) S else {} + rule for(Start Cond; Step) {S:Stmt} => {Start while(Cond){S Step;}} + rule T:Type E1:Exp, E2:Exp, Es:Exps; => T E1; T E2, Es; [anywhere] + rule T:Type X:Id = E; => T X; X = E; [anywhere] + + rule class C:Id S => class C extends Object S + +endmodule +``` + +## Static semantics + +We first discuss the configuration, then give the static semantics +taken over unchanged from SIMPLE, then discuss the static semantics of +SIMPLE syntactic constructs that needs to change, and in the end we +discuss the static semantics and additional checks specifically +related to the KOOL proper syntax. +```k +module KOOL-TYPED-STATIC + imports KOOL-TYPED-STATIC-SYNTAX + imports DOMAINS +``` + +## Configuration + +The configuration of our type system consists of a `tasks` +cell with the same meaning like in statically typed SIMPLE, of an +`out` cell streamed to the standard output that will be used to +display typing error messages, and of a cell `classes` holding +data about each class in a separate `class` cell. The +`task` cells now have two additional optional subcells, namely +`ctenvT` and `inClass`. The former holds a temporary +class type environment; its contents will be transferred into the +`ctenv` cell of the corresponding class as soon as all the +fields and methods in the task are processed. In fact, there will be +three types of tasks in the subsequent semantics, each determined by +the subset of cells that it holds: + +1. **Main task**, holding only a `k` cell holding the +original program as a set of classes. The role of this task is to +process each class, generating a class task (see next) for each. + +2. **Class task**, holding `k`, `ctenvT`, and +`inClass` subcells. The role of this task type is to process +a class' contents, generating a class type environment in the +`ctenvT` cell and a method task (see next) for each method in +the class. To avoid interference with object member lookup rules +below, it is important to add the class type environment to a class +atomically; this is the reason for which we use `ctenvT` +temporary cells within class tasks (instead of adding each member +incrementally to the class' type environment). + +3. **Method task**, holding `k`, `tenv` and +`return` cells. These tasks are similar to SIMPLE's function +tasks, so we do not discuss them here any further. + +Each `class` cell hods its name (in the `className` +cell) and the name of the class it extends (in the `extends` +cell), as well as its type environment (in the `ctenv` cell) +and the set of all its superclasses (in the `extendsAll` cell). +The later is useful for example for checking whether there are cycles +in the class extends relation. +```k + configuration + + + $PGM:Stmt + .Map + .Map + void + .K + + +//
+ + + Object + .K + .Set + .Map + + +
+ .List +``` + +## Unchanged semantics from statically typed SIMPLE + +The syntax and rules below are borrowed unchanged from statically +typed SIMPLE, so we do not discuss them much here. +```k + syntax Exp ::= Type + syntax Exps ::= Types + syntax BlockOrStmtType ::= "block" | "stmt" + syntax Type ::= BlockOrStmtType + syntax Block ::= BlockOrStmtType + syntax KResult ::= Type + | Types // TODO: should not be needed + + + context _:Type _::Exp[HOLE::Exps]; + + rule T:Type E:Exp[int,Ts:Types]; => T[] E[Ts]; + rule T:Type E:Exp[.Types]; => T E; + + + rule ... _:BlockOrStmtType _ ... => .Bag + + + rule _:Int => int + rule _:Bool => bool + rule _:String => string + + + rule X:Id => T ... ... X |-> T ... + + + context ++(HOLE => ltype(HOLE)) + rule ++ int => int + rule int + int => int + rule string + string => string + rule int - int => int + rule int * int => int + rule int / int => int + rule int % int => int + rule - int => int + rule int < int => bool + rule int <= int => bool + rule int > int => bool + rule int >= int => bool + rule T:Type == T => bool + rule T:Type != T => bool + rule bool && bool => bool + rule bool || bool => bool + rule ! bool => bool + + + rule (T[])[int, Ts:Types] => T[Ts] + rule T:Type[.Types] => T + + rule sizeOf(_T[]) => int + + + rule read() => int + + rule print(T:Type, Ts => Ts); requires T ==K int orBool T ==K string + rule print(.Types); => stmt + + + context (HOLE => ltype(HOLE)) = _ + + + rule return; => stmt ... _ + + + rule {} => block + + rule {S:Stmt} => block ... Rho R + (.Bag => S Rho R ) + + rule _:Type; => stmt + rule if (bool) block else block => stmt + rule while (bool) block => stmt + + rule join int; => stmt + rule acquire _:Type; => stmt + rule release _:Type; => stmt + rule rendezvous _:Type; => stmt + + syntax Stmt ::= BlockOrStmtType + rule _:BlockOrStmtType _:BlockOrStmtType => stmt +``` + +## Unchanged auxiliary operations from dynamically typed SIMPLE + +```k + syntax Stmt ::= mkDecls(Params) [function] + rule mkDecls(T:Type X:Id, Ps:Params) => T X; mkDecls(Ps) + rule mkDecls(.Params) => {} + + syntax LValue ::= Id + | FieldReference + | ArrayReference + syntax Exp ::= LValue + + syntax Exp ::= ltype(Exp) +// We would like to say: +// context ltype(HOLE:LValue) +// but we currently cannot type the HOLE + context ltype(HOLE) requires isLValue(HOLE) + +// OLD approach: +// syntax Exp ::= ltype(Exp) [function] +// rule ltype(X:Id) => X +// rule ltype(E:Exp [Es:Exps]) => E[Es] + + syntax Types ::= getTypes(Params) [function] + rule getTypes(T:Type _:Id) => T, .Types + rule getTypes(T:Type _:Id, P, Ps) => T, getTypes(P,Ps) + rule getTypes(.Params) => void, .Types +``` + +## Changes to the existing statically typed SIMPLE semantics + +Below we give the new static semantics for language constructs that +come from SIMPLE, but whose SIMPLE static semantics was too +restrictive or too permissive and thus had to change. + +## Local variable declaration + +Since we can define new types in KOOL (corresponding to classes), the +variable declaration needs to now check that the claimed types exist. +The operation `checkType`, defined at the end of this module, +checks whether the argument type is correct (it actually works with +lists of types as well). +```k + rule T:Type X:Id; => checkType(T) ~> stmt ... + Rho => Rho[X <- T] +``` + +## Class member declaration + +In class tasks, variable declarations mean class member declarations. +Since we reduce method declarations to variable declarations (see +below), a variable declaration in a class task can mean either a field +or a method declaration. Unlike local variable declarations, which +can shadow previous homonymous local or member declarations, member +declarations are regarded as a set, so we disallow multiple +declarations for the same member (one could improve upon this, like in +Java, by treating members with different types or number of arguments +as different, etc., but we do not do it here). We also issue an error +message if one attempts to redeclare the same class member. The +framed variable declaration in the second rule below should be read +"stuck". In fact, it is nothing but a unary operation called +`stuck`, which takes a **K**-term as argument and does nothing +with it; this `stuck` operation is displayed as a frame in this +PDF document because of its latex attribute (see the ASCII .k file, +at the end of this module). +```k + rule T:Type X:Id; => checkType(T) ~> stmt ... + Rho (.Map => X |-> T) + requires notBool(X in keys(Rho)) + + rule T:Type X:Id; => stuck(T X;) ... + ... X |-> _ ... + C:Id +//
+ ... .List => ListItem("Member \"" +String Id2String(X) + +String "\" declared twice in class \"" + +String Id2String(C) +String "\"!\n") +``` + +## Method declaration + +A method declaration requires two conceptual checks to be performed: +first, that the method's type is consistent with the type of the +homonymous method that it overrides, if any; and second, that its body +types correctly. At the same time, it should also be added to the +type environment of its class. The first conceptual task is performed +using the `checkMethod` operation defined below, and the second +by generating a corresponding method task. To add it to the class +type environment, we take advantage of the fact that KOOL is higher +order and reduce the problem to a field declaration problem, which we +have already defined. The role of the `ctenvT` cell in the +rule below is to structurally ensure that the method declaration takes +place in a class task (we do not want to allow methods to be declared, +for example, inside other methods). +```k + rule T:Type F:Id(Ps:Params) S + => checkMethod(F, getTypes(Ps)->T, C') + ~> getTypes(Ps)->T F; ... +//
+ C + _ // to ensure we are in a class pass + C + C' +//
+ (.Bag => + mkDecls(Ps) S + C + .Map + T + ) +``` + +## Assignment + +A more concrete value is allowed to be assigned to a more abstract +variable. The operation `checkSubtype` is defined at the end +of the module and it also works with pairs of lists of types. +```k + rule T:Type = T':Type => checkSubtype(T', T) ~> T +``` + +## Method invocation and return + +Methods can be applied on values of more concrete types than their +arguments: +```k + rule (Ts:Types -> T:Type) (Ts':Types) => checkSubtype(Ts',Ts) ~> T +``` + +Similarly, we allow values of more concrete types to be returned by +methods: +```k + rule return T:Type; => checkSubtype(T,T') ~> stmt ... + T':Type +``` + +## Exceptions + +Exceptions can throw and catch values of any types. Since unlike in Java +KOOL's methods do not declare the exception types that they can throw, +we cannot test the full type safety of exceptions. Instead, we +only check that the `try` and the `catch` statements +type correctly. +```k + rule try block catch(T:Type X:Id) S => {T X; S} + rule throw _T:Type ; => stmt +``` + +## Spawn + +The spawned cell needs to also be passed the parent's class. +```k +// explain why + + rule spawn S:Block => int ... + Rho + C + (.Bag => + S + Rho + C + ) +``` + +## Semantics of the new KOOL constructs + +## Class declaration + +We process each class in the main task, adding the corresponding data +into its `class` cell and also adding a class task for it. We +also perform some well-formedness checks on the class hierarchy. + +**Initiate class processing** +We create a class cell and a class task for each task. Also, we start +the class task with a check that the class it extends is declared +(this delays the task until that class is processed using another +instance of this rule). +```k +// There seems to be some error with the configuration concretization, +// as the rule below does not work when rewriting . to both the task +// and the class cells; I had to include two separate . rewrites + +// TODO: the following fails krun; see #2117 + rule class C:Id extends C':Id { S:Stmt } => stmt ... + (.Bag => ... + C + C' + ...) +//
+ (.Bag => + checkType(`class`(C')) ~> S + C + .Map + ) + +// You may want to try the thing below, but that failed, too +/* +syntax Type ::= "stmtStop" + + rule ... + class C:Id extends C':Id { S:Stmt } => stmtStop ... + (.Bag => + checkType(`class`(C')) ~> S + C + .Map + ) + ... + ... + .Bag => ... + C + C' + ... + ... +//
+*/ +``` + +## Check for unique class names + +```k + rule (... + C + C + ... => .Bag) + ... .List => ListItem("Class \"" +String Id2String(C) + +String "\" declared twice!\n") +``` +**Check for cycles in class hierarchy** +We check for cycles in the class hierarchy by transitively closing the +class extends relation using the `extendsAll` cells, and +checking that a class will never appear in its own `extendsAll` +cell. The first rule below initiates the transitive closure of the +superclass relation, the second transitively closes it, and the third +checks for cycles. +```k + rule C + .Set => SetItem(C) [priority(25)] + + rule ... + SetItem(C) Cs:Set (.Set => SetItem(C')) + ... + ... C C' ... + requires notBool(C' in (SetItem(C) Cs)) [priority(25)] + + rule (... + C + ... SetItem(C) ... + ... => .Bag) + ... .List => ListItem("Class \"" +String Id2String(C) + +String "\" is in a cycle!\n") + [group(inheritance-cycle), priority(25)] +``` + +## New + +To type `new` we only need to check that the class constructor +can be called with arguments of the given types, so we initiate a call +to the constructor method in the corresponding class. If that +succeeds, meaning that it types to `stmt`, then we discard the +`stmt` type and produce instead the corresponding class type of +the new object. The auxiliary `discard` operation is defined +also at the end of this module. +```k + rule new C:Id(Ts:Types) => `class`(C) . C (Ts) ~> discard ~> `class`(C) +``` + +## Self reference + +The typing rule for `this` is straightforward: reduce to the +current class type. +```k + rule this => `class`(C) ... + C:Id +``` + +## Super + +Similarly, `super` types to the parent class type. +Note that for typing concerns, super can be considered as an object +(recall that this was not the case in the dynamic semantics). +```k + rule super => `class`(C') ... + C:Id + C + C':Id +``` + +## Object member access + +There are several cases to consider here. First, if we are in a class +task, we should lookup the member into the temporary class type +environemnt in cell `ctenvT`. That is because we want to allow +initialized field declarations in classes, such as `int x=10;`. +This is desugared to a declaration of `x`, which is added to +`ctenvT` during the class task processing, followed by an +assignment of `x` to 10. In order for the assignment to type +check, we need to know that `x` has been declared with type +`int`; this information can only be found in the +`ctenvT` cell. Second, we should redirect non-local variable +lookups in method tasks to corresponding member accesses (the +local variables are handled by the rule borrowed from SIMPLE). +This is what the second rule below does. Third, we should allow +object member accesses as lvalues, which is done by the third rule +below. These last two rules therefore ensure that each necessary +object member access is explicitly allowed for evaluation. Recall +from the annotated syntax module above that the member access +operation is strict in the object. That means that the object is +expected to evaluate to a class type. The next two rules below define +the actual member lookup operation, moving the search to the +superclass when the member is not found in the current class. Note +that this works because we create the class type environments +atomically; thus, a class either has its complete type environment +available, in which case these rules can safely apply, or its cell +`ctenv` is not yet available, in which case these rules have to +wait. Finally, the sixth rule below reports an error when the +`Object` class is reached. +```k + rule X:Id => T ... + ... X |-> T ... + + rule X:Id => this . X ... + Rho + requires notBool(X in keys(Rho)) + +// OLD approach: +// rule ltype(E:Exp . X:Id) => E . X + + rule `class`(C:Id) . X:Id => T ... + C + ... X |-> T:Type ... + + rule `class`(C1:Id => C2) . X:Id ... + C1 + C2:Id + Rho + requires notBool(X in keys(Rho)) + + rule `class`(Object) . X:Id => stuck(`class`(Object) . X) ... + C:Id +//
+ ... .List => ListItem("Member \"" +String Id2String(X) + +String "\" not declared! (see class \"" + +String Id2String(C) +String "\")\n") +``` + +## Instance of and casting + +As it is hard to check statically whether casting is always safe, +the programmer is simply trusted from a typing perspective. We only +do some basic upcasting and downcasting checks, to reject casts which +will absolutely fail. However, dynamic semantics or implementations +of the language need to insert runtime checks for downcasting to be safe. +```k + rule `class`(_C1:Id) instanceOf _C2:Id => bool + rule (C:Id) `class`(C) => `class`(C) + rule (C2:Id) `class`(C1:Id) => `class`(C2) ... + C1 + ...SetItem(C2)... // upcast + rule (C2:Id) `class`(C1:Id) => `class`(C2) ... + C2 + ...SetItem(C1)... // downcast + rule (C2) `class`(C1:Id) => stuck((C2) `class`(C1)) ... + ... + C1 + S1 + ... + ... + C2 + S2 + ... + ... .List => ListItem("Classes \"" +String Id2String(C1) + +String "\" and \"" +String Id2String(C2) + +String "\" are incompatible!\n") + requires notBool(C1 in S2) andBool notBool(C2 in S1) +``` + +## Cleanup tasks + +Finally, we need to clean up the terminated tasks. Each of the three +types of tasks is handled differently. The main task is replaced by a +method task holding `new main();`, which will ensure that a +`main` class with a `main()` method actually exists +(first rule below). A class task moves its temporary class type +environment into its class' cell, and then it dissolves itself (second +rule). A method task simply dissolves when terminated (third rule); +the presence of the `tenv` cell in that rule ensures that that +task is a method task. +Finally, when all the tasks are cleaned up, we can also remove the +`tasks` cell, issuing a corresponding message. Note that +checking for cycles or duplicate methods can still be performed after +the `tasks` cell has been removed. +```k +// discard main task when done, issuing a "new main();" command to +// make sure that the class main and the method main() are declared. + + rule stmt => new Main(.Exps); + (.Bag => .Map + void + Main ) + + +// discard class task when done, adding a ctenv in class + + rule ( + stmt + Rho + C:Id + => .Bag) + C + (.Bag => Rho ) + +// discard method task when done + + rule ... + stmt + _ // only to ensure that this is a method task + ... => .Bag + +// cleanup tasks and output a success message when done + + rule (... .Bag ... => .Bag) + ... .List => ListItem("Type checked!\n") +``` + +## KOOL-specific auxiliary declarations and operations + +## Subtype checking + +The subclass relation introduces a subtyping relation. +```k + syntax KItem ::= checkSubtype(Types,Types) + + rule checkSubtype(T:Type, T) => .K + + rule checkSubtype(`class`(C:Id), `class`(C':Id)) => .K ... + C + ... SetItem(C') ... + + rule checkSubtype(Ts1->T2,Ts1'->T2') + => checkSubtype(((T2)::Type,Ts1'),((T2')::Type,Ts1)) + +// note that the following rule would be wrong! +// rule checkSubtype(T[],T'[]) => checkSubtype(T,T') + + rule checkSubtype((T:Type,Ts),(T':Type,Ts')) + => checkSubtype(T,T') ~> checkSubtype(Ts,Ts') + requires Ts =/=K .Types + + rule checkSubtype(.Types,.Types) => .K + rule checkSubtype(.Types,void) => .K +``` + +## Checking well-formedness of types + +Since now any _`Id`_ can be used as the type of a class, we need to +check that the types used in the program actually exists +```k + syntax KItem ::= checkType(Types) + + rule checkType(T:Type,Ts:Types) => checkType(T) ~> checkType(Ts) + requires Ts =/=K .Types + rule checkType(.Types) => .K + rule checkType(int) => .K + rule checkType(bool) => .K + rule checkType(string) => .K + rule checkType(void) => .K + rule checkType(`class`(C:Id)) => .K ... C + rule checkType(`class`(Object)) => .K + rule checkType(Ts:Types -> T:Type) => checkType(T,Ts) + rule checkType(T:Type[]) => checkType(T) +``` + +## Checking correct overiding of methods + +The `checkMethod` operation below searches to see whether +the current method overrides some other method in some superclass. +If yes, then it issues an additional check that the new method's type +is more concrete than the overridden method's. The types `T` and `T'` +below can only be function types. See the definition of +`checkSubtype` on function types at the end of this module (it +is co-variant in the codomain and contra-variant in the domain). +```k + syntax KItem ::= checkMethod(Id,Type,Id) + + rule checkMethod(F:Id, T:Type, C:Id) => checkSubtype(T, T') ... + C + ... F |-> T':Type ... + + rule checkMethod(F:Id, _T:Type, (C:Id => C')) ... + C + C':Id + Rho + requires notBool(F in keys(Rho)) + + rule checkMethod(_:Id,_,Object) => .K +``` + +## Generic operations which could be part of the **K** framework + +```k + syntax KItem ::= stuck(K) + + syntax KItem ::= "discard" + rule _:KResult ~> discard => .K + +endmodule +``` diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-1.kool.out new file mode 100644 index 00000000000..1564075510d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-1.kool.out @@ -0,0 +1 @@ +Member "getB" not declared! (see class "Main") diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-2.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cast-2.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/collatz.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/collatz.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/collatz.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/constructor.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/constructor.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/constructor.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cycle.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cycle.kool.out new file mode 100644 index 00000000000..8bdaac2cbf1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/cycle.kool.out @@ -0,0 +1,11 @@ + { + S:String + #Equals + "Class \"C1\" is in a cycle!\n" + } +#Or + { + S:String + #Equals + "Class \"C2\" is in a cycle!\n" + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-1.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-1.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-2.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-2.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-3.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-3.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/dynamic-dispatch-3.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-1.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-1.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-2.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/exceptions-2.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/factorial.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/factorial.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/factorial.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-1.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-1.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-2.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field-shadowing-2.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/field.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/function-types.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/function-types.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/function-types.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/hello-world.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/hello-world.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/hello-world.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/instanceOf.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/instanceOf.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/instanceOf.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/matrix.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/matrix.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/matrix.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/method-sharing.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/method-sharing.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/method-sharing.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/new.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/new.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/new.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/odd-even.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/odd-even.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/odd-even.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/point.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/point.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/point.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/return-object.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/return-object.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/return-object.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/sorting.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/sorting.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/sorting.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-1.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-1.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-1.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-2.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-2.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-2.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-3.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-3.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/super-3.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-explicit.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-explicit.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-explicit.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-implicit.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-implicit.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/this-implicit.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/threads.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/threads.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/threads.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/tree-sum.kool.out b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/tree-sum.kool.out new file mode 100644 index 00000000000..21518c59c8a --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/2_static/tests/tree-sum.kool.out @@ -0,0 +1 @@ +Type checked! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-1.kool new file mode 100644 index 00000000000..3ef184c1eaa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-1.kool @@ -0,0 +1,39 @@ +// Testing cast +// This program should execute but should not type check + +class A { + int x; + void A() { + x=10; + } + int getA() { + return x; + } +} + +class B extends A { + int x; + void B() { + super.A(); + x=20; + } + int getB() { + return x; + } +} + +class Main { + void Main() { + B b = new B(); + A a = (A) b; + print("b.x = ", b.x, "\n"); + print("a.x = ", a.x, "\n"); + print("a.getB() = ", a.getB(), "\n"); // this should not type check. why? + print("a.getA() = ", a.getA(), "\n"); + } +} + +// b.x = 20 +// a.x = 10 +// a.getB() = 20 +// a.getA() = 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-2.kool new file mode 100644 index 00000000000..439626d3e9d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cast-2.kool @@ -0,0 +1,27 @@ +class X { void X() {} } +class Y extends X { void Y() {} } +class Z extends X { void Z() {} } + +class Main { + void Main() { + X x = new X(); + Y y = new Y(); + Z z = new Z(); + X xy = new Y(); // ok (y is subclass of X) + X xz = new Z(); // ok (Z is subclass of X) +// Y yz = new Z(); // incompatible types +// Y y1 = new X(); // X is not a Y +// Z z1 = new X(); // X is not a Z + X x1 = y; // ok (y is subclass of X) + X x2 = z; // ok (z is subclass of X) +// Y y1 = (Y) x; // types ok but produces runtime error +// Z z1 = (Z) x; // types ok but produces runtime error + Y y2 = (Y) x1; // types and runs ok (x1 is type Y) + Z z2 = (Z) x2; // types and runs ok (x2 is type Z) +// Y y3 = (Y) z; // inconvertible types +// Z z3 = (Z) y; // inconvertible types + Object o = z; +// Object o1 = (Y) o; // types ok but produces runtime error + print("OK\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/collatz.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/collatz.kool new file mode 100644 index 00000000000..fb850a9ee5e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/collatz.kool @@ -0,0 +1,24 @@ +// Program testing Collatz' conjecture up to a user-provided number. + +class Main { + int collatz(int n) { + int s=0; + while (n > 1) { + s = s+1; + if (n == (n/2)*2) { n = n/2; } + else { n = 3*n+1; } + } + return s; + } + + void Main() { + print("Testing Collatz' conjecture up to what number? "); + int m = read(), s; + for (int i=1; i<=m; ++i) { + print("Testing Collatz' conjecture for n = ",i," ... "); + s = collatz(i); + print("Done! It took ",s," steps.\n"); + } + print("Done. It appears to hold.\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/constructor.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/constructor.kool new file mode 100644 index 00000000000..3990c6be83d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/constructor.kool @@ -0,0 +1,32 @@ +// Testing new, constructor, method invocation. + +class C { + int i,j; + void C(int x) { + i = x; + j = ++x; + } + void add(int d) { + i = i+d; + j = j-d; + } + void print2() { + print(i, " ", j, "\n"); + } +} + +class Main { + int a,b; + C o; + void Main(){ + a = b = 5; + o = new C(a); + o.print2(); + o.add(++b); + o.print2(); + } +} + + +// 5 6 +// 11 0 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cycle.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cycle.kool new file mode 100644 index 00000000000..c70b3118edf --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/cycle.kool @@ -0,0 +1,19 @@ +// This program shows a cycle in the class hierachy. None of the +// dynamic semantics catches it, both of them hanging on creating a +// new object. The program should run if you don't create any new object. + +class C1 extends C2 { + void C1() { } +} + +class C2 extends C1 { + void C2() { } +} + +class Main { + void Main() { +// Should work if you comment next line + new C1(); + print("No cycle detected\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-1.kool new file mode 100644 index 00000000000..81c2e84e462 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-1.kool @@ -0,0 +1,22 @@ +// Testing dynamic method dispatch + +class C1 { + void C1() {} + int m1() { return 1; } + int m2() { return m1(); } +} + +class C2 extends C1 { + void C2() {} + int m1() { return 2; } +} + +class Main { + void Main() { + C1 o1 = new C1(); + C2 o2 = new C2(); + print(o1.m1(), " ", o1.m2(), " ", o2.m1(), " ", o2.m2(), "\n"); + } +} + +// 1 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-2.kool new file mode 100644 index 00000000000..973c829d35c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-2.kool @@ -0,0 +1,24 @@ +// Testing dynamic method dispatch + +class C1 { + void C1() {} + int m1() { return 1; } + int m2() { return 100; } + int m3() { return m2(); } +} + +class C2 extends C1 { + void C2() {} + int m2() { return 2; } +} + +class Main { + void Main() { + C1 o1 = new C1(); + C2 o2 = new C2(); + print(o1.m1(), " ", o1.m2(), " ", o1.m3(), " ", + o2.m1(), " ", o2.m2(), " ", o2.m3(), "\n"); + } +} + +// 1 100 100 1 2 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-3.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-3.kool new file mode 100644 index 00000000000..6cb76c9d133 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/dynamic-dispatch-3.kool @@ -0,0 +1,74 @@ +// This program illustrates that if a method of type t1 -> t2 is +// overridden with one of type t1' -> t2', then it should be the case +// that t2' is a subtype of t2 and that t1 is a subtype of t1'. This is +// consistent with the type ordering over function types, namely: +// +// t1 -> t2 >= t1' -> t2' iff t1 <= t1' and t2 >= t2' +// +// We say that function types are co-variant with their codomains and are +// contra-variant with their domains. A simple way to remember this is +// that constants are particular functions (with no arguments), so the +// function and its codomain must vary the same way. + +class A { + int x; + void A() { + x = 1; + } + B m1(B b) { + b.y = 10; + return b; + } +} + +class B extends A { + int y; + void B() { + super.A(); + y = 100; + } + B m2(B b) { + return m1(b); // HOT-SPOT +// If m1 gets overridden in an extension of B, then the following must hold: +// (1) The new m1 should not get stuck when called above, so B must be +// a subtype of its new argument's type. +// (2) The type of the value returned by the new m1 should be a subtype +// of B, so it can serve as a value returned by m2(). +// Hence, if we override m1 into one of type C1 -> C2, then it should be +// the case that C1 <= B and B >= C2. This is precisely what we do next. + } +} + +class C extends B { + int z; + void C() { + super.B(); + z = 1000; + } + C m1(A a) { + z = a.x; + return this; + } +// To see how the program gets stuck under dynamic type checking, you +// can do the following changes on the method m1 above: +// (1) Change the class of its argument into C. Then the +// program will get stuck trying to show, at the HOT-SPOT, that the type +// B of b is a subtype of the new C. Or +// (2) Change the class of its result into A, and return +// "new A()" instead of "this". Then the program will get stuck +// trying to show that the returned value at HOT-SPOT, of type A, +// has the expected return type of m2, namely B. +// The static semantics should also catch these errors (even when you +// don't return "new A()" instead of "this"). +} + +class Main { + void Main() { + A a = new A(); + B b = new B(); + C c = new C(); + print(b.y, " ", c.z, "\n"); + print((b.m2(b)).y, " ", (c.m2(b)).y, "\n"); + print(b.y, " ", c.z, "\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-1.kool new file mode 100644 index 00000000000..d91d78edb55 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-1.kool @@ -0,0 +1,27 @@ +// This program tests the basic functionality of exceptions + +class Main { + + void foo() { + try { + throw 5; + print(17); // should not be printed + } + catch(int e) { + throw e + 2; // throws 7 + } + throw 1; // should not be reached + } + + void Main() { + try { + foo(); + } + catch(int e) { + print(e,"\n"); // should print 7 + } + } + +} + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-2.kool new file mode 100644 index 00000000000..f8df6bc248b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/exceptions-2.kool @@ -0,0 +1,44 @@ +class Exception { + int v; + void Exception(int v) { + print("Exception ", v, " thrown!\n"); + this.v = v; + } + int get() { + return v; + } +} + +class Exception2 extends Exception { + void Exception2(int v) { + (Exception(v)); // Parentheses tell the parser this is not a type decl. + // Alternatively, use super.Exception or this.Exception. + // This is an artifact of our "too generous" grammar, + // allowing declarations like "int (v);". Java doesn't. + } +} + +class Main { + + void foo() { + try { + throw new Exception(5); + print(17); // should not be printed + } catch(Exception2 e) { + throw new Exception2(e.get() + 2); // should not be reached + } + throw new Exception(-1); // should not be reached + } + + + void Main() { + try { + foo(); + } catch(Exception e) { + print(e.get(),"\n"); // should print 5 + } + } + +} + +// 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/factorial.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/factorial.kool new file mode 100644 index 00000000000..e88fde2dfa3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/factorial.kool @@ -0,0 +1,13 @@ +// Testing recursion + +class Main { + int f(int x) { + if (x <= 1) { return 1; } + else { return x * f(x - 1); } + } + void Main() { + print(f(f(5)), "\n"); + } +} + +// (5!)! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-1.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-1.kool new file mode 100644 index 00000000000..a416212aabf --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-1.kool @@ -0,0 +1,34 @@ +// Testing shadowing of a field by another field and +// whether the object stack environment works. + +class C1 { + int x, y; + void C1() {} + void setx1(int v) { x = v; } + void sety1(int v) { y = v; } + int getx1() { return x; } + int gety1() { return y; } +} + +class C2 extends C1 { + int y; + void C2() {} + void sety2(int v) { y = v; } + int getx2() { return x; } + int gety2() { return y; } +} + +class Main { + void Main() { + C2 o2 = new C2(); + o2.setx1(11); + o2.sety1(12); + o2.sety2(99); + print(o2.getx1(), " "); + print(o2.gety1(), " "); + print(o2.getx2(), " "); + print(o2.gety2(), "\n"); + } +} + +// 11 12 11 99 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-2.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-2.kool new file mode 100644 index 00000000000..fc192a55f91 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field-shadowing-2.kool @@ -0,0 +1,30 @@ +// Testing local variable shadowing a field + +class C { + int f; + void C(int v) { + f = v; + } + int get() { return f; } +} + +class G { + C o; + void G(C o) { + this.o = o; + } + int d() { + int f = 9; + return (o.get()); + } +} + +class Main { + void Main() { + C t = new C(1); + G y = new G(t); + print(y.d(), "\n"); + } +} + +// 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field.kool new file mode 100644 index 00000000000..1baf17f679f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/field.kool @@ -0,0 +1,10 @@ +// Testing field initialization and access. + +class Main { + int a=3; + void Main() { + print("a = ", a, "\n"); + } +} + +// a = 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/function-types.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/function-types.kool new file mode 100644 index 00000000000..56f5cbed3c1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/function-types.kool @@ -0,0 +1,45 @@ +// This program tests the subtyping of function types + +class A { + void A() {} +} + +class B extends A { + void B() {} +} + +class C extends B { + void C() {} + A AA(A a) {} + B AB(A a) {} + C AC(A a) {} + A BA(B b) {} + B BB(B b) {} + C BC(B b) {} + A CA(C c) {} + B CB(C c) {} + C CC(C c) {} +} + +class Main extends C { + void Main() { + C c = new C(); + A->A aa = c.AA; + A->B ab = c.AB; + A->C ac = c.AC; + B->A ba = c.BA; + B->B bb = c.BB; + B->C bc = c.BC; + C->A ca = c.CA; + C->B cb = c.CB; + C->C cc = c.CC; + ca = ba = aa = ab = ac; // OK: C->A > B->A > A->A > A->B > A->C + ca = cb = cc = bc = ac; // OK: C->A > C->B > C->C > B->C > A->C + ba = bb = ab; // OK: B->A > B->B > A->B + cb = bb = bc; // OK: C->B > B->B > B->C + print("OK\n"); +// ac = bc; print("Wrong! A->C < B->C\n"); +// bb = cc; print("Wrong! Incompatible types.\n"); + print("Done\n"); + } +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/hello-world.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/hello-world.kool new file mode 100644 index 00000000000..7077ea05cd0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/hello-world.kool @@ -0,0 +1,9 @@ +// Testing main + +class Main { + void Main() { + print("Hello world!\n"); + } +} + +// Hello world! diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/instanceOf.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/instanceOf.kool new file mode 100644 index 00000000000..e533429e937 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/instanceOf.kool @@ -0,0 +1,38 @@ +// Testing instance of + +class C { + void C() {} + void test() { + print("Instance of class C"); + if (this instanceOf C1) { print(1); } + if (this instanceOf C2) { print(2); } + if (this instanceOf C3) { print(3); } + print("\n"); + } +} + +class C1 extends C { + void C1() {} +} + +class C2 extends C { + void C2() {} +} + +class C3 extends C { + void C3() {} +} + +class Main { + void Main() { + (new C()).test(); + (new C1()).test(); + (new C2()).test(); + (new C3()).test(); + } +} + +// Instance of class C +// Instance of class C1 +// Instance of class C2 +// Instance of class C3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/matrix.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/matrix.kool new file mode 100644 index 00000000000..2bd41ac5a75 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/matrix.kool @@ -0,0 +1,101 @@ +// This program tests multi-dimensional arrays. + +class Matrix { + int lines, columns; + int[][] matrix; + + void Matrix(int x, int y) { + lines = x; + columns = y; + int a[x,y]; + matrix = a; + } + + void readMatrix() { + for (int i=0; ivoid m = a.inc; + int x = 0; + void B() { + print(a.c, " "); + m(); + print(a.c, " "); + } + void->void getM() { + return m; + } +} + +class Main { + void->void f; + void Main() { + B b = new B(); + void->void t = f = b.getM(); + f(); + print(b.a.c, " "); + t(); + print(b.a.c, " "); + (b.getM())(); // shows the higher-order aspect of KOOL + print(b.a.c, "\n"); + } +} + +// 0 1 2 3 4 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/new.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/new.kool new file mode 100644 index 00000000000..d71a0ce5ee8 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/new.kool @@ -0,0 +1,15 @@ +// Testing new and method invocation. + +class C { + int a=5; + void C() {} + int g() { return a; } +} + +class Main { + void Main() { + print("a = ", (new C()).g(), "\n"); + } +} + +// a = 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/odd-even.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/odd-even.kool new file mode 100644 index 00000000000..2c01343cdcf --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/odd-even.kool @@ -0,0 +1,34 @@ +// Testing mutually recursive uses of this.method + +class OddEven { + int n; + void OddEven(int x) { + n = x; + } + int even() { + if (n == 0) { + return 1; + } + else { + n = n - 1; + return this.odd(); + } + } + int odd() { + if (n == 0) { + return 0; + } + else { + n = n - 1; + return this.even(); + } + } +} + +class Main { + void Main() { + print((new OddEven(17)).odd(), "\n"); + } +} + +// 1 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/point.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/point.kool new file mode 100644 index 00000000000..9d8903bf0f0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/point.kool @@ -0,0 +1,44 @@ +class Point { + int x, y; + void Point(int initx, int inity) { + x = initx; + y = inity; + } + void move(int dx, int dy) { + x = x+dx; + y = y+dy; + } + void printLocation() { + print("x = ", x, ", ", "y = ", y, "\n"); + } +} + +class ColorPoint extends Point { + int color; + void ColorPoint(int initx, int inity, int initcolor) { + this.Point(initx, inity); + color = initcolor; + } + void setColor(int c) { + color = c; + } + void printColor() { + print("color = ", color, "\n"); + } +} + +class Main { + void Main() { + Point p = new Point(3,4); + ColorPoint cp = new ColorPoint(10,20,87); + p.move(1,2); + p.printLocation(); + cp.move(7, 8); + cp.printLocation(); + cp.printColor(); + } +} + +// x = 4, y = 6 +// x = 17, y = 28 +// color = 87 diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/return-object.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/return-object.kool new file mode 100644 index 00000000000..728cb518c62 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/return-object.kool @@ -0,0 +1,29 @@ +// Test returning objects in methods and then invoking methods on them + +class C { + int val; + void C(int v) { + val = v; + } + G m1() { + return (new G(val + 9)); + } +} + +class G { + int a; + void G(int t) { + a = t; + } + void print2() { print(a, "\n"); } +} + +class Main { + void Main() { + ((new C(1)).m1()).print2(); + } +} + +// 10 + + diff --git a/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/sorting.kool b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/sorting.kool new file mode 100644 index 00000000000..8ef5970228b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/2_kool/2_typed/programs/sorting.kool @@ -0,0 +1,146 @@ +// This program defines a class Sorting which includes several sorting +// algorithms. It also illustrates how method closures can be stored +// in an array and then executed one by one (see method map in main). + +class Sorting { + int[] array; + int size; + + void Sorting(int n) { + int x[n]; + print("Type ",n," numbers: "); + for (int i=0; i 0 && array[j] > v) { // doing the loop only up to 1 + array[j + 1] = array[j]; + j = j - 1; + } + if (array[0] > v) { + array[1] = array[0]; + array[0] = v; + } else { array[j+1] = v; } + } + } + + void bubbleSort() { + for (int i=0; i array[j + 1]) { + int t = array[j + 1]; + array[j + 1] = array[j]; + array[j] = t; + } + } + } + } + + void siftDown(int root, int bottom) { + bool done = false; + int maxChild; + while (root*2 <= bottom && !done) { + if (root*2 == bottom) { + maxChild = root*2; + } + else { + if (array[root*2] > array[root*2 + 1]) { + maxChild = root*2; + } + else { + maxChild = root*2 + 1; + } + } + if (array[root] < array[maxChild]) { + int t = array[root]; + array[root] = array[maxChild]; + array[maxChild] = t; + root = maxChild; + } + else { + done = true; + } + } + } + + void heapSort() { + int i = size/2 - 1; + while (i >= 0) { + siftDown(i, size - 1); + i = i - 1; + } + i = size - 1; + while (i >= 1 ) { + int t = array[0]; + array[0] = array[i] ; + array[i] = t; + siftDown(0, i - 1); + i = i - 1; + } + } + +} + + +class Main { + + void map(string[] m, (void -> void)[] f) { + for (int i=0; i V:K " + +%/references-5.fun: kompile + cat tests/references-5.fun.in 2>/dev/null | $(KRUN_OR_LEGACY) $@ --definition $(DEF)-kompiled --search --pattern " V:K " $(CHECK) tests/references-5.fun.out + +include ../../../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/fun-untyped.md b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/fun-untyped.md new file mode 100644 index 00000000000..360b85832ea --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/fun-untyped.md @@ -0,0 +1,785 @@ +--- +copyright: Copyright (c) Runtime Verification, Inc. All Rights Reserved. +--- + +# FUN — Untyped — Environment + +Author: Grigore Roșu (grosu@illinois.edu) +Organization: University of Illinois at Urbana-Champaign + +Author: Traian Florin Șerbănuță (traian.serbanuta@unibuc.ro) +Organization: University of Bucharest + +## Abstract + +This is the **K** semantic definition of the untyped FUN language. +FUN is a pedagogical and research language that captures the essence +of the functional programming paradigm, extended with several features +often encountered in functional programming languages. +Like many functional languages, FUN is an expression language, that +is, everything, including the main program, is an expression. +Functions can be declared anywhere and are first class values in the +language. +FUN is call-by-value here, but it has been extended (as student +homework assignments) with other parameter-passing styles. +To make it more interesting and to highlight some of **K**'s strengths, +FUN includes the following features: + +* The basic builtin data-types of integers, booleans and strings. + +* Builtin lists, which can hold any elements, including other lists. + Lists are enclosed in square brackets and their elements are + comma-separated; e.g., `[1,2,3]`. + +* User-defined data-types, by means of constructor terms. + Constructor names start with a capital letter (while any other + identifier in the language starts with a lowercase letter), and they + can be followed by an arbitrary number of comma-separated arguments + enclosed in parentheses; parentheses are not needed when the + constructor takes no arguments. + For example, `Pair(5,7)` is a constructor term holding two + numbers, `Cons(1,Cons(2,Cons(3,Nil)))` is a list-like + constructor term holding 3 elements, and + `Tree(Tree(Leaf(1), Leaf(2)), Leaf(3))` is a tree-like + constructor term holding 3 elements. + In the untyped version of the FUN language, no type checking or + inference is performed to ensure that the data constructors are used + correctly. + The execution will simply get stuck when they are misused. + Moreover, since no type checking is performed, the data-types are not + even declared in the untyped version of FUN. + +* Functions and `let`/`letrec` binders can take + multiple space-separated arguments, but these are desugared to + ones that only take one argument, by currying. For example, the + expressions + ``` + fun x y -> x y + let x y = y in x + ``` + are desugared, respectively, into the following expressions: + ``` + fun x -> fun y -> x y + let x = fun y -> y in x + ``` + +* Functions can be defined using pattern matching over the + available data-types. For example, the program + ``` + letrec max = fun [h] -> h + | [h|t] -> let x = max t + in if h > x then h else x + in max [1, 3, 5, 2, 4, 0, -1, -5] + ``` + defines a function `max` that calculates the maximum element of + a non-empty list, and the function + ``` + letrec ack = fun Pair(0,n) -> n + 1 + | Pair(m,0) -> ack Pair(m - 1, 1) + | Pair(m,n) -> ack Pair(m - 1, ack Pair(m, n - 1)) + in ack Pair(2,3) + ``` + calculates the Ackermann function applied to a particular pair of numbers. + Patterns can be nested. Patterns can currently only be used in function + definitions, and not directly in `let`/`letrec` binders. + For example, this is not allowed: + ``` + letrec Pai(x,y) = Pair(1,2) in x+y + ``` + But this is allowed: + ``` + let f Pair(x,y) = x+y in f Pair(1,2) + ``` + because it is first reduced to + ``` + let f = fun Pair(x,y) -> x+y in f Pair(1,2) + ``` + by uncurrying of the `let` binder, and pattern matching is + allowed in function arguments. + +* We include a `callcc` construct, for two reasons: first, + several functional languages support this construct; second, some + semantic frameworks have difficulties defining it. Not **K**. + +* Finally, we include mutables by means of referencing an + expression, getting the reference of a variable, dereferencing and + assignment. We include these for the same reasons as above: there are + languages which have them, and they are not easy to define in some + semantic frameworks. + +Like in many other languages, some of FUN's constructs can be +desugared into a smaller set of basic constructs. We do that as usual, +using macros, and then we only give semantics to the core constructs. + +**Note:** +We recommend the reader to first consult the dynamic semantics of the +LAMBDA++ language in the first part of the K Tutorial. +To keep the comments below small and focused, we will not re-explain +functional or **K** features that have already been explained in there. + +## Syntax + +```k +//require "modules/pattern-matching.k" + +module FUN-UNTYPED-COMMON + imports DOMAINS-SYNTAX +``` +FUN is an expression language. The constructs below fall into +several categories: names, arithmetic constructs, conventional +functional constructs, patterns and pattern matching, data constructs, +lists, references, and call-with-current-continuation (callcc). +The arithmetic constructs are standard; they are present in almost all +our **K** language definitions. The meaning of FUN's constructs are +discussed in more depth when we define their semantics in the next +module. + + +## The Syntactic Constructs + +We start with the syntactic definition of FUN names. +We have several categories of names: ones to be used for functions and +variables, others to be used for data constructors, others for types and +others for type variables. We will introduce them as needed, starting +with the former category. We prefer the names of variables and functions +to start with lower case letters. We take the freedom to tacitly introduce +syntactic lists/sequences for each nonterminal for which we need them: +```k + syntax Name [token] + syntax Names ::= List{Name,","} [overload(exps)] +``` +Expression constructs will be defined throughtout the syntax module. +Below are the very basic ones, namely the builtins, the names, and the +parentheses used as brackets for grouping. Lists of expressions are +declared strict, so all expressions in the list get evaluated whenever +the list is on a position which can be evaluated: +```k + syntax Exp ::= Int | Bool | String | Name + | "(" Exp ")" [bracket] + syntax Exps ::= List{Exp,","} [strict, overload(exps)] + syntax Val + syntax Exp ::= Val + syntax Exps ::= Vals + syntax Vals ::= List{Val,","} [overload(exps)] + syntax Bottom + syntax Bottoms ::= List{Bottom,","} [overload(exps)] +``` +We next define the syntax of arithmetic constructs, together with +their relative priorities and left-/non-associativities. We also +tag all these rules as members of a new group, "arith", so we can more easily +define global syntax priorities later (at the end of the syntax module). +```k + syntax Exp ::= left: + Exp "*" Exp [strict, group(arith)] + | Exp "/" Exp [strict, group(arith)] + | Exp "%" Exp [strict, group(arith)] + > left: + Exp "+" Exp [strict, left, group(arith)] + | Exp "^" Exp [strict, left, group(arith)] +// left attribute should not be necessary; currently a parsing bug + | Exp "-" Exp [strict, prefer, group(arith)] +// the "prefer" attribute above is to not parse x-1 as x(-1) +// Due to some parsing problems, we currently cannot add unary minus: + | "-" Exp [strict, group(arith)] + > non-assoc: + Exp "<" Exp [strict, group(arith)] + | Exp "<=" Exp [strict, group(arith)] + | Exp ">" Exp [strict, group(arith)] + | Exp ">=" Exp [strict, group(arith)] + | Exp "==" Exp [strict, group(arith)] + | Exp "!=" Exp [strict, group(arith)] + > "!" Exp [strict, group(arith)] + > Exp "&&" Exp [strict(1), left, group(arith)] + > Exp "||" Exp [strict(1), left, group(arith)] +``` +The conditional construct has the expected evaluation strategy, +stating that only the first argument is evaluate: +```k + syntax Exp ::= "if" Exp "then" Exp "else" Exp [strict(1)] +``` +FUN's builtin lists are formed by enclosing comma-separated +sequences of expressions (i.e., terms of sort `Exps`) in square +brackets. The list constructor `cons` adds a new element to the +top of the list, `head` and `tail` get the first element +and the tail sublist of a list if they exist, respectively, and get +stuck otherwise, and `null??` tests whether a list is empty or +not; syntactically, these are just expression constants. +In function patterns, we are also going to allow patterns following the +usual head/tail notation; for example, the pattern `[x_1,...,x_n|t]` +binds `x_1`, ..., `x_n` to the first elements of the matched list, +and `t` to the list formed with the remaining elements. We define list +patterns as ordinary expression constructs, although we will make sure that +we do not give them semantics if they appear in any other place then in a +function case pattern. +```k + syntax Exp ::= "[" Exps "]" [strict, klabel(list)] + | "head" [macro] | "tail" [macro] | "null?" [macro] + | "[" Exps "|" Exp "]" + syntax Val ::= "[" Vals "]" [klabel(list)] + syntax Cons ::= "cons" + syntax Val ::= Cons + syntax Val ::= Cons Val [klabel(apply)] +``` +Data constructors start with capital letters and they may or may +not have arguments. We need to use the attribute "prefer" to make +sure that, e.g., `Cons(a)` parses as constructor `Cons` with +argument `a`, and not as the expression `Cons` (because +constructor names are also expressions) regarded as a function applied +to the expression `a`. Also, note that the constructor is strict +in its second argument, because we want to evaluate its arguments but +not the constuctor name itsef. +```k + syntax ConstructorName [token] + syntax Exp ::= ConstructorName + | ConstructorName "(" Exps ")" [prefer, strict(2), klabel(constructor)] + syntax Val ::= ConstructorName "(" Vals ")" [klabel(constructor)] +``` +A function is essentially a `|`-separated ordered +sequence of cases, each case of the form `pattern -> expression`, +preceded by the language construct `fun`. Patterns will be defined +shortly, both for the builtin lists and for user-defined constructors. +Recall that the syntax we define in **K** is not meant to serve as a +ultimate parser for the defined language, but rather as a convenient +notation for **K** abstract syntax trees, which we prefer when we write +the semantic rules. It is therefore often the case that we define a +more ``generous'' syntax than we want to allow programs to use. +We do it here, too. Specifically, the syntax of `Cases` +below allows any expressions to appear as pattern. This syntactic +relaxation permits many wrong programs to be parsed, but that is not a +problem because we are not going to give semantics to wrong combinations, +so those programs will get stuck; moreover, our type inferencer will reject +those programs anyway. Function application is just concatenation of +expressions, without worrying about type correctness. Again, the type +system will reject type-incorrect programs. +```k + syntax Exp ::= "fun" Cases + | Exp Exp [strict, left, klabel(apply)] +// NOTE: We would like eventually to also have Exp "(" Exps ") + syntax Case ::= Exp "->" Exp + syntax Cases ::= List{Case, "|"} +``` +The `let` and `letrec` binders have the usual syntax +and functional meaning. We allow multiple `and`-separated bindings. +Like for the function cases above, we allow a more generous syntax for +the left-hand sides of bindings, noting that the semantics will get stuck +on incorrect bindings and that the type system will reject those programs. +```k + syntax Exp ::= "let" Bindings "in" Exp + | "letrec" Bindings "in" Exp [prefer] +// The "prefer" attribute for letrec currently needed due to tool bug, +// to make sure that "letrec" is not parsed as "let rec". + syntax Binding ::= Exp "=" Exp + syntax Bindings ::= List{Binding,"and"} +``` +References are first class values in FUN. The construct `ref` +takes an expression, evaluates it, and then it stores the resulting value +at a fresh location in the store and returns that reference. Syntactically, +`ref` is just an expression constant. The construct `&` +takes a name as argument and evaluates to a reference, namely the store +reference where the variable passed as argument stores its value; this +construct is a bit controversial and is further discussed in the +environment-based semantics of the FUN language, where we desugar +`ref` to it. The construct `@` takes a reference +and evaluates to the value stored there. The construct `:=` takes +two expressions, the first expected to evaluate to a reference; the value +of its second argument will be stored at the location to which the first +points (the old value is thus lost). Finally, since expression evaluation +now has side effects, it makes sense to also add a sequential composition +construct, which is sequentially strict. This evaluates to the value of +its second argument; the value of the first argument is lost (which has +therefore been evaluated only for its side effects. +```k + syntax Exp ::= "ref" [macro] + | "&" Name + | "@" Exp [strict] + | Exp ":=" Exp [strict] + | Exp ";" Exp [strict(1), right] +``` +Call-with-current-continuation, named `callcc` in FUN, is a +powerful control operator that originated in the Scheme programming +language, but it now exists in many other functional languages. It works +by evaluating its argument, expected to evaluate to a function, and by +passing the current continuation, or evaluation context (or computation, +in **K** terminology), as a special value to it. When/If this special value +is invoked, the current context is discarded and replaced with the one +held by the special value and the computation continues from there. +It is like taking a snapshot of the execution context at some moment +in time and then, when desired, being able to get back in time to that +point. If you like games, it is like saving the game now (so you can +work on your homework!) and then continuing the game tomorrow or whenever +you wish. To issustrate the strength of `callcc`, we also +allow exceptions in FUN by means of a conventional `try-catch` +construct, which will desugar to `callcc`. We also need to +introduce the special expression contant `throw`, but we need to +use it as a function argument name in the desugaring macro, so we define +it as a name instead of as an expression constant: +```k + syntax Exp ::= "try" Exp "catch" "(" Name ")" Exp [macro] + syntax Val ::= "callcc" + syntax Name ::= "throw" [token] +``` +Finally, FUN also allows polymorphic datatype declarations. These +will be useful when we define the type system later on. +```k + syntax Exp ::= "datatype" Type "=" TypeCases Exp [macro] +// NOTE: In a future version of K, we want the datatype declaration +// to be a construct by itself, but that is not possible currently +// because K's parser wronly identifies the __ operation allowing +// a declaration to appear in front of an expression with the function +// application construct, giving ambiguous parsing errors. +``` +We next need to define the syntax of types and type cases that appear +in datatype declarations. + +Like in many functional languages, type parameters/variables in +user-defined types are quoted identifiers. +```k + syntax TypeVar [token] + syntax TypeVars ::= List{TypeVar,","} [overload(types)] +``` +Types can be basic types, function types, or user-defined +parametric types. In the dynamic semantics we are going to simply ignore +all the type declations, so here the syntax of types below is only useful +for generating the desired parser. To avoid syntactic ambiguities with +the arrow construct for function cases, we use the symbol `-->` as +a constructor for function types: +```k + syntax TypeName [token] + syntax Type ::= "int" | "bool" | "string" + | Type "-->" Type [right] + | "(" Type ")" [bracket] + | TypeVar + | TypeName [symbol(TypeName), avoid] + | Type TypeName [symbol(Type-TypeName), macro] + | "(" Types ")" TypeName [prefer] + syntax Types ::= List{Type,","} [overload(types)] + syntax Types ::= TypeVars + + syntax TypeCase ::= ConstructorName + | ConstructorName "(" Types ")" + syntax TypeCases ::= List{TypeCase,"|"} [symbol(_|TypeCase_)] +``` + +## Additional Priorities + +```k + syntax priority @__FUN-UNTYPED-COMMON + > apply + > arith + > _:=__FUN-UNTYPED-COMMON + > let_in__FUN-UNTYPED-COMMON + letrec_in__FUN-UNTYPED-COMMON + if_then_else__FUN-UNTYPED-COMMON + > _;__FUN-UNTYPED-COMMON + > fun__FUN-UNTYPED-COMMON + > datatype_=___FUN-UNTYPED-COMMON +endmodule + +module FUN-UNTYPED-MACROS + imports FUN-UNTYPED-COMMON +``` + +## Desugaring macros + +We desugar the list non-constructor operations to functions matching +over list patterns. In order to do that we need some new variables; for +those, we follow the same convention like in the **K** tutorial, where we +added them as new identifier constructs starting with the character `$`, +so we can easily recognize them when we debug or trace the semantics. +```k + syntax Name ::= "$h" [token] | "$t" [token] + rule head => fun [$h|$t] -> $h + rule tail => fun [$h|$t] -> $t + rule null? => fun [.Exps] -> true | [$h|$t] -> false +``` +Multiple-head list patterns desugar into successive one-head patterns: +```k + rule [E1,E2,Es:Exps|T] => [E1|[E2,Es|T]] [anywhere] +``` +Uncurrying of multiple arguments in functions and binders: +```k + rule P1 P2 -> E => P1 -> fun P2 -> E [anywhere] + rule F P = E => F = fun P -> E [anywhere] +``` +We desugar the `try-catch` construct into callcc: +```k + syntax Name ::= "$k" [token] | "$v" [token] + rule try E catch(X) E' + => callcc (fun $k -> (fun throw -> E)(fun X -> $k E')) +``` +For uniformity, we reduce all types to their general form: +```k + rule `Type-TypeName`(T:Type, Tn:TypeName) => (T) Tn +``` +The dynamic semantics ignores all the type declarations: +```k + rule datatype _T = _TCs E => E + +endmodule + + +module FUN-UNTYPED-SYNTAX + imports FUN-UNTYPED-COMMON + imports BUILTIN-ID-TOKENS + + syntax Name ::= r"[a-z][_a-zA-Z0-9]*" [token, prec(2)] + | #LowerId [token] + syntax ConstructorName ::= #UpperId [token] + syntax TypeVar ::= r"['][a-z][_a-zA-Z0-9]*" [token] + syntax TypeName ::= Name [token] +endmodule +``` + +## Semantics + +The semantics below is environment-based. A substitution-based +definition of FUN is also available, but that drops the `&` +construct as explained above. +```k +module FUN-UNTYPED + imports FUN-UNTYPED-COMMON + imports FUN-UNTYPED-MACROS + imports DOMAINS + //imports PATTERN-MATCHING +``` + +## Configuration + +The `k`, `env`, and `store` cells are standard +(see, for example, the definition of LAMBDA++ or IMP++ in the first +part of the **K** tutorial). +```k + configuration + $PGM:Exp + .Map + .Map + +``` + +## Values and results + +We only define integers, Booleans and strings as values here, but will +add more values later. +```k + syntax Val ::= Int | Bool | String + syntax Val ::= Bottom + syntax Vals ::= Bottoms + syntax KResult ::= Val +``` + +## Lookup + +```k + rule X:Name => V ... + ... X |-> L ... + ... L |-> V ... +``` + +## Arithmetic expressions + +```k + rule I1 * I2 => I1 *Int I2 + rule I1 / I2 => I1 /Int I2 requires I2 =/=K 0 + rule I1 % I2 => I1 %Int I2 requires I2 =/=K 0 + rule I1 + I2 => I1 +Int I2 + rule S1 ^ S2 => S1 +String S2 + rule I1 - I2 => I1 -Int I2 + rule - I => 0 -Int I + rule I1 < I2 => I1 I1 <=Int I2 + rule I1 > I2 => I1 >Int I2 + rule I1 >= I2 => I1 >=Int I2 + rule V1:Val == V2:Val => V1 ==K V2 + rule V1:Val != V2:Val => V1 =/=K V2 + rule ! T => notBool(T) + rule true && E => E + rule false && _ => false + rule true || _ => true + rule false || E => E +``` + +## Conditional + +```k + rule if true then E else _ => E + rule if false then _ else E => E +``` + +## Lists + +We have already declared the syntactic list of expressions strict, so +we can assume that all the elements that appear in a FUN list are +evaluated. The only thing left to do is to state that a list of +values is a value itself, that is, that the list square-bracket +construct is indeed a constructor, and to give the semantics of +`cons`. Since `cons` is a builtin function and is +expected to take two arguments, we have to also state that +`cons` itself is a value (specifically, a function/closure +value, but we do not need that level of detail here), and also that +`cons` applied to a value is a value (specifically, it would be +a function/closure value that expects the second, list argument): +```k + rule cons V:Val [Vs:Vals] => [V,Vs] +``` + +## Data Constructors + +Constructors take values as arguments and produce other values: +```k + syntax Val ::= ConstructorName +``` + +## Functions and Closures + +Like in the environment-based semantics of LAMBDA++ in the first part +of the **K** tutorial, functions evaluate to closures. A closure includes +the current environment besides the function contents; the environment +will be used at execution time to lookup all the variables that appear +free in the function body (we want static scoping in FUN). +```k + syntax Val ::= closure(Map,Cases) + rule fun Cases => closure(Rho,Cases) ... Rho +``` +**Note:** The reader may want to get familiar with +how the pre-defined pattern matching works before proceeding. +The best way to do that is to consult +`k/include/modules/pattern-matching.k`. + + + +We distinguish two cases when the closure is applied. +If the first pattern matches, then we pick the first case: switch to +the closed environment, get the matching map and bind all its +variables, and finally evaluate the function body of the first case, +making sure that the environment is properly recovered afterwards. +If the first pattern does not match, then we drop it and thus move on +to the next one. +```k + rule (.K => getMatching(P, V)) ~> closure(_, P->_ | _) V:Val + rule matchResult(M:Map) ~> closure(Rho, _->E | _) _ + => bindMap(M) ~> E ~> setEnv(Rho') ... + Rho' => Rho + rule (matchFailure => .K) ~> closure(_, (_->_ | Cs:Cases => Cs)) _ +// rule closure(Rho, P->E | _) V:Val +// => bindMap(getMatching(P,V)) ~> E ~> setEnv(Rho') ... +// Rho' => Rho requires isMatching(P,V) +// rule closure(_, (P->_ | Cs:Cases => Cs)) V:Val requires notBool isMatching(P,V) +``` + +## Let and Letrec + +To highlight the similarities and differences between `let` and +`letrec`, we prefer to give them direct semantics instead of +to desugar them like in LAMBDA. See the formal definitions of +`bindTo`, `bind`, and `assignTo` at the end of +this module. Informally, `bindTo(Xs, Es)` first +evaluates the expressions `Es` in `Exps` in the current +environment (i.e., it is strict in its second argument), then it binds +the variables in `Xs` in `Names` to new locations and adds +those bindings to the environment, and finally writes the values +previously obtained after evaluating the expressions `Es` to those +new locations; `bind(Xs)` does only the bindings of +`Xs` to new locations and adds those bindings to the environment; +and `assignTo(Xs,Es)` evaluates the expressions +`Es` in the current environment and then it writes the resulting +values to the locations to which the variables `Xs` are already +bound to in the environment. + +Therefore, `let Xs = Es in E` first +evaluates `Es` in the current environment, then adds new +bindings for `Xs` to fresh locations in the environment, then +writes the values of `Es` to those locations, and finally +evaluates `E` in the new environment, making sure that the +environment is properly recovered after the evaluation of `E`. +On the other hand, `letrec` does the same things but in a +different order: it first adds new bindings for `Xs` to fresh +locations in the environment, then it evaluates `Es` in the new +environment, then it writes the resulting values to their +corresponding locations, and finally it evaluates `E` and +recovers the environment. The crucial difference is that the +expressions `Es` now see the locations of the variables `Xs` +in the environment, so if they are functions, which is typically the +case with `letrec`, their closures will encapsulate in their +environments the bindings of all the bound variables, including +themselves (thus, we may have a closure value stored at location +`L`, whose environment contains a binding of the form +`F ↦ L`; this way, the closure can invoke +itself). +```k + rule let Bs in E + => bindTo(names(Bs),exps(Bs)) ~> E ~> setEnv(Rho) ... + Rho + + rule letrec Bs in E + => bind(names(Bs))~>assignTo(names(Bs),exps(Bs))~>E~>setEnv(Rho)... + Rho +``` +Recall that our syntax allows `let` and `letrec` to +take any expression in place of its binding. This allows us to use +the already existing function application construct to bind names to +functions, such as, e.g., `let x y = y in ...`. +The desugaring macro in the syntax module uncurries such declarations, +and then the semantic rules above only work when the remaining +bindings are identifiers, so the semantics will get stuck on programs +that misuse the `let` and `letrec` binders. + + +## References + +The semantics of references is self-explanatory, except maybe for the +desugaring rule of `ref`, which is further discussed. Note +that `&X` grabs the location of `X` from the environment. +Sequential composition, which is needed only to accumulate the +side effects due to assignments, was strict in the first argument. +Once evaluated, its first argument is simply discarded: +```k + syntax Name ::= "$x" [token] + rule ref => fun $x -> & $x + rule & X => L ... ... X |-> L ... + rule @ L:Int => V:Val ... ... L |-> V ... + rule L:Int := V:Val => V ... ... L |-> (_=>V) ... + rule _V:Val; E => E +``` +The desugaring rule of `ref` (first rule above) works +because `&` takes a variable and returns its location (like in C). +Note that some ``pure'' functional programming researchers strongly dislike +the `&` construct, but favor `ref`. We refrain from having +a personal opinion on this issue here, but support `&` in the +environment-based definition of FUN because it is, technically speaking, +more powerful than `ref`. From a language design perspective, it +would be equally easy to drop `&` and instead give a direct +semantics to `ref`. In fact, this is precisely what we do in the +substitution-based definition of FUN, because there appears to be no way +to give a substitution-based definition to the `&` construct. + + +## Callcc + +As we know it from the LAMBDA++ tutorial, call-with-current-continuation +is quite easy to define in **K**. We first need to define a special +value wrapping an execution context, that is, an environment saying +where the variables should be looked up, and a computation structure +saying what is left to execute (in a substitution-based definition, +this special value would be even simpler, as it would only need to +wrap the computation structure---see, for example, the +substitution-based semantics of LAMBDA++ in the the first part of the +**K** tutorial, or the substitution-based definition of FUN). Then +`callcc` creates such a value containing the current +environment and the current remaining computation, and passes it to +its argument function. When/If invoked, the special value replaces +the current execution context with its own and continues the execution +normally. +```k + syntax Val ::= cc(Map,K) + rule (callcc V:Val => V cc(Rho,K)) ~> K Rho + rule cc(Rho,K) V:Val ~> _ => V ~> K _ => Rho +``` + +## Auxiliary operations + +## Environment recovery + +The environment recovery operation is the same as for the LAMBDA++ +language in the **K** tutorial and many other languages provided with the +**K** distribution. The first ``anywhere'' rule below shows an elegant +way to achieve the benefits of tail recursion in **K**. +```k + syntax KItem ::= setEnv(Map) // TODO: get rid of env + //rule (setEnv(_) => .) ~> setEnv(_) [anywhere] + rule _:Val ~> (setEnv(Rho) => .K) ... _ => Rho +``` + +## `bindTo`, `bind` and `assignTo` + +The meaning of these operations has already been explained when we +discussed the `let` and `letrec` language constructs +above. +```k + syntax KItem ::= bindTo(Names,Exps) [strict(2)] + | bindMap(Map) + | bind(Names) + + rule (.K => getMatchingAux(Xs,Vs)) ~> bindTo(Xs:Names,Vs:Vals) + rule matchResult(M:Map) ~> bindTo(_:Names, _:Vals) => bindMap(M) + + rule bindMap(.Map) => .K + rule bindMap((X:Name |-> V:Val => .Map) _:Map) ... + Rho => Rho[X <- !L:Int] + ... .Map => !L |-> V ... + + rule bind(.Names) => .K + rule bind(X:Name,Xs => Xs) ... + Rho => Rho[X <- !_L:Int] + + syntax KItem ::= assignTo(Names,Exps) [strict(2)] + + rule assignTo(.Names,.Vals) => .K ... + rule assignTo((X:Name,Xs => Xs),(V:Val,Vs:Vals => Vs)) ... + ... X |-> L ... + ... .Map => L |-> V ... +``` + +## Getters + +The following auxiliary operations extract the list of identifiers +and of expressions in a binding, respectively. +```k + syntax Names ::= names(Bindings) [function] + rule names(.Bindings) => .Names + rule names(X:Name=_ and Bs) => (X,names(Bs))::Names + + syntax Exps ::= exps(Bindings) [function] + rule exps(.Bindings) => .Exps + rule exps(_:Name=E and Bs) => E,exps(Bs) + + /* Extra kore stuff */ + syntax KResult ::= Vals + syntax Exps ::= Names + syntax Names ::= Bottoms + + /* Matching */ + syntax MatchResult ::= getMatching(Exp, Val) [function] + | getMatchingAux(Exps, Vals) [function] + | mergeMatching(MatchResult, MatchResult) [function] + | matchResult(Map) + | "matchFailure" + + rule getMatching(C:ConstructorName(Es:Exps), C(Vs:Vals)) => getMatchingAux(Es, Vs) + rule getMatching([Es:Exps], [Vs:Vals]) => getMatchingAux(Es, Vs) + rule getMatching(C:ConstructorName, C) => matchResult(.Map) + rule getMatching(B:Bool, B) => matchResult(.Map) + rule getMatching(I:Int, I) => matchResult(.Map) + rule getMatching(S:String, S) => matchResult(.Map) + rule getMatching(N:Name, V:Val) => matchResult(N |-> V) + rule getMatching(_, _) => matchFailure [owise] + + rule getMatchingAux((E:Exp, Es:Exps), (V:Val, Vs:Vals)) => mergeMatching(getMatching(E, V), getMatchingAux(Es, Vs)) + rule getMatchingAux(.Exps, .Vals) => matchResult(.Map) + rule getMatchingAux(_, _) => matchFailure [owise] + + rule mergeMatching(matchResult(M1:Map), matchResult(M2:Map)) => matchResult(M1 M2) + requires intersectSet(keys(M1), keys(M2)) ==K .Set + //rule mergeMatching(_, _) => matchFailure [owsie] + rule mergeMatching(matchResult(_:Map), matchFailure) => matchFailure + rule mergeMatching(matchFailure, matchResult(_:Map)) => matchFailure + rule mergeMatching(matchFailure, matchFailure) => matchFailure +``` +Besides the generic decomposition rules for patterns and values, +we also want to allow `[head|tail]` matching for lists, so we add +the following custom pattern decomposition rule: +```k + rule getMatching([H:Exp | T:Exp], [V:Val, Vs:Vals]) + => getMatchingAux((H, T), (V, [Vs])) +endmodule +``` + +Go to [Lesson 2, FUN untyped, Substitution-Based](../2_substitution/fun-untyped.md). diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/ackermann.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/ackermann.fun.out new file mode 100644 index 00000000000..094033250f8 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/ackermann.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 9 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-1.fun.out new file mode 100644 index 00000000000..0320496212f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 7 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-2.fun.out new file mode 100644 index 00000000000..0320496212f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 7 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-3.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-3.fun.out new file mode 100644 index 00000000000..0320496212f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-3.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 7 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-4.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-4.fun.out new file mode 100644 index 00000000000..0c63378c2f4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-4.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 10 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-5.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-5.fun.out new file mode 100644 index 00000000000..0c63378c2f4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-5.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 10 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-1.fun.out new file mode 100644 index 00000000000..f5212a68be6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 0 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-2.fun.out new file mode 100644 index 00000000000..f5212a68be6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-efficient-with-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 0 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-inefficient-without.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-inefficient-without.fun.out new file mode 100644 index 00000000000..f5212a68be6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-inefficient-without.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 0 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-looping.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-looping.fun.out new file mode 100644 index 00000000000..f80978a2f17 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-looping.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 100 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-1.fun.out new file mode 100644 index 00000000000..f5212a68be6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 0 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-2.fun.out new file mode 100644 index 00000000000..10a4ae7ba4e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/callcc-return-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 1 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-bst-sorting.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-bst-sorting.fun.out new file mode 100644 index 00000000000..786c63cb9a3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-bst-sorting.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + [ 0 , 0 , 1 , 1 , 2 , 2 , 3 , 3 , 4 , 4 , 5 , 5 , 6 , 6 , 7 , 7 , 8 , 8 , 9 , 9 , 10 , 10 , .Bottoms ] ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-days.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-days.fun.out new file mode 100644 index 00000000000..c5e9a964fcd --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-days.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + [ Thursday , Saturday , Thursday , .Bottoms ] ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-distributivity.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-distributivity.fun.out new file mode 100644 index 00000000000..f4f110d4d85 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-distributivity.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + "(n * x + n * y)" ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-toString.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-toString.fun.out new file mode 100644 index 00000000000..785258feea2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-expr-toString.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + "n * (x + y)" ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-list-length.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-list-length.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-list-length.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-tree-mirror.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-tree-mirror.fun.out new file mode 100644 index 00000000000..aab16147850 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/constructor-tree-mirror.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + Tree ( Tree ( Tree ( Leaf ( 5 , .Bottoms ) , Leaf ( 4 , .Bottoms ) , .Bottoms ) , Leaf ( 3 , .Bottoms ) , .Bottoms ) , Tree ( Leaf ( 2 , .Bottoms ) , Leaf ( 1 , .Bottoms ) , .Bottoms ) , .Bottoms ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-1.fun.out new file mode 100644 index 00000000000..a5ee4b3e0cf --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + closure ( .Map , Nothing -> 7 | .Cases ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-2.fun.out new file mode 100644 index 00000000000..0320496212f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/empty-argument-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 7 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/exceptions.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/exceptions.fun.out new file mode 100644 index 00000000000..98eee127a84 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/exceptions.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 21 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial-and-list-max.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial-and-list-max.fun.out new file mode 100644 index 00000000000..b14a332562d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial-and-list-max.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 620448401733239439360000 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial.fun.out new file mode 100644 index 00000000000..b14a332562d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/factorial.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 620448401733239439360000 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-1.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-2.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-3.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-3.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-3.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-4.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-4.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-4.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-length.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-length.fun.out new file mode 100644 index 00000000000..8131b447d11 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-length.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 8 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-max.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-max.fun.out new file mode 100644 index 00000000000..8b50c414e24 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-max.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 5 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun new file mode 100644 index 00000000000..379bc8e84fd --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun @@ -0,0 +1,3 @@ +letrec nth = fun 1 [h|t] -> h + | n [h|t] -> nth (n - 1) t +in nth 4 [5,4,3,2,1] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun.out new file mode 100644 index 00000000000..6eaaaef4946 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/list-nth.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 2 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/nth.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/nth.fun.out new file mode 100644 index 00000000000..9ea5598e3e2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/nth.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + [ 10 , 11 , 12 , 13 , 14 , .Bottoms ] ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/pattern.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/pattern.fun.out new file mode 100644 index 00000000000..f711fabed96 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/pattern.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + [ Pair ( 10 , 9 , .Bottoms ) , Pair ( 0 , 1 , .Bottoms ) , Pair ( 0 , 0 , .Bottoms ) , .Bottoms ] ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-1.fun.out new file mode 100644 index 00000000000..694e76d60f7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + closure ( .Map , x -> x | .Cases ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-2.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-3.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-3.fun.out new file mode 100644 index 00000000000..6eaaaef4946 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-3.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 2 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-4.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-4.fun.out new file mode 100644 index 00000000000..6a8f063199d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-4.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + closure ( .Map , x -> let ( y = x ) and .Bindings in y | .Cases ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-5.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-5.fun.out new file mode 100644 index 00000000000..32ce768f6a0 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-5.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-6.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-6.fun.out new file mode 100644 index 00000000000..dabd2db32da --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/polymorphism-6.fun.out @@ -0,0 +1,8 @@ +{ + V:K +#Equals + closure ( f00 |-> 0 + f01 |-> 1 + f02 |-> 2 + f03 |-> 3 , x -> f03 ( f03 x ) | .Cases ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-1.fun.out new file mode 100644 index 00000000000..b14a332562d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 620448401733239439360000 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-2.fun.out new file mode 100644 index 00000000000..8b50c414e24 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 5 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-3.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-3.fun.out new file mode 100644 index 00000000000..1a73470738b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-3.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 16 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-4.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-4.fun.out new file mode 100644 index 00000000000..2ddb88d1954 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-4.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 3202 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-5.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-5.fun.out new file mode 100644 index 00000000000..f33d7a14968 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/references-5.fun.out @@ -0,0 +1,23 @@ + { + V:K + #Equals + [ 7 , 8 , 9 , .Bottoms ] ~> .K + } +#Or + { + V:K + #Equals + [ 7 , 9 , 8 , .Bottoms ] ~> .K + } +#Or + { + V:K + #Equals + [ 9 , 8 , 9 , .Bottoms ] ~> .K + } +#Or + { + V:K + #Equals + [ 9 , 9 , 8 , .Bottoms ] ~> .K + } diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/stuck-letrec.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/stuck-letrec.fun.out new file mode 100644 index 00000000000..2607ec69feb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/stuck-letrec.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + x ~> #freezer_,__FUN-UNTYPED-COMMON_Exps_Exp_Exps0_ ( .Bottoms ~> .K ) ~> #freezer_,__FUN-UNTYPED-COMMON_Exps_Exp_Exps1_ ( 2 ~> .K ) ~> #freezerassignTo(_,_)_FUN-UNTYPED_KItem_Names_Exps1_ ( x , y , .Bottoms ~> .K ) ~> y ~> setEnv ( x |-> 0 ) ~> setEnv ( .Map ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tail-recursion.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tail-recursion.fun.out new file mode 100644 index 00000000000..f5212a68be6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tail-recursion.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 0 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-1.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-1.fun.out new file mode 100644 index 00000000000..aecf5adfee2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-1.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + closure ( .Map , Triple ( x , y , z , .Bottoms ) -> y | .Cases ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-2.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-2.fun.out new file mode 100644 index 00000000000..875da5f13c3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-2.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + Pair ( Pair ( 1 , Wrapper ( 2 , .Bottoms ) , .Bottoms ) , Pair ( 3 , 4 , .Bottoms ) , .Bottoms ) ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-3.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-3.fun.out new file mode 100644 index 00000000000..ffeee47d07f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-3.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 6 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-4.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-4.fun.out new file mode 100644 index 00000000000..44660b549bd --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-4.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 230 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-5.fun.out b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-5.fun.out new file mode 100644 index 00000000000..44660b549bd --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/1_untyped/1_environment/tests/tuple-5.fun.out @@ -0,0 +1,5 @@ +{ + V:K +#Equals + 230 ~> .K +} diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/Makefile b/pyk/regression-new/pl-tutorial/2_languages/3_fun/Makefile new file mode 100644 index 00000000000..a5589b61cce --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=1_untyped/1_environment + +include ../../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/ackermann.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/ackermann.fun new file mode 100644 index 00000000000..f7a16271c4e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/ackermann.fun @@ -0,0 +1,6 @@ +datatype ('a,'b) pair = Pair('a,'b) + +letrec ack = fun Pair(0,n) -> n + 1 + | Pair(m,0) -> ack Pair(m - 1, 1) + | Pair(m,n) -> ack Pair(m - 1, ack Pair(m, n - 1)) +in (ack Pair(2,3)) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-1.fun new file mode 100644 index 00000000000..a34ee3af2be --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-1.fun @@ -0,0 +1,5 @@ +// testing callcc + +callcc (fun k -> 7) + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-2.fun new file mode 100644 index 00000000000..11288aa6e16 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-2.fun @@ -0,0 +1,5 @@ +// testing callcc + +callcc (fun k -> k 7) + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-3.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-3.fun new file mode 100644 index 00000000000..94360bf2560 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-3.fun @@ -0,0 +1,5 @@ +// testing callcc + +callcc (fun k -> k 7 + 3) + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-4.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-4.fun new file mode 100644 index 00000000000..ede962fa0d1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-4.fun @@ -0,0 +1,5 @@ +// testing callcc + +callcc (fun k -> 7) + 3 + +// 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-5.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-5.fun new file mode 100644 index 00000000000..f82d6a0a9d2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-5.fun @@ -0,0 +1,5 @@ +// testing callcc + +callcc (fun k -> k 7 + 5) + 3 + +// 10 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-1.fun new file mode 100644 index 00000000000..712c043113c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-1.fun @@ -0,0 +1,13 @@ +// using callcc for exceptions +// the following is efficient + +let f l = + callcc (fun throw -> + letrec aux l = + if null? l + then 1 + else if head l == 0 + then throw 0 + else head l * aux (tail l) + in aux l) +in f [1,2,3,4,5,0,6,7,8,9] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-2.fun new file mode 100644 index 00000000000..98f930b2277 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-efficient-with-2.fun @@ -0,0 +1,13 @@ +// the following is also efficient and uses try/catch + +let f l = try + letrec aux l = + if null? l + then 1 + else if head l == 0 + then throw 0 + else head l * aux(tail l) + in aux l + catch(x) + x +in f [1,2,3,4,5,0,6,7,8,9] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-inefficient-without.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-inefficient-without.fun new file mode 100644 index 00000000000..1dacf714cf1 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-inefficient-without.fun @@ -0,0 +1,11 @@ +// calculating the product of elements in a list +// this is inefficient; one would like to throw an exception +// see callcc-efficient-with.fun for an efficient variant + +letrec f l = + if null? l + then 1 + else if head l == 0 + then 0 + else head l * f(tail l) +in f [1,2,3,4,5,0,6,7,8,9] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-looping.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-looping.fun new file mode 100644 index 00000000000..c5d5074ef6b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-looping.fun @@ -0,0 +1,8 @@ +// using callcc for looping + + +let goto = ref (fun x -> x) and n = ref 0 +in callcc (fun exit -> + callcc (fun k -> goto := k; 0); // "goto _" will jump here + if @n < 100 then n := @n + 1 else exit @n; + @goto 0) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-1.fun new file mode 100644 index 00000000000..cc103e32988 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-1.fun @@ -0,0 +1,8 @@ +// using callcc for returning: grab caller's continuation + +let f l return = + if null? l + then return 0 + else return 1; + 0 / 0 +in callcc (f []) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-2.fun new file mode 100644 index 00000000000..eab8034115d --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/callcc-return-2.fun @@ -0,0 +1,10 @@ +// using callcc for returning: grab callee's continuation + +let f l = + callcc (fun return -> + if null?(l) + then return 0 + else return 1; + 0 / 0 + ) +in f [1,2] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-bst-sorting.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-bst-sorting.fun new file mode 100644 index 00000000000..a34eab7ce6b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-bst-sorting.fun @@ -0,0 +1,17 @@ +datatype 'a bst = Empty | Node('a bst, 'a, 'a bst) + +letrec bst_sort l = flatten (mk_bst l) + and flatten = fun Empty -> [] + | Node(l,n,r) -> append (flatten l) (cons n (flatten r)) + and append = fun [] r -> r | [h|t] r -> cons h (append t r) + and mk_bst = fun [] -> Empty | [h|t] -> insert (mk_bst t) h + and insert = fun Empty n -> Node(Empty,n,Empty) + | Node(l, m, r) n -> if n < m + then Node(insert l n, m, r) + else Node(l, m, insert r n) + and downto = fun 0 -> [0] | n -> cons n (downto (n - 1)) + and upto = fun 0 -> [0] | n -> append (upto (n - 1)) [n] + and merge = fun [] [] -> [] + | [h1|t1] [h2|t2] -> cons h1 (cons h2 (merge t1 t2)) + and shuffle n = merge (downto n) (upto n) +in (bst_sort (shuffle 10)) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-days.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-days.fun new file mode 100644 index 00000000000..69fb3435b64 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-days.fun @@ -0,0 +1,17 @@ +datatype day = Monday | Tuesday | Wednesday + | Thursday | Friday | Saturday | Sunday + +let day_after = + fun Monday -> Tuesday + | Tuesday -> Wednesday + | Wednesday -> Thursday + | Thursday -> Friday + | Friday -> Saturday + | Saturday -> Sunday + | Sunday -> Monday +in letrec days_later = + fun 0 day -> day + | n day -> if n>0 + then days_later (n - 1) (day_after day) + else days_later (n + 7) day + in [days_later 2 Tuesday, days_later (-4) Wednesday, days_later 17 Monday] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-distributivity.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-distributivity.fun new file mode 100644 index 00000000000..f08ad0eb61f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-distributivity.fun @@ -0,0 +1,16 @@ +datatype exp = Value(string) | Plus(exp,exp) | Minus(exp,exp) | Times(exp,exp) + +letrec toString = + fun Value(n) -> n + | Plus(l,r) -> "(" ^ toString(l) ^ " + " ^ toString(r) ^ ")" + | Minus(l,r) -> "(" ^ toString(l) ^ " - " ^ toString(r) ^ ")" + | Times(l,r) -> toString(l) ^ " * " ^ toString(r) + and distribute = + fun Times(e1, Plus(e2, e3)) -> Plus(Times(distribute e1, distribute e2), + Times(distribute e1, distribute e3)) + | Times(Plus(e1, e2), e3) -> Plus(Times(distribute e1, distribute e3), + Times(distribute e2, distribute e3)) + | Plus(l,r) -> Plus(distribute l, distribute r) + | Minus(l,r) -> Minus(distribute l, distribute r) + | Value(n) -> Value(n) +in toString (distribute Times(Value("n"), Plus(Value("x"), Value("y")))) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-toString.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-toString.fun new file mode 100644 index 00000000000..d7840f6d0e3 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-expr-toString.fun @@ -0,0 +1,8 @@ +datatype exp = Value(string) | Plus(exp,exp) | Minus(exp,exp) | Times(exp,exp) + +letrec toString = + fun Value(n) -> n + | Plus(l,r) -> "(" ^ toString(l) ^ " + " ^ toString(r) ^ ")" + | Minus(l,r) -> "(" ^ toString(l) ^ " - " ^ toString(r) ^ ")" + | Times(l,r) -> toString(l) ^ " * " ^ toString(r) +in toString Times(Value("n"), Plus(Value("x"), Value("y"))) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-list-length.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-list-length.fun new file mode 100644 index 00000000000..d987c4302b5 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-list-length.fun @@ -0,0 +1,4 @@ +datatype 'a mylist = Nil | Cons('a, 'a mylist) + +letrec length = fun Nil -> 0 | Cons(h,t) -> 1 + length t +in length Cons(3, Cons(5, Cons(8, Nil))) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-tree-mirror.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-tree-mirror.fun new file mode 100644 index 00000000000..90f75e4239c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/constructor-tree-mirror.fun @@ -0,0 +1,7 @@ +datatype 'a tree = Leaf('a) | Tree('a tree, 'a tree) + +letrec mirror = + fun Leaf(n) -> Leaf(n) + | Tree(left, right) -> Tree(mirror(right), mirror(left)) +in mirror Tree(Tree(Leaf(1), Leaf(2)), + Tree(Leaf(3), Tree(Leaf(4), Leaf(5)))) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-1.fun new file mode 100644 index 00000000000..7b9bf028e86 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-1.fun @@ -0,0 +1,9 @@ +// testing empty argument +// we think of Nothing as () + +datatype nothing = Nothing + +let f Nothing = 7 +in f + +// some closure diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-2.fun new file mode 100644 index 00000000000..7446ab927eb --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/empty-argument-2.fun @@ -0,0 +1,9 @@ +// testing empty argument + +datatype nothing = Nothing + +let x = 7 +in let f Nothing = x + in f Nothing + +// 7 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/exceptions.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/exceptions.fun new file mode 100644 index 00000000000..6979202588f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/exceptions.fun @@ -0,0 +1,11 @@ +try ( + try ( + 3 + throw(10) * 2 + ) catch(x) ( + throw(2*x) + 7 + ) +) catch(x) ( + x + 1 +) + +// 21 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial-and-list-max.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial-and-list-max.fun new file mode 100644 index 00000000000..9e3c081d54e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial-and-list-max.fun @@ -0,0 +1,16 @@ +// both maximum of a list and factorial: testing various things: +// a) multiple bindings in a letrec +// b) multiple arguments to functions (max) +// c) shadowing parameters (let x = ... x ... in ... x ...) + + +letrec max = fun [h] x y -> h + | [h|t] x y -> let x = max t x y + in if h > x then h else x + +and fact = fun 0 -> 1 + | x -> x * fact(x - 1) + +in fact (max [1, 3, fact 4, 2, 5, 0, -1, -5] true 5) + +// 620448401733239439360000 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial.fun new file mode 100644 index 00000000000..59b944b03fe --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/factorial.fun @@ -0,0 +1,8 @@ +// letrec f x = if x<=0 then 1 else x * f(x - 1) +// in f (f 4) + +letrec f = fun 0 -> 1 + | x -> x * f(x - 1) +in f (f 4) + +// 620448401733239439360000 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-1.fun new file mode 100644 index 00000000000..4f41a8312ea --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-1.fun @@ -0,0 +1,6 @@ +// testing let + +let second l = head (tail l) +in second [1, 3, 5, 2, 4, 0, -1, -5] + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-2.fun new file mode 100644 index 00000000000..1a4a439b76f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-2.fun @@ -0,0 +1,6 @@ +// testing letrec + +letrec second l = head (tail l) +in second [1, 3, 5, 2, 4, 0, -1, -5] + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-3.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-3.fun new file mode 100644 index 00000000000..36eb3668f89 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-3.fun @@ -0,0 +1,6 @@ +// testing letrec and multiple arguments with currying + +letrec second l x = head (tail l) +in second [1, 3, 5, 2, 4, 0, -1, -5] true + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-4.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-4.fun new file mode 100644 index 00000000000..efa13ef81fa --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-4.fun @@ -0,0 +1,4 @@ +let second = fun [x,y|t] -> y +in second [1, 3, 5, 0, -2] + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-length.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-length.fun new file mode 100644 index 00000000000..ccaa3884b10 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-length.fun @@ -0,0 +1,5 @@ +letrec length = fun [] -> 0 + | [h|t] -> 1 + length t +in length [1, 3, 5, 2, 4, 0, -1, -5] + +// 8 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-max.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-max.fun new file mode 100644 index 00000000000..bbf62029179 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-max.fun @@ -0,0 +1,6 @@ +letrec max = fun [h] -> h + | [h|t] -> let x = max t + in if h > x then h else x +in max [1, 3, 5, 2, 4, 0, -1, -5] + +// 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-nth.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-nth.fun new file mode 100644 index 00000000000..5dba9b5be4c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/list-nth.fun @@ -0,0 +1,4 @@ +letrec nth = fun 1 [h|t] -> h + | n [h|t] -> nth (n - 1) t +in nth 4 [5,4,3,2,1] + diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/nth.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/nth.fun new file mode 100644 index 00000000000..6637c9b2830 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/nth.fun @@ -0,0 +1,10 @@ +letrec nth = fun 1 [h|t] -> h + | n [h|t] -> nth (n - 1) t +and nat n m = if n == m then [n] else (cons n (nat (n + 1) m)) +and length = fun [] -> 0 + | [h|t] -> 1 + length t +and map f = fun [] -> [] + | [h|t] -> cons (f h) (map f t) +and app = fun [] x -> [] + | [h|t] x -> cons (h x) (app t x) +in (app (map nth (nat 1 5)) [10,11,12,13,14,15,16,17]) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/pattern.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/pattern.fun new file mode 100644 index 00000000000..938d7f94dd6 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/pattern.fun @@ -0,0 +1,16 @@ +datatype ('a,'b) pair = Pair('a,'b) +datatype ('a,'b,'c) triple = Triple('a,'b,'c) + +letrec length = fun [] -> 0 + | [h|t] -> 1 + length t +and complex = fun Triple([Pair(h1,h2)|t], l, [Pair(a,2), Pair(3,b), c]) + -> Pair(h2 + length t + b, a) + | Triple([],[],[Pair(7,2),x,c]) + -> x + | default + -> Pair(0,0) +and map f = fun [] -> [] + | [h|t] -> cons (f h) (map f t) +in map complex [Triple([Pair(8,7)], [], [Pair(9,2), Pair(3,3), Pair(2,2)]), + Triple([], [], [Pair(7,2), Pair(0,1), Pair(-1,-1)]), + Triple([],[],[])] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-1.fun new file mode 100644 index 00000000000..0f4bb9199fe --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-1.fun @@ -0,0 +1,6 @@ +// testing polymorphism + +let f x = x +in f + +// some closure diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-2.fun new file mode 100644 index 00000000000..45a181d3889 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-2.fun @@ -0,0 +1,6 @@ +// testing (instantiated) polymorphism + +let f x = x +in f 3 + +// 3 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-3.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-3.fun new file mode 100644 index 00000000000..2accdf00223 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-3.fun @@ -0,0 +1,6 @@ +// testing polymorphism + +let f = fun x -> x +in if f true then f 2 else f 3 + +// 2 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-4.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-4.fun new file mode 100644 index 00000000000..eebc34fa131 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-4.fun @@ -0,0 +1,6 @@ +// testing polymorphism + +let f = fun x -> let y = x in y +in (fun x -> f) 7 + +// identity diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-5.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-5.fun new file mode 100644 index 00000000000..74a65556f9f --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-5.fun @@ -0,0 +1,9 @@ +// the program below justifies the restriction that reference +// types should not be polymorphic + +// the following runs in our semantics, but it should not type +// (elements of different types are added in *r)! + +let f = let r = ref [] + in (fun x -> r := cons x @r; x) +in if f true then f 3 else f 4 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-6.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-6.fun new file mode 100644 index 00000000000..32ccb7db7e2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/polymorphism-6.fun @@ -0,0 +1,8 @@ +// testing polymorphism and also the efficiency of the type inferencer + +let f00 = fun x -> fun y -> x in + let f01 = fun x -> f00 (f00 x) in + let f02 = fun x -> f01 (f01 x) in + let f03 = fun x -> f02 (f02 x) in + let f04 = fun x -> f03 (f03 x) in + f04 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-1.fun new file mode 100644 index 00000000000..fdb6d5216c7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-1.fun @@ -0,0 +1,29 @@ +datatype ('a,'b) pair = Pair('a,'b) + +letrec + +max l Pair(x,y) = + if @x != y + then -1 + else if null?(tail l) + then head l + else let x = max (tail l) Pair(x := @x + 1; x, y + 1) + in if x <= head l + then head l + else x + +and + +map f l = + if null? l + then [] + else cons (f (head l)) (map f (tail l)) + +and + +factorial x = + if x <= 0 + then 1 + else x * factorial(x - 1) + +in max (map factorial [1, 2, 3, factorial 4]) Pair(ref 1, 1) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-2.fun new file mode 100644 index 00000000000..5c3577449d7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-2.fun @@ -0,0 +1,5 @@ +let f x y = x := @x + 2; y := @y + 3 +and x = ref 0 +in (f x x; @x) + +// 5 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-3.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-3.fun new file mode 100644 index 00000000000..a36cb44cb5c --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-3.fun @@ -0,0 +1,7 @@ +// testing ref, * and ; + +let f x = x + x +in let y = ref 5 + in f (y := @y + 3; @y) + +// 16 diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-4.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-4.fun new file mode 100644 index 00000000000..a11a9c72ff9 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-4.fun @@ -0,0 +1,10 @@ +// can be used for testing parameter passing styles +// replace parameter passing style of f + +let f = let c = ref 0 + in ( + c := @c + 100 ; + (fun x -> c := @c + 1000; x + x + @c) + ) +in let y = ref 0 + in f(y := @y + 1 ; @y) + f(0) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-5.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-5.fun new file mode 100644 index 00000000000..c7ba51ec833 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/references-5.fun @@ -0,0 +1,7 @@ +// testing &, *, := and lists + +let f x = x := @x + 1 +and x = 7 +in [x, f &x; x, f &x; x] + +// [7,8,9], or [7,9,8], or [9,8,9], or [9,9,8] diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/stuck-letrec.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/stuck-letrec.fun new file mode 100644 index 00000000000..d608fc95dc4 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/stuck-letrec.fun @@ -0,0 +1,6 @@ +// testing letrec: next should get stuck + +let x = 1 +in letrec x = 2 + and y = x + in y diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tail-recursion.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tail-recursion.fun new file mode 100644 index 00000000000..8adeeab395e --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tail-recursion.fun @@ -0,0 +1,12 @@ +// This tail recursive program uses fixed memory, but can take a lot of +// computation/stack space if the semantics is not tail-recursive. +// Curiously, the tail recursion rule does not seem to be favoured by +// maude: (1) it is not applied, preferring to apply the normal +// environment-recovery rule; and (2) it slows down significantly +// this program (4-5 times!), because it makes maude's matcher slower. + +datatype nothing = Nothing + +let n = ref 1000 +in letrec f Nothing = if @n>0 then n := @n - 1; f Nothing else 0 + in f Nothing diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-1.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-1.fun new file mode 100644 index 00000000000..cd48ddd354b --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-1.fun @@ -0,0 +1,5 @@ +// testing functions tuple arguments and polymorphism + +datatype ('a,'b,'c) triple = Triple('a,'b,'c) + +fun Triple(x,y,z) -> y diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-2.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-2.fun new file mode 100644 index 00000000000..fb1d28fb917 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-2.fun @@ -0,0 +1,9 @@ +// testing nested tuples + +datatype 'a wrapper = Wrapper('a) +datatype ('a,'b) pair = Pair('a,'b) + +let x = 1 +and y = Wrapper(2) +and z = Pair(3,4) +in Pair(Pair(x,y),z) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-3.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-3.fun new file mode 100644 index 00000000000..8f2ec9bf6c7 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-3.fun @@ -0,0 +1,6 @@ +// testing functions taking tuple arguments + +datatype ('a,'b,'c) triple = Triple('a,'b,'c) + +let f Triple(x,y,z) = x + y + z +in f Triple(1,2,3) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-4.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-4.fun new file mode 100644 index 00000000000..2d70c169499 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-4.fun @@ -0,0 +1,6 @@ +// testing two tuple arguments to a function + +datatype ('a,'b) pair = Pair('a,'b) + +let f Pair(a,b) Pair(x,y) = a Pair(x,y) + b Pair(x,y) +in f Pair(fun Pair(x,y) -> x * y, fun Pair(x,y) -> x + y) Pair(10,20) diff --git a/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-5.fun b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-5.fun new file mode 100644 index 00000000000..70bea02b8e2 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/3_fun/programs/tuple-5.fun @@ -0,0 +1,9 @@ +// testing tuple arguments to a function + +datatype nothing = Nothing +datatype ('a,'b) pair = Pair('a,'b) + +let f = fun Nothing Pair(a,b) q Nothing Pair(x,y) Nothing + -> a Pair(x,y) + b Pair(x,y) +in f Nothing Pair(fun Pair (x,y) -> x * y, fun Pair(x,y) -> x + y) + 3 Nothing Pair(10,20) Nothing diff --git a/pyk/regression-new/pl-tutorial/2_languages/Makefile b/pyk/regression-new/pl-tutorial/2_languages/Makefile new file mode 100644 index 00000000000..93f4342f200 --- /dev/null +++ b/pyk/regression-new/pl-tutorial/2_languages/Makefile @@ -0,0 +1,3 @@ +SUBDIRS=1_simple 2_kool 3_fun + +include ../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/pl-tutorial/Makefile b/pyk/regression-new/pl-tutorial/Makefile new file mode 100644 index 00000000000..855b66fbdee --- /dev/null +++ b/pyk/regression-new/pl-tutorial/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=1_k 2_languages +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/poly-kitem/Makefile b/pyk/regression-new/poly-kitem/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/poly-kitem/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/poly-kitem/test.k b/pyk/regression-new/poly-kitem/test.k new file mode 100644 index 00000000000..e4a6413abb6 --- /dev/null +++ b/pyk/regression-new/poly-kitem/test.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + +syntax KItem ::= foo(KItem) + +rule foo((foo(G:KItem) => foo(foo(G)))) +endmodule diff --git a/pyk/regression-new/poly-sort/1.test b/pyk/regression-new/poly-sort/1.test new file mode 100644 index 00000000000..257cc5642cb --- /dev/null +++ b/pyk/regression-new/poly-sort/1.test @@ -0,0 +1 @@ +foo diff --git a/pyk/regression-new/poly-sort/1.test.out b/pyk/regression-new/poly-sort/1.test.out new file mode 100644 index 00000000000..3bb0c527e01 --- /dev/null +++ b/pyk/regression-new/poly-sort/1.test.out @@ -0,0 +1,3 @@ + + bar ~> 0 ~> .K + diff --git a/pyk/regression-new/poly-sort/Makefile b/pyk/regression-new/poly-sort/Makefile new file mode 100644 index 00000000000..42a10aad9c0 --- /dev/null +++ b/pyk/regression-new/poly-sort/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/poly-sort/test.k b/pyk/regression-new/poly-sort/test.k new file mode 100644 index 00000000000..146957b2f70 --- /dev/null +++ b/pyk/regression-new/poly-sort/test.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + +configuration $PGM:K + +syntax Foo ::= "foo" | "bar" + +rule foo => #if ?_B:Bool #then 0 #else 1 #fi ~> 0 + +rule _I:Int => bar + +endmodule diff --git a/pyk/regression-new/poly-unparsing/Makefile b/pyk/regression-new/poly-unparsing/Makefile new file mode 100644 index 00000000000..2cc770d4bab --- /dev/null +++ b/pyk/regression-new/poly-unparsing/Makefile @@ -0,0 +1,7 @@ +DEF=poly-unparsing +EXT=poly-unparsing +TESTDIR=. +KOMPILE_BACKEND=haskell +KAST_FLAGS=--expand-macros --input kore --output pretty + +include ../include/ktest.mak diff --git a/pyk/regression-new/poly-unparsing/poly-unparsing.k b/pyk/regression-new/poly-unparsing/poly-unparsing.k new file mode 100644 index 00000000000..695c5d606d4 --- /dev/null +++ b/pyk/regression-new/poly-unparsing/poly-unparsing.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module POLY-UNPARSING-SYNTAX + imports ML-SYNTAX + imports INT + imports MAP + + syntax Pgm ::= ".Pgm" +endmodule + +module POLY-UNPARSING + imports POLY-UNPARSING-SYNTAX + configuration $PGM:Pgm +endmodule diff --git a/pyk/regression-new/poly-unparsing/test1.kore.kast b/pyk/regression-new/poly-unparsing/test1.kore.kast new file mode 100644 index 00000000000..e114743a6e9 --- /dev/null +++ b/pyk/regression-new/poly-unparsing/test1.kore.kast @@ -0,0 +1,3 @@ +\ceil{SortInt{}, SortGeneratedTopCell{}}( + Lbl'Stop'Pgm'Unds'POLY-UNPARSING-SYNTAX'Unds'Pgm{}() +) diff --git a/pyk/regression-new/poly-unparsing/test1.kore.kast.out b/pyk/regression-new/poly-unparsing/test1.kore.kast.out new file mode 100644 index 00000000000..9b13b5cf495 --- /dev/null +++ b/pyk/regression-new/poly-unparsing/test1.kore.kast.out @@ -0,0 +1 @@ +#Ceil ( .Pgm ) diff --git a/pyk/regression-new/prelude-warnings/Makefile b/pyk/regression-new/prelude-warnings/Makefile new file mode 100644 index 00000000000..c8d427c43bd --- /dev/null +++ b/pyk/regression-new/prelude-warnings/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=-w all -w2e + +include ../include/ktest.mak diff --git a/pyk/regression-new/prelude-warnings/test.k b/pyk/regression-new/prelude-warnings/test.k new file mode 100644 index 00000000000..367c593424f --- /dev/null +++ b/pyk/regression-new/prelude-warnings/test.k @@ -0,0 +1,30 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "ffi.md" +requires "json.md" +requires "rat.md" +requires "substitution.md" + +module TEST-SYNTAX +endmodule + +module TEST + imports DOMAINS + imports ARRAY + imports COLLECTIONS + imports FLOAT + imports STRING-BUFFER + imports BYTES + imports K-IO + imports DEFAULT-STRATEGY + imports MINT + imports FFI + imports JSON + imports RAT + imports SUBSTITUTION + imports TEST-SYNTAX + + syntax MInt{8} + rule I:Int => Int2MInt(I)::MInt{8} + + configuration $PGM:K +endmodule diff --git a/pyk/regression-new/profile/Makefile b/pyk/regression-new/profile/Makefile new file mode 100644 index 00000000000..45e0620ba2a --- /dev/null +++ b/pyk/regression-new/profile/Makefile @@ -0,0 +1,10 @@ +DEF=test +EXT=test +KOMPILE_BACKEND=haskell +TESTDIR=. +KOMPILE_FLAGS=--profile-rule-parsing test-kompiled/timing.log --syntax-module TEST +KPROVE_FLAGS=--profile-rule-parsing test-kompiled/spectiming.log + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/profile/test-spec.k b/pyk/regression-new/profile/test-spec.k new file mode 100644 index 00000000000..b676bfb629c --- /dev/null +++ b/pyk/regression-new/profile/test-spec.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SPEC + imports TEST + + claim 0 => 1 + +endmodule diff --git a/pyk/regression-new/profile/test-spec.k.out b/pyk/regression-new/profile/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/profile/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/profile/test.k b/pyk/regression-new/profile/test.k new file mode 100644 index 00000000000..e50e885cc32 --- /dev/null +++ b/pyk/regression-new/profile/test.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + rule 0 => 1 + +endmodule diff --git a/pyk/regression-new/proof-instrumentation/.gitignore b/pyk/regression-new/proof-instrumentation/.gitignore new file mode 100644 index 00000000000..c75c8d9c4ad --- /dev/null +++ b/pyk/regression-new/proof-instrumentation/.gitignore @@ -0,0 +1 @@ +out.hint diff --git a/pyk/regression-new/proof-instrumentation/Makefile b/pyk/regression-new/proof-instrumentation/Makefile new file mode 100644 index 00000000000..66853810611 --- /dev/null +++ b/pyk/regression-new/proof-instrumentation/Makefile @@ -0,0 +1,22 @@ +DEF=test +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS+=--gen-glr-bison-parser --llvm-proof-hint-instrumentation +LLVM_KRUN_FLAGS=-d ./test-kompiled --proof-hints + +check: out.hint + head -c4 out.hint | diff - <(echo -n 'HINT') + +out.hint: test.kore + rm -f $@ + $(LLVM_KRUN) $(LLVM_KRUN_FLAGS) \ + -c PGM $< Foo korefile -o $@ + +test.kore: test.in kompile + ./test-kompiled/parser_PGM $< > $@ + +include ../include/ktest.mak + +clean: + rm -rf out.hint test.kore $(KOMPILED_DIR) .depend-tmp .depend .kompile-* .krun-* .kprove-* kore-exec.tar.gz + +update-results: CHECK=> test.out diff --git a/pyk/regression-new/proof-instrumentation/test.in b/pyk/regression-new/proof-instrumentation/test.in new file mode 100644 index 00000000000..eb28ef4401b --- /dev/null +++ b/pyk/regression-new/proof-instrumentation/test.in @@ -0,0 +1 @@ +foo() diff --git a/pyk/regression-new/proof-instrumentation/test.k b/pyk/regression-new/proof-instrumentation/test.k new file mode 100644 index 00000000000..6ae9dde9040 --- /dev/null +++ b/pyk/regression-new/proof-instrumentation/test.k @@ -0,0 +1,9 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST-SYNTAX + syntax Foo ::= foo() | bar() +endmodule + +module TEST + imports TEST-SYNTAX + rule foo() => bar() +endmodule diff --git a/pyk/regression-new/proof-tests/Makefile b/pyk/regression-new/proof-tests/Makefile new file mode 100644 index 00000000000..b83c6b01644 --- /dev/null +++ b/pyk/regression-new/proof-tests/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=deposit +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/proof-tests/deposit/Makefile b/pyk/regression-new/proof-tests/deposit/Makefile new file mode 100644 index 00000000000..bdb16a752db --- /dev/null +++ b/pyk/regression-new/proof-tests/deposit/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=test spec +include ../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/proof-tests/deposit/spec/Makefile b/pyk/regression-new/proof-tests/deposit/spec/Makefile new file mode 100644 index 00000000000..720755bfc91 --- /dev/null +++ b/pyk/regression-new/proof-tests/deposit/spec/Makefile @@ -0,0 +1,16 @@ +DEF=deposit-symbolic +EXT=deposit +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module DEPOSIT-SYMBOLIC +KPROVE_FLAGS=--smt-prelude imap.smt2 + +# This test is disabled until https://github.com/runtimeverification/k/issues/2308 is +# resolved; the SMT solver behaviour needed to implement this test correctly is +# not available until partial hooks can be defined. + +disable: + +clean: + +# include ../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/proof-tests/deposit/spec/deposit-spec.k b/pyk/regression-new/proof-tests/deposit/spec/deposit-spec.k new file mode 100644 index 00000000000..48a19c51dc9 --- /dev/null +++ b/pyk/regression-new/proof-tests/deposit/spec/deposit-spec.k @@ -0,0 +1,56 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "deposit-symbolic.k" + +module DEPOSIT-SPEC + +imports DEPOSIT-SYMBOLIC + +// Lemma 7 (deposit). + +claim deposit(V) => . ... + M => M +Int 1 + TREE_HEIGHT + Branch1 => ?Branch2 + requires V ==Int tn(M +Int 1, 0, M +Int 1) + andBool M =Int 1 + andBool isValidBranch(Branch1, M) + ensures isValidBranch(?Branch2, M +Int 1) + +claim depositLoop(I, TREE_HEIGHT -Int 1, down(I, M), tn(M, I, down(I, M))) => . ... + M // M = m + 1 + TREE_HEIGHT + Branch1 => ?Branch2 + requires I <=Int TREE_HEIGHT -Int 1 + andBool (2 ^Int I) *Int down(I, M) ==Int M + andBool 1 <=Int M andBool M =Int 1 + andBool isValidBranch(Branch1, M -Int 1) + ensures isValidBranch(?Branch2, M) + +// Lemma 9 (get_deposit_root). + +claim getDepositRoot => tn(M, TREE_HEIGHT, 1) ... + M + TREE_HEIGHT + Branch + Zeros + requires M getDepositRootLoop(K, TREE_HEIGHT, down(K, M), tn(M, K, up(K, M +Int 1))) => tn(M, TREE_HEIGHT, 1) ... + M + TREE_HEIGHT + Branch + Zeros + requires K <=Int TREE_HEIGHT + andBool M I >=Int 0 + +syntax Int ::= tn(Int, Int, Int) /* tn(m,l,i) := T_m(l,i) */ [function, smtlib(tn)] + | up(Int, Int) /* up(k,x) := \up^k x */ [function, smtlib(up)] + | down(Int, Int) /* down(k,x) := \down^k x */ [function, smtlib(down)] + +/* + * By Equation 6. (\ref{eq:def:partial-merkle-tree}) + */ +rule tn(M, 0, I) => 0 requires I >Int M + andBool isNat(M) andBool isNat(I) +// andBool M <=Int 2 ^Int TREE_HEIGHT +// andBool I <=Int 2 ^Int TREE_HEIGHT + +/* + * By Equations 1 and 2. (\ref{eq:def:up}, \ref{eq:def:down}) + */ +rule up(0, M) => M requires true + andBool isNat(M) + +rule down(0, M) => M requires true + andBool isNat(M) + +rule down(K, M) /Int 2 => down(K +Int 1, M) requires true + andBool isNat(K) andBool isNat(M) [simplification] + +rule up(H, M) => 1 requires M <=Int 2 ^Int H + andBool isNat(H) andBool isNat(M) + +/* + * Lemma 8 (Contract Invariant). + * isValidBranch(branch, m) + * iff + * for all k >= 0: branch[k] = T_m(k, \down^k m) if \down^k m is odd + */ +syntax Bool ::= isValidBranch(IMap, Int) [function, smtlib(isValidBranch)] + +/* + * Lemma 3. (\ref{lem:zero}) + * isValidZeros(zeros, m) + * iff + * for all k >= 0: zeros[k] = T_m(k, i) if i > \up^k m + */ +syntax Bool ::= isValidZeros(IMap, Int) [function, smtlib(isValidZeros)] + +// Proof of Lemma 9 (get_deposit_root) + +/* + * By Lemma 8 (Contract Invariant). + */ +rule hash(Branch[K], tn(M, K, up(K, M +Int 1))) => tn(M, K +Int 1, up(K +Int 1, M +Int 1)) + requires isValidBranch(Branch, M) + andBool down(K, M) %Int 2 ==Int 1 + andBool isNat(K) andBool isNat(M) +// andBool K tn(M, K +Int 1, up(K +Int 1, M +Int 1)) + requires isValidZeros(Zeros, M) + andBool down(K, M) %Int 2 =/=Int 1 + andBool isNat(K) andBool isNat(M) +// andBool K tn(M, I +Int 1, down(I +Int 1, M)) + requires isValidBranch(Branch, M -Int 1) + andBool down(I, M) %Int 2 =/=Int 1 + andBool (2 ^Int I) *Int down(I, M) ==Int M + andBool isNat(I) andBool isNat(M) +// andBool I true + requires isValidBranch(B, M -Int 1) + andBool (2 ^Int I) *Int down(I, M) ==Int M + andBool down(I, M) %Int 2 ==Int 1 + andBool isNat(I) andBool isNat(M) +// andBool I true + requires isValidBranch(B, M -Int 1) + andBool (2 ^Int I) *Int down(I, M) ==Int M + andBool 1 <=Int M andBool M 1 +// requires M Int 0 + +/* + * By Equation 2. (\ref{eq:def:down}) + */ +rule (2 ^Int (I +Int 1)) *Int down(I +Int 1, M) => M + requires (2 ^Int I) *Int down(I, M) ==Int M + andBool down(I, M) %Int 2 =/=Int 1 + andBool isNat(I) andBool isNat(M) +// andBool I C ~> Cs + +endmodule + +module DEPOSIT + +imports DEPOSIT-SYNTAX +imports INT +imports IMAP +imports BOOL + +/* + * zerohashes: int[TREE_HEIGHT] = \{0\} # zero array + * branch: int[TREE_HEIGHT] = \{0\} # zero array + * deposit_count: int = 0 # max: 2^TREE_HEIGHT - 1 + */ + +configuration + initConfig ~> init ~> $PGM:Cmds + .IMap + .IMap + 0 + $TREEHEIGHT:Int + + +rule initConfig => initConfigLoop(0, TREE_HEIGHT) ... + TREE_HEIGHT + +rule initConfigLoop(I, N) => initConfigLoop(I +Int 1, N) ... + Z => Z[I <- 0] + B => B[I <- 0] + requires I .K requires I >=Int N + + +/* + * fun init() -> unit: + * i: int = 0 + * while i < TREE_HEIGHT - 1: + * zerohashes[i+1] = hash(zerohashes[i], zerohashes[i]) + * i += 1 + */ + +rule init => initLoop(0, TREE_HEIGHT -Int 1) ... + TREE_HEIGHT + +rule initLoop(I, N) + => initLoop(I +Int 1, N) ... + Z => Z[I +Int 1 <- hash(Z[I], Z[I])] + requires I .K requires I >=Int N + + +/* + * fun deposit(value: int) -> unit: + * assert deposit_count < 2^TREE_HEIGHT - 1 + * deposit_count += 1 + * size: int = deposit_count + * i: int = 0 + * while i < TREE_HEIGHT - 1: + * if size % 2 == 1: + * break + * value = hash(branch[i], value) + * size /= 2 + * i += 1 + * branch[i] = value + */ + +rule deposit(V) => depositLoop(0, TREE_HEIGHT -Int 1, DC +Int 1, V) ... + DC => DC +Int 1 + TREE_HEIGHT + requires DC depositLoop(I, N, Size, Value) + => depositLoop(I +Int 1, N, Size /Int 2, hash(B[I], Value)) ... + B + requires I depositLoop(I, N, Size, Value) => .K ... + B => B[I <- Value] + requires I depositLoop(I, N, _Size, Value) => .K ... + B => B[I <- Value] + requires I >=Int N +// orBool Size %Int 2 ==Int 1 + + +/* + * fun get_deposit_root() -> int: + * root: int = 0 + * size: int = deposit_count + * h: int = 0 + * while h < TREE_HEIGHT: + * if size % 2 == 1: # size is odd + * root = hash(branch[h], root) + * else: # size is even + * root = hash(root, zerohashes[h]) + * size /= 2 + * h += 1 + * return root + */ + +rule getDepositRoot => getDepositRootLoop(0, TREE_HEIGHT, DepositCount, 0) ... + DepositCount + TREE_HEIGHT + +rule getDepositRootLoop(H, N, Size, Root) + => getDepositRootLoop(H +Int 1, N, Size /Int 2, hash(B[H], Root)) ... + B + requires H getDepositRootLoop(H, N, Size, Root) + => getDepositRootLoop(H +Int 1, N, Size /Int 2, hash(Root, Z[H])) ... + Z + requires H Root + requires H >=Int N + +endmodule diff --git a/pyk/regression-new/proof-tests/deposit/test/imap.k b/pyk/regression-new/proof-tests/deposit/test/imap.k new file mode 100644 index 00000000000..9d3cbdbee4f --- /dev/null +++ b/pyk/regression-new/proof-tests/deposit/test/imap.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module IMAP-SYNTAX + imports INT + syntax IMap // (define-sort IMap () (Array Int Int)) + syntax IMap ::= IMap "[" Int "<-" Int "]" [function, total, no-evaluators, klabel(store), smtlib(store)] //, hook(MAP.update)] + syntax Int ::= IMap "[" Int "]" [function, klabel(select), smtlib(select)] //, hook(MAP.lookup)] + syntax IMap ::= ".IMap" +endmodule + +module IMAP-SYMBOLIC [symbolic] + imports IMAP-SYNTAX + rule _M [ K0 <- V ] [ K ] => V requires K0 ==Int K [simplification] + rule M [ K0 <- _V ] [ K ] => M [ K ] requires K0 =/=Int K [simplification] +// rule .IMap [ _ ] => 0 + +// syntax IntMap +// rule isInt( M:Map [ _ ] ) => isIntMap(M) +// rule isInt( M:Map [ _ <- V:Int ] ) => isIntMap(M) +endmodule + +module IMAP + imports IMAP-SYNTAX + imports IMAP-SYMBOLIC +endmodule diff --git a/pyk/regression-new/proof-tests/deposit/test/test.deposit b/pyk/regression-new/proof-tests/deposit/test/test.deposit new file mode 100644 index 00000000000..255a3170f3d --- /dev/null +++ b/pyk/regression-new/proof-tests/deposit/test/test.deposit @@ -0,0 +1,9 @@ +deposit 1 +deposit 2 +deposit 3 +deposit 4 +deposit 5 +deposit 6 +deposit 7 +//deposit 8 +getDepositRoot diff --git a/pyk/regression-new/proof-tests/deposit/test/test.deposit.out b/pyk/regression-new/proof-tests/deposit/test/test.deposit.out new file mode 100644 index 00000000000..da7b584d042 --- /dev/null +++ b/pyk/regression-new/proof-tests/deposit/test/test.deposit.out @@ -0,0 +1,17 @@ + + + hash ( hash ( hash ( 1 , 2 ) , hash ( 3 , 4 ) ) , hash ( hash ( 5 , 6 ) , hash ( 7 , 0 ) ) ) ~> .K + + + .IMap [ 0 <- 0 ] [ 1 <- 0 ] [ 2 <- 0 ] [ 1 <- hash ( 0 , 0 ) ] [ 2 <- hash ( hash ( 0 , 0 ) , hash ( 0 , 0 ) ) ] + + + .IMap [ 0 <- 0 ] [ 1 <- 0 ] [ 2 <- 0 ] [ 0 <- 1 ] [ 1 <- hash ( 1 , 2 ) ] [ 0 <- 3 ] [ 2 <- hash ( hash ( 1 , 2 ) , hash ( 3 , 4 ) ) ] [ 0 <- 5 ] [ 1 <- hash ( 5 , 6 ) ] [ 0 <- 7 ] + + + 7 + + + 3 + + diff --git a/pyk/regression-new/quadratic-poly-unparsing/Makefile b/pyk/regression-new/quadratic-poly-unparsing/Makefile new file mode 100644 index 00000000000..e058974b8bc --- /dev/null +++ b/pyk/regression-new/quadratic-poly-unparsing/Makefile @@ -0,0 +1,7 @@ +DEF=nondet +EXT=nondet +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module NONDET + +include ../include/ktest.mak diff --git a/pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search b/pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search new file mode 100644 index 00000000000..c72f08c3900 --- /dev/null +++ b/pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search @@ -0,0 +1 @@ +initial \ No newline at end of file diff --git a/pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search.out b/pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search.out new file mode 100644 index 00000000000..e7adb4fe68d --- /dev/null +++ b/pyk/regression-new/quadratic-poly-unparsing/initial.nondet.search.out @@ -0,0 +1,39 @@ + { + Result:GeneratedTopCell + #Equals + + final1 ~> .K + + } +#Or + { + Result:GeneratedTopCell + #Equals + + final2 ~> .K + + } +#Or + { + Result:GeneratedTopCell + #Equals + + initial ~> .K + + } +#Or + { + Result:GeneratedTopCell + #Equals + + next1 ~> .K + + } +#Or + { + Result:GeneratedTopCell + #Equals + + next2 ~> .K + + } diff --git a/pyk/regression-new/quadratic-poly-unparsing/nondet.k b/pyk/regression-new/quadratic-poly-unparsing/nondet.k new file mode 100644 index 00000000000..4460deb1f1f --- /dev/null +++ b/pyk/regression-new/quadratic-poly-unparsing/nondet.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module NONDET + + imports DOMAINS + + syntax S + ::= "initial" + | "next1" | "next2" + | "final1" | "final2" + | "unreachable" + + rule initial => next1 + + rule initial => next2 + + rule next1 => final1 + + rule next2 => final2 + +endmodule diff --git a/pyk/regression-new/rand/1.rand b/pyk/regression-new/rand/1.rand new file mode 100644 index 00000000000..f7c37215a99 --- /dev/null +++ b/pyk/regression-new/rand/1.rand @@ -0,0 +1 @@ +1 ; 2 ; 32 ; 3244 ; 33452222222222 ; 542454 ; .Pgm diff --git a/pyk/regression-new/rand/1.rand.out b/pyk/regression-new/rand/1.rand.out new file mode 100644 index 00000000000..41386797ffb --- /dev/null +++ b/pyk/regression-new/rand/1.rand.out @@ -0,0 +1,13 @@ + + + .Pgm ~> .K + + + ListItem ( 315 ) + ListItem ( 939 ) + ListItem ( 504 ) + ListItem ( 944 ) + ListItem ( 231 ) + ListItem ( 283 ) + + diff --git a/pyk/regression-new/rand/Makefile b/pyk/regression-new/rand/Makefile new file mode 100644 index 00000000000..815a9ab1eef --- /dev/null +++ b/pyk/regression-new/rand/Makefile @@ -0,0 +1,6 @@ +DEF=rand +EXT=rand +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/rand/rand.k b/pyk/regression-new/rand/rand.k new file mode 100644 index 00000000000..ee25d492346 --- /dev/null +++ b/pyk/regression-new/rand/rand.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module RAND-SYNTAX + imports DOMAINS-SYNTAX + + syntax Pgm ::= ".Pgm" | Int ";" Pgm | runRand ( ) +endmodule + + +module RAND + imports RAND-SYNTAX + imports DOMAINS + + configuration $PGM:Pgm + .List + + rule I ; P => srandInt(I) ~> runRand() ~> P ... + + rule runRand() => .K ... + ... .List => ListItem(randInt(1000)) +endmodule diff --git a/pyk/regression-new/rangemap-tests-llvm/Makefile b/pyk/regression-new/rangemap-tests-llvm/Makefile new file mode 100644 index 00000000000..8db362dd014 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/Makefile @@ -0,0 +1,6 @@ +DEF=rangemap-simple +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm + +include ../include/ktest.mak diff --git a/pyk/regression-new/rangemap-tests-llvm/choice.test b/pyk/regression-new/rangemap-tests-llvm/choice.test new file mode 100644 index 00000000000..f2d5a65ef8a --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/choice.test @@ -0,0 +1 @@ +choice(rangemap(2)) diff --git a/pyk/regression-new/rangemap-tests-llvm/choice.test.out b/pyk/regression-new/rangemap-tests-llvm/choice.test.out new file mode 100644 index 00000000000..df891b31899 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/choice.test.out @@ -0,0 +1,3 @@ + + 2 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-0.test b/pyk/regression-new/rangemap-tests-llvm/concat-0.test new file mode 100644 index 00000000000..accf8506041 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-0.test @@ -0,0 +1 @@ +rangemap(0) rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-0.test.out b/pyk/regression-new/rangemap-tests-llvm/concat-0.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-0.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-1.test b/pyk/regression-new/rangemap-tests-llvm/concat-1.test new file mode 100644 index 00000000000..cb52328b12f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-1.test @@ -0,0 +1 @@ +rangemap(0) rangemap(2) diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-1.test.out b/pyk/regression-new/rangemap-tests-llvm/concat-1.test.out new file mode 100644 index 00000000000..0278e7cb267 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-1.test.out @@ -0,0 +1,3 @@ + + [ 2 , 3 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-2.test b/pyk/regression-new/rangemap-tests-llvm/concat-2.test new file mode 100644 index 00000000000..4f647bdaa59 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-2.test @@ -0,0 +1 @@ +rangemap(2) rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-2.test.out b/pyk/regression-new/rangemap-tests-llvm/concat-2.test.out new file mode 100644 index 00000000000..0278e7cb267 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-2.test.out @@ -0,0 +1,3 @@ + + [ 2 , 3 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-3.test b/pyk/regression-new/rangemap-tests-llvm/concat-3.test new file mode 100644 index 00000000000..bc358d52e6f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-3.test @@ -0,0 +1 @@ +rangemap(2) rangemap(4) diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-3.test.out b/pyk/regression-new/rangemap-tests-llvm/concat-3.test.out new file mode 100644 index 00000000000..864c42514b7 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-3.test.out @@ -0,0 +1,3 @@ + + [ 1 , 5 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-4.test b/pyk/regression-new/rangemap-tests-llvm/concat-4.test new file mode 100644 index 00000000000..ca845929b18 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-4.test @@ -0,0 +1 @@ +rangemap(5) rangemap(2) diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-4.test.out b/pyk/regression-new/rangemap-tests-llvm/concat-4.test.out new file mode 100644 index 00000000000..06661330363 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-4.test.out @@ -0,0 +1,4 @@ + + [ 1 , 2 ) r|-> 45 + [ 2 , 5 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-6.test b/pyk/regression-new/rangemap-tests-llvm/concat-6.test new file mode 100644 index 00000000000..f910c3e5129 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-6.test @@ -0,0 +1 @@ +rangemap(6) rangemap(2) diff --git a/pyk/regression-new/rangemap-tests-llvm/concat-6.test.out b/pyk/regression-new/rangemap-tests-llvm/concat-6.test.out new file mode 100644 index 00000000000..fc67d973ff4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/concat-6.test.out @@ -0,0 +1,5 @@ + + [ 0 , 1 ) r|-> 40 + [ 2 , 3 ) r|-> 40 + [ 4 , 5 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-0.test b/pyk/regression-new/rangemap-tests-llvm/difference-0.test new file mode 100644 index 00000000000..d02ebdb1f3e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-0.test @@ -0,0 +1 @@ +rangemap(0) -RangeMap rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-0.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-0.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-0.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-1.test b/pyk/regression-new/rangemap-tests-llvm/difference-1.test new file mode 100644 index 00000000000..217048ad77a --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-1.test @@ -0,0 +1 @@ +rangemap(0) -RangeMap rangemap(2) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-1.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-1.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-1.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-2.test b/pyk/regression-new/rangemap-tests-llvm/difference-2.test new file mode 100644 index 00000000000..1bdd222aca7 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-2.test @@ -0,0 +1 @@ +rangemap(2) -RangeMap rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-2.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-2.test.out new file mode 100644 index 00000000000..0278e7cb267 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-2.test.out @@ -0,0 +1,3 @@ + + [ 2 , 3 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-4.test b/pyk/regression-new/rangemap-tests-llvm/difference-4.test new file mode 100644 index 00000000000..42e70c6b0d3 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-4.test @@ -0,0 +1 @@ +rangemap(8) -RangeMap rangemap(1) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-4.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-4.test.out new file mode 100644 index 00000000000..721e5187a47 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-4.test.out @@ -0,0 +1,3 @@ + + [ 9 , 12 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-6.test b/pyk/regression-new/rangemap-tests-llvm/difference-6.test new file mode 100644 index 00000000000..b49ac8072b6 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-6.test @@ -0,0 +1 @@ +rangemap(1) -RangeMap rangemap(5) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-6.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-6.test.out new file mode 100644 index 00000000000..ae36de78ffc --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-6.test.out @@ -0,0 +1,4 @@ + + [ 0 , 3 ) r|-> 40 + [ 5 , 20 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-7.test b/pyk/regression-new/rangemap-tests-llvm/difference-7.test new file mode 100644 index 00000000000..f07198d1dd3 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-7.test @@ -0,0 +1 @@ +rangemap(8) -RangeMap rangemap(7) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-7.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-7.test.out new file mode 100644 index 00000000000..a9b83ba84f2 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-7.test.out @@ -0,0 +1,6 @@ + + [ 0 , 1 ) r|-> 40 + [ 3 , 5 ) r|-> 40 + [ 7 , 8 ) r|-> 40 + [ 9 , 12 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-8.test b/pyk/regression-new/rangemap-tests-llvm/difference-8.test new file mode 100644 index 00000000000..500ebc4b683 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-8.test @@ -0,0 +1 @@ +rangemap(4) -RangeMap rangemap(2) diff --git a/pyk/regression-new/rangemap-tests-llvm/difference-8.test.out b/pyk/regression-new/rangemap-tests-llvm/difference-8.test.out new file mode 100644 index 00000000000..ca43002a858 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/difference-8.test.out @@ -0,0 +1,4 @@ + + [ 1 , 2 ) r|-> 40 + [ 3 , 5 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/element.test b/pyk/regression-new/rangemap-tests-llvm/element.test new file mode 100644 index 00000000000..0f5a3bca693 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/element.test @@ -0,0 +1 @@ +[0, 1) r|-> 40 diff --git a/pyk/regression-new/rangemap-tests-llvm/element.test.out b/pyk/regression-new/rangemap-tests-llvm/element.test.out new file mode 100644 index 00000000000..50721697d14 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/element.test.out @@ -0,0 +1,3 @@ + + [ 0 , 1 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/find-range-1.test b/pyk/regression-new/rangemap-tests-llvm/find-range-1.test new file mode 100644 index 00000000000..2596f5bae74 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/find-range-1.test @@ -0,0 +1 @@ +find_range(rangemap(1), 5) diff --git a/pyk/regression-new/rangemap-tests-llvm/find-range-1.test.out b/pyk/regression-new/rangemap-tests-llvm/find-range-1.test.out new file mode 100644 index 00000000000..6797af8e32c --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/find-range-1.test.out @@ -0,0 +1,3 @@ + + [ 0 , 20 ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/find-range-2.test b/pyk/regression-new/rangemap-tests-llvm/find-range-2.test new file mode 100644 index 00000000000..529a72fe097 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/find-range-2.test @@ -0,0 +1 @@ +find_range(rangemap(7), 5) diff --git a/pyk/regression-new/rangemap-tests-llvm/find-range-2.test.out b/pyk/regression-new/rangemap-tests-llvm/find-range-2.test.out new file mode 100644 index 00000000000..c1e09812176 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/find-range-2.test.out @@ -0,0 +1,3 @@ + + [ 5 , 7 ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-00.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-00.test new file mode 100644 index 00000000000..e733f6fd81f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-00.test @@ -0,0 +1 @@ +0 in_keys(rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-00.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-00.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-00.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-01.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-01.test new file mode 100644 index 00000000000..f7ddfc5acf2 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-01.test @@ -0,0 +1 @@ +16 in_keys(rangemap(3)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-01.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-01.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-01.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-02.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-02.test new file mode 100644 index 00000000000..6a396985e0d --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-02.test @@ -0,0 +1 @@ +17 in_keys(rangemap(3)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-02.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-02.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-02.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-03.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-03.test new file mode 100644 index 00000000000..ac7f8abb4b4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-03.test @@ -0,0 +1 @@ +18 in_keys(rangemap(3)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-03.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-03.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-03.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-04.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-04.test new file mode 100644 index 00000000000..7a962ecbd4f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-04.test @@ -0,0 +1 @@ +19 in_keys(rangemap(3)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-04.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-04.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-04.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-05.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-05.test new file mode 100644 index 00000000000..18d85bb2cf2 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-05.test @@ -0,0 +1 @@ +20 in_keys(rangemap(3)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-05.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-05.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-05.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-06.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-06.test new file mode 100644 index 00000000000..2b690f76bdb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-06.test @@ -0,0 +1 @@ +0 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-06.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-06.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-06.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-07.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-07.test new file mode 100644 index 00000000000..eb9c52bad90 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-07.test @@ -0,0 +1 @@ +4 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-07.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-07.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-07.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-08.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-08.test new file mode 100644 index 00000000000..d59b8aaf99e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-08.test @@ -0,0 +1 @@ +8 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-08.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-08.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-08.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-09.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-09.test new file mode 100644 index 00000000000..b06da09f195 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-09.test @@ -0,0 +1 @@ +15 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-09.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-09.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-09.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-10.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-10.test new file mode 100644 index 00000000000..4a738fc378f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-10.test @@ -0,0 +1 @@ +1 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-10.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-10.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-10.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-11.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-11.test new file mode 100644 index 00000000000..558d1105600 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-11.test @@ -0,0 +1 @@ +2 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-11.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-11.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-11.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-12.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-12.test new file mode 100644 index 00000000000..9f7a415a51b --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-12.test @@ -0,0 +1 @@ +5 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-12.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-12.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-12.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-13.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-13.test new file mode 100644 index 00000000000..dae991b33f5 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-13.test @@ -0,0 +1 @@ +7 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-13.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-13.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-13.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-14.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-14.test new file mode 100644 index 00000000000..277860312c3 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-14.test @@ -0,0 +1 @@ +9 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-14.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-14.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-14.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-15.test b/pyk/regression-new/rangemap-tests-llvm/in-keys-15.test new file mode 100644 index 00000000000..70c571cf38f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-15.test @@ -0,0 +1 @@ +12 in_keys(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/in-keys-15.test.out b/pyk/regression-new/rangemap-tests-llvm/in-keys-15.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/in-keys-15.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-0.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-0.test new file mode 100644 index 00000000000..156ee87faa0 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-0.test @@ -0,0 +1 @@ +rangemap(1) <=RangeMap rangemap(1) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-0.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-0.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-0.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-1.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-1.test new file mode 100644 index 00000000000..ee15c63ba64 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-1.test @@ -0,0 +1 @@ +rangemap(2) <=RangeMap rangemap(1) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-1.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-1.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-1.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-2.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-2.test new file mode 100644 index 00000000000..db90c633911 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-2.test @@ -0,0 +1 @@ +rangemap(6) <=RangeMap rangemap(1) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-2.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-2.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-2.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-3.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-3.test new file mode 100644 index 00000000000..e53e7bda4ad --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-3.test @@ -0,0 +1 @@ +rangemap(4) <=RangeMap rangemap(5) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-3.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-3.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-3.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-4.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-4.test new file mode 100644 index 00000000000..565b5234202 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-4.test @@ -0,0 +1 @@ +rangemap(4) <=RangeMap rangemap(8) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-4.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-4.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-4.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-5.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-5.test new file mode 100644 index 00000000000..e8c1c456161 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-5.test @@ -0,0 +1 @@ +rangemap(5) <=RangeMap rangemap(8) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-5.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-5.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-5.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-6.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-6.test new file mode 100644 index 00000000000..167e74eb442 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-6.test @@ -0,0 +1 @@ +rangemap(1) <=RangeMap rangemap(9) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-6.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-6.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-6.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-7.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-7.test new file mode 100644 index 00000000000..8a6057e7709 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-7.test @@ -0,0 +1 @@ +rangemap(0) <=RangeMap rangemap(2) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-7.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-7.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-7.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-8.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-8.test new file mode 100644 index 00000000000..c507eebbbeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-8.test @@ -0,0 +1 @@ +rangemap(2) <=RangeMap rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-8.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-8.test.out new file mode 100644 index 00000000000..4c3c1457eeb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-8.test.out @@ -0,0 +1,3 @@ + + false ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-9.test b/pyk/regression-new/rangemap-tests-llvm/inclusion-9.test new file mode 100644 index 00000000000..4e91f47063c --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-9.test @@ -0,0 +1 @@ +rangemap(0) <=RangeMap rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/inclusion-9.test.out b/pyk/regression-new/rangemap-tests-llvm/inclusion-9.test.out new file mode 100644 index 00000000000..97f10093fc4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/inclusion-9.test.out @@ -0,0 +1,3 @@ + + true ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-0.test b/pyk/regression-new/rangemap-tests-llvm/keys-0.test new file mode 100644 index 00000000000..49cf0220180 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-0.test @@ -0,0 +1 @@ +keys(rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-0.test.out b/pyk/regression-new/rangemap-tests-llvm/keys-0.test.out new file mode 100644 index 00000000000..63eccf2d5ca --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-0.test.out @@ -0,0 +1,3 @@ + + .Set ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-1.test b/pyk/regression-new/rangemap-tests-llvm/keys-1.test new file mode 100644 index 00000000000..d9ce56134a6 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-1.test @@ -0,0 +1 @@ +keys(rangemap(2)) diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-1.test.out b/pyk/regression-new/rangemap-tests-llvm/keys-1.test.out new file mode 100644 index 00000000000..803a0da2710 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-1.test.out @@ -0,0 +1,3 @@ + + SetItem ( [ 2 , 3 ) ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-3.test b/pyk/regression-new/rangemap-tests-llvm/keys-3.test new file mode 100644 index 00000000000..926de229713 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-3.test @@ -0,0 +1 @@ +keys(rangemap(8)) diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-3.test.out b/pyk/regression-new/rangemap-tests-llvm/keys-3.test.out new file mode 100644 index 00000000000..047baa964e9 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-3.test.out @@ -0,0 +1,5 @@ + + SetItem ( [ 0 , 2 ) ) + SetItem ( [ 3 , 8 ) ) + SetItem ( [ 9 , 12 ) ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-list-0.test b/pyk/regression-new/rangemap-tests-llvm/keys-list-0.test new file mode 100644 index 00000000000..64e645af4c8 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-list-0.test @@ -0,0 +1 @@ +keys_list(rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-list-0.test.out b/pyk/regression-new/rangemap-tests-llvm/keys-list-0.test.out new file mode 100644 index 00000000000..7963efd1739 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-list-0.test.out @@ -0,0 +1,3 @@ + + .List ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-list-1.test b/pyk/regression-new/rangemap-tests-llvm/keys-list-1.test new file mode 100644 index 00000000000..e362ba4d11c --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-list-1.test @@ -0,0 +1 @@ +keys_list(rangemap(2)) diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-list-1.test.out b/pyk/regression-new/rangemap-tests-llvm/keys-list-1.test.out new file mode 100644 index 00000000000..256d90de7de --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-list-1.test.out @@ -0,0 +1,3 @@ + + ListItem ( [ 2 , 3 ) ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-list-3.test b/pyk/regression-new/rangemap-tests-llvm/keys-list-3.test new file mode 100644 index 00000000000..60ac3da90d4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-list-3.test @@ -0,0 +1 @@ +keys_list(rangemap(8)) diff --git a/pyk/regression-new/rangemap-tests-llvm/keys-list-3.test.out b/pyk/regression-new/rangemap-tests-llvm/keys-list-3.test.out new file mode 100644 index 00000000000..07ebc4d662d --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/keys-list-3.test.out @@ -0,0 +1,5 @@ + + ListItem ( [ 0 , 2 ) ) + ListItem ( [ 3 , 8 ) ) + ListItem ( [ 9 , 12 ) ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-0.test b/pyk/regression-new/rangemap-tests-llvm/lookup-0.test new file mode 100644 index 00000000000..5920567d362 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-0.test @@ -0,0 +1 @@ +rangemap(3)[17] diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-0.test.out b/pyk/regression-new/rangemap-tests-llvm/lookup-0.test.out new file mode 100644 index 00000000000..81b9a1f59f8 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-0.test.out @@ -0,0 +1,3 @@ + + 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-1.test b/pyk/regression-new/rangemap-tests-llvm/lookup-1.test new file mode 100644 index 00000000000..a24b9de6bf1 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-1.test @@ -0,0 +1 @@ +rangemap(3)[18] diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-1.test.out b/pyk/regression-new/rangemap-tests-llvm/lookup-1.test.out new file mode 100644 index 00000000000..81b9a1f59f8 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-1.test.out @@ -0,0 +1,3 @@ + + 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-2.test b/pyk/regression-new/rangemap-tests-llvm/lookup-2.test new file mode 100644 index 00000000000..ee9e0e958f7 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-2.test @@ -0,0 +1 @@ +rangemap(10)[1] diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-2.test.out b/pyk/regression-new/rangemap-tests-llvm/lookup-2.test.out new file mode 100644 index 00000000000..e5ee2c9ffdc --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-2.test.out @@ -0,0 +1,3 @@ + + 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-4.test b/pyk/regression-new/rangemap-tests-llvm/lookup-4.test new file mode 100644 index 00000000000..4ae2d9ad812 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-4.test @@ -0,0 +1 @@ +rangemap(10)[8] diff --git a/pyk/regression-new/rangemap-tests-llvm/lookup-4.test.out b/pyk/regression-new/rangemap-tests-llvm/lookup-4.test.out new file mode 100644 index 00000000000..81b9a1f59f8 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookup-4.test.out @@ -0,0 +1,3 @@ + + 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test new file mode 100644 index 00000000000..4032e54344e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test @@ -0,0 +1 @@ +rangemap(3)[16] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-00.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test new file mode 100644 index 00000000000..11fea4cbf00 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test @@ -0,0 +1 @@ +rangemap(3)[17] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test.out new file mode 100644 index 00000000000..81b9a1f59f8 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-01.test.out @@ -0,0 +1,3 @@ + + 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test new file mode 100644 index 00000000000..a8bcad2ab9b --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test @@ -0,0 +1 @@ +rangemap(3)[19] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-02.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test new file mode 100644 index 00000000000..ea741d083af --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test @@ -0,0 +1 @@ +rangemap(3)[20] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-03.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test new file mode 100644 index 00000000000..e0b4b06aa82 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test @@ -0,0 +1 @@ +rangemap(10)[0] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-04.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test new file mode 100644 index 00000000000..0239cc30ce9 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test @@ -0,0 +1 @@ +rangemap(10)[2] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test.out new file mode 100644 index 00000000000..e5ee2c9ffdc --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-05.test.out @@ -0,0 +1,3 @@ + + 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test new file mode 100644 index 00000000000..b9eaa61e578 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test @@ -0,0 +1 @@ +rangemap(10)[3] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-06.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test new file mode 100644 index 00000000000..5a082b121a4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test @@ -0,0 +1 @@ +rangemap(10)[5] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test.out new file mode 100644 index 00000000000..4de4f418a29 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-07.test.out @@ -0,0 +1,3 @@ + + 50 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test new file mode 100644 index 00000000000..43ad0fe32be --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test @@ -0,0 +1 @@ +rangemap(10)[7] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-08.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test new file mode 100644 index 00000000000..06425922980 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test @@ -0,0 +1 @@ +rangemap(10)[8] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test.out new file mode 100644 index 00000000000..81b9a1f59f8 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-09.test.out @@ -0,0 +1,3 @@ + + 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test new file mode 100644 index 00000000000..8fb5f8e8498 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test @@ -0,0 +1 @@ +rangemap(10)[9] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-10.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test new file mode 100644 index 00000000000..4b6eb351e7b --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test @@ -0,0 +1 @@ +rangemap(10)[10] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-11.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test new file mode 100644 index 00000000000..0782dea9acf --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test @@ -0,0 +1 @@ +rangemap(10)[12] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test.out new file mode 100644 index 00000000000..e5ee2c9ffdc --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-12.test.out @@ -0,0 +1,3 @@ + + 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test new file mode 100644 index 00000000000..31bc92e82fe --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test @@ -0,0 +1 @@ +rangemap(10)[18] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-13.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test new file mode 100644 index 00000000000..2f5adea43cb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test @@ -0,0 +1 @@ +rangemap(0)[1] orDefault 35 diff --git a/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test.out b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test.out new file mode 100644 index 00000000000..2151aa6709e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/lookupOrDefault-14.test.out @@ -0,0 +1,3 @@ + + 35 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/rangemap-simple.k b/pyk/regression-new/rangemap-tests-llvm/rangemap-simple.k new file mode 100644 index 00000000000..7069b47598e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/rangemap-simple.k @@ -0,0 +1,35 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "domains.md" +requires "json.md" + +module RANGEMAP-SIMPLE-SYNTAX + imports COLLECTIONS + imports RANGEMAP + imports INT + imports JSON + + syntax RangeMap ::= rangemap (Int) [function] +// --------------------------------------- + rule rangemap(0) => .RangeMap + + rule rangemap(1) => [0, 20) r|-> 40 + rule rangemap(2) => [2, 3) r|-> 40 + rule rangemap(3) => [17, 19) r|-> 40 + + rule rangemap(4) => [1, 2) r|-> 40 [3, 5) r|-> 40 + rule rangemap(5) => [1, 2) r|-> 45 [3, 5) r|-> 40 + rule rangemap(6) => [0, 1) r|-> 40 [4, 5) r|-> 40 + + rule rangemap(7) => [1, 2) r|-> 40 [5, 7) r|-> 40 [9, 12) r|-> 40 + rule rangemap(8) => [0, 2) r|-> 40 [3, 8) r|-> 40 [9, 12) r|-> 45 + + rule rangemap(9) => [0, 1) r|-> 40 [2, 5) r|-> 40 [7, 9) r|-> 40 [12, 15) r|-> 40 + rule rangemap(10) => [1, 3) r|-> 45 [4, 6) r|-> 50 [8, 9) r|-> 40 [12, 15) r|-> 45 +endmodule + +module RANGEMAP-SIMPLE + imports RANGEMAP-SIMPLE-SYNTAX + + configuration $PGM:KItem +endmodule diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-0.test b/pyk/regression-new/rangemap-tests-llvm/remove-0.test new file mode 100644 index 00000000000..d2c5e848a28 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-0.test @@ -0,0 +1 @@ +rangemap(0)[[1, 2) <- undef] diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-0.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-0.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-0.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-1.test b/pyk/regression-new/rangemap-tests-llvm/remove-1.test new file mode 100644 index 00000000000..500538f2084 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-1.test @@ -0,0 +1 @@ +rangemap(1)[[1, 4) <- undef] diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-1.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-1.test.out new file mode 100644 index 00000000000..8271308cb11 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-1.test.out @@ -0,0 +1,4 @@ + + [ 0 , 1 ) r|-> 40 + [ 4 , 20 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-2.test b/pyk/regression-new/rangemap-tests-llvm/remove-2.test new file mode 100644 index 00000000000..d9c321283ed --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-2.test @@ -0,0 +1 @@ +rangemap(4)[[1, 5) <- undef] diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-2.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-2.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-2.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-3.test b/pyk/regression-new/rangemap-tests-llvm/remove-3.test new file mode 100644 index 00000000000..649561279bb --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-3.test @@ -0,0 +1 @@ +rangemap(8)[[1, 5) <- undef] diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-3.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-3.test.out new file mode 100644 index 00000000000..4e6fea8a010 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-3.test.out @@ -0,0 +1,5 @@ + + [ 0 , 1 ) r|-> 40 + [ 5 , 8 ) r|-> 40 + [ 9 , 12 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-0.test b/pyk/regression-new/rangemap-tests-llvm/remove-all-0.test new file mode 100644 index 00000000000..da0d70e8d92 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-0.test @@ -0,0 +1 @@ +removeAll(rangemap(0), .Set) diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-0.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-all-0.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-0.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-1.test b/pyk/regression-new/rangemap-tests-llvm/remove-all-1.test new file mode 100644 index 00000000000..ded6f68e0b2 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-1.test @@ -0,0 +1 @@ +removeAll(rangemap(0), SetItem([0, 2))) diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-1.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-all-1.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-1.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-2.test b/pyk/regression-new/rangemap-tests-llvm/remove-all-2.test new file mode 100644 index 00000000000..7d3cf89e888 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-2.test @@ -0,0 +1 @@ +removeAll(rangemap(0), SetItem([0, 2)) SetItem([3, 4))) diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-2.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-all-2.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-2.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-3.test b/pyk/regression-new/rangemap-tests-llvm/remove-all-3.test new file mode 100644 index 00000000000..269b9e98491 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-3.test @@ -0,0 +1 @@ +removeAll(rangemap(8), .Set) diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-3.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-all-3.test.out new file mode 100644 index 00000000000..04060f95c37 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-3.test.out @@ -0,0 +1,5 @@ + + [ 0 , 2 ) r|-> 40 + [ 3 , 8 ) r|-> 40 + [ 9 , 12 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-4.test b/pyk/regression-new/rangemap-tests-llvm/remove-all-4.test new file mode 100644 index 00000000000..26395acf2c7 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-4.test @@ -0,0 +1 @@ +removeAll(rangemap(8), SetItem([5, 6))) diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-4.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-all-4.test.out new file mode 100644 index 00000000000..21b286c830f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-4.test.out @@ -0,0 +1,6 @@ + + [ 0 , 2 ) r|-> 40 + [ 3 , 5 ) r|-> 40 + [ 6 , 8 ) r|-> 40 + [ 9 , 12 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-5.test b/pyk/regression-new/rangemap-tests-llvm/remove-all-5.test new file mode 100644 index 00000000000..1077d5a64af --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-5.test @@ -0,0 +1 @@ +removeAll(rangemap(8), SetItem([4, 5)) SetItem([7, 10))) diff --git a/pyk/regression-new/rangemap-tests-llvm/remove-all-5.test.out b/pyk/regression-new/rangemap-tests-llvm/remove-all-5.test.out new file mode 100644 index 00000000000..2cb4f832955 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/remove-all-5.test.out @@ -0,0 +1,6 @@ + + [ 0 , 2 ) r|-> 40 + [ 3 , 4 ) r|-> 40 + [ 5 , 7 ) r|-> 40 + [ 10 , 12 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/size-0.test b/pyk/regression-new/rangemap-tests-llvm/size-0.test new file mode 100644 index 00000000000..0895d36726a --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-0.test @@ -0,0 +1 @@ +size(rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/size-0.test.out b/pyk/regression-new/rangemap-tests-llvm/size-0.test.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-0.test.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/size-1.test b/pyk/regression-new/rangemap-tests-llvm/size-1.test new file mode 100644 index 00000000000..812b3cfb65a --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-1.test @@ -0,0 +1 @@ +size(rangemap(2)) diff --git a/pyk/regression-new/rangemap-tests-llvm/size-1.test.out b/pyk/regression-new/rangemap-tests-llvm/size-1.test.out new file mode 100644 index 00000000000..36e7b68b492 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-1.test.out @@ -0,0 +1,3 @@ + + 1 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/size-2.test b/pyk/regression-new/rangemap-tests-llvm/size-2.test new file mode 100644 index 00000000000..aedb2469027 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-2.test @@ -0,0 +1 @@ +size(rangemap(4)) diff --git a/pyk/regression-new/rangemap-tests-llvm/size-2.test.out b/pyk/regression-new/rangemap-tests-llvm/size-2.test.out new file mode 100644 index 00000000000..df891b31899 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-2.test.out @@ -0,0 +1,3 @@ + + 2 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/size-3.test b/pyk/regression-new/rangemap-tests-llvm/size-3.test new file mode 100644 index 00000000000..ab932a99e48 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-3.test @@ -0,0 +1 @@ +size(rangemap(7)) diff --git a/pyk/regression-new/rangemap-tests-llvm/size-3.test.out b/pyk/regression-new/rangemap-tests-llvm/size-3.test.out new file mode 100644 index 00000000000..ad5b4d50e46 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-3.test.out @@ -0,0 +1,3 @@ + + 3 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/size-4.test b/pyk/regression-new/rangemap-tests-llvm/size-4.test new file mode 100644 index 00000000000..9334e63b7c5 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-4.test @@ -0,0 +1 @@ +size(rangemap(9)) diff --git a/pyk/regression-new/rangemap-tests-llvm/size-4.test.out b/pyk/regression-new/rangemap-tests-llvm/size-4.test.out new file mode 100644 index 00000000000..ec67a9f651f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/size-4.test.out @@ -0,0 +1,3 @@ + + 4 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/unit.test b/pyk/regression-new/rangemap-tests-llvm/unit.test new file mode 100644 index 00000000000..6e78eef278a --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/unit.test @@ -0,0 +1 @@ +rangemap(0) diff --git a/pyk/regression-new/rangemap-tests-llvm/unit.test.out b/pyk/regression-new/rangemap-tests-llvm/unit.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/unit.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-0.test b/pyk/regression-new/rangemap-tests-llvm/update-0.test new file mode 100644 index 00000000000..d4d0a52b88a --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-0.test @@ -0,0 +1 @@ +rangemap(0)[[1, 2) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-0.test.out b/pyk/regression-new/rangemap-tests-llvm/update-0.test.out new file mode 100644 index 00000000000..69635a7acf1 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-0.test.out @@ -0,0 +1,3 @@ + + [ 1 , 2 ) r|-> 55 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-1.test b/pyk/regression-new/rangemap-tests-llvm/update-1.test new file mode 100644 index 00000000000..f7afdfc3966 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-1.test @@ -0,0 +1 @@ +rangemap(3)[[15, 17) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-1.test.out b/pyk/regression-new/rangemap-tests-llvm/update-1.test.out new file mode 100644 index 00000000000..d7995495b83 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-1.test.out @@ -0,0 +1,4 @@ + + [ 15 , 17 ) r|-> 55 + [ 17 , 19 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-2.test b/pyk/regression-new/rangemap-tests-llvm/update-2.test new file mode 100644 index 00000000000..7ff769a30ae --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-2.test @@ -0,0 +1 @@ +rangemap(3)[[15, 18) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-2.test.out b/pyk/regression-new/rangemap-tests-llvm/update-2.test.out new file mode 100644 index 00000000000..b6dd9dd559d --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-2.test.out @@ -0,0 +1,4 @@ + + [ 15 , 18 ) r|-> 55 + [ 18 , 19 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-3.test b/pyk/regression-new/rangemap-tests-llvm/update-3.test new file mode 100644 index 00000000000..496502bc187 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-3.test @@ -0,0 +1 @@ +rangemap(3)[[15, 20) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-3.test.out b/pyk/regression-new/rangemap-tests-llvm/update-3.test.out new file mode 100644 index 00000000000..76fa46872dc --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-3.test.out @@ -0,0 +1,3 @@ + + [ 15 , 20 ) r|-> 55 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-4.test b/pyk/regression-new/rangemap-tests-llvm/update-4.test new file mode 100644 index 00000000000..ff391533254 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-4.test @@ -0,0 +1 @@ +rangemap(3)[[19, 20) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-4.test.out b/pyk/regression-new/rangemap-tests-llvm/update-4.test.out new file mode 100644 index 00000000000..670084f7ba2 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-4.test.out @@ -0,0 +1,4 @@ + + [ 17 , 19 ) r|-> 40 + [ 19 , 20 ) r|-> 55 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-5.test b/pyk/regression-new/rangemap-tests-llvm/update-5.test new file mode 100644 index 00000000000..c0e5a6080ab --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-5.test @@ -0,0 +1 @@ +rangemap(1)[[1, 2) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-5.test.out b/pyk/regression-new/rangemap-tests-llvm/update-5.test.out new file mode 100644 index 00000000000..7e8eacfaeed --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-5.test.out @@ -0,0 +1,5 @@ + + [ 0 , 1 ) r|-> 40 + [ 1 , 2 ) r|-> 55 + [ 2 , 20 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-6.test b/pyk/regression-new/rangemap-tests-llvm/update-6.test new file mode 100644 index 00000000000..2f9f6aa4a89 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-6.test @@ -0,0 +1 @@ +rangemap(5)[[2, 3) <- 55] diff --git a/pyk/regression-new/rangemap-tests-llvm/update-6.test.out b/pyk/regression-new/rangemap-tests-llvm/update-6.test.out new file mode 100644 index 00000000000..d24aded8df4 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-6.test.out @@ -0,0 +1,5 @@ + + [ 1 , 2 ) r|-> 45 + [ 2 , 3 ) r|-> 55 + [ 3 , 5 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-0.test b/pyk/regression-new/rangemap-tests-llvm/update-all-0.test new file mode 100644 index 00000000000..b238d50250e --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-0.test @@ -0,0 +1 @@ +updateRangeMap(rangemap(0), rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-0.test.out b/pyk/regression-new/rangemap-tests-llvm/update-all-0.test.out new file mode 100644 index 00000000000..b6d58ba8d50 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-0.test.out @@ -0,0 +1,3 @@ + + .RangeMap ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-1.test b/pyk/regression-new/rangemap-tests-llvm/update-all-1.test new file mode 100644 index 00000000000..4676f34fab0 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-1.test @@ -0,0 +1 @@ +updateRangeMap(rangemap(0), rangemap(2)) diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-1.test.out b/pyk/regression-new/rangemap-tests-llvm/update-all-1.test.out new file mode 100644 index 00000000000..0278e7cb267 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-1.test.out @@ -0,0 +1,3 @@ + + [ 2 , 3 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-2.test b/pyk/regression-new/rangemap-tests-llvm/update-all-2.test new file mode 100644 index 00000000000..4d17127c2b9 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-2.test @@ -0,0 +1 @@ +updateRangeMap(rangemap(2), rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-2.test.out b/pyk/regression-new/rangemap-tests-llvm/update-all-2.test.out new file mode 100644 index 00000000000..0278e7cb267 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-2.test.out @@ -0,0 +1,3 @@ + + [ 2 , 3 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-3.test b/pyk/regression-new/rangemap-tests-llvm/update-all-3.test new file mode 100644 index 00000000000..40dc5aecb39 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-3.test @@ -0,0 +1 @@ +updateRangeMap(rangemap(1), rangemap(10)) diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-3.test.out b/pyk/regression-new/rangemap-tests-llvm/update-all-3.test.out new file mode 100644 index 00000000000..4347f5a16e9 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-3.test.out @@ -0,0 +1,9 @@ + + [ 0 , 1 ) r|-> 40 + [ 1 , 3 ) r|-> 45 + [ 3 , 4 ) r|-> 40 + [ 4 , 6 ) r|-> 50 + [ 6 , 12 ) r|-> 40 + [ 12 , 15 ) r|-> 45 + [ 15 , 20 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-4.test b/pyk/regression-new/rangemap-tests-llvm/update-all-4.test new file mode 100644 index 00000000000..150b50a9bc0 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-4.test @@ -0,0 +1 @@ +updateRangeMap(rangemap(10), rangemap(1)) diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-4.test.out b/pyk/regression-new/rangemap-tests-llvm/update-all-4.test.out new file mode 100644 index 00000000000..a7ea92786de --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-4.test.out @@ -0,0 +1,3 @@ + + [ 0 , 20 ) r|-> 40 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-5.test b/pyk/regression-new/rangemap-tests-llvm/update-all-5.test new file mode 100644 index 00000000000..e11319a548d --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-5.test @@ -0,0 +1 @@ +updateRangeMap(rangemap(9), rangemap(10)) diff --git a/pyk/regression-new/rangemap-tests-llvm/update-all-5.test.out b/pyk/regression-new/rangemap-tests-llvm/update-all-5.test.out new file mode 100644 index 00000000000..dfbfe340e54 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/update-all-5.test.out @@ -0,0 +1,8 @@ + + [ 0 , 1 ) r|-> 40 + [ 1 , 3 ) r|-> 45 + [ 3 , 4 ) r|-> 40 + [ 4 , 6 ) r|-> 50 + [ 7 , 9 ) r|-> 40 + [ 12 , 15 ) r|-> 45 ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/values-0.test b/pyk/regression-new/rangemap-tests-llvm/values-0.test new file mode 100644 index 00000000000..9deee6f7375 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/values-0.test @@ -0,0 +1 @@ +values(rangemap(0)) diff --git a/pyk/regression-new/rangemap-tests-llvm/values-0.test.out b/pyk/regression-new/rangemap-tests-llvm/values-0.test.out new file mode 100644 index 00000000000..7963efd1739 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/values-0.test.out @@ -0,0 +1,3 @@ + + .List ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/values-1.test b/pyk/regression-new/rangemap-tests-llvm/values-1.test new file mode 100644 index 00000000000..5a20b85f62c --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/values-1.test @@ -0,0 +1 @@ +values(rangemap(2)) diff --git a/pyk/regression-new/rangemap-tests-llvm/values-1.test.out b/pyk/regression-new/rangemap-tests-llvm/values-1.test.out new file mode 100644 index 00000000000..458806e710f --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/values-1.test.out @@ -0,0 +1,3 @@ + + ListItem ( 40 ) ~> .K + diff --git a/pyk/regression-new/rangemap-tests-llvm/values-3.test b/pyk/regression-new/rangemap-tests-llvm/values-3.test new file mode 100644 index 00000000000..5b7d02ea601 --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/values-3.test @@ -0,0 +1 @@ +values(rangemap(8)) diff --git a/pyk/regression-new/rangemap-tests-llvm/values-3.test.out b/pyk/regression-new/rangemap-tests-llvm/values-3.test.out new file mode 100644 index 00000000000..33c6ee820be --- /dev/null +++ b/pyk/regression-new/rangemap-tests-llvm/values-3.test.out @@ -0,0 +1,5 @@ + + ListItem ( 40 ) + ListItem ( 40 ) + ListItem ( 45 ) ~> .K + diff --git a/pyk/regression-new/rat/Makefile b/pyk/regression-new/rat/Makefile new file mode 100644 index 00000000000..57404abdcbc --- /dev/null +++ b/pyk/regression-new/rat/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=defined undefined +include ../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/rat/a.k b/pyk/regression-new/rat/a.k new file mode 100644 index 00000000000..38cc383d182 --- /dev/null +++ b/pyk/regression-new/rat/a.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "rat.md" + +module A + +imports RAT + +configuration + $PGM:Pgm + + +syntax Cmd ::= Rat ";" + | Bool ";" +syntax Pgm ::= List{Cmd,""} + +syntax Rat ::= "(" Rat ")" [bracket] + +endmodule diff --git a/pyk/regression-new/rat/defined/Makefile b/pyk/regression-new/rat/defined/Makefile new file mode 100644 index 00000000000..c7d4f971dc2 --- /dev/null +++ b/pyk/regression-new/rat/defined/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell llvm +include ../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/rat/defined/haskell/Makefile b/pyk/regression-new/rat/defined/haskell/Makefile new file mode 100644 index 00000000000..f5d9e54fa9c --- /dev/null +++ b/pyk/regression-new/rat/defined/haskell/Makefile @@ -0,0 +1,8 @@ +DEF=a +EXT=a +TESTDIR=../tests +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module A +KPROVE_FLAGS= + +include ../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/rat/defined/haskell/a.k b/pyk/regression-new/rat/defined/haskell/a.k new file mode 120000 index 00000000000..af0cf2bad59 --- /dev/null +++ b/pyk/regression-new/rat/defined/haskell/a.k @@ -0,0 +1 @@ +../../a.k \ No newline at end of file diff --git a/pyk/regression-new/rat/defined/llvm/Makefile b/pyk/regression-new/rat/defined/llvm/Makefile new file mode 100644 index 00000000000..7494692dadd --- /dev/null +++ b/pyk/regression-new/rat/defined/llvm/Makefile @@ -0,0 +1,8 @@ +DEF=a +EXT=a +TESTDIR=../tests +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module A +KPROVE_FLAGS= + +include ../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/rat/defined/llvm/a.k b/pyk/regression-new/rat/defined/llvm/a.k new file mode 120000 index 00000000000..af0cf2bad59 --- /dev/null +++ b/pyk/regression-new/rat/defined/llvm/a.k @@ -0,0 +1 @@ +../../a.k \ No newline at end of file diff --git a/pyk/regression-new/rat/defined/tests/1.a b/pyk/regression-new/rat/defined/tests/1.a new file mode 100644 index 00000000000..a2a36486398 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/1.a @@ -0,0 +1,46 @@ +// normalization + + 1 /Rat 2; +-1 /Rat 2; + 1 /Rat -2; +-1 /Rat -2; + + 2 /Rat 1; +-2 /Rat 1; + 2 /Rat -1; +-2 /Rat -1; + + 4 /Rat 2; +-4 /Rat 2; + 4 /Rat -2; +-4 /Rat -2; + + 4 /Rat 6; +-4 /Rat 6; + 4 /Rat -6; +-4 /Rat -6; + + 6 /Rat 4; +-6 /Rat 4; + 6 /Rat -4; +-6 /Rat -4; + + 5 /Rat 3; +-5 /Rat 3; + 5 /Rat -3; +-5 /Rat -3; + + 3 /Rat 5; +-3 /Rat 5; + 3 /Rat -5; +-3 /Rat -5; + + 1071 /Rat 462; + 1071 /Rat -462; +-1071 /Rat 462; +-1071 /Rat -462; + + 462 /Rat 1071; +-462 /Rat 1071; + 462 /Rat -1071; +-462 /Rat -1071; diff --git a/pyk/regression-new/rat/defined/tests/1.a.out b/pyk/regression-new/rat/defined/tests/1.a.out new file mode 100644 index 00000000000..6dbafc2e688 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/1.a.out @@ -0,0 +1,5 @@ + + + 1 /Rat 2 ; -1 /Rat 2 ; -1 /Rat 2 ; 1 /Rat 2 ; 2 ; -2 ; -2 ; 2 ; 2 ; -2 ; -2 ; 2 ; 2 /Rat 3 ; -2 /Rat 3 ; -2 /Rat 3 ; 2 /Rat 3 ; 3 /Rat 2 ; -3 /Rat 2 ; -3 /Rat 2 ; 3 /Rat 2 ; 5 /Rat 3 ; -5 /Rat 3 ; -5 /Rat 3 ; 5 /Rat 3 ; 3 /Rat 5 ; -3 /Rat 5 ; -3 /Rat 5 ; 3 /Rat 5 ; 51 /Rat 22 ; -51 /Rat 22 ; -51 /Rat 22 ; 51 /Rat 22 ; 22 /Rat 51 ; -22 /Rat 51 ; -22 /Rat 51 ; 22 /Rat 51 ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/defined/tests/2.a b/pyk/regression-new/rat/defined/tests/2.a new file mode 100644 index 00000000000..77133f166ef --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/2.a @@ -0,0 +1,21 @@ +// gcd + +gcdInt( 5, 3); +gcdInt( 5,-3); +gcdInt(-5, 3); +gcdInt(-5,-3); + +gcdInt( 3, 5); +gcdInt(-3, 5); +gcdInt( 3,-5); +gcdInt(-3,-5); + +gcdInt( 1071, 462); +gcdInt( 1071,-462); +gcdInt(-1071, 462); +gcdInt(-1071,-462); + +gcdInt( 462, 1071); +gcdInt(-462, 1071); +gcdInt( 462,-1071); +gcdInt(-462,-1071); diff --git a/pyk/regression-new/rat/defined/tests/2.a.out b/pyk/regression-new/rat/defined/tests/2.a.out new file mode 100644 index 00000000000..d4a13864636 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/2.a.out @@ -0,0 +1,5 @@ + + + 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 21 ; 21 ; 21 ; 21 ; 21 ; 21 ; 21 ; 21 ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/defined/tests/3.a b/pyk/regression-new/rat/defined/tests/3.a new file mode 100644 index 00000000000..6546b433e27 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/3.a @@ -0,0 +1,31 @@ +// (in)equalities + +1 /Rat 2 ==Rat 1 /Rat 2 ; +1 ==Rat 1 /Rat 2 ; +1 /Rat 2 ==Rat 1 ; +1 ==Rat 1 ; + +1 /Rat 2 =/=Rat 1 /Rat 2 ; +1 =/=Rat 1 /Rat 2 ; +1 /Rat 2 =/=Rat 1 ; +1 =/=Rat 1 ; + +1 /Rat 2 >Rat 1 /Rat 2 ; +1 >Rat 1 /Rat 2 ; +1 /Rat 2 >Rat 1 ; +1 >Rat 1 ; + +1 /Rat 2 >=Rat 1 /Rat 2 ; +1 >=Rat 1 /Rat 2 ; +1 /Rat 2 >=Rat 1 ; +1 >=Rat 1 ; + +1 /Rat 2 + + true ; false ; false ; true ; false ; true ; true ; false ; false ; true ; false ; false ; true ; true ; false ; true ; false ; false ; true ; false ; true ; false ; true ; true ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/defined/tests/4.a b/pyk/regression-new/rat/defined/tests/4.a new file mode 100644 index 00000000000..e1a0845909c --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/4.a @@ -0,0 +1,21 @@ +// arithmetic + +(5 /Rat 6) +Rat (7 /Rat 9) ; +(5 /Rat 6) -Rat (7 /Rat 9) ; +(5 /Rat 6) *Rat (7 /Rat 9) ; +(5 /Rat 6) /Rat (7 /Rat 9) ; + +5 +Rat (7 /Rat 9) ; +5 -Rat (7 /Rat 9) ; +5 *Rat (7 /Rat 9) ; +5 /Rat (7 /Rat 9) ; + +(5 /Rat 6) +Rat 7 ; +(5 /Rat 6) -Rat 7 ; +(5 /Rat 6) *Rat 7 ; +(5 /Rat 6) /Rat 7 ; + +5 +Rat 7 ; +5 -Rat 7 ; +5 *Rat 7 ; +5 /Rat 7 ; diff --git a/pyk/regression-new/rat/defined/tests/4.a.out b/pyk/regression-new/rat/defined/tests/4.a.out new file mode 100644 index 00000000000..66f7914a4f6 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/4.a.out @@ -0,0 +1,5 @@ + + + 29 /Rat 18 ; 1 /Rat 18 ; 35 /Rat 54 ; 15 /Rat 14 ; 52 /Rat 9 ; 38 /Rat 9 ; 35 /Rat 9 ; 45 /Rat 7 ; 47 /Rat 6 ; -37 /Rat 6 ; 35 /Rat 6 ; 5 /Rat 42 ; 12 ; -2 ; 35 ; 5 /Rat 7 ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/defined/tests/5.a b/pyk/regression-new/rat/defined/tests/5.a new file mode 100644 index 00000000000..f4e58924a9a --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/5.a @@ -0,0 +1,11 @@ +// equality with normalization + + 4 /Rat 6 ==Rat 2 /Rat 3 ; +-4 /Rat 6 ==Rat -2 /Rat 3 ; + 4 /Rat -6 ==Rat -2 /Rat 3 ; +-4 /Rat -6 ==Rat 2 /Rat 3 ; + + 1071 /Rat 462 ==Rat -51 /Rat -22 ; + 1071 /Rat -462 ==Rat -51 /Rat 22 ; +-1071 /Rat 462 ==Rat 51 /Rat -22 ; +-1071 /Rat -462 ==Rat 51 /Rat 22 ; diff --git a/pyk/regression-new/rat/defined/tests/5.a.out b/pyk/regression-new/rat/defined/tests/5.a.out new file mode 100644 index 00000000000..a76d25eee98 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/5.a.out @@ -0,0 +1,5 @@ + + + true ; true ; true ; true ; true ; true ; true ; true ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/defined/tests/7.a b/pyk/regression-new/rat/defined/tests/7.a new file mode 100644 index 00000000000..4df533bbed2 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/7.a @@ -0,0 +1,19 @@ +// {-,0,+} /Rat {-} +-3 /Rat -2 ; + 0 /Rat -2 ; + 3 /Rat -2 ; + +// {-,0,+} /Rat {0} +// see 7-[123].a + +// {-,0,+} /Rat {1} +// denominator = 1 +-3 /Rat 1 ; + 0 /Rat 1 ; + 3 /Rat 1 ; + +// {-,0,+} /Rat {+} +// denominator > 1 +-3 /Rat 2 ; + 0 /Rat 2 ; + 3 /Rat 2 ; diff --git a/pyk/regression-new/rat/defined/tests/7.a.out b/pyk/regression-new/rat/defined/tests/7.a.out new file mode 100644 index 00000000000..a448d27fb98 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/7.a.out @@ -0,0 +1,5 @@ + + + 3 /Rat 2 ; 0 ; -3 /Rat 2 ; -3 ; 0 ; 3 ; -3 /Rat 2 ; 0 ; 3 /Rat 2 ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/defined/tests/8.a b/pyk/regression-new/rat/defined/tests/8.a new file mode 100644 index 00000000000..f6c6261bb9d --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/8.a @@ -0,0 +1,101 @@ +// exponentiation + +// X ^Rat 0 + +-1 ^Rat 0 ; // 1 + 0 ^Rat 0 ; // 1 + 1 ^Rat 0 ; // 1 + +(-1 /Rat 2) ^Rat 0 ; // 1 +( 0 /Rat 2) ^Rat 0 ; // 1 +( 1 /Rat 2) ^Rat 0 ; // 1 + +// 0 ^Rat N + +0 ^Rat -1 ; // 0 +0 ^Rat 0 ; // 1 +0 ^Rat 1 ; // 0 + +// < I , J >Rat ^Rat N + +( 1 /Rat 2) ^Rat -4 ; // 16 +( 1 /Rat 2) ^Rat -3 ; // 8 +( 1 /Rat 2) ^Rat -2 ; // 4 +( 1 /Rat 2) ^Rat -1 ; // 2 + +( 1 /Rat 2) ^Rat 0 ; // 1 + +( 1 /Rat 2) ^Rat 1 ; // 1/2 +( 1 /Rat 2) ^Rat 2 ; // 1/4 +( 1 /Rat 2) ^Rat 3 ; // 1/8 +( 1 /Rat 2) ^Rat 4 ; // 1/16 + +(-1 /Rat 2) ^Rat -4 ; // 16 +(-1 /Rat 2) ^Rat -3 ; // -8 +(-1 /Rat 2) ^Rat -2 ; // 4 +(-1 /Rat 2) ^Rat -1 ; // -2 + +(-1 /Rat 2) ^Rat 0 ; // 1 + +(-1 /Rat 2) ^Rat 1 ; // -1/2 +(-1 /Rat 2) ^Rat 2 ; // 1/4 +(-1 /Rat 2) ^Rat 3 ; // -1/8 +(-1 /Rat 2) ^Rat 4 ; // 1/16 + +// I:Int ^Rat N + + 2 ^Rat -4 ; // 1/16 + 2 ^Rat -3 ; // 1/8 + 2 ^Rat -2 ; // 1/4 + 2 ^Rat -1 ; // 1/2 + + 2 ^Rat 0 ; // 1 + + 2 ^Rat 1 ; // 2 + 2 ^Rat 2 ; // 4 + 2 ^Rat 3 ; // 8 + 2 ^Rat 4 ; // 16 + +-2 ^Rat -4 ; // 1/16 +-2 ^Rat -3 ; // -1/8 +-2 ^Rat -2 ; // 1/4 +-2 ^Rat -1 ; // -1/2 + +-2 ^Rat 0 ; // 1 + +-2 ^Rat 1 ; // -2 +-2 ^Rat 2 ; // 4 +-2 ^Rat 3 ; // -8 +-2 ^Rat 4 ; // 16 + +// {-1,0,1} ^Rat N + +-1 ^Rat -4 ; // 1 +-1 ^Rat -3 ; // -1 +-1 ^Rat -2 ; // 1 +-1 ^Rat -1 ; // -1 +-1 ^Rat 0 ; // 1 +-1 ^Rat 1 ; // -1 +-1 ^Rat 2 ; // 1 +-1 ^Rat 3 ; // -1 +-1 ^Rat 4 ; // 1 + + 0 ^Rat -4 ; // 0 + 0 ^Rat -3 ; // 0 + 0 ^Rat -2 ; // 0 + 0 ^Rat -1 ; // 0 + 0 ^Rat 0 ; // 1 + 0 ^Rat 1 ; // 0 + 0 ^Rat 2 ; // 0 + 0 ^Rat 3 ; // 0 + 0 ^Rat 4 ; // 0 + + 1 ^Rat -4 ; // 1 + 1 ^Rat -3 ; // 1 + 1 ^Rat -2 ; // 1 + 1 ^Rat -1 ; // 1 + 1 ^Rat 0 ; // 1 + 1 ^Rat 1 ; // 1 + 1 ^Rat 2 ; // 1 + 1 ^Rat 3 ; // 1 + 1 ^Rat 4 ; // 1 diff --git a/pyk/regression-new/rat/defined/tests/8.a.out b/pyk/regression-new/rat/defined/tests/8.a.out new file mode 100644 index 00000000000..4ed29203fb0 --- /dev/null +++ b/pyk/regression-new/rat/defined/tests/8.a.out @@ -0,0 +1,5 @@ + + + 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 0 ; 1 ; 0 ; 16 ; 8 ; 4 ; 2 ; 1 ; 1 /Rat 2 ; 1 /Rat 4 ; 1 /Rat 8 ; 1 /Rat 16 ; 16 ; -8 ; 4 ; -2 ; 1 ; -1 /Rat 2 ; 1 /Rat 4 ; -1 /Rat 8 ; 1 /Rat 16 ; 1 /Rat 16 ; 1 /Rat 8 ; 1 /Rat 4 ; 1 /Rat 2 ; 1 ; 2 ; 4 ; 8 ; 16 ; 1 /Rat 16 ; -1 /Rat 8 ; 1 /Rat 4 ; -1 /Rat 2 ; 1 ; -2 ; 4 ; -8 ; 16 ; 1 ; -1 ; 1 ; -1 ; 1 ; -1 ; 1 ; -1 ; 1 ; 0 ; 0 ; 0 ; 0 ; 1 ; 0 ; 0 ; 0 ; 0 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; 1 ; .Pgm ~> .K + + diff --git a/pyk/regression-new/rat/undefined/Makefile b/pyk/regression-new/rat/undefined/Makefile new file mode 100644 index 00000000000..55446500a13 --- /dev/null +++ b/pyk/regression-new/rat/undefined/Makefile @@ -0,0 +1,2 @@ +SUBDIRS=haskell +include ../../../../include/kframework/ktest-group.mak diff --git a/pyk/regression-new/rat/undefined/haskell/6-1.a.out b/pyk/regression-new/rat/undefined/haskell/6-1.a.out new file mode 100644 index 00000000000..d27c6bf13f4 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/6-1.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> 1 /Rat 0 ==Rat 1 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/6-2.a.out b/pyk/regression-new/rat/undefined/haskell/6-2.a.out new file mode 100644 index 00000000000..ed113be16d3 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/6-2.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> 1 /Rat 0 ==Rat 2 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/6-3.a.out b/pyk/regression-new/rat/undefined/haskell/6-3.a.out new file mode 100644 index 00000000000..ae64ea48641 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/6-3.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> 1 /Rat 0 =/=Rat 1 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/6-4.a.out b/pyk/regression-new/rat/undefined/haskell/6-4.a.out new file mode 100644 index 00000000000..f5a083bb106 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/6-4.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> 1 /Rat 0 =/=Rat 2 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/7-1.a.out b/pyk/regression-new/rat/undefined/haskell/7-1.a.out new file mode 100644 index 00000000000..fafc10a6d99 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/7-1.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> -1 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/7-2.a.out b/pyk/regression-new/rat/undefined/haskell/7-2.a.out new file mode 100644 index 00000000000..9a26f2f2aea --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/7-2.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> 0 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/7-3.a.out b/pyk/regression-new/rat/undefined/haskell/7-3.a.out new file mode 100644 index 00000000000..9869ad2a8e1 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/7-3.a.out @@ -0,0 +1 @@ +initGeneratedTopCell ( $PGM |-> 1 /Rat 0 ; .Pgm ) diff --git a/pyk/regression-new/rat/undefined/haskell/Makefile b/pyk/regression-new/rat/undefined/haskell/Makefile new file mode 100644 index 00000000000..e9edbd77367 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/Makefile @@ -0,0 +1,9 @@ +DEF=a +EXT=a +TESTDIR=../tests +RESULTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module A +KPROVE_FLAGS= + +include ../../../../../include/kframework/ktest.mak diff --git a/pyk/regression-new/rat/undefined/haskell/a.k b/pyk/regression-new/rat/undefined/haskell/a.k new file mode 120000 index 00000000000..af0cf2bad59 --- /dev/null +++ b/pyk/regression-new/rat/undefined/haskell/a.k @@ -0,0 +1 @@ +../../a.k \ No newline at end of file diff --git a/pyk/regression-new/rat/undefined/tests/6-1.a b/pyk/regression-new/rat/undefined/tests/6-1.a new file mode 100644 index 00000000000..5e95ce5b611 --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/6-1.a @@ -0,0 +1,3 @@ +// equality with division-by-zero + +1 /Rat 0 ==Rat 1 /Rat 0 ; // must NOT be true diff --git a/pyk/regression-new/rat/undefined/tests/6-2.a b/pyk/regression-new/rat/undefined/tests/6-2.a new file mode 100644 index 00000000000..2fc6b5f21b3 --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/6-2.a @@ -0,0 +1,3 @@ +// equality with division-by-zero + +1 /Rat 0 ==Rat 2 /Rat 0 ; // must NOT be false diff --git a/pyk/regression-new/rat/undefined/tests/6-3.a b/pyk/regression-new/rat/undefined/tests/6-3.a new file mode 100644 index 00000000000..ba1be8b50f9 --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/6-3.a @@ -0,0 +1,3 @@ +// inequality with division-by-zero + +1 /Rat 0 =/=Rat 1 /Rat 0 ; // must NOT be false diff --git a/pyk/regression-new/rat/undefined/tests/6-4.a b/pyk/regression-new/rat/undefined/tests/6-4.a new file mode 100644 index 00000000000..5a4cb5646a3 --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/6-4.a @@ -0,0 +1,3 @@ +// inequality with division-by-zero + +1 /Rat 0 =/=Rat 2 /Rat 0 ; // must NOT be true diff --git a/pyk/regression-new/rat/undefined/tests/7-1.a b/pyk/regression-new/rat/undefined/tests/7-1.a new file mode 100644 index 00000000000..e90a5c4151f --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/7-1.a @@ -0,0 +1,4 @@ +// {-} /Rat {0} +// see also 7.a + +-1 /Rat 0 ; diff --git a/pyk/regression-new/rat/undefined/tests/7-2.a b/pyk/regression-new/rat/undefined/tests/7-2.a new file mode 100644 index 00000000000..12dd20e5b8d --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/7-2.a @@ -0,0 +1,4 @@ +// {0} /Rat {0} +// see also 7.a + +0 /Rat 0 ; diff --git a/pyk/regression-new/rat/undefined/tests/7-3.a b/pyk/regression-new/rat/undefined/tests/7-3.a new file mode 100644 index 00000000000..08f79ca5149 --- /dev/null +++ b/pyk/regression-new/rat/undefined/tests/7-3.a @@ -0,0 +1,4 @@ +// {+} /Rat {0} +// see also 7.a + +1 /Rat 0 ; diff --git a/pyk/regression-new/record-llvm/1.test b/pyk/regression-new/record-llvm/1.test new file mode 100644 index 00000000000..fed86b5fadd --- /dev/null +++ b/pyk/regression-new/record-llvm/1.test @@ -0,0 +1 @@ +incrementFoo(test(2, 0, 1)) diff --git a/pyk/regression-new/record-llvm/1.test.out b/pyk/regression-new/record-llvm/1.test.out new file mode 100644 index 00000000000..03ada08c88b --- /dev/null +++ b/pyk/regression-new/record-llvm/1.test.out @@ -0,0 +1,3 @@ + + test ( 2 , 1 , 1 ) ~> .K + diff --git a/pyk/regression-new/record-llvm/2.test b/pyk/regression-new/record-llvm/2.test new file mode 100644 index 00000000000..46a6182b574 --- /dev/null +++ b/pyk/regression-new/record-llvm/2.test @@ -0,0 +1 @@ +incrementBar(test(2, 1, 0)) diff --git a/pyk/regression-new/record-llvm/2.test.out b/pyk/regression-new/record-llvm/2.test.out new file mode 100644 index 00000000000..03ada08c88b --- /dev/null +++ b/pyk/regression-new/record-llvm/2.test.out @@ -0,0 +1,3 @@ + + test ( 2 , 1 , 1 ) ~> .K + diff --git a/pyk/regression-new/record-llvm/3.test b/pyk/regression-new/record-llvm/3.test new file mode 100644 index 00000000000..36514bf3851 --- /dev/null +++ b/pyk/regression-new/record-llvm/3.test @@ -0,0 +1 @@ +foo(test(5, 10, 15)) diff --git a/pyk/regression-new/record-llvm/3.test.out b/pyk/regression-new/record-llvm/3.test.out new file mode 100644 index 00000000000..1b239a340ff --- /dev/null +++ b/pyk/regression-new/record-llvm/3.test.out @@ -0,0 +1,3 @@ + + 10 ~> .K + diff --git a/pyk/regression-new/record-llvm/4.test b/pyk/regression-new/record-llvm/4.test new file mode 100644 index 00000000000..7bf451d6878 --- /dev/null +++ b/pyk/regression-new/record-llvm/4.test @@ -0,0 +1 @@ +bar(test(5, 10, 15)) diff --git a/pyk/regression-new/record-llvm/4.test.out b/pyk/regression-new/record-llvm/4.test.out new file mode 100644 index 00000000000..db4e6bd820a --- /dev/null +++ b/pyk/regression-new/record-llvm/4.test.out @@ -0,0 +1,3 @@ + + 15 ~> .K + diff --git a/pyk/regression-new/record-llvm/Makefile b/pyk/regression-new/record-llvm/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/record-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/record-llvm/test.k b/pyk/regression-new/record-llvm/test.k new file mode 100644 index 00000000000..352a9527545 --- /dev/null +++ b/pyk/regression-new/record-llvm/test.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + syntax Foo ::= test(Int, foo: Int, bar: Int) + + syntax Foo ::= incrementFoo(Foo) [function] + syntax Foo ::= incrementBar(Foo) [function] + + rule incrementFoo(F) => #fun(test(... foo: N => N +Int 1))(F) + rule incrementBar(F) => #fun(test(... bar: N => N +Int 1))(F) +endmodule diff --git a/pyk/regression-new/search-bound/1.test b/pyk/regression-new/search-bound/1.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/search-bound/1.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/search-bound/1.test.out b/pyk/regression-new/search-bound/1.test.out new file mode 100644 index 00000000000..88b8f237d0e --- /dev/null +++ b/pyk/regression-new/search-bound/1.test.out @@ -0,0 +1 @@ +#Bottom diff --git a/pyk/regression-new/search-bound/2.test b/pyk/regression-new/search-bound/2.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/search-bound/2.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/search-bound/2.test.out b/pyk/regression-new/search-bound/2.test.out new file mode 100644 index 00000000000..dd064d0abb7 --- /dev/null +++ b/pyk/regression-new/search-bound/2.test.out @@ -0,0 +1,7 @@ +{ + Result:GeneratedTopCell +#Equals + + c ~> .K + +} diff --git a/pyk/regression-new/search-bound/3.test b/pyk/regression-new/search-bound/3.test new file mode 100644 index 00000000000..78981922613 --- /dev/null +++ b/pyk/regression-new/search-bound/3.test @@ -0,0 +1 @@ +a diff --git a/pyk/regression-new/search-bound/3.test.out b/pyk/regression-new/search-bound/3.test.out new file mode 100644 index 00000000000..99f9fd87945 --- /dev/null +++ b/pyk/regression-new/search-bound/3.test.out @@ -0,0 +1,15 @@ + { + Result:GeneratedTopCell + #Equals + + c ~> .K + + } +#Or + { + Result:GeneratedTopCell + #Equals + + d ~> .K + + } diff --git a/pyk/regression-new/search-bound/Makefile b/pyk/regression-new/search-bound/Makefile new file mode 100644 index 00000000000..d5565bb08a0 --- /dev/null +++ b/pyk/regression-new/search-bound/Makefile @@ -0,0 +1,12 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--enable-search --syntax-module TEST +KRUN_FLAGS=--search --bound ${BOUND} --depth 2 + +1.test: BOUND=0 +2.test: BOUND=1 +3.test: BOUND=2 + +include ../include/ktest.mak diff --git a/pyk/regression-new/search-bound/test.k b/pyk/regression-new/search-bound/test.k new file mode 100644 index 00000000000..b7f113e917b --- /dev/null +++ b/pyk/regression-new/search-bound/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + + syntax KItem ::= "a" | "b" | "c" | "d" | "e" + + rule a => b + rule a => c + rule b => d + rule d => e + rule d => e + rule d => e + rule d => e + +endmodule diff --git a/pyk/regression-new/seqstrict-predicate/1.test b/pyk/regression-new/seqstrict-predicate/1.test new file mode 100644 index 00000000000..411c616fa3c --- /dev/null +++ b/pyk/regression-new/seqstrict-predicate/1.test @@ -0,0 +1 @@ +1 + 2 + 3 + 4 diff --git a/pyk/regression-new/seqstrict-predicate/1.test.out b/pyk/regression-new/seqstrict-predicate/1.test.out new file mode 100644 index 00000000000..1b239a340ff --- /dev/null +++ b/pyk/regression-new/seqstrict-predicate/1.test.out @@ -0,0 +1,3 @@ + + 10 ~> .K + diff --git a/pyk/regression-new/seqstrict-predicate/Makefile b/pyk/regression-new/seqstrict-predicate/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/seqstrict-predicate/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/seqstrict-predicate/test.k b/pyk/regression-new/seqstrict-predicate/test.k new file mode 100644 index 00000000000..69689f30f89 --- /dev/null +++ b/pyk/regression-new/seqstrict-predicate/test.k @@ -0,0 +1,13 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + context alias [foo]: HERE [result(Foo)] + + syntax Exp ::= Exp "+" Exp [seqstrict(foo), left] | Int + + syntax Foo ::= Int + + rule I + J => I +Int J + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/Makefile b/pyk/regression-new/set-symbolic-tests/Makefile new file mode 100644 index 00000000000..3d07fbc3bad --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/Makefile @@ -0,0 +1,10 @@ +DEF=set-tests +EXT=stest +TESTDIR=. +KOMPILE_BACKEND=haskell +KPROVE_FLAGS=--warnings none +export KORE_EXEC_OPTS=--log-level error + +include ../include/ktest.mak + +CONSIDER_PROVER_ERRORS=2>&1 diff --git a/pyk/regression-new/set-symbolic-tests/diff b/pyk/regression-new/set-symbolic-tests/diff new file mode 100644 index 00000000000..bf4005a3da5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff @@ -0,0 +1,38 @@ +claim diff ( .Set -Set SetItem(x) ) => . +claim diff ( .Set -Set S ) => . +claim diff ( S -Set .Set ) => . +claim diff ( (S SetItem(X:MyId)) -Set SetItem(X) ) => . +claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . +claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires Y =/=K X +claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires Y in S +claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires notBool (Y in S) +claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires notBool (Y in S) andBool Y =/=K X +claim diff ( SetItem(X) -Set (S SetItem(X:MyId)) ) => . +claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . +claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires Y =/=K X +claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires Y in S +claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) +claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) andBool Y =/=K X +claim diff ( (S SetItem(X:MyId)) -Set S ) => . +claim diff ( (S1 SetItem(X:MyId)) -Set S2 ) => . +claim diff ( S -Set (S SetItem(X:MyId)) ) => . +claim diff ( S1 -Set (S2 SetItem(X:MyId)) ) => . + +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y ==K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z ==K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z =/=K X +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z ==K Y +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y +claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y andBool Z =/=K X +claim diff ( X in ( (SetItem(X:MyId) SetItem(y)) -Set SetItem(x) ) ) => . +claim diff ( X in ( (SetItem(X:MyId) SetItem(y)) -Set SetItem(x) ) ) => . requires X =/=K x diff --git a/pyk/regression-new/set-symbolic-tests/diff-1-spec.k b/pyk/regression-new/set-symbolic-tests/diff-1-spec.k new file mode 100644 index 00000000000..47919b171b9 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-1-SPEC + imports SET-TESTS + + claim diff ( .Set -Set SetItem(x) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-1-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-1-spec.k.out new file mode 100644 index 00000000000..c01c901e870 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-1-spec.k.out @@ -0,0 +1,4 @@ + + diffResult ( .Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-10-spec.k b/pyk/regression-new/set-symbolic-tests/diff-10-spec.k new file mode 100644 index 00000000000..92fd1653b53 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-10-SPEC + imports SET-TESTS + + claim diff ( SetItem(X) -Set (S SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-10-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-10-spec.k.out new file mode 100644 index 00000000000..6ca07f3b436 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-10-spec.k.out @@ -0,0 +1,10 @@ + + diffResult ( .Set ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-11-spec.k b/pyk/regression-new/set-symbolic-tests/diff-11-spec.k new file mode 100644 index 00000000000..f74edd7d8e2 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-11-SPEC + imports SET-TESTS + + claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-11-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-11-spec.k.out new file mode 100644 index 00000000000..9d4acc6280b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-11-spec.k.out @@ -0,0 +1,11 @@ + + diffResult ( SetItem ( Y:MyId ) -Set ( S + SetItem ( X:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-17-spec.k b/pyk/regression-new/set-symbolic-tests/diff-17-spec.k new file mode 100644 index 00000000000..4e71118637c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-17-SPEC + imports SET-TESTS + + claim diff ( (S1 SetItem(X:MyId)) -Set S2 ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-17-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-17-spec.k.out new file mode 100644 index 00000000000..6e26d614753 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-17-spec.k.out @@ -0,0 +1,11 @@ + + diffResult ( ( S1 + SetItem ( X:MyId ) ) -Set S2 ) ~> .K + +#And + { + false + #Equals + X:MyId in S1 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-19-spec.k b/pyk/regression-new/set-symbolic-tests/diff-19-spec.k new file mode 100644 index 00000000000..5f74e7e2caa --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-19-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-19-SPEC + imports SET-TESTS + + claim diff ( S1 -Set (S2 SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-19-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-19-spec.k.out new file mode 100644 index 00000000000..151b3f69477 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-19-spec.k.out @@ -0,0 +1,11 @@ + + diffResult ( S1 -Set ( S2 + SetItem ( X:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S2 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-2-spec.k b/pyk/regression-new/set-symbolic-tests/diff-2-spec.k new file mode 100644 index 00000000000..87646e12ff1 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-2-SPEC + imports SET-TESTS + + claim diff ( .Set -Set S ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-2-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-2-spec.k.out new file mode 100644 index 00000000000..c01c901e870 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-2-spec.k.out @@ -0,0 +1,4 @@ + + diffResult ( .Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-21-spec.k b/pyk/regression-new/set-symbolic-tests/diff-21-spec.k new file mode 100644 index 00000000000..6cc46847c89 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-21-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-21-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-21-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-21-spec.k.out new file mode 100644 index 00000000000..ba39b5deb1e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-21-spec.k.out @@ -0,0 +1,10 @@ + + diffResult ( Z:MyId in S ) ~> .K + +#And + { + false + #Equals + Y:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-22-spec.k b/pyk/regression-new/set-symbolic-tests/diff-22-spec.k new file mode 100644 index 00000000000..c258b6ea738 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-22-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-22-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-22-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-22-spec.k.out new file mode 100644 index 00000000000..d96ea70d547 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-22-spec.k.out @@ -0,0 +1,10 @@ + + diffResult ( false ) ~> .K + +#And + { + false + #Equals + Z:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-23-spec.k b/pyk/regression-new/set-symbolic-tests/diff-23-spec.k new file mode 100644 index 00000000000..b927429b49d --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-23-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-23-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-23-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-23-spec.k.out new file mode 100644 index 00000000000..bd1f6b855a7 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-23-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + diffResult ( Z:MyId in S ) ~> .K + +#And + { + false + #Equals + Y:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-3-spec.k b/pyk/regression-new/set-symbolic-tests/diff-3-spec.k new file mode 100644 index 00000000000..ef31e57db0f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-3-SPEC + imports SET-TESTS + + claim diff ( S -Set .Set ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-3-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-3-spec.k.out new file mode 100644 index 00000000000..37c4e66d0a7 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-3-spec.k.out @@ -0,0 +1,4 @@ + + diffResult ( S:Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-31-spec.k b/pyk/regression-new/set-symbolic-tests/diff-31-spec.k new file mode 100644 index 00000000000..0fe0f442f5c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-31-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-31-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-31-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-31-spec.k.out new file mode 100644 index 00000000000..b9915fa78a1 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-31-spec.k.out @@ -0,0 +1,11 @@ + + diffResult ( Z:MyId in ( S + SetItem ( X:MyId ) ) -Set SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-4-spec.k b/pyk/regression-new/set-symbolic-tests/diff-4-spec.k new file mode 100644 index 00000000000..0d62c86eb3e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-4-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set SetItem(X) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-4-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-4-spec.k.out new file mode 100644 index 00000000000..367d51bdf94 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-4-spec.k.out @@ -0,0 +1,10 @@ + + diffResult ( S:Set ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-5-spec.k b/pyk/regression-new/set-symbolic-tests/diff-5-spec.k new file mode 100644 index 00000000000..7bebbcd329d --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-5-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-5-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-5-spec.k.out new file mode 100644 index 00000000000..c7a46704383 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-5-spec.k.out @@ -0,0 +1,11 @@ + + diffResult ( ( S + SetItem ( X:MyId ) ) -Set SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k b/pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k new file mode 100644 index 00000000000..dc9e0b60971 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-TICKET3124-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X)) -Set SetItem(X) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k.out b/pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k.out new file mode 100644 index 00000000000..c99bf3d0a6a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/diff-ticket3124-spec.k.out @@ -0,0 +1,10 @@ + + diffResult ( S:Set ) ~> .K + +#And + { + false + #Equals + X in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k b/pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k new file mode 100644 index 00000000000..3b2946db404 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-32-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k.out new file mode 100644 index 00000000000..bd47503e0fe --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-32-spec.k.out @@ -0,0 +1,9 @@ + + diffResult ( notBool ( Z:MyId in SetItem ( Y:MyId ) ) ) ~> . + +#And + { + false + #Equals + Z:MyId in S + } diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k b/pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k new file mode 100644 index 00000000000..3a3dcb5e83e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-34-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k.out new file mode 100644 index 00000000000..73f82e03333 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-34-spec.k.out @@ -0,0 +1,9 @@ + + diffResult ( false ) ~> . + +#And + { + false + #Equals + X:MyId in S + } diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k b/pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k new file mode 100644 index 00000000000..0223871ed78 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-38-SPEC + imports SET-TESTS + + claim diff ( X in ( (SetItem(X:MyId) SetItem(y)) -Set SetItem(x) ) ) => . requires X =/=K x + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k.out new file mode 100644 index 00000000000..bc495e181e3 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-38-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + x + } ) +#And + + diffResult ( true ) ~> . + +#And + { + false + #Equals + y in SetItem ( X:MyId ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/failing/diff-ticket2700-spec.k b/pyk/regression-new/set-symbolic-tests/failing/diff-ticket2700-spec.k new file mode 100644 index 00000000000..693f52537a6 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/diff-ticket2700-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-TICKET2700-SPEC + imports SET-TESTS + + claim diff ( SetItem(1) -Set (SetItem(X)) ) => . + requires X + diffResult ( SetItem ( 1 ) ) ~> . + +#And + { + true + #Equals + X inSet ( X:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/inset-10-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/inset-10-spec.k.out new file mode 100644 index 00000000000..70e3e7e690a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/inset-10-spec.k.out @@ -0,0 +1,17 @@ + + inSetResult ( true ) ~> . + +#And + { + false + #Equals + X:MyId in SET + } +#And + { + false + #Equals + Z:MyId in SET + SetItem ( X:MyId ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k b/pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k new file mode 100644 index 00000000000..cf4a881ef44 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k @@ -0,0 +1,27 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-100-ELEMENTS-SPEC + imports SET-TESTS + + claim + inSet ( + Y:MyId in + ( SetItem(X:MyId) + (SetItem(_X00) (SetItem(_X01) (SetItem(_X02) (SetItem(_X03) (SetItem(_X04) (SetItem(_X05) (SetItem(_X06) (SetItem(_X07) (SetItem(_X08) (SetItem(_X09))))))))))) + (SetItem(_X10) (SetItem(_X11) (SetItem(_X12) (SetItem(_X13) (SetItem(_X14) (SetItem(_X15) (SetItem(_X16) (SetItem(_X17) (SetItem(_X18) (SetItem(_X19))))))))))) + (SetItem(_X20) (SetItem(_X21) (SetItem(_X22) (SetItem(_X23) (SetItem(_X24) (SetItem(_X25) (SetItem(_X26) (SetItem(_X27) (SetItem(_X28) (SetItem(_X29))))))))))) + (SetItem(_X30) (SetItem(_X31) (SetItem(_X32) (SetItem(_X33) (SetItem(_X34) (SetItem(_X35) (SetItem(_X36) (SetItem(_X37) (SetItem(_X38) (SetItem(_X39))))))))))) + (SetItem(_X40) (SetItem(_X41) (SetItem(_X42) (SetItem(_X43) (SetItem(_X44) (SetItem(_X45) (SetItem(_X46) (SetItem(_X47) (SetItem(_X48) (SetItem(_X49))))))))))) + (SetItem(_X50) (SetItem(_X51) (SetItem(_X52) (SetItem(_X53) (SetItem(_X54) (SetItem(_X55) (SetItem(_X56) (SetItem(_X57) (SetItem(_X58) (SetItem(_X59))))))))))) + (SetItem(_X60) (SetItem(_X61) (SetItem(_X62) (SetItem(_X63) (SetItem(_X64) (SetItem(_X65) (SetItem(_X66) (SetItem(_X67) (SetItem(_X68) (SetItem(_X69))))))))))) + (SetItem(_X70) (SetItem(_X71) (SetItem(_X72) (SetItem(_X73) (SetItem(_X74) (SetItem(_X75) (SetItem(_X76) (SetItem(_X77) (SetItem(_X78) (SetItem(_X79))))))))))) + (SetItem(_X80) (SetItem(_X81) (SetItem(_X82) (SetItem(_X83) (SetItem(_X84) (SetItem(_X85) (SetItem(_X86) (SetItem(_X87) (SetItem(_X88) (SetItem(_X89))))))))))) + (SetItem(_X90) (SetItem(_X91) (SetItem(_X92) (SetItem(_X93) (SetItem(_X94) (SetItem(_X95) (SetItem(_X96) (SetItem(_X97) (SetItem(_X98) (SetItem(_X99))))))))))) + ) + ) => inSetResult ( true ) + requires Y ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/inset-100-elements-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k b/pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k new file mode 100644 index 00000000000..7a55cfcdc0b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-18-SPEC + imports SET-TESTS + + claim union ( S |Set (S SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k.out new file mode 100644 index 00000000000..90769b29a09 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/union-18-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( S + SetItem ( X:MyId ) ) ~> . + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k b/pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k new file mode 100644 index 00000000000..ed64b814947 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-24-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k.out b/pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k.out new file mode 100644 index 00000000000..67e76824726 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/failing/union-24-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + X + #Equals + Y + } ) +#And + + unionResult ( Z:MyId in ( S |Set SetItem ( Y:MyId ) ) + SetItem ( X:MyId ) ) ~> . + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/gen-tests.sh b/pyk/regression-new/set-symbolic-tests/gen-tests.sh new file mode 100755 index 00000000000..aa0b661aa20 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/gen-tests.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash + +for test_list in inset union diff intersect; do + i=1 + while read line; do + spec_file="$test_list-$i-spec.k" + module_name="$(echo $test_list | tr '[:lower:]' '[:upper:]')" + if [[ -n "$line" ]] && [[ ! -f "$spec_file" ]] && [[ ! -f "failing/$spec_file" ]]; then + { echo "// Copyright (c) K Team. All Rights Reserved." + echo "// generated by gen-tests.sh" + echo "" + echo "requires \"set-tests.k\"" + echo "" + echo "module $module_name-$i-SPEC" + echo " imports SET-TESTS" + echo "" + echo " $line" + echo "" + echo "endmodule" + } > $spec_file + make CHECK='> ' $spec_file + fi + i=$((i + 1)) + done < $test_list +done diff --git a/pyk/regression-new/set-symbolic-tests/inset b/pyk/regression-new/set-symbolic-tests/inset new file mode 100644 index 00000000000..b0645d575e9 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset @@ -0,0 +1,13 @@ +claim inSet ( X:MyId in ( .Set ) ) => . +claim inSet ( X in ( SET:Set SetItem(X:MyId) ) ) => . +claim inSet ( X in ( SET:Set SetItem(X:MyId) ) ) => . requires notBool X in SET +claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . +claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires Y =/=K X +claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires Y in SET +claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires Y in SET andBool Y =/=K X +claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires notBool Y in SET +claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires notBool Y in SET andBool Y =/=K X +claim inSet ( X:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X) ) ) => . +claim inSet ( Y:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X:MyId) ) ) => . +claim inSet ( Y:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X:MyId) ) ) => . requires Y in SET +claim inSet ( Y:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X:MyId) ) ) => . requires notBool Y in SET diff --git a/pyk/regression-new/set-symbolic-tests/inset-1-spec.k b/pyk/regression-new/set-symbolic-tests/inset-1-spec.k new file mode 100644 index 00000000000..69b9b4231b5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-1-SPEC + imports SET-TESTS + + claim inSet ( X:MyId in ( .Set ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/inset-1-spec.k.out b/pyk/regression-new/set-symbolic-tests/inset-1-spec.k.out new file mode 100644 index 00000000000..749888830da --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-1-spec.k.out @@ -0,0 +1,4 @@ + + inSetResult ( false ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/inset-11-spec.k b/pyk/regression-new/set-symbolic-tests/inset-11-spec.k new file mode 100644 index 00000000000..b2a708c1217 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-11-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/inset-11-spec.k.out b/pyk/regression-new/set-symbolic-tests/inset-11-spec.k.out new file mode 100644 index 00000000000..c9fac9024fe --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-11-spec.k.out @@ -0,0 +1,19 @@ + + inSetResult ( Y:MyId in SET + SetItem ( X:MyId ) + SetItem ( Z:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in SET + SetItem ( Z:MyId ) + } +#And + { + false + #Equals + Z:MyId in SET + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/inset-2-spec.k b/pyk/regression-new/set-symbolic-tests/inset-2-spec.k new file mode 100644 index 00000000000..546934fc954 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-2-SPEC + imports SET-TESTS + + claim inSet ( X in ( SET:Set SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/inset-2-spec.k.out b/pyk/regression-new/set-symbolic-tests/inset-2-spec.k.out new file mode 100644 index 00000000000..10317957e7c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-2-spec.k.out @@ -0,0 +1,10 @@ + + inSetResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in SET + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/inset-3-spec.k b/pyk/regression-new/set-symbolic-tests/inset-3-spec.k new file mode 100644 index 00000000000..06c28918fc4 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-3-SPEC + imports SET-TESTS + + claim inSet ( X in ( SET:Set SetItem(X:MyId) ) ) => . requires notBool X in SET + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/inset-3-spec.k.out b/pyk/regression-new/set-symbolic-tests/inset-3-spec.k.out new file mode 100644 index 00000000000..10317957e7c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-3-spec.k.out @@ -0,0 +1,10 @@ + + inSetResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in SET + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/inset-4-spec.k b/pyk/regression-new/set-symbolic-tests/inset-4-spec.k new file mode 100644 index 00000000000..6360fd5fc62 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-4-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/inset-4-spec.k.out b/pyk/regression-new/set-symbolic-tests/inset-4-spec.k.out new file mode 100644 index 00000000000..6f546a1f028 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/inset-4-spec.k.out @@ -0,0 +1,11 @@ + + inSetResult ( Y:MyId in SET + SetItem ( X:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in SET + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect b/pyk/regression-new/set-symbolic-tests/intersect new file mode 100644 index 00000000000..ec47db40a56 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect @@ -0,0 +1,38 @@ +claim intersect ( intersectSet(.Set, SetItem(x) ) ) => . +claim intersect ( intersectSet(.Set, S ) ) => . +claim intersect ( intersectSet(S, .Set ) ) => . +claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(X) ) ) => . +claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . +claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X +claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y in S +claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires notBool (Y in S) +claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires notBool (Y in S) andBool Y =/=K X +claim intersect ( intersectSet(SetItem(X) , S SetItem(X:MyId) ) ) => . +claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . +claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires Y =/=K X +claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires Y in S +claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires notBool (Y in S) +claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires notBool (Y in S) andBool Y =/=K X +claim intersect ( intersectSet(S SetItem(X:MyId), S ) ) => . +claim intersect ( intersectSet(S1 SetItem(X:MyId), S2 ) ) => . +claim intersect ( intersectSet(S, S SetItem(X:MyId) ) ) => . +claim intersect ( intersectSet(S1, S2 SetItem(X:MyId) ) ) => . + +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y ==K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z ==K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z =/=K X +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z ==K Y +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z =/=K Y +claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z =/=K Y andBool Z =/=K X +claim intersect ( X in intersectSet( SetItem(X:MyId) SetItem(y), SetItem(x) ) ) => . +claim intersect ( X in intersectSet( SetItem(X:MyId) SetItem(y), SetItem(x) ) ) => . requires X =/=K x diff --git a/pyk/regression-new/set-symbolic-tests/intersect-1-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-1-spec.k new file mode 100644 index 00000000000..b34d8500bec --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-1-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(.Set, SetItem(x) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-1-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-1-spec.k.out new file mode 100644 index 00000000000..658f31e0285 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-1-spec.k.out @@ -0,0 +1,4 @@ + + intersectResult ( .Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-10-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-10-spec.k new file mode 100644 index 00000000000..0ad1a9f39a0 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-10-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(SetItem(X) , S SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-10-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-10-spec.k.out new file mode 100644 index 00000000000..9ffdf70b93a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-10-spec.k.out @@ -0,0 +1,10 @@ + + intersectResult ( SetItem ( X:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-11-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-11-spec.k new file mode 100644 index 00000000000..e4a1280c86e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-11-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-11-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-11-spec.k.out new file mode 100644 index 00000000000..e48efbabcba --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-11-spec.k.out @@ -0,0 +1,11 @@ + + intersectResult ( intersectSet ( SetItem ( Y:MyId ) , S + SetItem ( X:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-17-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-17-spec.k new file mode 100644 index 00000000000..5e0d729824a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-17-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S1 SetItem(X:MyId), S2 ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-17-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-17-spec.k.out new file mode 100644 index 00000000000..d82207b2d81 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-17-spec.k.out @@ -0,0 +1,11 @@ + + intersectResult ( intersectSet ( S1 + SetItem ( X:MyId ) , S2 ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S1 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-19-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-19-spec.k new file mode 100644 index 00000000000..fc27d9d2378 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-19-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-19-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S1, S2 SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-19-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-19-spec.k.out new file mode 100644 index 00000000000..b3007fb0bad --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-19-spec.k.out @@ -0,0 +1,11 @@ + + intersectResult ( intersectSet ( S1 , S2 + SetItem ( X:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S2 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-2-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-2-spec.k new file mode 100644 index 00000000000..882137a2104 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-2-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(.Set, S ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-2-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-2-spec.k.out new file mode 100644 index 00000000000..658f31e0285 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-2-spec.k.out @@ -0,0 +1,4 @@ + + intersectResult ( .Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-21-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-21-spec.k new file mode 100644 index 00000000000..5ab368ea9b1 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-21-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-21-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-21-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-21-spec.k.out new file mode 100644 index 00000000000..3b8bedae64c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-21-spec.k.out @@ -0,0 +1,10 @@ + + intersectResult ( Z:MyId in SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + Y:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-22-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-22-spec.k new file mode 100644 index 00000000000..7fb547d6a2b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-22-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-22-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-22-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-22-spec.k.out new file mode 100644 index 00000000000..7cbe4823a58 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-22-spec.k.out @@ -0,0 +1,10 @@ + + intersectResult ( true ) ~> .K + +#And + { + false + #Equals + Z:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-23-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-23-spec.k new file mode 100644 index 00000000000..c51e532948c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-23-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-23-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-23-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-23-spec.k.out new file mode 100644 index 00000000000..0c0faf705c3 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-23-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + intersectResult ( Z:MyId in SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + Y:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-3-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-3-spec.k new file mode 100644 index 00000000000..6fcf57820a6 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-3-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S, .Set ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-3-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-3-spec.k.out new file mode 100644 index 00000000000..658f31e0285 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-3-spec.k.out @@ -0,0 +1,4 @@ + + intersectResult ( .Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-31-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-31-spec.k new file mode 100644 index 00000000000..9c637490175 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-31-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-31-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-31-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-31-spec.k.out new file mode 100644 index 00000000000..0fc0df0a19e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-31-spec.k.out @@ -0,0 +1,11 @@ + + intersectResult ( Z:MyId in intersectSet ( S + SetItem ( X:MyId ) , SetItem ( Y:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-37-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-37-spec.k new file mode 100644 index 00000000000..bd671a771b1 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-37-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-37-SPEC + imports SET-TESTS + + claim intersect ( X in intersectSet( SetItem(X:MyId) SetItem(y), SetItem(x) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-37-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-37-spec.k.out new file mode 100644 index 00000000000..59fe68b6e3a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-37-spec.k.out @@ -0,0 +1,11 @@ + + intersectResult ( X:MyId in intersectSet ( SetItem ( X:MyId ) + SetItem ( y ) , SetItem ( x ) ) ) ~> .K + +#And + { + false + #Equals + y in SetItem ( X:MyId ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-4-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-4-spec.k new file mode 100644 index 00000000000..7d407fc9a32 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-4-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(X) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-4-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-4-spec.k.out new file mode 100644 index 00000000000..9ffdf70b93a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-4-spec.k.out @@ -0,0 +1,10 @@ + + intersectResult ( SetItem ( X:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/intersect-5-spec.k b/pyk/regression-new/set-symbolic-tests/intersect-5-spec.k new file mode 100644 index 00000000000..5f08b652886 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-5-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/intersect-5-spec.k.out b/pyk/regression-new/set-symbolic-tests/intersect-5-spec.k.out new file mode 100644 index 00000000000..1019864300f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/intersect-5-spec.k.out @@ -0,0 +1,11 @@ + + intersectResult ( intersectSet ( S + SetItem ( X:MyId ) , SetItem ( Y:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/set-tests.k b/pyk/regression-new/set-symbolic-tests/set-tests.k new file mode 100644 index 00000000000..036df114f6c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/set-tests.k @@ -0,0 +1,26 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module SET-TESTS-SYNTAX + imports SET + imports INT + imports K-EQUAL + imports BOOL + + syntax MyId ::= "x" | "y" | "z" | foo ( MyId ) + syntax Exp ::= Bool | Set + + syntax Test ::= inSet ( Exp ) | union ( Exp ) | diff ( Exp ) | intersect ( Exp ) + | inSetResult ( Exp ) | unionResult ( Exp ) | diffResult ( Exp ) | intersectResult ( Exp ) +endmodule + +module SET-TESTS + imports SET-TESTS-SYNTAX + imports SET-SYMBOLIC + + configuration $PGM:Test + + rule inSet ( E ) => inSetResult ( E ) + rule union ( E ) => unionResult ( E ) + rule diff ( E ) => diffResult ( E ) + rule intersect ( E ) => intersectResult ( E ) +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union b/pyk/regression-new/set-symbolic-tests/union new file mode 100644 index 00000000000..d71182d20cf --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union @@ -0,0 +1,39 @@ +claim union ( .Set |Set SetItem(x) ) => . +claim union ( .Set |Set S ) => . +claim union ( S |Set .Set ) => . +claim union ( (S SetItem(X:MyId)) |Set SetItem(X) ) => . +claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . +claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires Y =/=K X +claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires Y in S +claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires notBool (Y in S) +claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires notBool (Y in S) andBool Y =/=K X +claim union ( SetItem(X) |Set (S SetItem(X:MyId)) ) => . +claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . +claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires Y =/=K X +claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires Y in S +claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) +claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) andBool Y =/=K X +claim union ( (S SetItem(X:MyId)) |Set S ) => . +claim union ( (S1 SetItem(X:MyId)) |Set S2 ) => . +claim union ( S |Set (S SetItem(X:MyId)) ) => . +claim union ( S1 |Set (S2 SetItem(X:MyId)) ) => . + +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y ==K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z ==K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z =/=K X +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z ==K Y +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y +claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y andBool Z =/=K X +claim union ( X in ( (SetItem(X:MyId) SetItem(y)) |Set SetItem(x) ) ) => . +claim union ( X in ( (SetItem(X:MyId) SetItem(y)) |Set SetItem(x) ) ) => . requires X =/=K x +claim union ( X in ( SetItem(x) |Set (SetItem(X:MyId) SetItem(y))) ) => . \ No newline at end of file diff --git a/pyk/regression-new/set-symbolic-tests/union-1-spec.k b/pyk/regression-new/set-symbolic-tests/union-1-spec.k new file mode 100644 index 00000000000..ad841748d92 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-1-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-1-SPEC + imports SET-TESTS + + claim union ( .Set |Set SetItem(x) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-1-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-1-spec.k.out new file mode 100644 index 00000000000..573c342df8e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-1-spec.k.out @@ -0,0 +1,4 @@ + + unionResult ( SetItem ( x ) ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-10-spec.k b/pyk/regression-new/set-symbolic-tests/union-10-spec.k new file mode 100644 index 00000000000..d80aa853507 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-10-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-10-SPEC + imports SET-TESTS + + claim union ( SetItem(X) |Set (S SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-10-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-10-spec.k.out new file mode 100644 index 00000000000..7290800fac0 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-10-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( S + SetItem ( X:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-11-spec.k b/pyk/regression-new/set-symbolic-tests/union-11-spec.k new file mode 100644 index 00000000000..f0e30a483f7 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-11-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-11-SPEC + imports SET-TESTS + + claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-11-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-11-spec.k.out new file mode 100644 index 00000000000..74d77073391 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-11-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( SetItem ( Y:MyId ) |Set ( S + SetItem ( X:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-17-spec.k b/pyk/regression-new/set-symbolic-tests/union-17-spec.k new file mode 100644 index 00000000000..34299344e0b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-17-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-17-SPEC + imports SET-TESTS + + claim union ( (S1 SetItem(X:MyId)) |Set S2 ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-17-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-17-spec.k.out new file mode 100644 index 00000000000..a603fc0be78 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-17-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( ( S1 + SetItem ( X:MyId ) ) |Set S2 ) ~> .K + +#And + { + false + #Equals + X:MyId in S1 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-19-spec.k b/pyk/regression-new/set-symbolic-tests/union-19-spec.k new file mode 100644 index 00000000000..a8560e8768e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-19-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-19-SPEC + imports SET-TESTS + + claim union ( S1 |Set (S2 SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-19-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-19-spec.k.out new file mode 100644 index 00000000000..7a2e9eaf01e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-19-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( S1 |Set ( S2 + SetItem ( X:MyId ) ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S2 + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-2-spec.k b/pyk/regression-new/set-symbolic-tests/union-2-spec.k new file mode 100644 index 00000000000..d1ff2f7eeb1 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-2-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-2-SPEC + imports SET-TESTS + + claim union ( .Set |Set S ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-2-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-2-spec.k.out new file mode 100644 index 00000000000..e4a4270c5d4 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-2-spec.k.out @@ -0,0 +1,4 @@ + + unionResult ( S:Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-21-spec.k b/pyk/regression-new/set-symbolic-tests/union-21-spec.k new file mode 100644 index 00000000000..411ce2a9e69 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-21-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-21-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-21-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-21-spec.k.out new file mode 100644 index 00000000000..34486b5316b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-21-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( Z:MyId in S + SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + Y:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-22-spec.k b/pyk/regression-new/set-symbolic-tests/union-22-spec.k new file mode 100644 index 00000000000..caf2ef21533 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-22-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-22-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z ==K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-22-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-22-spec.k.out new file mode 100644 index 00000000000..78316180689 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-22-spec.k.out @@ -0,0 +1,10 @@ + + unionResult ( true ) ~> .K + +#And + { + false + #Equals + Z:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-23-spec.k b/pyk/regression-new/set-symbolic-tests/union-23-spec.k new file mode 100644 index 00000000000..349a0fe0f24 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-23-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-23-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y ==K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-23-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-23-spec.k.out new file mode 100644 index 00000000000..a3d82ae6f39 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-23-spec.k.out @@ -0,0 +1,17 @@ + #Not ( { + Y + #Equals + Z + } ) +#And + + unionResult ( Z:MyId in S + SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + Y:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-3-spec.k b/pyk/regression-new/set-symbolic-tests/union-3-spec.k new file mode 100644 index 00000000000..5b85c9828c0 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-3-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-3-SPEC + imports SET-TESTS + + claim union ( S |Set .Set ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-3-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-3-spec.k.out new file mode 100644 index 00000000000..e4a4270c5d4 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-3-spec.k.out @@ -0,0 +1,4 @@ + + unionResult ( S:Set ) ~> .K + +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-31-spec.k b/pyk/regression-new/set-symbolic-tests/union-31-spec.k new file mode 100644 index 00000000000..5da1525f78f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-31-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-31-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-31-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-31-spec.k.out new file mode 100644 index 00000000000..10203a42f4f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-31-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( Z:MyId in ( S + SetItem ( X:MyId ) ) |Set SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-32-spec.k b/pyk/regression-new/set-symbolic-tests/union-32-spec.k new file mode 100644 index 00000000000..0ace7cb99c8 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-32-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-32-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-32-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-32-spec.k.out new file mode 100644 index 00000000000..78316180689 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-32-spec.k.out @@ -0,0 +1,10 @@ + + unionResult ( true ) ~> .K + +#And + { + false + #Equals + Z:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-34-spec.k b/pyk/regression-new/set-symbolic-tests/union-34-spec.k new file mode 100644 index 00000000000..dcf988160be --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-34-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-34-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-34-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-34-spec.k.out new file mode 100644 index 00000000000..5a3375289e4 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-34-spec.k.out @@ -0,0 +1,10 @@ + + unionResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-37-spec.k b/pyk/regression-new/set-symbolic-tests/union-37-spec.k new file mode 100644 index 00000000000..95ed842ce51 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-37-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-37-SPEC + imports SET-TESTS + + claim union ( X in ( (SetItem(X:MyId) SetItem(y)) |Set SetItem(x) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-37-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-37-spec.k.out new file mode 100644 index 00000000000..3ee02f44593 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-37-spec.k.out @@ -0,0 +1,10 @@ + + unionResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in SetItem ( y ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-38-spec.k b/pyk/regression-new/set-symbolic-tests/union-38-spec.k new file mode 100644 index 00000000000..493e3799635 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-38-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-38-SPEC + imports SET-TESTS + + claim union ( X in ( (SetItem(X:MyId) SetItem(y)) |Set SetItem(x) ) ) => . requires X =/=K x + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-38-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-38-spec.k.out new file mode 100644 index 00000000000..a525d164d6c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-38-spec.k.out @@ -0,0 +1,16 @@ + #Not ( { + X + #Equals + x + } ) +#And + + unionResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in SetItem ( y ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-39-spec.k b/pyk/regression-new/set-symbolic-tests/union-39-spec.k new file mode 100644 index 00000000000..9066813d462 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-39-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-39-SPEC + imports SET-TESTS + + claim union ( X in ( SetItem(x) |Set (SetItem(X:MyId) SetItem(y))) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-39-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-39-spec.k.out new file mode 100644 index 00000000000..3ee02f44593 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-39-spec.k.out @@ -0,0 +1,10 @@ + + unionResult ( true ) ~> .K + +#And + { + false + #Equals + X:MyId in SetItem ( y ) + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-4-spec.k b/pyk/regression-new/set-symbolic-tests/union-4-spec.k new file mode 100644 index 00000000000..dfd2abb8368 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-4-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-4-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set SetItem(X) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-4-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-4-spec.k.out new file mode 100644 index 00000000000..7290800fac0 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-4-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( S + SetItem ( X:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/union-5-spec.k b/pyk/regression-new/set-symbolic-tests/union-5-spec.k new file mode 100644 index 00000000000..67f12f06b69 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-5-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/union-5-spec.k.out b/pyk/regression-new/set-symbolic-tests/union-5-spec.k.out new file mode 100644 index 00000000000..b817fb2656c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/union-5-spec.k.out @@ -0,0 +1,11 @@ + + unionResult ( ( S + SetItem ( X:MyId ) ) |Set SetItem ( Y:MyId ) ) ~> .K + +#And + { + false + #Equals + X:MyId in S + } +[Error] Prover: backend terminated because the configuration cannot be rewritten further. See output for more details. diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-12-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-12-spec.k new file mode 100644 index 00000000000..62bf104a87e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-12-SPEC + imports SET-TESTS + + claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-13-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-13-spec.k new file mode 100644 index 00000000000..9187470401c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-13-SPEC + imports SET-TESTS + + claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires Y in S + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-14-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-14-spec.k new file mode 100644 index 00000000000..9c465f50666 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-14-SPEC + imports SET-TESTS + + claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-15-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-15-spec.k new file mode 100644 index 00000000000..96bc04766c8 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-15-SPEC + imports SET-TESTS + + claim diff ( SetItem(Y:MyId) -Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-16-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-16-spec.k new file mode 100644 index 00000000000..3da7b050b1d --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-16-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set S ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-18-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-18-spec.k new file mode 100644 index 00000000000..770915dc775 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-18-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-18-SPEC + imports SET-TESTS + + claim diff ( S -Set (S SetItem(X:MyId)) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-24-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-24-spec.k new file mode 100644 index 00000000000..cae13c11fe5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-24-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-24-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-25-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-25-spec.k new file mode 100644 index 00000000000..a71c1f9d70f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-25-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-25-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-26-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-26-spec.k new file mode 100644 index 00000000000..76d2c81a854 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-26-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-26-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-27-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-27-spec.k new file mode 100644 index 00000000000..b7b85af9bb5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-27-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-27-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-28-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-28-spec.k new file mode 100644 index 00000000000..589c275345d --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-28-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-28-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-29-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-29-spec.k new file mode 100644 index 00000000000..e9099d41121 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-29-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-29-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-30-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-30-spec.k new file mode 100644 index 00000000000..31f261c5bec --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-30-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-30-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-33-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-33-spec.k new file mode 100644 index 00000000000..6ac419835e9 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-33-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-33-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-35-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-35-spec.k new file mode 100644 index 00000000000..da1f8ea185c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-35-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-35-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-36-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-36-spec.k new file mode 100644 index 00000000000..d91c7314702 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-36-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-36-SPEC + imports SET-TESTS + + claim diff ( Z:MyId in ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-37-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-37-spec.k new file mode 100644 index 00000000000..895a2c9aff6 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-37-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-37-SPEC + imports SET-TESTS + + claim diff ( X in ( (SetItem(X:MyId) SetItem(y)) -Set SetItem(x) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-6-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-6-spec.k new file mode 100644 index 00000000000..96990639e97 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-6-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-7-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-7-spec.k new file mode 100644 index 00000000000..9dabcef0045 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-7-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires Y in S + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-8-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-8-spec.k new file mode 100644 index 00000000000..aeb5a20c32a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-8-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires notBool (Y in S) + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/diff-9-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-9-spec.k new file mode 100644 index 00000000000..25bffa9cae0 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/diff-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module DIFF-9-SPEC + imports SET-TESTS + + claim diff ( (S SetItem(X:MyId)) -Set SetItem(Y:MyId) ) => . requires notBool (Y in S) andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-12-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-12-spec.k new file mode 100644 index 00000000000..b509fcaa336 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-12-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X:MyId) ) ) => . requires Y in SET + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-13-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-13-spec.k new file mode 100644 index 00000000000..a329271fa64 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-13-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SetItem(Z:MyId) SET:Set SetItem(X:MyId) ) ) => . requires notBool Y in SET + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-5-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-5-spec.k new file mode 100644 index 00000000000..4577aaf8798 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-5-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-5-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-6-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-6-spec.k new file mode 100644 index 00000000000..9f4fa045b1b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-6-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires Y in SET + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-7-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-7-spec.k new file mode 100644 index 00000000000..94057060b3f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-7-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires Y in SET andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-8-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-8-spec.k new file mode 100644 index 00000000000..09b31acee62 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-8-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires notBool Y in SET + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/inset-9-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-9-spec.k new file mode 100644 index 00000000000..021608ae2ab --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/inset-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INSET-9-SPEC + imports SET-TESTS + + claim inSet ( Y:MyId in ( SET:Set SetItem(X:MyId) ) ) => . requires notBool Y in SET andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-12-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-12-spec.k new file mode 100644 index 00000000000..891f101aae5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-12-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-13-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-13-spec.k new file mode 100644 index 00000000000..e5df206687a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-13-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires Y in S + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-14-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-14-spec.k new file mode 100644 index 00000000000..119396bbaa0 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-14-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires notBool (Y in S) + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-15-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-15-spec.k new file mode 100644 index 00000000000..d86239eac55 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-15-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(SetItem(Y:MyId), S SetItem(X:MyId) ) ) => . requires notBool (Y in S) andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-16-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-16-spec.k new file mode 100644 index 00000000000..165b1bbf2da --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-16-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), S ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-18-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-18-spec.k new file mode 100644 index 00000000000..d53b22b4d38 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-18-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-18-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S, S SetItem(X:MyId) ) ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-24-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-24-spec.k new file mode 100644 index 00000000000..00fe45876d2 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-24-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-24-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-25-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-25-spec.k new file mode 100644 index 00000000000..711e82965be --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-25-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-25-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-26-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-26-spec.k new file mode 100644 index 00000000000..9e94f45a125 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-26-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-26-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-27-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-27-spec.k new file mode 100644 index 00000000000..beea4131b08 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-27-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-27-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-28-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-28-spec.k new file mode 100644 index 00000000000..df7d77a03fc --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-28-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-28-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-29-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-29-spec.k new file mode 100644 index 00000000000..fcf7edec42f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-29-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-29-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-30-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-30-spec.k new file mode 100644 index 00000000000..9d3581f0ef3 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-30-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-30-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-32-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-32-spec.k new file mode 100644 index 00000000000..42506c42fff --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-32-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-32-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-33-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-33-spec.k new file mode 100644 index 00000000000..92caa73b79c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-33-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-33-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-34-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-34-spec.k new file mode 100644 index 00000000000..b96394ebb8d --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-34-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-34-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z ==K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-35-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-35-spec.k new file mode 100644 index 00000000000..5a356cc20b8 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-35-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-35-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-36-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-36-spec.k new file mode 100644 index 00000000000..ac962a6ca1e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-36-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-36-SPEC + imports SET-TESTS + + claim intersect ( Z:MyId in intersectSet( S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-38-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-38-spec.k new file mode 100644 index 00000000000..b6e8e5826da --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-38-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-38-SPEC + imports SET-TESTS + + claim intersect ( X in intersectSet( SetItem(X:MyId) SetItem(y), SetItem(x) ) ) => . requires X =/=K x + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-6-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-6-spec.k new file mode 100644 index 00000000000..91aeb61f505 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-6-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-7-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-7-spec.k new file mode 100644 index 00000000000..3ce8343a5bb --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-7-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires Y in S + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-8-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-8-spec.k new file mode 100644 index 00000000000..709b5b0f37c --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-8-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires notBool (Y in S) + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-9-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-9-spec.k new file mode 100644 index 00000000000..a2f561ba9f8 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/intersect-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module INTERSECT-9-SPEC + imports SET-TESTS + + claim intersect ( intersectSet(S SetItem(X:MyId), SetItem(Y:MyId) ) ) => . requires notBool (Y in S) andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-12-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-12-spec.k new file mode 100644 index 00000000000..2638d767795 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-12-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-12-SPEC + imports SET-TESTS + + claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-13-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-13-spec.k new file mode 100644 index 00000000000..87142f9ca5b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-13-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-13-SPEC + imports SET-TESTS + + claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires Y in S + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-14-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-14-spec.k new file mode 100644 index 00000000000..c6ee9526a84 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-14-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-14-SPEC + imports SET-TESTS + + claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-15-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-15-spec.k new file mode 100644 index 00000000000..a0e609abf86 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-15-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-15-SPEC + imports SET-TESTS + + claim union ( SetItem(Y:MyId) |Set (S SetItem(X:MyId)) ) => . requires notBool (Y in S) andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-16-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-16-spec.k new file mode 100644 index 00000000000..37068380472 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-16-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-16-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set S ) => . + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-25-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-25-spec.k new file mode 100644 index 00000000000..538603dacb8 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-25-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-25-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-26-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-26-spec.k new file mode 100644 index 00000000000..1f2146c04be --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-26-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-26-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-27-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-27-spec.k new file mode 100644 index 00000000000..2bfad91f2f6 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-27-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-27-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-28-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-28-spec.k new file mode 100644 index 00000000000..567f21106a2 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-28-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-28-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-29-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-29-spec.k new file mode 100644 index 00000000000..b3c5121076e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-29-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-29-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z =/=K Y andBool Z ==K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-30-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-30-spec.k new file mode 100644 index 00000000000..e05d5d38b1b --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-30-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-30-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Y =/=K X andBool Z ==K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-33-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-33-spec.k new file mode 100644 index 00000000000..a8c09988602 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-33-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-33-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-35-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-35-spec.k new file mode 100644 index 00000000000..accc587764e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-35-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-35-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-36-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-36-spec.k new file mode 100644 index 00000000000..ae220ec85b5 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-36-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-36-SPEC + imports SET-TESTS + + claim union ( Z:MyId in ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) ) => . requires Z =/=K Y andBool Z =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-6-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-6-spec.k new file mode 100644 index 00000000000..35e928a689f --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-6-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-6-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires Y =/=K X + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-7-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-7-spec.k new file mode 100644 index 00000000000..e3f1e1dc87e --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-7-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-7-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires Y in S + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-8-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-8-spec.k new file mode 100644 index 00000000000..0e5fcd27098 --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-8-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-8-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires notBool (Y in S) + +endmodule diff --git a/pyk/regression-new/set-symbolic-tests/unsimplified/union-9-spec.k b/pyk/regression-new/set-symbolic-tests/unsimplified/union-9-spec.k new file mode 100644 index 00000000000..a391427ed5a --- /dev/null +++ b/pyk/regression-new/set-symbolic-tests/unsimplified/union-9-spec.k @@ -0,0 +1,11 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +// generated by gen-tests.sh + +requires "set-tests.k" + +module UNION-9-SPEC + imports SET-TESTS + + claim union ( (S SetItem(X:MyId)) |Set SetItem(Y:MyId) ) => . requires notBool (Y in S) andBool Y =/=K X + +endmodule diff --git a/pyk/regression-new/set_unification/Makefile b/pyk/regression-new/set_unification/Makefile new file mode 100644 index 00000000000..26adbf21648 --- /dev/null +++ b/pyk/regression-new/set_unification/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +KOMPILE_BACKEND?=haskell +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/set_unification/a-spec.k b/pyk/regression-new/set_unification/a-spec.k new file mode 100644 index 00000000000..437b9fb31de --- /dev/null +++ b/pyk/regression-new/set_unification/a-spec.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "test.k" + +module A-SPEC + imports TEST + + claim + start(I) => end ... + ... (.Set => SetItem(I +Int 1) ?_:Set) ... + + claim + mid(I) => end ... + ... SetItem(I) (.Set => SetItem(I +Int 1) ?_:Set) ... + [trusted] +endmodule diff --git a/pyk/regression-new/set_unification/a-spec.k.out b/pyk/regression-new/set_unification/a-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/set_unification/a-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/set_unification/test.k b/pyk/regression-new/set_unification/test.k new file mode 100644 index 00000000000..bcc62fb353d --- /dev/null +++ b/pyk/regression-new/set_unification/test.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + + configuration + $PGM:Pgm + .Set + + syntax Pgm ::= start(Int) + | mid(Int) + | "end" + + rule + start(I) => mid(I) ... + ... .Set => SetItem(I) ... +endmodule diff --git a/pyk/regression-new/simp-haskell/1.a b/pyk/regression-new/simp-haskell/1.a new file mode 100644 index 00000000000..71cb16abe64 --- /dev/null +++ b/pyk/regression-new/simp-haskell/1.a @@ -0,0 +1 @@ +abs(0) diff --git a/pyk/regression-new/simp-haskell/1.a.out b/pyk/regression-new/simp-haskell/1.a.out new file mode 100644 index 00000000000..cafc900234c --- /dev/null +++ b/pyk/regression-new/simp-haskell/1.a.out @@ -0,0 +1,3 @@ + + 0 ~> .K + diff --git a/pyk/regression-new/simp-haskell/Makefile b/pyk/regression-new/simp-haskell/Makefile new file mode 100644 index 00000000000..0f55585a4ba --- /dev/null +++ b/pyk/regression-new/simp-haskell/Makefile @@ -0,0 +1,7 @@ +DEF=a +EXT=a +TESTDIR=. +KOMPILE_BACKEND=haskell +KOMPILE_FLAGS=--syntax-module A + +include ../include/ktest.mak diff --git a/pyk/regression-new/simp-haskell/a.k b/pyk/regression-new/simp-haskell/a.k new file mode 100644 index 00000000000..1a762aa7248 --- /dev/null +++ b/pyk/regression-new/simp-haskell/a.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A + imports INT + syntax Int ::= abs(Int) [function, total] + | "error" [function, total] + rule abs(X:Int) => X:Int requires X >Int 0 + rule abs(X) => 0 -Int X [owise] + + rule abs(0) => error [simplification] + + configuration $PGM:Int +endmodule diff --git a/pyk/regression-new/skipped b/pyk/regression-new/skipped new file mode 100644 index 00000000000..5a4740a9d08 --- /dev/null +++ b/pyk/regression-new/skipped @@ -0,0 +1,211 @@ +amb-rew +append +array-haskell +bad-bytes-literal +bad-flags +bison-glr-bug +bison-parser-library +bit-range-llvm +boundary-cells-opt +bracket-priority +bytes-coverage +bytes-haskell +bytes-literal +bytes-llvm +bytes-memset +cast +cast-kitem +cell-bag-sort-llvm +cell_map +cell-sort-haskell +checkClaimError +checks +checkWarns +concrete-function +concrete-function-cache +concrete-haskell +configuration-composition +configuration-formatting +constant-folding +context-alias +context-alias-2 +context-alias-3 +context-cell +context-labels +coverage +domains-lemmas-no-smt +domains-lemmas-smt +doubleinj +equals-formatting +equals-pattern +excludedModuleAtts +exit-code-no-gen-top +f32-mul +fatalWarnings +ffi-llvm +float-id +fresh1 +fresh2 +fresh3 +fun-llvm +glr +glr2 +glr3 +glr4 +group +help +imp-haskell +imp-json +imp-kore +imp++-llvm +imp-llvm +int-llvm +io-llvm +issue-1088 +issue-1090 +issue-1098 +issue-1145 +issue-1169 +issue-1175 +issue-1184 +issue-1186 +issue-1193 +issue-1263 +issue-1273 +issue-1372 +issue-1384 +issue-1388 +issue-1436 +issue-1472-unboundVars +issue-1489-claimLoc +issue-1528 +issue-1545-func-in-simplification +issue-1572 +issue-1573 +issue-1602 +issue-1633 +issue-1676-koreBytes +issue-1682-korePrettyPrint +issue-1683-cfgVarsWarns +issue-1760 +issue-1789-rhsOr +issue-1844-noPGM +issue-1879-kproveTrans +issue-1952 +issue-2075 +issue-2075-2 +issue-2114 +issue-2142-markConcrete +issue-2146-duplicateModules +issue-2174-kprovexParseError +issue-2273 +issue-2287-simpl-rules-in-kprovex +issue-2315-id-quotes +issue-2321-kprovexCrash +issue-2356-koreDecode +issue-2812-kprove-filter-claims +issue-2909-allow-anywhere-haskell +issue-3035-antileft +issue-313 +issue-3285-nonexistent-concrete-rule +issue-3385 +issue-3446 +issue-3450-kprove-fresh +issue-3520-freshConfig +issue-3604-counterCell +issue-3647-debugTokens +issue-3672-debugParse +issue-3996-unary-symbol-list +issue-425 +issue-567 +issue-582 +issue-946 +issue-999 +ite-bug +itp +json-input +kast-bison +kast-bison-bytes +kast-default-output +kast-input +kast-kore-input +kast-rule +kdep-options +kompiled-directory +kore-brackets +kore-issue-2253 +kprove-append +kprove-branchingAllowed +kprove-error-status +kprove-java +kprove-macro-exp +kprove-macro-exp-productions +kprove-markdown +kprove-smt-lemma +kprove-var-equals +krun-deserialize +let-priority +let-test +list-in-bug +llvm-kompile-type +llvm-krun +llvm-string2base +locations +locations2 +locations3 +lub +lub2 +macro_vars +macro_vars-productions +map-symbolic-tests-haskell +markdownSelectors +minimization-issue +mint-llvm +mutable-bytes +no-dup-rules +nomain +non-executable +nonexhaustive +no-pattern +or-haskell +or-llvm +overload +owise-haskell +parse-c +parseNonPgm +pattern-macro +pattern-macro-productions +pedanticAttributes +pl-tutorial +poly-kitem +poly-sort +poly-unparsing +prelude-warnings +profile +proof-instrumentation +proof-tests +quadratic-poly-unparsing +rand +rangemap-tests-llvm +rat +record-llvm +search-bound +seqstrict-predicate +set-symbolic-tests +set_unification +simp-haskell +skipped +spec-rule-application +star-multiplicity +stringbuffer-llvm +string_escape +synonym +trace +unification-lemmas +unification-lemmas2 +union +unparseKORE +useless +werrorCategory +withConfig2 +withConfig-llvm diff --git a/pyk/regression-new/spec-rule-application/Makefile b/pyk/regression-new/spec-rule-application/Makefile new file mode 100644 index 00000000000..ab57305c905 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/Makefile @@ -0,0 +1,8 @@ +DEF=def +EXT=a +KOMPILE_FLAGS=--syntax-module DEF +KOMPILE_BACKEND?=haskell + +TESTDIR=. + +include ../include/ktest.mak diff --git a/pyk/regression-new/spec-rule-application/def.k b/pyk/regression-new/spec-rule-application/def.k new file mode 100644 index 00000000000..a00a508d085 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def.k @@ -0,0 +1,34 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module DEF + imports INT + imports BOOL + + syntax Term ::= "start" Int + | "mid" Int + | "end" Int + | "aux" Term //use to control level of nesting + | "binop" Term Term + | Int + + configuration + $PGM:K + 0:Term + + + rule start X => mid X + + syntax Int ::= inc(Int) [function] + rule inc(X) => X +Int 1 + + syntax Int ::= incPos(Int) [function] + rule incPos(X) => X +Int 1 + requires X >=Int 0 + + rule (X +Int A) +Int B => X +Int (A +Int B) [simplification] + rule (X +Int A) -Int B => X +Int (A -Int B) [simplification] + rule (X -Int A) +Int B => X +Int (B -Int A) + requires B =/=Int 0 [simplification] + rule X +Int (A -Int X) => A [simplification] + rule X +Int 0 => X + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def01-spec.k b/pyk/regression-new/spec-rule-application/def01-spec.k new file mode 100644 index 00000000000..aaf450c06b2 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def01-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// inc(Y) in pattern LHS. Function with no side conditions. +module DEF01-SPEC + imports DEF + + claim start X => end X +Int 1 + _ + requires X >=Int 0 + + claim mid Y => end inc(Y) + _ + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def01-spec.k.out b/pyk/regression-new/spec-rule-application/def01-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def01-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def02-spec.k b/pyk/regression-new/spec-rule-application/def02-spec.k new file mode 100644 index 00000000000..1390acd4243 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def02-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// `requires Z ==Int incPos(Y)` - Function in requires, used in RHS. Does not affect matching. +module DEF02-SPEC + imports DEF + + claim start X => end X +Int 1 + _ + requires X >=Int 0 + + claim mid Y => end Z + _ + requires Z ==Int incPos(Y) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def02-spec.k.out b/pyk/regression-new/spec-rule-application/def02-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def02-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def031-spec.k b/pyk/regression-new/spec-rule-application/def031-spec.k new file mode 100644 index 00000000000..44b9b757db4 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def031-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X = Y, `mid Y => end incPos(Y)` - Function in pattern RHS. +module DEF031-SPEC + imports DEF + + claim start X => end X +Int 1 + _ + requires X >=Int 0 + + claim mid Y => end incPos(Y) + _ + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def031-spec.k.out b/pyk/regression-new/spec-rule-application/def031-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def031-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def032-spec.k b/pyk/regression-new/spec-rule-application/def032-spec.k new file mode 100644 index 00000000000..6465e7f2d76 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def032-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X = Y-1, `mid Y => end incPos(Y)` - Function in pattern RHS. +module DEF032-SPEC + imports DEF + + claim start X => end X +Int 2 + _ + requires X >=Int 0 + + claim mid Y -Int 1 => end incPos(Y) + _ + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def032-spec.k.out b/pyk/regression-new/spec-rule-application/def032-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def032-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def033-spec.k b/pyk/regression-new/spec-rule-application/def033-spec.k new file mode 100644 index 00000000000..a6fb4ae76e7 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def033-spec.k @@ -0,0 +1,16 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X+1 = Y, `mid Y => end incPos(Y)` - Function in pattern RHS. +module DEF033-SPEC + imports DEF + + claim start X +Int 1 => end X +Int 2 + _ + requires X >=Int 0 + + claim mid Y => end incPos(Y) + _ + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def033-spec.k.out b/pyk/regression-new/spec-rule-application/def033-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def033-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def11-spec.k b/pyk/regression-new/spec-rule-application/def11-spec.k new file mode 100644 index 00000000000..2bc0f70541a --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def11-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y (in pattern) matching. +// inc(Y) in pattern LHS. Function with no side conditions. Evaluation required for planned matching. +module DEF11-SPEC + imports DEF + + claim start X => end X + _ + requires X >=Int 0 + + claim mid inc(Y) -Int 1 => end Y + _ + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def11-spec.k.out b/pyk/regression-new/spec-rule-application/def11-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def11-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def12-spec.k b/pyk/regression-new/spec-rule-application/def12-spec.k new file mode 100644 index 00000000000..f9f6f197fdb --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def12-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y (in pattern) matching. +// `requires Z ==Int incPos(Y)` - Function in requires, used in another cell in LHS. +module DEF12-SPEC + imports DEF + + claim start X => end X + X +Int 2 + requires X >=Int 0 + + claim mid Y => end Y + Z +Int 1 + requires Z ==Int incPos(Y) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def12-spec.k.out b/pyk/regression-new/spec-rule-application/def12-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def12-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def13-spec.k b/pyk/regression-new/spec-rule-application/def13-spec.k new file mode 100644 index 00000000000..5375cceb265 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def13-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y (in pattern) matching. +// `requires Y ==Int incPos(Y) -Int 1` - Function in requires, used in LHS, same var as one matched in LHS. +module DEF13-SPEC + imports DEF + + claim start X => end X + _ + requires X >=Int 0 + + claim mid Y => end Y + _ + requires Y ==Int incPos(Y) -Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def13-spec.k.out b/pyk/regression-new/spec-rule-application/def13-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def13-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def14-spec.k b/pyk/regression-new/spec-rule-application/def14-spec.k new file mode 100644 index 00000000000..240defee176 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def14-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y (in pattern) matching. +// ` incPos(Y) +Int 1 ` - Function directly in another cell in LHS. +module DEF14-SPEC + imports DEF + + claim start X => end X + X +Int 2 + requires X >=Int 0 + + claim mid Y => end Y + incPos(Y) +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def14-spec.k.out b/pyk/regression-new/spec-rule-application/def14-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def14-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def15-spec.k b/pyk/regression-new/spec-rule-application/def15-spec.k new file mode 100644 index 00000000000..359bba3f98c --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def15-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y (in pattern) matching. +// `requires incPos(Y) ==Int Y +Int 1` - Function in requires that is not substitution. +module DEF15-SPEC + imports DEF + + claim start X => end X + _ + requires X >=Int 0 + + claim mid Y => end Y + _ + requires incPos(Y) ==Int Y +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def15-spec.k.out b/pyk/regression-new/spec-rule-application/def15-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def15-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def21-spec.k b/pyk/regression-new/spec-rule-application/def21-spec.k new file mode 100644 index 00000000000..0a20933613f --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def21-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X+1 (in term) = Y (in pattern) matching. +// inc(Y) in pattern LHS. Function with no side conditions. Evaluation required for planned matching. +module DEF21-SPEC + imports DEF + + claim start X +Int 1 => end X +Int 1 + _ + requires X >=Int 0 + + claim mid inc(Y) -Int 1 => end Y + _ + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def21-spec.k.out b/pyk/regression-new/spec-rule-application/def21-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def21-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def22-spec.k b/pyk/regression-new/spec-rule-application/def22-spec.k new file mode 100644 index 00000000000..b2349f34729 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def22-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X+1 (in term) = Y (in pattern) matching. +//`requires Z ==Int incPos(Y)` - Function in requires, used in another cell in LHS. +module DEF22-SPEC + imports DEF + + claim start X +Int 1 => end X + X +Int 3 + requires X >=Int 0 + + claim mid Y => end Y -Int 1 + Z +Int 1 + requires Z ==Int incPos(Y) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def22-spec.k.out b/pyk/regression-new/spec-rule-application/def22-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def22-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def23-spec.k b/pyk/regression-new/spec-rule-application/def23-spec.k new file mode 100644 index 00000000000..0542653ce95 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def23-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X+1 (in term) = Y (in pattern) matching. +// `requires Y ==Int incPos(Y) -Int 1` - Function in requires, used in LHS, same var as one matched in LHS. +module DEF23-SPEC + imports DEF + + claim start X +Int 1 => end X + _ + requires X >=Int 0 + + claim mid Y => end Y -Int 1 + _ + requires Y ==Int incPos(Y) -Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def23-spec.k.out b/pyk/regression-new/spec-rule-application/def23-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def23-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def24-spec.k b/pyk/regression-new/spec-rule-application/def24-spec.k new file mode 100644 index 00000000000..5d0b751f2cd --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def24-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X+1 (in term) = Y (in pattern) matching. +// ` incPos(Y) +Int 1 ` - Function directly in another cell in LHS. +module DEF24-SPEC + imports DEF + + claim start X +Int 1 => end X + X +Int 3 + requires X >=Int 0 + + claim mid Y => end Y -Int 1 + incPos(Y) +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def24-spec.k.out b/pyk/regression-new/spec-rule-application/def24-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def24-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def25-spec.k b/pyk/regression-new/spec-rule-application/def25-spec.k new file mode 100644 index 00000000000..be8ee95aca6 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def25-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X+1 (in term) = Y (in pattern) matching. +// `requires incPos(Y) ==Int Y +Int 1` - Function in requires that is not substitution. +module DEF25-SPEC + imports DEF + + claim start X +Int 1 => end X +Int 1 + _ + requires X >=Int 0 + + claim mid Y => end Y + _ + requires incPos(Y) ==Int Y +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def25-spec.k.out b/pyk/regression-new/spec-rule-application/def25-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def25-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def41-spec.k b/pyk/regression-new/spec-rule-application/def41-spec.k new file mode 100644 index 00000000000..5dad6880cd6 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def41-spec.k @@ -0,0 +1,23 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +/* +Part 4. Substitutions of RHS vars must be preferred over LHS vars, for cases var = term +============== + - e.g. if we have to chose between LHSVar = term and RHSVar = term, RHSVar must be preferred. +41. Unifying equalities + RHSVar = term in , has priority + LHSVar = term in +*/ +module DEF41-SPEC + imports DEF + + claim start X -Int 1 => end X -Int 1 + X + requires X -Int 1 >=Int 0 + + claim mid Y => end Y + incPos(Y) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def41-spec.k.out b/pyk/regression-new/spec-rule-application/def41-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def41-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def42-spec.k b/pyk/regression-new/spec-rule-application/def42-spec.k new file mode 100644 index 00000000000..24eaa280888 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def42-spec.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +/* +Part 4. Substitutions of RHS vars must be preferred over LHS vars, for cases var = term +============== + - e.g. if we have to chose between LHSVar = term and RHSVar = term, RHSVar must be preferred. + +42. Unifying equalities + LHSVar = term in , has priority + RHSVar = term in +*/ +module DEF42-SPEC + imports DEF + + claim start X => end X + X -Int 1 + requires X -Int 1 >=Int 0 + + claim mid incPos(Y) => end Y +Int 1 + Y + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def42-spec.k.out b/pyk/regression-new/spec-rule-application/def42-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def42-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def44-spec.k b/pyk/regression-new/spec-rule-application/def44-spec.k new file mode 100644 index 00000000000..4b36a4cf5e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def44-spec.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// 2 equalities can generate mutually exclusive substitutions. +// Situation similar to what is found in ERC2.0 high-level contract +// k : X matches incPos(Y) -Int 1 +// var: X matches Y - should have priority +module DEF44-SPEC + imports DEF + + claim start X => end X + X + requires X >=Int 0 + + claim mid incPos(Y) -Int 1 => end Y + Y + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def44-spec.k.out b/pyk/regression-new/spec-rule-application/def44-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def44-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def45-spec.k b/pyk/regression-new/spec-rule-application/def45-spec.k new file mode 100644 index 00000000000..6c1e12b4970 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def45-spec.k @@ -0,0 +1,19 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// 2 equalities can generate mutually exclusive substitutions. +// Situation similar to what is found in ERC2.0 high-level contract +// k : X matches incPos(Y) -Int 1 +// var: X matches Y - should have priority +module DEF45-SPEC + imports DEF + + claim start X => end X + X + requires X >=Int 0 + + claim mid Y => end Y + incPos(Y) -Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def45-spec.k.out b/pyk/regression-new/spec-rule-application/def45-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def45-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def61-spec.k b/pyk/regression-new/spec-rule-application/def61-spec.k new file mode 100644 index 00000000000..345e7cc9a9b --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def61-spec.k @@ -0,0 +1,24 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +/* +Part 6. Term must be always simplified/evaluated under current constraint. +============== +61. + k: X1 matches Y1 + var part 1: X2 matches incPos(Y2) + var part 2: X2 - 1 matches Y2 +Int (incPos(Y1) -Int Y1 -Int 1) - Evaluates to Y2. Must be preferred over c2. +*/ +module DEF61-SPEC + imports DEF + + claim start X1 => end X1 + binop X2 (X2 -Int 1) + requires X1 >=Int 0 + andBool X2 -Int 1 >=Int 0 + + claim mid Y1 => end Y1 + binop incPos(Y2) (Y2 +Int (incPos(Y1) -Int Y1 -Int 1)) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def61-spec.k.out b/pyk/regression-new/spec-rule-application/def61-spec.k.out new file mode 100644 index 00000000000..556bdfefb24 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def61-spec.k.out @@ -0,0 +1,34 @@ + #Not ( #Exists Y2 . #Ceil ( incPos ( Y2 ) ) + #And + { + X2 + #Equals + incPos ( Y2 ) + } + #And + { + Y2 + #Equals + incPos ( Y2 ) +Int -1 + } ) +#And + + + mid X1 ~> .K + + + binop X2:Int X2 +Int -1 + + +#And + { + true + #Equals + X1 >=Int 0 + } +#And + { + true + #Equals + X2 +Int -1 >=Int 0 + } diff --git a/pyk/regression-new/spec-rule-application/def62-spec.k b/pyk/regression-new/spec-rule-application/def62-spec.k new file mode 100644 index 00000000000..4b69a484d74 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def62-spec.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +/* +Part 6. Term must be always simplified/evaluated under current constraint. +============== +62. + k: X1 matches Y1 + var part 2: X2 - 1 matches Y2 +Int (incPos(Y1) -Int Y1 -Int 1) - Evaluates to Y2. Must be preferred over c2. + var part 1: X2 matches incPos(Y2) + Same result. +*/ +module DEF62-SPEC + imports DEF + + claim start X1 => end X1 + binop (X2 -Int 1) X2 + requires X1 >=Int 0 + andBool X2 -Int 1 >=Int 0 + + claim mid Y1 => end Y1 + binop (Y2 +Int (incPos(Y1) -Int Y1 -Int 1)) incPos(Y2) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def62-spec.k.out b/pyk/regression-new/spec-rule-application/def62-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def62-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def71-spec.k b/pyk/regression-new/spec-rule-application/def71-spec.k new file mode 100644 index 00000000000..bf613d654e9 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def71-spec.k @@ -0,0 +1,25 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +/* +Part 7: Unification (with function evaluation) must be preferred over substitution, after each substituted var. +============== +71. + k: X1 matches (Y2 +Int (incPos(Y1) -Int Y1 -Int 1)), will get evaluated to Y2 + - 2nd substitution to be extracted. + var part 1: X1 matches Y1 - first substitution to be extracted + var part 2: X1+1 matches incPos(Y2) + - RHS can be evaluated only when Y1 is substituted by X1, and Y2 is substituted by X1. +*/ +module DEF71-SPEC + imports DEF + + claim start X1 => end X1 + binop X1 X1 +Int 1 + requires X1 >=Int 0 + + claim mid (Y2 +Int (incPos(Y1) -Int Y1 -Int 1)) => end Y2 + binop Y1 incPos(Y2) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def71-spec.k.out b/pyk/regression-new/spec-rule-application/def71-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def71-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/spec-rule-application/def81-spec.k b/pyk/regression-new/spec-rule-application/def81-spec.k new file mode 100644 index 00000000000..e6cb412ca6d --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def81-spec.k @@ -0,0 +1,27 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +/* +Part 8. Initial simplification must have access to pattern constraint (e.g. spec rule side condition), + otherwise generated substitutions are sub-optimal. +============== +81. + k: X +Int 1 matches Y2 -Int 1 + var part 1: X matches Y1 -Int 1 + var part 2: X +Int 1 matches incPos(Y1) -Int 1 + pattern requires: Y2 == Y1 +Int 1 + +*/ +module DEF81-SPEC + imports DEF + + claim start X +Int 1 => end X +Int 1 + binop X (X +Int 1) + requires X >=Int 0 + + claim mid Y2 -Int 1 => end Y2 -Int 1 + binop (Y1 -Int 1) (incPos(Y1) -Int 1) + requires Y2 ==Int Y1 +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/def81-spec.k.out b/pyk/regression-new/spec-rule-application/def81-spec.k.out new file mode 100644 index 00000000000..8c34995a4aa --- /dev/null +++ b/pyk/regression-new/spec-rule-application/def81-spec.k.out @@ -0,0 +1,28 @@ + #Not ( #Exists Y1 . #Ceil ( incPos ( Y1 ) ) + #And + { + X + #Equals + Y1 +Int -1 + } + #And + { + Y1 + #Equals + incPos ( Y1 ) +Int -1 + } ) +#And + + + mid X +Int 1 ~> .K + + + binop X:Int X +Int 1 + + +#And + { + true + #Equals + X >=Int 0 + } diff --git a/pyk/regression-new/spec-rule-application/fail/def32-spec.k b/pyk/regression-new/spec-rule-application/fail/def32-spec.k new file mode 100644 index 00000000000..7ca490eb0c3 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/fail/def32-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y-1 (in pattern) matching. +// `requires Z ==Int incPos(Y)` - Function in requires, used in another cell in LHS. +module DEF32-SPEC + imports DEF + + rule start X => end X + X +Int 3 + requires X >=Int 0 + + rule mid Y -Int 1 => end Y -Int 1 + Z +Int 1 + requires Z ==Int incPos(Y) + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/fail/def33-spec.k b/pyk/regression-new/spec-rule-application/fail/def33-spec.k new file mode 100644 index 00000000000..5c30c7dd656 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/fail/def33-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y-1 (in pattern) matching. +// `requires Y ==Int incPos(Y) -Int 1` - Function in requires, used in LHS, same var as one matched in LHS. +module DEF33-SPEC + imports DEF + + rule start X => end X + _ + requires X >=Int 0 + + rule mid Y -Int 1 => end Y -Int 1 + _ + requires Y ==Int incPos(Y) -Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/fail/def34-spec.k b/pyk/regression-new/spec-rule-application/fail/def34-spec.k new file mode 100644 index 00000000000..fdd9c0ab0ba --- /dev/null +++ b/pyk/regression-new/spec-rule-application/fail/def34-spec.k @@ -0,0 +1,17 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y-1 (in pattern) matching. +// ` incPos(Y) +Int 1 ` - Function directly in another cell in LHS. +module DEF34-SPEC + imports DEF + + rule start X => end X + X +Int 2 + requires X >=Int 0 + + rule mid Y -Int 1 => end Y -Int 1 + incPos(Y) +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/fail/def35-spec.k b/pyk/regression-new/spec-rule-application/fail/def35-spec.k new file mode 100644 index 00000000000..65f4b8be024 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/fail/def35-spec.k @@ -0,0 +1,18 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "def.k" + +// X (in term) = Y-1 (in pattern) matching. +// `requires incPos(Y) ==Int Y +Int 1` - Function in requires that is not substitution. +module DEF35-SPEC + imports DEF + + rule start X => end X + _ + requires X >=Int 0 + + rule mid Y -Int 1 => end Y -Int 1 + _ + requires incPos(Y) ==Int Y +Int 1 + [trusted] + +endmodule diff --git a/pyk/regression-new/spec-rule-application/test plan.txt b/pyk/regression-new/spec-rule-application/test plan.txt new file mode 100644 index 00000000000..93c6ca3ce91 --- /dev/null +++ b/pyk/regression-new/spec-rule-application/test plan.txt @@ -0,0 +1,117 @@ +Section I. Main test suite, that doesn't target specific formula simplification scenarios +================================================== + +Part 0. X (in term) = Y (in pattern) matching. Function evaluation for pattern RHS. +============== +01. inc(Y) in pattern LHS. Function with no side conditions. +02. `requires Z ==Int incPos(Y)` - Function in requires, used in RHS. Does not affect matching. +031. X = Y, `mid Y => end incPos(Y)` - Function in pattern RHS. +032. X = Y-1, `mid Y => end incPos(Y)` - Function in pattern RHS. +033. X+1 = Y, `mid Y => end incPos(Y)` - Function in pattern RHS. + +Part 1. X (in term) = Y (in pattern) matching. +============== +11. inc(Y) in pattern LHS. Function with no side conditions. Evaluation required for planned matching. +12. `requires Z ==Int incPos(Y)` - Function in requires, used in another cell in LHS. +13. `requires Y ==Int incPos(Y) -Int 1` - Function in requires, used in LHS, same var as one matched in LHS. +14. ` incPos(Y) +Int 1 ` - Function directly in another cell in LHS. +15. `requires incPos(Y) ==Int Y +Int 1` - Function in requires that is not substitution. + +Part 2. X+1 (in term) = Y (in pattern) matching. +============== +21. `inc(Y)`` in pattern LHS. Function with no side conditions. Evaluation required for planned matching. +22. `requires Z ==Int incPos(Y)` - Function in requires, used in another cell in LHS. +23. `requires Y ==Int incPos(Y) -Int 1` - Function in requires, used in LHS, same var as one matched in LHS. +24. ` incPos(Y) +Int 1 ` - Function directly in another cell in LHS. +25. `requires incPos(Y) ==Int Y +Int 1` - Function in requires that is not substitution. + +Part 3. X (in term) = Y-1 (in pattern) matching. +Not supported by kprove. Adding here just as documentation. +============== +32. `requires Z ==Int incPos(Y)` - Function in requires, used in another cell in LHS. +33. `requires Y ==Int incPos(Y) -Int 1` - Function in requires, used in LHS, same var as one matched in LHS. +34. ` incPos(Y) +Int 1 ` - Function directly in another cell in LHS. +35. `requires incPos(Y) ==Int Y +Int 1` - Function in requires that is not substitution. + +Part 3 fails, because equality X = Y-1 cannot be used to evaluate incPos(). + - It cannot be used as substitution, because X is a variable in implication LHS and RHS, and you cannot + apply a substitution from RHS to both LHS and RHS. + - It cannot be used as equality when evaluating side condition of incPos() either, + because you cannot use one part of not-yet-proved matching constraint to evaluate another part. + - This would pass, if incPos() would be translated to Z3 as smt-lemma. + + +Section II. Testing specific optimizations of ConjunctiveFormula simplification algorithm +================================================== + +Part 4. Substitutions of RHS vars must be preferred over LHS vars. +============== +cases var = term: + - e.g. if we have to chose between LHSVar = term and RHSVar = term, RHSVar must be preferred. +41. Unifying equalities + RHSVar = term in , has priority + LHSVar = term in + +42. Unifying equalities + LHSVar = term in , has priority + RHSVar = term in + +cases var = var: + - e.g. if we have to chose between LHSVar = RHSVar and RHSVar = LHSVar, RHSVar=LHSVar must be preferred. +43. Unifying equalities + LHSVar = RHSVar in . + - matching constraint gets proved only for version RHSVar=LHSVar, not for the opposite. + - Already tested in test 14. + - Already works. Initially substitution is generated like LHSVar=RHSVar, but then gets reoriented in + ConjunctiveFormula.orientSubstitution(). +44. Situation similar to what is found in ERC2.0 high-level contract + k : X matches incPos(Y) -Int 1 + var: X matches Y - should have priority + +45. Inverted situation vs test 45, should pass in old implementation. + k : X matches Y + var: X matches incPos(Y) -Int 1 + +Part 5. Substitutions of the form `var = var` must be preferred over `var = term` +============== + - Cannot find any case that resembles practice, where this would be relevant. Principle above is enough. + - Skipping. + +Part 6. Term must be always simplified/evaluated under current constraint. +============== +61. + k: X1 matches Y1 + var part 1: X2 matches incPos(Y2) + var part 2: X2 - 1 matches Y2 +Int (incPos(Y1) -Int Y1 -Int 1) - Evaluates to Y2. Must be preferred over c2. + +62. + k: X1 matches Y1 + var part 2: X2 - 1 matches Y2 +Int (incPos(Y1) -Int Y1 -Int 1) - Evaluates to Y2. Must be preferred over c2. + var part 1: X2 matches incPos(Y2) + Same result. + +Part 7: Unification (with function evaluation) must be preferred over substitution, after each substituted var. +============== +71. + k: X1 matches (Y2 +Int (incPos(Y1) -Int Y1 -Int 1)), will get evaluated to Y2 + - 2nd substitution to be extracted. + var part 1: X1 matches Y1 - first substitution to be extracted + var part 2: X1+1 matches incPos(Y2) + - RHS can be evaluated only when Y1 is substituted by X1, and Y2 is substituted by X1. + + Test passes with changes for part 6 only, because substitution X1 -> Y2 is inverted by orientSubstitution() + It's either not possible or too hard to figure out a test that passes with Part 6 principle but fails with + part 7. + + +Part 8. Initial simplification must have access to pattern constraint (e.g. spec rule requires clause), + otherwise generated substitutions are sub-optimal. +============== +81. + k: X +Int 1 matches Y2 -Int 1 + var part 1: X matches Y1 -Int 1 + var part 2: X +Int 1 matches incPos(Y1) -Int 1 + pattern requires: Y2 == Y1 +Int 1 + +Test in part 8 already passes in old simplification algorithm, because spec rules are pre-processed in initialization + phase and substitutions generated by spec rule constraint are inlined at that phase. diff --git a/pyk/regression-new/star-multiplicity/1.test b/pyk/regression-new/star-multiplicity/1.test new file mode 100644 index 00000000000..e482c1d3bb9 --- /dev/null +++ b/pyk/regression-new/star-multiplicity/1.test @@ -0,0 +1 @@ +#putCells diff --git a/pyk/regression-new/star-multiplicity/1.test.out b/pyk/regression-new/star-multiplicity/1.test.out new file mode 100644 index 00000000000..72fcf775ce5 --- /dev/null +++ b/pyk/regression-new/star-multiplicity/1.test.out @@ -0,0 +1,22 @@ + + + .K + + + + + 0 + + + 1 + + + + 5 + + + 6 + + + + diff --git a/pyk/regression-new/star-multiplicity/Makefile b/pyk/regression-new/star-multiplicity/Makefile new file mode 100644 index 00000000000..3dcb5d65dc6 --- /dev/null +++ b/pyk/regression-new/star-multiplicity/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KRUN_FLAGS=--parser ./test-parser +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/star-multiplicity/test-parser b/pyk/regression-new/star-multiplicity/test-parser new file mode 100755 index 00000000000..678a0f316c3 --- /dev/null +++ b/pyk/regression-new/star-multiplicity/test-parser @@ -0,0 +1 @@ +cat "$1" | kast - --output kore diff --git a/pyk/regression-new/star-multiplicity/test.k b/pyk/regression-new/star-multiplicity/test.k new file mode 100644 index 00000000000..12ab08d96d2 --- /dev/null +++ b/pyk/regression-new/star-multiplicity/test.k @@ -0,0 +1,26 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + + configuration + $PGM:K + + + 0 + 0 + + + + syntax CellCell ::= #makeCell( Int, Int ) [function] + // ----------------------------------------------- + rule #makeCell( X, Y ) => ( X Y ) + + syntax KItem ::= "#putCells" + // ---------------------------- + rule #putCells => .K ... + + (.Bag => #makeCell(0, 1)) + (.Bag => 5 6 ) + ... + +endmodule diff --git a/pyk/regression-new/string_escape/1.a b/pyk/regression-new/string_escape/1.a new file mode 100644 index 00000000000..d50921d3830 --- /dev/null +++ b/pyk/regression-new/string_escape/1.a @@ -0,0 +1 @@ +unescape("\"B\\61\\72\"") diff --git a/pyk/regression-new/string_escape/1.a.out b/pyk/regression-new/string_escape/1.a.out new file mode 100644 index 00000000000..4551b85ab88 --- /dev/null +++ b/pyk/regression-new/string_escape/1.a.out @@ -0,0 +1,3 @@ + + "Bar" ~> .K + diff --git a/pyk/regression-new/string_escape/Makefile b/pyk/regression-new/string_escape/Makefile new file mode 100644 index 00000000000..98e6b7a17fc --- /dev/null +++ b/pyk/regression-new/string_escape/Makefile @@ -0,0 +1,6 @@ +DEF=a +EXT=a +TESTDIR=. +KOMPILE_FLAGS=--syntax-module A + +include ../include/ktest.mak diff --git a/pyk/regression-new/string_escape/a.k b/pyk/regression-new/string_escape/a.k new file mode 100644 index 00000000000..0d59e1ccedf --- /dev/null +++ b/pyk/regression-new/string_escape/a.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module A + imports DOMAINS + imports STRING-BUFFER + syntax String ::= unescape(String) [function] + | unescape(String, Int, StringBuffer) [function, klabel(unescapeAux)] + // ------------------------------------------------------------------------------------- + rule unescape(S) => unescape(S, 1, .StringBuffer) + rule unescape(S, IDX, SB) => unescape(S, IDX +Int 1, SB +String substrString(S, IDX, IDX +Int 1)) + requires IDX unescape(S, IDX +Int 3, SB +String chrChar(String2Base(substrString(S, IDX +Int 1, IDX +Int 3), 16))) + requires IDX StringBuffer2String(SB) + requires IDX ==Int lengthString(S) -Int 1 +endmodule diff --git a/pyk/regression-new/stringbuffer-llvm/1.test.out b/pyk/regression-new/stringbuffer-llvm/1.test.out new file mode 100644 index 00000000000..9ed8ffc31f3 --- /dev/null +++ b/pyk/regression-new/stringbuffer-llvm/1.test.out @@ -0,0 +1,3 @@ + + "hello world!" ~> . + diff --git a/pyk/regression-new/stringbuffer-llvm/Makefile b/pyk/regression-new/stringbuffer-llvm/Makefile new file mode 100644 index 00000000000..1dda81f9307 --- /dev/null +++ b/pyk/regression-new/stringbuffer-llvm/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=../stringbuffer +RESULTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/stringbuffer-llvm/test.k b/pyk/regression-new/stringbuffer-llvm/test.k new file mode 100644 index 00000000000..302006660e0 --- /dev/null +++ b/pyk/regression-new/stringbuffer-llvm/test.k @@ -0,0 +1,14 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports STRING-BUFFER + imports INT + + rule 0 => foo(.StringBuffer, 0) + + syntax String ::= foo(StringBuffer, Int) [function] + + rule foo(S::StringBuffer, 0) => foo(S +String "hello ", 1) + rule foo(S::StringBuffer, 1) => foo(S +String "world!", 2) + rule foo(S::StringBuffer, 2) => StringBuffer2String(S) + +endmodule diff --git a/pyk/regression-new/synonym/1.test b/pyk/regression-new/synonym/1.test new file mode 100644 index 00000000000..573541ac970 --- /dev/null +++ b/pyk/regression-new/synonym/1.test @@ -0,0 +1 @@ +0 diff --git a/pyk/regression-new/synonym/1.test.out b/pyk/regression-new/synonym/1.test.out new file mode 100644 index 00000000000..874f5de6878 --- /dev/null +++ b/pyk/regression-new/synonym/1.test.out @@ -0,0 +1,8 @@ + + + 1 ~> .K + + + 0 + + diff --git a/pyk/regression-new/synonym/Makefile b/pyk/regression-new/synonym/Makefile new file mode 100644 index 00000000000..6e966add968 --- /dev/null +++ b/pyk/regression-new/synonym/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/synonym/test.k b/pyk/regression-new/synonym/test.k new file mode 100644 index 00000000000..26032605ed2 --- /dev/null +++ b/pyk/regression-new/synonym/test.k @@ -0,0 +1,20 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "rat.md" + +module TEST + imports RAT + + syntax Wad = Rat + + syntax Ray = Rat + + configuration $PGM:K 0:Wad + + syntax Wad ::= Wad "+Wad" Wad [function] + + rule 0 => (0 +Wad 0) +Rat 1 + rule R +Wad R => R +Rat R + + syntax Foo ::= foo(Ray) + +endmodule diff --git a/pyk/regression-new/trace/1.test b/pyk/regression-new/trace/1.test new file mode 100644 index 00000000000..e5c1dcdf879 --- /dev/null +++ b/pyk/regression-new/trace/1.test @@ -0,0 +1 @@ +bar foo(34) * frob("Hello", false) diff --git a/pyk/regression-new/trace/1.test.out b/pyk/regression-new/trace/1.test.out new file mode 100644 index 00000000000..b126e2eb46e --- /dev/null +++ b/pyk/regression-new/trace/1.test.out @@ -0,0 +1,8 @@ +foo ( 34 ) +frob ( "Hello" , false ) +"builtin" +bar + foo ( 2 ) * foo ( 0 ) + + .K + diff --git a/pyk/regression-new/trace/Makefile b/pyk/regression-new/trace/Makefile new file mode 100644 index 00000000000..293d1706b22 --- /dev/null +++ b/pyk/regression-new/trace/Makefile @@ -0,0 +1,8 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +CHECK=2>&1 | diff - + +include ../include/ktest.mak diff --git a/pyk/regression-new/trace/test.k b/pyk/regression-new/trace/test.k new file mode 100644 index 00000000000..fcc89ff82aa --- /dev/null +++ b/pyk/regression-new/trace/test.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports DOMAINS + imports K-IO + + syntax Foo ::= foo(Int) + | frob(String, Bool) + + syntax Bar ::= "bar" Foo "*" Foo [format(%1%i%n%2 %3 %4)] + | "(" Bar ")" [bracket] + + rule bar F1 * F2 => + #let _ = #trace(F1) #in + (#trace(F2) ~> #trace("builtin") ~> #trace(bar foo(2) * foo(0)) ~> .K) +endmodule diff --git a/pyk/regression-new/unification-lemmas/Makefile b/pyk/regression-new/unification-lemmas/Makefile new file mode 100644 index 00000000000..6297a23ec33 --- /dev/null +++ b/pyk/regression-new/unification-lemmas/Makefile @@ -0,0 +1,5 @@ +DEF=test +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../include/ktest.mak diff --git a/pyk/regression-new/unification-lemmas/test-spec.k b/pyk/regression-new/unification-lemmas/test-spec.k new file mode 100644 index 00000000000..e92ead50c5e --- /dev/null +++ b/pyk/regression-new/unification-lemmas/test-spec.k @@ -0,0 +1,12 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST-SPEC + imports TEST + + claim makeLookup(B) => 1 ... + requires lookup(#hashedLocation(B .IntList)) ==Int 1 + andBool #rangeUInt(B) + +endmodule diff --git a/pyk/regression-new/unification-lemmas/test-spec.k.out b/pyk/regression-new/unification-lemmas/test-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/unification-lemmas/test-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/unification-lemmas/test.k b/pyk/regression-new/unification-lemmas/test.k new file mode 100644 index 00000000000..ee18bc413e8 --- /dev/null +++ b/pyk/regression-new/unification-lemmas/test.k @@ -0,0 +1,44 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module TEST-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports BOOL + imports INT + imports MAP + imports STRING + imports MAP-SYMBOLIC + + configuration $PGM:KItem + + syntax KItem ::= makeLookup(Int) + rule makeLookup(B) => lookup(#hash(B)) + + syntax Int ::= lookup(Hash) [function, no-evaluators] + | #lookupMemory ( Map , Int ) [function, total, smtlib(lookupMemory)] + syntax Int ::= "pow256" [alias] /* 2 ^Int 256 */ + rule pow256 => 115792089237316195423570985008687907853269984665640564039457584007913129639936 + + syntax KItem ::= runLemma(Int) | doneLemma(Int) + rule runLemma(T) => doneLemma(T) + + // ------------------------------------------- + syntax IntList ::= List{Int, ""} + + syntax Bool ::= #rangeUInt(Int) [function, no-evaluators] + + syntax Hash ::= #hash(Int) + | #hashedLocation( IntList ) [function] + + rule #hashedLocation( .IntList) => #hash(0) + rule #hashedLocation(OFFSET .IntList) => #hash(OFFSET) + requires #rangeUInt(OFFSET) + + rule [#lookupMemory.some]: #lookupMemory( (KEY |-> VAL:Int) _M, KEY ) => VAL modInt 256 + rule [#lookupMemory.none]: #lookupMemory( M, KEY ) => 0 requires notBool KEY in_keys(M) + //Impossible case, for completeness + rule [#lookupMemory.notInt]: #lookupMemory( (KEY |-> VAL ) _M, KEY ) => 0 requires notBool isInt(VAL) + +endmodule diff --git a/pyk/regression-new/unification-lemmas/test2-spec.k b/pyk/regression-new/unification-lemmas/test2-spec.k new file mode 100644 index 00000000000..d483337d280 --- /dev/null +++ b/pyk/regression-new/unification-lemmas/test2-spec.k @@ -0,0 +1,10 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +requires "test.k" + +module TEST2-SPEC + imports TEST + + claim runLemma ( #lookupMemory(( KEY |-> 33) (_KEY' |-> 728) (_KEY'' |-> (pow256 +Int 5)) (_KEY''' |-> "hello"), KEY) ) => doneLemma ( 33 ) ... + +endmodule diff --git a/pyk/regression-new/unification-lemmas/test2-spec.k.out b/pyk/regression-new/unification-lemmas/test2-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/unification-lemmas/test2-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/unification-lemmas2/Makefile b/pyk/regression-new/unification-lemmas2/Makefile new file mode 100644 index 00000000000..7e5cf4aff47 --- /dev/null +++ b/pyk/regression-new/unification-lemmas2/Makefile @@ -0,0 +1,5 @@ +DEF=with-config +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../include/ktest.mak diff --git a/pyk/regression-new/unification-lemmas2/owise-spec.k b/pyk/regression-new/unification-lemmas2/owise-spec.k new file mode 100644 index 00000000000..88365471238 --- /dev/null +++ b/pyk/regression-new/unification-lemmas2/owise-spec.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "with-config.k" + +module OWISE-SPEC + imports WITH-CONFIG + + claim a(AID) => 0 + + + BID + 30 + + + requires AID =/=K BID +endmodule diff --git a/pyk/regression-new/unification-lemmas2/owise-spec.k.out b/pyk/regression-new/unification-lemmas2/owise-spec.k.out new file mode 100644 index 00000000000..17a1d4510e5 --- /dev/null +++ b/pyk/regression-new/unification-lemmas2/owise-spec.k.out @@ -0,0 +1 @@ +#Top diff --git a/pyk/regression-new/unification-lemmas2/with-config.k b/pyk/regression-new/unification-lemmas2/with-config.k new file mode 100644 index 00000000000..3f358f8d18b --- /dev/null +++ b/pyk/regression-new/unification-lemmas2/with-config.k @@ -0,0 +1,44 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module WITH-CONFIG-SYNTAX +endmodule + +module WITH-CONFIG + imports WITH-CONFIG-SYNTAX + imports INT + imports COLLECTIONS + imports K-EQUAL + + configuration + + $PGM:KItem + + + .AccountId:AccountId + 0 + + + + + syntax KItem ::= Int + + syntax AccountId ::= ".AccountId" | Int + // --------------------------------------- + + syntax Int ::= "total_balance" "(" AccountId ")" [function, total] + // ----------------------------------------------------------------------- + rule total_balance(_WHO) => 0 [owise] + rule [[ total_balance(WHO) => FREE_BALANCE ]] + + WHO + FREE_BALANCE + + + // for one-spec + syntax KItem ::= "aa" "(" AccountId ")" + rule aa(AID) => total_balance(AID) + + // for owise-spec + syntax KItem ::= "a" "(" AccountId ")" + rule a(AID) => total_balance(AID) + +endmodule diff --git a/pyk/regression-new/union/Makefile b/pyk/regression-new/union/Makefile new file mode 100644 index 00000000000..68ae23318ca --- /dev/null +++ b/pyk/regression-new/union/Makefile @@ -0,0 +1,5 @@ +DEF=union +TESTDIR=. +KOMPILE_BACKEND=haskell + +include ../include/ktest.mak diff --git a/pyk/regression-new/union/test1 b/pyk/regression-new/union/test1 new file mode 100644 index 00000000000..092bc2b0412 --- /dev/null +++ b/pyk/regression-new/union/test1 @@ -0,0 +1 @@ +; diff --git a/pyk/regression-new/union/test1.out b/pyk/regression-new/union/test1.out new file mode 100644 index 00000000000..1f304fd89c9 --- /dev/null +++ b/pyk/regression-new/union/test1.out @@ -0,0 +1,3 @@ + + .Set + diff --git a/pyk/regression-new/union/test2 b/pyk/regression-new/union/test2 new file mode 100644 index 00000000000..fd1a0370b99 --- /dev/null +++ b/pyk/regression-new/union/test2 @@ -0,0 +1 @@ +1 ; diff --git a/pyk/regression-new/union/test2.out b/pyk/regression-new/union/test2.out new file mode 100644 index 00000000000..928b70859c4 --- /dev/null +++ b/pyk/regression-new/union/test2.out @@ -0,0 +1,3 @@ + + SetItem ( 1 ) + diff --git a/pyk/regression-new/union/test3 b/pyk/regression-new/union/test3 new file mode 100644 index 00000000000..61ab232007f --- /dev/null +++ b/pyk/regression-new/union/test3 @@ -0,0 +1 @@ +1 2 ; diff --git a/pyk/regression-new/union/test3.out b/pyk/regression-new/union/test3.out new file mode 100644 index 00000000000..3765dc71b0a --- /dev/null +++ b/pyk/regression-new/union/test3.out @@ -0,0 +1,4 @@ + + SetItem ( 1 ) + SetItem ( 2 ) + diff --git a/pyk/regression-new/union/test4 b/pyk/regression-new/union/test4 new file mode 100644 index 00000000000..0352049c316 --- /dev/null +++ b/pyk/regression-new/union/test4 @@ -0,0 +1 @@ +1 2 ; 3 diff --git a/pyk/regression-new/union/test4.out b/pyk/regression-new/union/test4.out new file mode 100644 index 00000000000..a88f2d746cb --- /dev/null +++ b/pyk/regression-new/union/test4.out @@ -0,0 +1,5 @@ + + SetItem ( 1 ) + SetItem ( 2 ) + SetItem ( 3 ) + diff --git a/pyk/regression-new/union/test5 b/pyk/regression-new/union/test5 new file mode 100644 index 00000000000..a1290d94910 --- /dev/null +++ b/pyk/regression-new/union/test5 @@ -0,0 +1 @@ +1 2 ; 3 4 diff --git a/pyk/regression-new/union/test5.out b/pyk/regression-new/union/test5.out new file mode 100644 index 00000000000..abce2698d2f --- /dev/null +++ b/pyk/regression-new/union/test5.out @@ -0,0 +1,6 @@ + + SetItem ( 1 ) + SetItem ( 2 ) + SetItem ( 3 ) + SetItem ( 4 ) + diff --git a/pyk/regression-new/union/test6 b/pyk/regression-new/union/test6 new file mode 100644 index 00000000000..7ac290c2b21 --- /dev/null +++ b/pyk/regression-new/union/test6 @@ -0,0 +1 @@ +1 2 ; 3 4 4 diff --git a/pyk/regression-new/union/test6.out b/pyk/regression-new/union/test6.out new file mode 100644 index 00000000000..abce2698d2f --- /dev/null +++ b/pyk/regression-new/union/test6.out @@ -0,0 +1,6 @@ + + SetItem ( 1 ) + SetItem ( 2 ) + SetItem ( 3 ) + SetItem ( 4 ) + diff --git a/pyk/regression-new/union/test7 b/pyk/regression-new/union/test7 new file mode 100644 index 00000000000..307e87c411b --- /dev/null +++ b/pyk/regression-new/union/test7 @@ -0,0 +1 @@ +1 2 3 ; 3 4 4 1 diff --git a/pyk/regression-new/union/test7.out b/pyk/regression-new/union/test7.out new file mode 100644 index 00000000000..abce2698d2f --- /dev/null +++ b/pyk/regression-new/union/test7.out @@ -0,0 +1,6 @@ + + SetItem ( 1 ) + SetItem ( 2 ) + SetItem ( 3 ) + SetItem ( 4 ) + diff --git a/pyk/regression-new/union/test8 b/pyk/regression-new/union/test8 new file mode 100644 index 00000000000..e31495b7dd5 --- /dev/null +++ b/pyk/regression-new/union/test8 @@ -0,0 +1 @@ +1 2 3 4 4 4 4 ; 3 4 4 1 diff --git a/pyk/regression-new/union/test8.out b/pyk/regression-new/union/test8.out new file mode 100644 index 00000000000..abce2698d2f --- /dev/null +++ b/pyk/regression-new/union/test8.out @@ -0,0 +1,6 @@ + + SetItem ( 1 ) + SetItem ( 2 ) + SetItem ( 3 ) + SetItem ( 4 ) + diff --git a/pyk/regression-new/union/test9 b/pyk/regression-new/union/test9 new file mode 100644 index 00000000000..ef58bccf217 --- /dev/null +++ b/pyk/regression-new/union/test9 @@ -0,0 +1 @@ +1 2 3 4 4 4 4 ; 3 4 4 1 0 diff --git a/pyk/regression-new/union/test9.out b/pyk/regression-new/union/test9.out new file mode 100644 index 00000000000..77cfa1d446f --- /dev/null +++ b/pyk/regression-new/union/test9.out @@ -0,0 +1,7 @@ + + SetItem ( 0 ) + SetItem ( 1 ) + SetItem ( 2 ) + SetItem ( 3 ) + SetItem ( 4 ) + diff --git a/pyk/regression-new/union/union.k b/pyk/regression-new/union/union.k new file mode 100644 index 00000000000..f9a373b07e4 --- /dev/null +++ b/pyk/regression-new/union/union.k @@ -0,0 +1,26 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. + +module UNION-SYNTAX + imports INT + + syntax Ints ::= List{Int,""} + syntax Pgm ::= Ints ";" Ints +endmodule + +module UNION + imports UNION-SYNTAX + imports DOMAINS + + syntax Set ::= #IntsToSet(Ints) [function, total] + syntax Set ::= #IntsToSetAux(Ints, Set) [function, total] + + rule #IntsToSet(Is) => #IntsToSetAux(Is, .Set) + rule #IntsToSetAux(.Ints, S) => S + rule #IntsToSetAux(I Is, S) => #IntsToSetAux(Is, S) requires (I in S) + rule #IntsToSetAux(I Is, S) => #IntsToSetAux(Is, SetItem(I) S) requires notBool(I in S) + + rule I1 ; I2 => #IntsToSet(I1) |Set #IntsToSet(I2) + + configuration $PGM:Pgm +endmodule + diff --git a/pyk/regression-new/unparseKORE/1.test b/pyk/regression-new/unparseKORE/1.test new file mode 100644 index 00000000000..dfb8844ccdb --- /dev/null +++ b/pyk/regression-new/unparseKORE/1.test @@ -0,0 +1 @@ +a1 a2 a2 a2 a1 diff --git a/pyk/regression-new/unparseKORE/1.test.out b/pyk/regression-new/unparseKORE/1.test.out new file mode 100644 index 00000000000..15f98988434 --- /dev/null +++ b/pyk/regression-new/unparseKORE/1.test.out @@ -0,0 +1,3 @@ + + "Lbla1'UndsUnds'TEST'Unds'A'Unds'A{}(Lbla2'UndsUnds'TEST'Unds'A'Unds'A{}(Lbla2'UndsUnds'TEST'Unds'A'Unds'A{}(Lbla2'UndsUnds'TEST'Unds'A'Unds'A{}(Lblb1{}()))))" ~> .K + diff --git a/pyk/regression-new/unparseKORE/Makefile b/pyk/regression-new/unparseKORE/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/unparseKORE/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/unparseKORE/test.k b/pyk/regression-new/unparseKORE/test.k new file mode 100644 index 00000000000..f57646f8187 --- /dev/null +++ b/pyk/regression-new/unparseKORE/test.k @@ -0,0 +1,15 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports INT + imports K-REFLECTION + +syntax A ::= "a1" A + | "a2" A + | "a1" [klabel(b1), symbol] + | "a2" [klabel(a2), symbol] + +rule a1 => #unparseKORE(a1) +rule a2 => #unparseKORE(a2) +rule a1 A => #unparseKORE(a1 A) +endmodule + diff --git a/pyk/regression-new/useless/Makefile b/pyk/regression-new/useless/Makefile new file mode 100644 index 00000000000..7c7dcd88f69 --- /dev/null +++ b/pyk/regression-new/useless/Makefile @@ -0,0 +1,4 @@ +KOMPILE_FLAGS=-w2e -w none -W useless-rule +KOMPILE_BACKEND=llvm + +include ../../../include/kframework/ktest-fail.mak diff --git a/pyk/regression-new/useless/test.k b/pyk/regression-new/useless/test.k new file mode 100644 index 00000000000..4b12fd34d4b --- /dev/null +++ b/pyk/regression-new/useless/test.k @@ -0,0 +1,94 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +requires "substitution.md" + +module TEST-SYNTAX +endmodule + +module TEST + imports TEST-SYNTAX + imports INT + imports STRING + imports BYTES + imports LIST + imports MAP + imports SET + imports FLOAT + imports BOOL + imports KVAR + imports STRING-BUFFER + +syntax Int ::= foo(Int) [function] +rule foo(A) => A +rule foo(B) => B + +syntax Int ::= foo2(Foo) [function] +syntax Foo ::= bar() | baz() + +rule foo2(bar()) => 0 +rule foo2(_) => 0 + +syntax Int ::= foo3(String) [function] +rule foo3("") => 0 +rule foo3(_) => 0 + +syntax Int ::= foo4(Bytes) [function] +rule foo4(BAR) => lengthBytes(BAR) +rule foo4(BAZ) => lengthBytes(BAZ) + +syntax Int ::= foo5(List) [function] +rule foo5(ListItem(_)) => 0 +rule foo5(ListItem(_) _) => 0 + +syntax Int ::= foo6(Map, KItem) [function] +rule foo6(X |-> _, X) => 0 +rule foo6(X |-> _ _::Map, X) => 0 + +syntax Int ::= foo7(Map) [function] +rule foo7(_ |-> _) => 0 +rule foo7(_ |-> _ _::Map) => 0 + +syntax Int ::= foo8(Map, KItem) [function] +rule foo8(X |-> _, X) => 0 +rule foo8(_ |-> _, _) => 0 +rule foo8(_ |-> _ _::Map, _) => 0 + +syntax Int ::= foo6(Set, KItem) [function] +rule foo6(SetItem(X), X) => 0 +rule foo6(SetItem(X) _, X) => 0 + +syntax Int ::= foo7(Set) [function] +rule foo7(SetItem(_)) => 0 +rule foo7(SetItem(_) _) => 0 + +syntax Int ::= foo8(Set, KItem) [function] +rule foo8(SetItem(X), X) => 0 +rule foo8(SetItem(_), _) => 0 +rule foo8(SetItem(_) _, _) => 0 + +syntax Int ::= foo10(Float) [function] +rule foo10(0.0) => 0 +rule foo10(0.0F) => 0 +rule foo10(0.0f) => 0 + +syntax Int ::= foo10a(Float) [function] +rule foo10a(0.0) => 0 +rule foo10a(0.0f) => 0 +rule foo10a(0.0p53x11) => 0 + +syntax Int ::= foo11(Bool) [function] +rule foo11(true) => 0 +rule foo11(_) => 0 + +syntax KVar ::= "x" [token] +syntax Int ::= foo12(KVar) [function] +rule foo12(x) => 0 +rule foo12(_) => 0 + +syntax Int ::= foo13(StringBuffer) [function] +rule foo13(BAR) => lengthString(StringBuffer2String(BAR)) +rule foo13(BAZ) => lengthString(StringBuffer2String(BAZ)) + +syntax Int ::= used(Foo) [function] +rule used(baz()) => 0 + +endmodule diff --git a/pyk/regression-new/useless/test.k.out b/pyk/regression-new/useless/test.k.out new file mode 100644 index 00000000000..da08a6f7e0d --- /dev/null +++ b/pyk/regression-new/useless/test.k.out @@ -0,0 +1,106 @@ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(21,6,21,17) + 21 | rule foo(A) => A + . ^~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(22,6,22,17) + 22 | rule foo(B) => B + . ^~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(27,6,27,22) + 27 | rule foo2(bar()) => 0 + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(31,6,31,19) + 31 | rule foo3("") => 0 + . ^~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(35,6,35,35) + 35 | rule foo4(BAR) => lengthBytes(BAR) + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(36,6,36,35) + 36 | rule foo4(BAZ) => lengthBytes(BAZ) + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(39,6,39,28) + 39 | rule foo5(ListItem(_)) => 0 + . ^~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(47,6,47,24) + 47 | rule foo7(_ |-> _) => 0 + . ^~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(51,6,51,27) + 51 | rule foo8(X |-> _, X) => 0 + . ^~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(52,6,52,27) + 52 | rule foo8(_ |-> _, _) => 0 + . ^~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(60,6,60,27) + 60 | rule foo7(SetItem(_)) => 0 + . ^~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(64,6,64,30) + 64 | rule foo8(SetItem(X), X) => 0 + . ^~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(65,6,65,30) + 65 | rule foo8(SetItem(_), _) => 0 + . ^~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(70,6,70,22) + 70 | rule foo10(0.0F) => 0 + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(71,6,71,22) + 71 | rule foo10(0.0f) => 0 + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(74,6,74,22) + 74 | rule foo10a(0.0) => 0 + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(76,6,76,28) + 76 | rule foo10a(0.0p53x11) => 0 + . ^~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(79,6,79,22) + 79 | rule foo11(true) => 0 + . ^~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(84,6,84,19) + 84 | rule foo12(x) => 0 + . ^~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(88,6,88,58) + 88 | rule foo13(BAR) => lengthString(StringBuffer2String(BAR)) + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Potentially useless rule detected. + Source(test.k) + Location(89,6,89,58) + 89 | rule foo13(BAZ) => lengthString(StringBuffer2String(BAZ)) + . ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +[Error] Compiler: Had 21 pattern matching errors. diff --git a/pyk/regression-new/werrorCategory/Makefile b/pyk/regression-new/werrorCategory/Makefile new file mode 100644 index 00000000000..10954764d46 --- /dev/null +++ b/pyk/regression-new/werrorCategory/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=-w2e -Wno missing-syntax-module + +include ../include/ktest.mak diff --git a/pyk/regression-new/werrorCategory/test.k b/pyk/regression-new/werrorCategory/test.k new file mode 100644 index 00000000000..7a2f8a65dc8 --- /dev/null +++ b/pyk/regression-new/werrorCategory/test.k @@ -0,0 +1,7 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + imports BOOL + + syntax Foo ::= foo() + +endmodule diff --git a/pyk/regression-new/withConfig-llvm/Makefile b/pyk/regression-new/withConfig-llvm/Makefile new file mode 100644 index 00000000000..0ef565f4b33 --- /dev/null +++ b/pyk/regression-new/withConfig-llvm/Makefile @@ -0,0 +1,7 @@ +DEF=test +EXT=test +TESTDIR=../withConfig +KOMPILE_BACKEND=llvm +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/withConfig-llvm/test.k b/pyk/regression-new/withConfig-llvm/test.k new file mode 120000 index 00000000000..97e88cda4e3 --- /dev/null +++ b/pyk/regression-new/withConfig-llvm/test.k @@ -0,0 +1 @@ +../withConfig/test.k \ No newline at end of file diff --git a/pyk/regression-new/withConfig2/1.test b/pyk/regression-new/withConfig2/1.test new file mode 100644 index 00000000000..7ed6ff82de6 --- /dev/null +++ b/pyk/regression-new/withConfig2/1.test @@ -0,0 +1 @@ +5 diff --git a/pyk/regression-new/withConfig2/1.test.out b/pyk/regression-new/withConfig2/1.test.out new file mode 100644 index 00000000000..407f78d8079 --- /dev/null +++ b/pyk/regression-new/withConfig2/1.test.out @@ -0,0 +1,5 @@ + + + 0 ~> .K + + diff --git a/pyk/regression-new/withConfig2/2.test b/pyk/regression-new/withConfig2/2.test new file mode 100644 index 00000000000..1e8b3149621 --- /dev/null +++ b/pyk/regression-new/withConfig2/2.test @@ -0,0 +1 @@ +6 diff --git a/pyk/regression-new/withConfig2/2.test.out b/pyk/regression-new/withConfig2/2.test.out new file mode 100644 index 00000000000..13c8f6aca17 --- /dev/null +++ b/pyk/regression-new/withConfig2/2.test.out @@ -0,0 +1,5 @@ + + + 7 ~> .K + + diff --git a/pyk/regression-new/withConfig2/Makefile b/pyk/regression-new/withConfig2/Makefile new file mode 100644 index 00000000000..7634e9d98ce --- /dev/null +++ b/pyk/regression-new/withConfig2/Makefile @@ -0,0 +1,6 @@ +DEF=test +EXT=test +TESTDIR=. +KOMPILE_FLAGS=--syntax-module TEST + +include ../include/ktest.mak diff --git a/pyk/regression-new/withConfig2/test.k b/pyk/regression-new/withConfig2/test.k new file mode 100644 index 00000000000..014451de3ab --- /dev/null +++ b/pyk/regression-new/withConfig2/test.k @@ -0,0 +1,21 @@ +// Copyright (c) Runtime Verification, Inc. All Rights Reserved. +module TEST + + imports INT + + configuration $PGM:K + + syntax KItem ::= freshIntx() [function] + + rule freshIntx() => !_I:Int + + rule 5 => freshIntx() + + rule 6 => test() + + syntax Int ::= test() [function] + + rule [[ test() => 7 ]] + 6 ... + +endmodule