-
Notifications
You must be signed in to change notification settings - Fork 148
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into hotfix/maven-release-push
- Loading branch information
Showing
47 changed files
with
1,221 additions
and
229 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
14 changes: 14 additions & 0 deletions
14
k-distribution/tests/regression-new/checks/duplicateContextLabels.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,14 @@ | ||
// Copyright (c) K Team. 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 |
5 changes: 5 additions & 0 deletions
5
k-distribution/tests/regression-new/checks/duplicateContextLabels.k.out
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,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, _ ) | ||
. ^~~~~~~~~~~~~~~~~ |
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,19 @@ | ||
// Copyright (c) K Team. 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 | ||
<k> $PGM:Int </k> | ||
<freshFoo> !_:Foo </freshFoo> | ||
|
||
rule 0 => !_:Foo | ||
|
||
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] 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 | <freshFoo> !_:Foo </freshFoo> | ||
. ^~ |
27 changes: 27 additions & 0 deletions
27
k-distribution/tests/regression-new/context-labels/Makefile
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,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]\+]!!g' # Hacking in a sed command here to remove strings of the form '[23452]' | ||
|
||
include ../../../include/kframework/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 | ||
|
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/context-labels/barlabel.find-rule
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 @@ | ||
context.k:12 |
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/context-labels/barlabel.find-rule.out
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 @@ | ||
CONTEXT.bar1-heat |
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/context-labels/bazlabel.find-rule
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 @@ | ||
context.k:10 |
1 change: 1 addition & 0 deletions
1
k-distribution/tests/regression-new/context-labels/bazlabel.find-rule.out
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 @@ | ||
CONTEXT.baz2-heat |
13 changes: 13 additions & 0 deletions
13
k-distribution/tests/regression-new/context-labels/context-spec.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,13 @@ | ||
// Copyright (c) K Team. All Rights Reserved. | ||
requires "context.k" | ||
|
||
module CONTEXT-SPEC | ||
imports CONTEXT | ||
|
||
claim <k> foo( a, a ) => foo( 0, 0 ) ... </k> | ||
|
||
claim <k> bar( a, a ) => bar( 0, 0 ) ... </k> | ||
|
||
claim <k> baz( a, a ) => baz( a, 0 ) ... </k> | ||
|
||
endmodule |
22 changes: 22 additions & 0 deletions
22
k-distribution/tests/regression-new/context-labels/context-spec.k.in
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,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 |
Oops, something went wrong.