-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Import the regression-new testsuite from K (runtimeverification/pyk#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`: runtimeverification/pyk@e33cc1f - 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 runtimeverification/pyk#958 and `regression-new/withConfig` from runtimeverification/pyk#973 are left enabled. --------- Co-authored-by: devops <devops@runtimeverification.com>
- Loading branch information
Showing
2,811 changed files
with
48,414 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
0.1.705 | ||
0.1.706 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
DEF=test | ||
EXT=test | ||
TESTDIR=. | ||
KOMPILE_FLAGS=-w2e | ||
|
||
include ../include/ktest.mak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
\dv{SortInt{}}("1")\dv{SortInt{}}("1") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
DEF=test | ||
EXT=test | ||
TESTDIR=. | ||
KOMPILE_BACKEND=llvm | ||
KOMPILE_FLAGS=--syntax-module TEST | ||
|
||
include ../include/ktest.mak | ||
|
||
KPARSE=./kparse-twice |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/usr/bin/env bash | ||
"$(dirname "$0")/../../../bin/kparse" "$@" | ||
"$(dirname "$0")/../../../bin/kparse" "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
<k> $PGM:Int </k> | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
makeArray(0, 0) [ 0 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
0 ~> .K | ||
</k> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
makeArray(0, 0) [ 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
0 ~> .K | ||
</k> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
makeArray(1, 0) [ 0 <- 1 ] [ 0 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
1 ~> .K | ||
</k> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
makeArray(1, 0) [ 0 <- 1] [ 1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
0 ~> .K | ||
</k> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
makeArray(1, 0) [0 <- 1] [ -1 ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<k> | ||
0 ~> .K | ||
</k> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DEF=test | ||
EXT=test | ||
TESTDIR=. | ||
KOMPILE_BACKEND?=haskell | ||
KOMPILE_FLAGS=--syntax-module TEST | ||
|
||
include ../include/ktest.mak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
module TEST | ||
imports DOMAINS | ||
imports ARRAY | ||
|
||
configuration <k> $PGM:K </k> | ||
|
||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
KOMPILE_FLAGS=-w none | ||
|
||
include ../../../include/kframework/ktest-fail.mak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
module QUOTE | ||
imports BYTES | ||
configuration <k> $PGM:Bool </k> | ||
|
||
rule <k> b""" => b"" </k> | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Error] Inner Parser: Scanner error: unexpected character sequence '"'. | ||
Source(quote.k) | ||
Location(6,24,6,25) | ||
6 | rule <k> b""" => b"" </k> | ||
. ^ | ||
[Error] Compiler: Had 1 parsing errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
module SLASH | ||
imports BYTES | ||
configuration <k> $PGM:Bool </k> | ||
|
||
rule <k> b"\" => b"" </k> | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Error] Inner Parser: Scanner error: unexpected character sequence '"'. | ||
Source(slash.k) | ||
Location(6,24,6,25) | ||
6 | rule <k> b"\" => b"" </k> | ||
. ^ | ||
[Error] Compiler: Had 1 parsing errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
module UNICODE-ESCAPE | ||
imports BYTES | ||
configuration <k> $PGM:Bool </k> | ||
|
||
rule <k> b"\u0012" => b"" </k> | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <k> b"\u0012" => b"" </k> | ||
. ^~~~~~~~ | ||
[Error] Compiler: Had 1 parsing errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
module UNICODE | ||
imports BYTES | ||
configuration <k> $PGM:Bool </k> | ||
|
||
rule <k> b"\x😃" => b"" </k> | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[Error] Inner Parser: Scanner error: unexpected character sequence '"'. | ||
Source(unicode.k) | ||
Location(6,15,6,16) | ||
6 | rule <k> b"\x😃" => b"" </k> | ||
. ^ | ||
[Error] Compiler: Had 1 parsing errors. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[Error] Critical: Only one main parameter allowed but found several: "--badflag" and "--extra" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[Error] Critical: You have to provide exactly one main file in order to do | ||
outer parsing. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Copyright (c) Runtime Verification, Inc. All Rights Reserved. | ||
module TEST | ||
endmodule |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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() | ||
} | ||
} |
Oops, something went wrong.