Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Permit array values in SampleTester #559

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ DAIKON_RESOURCE_FILES := daikon/config/example-settings.txt \
daikon/test/SampleTester.commands \
daikon/test/SampleTester.decls \
daikon/test/SampleTesterGlobal.decls \
daikon/test/SampleTester.test \
daikon/test/SampleTester.commands_linear_ternary \
daikon/test/varInfoNameTest.testEscForall \
daikon/test/varInfoNameTest.testEscForall.goal \
daikon/test/varInfoNameTest.testJML \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,11 @@ ppt: foo.f():::EXIT35
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 6 4 12
# should still be a line
assert: show_invs(x,x,z)
# assert: show_invs(x,x,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 1 5 9
# should break the line and form a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
###################
# the following does not work as planned because of zero coefficients
###################
Expand Down Expand Up @@ -84,11 +84,11 @@ ppt: foo.f():::EXIT35
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 6 6 12
# should still be a line
assert: show_invs(x,x,z)
# assert: show_invs(x,x,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 1 5 100
# should break the line and form a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
###################
# the following does not work as planned because of zero coefficients
###################
Expand Down Expand Up @@ -130,11 +130,11 @@ ppt: foo.f():::EXIT35
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 6 5 6
# should break the line and form a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, y, z);
data: 8 8 20
# should still be a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, y, z);
# should break the plane
# data: 0 0 0
Expand Down Expand Up @@ -162,11 +162,11 @@ ppt: foo.f():::EXIT35
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 3 8 10
# should break the line and form a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, y, z);
data: 8 16 20
# should still be a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, y, z);
# should break the plane
data: 0 0 0
Expand Down Expand Up @@ -195,11 +195,11 @@ ppt: foo.f():::EXIT35
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, x, z);
data: 2 3 1
# should break the line and form a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, y, z);
data: 15 15 15
# should still be a plane
assert: show_invs(x,y,z)
# assert: show_invs(x,y,z)
assert: inv(daikon.inv.ternary.threeScalar.LinearTernary, x, y, z);
# should break the plane
data: 2 3 2
Expand Down
37 changes: 29 additions & 8 deletions java/daikon/test/SampleTester.decls
Original file line number Diff line number Diff line change
Expand Up @@ -20,31 +20,31 @@ int
22

DECLARE
foo.g():::ENTER
p
foo.f():::EXIT35
x
int
int
22
q
y
int
int
22
r
z
int
int
22

DECLARE
foo.f():::EXIT35
x
foo.g():::ENTER
p
int
int
22
y
q
int
int
22
z
r
int
int
22
Expand All @@ -64,3 +64,24 @@ int
int
22

DECLARE
foo.strings():::ENTER
s
java.lang.String
java.lang.String
22
a[]
java.lang.String[]
java.lang.String[]
22[22]

DECLARE
foo.strings():::EXIT1
s
java.lang.String
java.lang.String
22
a[]
java.lang.String[]
java.lang.String[]
22[22]
Loading