Skip to content

Commit

Permalink
fixup! motoko-san: add test for arrays + viper lib
Browse files Browse the repository at this point in the history
  • Loading branch information
GoPavel committed Apr 26, 2024
1 parent dbf0fc1 commit 7940973
Show file tree
Hide file tree
Showing 18 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/viper/trans.ml
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ let rec extract_concurrency (seq : seqn) : stmt' list * seqn =

let prelude =
let (!!) p = !!! Source.no_region p in
[ !! (ImportI (!! "lib/array.vpr")) ]
[ !! (ImportI (!! "viper_lib/array.vpr")) ]

let rec unit (u : M.comp_unit) : prog Diag.result =
Diag.(
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion test/repl/ok/viper.stdout.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
field $message_async: Int
define $Perm($Self) ((((true && acc(($Self).claimed,write)) && acc(($Self).count,write)) &&
acc(($Self).$message_async,write)))
Expand Down
2 changes: 1 addition & 1 deletion test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ do
$ECHO -n "$base:"
[ -d $out ] || mkdir $out
[ -d $ok ] || mkdir $ok
[ -d $out/lib ] || ln -s ../../../src/viper/lib/ $out/lib
[ -d $out/viper_lib ] || ln -s ../../../src/viper/viper_lib/ $out/viper_lib

rm -rf $out/$base $out/$base.*

Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/array.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) ((((true && (acc(($Self).arr,write) && (array_acc_mut(
($Self).arr, int) && (
size(($Self).arr) == 2)))) && acc(($Self).f,write)) && acc(($Self).count,write)))
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/assertions.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
field $message_async: Int
define $Perm($Self) ((((true && acc(($Self).u,write)) && acc(($Self).v,write)) &&
acc(($Self).$message_async,write)))
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/async.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
field $message_async_4: Int
field $message_async_2: Int
field $message_async: Int
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/claim-broken.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
field $message_async: Int
define $Perm($Self) ((((true && acc(($Self).claimed,write)) && acc(($Self).count,write)) &&
acc(($Self).$message_async,write)))
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/claim-reward-naive.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (((true && acc(($Self).claimed,write)) && acc(($Self).count,write)))
define $Inv($Self) (invariant_5($Self))
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/claim-simple.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (((true && acc(($Self).claimed,write)) && acc(($Self).count,write)))
define $Inv($Self) (true)
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/claim.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
field $message_async: Int
define $Perm($Self) ((((true && acc(($Self).claimed,write)) && acc(($Self).count,write)) &&
acc(($Self).$message_async,write)))
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/counter.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) ((true && acc(($Self).count,write)))
define $Inv($Self) (true)
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/invariant.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (((true && acc(($Self).claimed,write)) && acc(($Self).count,write)))
define $Inv($Self) (((invariant_9($Self) && invariant_10($Self)) && invariant_11($Self)))
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/loop-invariant.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (true)
define $Inv($Self) (true)
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/method-call.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (true)
define $Inv($Self) (true)
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/nats.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) ((true && acc(($Self).x,write)))
define $Inv($Self) (true)
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/private.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (((true && acc(($Self).claimed,write)) && acc(($Self).count,write)))
define $Inv($Self) (invariant_7($Self))
method __init__($Self: Ref)
Expand Down
2 changes: 1 addition & 1 deletion test/viper/ok/simple-funs.vpr.ok
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import "lib/array.vpr"
import "viper_lib/array.vpr"
define $Perm($Self) (true)
define $Inv($Self) (true)
method __init__($Self: Ref)
Expand Down

0 comments on commit 7940973

Please sign in to comment.