File tree Expand file tree Collapse file tree 3 files changed +56
-0
lines changed
Expand file tree Collapse file tree 3 files changed +56
-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+ docker pull "$COAR_IMAGE"
35+
36+ cat <<"EOF" > thrust-pcsat-wrapper
37+ #!/bin/bash
38+
39+ smt2=$(mktemp -p . --suffix .smt2)
40+ trap "rm -f $smt2" EXIT
41+ cp "$1" "$smt2"
42+ out=$(
43+ docker run --rm -v "$PWD:/mnt" -w /root/coar "$COAR_IMAGE" \
44+ main.exe -c ./config/solver/pcsat_tbq_ar.json -p pcsp "/mnt/$smt2"
45+ )
46+ exit_code=$?
47+ echo "${out%,*}"
48+ exit "$exit_code"
49+ EOF
50+ chmod +x thrust-pcsat-wrapper
51+
52+ mkdir -p ~/.local/bin
53+ mv thrust-pcsat-wrapper ~/.local/bin/thrust-pcsat-wrapper
3054 - run : rustup show
3155 - uses : Swatinem/rust-cache@v2
3256 - 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