File tree Expand file tree Collapse file tree 3 files changed +54
-0
lines changed
Expand file tree Collapse file tree 3 files changed +54
-0
lines changed Original file line number Diff line number Diff line change 2424 runs-on : ubuntu-latest
2525 permissions :
2626 contents : read
27+ env :
28+ COAR_IMAGE : ghcr.io/hiroshi-unno/coar@sha256:73144ed27a02b163d1a71b41b58f3b5414f12e91326015600cfdca64ff19f011
2729 steps :
2830 - uses : actions/checkout@v4
2931 - uses : ./.github/actions/setup-z3
32+ - name : Setup thrust-pcsat-wrapper
33+ run : |
34+ cat <<EOF > thrust-pcsat-wrapper
35+ #!/bin/bash
36+
37+ smt2=$(mktemp -p . --suffix .smt2)
38+ trap "rm -f $smt2" EXIT
39+ cp "$1" "$smt2"
40+ out=$(
41+ docker run --rm -v $PWD:/mnt -w /root/coar "$COAR_IMAGE"
42+ main.exe -c ./config/solver/pcsat_tbq_ar.json -p pcsp "/mnt/$smt2"
43+ )
44+ exit_code=$?
45+ echo "${out%,*}"
46+ exit "$exit_code"
47+ EOF
48+ chmod +x thrust-pcsat-wrapper
49+
50+ mkdir -p ~/.local/bin
51+ mv thrust-pcsat-wrapper ~/.local/bin/thrust-pcsat-wrapper
3052 - run : rustup show
3153 - uses : Swatinem/rust-cache@v2
3254 - run : cargo test
Original file line number Diff line number Diff line change 1+ //@error-in-other-file: Unsat
2+ //@compile-flags: -C debug-assertions=off
3+ //@rustc-env: THRUST_SOLVER=thrust-pcsat-wrapper
4+
5+ #[ thrust:: trusted]
6+ #[ thrust:: callable]
7+ fn rand ( ) -> i32 { unimplemented ! ( ) }
8+
9+ #[ thrust:: requires( true ) ]
10+ #[ thrust:: ensures( exists x: int. result == 2 * x) ]
11+ fn f ( ) -> i32 {
12+ let x = rand ( ) ;
13+ x + x + x
14+ }
15+
16+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ //@check-pass
2+ //@compile-flags: -C debug-assertions=off
3+ //@rustc-env: THRUST_SOLVER=thrust-pcsat-wrapper
4+
5+ #[ thrust:: trusted]
6+ #[ thrust:: callable]
7+ fn rand ( ) -> i32 { unimplemented ! ( ) }
8+
9+ #[ thrust:: requires( true ) ]
10+ #[ thrust:: ensures( exists x: int. result == 2 * x) ]
11+ fn f ( ) -> i32 {
12+ let x = rand ( ) ;
13+ x + x
14+ }
15+
16+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments