diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index d4e42fb846..d71ca56ed2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,5 +1,5 @@
# Overall configuration notes:
-# - Artifact uploads for binaries are from GHC 9.2.7
+# - Artifact uploads for binaries are from GHC 9.2.8
# - Builds for Ubuntu happen on 22.04. We also include a single configuration
# for 20.04 to increase our Linux coverage.
# - Docker builds happen nightly, on manual invocation, and on release branch commits
@@ -78,7 +78,7 @@ jobs:
matrix:
os: [ubuntu-22.04, macos-12, windows-2019]
cabal: ["3.10.1.0"]
- ghc: ["8.10.7", "9.2.7", "9.4.4"]
+ ghc: ["9.2.8", "9.4.8", "9.6.3"]
run-tests: [true]
hpc: [false]
include:
@@ -86,28 +86,16 @@ jobs:
# coverage of possible Linux configurations. Since we already run the
# tests with the newest LTS release, we won't bother testing this one.
- os: ubuntu-20.04
- ghc: "9.2.7"
+ ghc: "9.2.8"
cabal: "3.10.1.0"
run-tests: false
hpc: false
# Include one job with HPC enabled
- os: ubuntu-22.04
- ghc: "9.4.4"
+ ghc: "9.4.8"
cabal: "3.10.1.0"
run-tests: true
hpc: true
- exclude:
- # We exclude the GHC 8.10.7 job on Windows, as it is known to suffer
- # from a hard-to-diagnose memory-related issue that does not affect
- # later versions of GHC on Windows. (See
- # https://github.com/GaloisInc/saw-script/issues/1961.) When we drop
- # support for 8.10 entirely from SAW's support Window, we can remove
- # this part of the matrix entirely.
- - os: windows-2019
- ghc: "8.10.7"
- cabal: "3.10.1.0"
- run-tests: true
- hpc: false
outputs:
cabal-test-suites-json: ${{ steps.cabal-test-suites.outputs.targets-json }}
steps:
@@ -183,7 +171,7 @@ jobs:
dest: dist-tests
- uses: actions/upload-artifact@v2
- if: "matrix.ghc == '9.2.7'"
+ if: "matrix.ghc == '9.2.8'"
with:
path: dist-tests
name: dist-tests-${{ matrix.os }}
@@ -200,14 +188,14 @@ jobs:
- shell: bash
run: .github/ci.sh zip_dist_with_solvers $NAME-with-solvers
- - if: matrix.ghc == '9.2.7' && github.event.pull_request.head.repo.fork == false
+ - if: matrix.ghc == '9.2.8' && github.event.pull_request.head.repo.fork == false
shell: bash
env:
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
run: .github/ci.sh sign $NAME.tar.gz
- - if: matrix.ghc == '9.2.7' && github.event.pull_request.head.repo.fork == false
+ - if: matrix.ghc == '9.2.8' && github.event.pull_request.head.repo.fork == false
shell: bash
env:
SIGNING_PASSPHRASE: ${{ secrets.SIGNING_PASSPHRASE }}
@@ -217,7 +205,7 @@ jobs:
##########################################################################
# We upload an archive containing SAW, and also and archive containing SAW
# and the set of possible SMT solvers, but only for our "primary"
- # distribution (currently: GHC 9.2.7). These archives are utilized in
+ # distribution (currently: GHC 9.2.8). These archives are utilized in
# subsequent CI jobs, but are also published for external users, and are
# therefore signed.
#
@@ -232,7 +220,7 @@ jobs:
# In the next 3 steps we check that `matrix.hpc == false` so that if the
# distribution version matches the HPC version, the HPC build artifacts do
# not clobber the non-HPC distribution artifacts.
- - if: matrix.ghc == '9.2.7' && matrix.hpc == false
+ - if: matrix.ghc == '9.2.8' && matrix.hpc == false
uses: actions/upload-artifact@v2
with:
name: ${{ steps.config.outputs.name }} (GHC ${{ matrix.ghc }})
@@ -240,7 +228,7 @@ jobs:
if-no-files-found: error
retention-days: ${{ needs.config.outputs.retention-days }}
- - if: matrix.ghc == '9.2.7' && matrix.hpc == false
+ - if: matrix.ghc == '9.2.8' && matrix.hpc == false
uses: actions/upload-artifact@v2
with:
name: ${{ steps.config.outputs.name }}-with-solvers (GHC ${{ matrix.ghc }})
@@ -248,7 +236,7 @@ jobs:
if-no-files-found: error
retention-days: ${{ needs.config.outputs.retention-days }}
- - if: matrix.ghc == '9.2.7' && matrix.run-tests && matrix.hpc == false
+ - if: matrix.ghc == '9.2.8' && matrix.run-tests && matrix.hpc == false
uses: actions/upload-artifact@v2
with:
path: dist/bin
@@ -726,7 +714,7 @@ jobs:
- hmac-failure
- awslc
- blst
- ghc: ["9.2.7"]
+ ghc: ["9.2.8"]
steps:
- uses: actions/checkout@v2
- run: |
@@ -779,7 +767,7 @@ jobs:
runs-on: ubuntu-22.04
strategy:
matrix:
- ghc: ["9.2.7"]
+ ghc: ["9.2.8"]
steps:
- uses: actions/checkout@v2
- run: |
diff --git a/.gitmodules b/.gitmodules
index 90b2fb191d..ae16f8fa82 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -42,7 +42,7 @@
url = https://github.com/galoisinc/argo
[submodule "deps/language-rust"]
path = deps/language-rust
- url = https://github.com/harpocrates/language-rust.git
+ url = https://github.com/GaloisInc/language-rust.git
[submodule "deps/language-sally"]
path = deps/language-sally
url = https://github.com/GaloisInc/language-sally
diff --git a/CHANGES.md b/CHANGES.md
index dbf13e439f..d722ae64cb 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -17,6 +17,13 @@
generating LLVM setup scripts for Cryptol FFI functions with the
`llvm_ffi_setup` command. For more information, see the [manual](https://github.com/GaloisInc/saw-script/blob/master/doc/manual/manual.md#verifying-cryptol-ffi-functions).
+* Ghost state is now supported with the JVM and MIR language backends:
+ * The `llvm_declare_ghost_state` command is now deprecated in favor of the
+ new `declare_ghost_state` command, as nothing about this command is
+ LLVM-specific.
+ * Add `jvm_ghost_value` and `mir_ghost_value` commands in addition to the
+ existing `llvm_ghost_value` command.
+
# Version 1.0 -- 2023-06-26
## New Features
diff --git a/README.md b/README.md
index 0d846bf35c..fb1c06b9e6 100644
--- a/README.md
+++ b/README.md
@@ -43,7 +43,7 @@ To build SAWScript and related utilities from source:
* Ensure that you have the `cabal` and `ghc` executables in your
`PATH`. If you don't already have them, we recommend using `ghcup`
to install them: . We recommend
- Cabal 3.4 or newer, and GHC 8.10, 9.2, or 9.4.
+ Cabal 3.10 or newer, and GHC 9.2, 9.4, or 9.6.
(If you are using the GHC 9.2 series, make sure to use 9.2.6 or later
to avoid [this bug](https://gitlab.haskell.org/ghc/ghc/-/issues/22491).)
diff --git a/cabal.GHC-9.2.7.config b/cabal.GHC-9.2.8.config
similarity index 89%
rename from cabal.GHC-9.2.7.config
rename to cabal.GHC-9.2.8.config
index d86db548df..8e9e5cad34 100644
--- a/cabal.GHC-9.2.7.config
+++ b/cabal.GHC-9.2.8.config
@@ -20,7 +20,7 @@ constraints: any.BoundedChan ==1.0.3.0,
aeson -cffi +ordered-keymap,
any.aeson-pretty ==0.8.10,
aeson-pretty -lib-only,
- any.alex ==3.4.0.0,
+ any.alex ==3.4.0.1,
any.ansi-terminal ==0.11.5,
ansi-terminal -example,
any.ansi-terminal-types ==0.11.5,
@@ -40,11 +40,11 @@ constraints: any.BoundedChan ==1.0.3.0,
attoparsec -developer,
any.attoparsec-aeson ==2.1.0.0,
any.auto-update ==0.1.6,
- any.barbies ==2.0.4.0,
+ any.barbies ==2.0.5.0,
any.base ==4.16.4.0,
any.base-compat ==0.12.3,
any.base-compat-batteries ==0.12.3,
- any.base-orphans ==0.9.0,
+ any.base-orphans ==0.9.1,
any.base16-bytestring ==1.0.2.0,
any.base64-bytestring ==1.2.1.0,
any.basement ==0.0.16,
@@ -53,12 +53,12 @@ constraints: any.BoundedChan ==1.0.3.0,
any.bimap ==0.5.0,
any.binary ==0.8.9.0,
any.binary-orphans ==1.0.4.1,
- any.bitvec ==1.1.4.0,
- bitvec -libgmp,
+ any.bitvec ==1.1.5.0,
+ bitvec +simd,
any.bitwise ==1.0.0.1,
- any.blaze-builder ==0.4.2.2,
+ any.blaze-builder ==0.4.2.3,
any.blaze-html ==0.9.1.2,
- any.blaze-markup ==0.8.2.8,
+ any.blaze-markup ==0.8.3.0,
any.boomerang ==1.4.9,
any.bsb-http-chunked ==0.0.0.4,
any.bv-sized ==1.0.5,
@@ -69,12 +69,12 @@ constraints: any.BoundedChan ==1.0.3.0,
any.case-insensitive ==1.2.1.0,
any.cassava ==0.5.3.0,
cassava -bytestring--lt-0_10_4,
- any.cborg ==0.2.9.0,
+ any.cborg ==0.2.10.0,
cborg +optimize-gmp,
- any.cborg-json ==0.2.5.0,
+ any.cborg-json ==0.2.6.0,
any.cereal ==0.5.8.3,
cereal -bytestring-builder,
- any.chimera ==0.3.3.0,
+ any.chimera ==0.3.4.0,
chimera +representable,
any.clock ==0.8.4,
clock -llvm,
@@ -85,7 +85,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.comonad ==5.0.8,
comonad +containers +distributive +indexed-traversable,
any.concurrent-extra ==0.7.0.12,
- any.concurrent-output ==1.10.18,
+ any.concurrent-output ==1.10.20,
any.conduit ==1.3.5,
any.conduit-extra ==1.3.6,
any.config-schema ==1.3.0.0,
@@ -106,7 +106,7 @@ constraints: any.BoundedChan ==1.0.3.0,
cryptohash-sha256 -exe +use-cbits,
cryptol +ffi +relocatable -static,
cryptol-remote-api -notthreaded -static,
- any.crypton ==0.33,
+ any.crypton ==0.34,
crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
any.crypton-x509 ==1.7.6,
any.crypton-x509-store ==1.6.9,
@@ -130,7 +130,7 @@ constraints: any.BoundedChan ==1.0.3.0,
distributive +semigroups +tagged,
any.dlist ==1.0,
dlist -werror,
- any.doctest ==0.22.0,
+ any.doctest ==0.22.2,
any.dotgen ==0.4.3,
dotgen -devel,
any.easy-file ==0.2.5,
@@ -144,7 +144,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.extensible-exceptions ==0.1.1.4,
any.extra ==1.7.14,
any.fast-logger ==3.2.2,
- any.fgl ==5.8.1.1,
+ any.fgl ==5.8.2.0,
fgl +containers042,
any.fgl-visualize ==0.1.0.1,
any.filelock ==0.1.1.7,
@@ -161,14 +161,14 @@ constraints: any.BoundedChan ==1.0.3.0,
any.generic-random ==1.5.0.1,
generic-random -enable-inspect,
any.generically ==0.1.1,
- any.ghc ==9.2.7,
+ any.ghc ==9.2.8,
any.ghc-bignum ==1.2,
- any.ghc-boot ==9.2.7,
- any.ghc-boot-th ==9.2.7,
- any.ghc-heap ==9.2.7,
+ any.ghc-boot ==9.2.8,
+ any.ghc-boot-th ==9.2.8,
+ any.ghc-heap ==9.2.8,
any.ghc-paths ==0.1.0.12,
any.ghc-prim ==0.8.0,
- any.ghci ==9.2.7,
+ any.ghci ==9.2.8,
any.gitrev ==1.3.1,
any.graphviz ==2999.20.1.0,
graphviz -test-parsing,
@@ -181,7 +181,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.haskeline ==0.8.2,
any.haskell-lexer ==1.1.1,
any.haskell-src-exts ==1.23.1,
- any.haskell-src-meta ==0.8.12,
+ any.haskell-src-meta ==0.8.13,
any.hedgehog ==1.2,
any.hedgehog-classes ==0.2.5.4,
hedgehog-classes +aeson +comonad +primitive +semirings +vector,
@@ -191,20 +191,20 @@ constraints: any.BoundedChan ==1.0.3.0,
any.hostname ==1.0,
any.hourglass ==0.2.12,
any.hpc ==0.6.1.0,
- any.hsc2hs ==0.68.9,
+ any.hsc2hs ==0.68.10,
hsc2hs -in-ghc-tree,
- any.hspec ==2.11.4,
- any.hspec-api ==2.11.4,
- any.hspec-core ==2.11.4,
- any.hspec-discover ==2.11.4,
+ any.hspec ==2.11.7,
+ any.hspec-api ==2.11.7,
+ any.hspec-core ==2.11.7,
+ any.hspec-discover ==2.11.7,
any.hspec-expectations ==0.8.4,
any.http-date ==0.0.11,
any.http-types ==0.12.3,
- any.http2 ==4.1.4,
+ any.http2 ==4.2.2,
http2 -devel -h2spec,
any.ieee754 ==0.8.0,
any.indexed-profunctors ==0.1.1.1,
- any.indexed-traversable ==0.1.2.1,
+ any.indexed-traversable ==0.1.3,
any.indexed-traversable-instances ==0.1.1.2,
any.infinite-list ==0.1,
any.integer-gmp ==1.1,
@@ -223,10 +223,10 @@ constraints: any.BoundedChan ==1.0.3.0,
any.kan-extensions ==5.2.5,
any.kvitable ==1.0.2.1,
any.language-c99 ==0.2.0,
- any.language-c99-simple ==0.2.2,
+ any.language-c99-simple ==0.2.3,
any.language-c99-util ==0.2.0,
language-rust +enablequasiquotes +usebytestrings,
- any.lens ==5.2.2,
+ any.lens ==5.2.3,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
any.libBF ==0.6.6,
libBF -system-libbf,
@@ -234,26 +234,26 @@ constraints: any.BoundedChan ==1.0.3.0,
libffi +ghc-bundled-libffi,
any.libyaml ==0.1.2,
libyaml -no-unicode -system-libyaml,
- any.lifted-async ==0.10.2.4,
+ any.lifted-async ==0.10.2.5,
any.lifted-base ==0.2.3.12,
llvm-pretty-bc-parser -fuzz -regressions,
lmdb -pkg-config,
any.logict ==0.8.1.0,
any.lucid ==2.11.20230408,
any.lumberjack ==1.0.3.0,
- any.math-functions ==0.3.4.2,
+ any.math-functions ==0.3.4.3,
math-functions +system-erf +system-expm1,
any.megaparsec ==9.3.1,
megaparsec -dev,
any.memory ==0.18.0,
memory +support_bytestring +support_deepseq,
any.microlens ==0.4.13.1,
- any.microlens-th ==0.4.3.13,
+ any.microlens-th ==0.4.3.14,
any.microstache ==1.0.2.3,
any.mmorph ==1.2.0,
any.mod ==0.2.0.1,
mod +semirings +vector,
- any.modern-uri ==0.3.6.0,
+ any.modern-uri ==0.3.6.1,
modern-uri -dev,
any.monad-control ==1.0.3.1,
any.monadLib ==3.10.1,
@@ -262,7 +262,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.mwc-random ==0.15.0.2,
any.network ==3.1.4.0,
network -devel,
- any.network-byte-order ==0.1.6,
+ any.network-byte-order ==0.1.7,
any.network-info ==0.2.1,
any.newtype-generics ==0.6.2,
any.numtype-dk ==0.5.0.3,
@@ -288,8 +288,8 @@ constraints: any.BoundedChan ==1.0.3.0,
any.primitive ==0.8.0.0,
any.process ==1.6.16.0,
any.profunctors ==5.6.2,
- any.psqueues ==0.2.7.3,
- any.quickcheck-instances ==0.3.29.1,
+ any.psqueues ==0.2.8.0,
+ any.quickcheck-instances ==0.3.30,
quickcheck-instances -bytestring-builder,
any.quickcheck-io ==0.2.0,
any.random ==1.2.1.1,
@@ -307,7 +307,7 @@ constraints: any.BoundedChan ==1.0.3.0,
s-cargot -build-example,
any.safe ==0.3.19,
any.safe-exceptions ==0.1.7.4,
- any.sbv ==9.2,
+ any.sbv ==10.2,
any.scientific ==0.3.7.0,
scientific -bytestring-builder -integer-simple,
any.scotty ==0.12.1,
@@ -319,7 +319,7 @@ constraints: any.BoundedChan ==1.0.3.0,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
any.semirings ==0.6,
semirings +containers +unordered-containers,
- any.serialise ==0.2.6.0,
+ any.serialise ==0.2.6.1,
serialise +newtime15,
any.silently ==1.2.5.3,
any.simple-get-opt ==0.4,
@@ -327,10 +327,10 @@ constraints: any.BoundedChan ==1.0.3.0,
simple-sendfile +allow-bsd -fallback,
any.simple-smt ==0.9.7,
any.smallcheck ==1.2.1.1,
- any.split ==0.2.3.5,
- any.splitmix ==0.1.0.4,
+ any.split ==0.2.4,
+ any.splitmix ==0.1.0.5,
splitmix -optimised-mixer,
- any.statistics ==0.16.2.0,
+ any.statistics ==0.16.2.1,
any.stm ==2.5.0.2,
any.streaming-commons ==0.2.2.6,
streaming-commons -use-bytestring-builder,
@@ -342,14 +342,14 @@ constraints: any.BoundedChan ==1.0.3.0,
tagged +deepseq +transformers,
any.tasty ==1.4.3,
tasty +unix,
- any.tasty-ant-xml ==1.1.8,
+ any.tasty-ant-xml ==1.1.9,
any.tasty-checklist ==1.0.6.0,
any.tasty-expected-failure ==0.12.3,
any.tasty-golden ==2.3.5,
tasty-golden -build-example,
any.tasty-hedgehog ==1.4.0.1,
any.tasty-hspec ==1.2.0.4,
- any.tasty-hunit ==0.10.0.3,
+ any.tasty-hunit ==0.10.1,
any.tasty-quickcheck ==0.10.2,
any.tasty-smallcheck ==0.8.2,
any.tasty-sugar ==2.2.1.0,
@@ -376,8 +376,8 @@ constraints: any.BoundedChan ==1.0.3.0,
any.time ==1.11.1.1,
any.time-compat ==1.9.6.1,
time-compat -old-locale,
- any.time-manager ==0.0.0,
- any.tls ==1.7.1,
+ any.time-manager ==0.0.1,
+ any.tls ==1.9.0,
tls +compat -hans +network,
any.tls-session-manager ==0.0.4,
any.transformers ==0.5.6.2,
@@ -386,23 +386,23 @@ constraints: any.BoundedChan ==1.0.3.0,
any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.type-equality ==1,
- any.typed-process ==0.2.11.0,
+ any.typed-process ==0.2.11.1,
any.unbounded-delays ==0.1.1.1,
any.uniplate ==1.6.13,
any.unix ==2.7.2.2,
any.unix-compat ==0.7,
unix-compat -old-time,
- any.unix-time ==0.4.10,
+ any.unix-time ==0.4.11,
any.unliftio ==0.2.25.0,
any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.19.1,
unordered-containers -debug,
any.utf8-string ==1.0.2,
any.uuid ==1.3.15,
- any.uuid-types ==1.0.5,
+ any.uuid-types ==1.0.5.1,
any.vault ==0.3.1.5,
vault +useghc,
- any.vector ==0.13.0.0,
+ any.vector ==0.13.1.0,
vector +boundschecks -internalchecks -unsafechecks -wall,
any.vector-algorithms ==0.9.0.1,
vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
@@ -416,9 +416,9 @@ constraints: any.BoundedChan ==1.0.3.0,
any.wai-extra ==3.1.13.0,
wai-extra -build-example,
any.wai-logger ==2.4.0,
- any.warp ==3.3.28,
+ any.warp ==3.3.30,
warp +allow-sendfilefd -network-bytestring -warp-debug +x509,
- any.warp-tls ==3.4.0,
+ any.warp-tls ==3.4.3,
any.weigh ==0.0.17,
what4 -drealtestdisable -solvertests -stptestdisable,
any.witherable ==0.4.2,
@@ -432,4 +432,4 @@ constraints: any.BoundedChan ==1.0.3.0,
any.zlib ==0.6.3.0,
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config,
any.zlib-bindings ==0.1.1.5
-index-state: hackage.haskell.org 2023-08-12T09:08:58Z
+index-state: hackage.haskell.org 2023-11-20T16:07:24Z
diff --git a/cabal.GHC-9.4.4.config b/cabal.GHC-9.4.8.config
similarity index 87%
rename from cabal.GHC-9.4.4.config
rename to cabal.GHC-9.4.8.config
index 60c28d9c4c..ba4f1fa561 100644
--- a/cabal.GHC-9.4.4.config
+++ b/cabal.GHC-9.4.8.config
@@ -21,7 +21,7 @@ constraints: any.BoundedChan ==1.0.3.0,
aeson -cffi +ordered-keymap,
any.aeson-pretty ==0.8.10,
aeson-pretty -lib-only,
- any.alex ==3.4.0.0,
+ any.alex ==3.4.0.1,
any.ansi-terminal ==0.11.5,
ansi-terminal -example,
any.ansi-terminal-types ==0.11.5,
@@ -41,11 +41,11 @@ constraints: any.BoundedChan ==1.0.3.0,
attoparsec -developer,
any.attoparsec-aeson ==2.1.0.0,
any.auto-update ==0.1.6,
- any.barbies ==2.0.4.0,
- any.base ==4.17.0.0,
+ any.barbies ==2.0.5.0,
+ any.base ==4.17.2.1,
any.base-compat ==0.12.3,
any.base-compat-batteries ==0.12.3,
- any.base-orphans ==0.9.0,
+ any.base-orphans ==0.9.1,
any.base16-bytestring ==1.0.2.0,
any.base64-bytestring ==1.2.1.0,
any.basement ==0.0.16,
@@ -54,28 +54,28 @@ constraints: any.BoundedChan ==1.0.3.0,
any.bimap ==0.5.0,
any.binary ==0.8.9.1,
any.binary-orphans ==1.0.4.1,
- any.bitvec ==1.1.4.0,
- bitvec -libgmp,
+ any.bitvec ==1.1.5.0,
+ bitvec +simd,
any.bitwise ==1.0.0.1,
- any.blaze-builder ==0.4.2.2,
+ any.blaze-builder ==0.4.2.3,
any.blaze-html ==0.9.1.2,
- any.blaze-markup ==0.8.2.8,
+ any.blaze-markup ==0.8.3.0,
any.boomerang ==1.4.9,
any.bsb-http-chunked ==0.0.0.4,
any.bv-sized ==1.0.5,
any.byteorder ==1.0.4,
- any.bytestring ==0.11.3.1,
+ any.bytestring ==0.11.5.3,
any.cabal-doctest ==1.0.9,
any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0,
any.cassava ==0.5.3.0,
cassava -bytestring--lt-0_10_4,
- any.cborg ==0.2.9.0,
+ any.cborg ==0.2.10.0,
cborg +optimize-gmp,
- any.cborg-json ==0.2.5.0,
+ any.cborg-json ==0.2.6.0,
any.cereal ==0.5.8.3,
cereal -bytestring-builder,
- any.chimera ==0.3.3.0,
+ any.chimera ==0.3.4.0,
chimera +representable,
any.clock ==0.8.4,
clock -llvm,
@@ -86,13 +86,13 @@ constraints: any.BoundedChan ==1.0.3.0,
any.comonad ==5.0.8,
comonad +containers +distributive +indexed-traversable,
any.concurrent-extra ==0.7.0.12,
- any.concurrent-output ==1.10.18,
+ any.concurrent-output ==1.10.20,
any.conduit ==1.3.5,
any.conduit-extra ==1.3.6,
any.config-schema ==1.3.0.0,
any.config-value ==0.8.3,
any.constraints ==0.13.4,
- any.containers ==0.6.6,
+ any.containers ==0.6.7,
any.contravariant ==1.5.5,
contravariant +semigroups +statevar +tagged,
any.cookie ==0.4.6,
@@ -107,7 +107,7 @@ constraints: any.BoundedChan ==1.0.3.0,
cryptohash-sha256 -exe +use-cbits,
cryptol +ffi +relocatable -static,
cryptol-remote-api -notthreaded -static,
- any.crypton ==0.33,
+ any.crypton ==0.34,
crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
any.crypton-x509 ==1.7.6,
any.crypton-x509-store ==1.6.9,
@@ -130,7 +130,7 @@ constraints: any.BoundedChan ==1.0.3.0,
distributive +semigroups +tagged,
any.dlist ==1.0,
dlist -werror,
- any.doctest ==0.22.0,
+ any.doctest ==0.22.2,
any.dotgen ==0.4.3,
dotgen -devel,
any.easy-file ==0.2.5,
@@ -144,7 +144,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.extensible-exceptions ==0.1.1.4,
any.extra ==1.7.14,
any.fast-logger ==3.2.2,
- any.fgl ==5.8.1.1,
+ any.fgl ==5.8.2.0,
fgl +containers042,
any.fgl-visualize ==0.1.0.1,
any.filelock ==0.1.1.7,
@@ -161,14 +161,14 @@ constraints: any.BoundedChan ==1.0.3.0,
any.generic-random ==1.5.0.1,
generic-random -enable-inspect,
any.generically ==0.1.1,
- any.ghc ==9.4.4,
+ any.ghc ==9.4.8,
any.ghc-bignum ==1.3,
- any.ghc-boot ==9.4.4,
- any.ghc-boot-th ==9.4.4,
- any.ghc-heap ==9.4.4,
+ any.ghc-boot ==9.4.8,
+ any.ghc-boot-th ==9.4.8,
+ any.ghc-heap ==9.4.8,
any.ghc-paths ==0.1.0.12,
- any.ghc-prim ==0.9.0,
- any.ghci ==9.4.4,
+ any.ghc-prim ==0.9.1,
+ any.ghci ==9.4.8,
any.gitrev ==1.3.1,
any.graphviz ==2999.20.1.0,
graphviz -test-parsing,
@@ -181,7 +181,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.haskeline ==0.8.2,
any.haskell-lexer ==1.1.1,
any.haskell-src-exts ==1.23.1,
- any.haskell-src-meta ==0.8.12,
+ any.haskell-src-meta ==0.8.13,
any.hedgehog ==1.2,
any.hedgehog-classes ==0.2.5.4,
hedgehog-classes +aeson +comonad +primitive +semirings +vector,
@@ -191,20 +191,20 @@ constraints: any.BoundedChan ==1.0.3.0,
any.hostname ==1.0,
any.hourglass ==0.2.12,
any.hpc ==0.6.1.0,
- any.hsc2hs ==0.68.9,
+ any.hsc2hs ==0.68.10,
hsc2hs -in-ghc-tree,
- any.hspec ==2.11.4,
- any.hspec-api ==2.11.4,
- any.hspec-core ==2.11.4,
- any.hspec-discover ==2.11.4,
+ any.hspec ==2.11.7,
+ any.hspec-api ==2.11.7,
+ any.hspec-core ==2.11.7,
+ any.hspec-discover ==2.11.7,
any.hspec-expectations ==0.8.4,
any.http-date ==0.0.11,
any.http-types ==0.12.3,
- any.http2 ==4.1.4,
+ any.http2 ==4.2.2,
http2 -devel -h2spec,
any.ieee754 ==0.8.0,
any.indexed-profunctors ==0.1.1.1,
- any.indexed-traversable ==0.1.2.1,
+ any.indexed-traversable ==0.1.3,
any.indexed-traversable-instances ==0.1.1.2,
any.infinite-list ==0.1,
any.integer-gmp ==1.1,
@@ -223,10 +223,10 @@ constraints: any.BoundedChan ==1.0.3.0,
any.kan-extensions ==5.2.5,
any.kvitable ==1.0.2.1,
any.language-c99 ==0.2.0,
- any.language-c99-simple ==0.2.2,
+ any.language-c99-simple ==0.2.3,
any.language-c99-util ==0.2.0,
language-rust +enablequasiquotes +usebytestrings,
- any.lens ==5.2.2,
+ any.lens ==5.2.3,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
any.libBF ==0.6.6,
libBF -system-libbf,
@@ -234,26 +234,26 @@ constraints: any.BoundedChan ==1.0.3.0,
libffi +ghc-bundled-libffi,
any.libyaml ==0.1.2,
libyaml -no-unicode -system-libyaml,
- any.lifted-async ==0.10.2.4,
+ any.lifted-async ==0.10.2.5,
any.lifted-base ==0.2.3.12,
llvm-pretty-bc-parser -fuzz -regressions,
lmdb -pkg-config,
any.logict ==0.8.1.0,
any.lucid ==2.11.20230408,
any.lumberjack ==1.0.3.0,
- any.math-functions ==0.3.4.2,
+ any.math-functions ==0.3.4.3,
math-functions +system-erf +system-expm1,
any.megaparsec ==9.3.1,
megaparsec -dev,
any.memory ==0.18.0,
memory +support_bytestring +support_deepseq,
any.microlens ==0.4.13.1,
- any.microlens-th ==0.4.3.13,
+ any.microlens-th ==0.4.3.14,
any.microstache ==1.0.2.3,
any.mmorph ==1.2.0,
any.mod ==0.2.0.1,
mod +semirings +vector,
- any.modern-uri ==0.3.6.0,
+ any.modern-uri ==0.3.6.1,
modern-uri -dev,
any.monad-control ==1.0.3.1,
any.monadLib ==3.10.1,
@@ -262,7 +262,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.mwc-random ==0.15.0.2,
any.network ==3.1.4.0,
network -devel,
- any.network-byte-order ==0.1.6,
+ any.network-byte-order ==0.1.7,
any.network-info ==0.2.1,
any.newtype-generics ==0.6.2,
any.numtype-dk ==0.5.0.3,
@@ -274,7 +274,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.panic ==0.4.0.1,
any.parallel ==3.2.2.0,
parameterized-utils +unsafe-operations,
- any.parsec ==3.1.15.0,
+ any.parsec ==3.1.16.1,
any.parser-combinators ==1.3.0,
parser-combinators -dev,
any.pem ==0.2.4,
@@ -286,10 +286,10 @@ constraints: any.BoundedChan ==1.0.3.0,
prettyprinter -buildreadme +text,
any.prettyprinter-ansi-terminal ==1.1.3,
any.primitive ==0.8.0.0,
- any.process ==1.6.16.0,
+ any.process ==1.6.18.0,
any.profunctors ==5.6.2,
- any.psqueues ==0.2.7.3,
- any.quickcheck-instances ==0.3.29.1,
+ any.psqueues ==0.2.8.0,
+ any.quickcheck-instances ==0.3.30,
quickcheck-instances -bytestring-builder,
any.quickcheck-io ==0.2.0,
any.random ==1.2.1.1,
@@ -307,7 +307,7 @@ constraints: any.BoundedChan ==1.0.3.0,
s-cargot -build-example,
any.safe ==0.3.19,
any.safe-exceptions ==0.1.7.4,
- any.sbv ==9.2,
+ any.sbv ==10.2,
any.scientific ==0.3.7.0,
scientific -bytestring-builder -integer-simple,
any.scotty ==0.12.1,
@@ -319,7 +319,7 @@ constraints: any.BoundedChan ==1.0.3.0,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
any.semirings ==0.6,
semirings +containers +unordered-containers,
- any.serialise ==0.2.6.0,
+ any.serialise ==0.2.6.1,
serialise +newtime15,
any.silently ==1.2.5.3,
any.simple-get-opt ==0.4,
@@ -327,10 +327,10 @@ constraints: any.BoundedChan ==1.0.3.0,
simple-sendfile +allow-bsd -fallback,
any.simple-smt ==0.9.7,
any.smallcheck ==1.2.1.1,
- any.split ==0.2.3.5,
- any.splitmix ==0.1.0.4,
+ any.split ==0.2.4,
+ any.splitmix ==0.1.0.5,
splitmix -optimised-mixer,
- any.statistics ==0.16.2.0,
+ any.statistics ==0.16.2.1,
any.stm ==2.5.1.0,
any.streaming-commons ==0.2.2.6,
streaming-commons -use-bytestring-builder,
@@ -342,14 +342,14 @@ constraints: any.BoundedChan ==1.0.3.0,
tagged +deepseq +transformers,
any.tasty ==1.4.3,
tasty +unix,
- any.tasty-ant-xml ==1.1.8,
+ any.tasty-ant-xml ==1.1.9,
any.tasty-checklist ==1.0.6.0,
any.tasty-expected-failure ==0.12.3,
any.tasty-golden ==2.3.5,
tasty-golden -build-example,
any.tasty-hedgehog ==1.4.0.1,
any.tasty-hspec ==1.2.0.4,
- any.tasty-hunit ==0.10.0.3,
+ any.tasty-hunit ==0.10.1,
any.tasty-quickcheck ==0.10.2,
any.tasty-smallcheck ==0.8.2,
any.tasty-sugar ==2.2.1.0,
@@ -360,7 +360,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.test-framework ==0.8.2.0,
any.test-framework-hunit ==0.3.0.2,
test-framework-hunit -base3 +base4,
- any.text ==2.0.1,
+ any.text ==2.0.2,
any.text-conversions ==0.3.1.1,
any.text-short ==0.1.5,
text-short -asserts,
@@ -376,8 +376,8 @@ constraints: any.BoundedChan ==1.0.3.0,
any.time ==1.12.2,
any.time-compat ==1.9.6.1,
time-compat -old-locale,
- any.time-manager ==0.0.0,
- any.tls ==1.7.1,
+ any.time-manager ==0.0.1,
+ any.tls ==1.9.0,
tls +compat -hans +network,
any.tls-session-manager ==0.0.4,
any.transformers ==0.5.6.2,
@@ -386,23 +386,23 @@ constraints: any.BoundedChan ==1.0.3.0,
any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.type-equality ==1,
- any.typed-process ==0.2.11.0,
+ any.typed-process ==0.2.11.1,
any.unbounded-delays ==0.1.1.1,
any.uniplate ==1.6.13,
any.unix ==2.7.3,
any.unix-compat ==0.7,
unix-compat -old-time,
- any.unix-time ==0.4.10,
+ any.unix-time ==0.4.11,
any.unliftio ==0.2.25.0,
any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.19.1,
unordered-containers -debug,
any.utf8-string ==1.0.2,
any.uuid ==1.3.15,
- any.uuid-types ==1.0.5,
+ any.uuid-types ==1.0.5.1,
any.vault ==0.3.1.5,
vault +useghc,
- any.vector ==0.13.0.0,
+ any.vector ==0.13.1.0,
vector +boundschecks -internalchecks -unsafechecks -wall,
any.vector-algorithms ==0.9.0.1,
vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
@@ -416,9 +416,9 @@ constraints: any.BoundedChan ==1.0.3.0,
any.wai-extra ==3.1.13.0,
wai-extra -build-example,
any.wai-logger ==2.4.0,
- any.warp ==3.3.28,
+ any.warp ==3.3.30,
warp +allow-sendfilefd -network-bytestring -warp-debug +x509,
- any.warp-tls ==3.4.0,
+ any.warp-tls ==3.4.3,
any.weigh ==0.0.17,
what4 -drealtestdisable -solvertests -stptestdisable,
any.witherable ==0.4.2,
@@ -432,4 +432,4 @@ constraints: any.BoundedChan ==1.0.3.0,
any.zlib ==0.6.3.0,
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config,
any.zlib-bindings ==0.1.1.5
-index-state: hackage.haskell.org 2023-08-12T09:08:58Z
+index-state: hackage.haskell.org 2023-11-20T16:07:24Z
diff --git a/cabal.GHC-8.10.7.config b/cabal.GHC-9.6.3.config
similarity index 82%
rename from cabal.GHC-8.10.7.config
rename to cabal.GHC-9.6.3.config
index 1095efbdb8..2930e65284 100644
--- a/cabal.GHC-8.10.7.config
+++ b/cabal.GHC-9.6.3.config
@@ -1,6 +1,7 @@
active-repositories: hackage.haskell.org:merge
constraints: any.BoundedChan ==1.0.3.0,
- any.Cabal ==3.2.1.0,
+ any.Cabal ==3.10.1.0,
+ any.Cabal-syntax ==3.10.1.0,
any.Glob ==0.10.2,
any.GraphSCC ==1.0.4,
GraphSCC -use-maps,
@@ -20,15 +21,15 @@ constraints: any.BoundedChan ==1.0.3.0,
aeson -cffi +ordered-keymap,
any.aeson-pretty ==0.8.10,
aeson-pretty -lib-only,
- any.alex ==3.4.0.0,
+ any.alex ==3.4.0.1,
any.ansi-terminal ==0.11.5,
ansi-terminal -example,
any.ansi-terminal-types ==0.11.5,
any.ansi-wl-pprint ==0.6.9,
ansi-wl-pprint -example,
any.appar ==0.1.8,
- any.arithmoi ==0.12.1.0,
- any.array ==0.5.4.0,
+ any.arithmoi ==0.13.0.0,
+ any.array ==0.5.5.0,
any.asn1-encoding ==0.9.6,
any.asn1-parse ==0.9.5,
any.asn1-types ==0.3.4,
@@ -40,41 +41,41 @@ constraints: any.BoundedChan ==1.0.3.0,
attoparsec -developer,
any.attoparsec-aeson ==2.1.0.0,
any.auto-update ==0.1.6,
- any.barbies ==2.0.4.0,
- any.base ==4.14.3.0,
+ any.barbies ==2.0.5.0,
+ any.base ==4.18.1.0,
any.base-compat ==0.12.3,
any.base-compat-batteries ==0.12.3,
- any.base-orphans ==0.9.0,
+ any.base-orphans ==0.9.1,
any.base16-bytestring ==1.0.2.0,
any.base64-bytestring ==1.2.1.0,
any.basement ==0.0.16,
any.bifunctors ==5.6.1,
bifunctors +tagged,
any.bimap ==0.5.0,
- any.binary ==0.8.8.0,
+ any.binary ==0.8.9.1,
any.binary-orphans ==1.0.4.1,
- any.bitvec ==1.1.4.0,
- bitvec -libgmp,
+ any.bitvec ==1.1.5.0,
+ bitvec +simd,
any.bitwise ==1.0.0.1,
- any.blaze-builder ==0.4.2.2,
+ any.blaze-builder ==0.4.2.3,
any.blaze-html ==0.9.1.2,
- any.blaze-markup ==0.8.2.8,
+ any.blaze-markup ==0.8.3.0,
any.boomerang ==1.4.9,
any.bsb-http-chunked ==0.0.0.4,
any.bv-sized ==1.0.5,
any.byteorder ==1.0.4,
- any.bytestring ==0.10.12.0,
+ any.bytestring ==0.11.5.2,
any.cabal-doctest ==1.0.9,
any.call-stack ==0.4.0,
any.case-insensitive ==1.2.1.0,
any.cassava ==0.5.3.0,
cassava -bytestring--lt-0_10_4,
- any.cborg ==0.2.9.0,
+ any.cborg ==0.2.10.0,
cborg +optimize-gmp,
- any.cborg-json ==0.2.5.0,
+ any.cborg-json ==0.2.6.0,
any.cereal ==0.5.8.3,
cereal -bytestring-builder,
- any.chimera ==0.3.3.0,
+ any.chimera ==0.3.4.0,
chimera +representable,
any.clock ==0.8.4,
clock -llvm,
@@ -85,13 +86,13 @@ constraints: any.BoundedChan ==1.0.3.0,
any.comonad ==5.0.8,
comonad +containers +distributive +indexed-traversable,
any.concurrent-extra ==0.7.0.12,
- any.concurrent-output ==1.10.18,
+ any.concurrent-output ==1.10.20,
any.conduit ==1.3.5,
any.conduit-extra ==1.3.6,
any.config-schema ==1.3.0.0,
any.config-value ==0.8.3,
any.constraints ==0.13.4,
- any.containers ==0.6.5.1,
+ any.containers ==0.6.7,
any.contravariant ==1.5.5,
contravariant +semigroups +statevar +tagged,
any.cookie ==0.4.6,
@@ -106,7 +107,7 @@ constraints: any.BoundedChan ==1.0.3.0,
cryptohash-sha256 -exe +use-cbits,
cryptol +ffi +relocatable -static,
cryptol-remote-api -notthreaded -static,
- any.crypton ==0.33,
+ any.crypton ==0.34,
crypton -check_alignment +integer-gmp -old_toolchain_inliner +support_aesni +support_deepseq +support_pclmuldq +support_rdrand -support_sse +use_target_attributes,
any.crypton-x509 ==1.7.6,
any.crypton-x509-store ==1.6.9,
@@ -116,21 +117,20 @@ constraints: any.BoundedChan ==1.0.3.0,
any.cryptonite-conduit ==0.2.2,
any.data-accessor ==0.2.3.1,
data-accessor +category +monadfail +splitbase,
- any.data-array-byte ==0.1.0.1,
any.data-default-class ==0.1.2.0,
any.data-fix ==0.3.2,
any.data-inttrie ==0.1.4,
any.data-ref ==0.1,
- any.deepseq ==1.4.4.0,
+ any.deepseq ==1.4.8.1,
any.dense-linear-algebra ==0.1.0.0,
any.deriving-compat ==0.6.5,
deriving-compat +base-4-9 +new-functor-classes +template-haskell-2-11,
- any.directory ==1.3.6.0,
+ any.directory ==1.3.8.1,
any.distributive ==0.6.2.1,
distributive +semigroups +tagged,
any.dlist ==1.0,
dlist -werror,
- any.doctest ==0.22.0,
+ any.doctest ==0.22.2,
any.dotgen ==0.4.3,
dotgen -devel,
any.easy-file ==0.2.5,
@@ -139,20 +139,18 @@ constraints: any.BoundedChan ==1.0.3.0,
entropy -donotgetentropy,
any.erf ==2.0.0.0,
any.exact-pi ==0.5.0.2,
- any.exceptions ==0.10.4,
+ any.exceptions ==0.10.7,
any.executable-path ==0.0.3.1,
any.extensible-exceptions ==0.1.1.4,
any.extra ==1.7.14,
any.fast-logger ==3.2.2,
- any.fgl ==5.8.1.1,
+ any.fgl ==5.8.2.0,
fgl +containers042,
any.fgl-visualize ==0.1.0.1,
any.filelock ==0.1.1.7,
any.filemanip ==0.3.6.3,
- any.filepath ==1.4.2.1,
+ any.filepath ==1.4.100.4,
any.fingertree ==0.1.5.0,
- any.foldable1-classes-compat ==0.1,
- foldable1-classes-compat +tagged,
any.free ==5.2,
any.generic-deriving ==1.14.5,
generic-deriving +base-4-9,
@@ -161,13 +159,14 @@ constraints: any.BoundedChan ==1.0.3.0,
any.generic-random ==1.5.0.1,
generic-random -enable-inspect,
any.generically ==0.1.1,
- any.ghc ==8.10.7,
- any.ghc-boot ==8.10.7,
- any.ghc-boot-th ==8.10.7,
- any.ghc-heap ==8.10.7,
+ any.ghc ==9.6.3,
+ any.ghc-bignum ==1.3,
+ any.ghc-boot ==9.6.3,
+ any.ghc-boot-th ==9.6.3,
+ any.ghc-heap ==9.6.3,
any.ghc-paths ==0.1.0.12,
- any.ghc-prim ==0.6.1,
- any.ghci ==8.10.7,
+ any.ghc-prim ==0.10.0,
+ any.ghci ==9.6.3,
any.gitrev ==1.3.1,
any.graphviz ==2999.20.1.0,
graphviz -test-parsing,
@@ -177,10 +176,10 @@ constraints: any.BoundedChan ==1.0.3.0,
hashable +integer-gmp -random-initial-seed,
any.hashtables ==1.3.1,
hashtables -bounds-checking -debug -detailed-profiling -portable -sse42 +unsafe-tricks,
- any.haskeline ==0.8.2,
+ any.haskeline ==0.8.2.1,
any.haskell-lexer ==1.1.1,
any.haskell-src-exts ==1.23.1,
- any.haskell-src-meta ==0.8.12,
+ any.haskell-src-meta ==0.8.13,
any.hedgehog ==1.2,
any.hedgehog-classes ==0.2.5.4,
hedgehog-classes +aeson +comonad +primitive +semirings +vector,
@@ -189,23 +188,24 @@ constraints: any.BoundedChan ==1.0.3.0,
any.hobbits ==1.4,
any.hostname ==1.0,
any.hourglass ==0.2.12,
- any.hpc ==0.6.1.0,
- any.hsc2hs ==0.68.9,
+ any.hpc ==0.6.2.0,
+ any.hsc2hs ==0.68.10,
hsc2hs -in-ghc-tree,
- any.hspec ==2.11.4,
- any.hspec-api ==2.11.4,
- any.hspec-core ==2.11.4,
- any.hspec-discover ==2.11.4,
+ any.hspec ==2.11.7,
+ any.hspec-api ==2.11.7,
+ any.hspec-core ==2.11.7,
+ any.hspec-discover ==2.11.7,
any.hspec-expectations ==0.8.4,
any.http-date ==0.0.11,
any.http-types ==0.12.3,
- any.http2 ==4.1.4,
+ any.http2 ==4.2.2,
http2 -devel -h2spec,
any.ieee754 ==0.8.0,
any.indexed-profunctors ==0.1.1.1,
- any.indexed-traversable ==0.1.2.1,
+ any.indexed-traversable ==0.1.3,
any.indexed-traversable-instances ==0.1.1.2,
- any.integer-gmp ==1.0.3.0,
+ any.infinite-list ==0.1,
+ any.integer-gmp ==1.1,
any.integer-logarithms ==1.0.3.1,
integer-logarithms -check-bounds +integer-gmp,
any.integer-roots ==1.0.2.0,
@@ -221,10 +221,10 @@ constraints: any.BoundedChan ==1.0.3.0,
any.kan-extensions ==5.2.5,
any.kvitable ==1.0.2.1,
any.language-c99 ==0.2.0,
- any.language-c99-simple ==0.2.2,
+ any.language-c99-simple ==0.2.3,
any.language-c99-util ==0.2.0,
language-rust +enablequasiquotes +usebytestrings,
- any.lens ==5.2.2,
+ any.lens ==5.2.3,
lens -benchmark-uniplate -dump-splices +inlining -j +test-hunit +test-properties +test-templates +trustworthy,
any.libBF ==0.6.6,
libBF -system-libbf,
@@ -232,35 +232,35 @@ constraints: any.BoundedChan ==1.0.3.0,
libffi +ghc-bundled-libffi,
any.libyaml ==0.1.2,
libyaml -no-unicode -system-libyaml,
- any.lifted-async ==0.10.2.4,
+ any.lifted-async ==0.10.2.5,
any.lifted-base ==0.2.3.12,
llvm-pretty-bc-parser -fuzz -regressions,
lmdb -pkg-config,
any.logict ==0.8.1.0,
any.lucid ==2.11.20230408,
any.lumberjack ==1.0.3.0,
- any.math-functions ==0.3.4.2,
+ any.math-functions ==0.3.4.3,
math-functions +system-erf +system-expm1,
- any.megaparsec ==9.2.1,
+ any.megaparsec ==9.3.1,
megaparsec -dev,
any.memory ==0.18.0,
memory +support_bytestring +support_deepseq,
any.microlens ==0.4.13.1,
- any.microlens-th ==0.4.3.13,
+ any.microlens-th ==0.4.3.14,
any.microstache ==1.0.2.3,
any.mmorph ==1.2.0,
- any.mod ==0.1.2.2,
+ any.mod ==0.2.0.1,
mod +semirings +vector,
- any.modern-uri ==0.3.4.4,
+ any.modern-uri ==0.3.6.1,
modern-uri -dev,
any.monad-control ==1.0.3.1,
any.monadLib ==3.10.1,
any.mono-traversable ==1.0.15.3,
- any.mtl ==2.2.2,
+ any.mtl ==2.3.1,
any.mwc-random ==0.15.0.2,
any.network ==3.1.4.0,
network -devel,
- any.network-byte-order ==0.1.6,
+ any.network-byte-order ==0.1.7,
any.network-info ==0.2.1,
any.newtype-generics ==0.6.2,
any.numtype-dk ==0.5.0.3,
@@ -272,7 +272,7 @@ constraints: any.BoundedChan ==1.0.3.0,
any.panic ==0.4.0.1,
any.parallel ==3.2.2.0,
parameterized-utils +unsafe-operations,
- any.parsec ==3.1.14.0,
+ any.parsec ==3.1.16.1,
any.parser-combinators ==1.3.0,
parser-combinators -dev,
any.pem ==0.2.4,
@@ -284,10 +284,10 @@ constraints: any.BoundedChan ==1.0.3.0,
prettyprinter -buildreadme +text,
any.prettyprinter-ansi-terminal ==1.1.3,
any.primitive ==0.8.0.0,
- any.process ==1.6.13.2,
+ any.process ==1.6.17.0,
any.profunctors ==5.6.2,
- any.psqueues ==0.2.7.3,
- any.quickcheck-instances ==0.3.29.1,
+ any.psqueues ==0.2.8.0,
+ any.quickcheck-instances ==0.3.30,
quickcheck-instances -bytestring-builder,
any.quickcheck-io ==0.2.0,
any.random ==1.2.1.1,
@@ -300,12 +300,12 @@ constraints: any.BoundedChan ==1.0.3.0,
any.regex-posix ==0.96.0.1,
regex-posix -_regex-posix-clib,
any.resourcet ==1.3.0,
- any.rts ==1.0.1,
+ any.rts ==1.0.2,
any.s-cargot ==0.1.6.0,
s-cargot -build-example,
any.safe ==0.3.19,
any.safe-exceptions ==0.1.7.4,
- any.sbv ==9.2,
+ any.sbv ==10.2,
any.scientific ==0.3.7.0,
scientific -bytestring-builder -integer-simple,
any.scotty ==0.12.1,
@@ -317,7 +317,7 @@ constraints: any.BoundedChan ==1.0.3.0,
semigroups +binary +bytestring -bytestring-builder +containers +deepseq +hashable +tagged +template-haskell +text +transformers +unordered-containers,
any.semirings ==0.6,
semirings +containers +unordered-containers,
- any.serialise ==0.2.6.0,
+ any.serialise ==0.2.6.1,
serialise +newtime15,
any.silently ==1.2.5.3,
any.simple-get-opt ==0.4,
@@ -325,11 +325,11 @@ constraints: any.BoundedChan ==1.0.3.0,
simple-sendfile +allow-bsd -fallback,
any.simple-smt ==0.9.7,
any.smallcheck ==1.2.1.1,
- any.split ==0.2.3.5,
- any.splitmix ==0.1.0.4,
+ any.split ==0.2.4,
+ any.splitmix ==0.1.0.5,
splitmix -optimised-mixer,
- any.statistics ==0.16.2.0,
- any.stm ==2.5.0.1,
+ any.statistics ==0.16.2.1,
+ any.stm ==2.5.1.0,
any.streaming-commons ==0.2.2.6,
streaming-commons -use-bytestring-builder,
any.strict ==0.5,
@@ -340,25 +340,25 @@ constraints: any.BoundedChan ==1.0.3.0,
tagged +deepseq +transformers,
any.tasty ==1.4.3,
tasty +unix,
- any.tasty-ant-xml ==1.1.8,
+ any.tasty-ant-xml ==1.1.9,
any.tasty-checklist ==1.0.6.0,
any.tasty-expected-failure ==0.12.3,
any.tasty-golden ==2.3.5,
tasty-golden -build-example,
any.tasty-hedgehog ==1.4.0.1,
any.tasty-hspec ==1.2.0.4,
- any.tasty-hunit ==0.10.0.3,
+ any.tasty-hunit ==0.10.1,
any.tasty-quickcheck ==0.10.2,
any.tasty-smallcheck ==0.8.2,
any.tasty-sugar ==2.2.1.0,
- any.template-haskell ==2.16.0.0,
+ any.template-haskell ==2.20.0.0,
any.temporary ==1.3,
any.terminal-size ==0.3.3,
- any.terminfo ==0.4.1.4,
+ any.terminfo ==0.4.1.6,
any.test-framework ==0.8.2.0,
any.test-framework-hunit ==0.3.0.2,
test-framework-hunit -base3 +base4,
- any.text ==1.2.4.1,
+ any.text ==2.0.2,
any.text-conversions ==0.3.1.1,
any.text-short ==0.1.5,
text-short -asserts,
@@ -371,36 +371,36 @@ constraints: any.BoundedChan ==1.0.3.0,
any.th-orphans ==0.13.14,
any.th-reify-many ==0.1.10,
any.these ==1.2,
- any.time ==1.9.3,
+ any.time ==1.12.2,
any.time-compat ==1.9.6.1,
time-compat -old-locale,
- any.time-manager ==0.0.0,
- any.tls ==1.7.1,
+ any.time-manager ==0.0.1,
+ any.tls ==1.9.0,
tls +compat -hans +network,
any.tls-session-manager ==0.0.4,
- any.transformers ==0.5.6.2,
+ any.transformers ==0.6.1.0,
any.transformers-base ==0.4.6,
transformers-base +orphaninstances,
any.transformers-compat ==0.7.2,
transformers-compat -five +five-three -four +generic-deriving +mtl -three -two,
any.type-equality ==1,
- any.typed-process ==0.2.11.0,
+ any.typed-process ==0.2.11.1,
any.unbounded-delays ==0.1.1.1,
any.uniplate ==1.6.13,
- any.unix ==2.7.2.2,
+ any.unix ==2.8.1.0,
any.unix-compat ==0.7,
unix-compat -old-time,
- any.unix-time ==0.4.10,
+ any.unix-time ==0.4.11,
any.unliftio ==0.2.25.0,
any.unliftio-core ==0.2.1.0,
any.unordered-containers ==0.2.19.1,
unordered-containers -debug,
any.utf8-string ==1.0.2,
any.uuid ==1.3.15,
- any.uuid-types ==1.0.5,
+ any.uuid-types ==1.0.5.1,
any.vault ==0.3.1.5,
vault +useghc,
- any.vector ==0.13.0.0,
+ any.vector ==0.13.1.0,
vector +boundschecks -internalchecks -unsafechecks -wall,
any.vector-algorithms ==0.9.0.1,
vector-algorithms +bench +boundschecks -internalchecks -llvm +properties -unsafechecks,
@@ -414,9 +414,9 @@ constraints: any.BoundedChan ==1.0.3.0,
any.wai-extra ==3.1.13.0,
wai-extra -build-example,
any.wai-logger ==2.4.0,
- any.warp ==3.3.28,
+ any.warp ==3.3.30,
warp +allow-sendfilefd -network-bytestring -warp-debug +x509,
- any.warp-tls ==3.4.0,
+ any.warp-tls ==3.4.3,
any.weigh ==0.0.17,
what4 -drealtestdisable -solvertests -stptestdisable,
any.witherable ==0.4.2,
@@ -430,4 +430,4 @@ constraints: any.BoundedChan ==1.0.3.0,
any.zlib ==0.6.3.0,
zlib -bundled-c-zlib -non-blocking-ffi -pkg-config,
any.zlib-bindings ==0.1.1.5
-index-state: hackage.haskell.org 2023-08-12T09:08:58Z
+index-state: hackage.haskell.org 2023-11-20T16:07:24Z
diff --git a/cabal.project b/cabal.project
index 4b3dc8753f..a282049b7f 100644
--- a/cabal.project
+++ b/cabal.project
@@ -48,4 +48,4 @@ packages:
source-repository-package
type: git
location: https://github.com/eddywestbrook/hobbits.git
- tag: b88cbfcad607a5ad05d9134e1f0b2461dd68c3d7
+ tag: 5fc80ffdce596ca81bf3b6583b1062891d16452c
diff --git a/crucible-mir-comp/src/Mir/Compositional/Builder.hs b/crucible-mir-comp/src/Mir/Compositional/Builder.hs
index 079c654749..b8271368d6 100644
--- a/crucible-mir-comp/src/Mir/Compositional/Builder.hs
+++ b/crucible-mir-comp/src/Mir/Compositional/Builder.hs
@@ -247,7 +247,9 @@ addArg tpr argRef msb =
sv <- regToSetup bak Pre (\_tpr expr -> SAW.mkTypedTerm sc =<< eval expr) shp rv
void $ forNewRefs Pre $ \fr -> do
- let len = fr ^. frAllocSpec . maLen
+ let allocSpec = fr ^. frAllocSpec
+ let len = allocSpec ^. maLen
+ let md = allocSpec ^. maConditionMetadata
svPairs <- forM [0 .. len - 1] $ \i -> do
-- Record a points-to entry
iSym <- liftIO $ W4.bvLit sym knownNat $ BV.mkBV knownNat $ fromIntegral i
@@ -267,12 +269,6 @@ addArg tpr argRef msb =
return (sv, sv')
let (svs, svs') = unzip svPairs
- let md = MS.ConditionMetadata
- { MS.conditionLoc = loc
- , MS.conditionTags = mempty
- , MS.conditionType = "add argument value"
- , MS.conditionContext = ""
- }
msbSpec . MS.csPreState . MS.csPointsTos %= (MirPointsTo md (MS.SetupVar (fr ^. frAlloc)) svs :)
msbSpec . MS.csPostState . MS.csPointsTos %= (MirPointsTo md (MS.SetupVar (fr ^. frAlloc)) svs' :)
@@ -293,7 +289,6 @@ setReturn tpr argRef msb =
ovrWithBackend $ \bak ->
execBuilderT msb $ do
let sym = backendGetSym bak
- loc <- liftIO $ W4.getCurrentProgramLoc sym
let ty = case msb ^. msbSpec . MS.csRet of
Just x -> x
Nothing -> M.TyTuple []
@@ -303,7 +298,9 @@ setReturn tpr argRef msb =
sv <- regToSetup bak Post (\_tpr expr -> SAW.mkTypedTerm sc =<< eval expr) shp rv
void $ forNewRefs Post $ \fr -> do
- let len = fr ^. frAllocSpec . maLen
+ let allocSpec = fr ^. frAllocSpec
+ let len = allocSpec ^. maLen
+ let md = allocSpec ^. maConditionMetadata
svs <- forM [0 .. len - 1] $ \i -> do
-- Record a points-to entry
iSym <- liftIO $ W4.bvLit sym knownNat $ BV.mkBV knownNat $ fromIntegral i
@@ -312,12 +309,6 @@ setReturn tpr argRef msb =
let shp = tyToShapeEq col (fr ^. frMirType) (fr ^. frType)
regToSetup bak Post (\_tpr expr -> SAW.mkTypedTerm sc =<< eval expr) shp rv
- let md = MS.ConditionMetadata
- { MS.conditionLoc = loc
- , MS.conditionTags = mempty
- , MS.conditionType = "set return value"
- , MS.conditionContext = ""
- }
msbSpec . MS.csPostState . MS.csPointsTos %= (MirPointsTo md (MS.SetupVar (fr ^. frAlloc)) svs :)
msbSpec . MS.csRetValue .= Just sv
@@ -650,8 +641,8 @@ substMethodSpec sc sm ms = do
MS.SetupCond_Equal loc <$> goSetupValue sv1 <*> goSetupValue sv2
goSetupCondition (MS.SetupCond_Pred loc tt) =
MS.SetupCond_Pred loc <$> goTypedTerm tt
- goSetupCondition (MS.SetupCond_Ghost b loc gg tt) =
- MS.SetupCond_Ghost b loc gg <$> goTypedTerm tt
+ goSetupCondition (MS.SetupCond_Ghost loc gg tt) =
+ MS.SetupCond_Ghost loc gg <$> goTypedTerm tt
goSetupSlice (MirSetupSliceRaw ref len) =
MirSetupSliceRaw <$> goSetupValue ref <*> goSetupValue len
@@ -779,7 +770,15 @@ refToAlloc bak p mutbl ty tpr ref len = do
Nothing -> do
alloc <- use msbNextAlloc
msbNextAlloc %= MS.nextAllocIndex
- let fr = FoundRef alloc (MirAllocSpec tpr mutbl ty len) ref
+ let sym = backendGetSym bak
+ loc <- liftIO $ W4.getCurrentProgramLoc sym
+ let md = MS.ConditionMetadata
+ { MS.conditionLoc = loc
+ , MS.conditionTags = mempty
+ , MS.conditionType = "reference-to-allocation conversion"
+ , MS.conditionContext = ""
+ }
+ let fr = FoundRef alloc (MirAllocSpec md tpr mutbl ty len) ref
msbPrePost p . seRefs %= (Seq.|> Some fr)
msbPrePost p . seNewRefs %= (Seq.|> Some fr)
return alloc
diff --git a/crucible-mir-comp/src/Mir/Compositional/Clobber.hs b/crucible-mir-comp/src/Mir/Compositional/Clobber.hs
index 0f71c5cc09..f9bebc062d 100644
--- a/crucible-mir-comp/src/Mir/Compositional/Clobber.hs
+++ b/crucible-mir-comp/src/Mir/Compositional/Clobber.hs
@@ -8,7 +8,8 @@ module Mir.Compositional.Clobber
where
import Control.Lens ((^.), (^?), ix)
-import Control.Monad.Except
+import Control.Monad (forM_)
+import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.Map as Map
import qualified Data.Parameterized.Context as Ctx
import Data.Parameterized.TraversableFC
diff --git a/crucible-mir-comp/src/Mir/Compositional/Override.hs b/crucible-mir-comp/src/Mir/Compositional/Override.hs
index da5d4ce55e..ea63c2122f 100644
--- a/crucible-mir-comp/src/Mir/Compositional/Override.hs
+++ b/crucible-mir-comp/src/Mir/Compositional/Override.hs
@@ -581,7 +581,7 @@ condTerm sc (MS.SetupCond_Pred md tt) = do
sub <- use MS.termSub
t' <- liftIO $ SAW.scInstantiateExt sc sub $ SAW.ttTerm tt
return (md, t')
-condTerm _ (MS.SetupCond_Ghost _ _ _ _) = do
+condTerm _ (MS.SetupCond_Ghost _ _ _) = do
error $ "learnCond: SetupCond_Ghost is not supported"
diff --git a/cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs b/cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs
index 39b32169d9..3246bfaa58 100644
--- a/cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs
+++ b/cryptol-saw-core/src/Verifier/SAW/Cryptol/Monadify.hs
@@ -77,9 +77,12 @@ import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.IntMap.Strict (IntMap)
import qualified Data.IntMap.Strict as IntMap
-import Control.Monad.Reader
-import Control.Monad.State
-import Control.Monad.Cont
+import Control.Monad ((>=>), foldM, forM_, zipWithM)
+import Control.Monad.Cont (Cont, cont, runCont)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
+import Control.Monad.State (MonadState(..), StateT(..), evalStateT, modify)
+import Control.Monad.Trans (MonadTrans(..))
import qualified Control.Monad.Fail as Fail
-- import Control.Monad.IO.Class (MonadIO, liftIO)
import qualified Data.Text as T
@@ -849,7 +852,7 @@ emptyMemoTable = IntMap.empty
data MonadifyROState = MonadifyROState {
-- | The monadification environment
monStEnv :: MonadifyEnv,
- -- | The monadification context
+ -- | The monadification context
monStCtx :: MonadifyCtx,
-- | The current @SpecM@ function stack
monStStack :: OpenTerm,
diff --git a/deps/cryptol b/deps/cryptol
index 3973b15236..bd35c9b3b9 160000
--- a/deps/cryptol
+++ b/deps/cryptol
@@ -1 +1 @@
-Subproject commit 3973b15236ace5c11fdfabbf811d97daee7885ed
+Subproject commit bd35c9b3b96f5d21d2608b5229c30eafee729dc5
diff --git a/deps/language-rust b/deps/language-rust
index 9d509c450d..82acd312c0 160000
--- a/deps/language-rust
+++ b/deps/language-rust
@@ -1 +1 @@
-Subproject commit 9d509c450d009cc99f1180b3f2f30247dfb1cfce
+Subproject commit 82acd312c0cd2b467ea8fa2a0feb316185b52c69
diff --git a/doc/manual/manual.md b/doc/manual/manual.md
index 709fe3d9ec..b6e5beb656 100644
--- a/doc/manual/manual.md
+++ b/doc/manual/manual.md
@@ -2122,8 +2122,6 @@ some parts of `mir_verify` are not currently implemented, so it is possible
that using `mir_verify` on some programs will fail. Features that are not yet
implemented include the following:
-* MIR specifications that use overrides (i.e., the `[MIRSpec]` argument to
- `mir_verify` must always be the empty list at present)
* The ability to construct MIR `enum` values in specifications
The `String` supplied as an argument to `mir_verify` is expected to be a
@@ -2416,6 +2414,296 @@ In this case, doing the verification compositionally doesn't save
computational effort, since the functions are so simple, but it
illustrates the approach.
+### Compositional Verification and Mutable Allocations
+
+A common pitfall when using compositional verification is to reuse a
+specification that underspecifies the value of a mutable allocation. In
+general, doing so can lead to unsound verification, so SAW goes through great
+lengths to check for this.
+
+Here is an example of this pitfall in an LLVM verification. Given this C code:
+
+~~~ .c
+void side_effect(uint32_t *a) {
+ *a = 0;
+}
+
+uint32_t foo(uint32_t x) {
+ uint32_t b = x;
+ side_effect(&b);
+ return b;
+}
+~~~
+
+And the following SAW specifications:
+
+~~~
+let side_effect_spec = do {
+ a_ptr <- llvm_alloc (llvm_int 32);
+ a_val <- llvm_fresh_var "a_val" (llvm_int 32);
+ llvm_points_to a_ptr (llvm_term a_val);
+
+ llvm_execute_func [a_ptr];
+};
+
+let foo_spec = do {
+ x <- llvm_fresh_var "x" (llvm_int 32);
+
+ llvm_execute_func [llvm_term x];
+
+ llvm_return (llvm_term x);
+};
+~~~
+
+Should SAW be able to verify the `foo` function against `foo_spec` using
+compositional verification? That is, should the following be expected to work?
+
+~~~
+side_effect_ov <- llvm_verify m "side_effect" [] false side_effect_spec z3;
+llvm_verify m "foo" [side_effect_ov] false foo_spec z3;
+~~~
+
+A literal reading of `side_effect_spec` would suggest that the `side_effect`
+function allocates `a_ptr` but then does nothing with it, implying that `foo`
+returns its argument unchanged. This is incorrect, however, as the
+`side_effect` function actually changes its argument to point to `0`, so the
+`foo` function ought to return `0` as a result. SAW should not verify `foo`
+against `foo_spec`, and indeed it does not.
+
+The problem is that `side_effect_spec` underspecifies the value of `a_ptr` in
+its postconditions, which can lead to the potential unsoundness seen above when
+`side_effect_spec` is used in compositional verification. To prevent this
+source of unsoundness, SAW will _invalidate_ the underlying memory of any
+mutable pointers (i.e., those declared with `llvm_alloc`, not
+`llvm_alloc_global`) allocated in the preconditions of compositional override
+that do not have a corresponding `llvm_points_to` statement in the
+postconditions. Attempting to read from invalidated memory constitutes an
+error, as can be seen in this portion of the error message when attempting to
+verify `foo` against `foo_spec`:
+
+~~~
+invalidate (state of memory allocated in precondition (at side.saw:3:12) not described in postcondition)
+~~~
+
+To fix this particular issue, add an `llvm_points_to` statement to
+`side_effect_spec`:
+
+~~~
+let side_effect_spec = do {
+ a_ptr <- llvm_alloc (llvm_int 32);
+ a_val <- llvm_fresh_var "a_val" (llvm_int 32);
+ llvm_points_to a_ptr (llvm_term a_val);
+
+ llvm_execute_func [a_ptr];
+
+ // This is new
+ llvm_points_to a_ptr (llvm_term {{ 0 : [32] }});
+};
+~~~
+
+After making this change, SAW will reject `foo_spec` for a different reason, as
+it claims that `foo` returns its argument unchanged when it actually returns
+`0`.
+
+Note that invalidating memory itself does not constitute an error, so if the
+`foo` function never read the value of `b` after calling `side_effect(&b)`,
+then there would be no issue. It is only when a function attempts to _read_
+from invalidated memory that an error is thrown. In general, it can be
+difficult to predict when a function will or will not read from invalidated
+memory, however. For this reason, it is recommended to always specify the
+values of mutable allocations in the postconditions of your specs, as it can
+avoid pitfalls like the one above.
+
+The same pitfalls apply to compositional MIR verification, with a couple of key
+differences. In MIR verification, mutable references are allocated using
+`mir_alloc_mut`. Here is a Rust version of the pitfall program above:
+
+~~~ .rs
+pub fn side_effect(a: &mut u32) {
+ *a = 0;
+}
+
+pub fn foo(x: u32) -> u32 {
+ let mut b: u32 = x;
+ side_effect(&mut b);
+ b
+}
+~~~
+
+~~~
+let side_effect_spec = do {
+ a_ref <- mir_alloc_mut mir_u32;
+ a_val <- mir_fresh_var "a_val" mir_u32;
+ mir_points_to a_ref (mir_term a_val);
+
+ mir_execute_func [a_ref];
+};
+
+let foo_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+
+ mir_execute_func [mir_term x];
+
+ mir_return (mir_term {{ x }});
+};
+~~~
+
+Just like above, if you attempted to prove `foo` against `foo_spec` using
+compositional verification:
+
+~~~
+side_effect_ov <- mir_verify m "test::side_effect" [] false side_effect_spec z3;
+mir_verify m "test::foo" [side_effect_ov] false foo_spec z3;
+~~~
+
+Then SAW would throw an error, as `side_effect_spec` underspecifies the value
+of `a_ref` in its postconditions. `side_effect_spec` can similarly be repaired
+by adding a `mir_points_to` statement involving `a_ref` in `side_effect_spec`'s
+postconditions.
+
+MIR verification differs slightly from LLVM verification in how it catches
+underspecified mutable allocations when using compositional overrides. The LLVM
+memory model achieves this by invalidating the underlying memory in
+underspecified allocations. The MIR memory model, on the other hand, does not
+have a direct counterpart to memory invalidation. As a result, any MIR overrides
+must specify the values of all mutable allocations in their postconditions,
+_even if the function that calls the override never uses the allocations_.
+
+To illustrate this point more finely, suppose that the `foo` function had
+instead been defined like this:
+
+~~~ .rs
+pub fn foo(x: u32) -> u32 {
+ let mut b: u32 = x;
+ side_effect(&mut b);
+ 42
+}
+~~~
+
+Here, it does not particularly matter what effects the `side_effect` function
+has on its argument, as `foo` will now return `42` regardless. Still, if you
+attempt to prove `foo` by using `side_effect` as a compositional override, then
+it is strictly required that you specify the value of `side_effect`'s argument
+in its postconditions, even though the answer that `foo` returns is unaffected
+by this. This is in contrast with LLVM verification, where one could get away
+without specifying `side_effect`'s argument in this example, as the invalidated
+memory in `b` would never be read.
+
+### Compositional Verification and Mutable Global Variables
+
+Just like with local mutable allocations (see the previous section),
+specifications used in compositional overrides must specify the values of
+mutable global variables in their postconditions. To illustrate this using LLVM
+verification, here is a variant of the C program from the previous example that
+uses a mutable global variable `a`:
+
+~~~ .c
+
+uint32_t a = 42;
+
+void side_effect(void) {
+ a = 0;
+}
+
+uint32_t foo(void) {
+ side_effect();
+ return a;
+}
+~~~
+
+If we attempted to verify `foo` against this `foo_spec` specification using
+compositional verification:
+
+~~~
+let side_effect_spec = do {
+ llvm_alloc_global "a";
+ llvm_points_to (llvm_global "a") (llvm_global_initializer "a");
+
+ llvm_execute_func [];
+};
+
+let foo_spec = do {
+ llvm_alloc_global "a";
+ llvm_points_to (llvm_global "a") (llvm_global_initializer "a");
+
+ llvm_execute_func [];
+
+ llvm_return (llvm_global_initializer "a");
+};
+
+side_effect_ov <- llvm_verify m "side_effect" [] false side_effect_spec z3;
+llvm_verify m "foo" [side_effect_ov] false foo_spec z3;
+~~~
+
+Then SAW would reject it, as `side_effect_spec` does not specify what `a`'s
+value should be in its postconditions. Just as with local mutable allocations,
+SAW will invalidate the underlying memory in `a`, and subsequently reading from
+`a` in the `foo` function will throw an error. The solution is to add an
+`llvm_points_to` statement in the postconditions that declares that `a`'s value
+is set to `0`.
+
+The same concerns apply to MIR verification, where mutable global variables are
+referred to as `static mut` items. (See the [MIR static
+items](#mir-static-items) section for more information). Here is a Rust version
+of the program above:
+
+~~~ .rs
+static mut A: u32 = 42;
+
+pub fn side_effect() {
+ unsafe {
+ A = 0;
+ }
+}
+
+pub fn foo() -> u32 {
+ side_effect();
+ unsafe { A }
+}
+~~~
+
+~~~
+let side_effect_spec = do {
+ mir_points_to (mir_static "test::A") (mir_static_initializer "test::A");
+
+ mir_execute_func [];
+};
+
+let foo_spec = do {
+ mir_points_to (mir_static "test::A") (mir_static_initializer "test::A");
+
+ mir_execute_func [];
+
+ mir_return (mir_static_initializer "test::A");
+};
+
+side_effect_ov <- mir_verify m "side_effect" [] false side_effect_spec z3;
+mir_verify m "foo" [side_effect_ov] false foo_spec z3;
+~~~
+
+Just as above, we can repair this by adding a `mir_points_to` statement in
+`side_effect_spec`'s postconditions that specifies that `A` is set to `0`.
+
+Recall from the previous section that MIR verification is stricter than LLVM
+verification when it comes to specifying mutable allocations in the
+postconditions of compositional overrides. This is especially true for mutable
+static items. In MIR verification, any compositional overrides must specify the
+values of all mutable static items in the entire program in their
+postconditions, _even if the function that calls the override never uses the
+static items_. For example, if the `foo` function were instead defined like
+this:
+
+~~~ .rs
+pub fn foo() -> u32 {
+ side_effect();
+ 42
+}
+~~~
+
+Then it is still required for `side_effect_spec` to specify what `A`'s value
+will be in its postconditions, despite the fact that this has no effect on the
+value that `foo` will return.
+
## Specifying Heap Layout
Most functions that operate on pointers expect that certain pointers
@@ -2906,7 +3194,9 @@ accounted for explicitly in the specification: if `llvm_alloc_global` is
used in the precondition, there must be a corresponding `llvm_points_to`
in the postcondition describing the new state of that global. Otherwise, a
specification might not fully capture the behavior of the function, potentially
-leading to unsoundness in the presence of compositional verification.
+leading to unsoundness in the presence of compositional verification. (For more
+details on this point, see the [Compositional Verification and Mutable Global
+Variables](#compositional-verification-and-mutable-global-variables) section.)
Immutable (i.e. `const`) global variables are allocated implicitly, and do not
require a call to `llvm_alloc_global`.
@@ -3062,6 +3352,13 @@ m <- mir_load_module "statics.linked-mir.json";
mir_verify m "statics::f" [] false f_spec z3;
~~~
+In order to use a specification involving mutable static items for
+compositional verification, it is required to specify the value of all mutable
+static items using the `mir_points_to` command in the specification's
+postconditions. For more details on this point, see the [Compositional
+Verification and Mutable Global
+Variables](#compositional-verification-and-mutable-global-variables) section.
+
## Preconditions and Postconditions
Sometimes a function is only well-defined under certain conditions, or
@@ -3099,18 +3396,18 @@ the target code. However, in some cases, it can be useful to use a
`MethodSpec` to specify some code that either doesn't exist or is hard
to prove. The previously-mentioned [`assume_unsat`
tactic](#miscellaneous-tactics) omits proof but does not prevent
-simulation of the function. To skip simulation altogether, one can use:
+simulation of the function. To skip simulation altogether, one can use
+one of the following commands:
~~~
llvm_unsafe_assume_spec :
LLVMModule -> String -> LLVMSetup () -> TopLevel CrucibleMethodSpec
-~~~
-Or, in the experimental JVM implementation:
-
-~~~
jvm_unsafe_assume_spec :
JavaClass -> String -> JVMSetup () -> TopLevel JVMMethodSpec
+
+mir_unsafe_assume_spec :
+ MIRModule -> String -> MIRSetup () -> TopLevel MIRSpec
~~~
## A Heap-Based Example
@@ -3244,18 +3541,19 @@ thought of as additional global state that is visible only to the
verifier. Ghost state with a given name can be declared at the top level
with the following function:
-* `llvm_declare_ghost_state : String -> TopLevel Ghost`
+* `declare_ghost_state : String -> TopLevel Ghost`
Ghost state variables do not initially have any particluar type, and can
store data of any type. Given an existing ghost variable the following
-function can be used to specify its value:
+functions can be used to specify its value:
* `llvm_ghost_value : Ghost -> Term -> LLVMSetup ()`
+* `jvm_ghost_value : Ghost -> Term -> JVMSetup ()`
+* `mir_ghost_value : Ghost -> Term -> MIRSetup ()`
-Currently, this function can only be used for LLVM verification, though
-that will likely be generalized in the future. It can be used in either
-the pre state or the post state, to specify the value of ghost state
-either before or after the execution of the function, respectively.
+These can be used in either the pre state or the post state, to specify the
+value of ghost state either before or after the execution of the function,
+respectively.
## An Extended Example
diff --git a/doc/manual/manual.pdf b/doc/manual/manual.pdf
index b5a529af27..67f1cbdc2d 100644
Binary files a/doc/manual/manual.pdf and b/doc/manual/manual.pdf differ
diff --git a/examples/ghost/ghost.saw b/examples/ghost/ghost.saw
index 3e1dba3071..685ed46c45 100644
--- a/examples/ghost/ghost.saw
+++ b/examples/ghost/ghost.saw
@@ -16,7 +16,7 @@ let example_spec counter : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- counter <- llvm_declare_ghost_state "ctr";
+ counter <- declare_ghost_state "ctr";
m <- llvm_load_module "simple.bc";
next <- llvm_unsafe_assume_spec m "next" (next_spec counter);
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/CruUtil.hs b/heapster-saw/src/Verifier/SAW/Heapster/CruUtil.hs
index a5941f520e..c1617ae2e9 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/CruUtil.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/CruUtil.hs
@@ -32,7 +32,7 @@ import Numeric
import Numeric.Natural
import qualified Data.BitVector.Sized as BV
import System.FilePath
-import GHC.TypeNats
+import GHC.TypeNats (KnownNat, natVal)
import Data.Functor.Product
import Control.Lens hiding ((:>), Index, Empty, ix, op)
import qualified Control.Monad.Fail as Fail
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/GenMonad.hs b/heapster-saw/src/Verifier/SAW/Heapster/GenMonad.hs
index 47e14c81ac..91bc25b060 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/GenMonad.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/GenMonad.hs
@@ -18,7 +18,8 @@ module Verifier.SAW.Heapster.GenMonad (
) where
import Data.Binding.Hobbits ( nuMulti, nuMultiWithElim1, Mb, Name, RAssign )
-import Control.Monad.State ( ap, MonadState(get, put) )
+import Control.Monad ( ap )
+import Control.Monad.State ( MonadState(get, put) )
import Control.Monad.Trans.Class ( MonadTrans(lift) )
import Control.Monad.Trans.Reader
import Data.Proxy
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/IRTTranslation.hs b/heapster-saw/src/Verifier/SAW/Heapster/IRTTranslation.hs
index 33f65f3a83..42b5986b0e 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/IRTTranslation.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/IRTTranslation.hs
@@ -34,9 +34,10 @@ module Verifier.SAW.Heapster.IRTTranslation (
import Numeric.Natural
import Data.Functor.Const
import GHC.TypeLits
-import Control.Monad.Reader
-import Control.Monad.State
-import Control.Monad.Except
+import Control.Monad (zipWithM)
+import Control.Monad.Except (MonadError(..))
+import Control.Monad.Reader (MonadReader(..), ReaderT(..), withReaderT)
+import Control.Monad.State (MonadState(..), State, evalState)
import qualified Data.Type.RList as RL
import Data.Binding.Hobbits
@@ -209,7 +210,7 @@ irtTMbCombine x =
-- | Create an @args :++: ext@ binding
irtNus :: (RAssign Name args -> RAssign Name ext -> b) ->
IRTTyVarsTransM args ext (Mb (args :++: ext) b)
-irtNus f =
+irtNus f =
do args <- irtTArgsCtx <$> ask
ext <- irtTExtCtx <$> ask
return $ mbCombine ext (nus (RL.map (\_->Proxy) args) (nus ext . f))
@@ -560,7 +561,7 @@ irtCtor c all_args =
-- recursive permission/shape body given here, and an 'IRTVarIdxs' which is
-- the second result of the same call to 'translateCompletePermIRTTyVars',
-- translate the given recursive permission body to an IRT type description
-translateCompleteIRTDesc :: IRTDescs a => SharedContext -> PermEnv ->
+translateCompleteIRTDesc :: IRTDescs a => SharedContext -> PermEnv ->
Ident -> CruCtx args ->
Mb args a -> IRTVarIdxs -> IO TypedTerm
translateCompleteIRTDesc sc env tyVarsIdent args p ixs =
@@ -738,7 +739,7 @@ instance IRTDescs (RAssign ValuePerm ps) where
-- of corresponding calls to 'translateCompleteIRTDesc' and
-- 'translateCompletePermIRTTyVars' or 'translateCompleteShapeIRTTyVars',
-- return a term which is @IRT@ applied to these identifiers
-translateCompleteIRTDef :: SharedContext -> PermEnv ->
+translateCompleteIRTDef :: SharedContext -> PermEnv ->
Ident -> Ident -> CruCtx args ->
IO TypedTerm
translateCompleteIRTDef sc env tyVarsIdent descIdent args =
@@ -751,7 +752,7 @@ translateCompleteIRTDef sc env tyVarsIdent descIdent args =
-- 'translateCompleteIRTDesc', and 'translateCompletePermIRTTyVars' or
-- 'translateCompleteShapeIRTTyVars', return a term which is @foldIRT@ applied
-- to these identifiers
-translateCompleteIRTFoldFun :: SharedContext -> PermEnv ->
+translateCompleteIRTFoldFun :: SharedContext -> PermEnv ->
Ident -> Ident -> Ident -> CruCtx args ->
IO Term
translateCompleteIRTFoldFun sc env tyVarsIdent descIdent _ args =
@@ -764,7 +765,7 @@ translateCompleteIRTFoldFun sc env tyVarsIdent descIdent _ args =
-- 'translateCompleteIRTDesc', and 'translateCompletePermIRTTyVars' or
-- 'translateCompleteShapeIRTTyVars', return a term which is @unfoldIRT@
-- applied to these identifiers
-translateCompleteIRTUnfoldFun :: SharedContext -> PermEnv ->
+translateCompleteIRTUnfoldFun :: SharedContext -> PermEnv ->
Ident -> Ident -> Ident -> CruCtx args ->
IO Term
translateCompleteIRTUnfoldFun sc env tyVarsIdent descIdent _ args =
@@ -775,7 +776,7 @@ translateCompleteIRTUnfoldFun sc env tyVarsIdent descIdent _ args =
-- | Get the terms for the arguments to @IRT@, @foldIRT@, and @unfoldIRT@
-- given the appropriate identifiers
irtDefArgs :: Ident -> Ident -> TypeTransM args (OpenTerm, OpenTerm, OpenTerm)
-irtDefArgs tyVarsIdent descIdent =
+irtDefArgs tyVarsIdent descIdent =
do args <- askExprCtxTerms
let tyVars = applyOpenTermMulti (globalOpenTerm tyVarsIdent) args
substs = ctorOpenTerm "Prelude.IRTs_Nil" [tyVars]
@@ -783,18 +784,18 @@ irtDefArgs tyVarsIdent descIdent =
return (tyVars, substs, desc)
irtDefinition :: Ident -> Ident -> TypeTransM args OpenTerm
-irtDefinition tyVarsIdent descIdent =
+irtDefinition tyVarsIdent descIdent =
do (tyVars, substs, desc) <- irtDefArgs tyVarsIdent descIdent
return $ dataTypeOpenTerm "Prelude.IRT" [tyVars, substs, desc]
irtFoldFun :: Ident -> Ident -> TypeTransM args OpenTerm
-irtFoldFun tyVarsIdent descIdent =
+irtFoldFun tyVarsIdent descIdent =
do (tyVars, substs, desc) <- irtDefArgs tyVarsIdent descIdent
return $ applyOpenTermMulti (globalOpenTerm "Prelude.foldIRT")
[tyVars, substs, desc]
irtUnfoldFun :: Ident -> Ident -> TypeTransM args OpenTerm
-irtUnfoldFun tyVarsIdent descIdent =
+irtUnfoldFun tyVarsIdent descIdent =
do (tyVars, substs, desc) <- irtDefArgs tyVarsIdent descIdent
return $ applyOpenTermMulti (globalOpenTerm "Prelude.unfoldIRT")
[tyVars, substs, desc]
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/Implication.hs b/heapster-saw/src/Verifier/SAW/Heapster/Implication.hs
index 7315c6aae1..620a3d77a0 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/Implication.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/Implication.hs
@@ -7,7 +7,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ConstraintKinds #-}
-{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
@@ -34,11 +33,13 @@ import Data.List
import Data.Functor.Compose
import Data.Reflection
import qualified Data.BitVector.Sized as BV
-import GHC.TypeLits
+import GHC.TypeLits (KnownNat)
import Control.Lens hiding ((:>), ix)
-import Control.Applicative
+import qualified Control.Applicative as App
+import Control.Monad (forM_)
import Control.Monad.Extra (concatMapM)
-import Control.Monad.State.Strict hiding (ap)
+import Control.Monad.State.Strict (MonadState(..), State, StateT, evalState, execStateT)
+import Control.Monad.Trans.Class (MonadTrans(..))
import qualified Data.Type.RList as RL
import Data.Binding.Hobbits.MonadBind
@@ -316,7 +317,7 @@ instance Applicative SomeEqProof where
liftA2 f (SomeEqProofRefl a) some_eqp = fmap (f a) some_eqp
liftA2 f some_eqp (SomeEqProofRefl b) = fmap (flip f b) some_eqp
liftA2 f (SomeEqProofCons eqp1 step1) (SomeEqProofCons eqp2 step2) =
- SomeEqProofCons (liftA2 f eqp1 eqp2) (eqProofStepLiftA2 f step1 step2)
+ SomeEqProofCons (App.liftA2 f eqp1 eqp2) (eqProofStepLiftA2 f step1 step2)
-- | An 'EqProofStep' with an existentially quantified list of permissions
data SomeEqProofStep a = forall ps. SomeEqProofStep (EqProofStep ps a)
@@ -6085,7 +6086,7 @@ instance ProveEq (LLVMFramePerm w) where
| mbLift mb_i == i =
do eqp1 <- proveEq e mb_e
eqp2 <- proveEq fperms mb_fperms
- pure (liftA2 (\x y -> (x,i):y) eqp1 eqp2)
+ pure (App.liftA2 (\x y -> (x,i):y) eqp1 eqp2)
proveEq perms mb =
use implStatePPInfo >>>= \ppinfo ->
implFailM $ EqualityProofError
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs b/heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs
index 66f301fca4..ee0906ee1e 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/LLVMGlobalConst.hs
@@ -12,8 +12,10 @@ module Verifier.SAW.Heapster.LLVMGlobalConst (
import Data.Bits
import Data.List
-import Control.Monad.Reader
-import GHC.TypeLits
+import Control.Monad (MonadPlus(..))
+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
+import Control.Monad.Trans.Class (MonadTrans(..))
+import GHC.TypeLits (KnownNat)
import qualified Text.PrettyPrint.HughesPJ as PPHPJ
import qualified Data.BitVector.Sized as BV
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/Permissions.hs b/heapster-saw/src/Verifier/SAW/Heapster/Permissions.hs
index 3925b582a0..fc38f5c7ac 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/Permissions.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/Permissions.hs
@@ -46,17 +46,18 @@ import Data.Functor.Compose
import qualified Data.BitVector.Sized as BV
import Data.BitVector.Sized (BV)
import Numeric.Natural
-import GHC.TypeLits
+import GHC.TypeLits (KnownNat, natVal)
import Data.Kind
import Data.Map.Strict (Map)
import qualified Data.Map.Strict as Map
import Data.Set (Set)
import qualified Data.Set as Set
import Control.Applicative hiding (empty)
+import Control.Monad (MonadPlus(..))
import Control.Monad.Extra (concatMapM)
-import Control.Monad.Identity hiding (ap)
-import Control.Monad.State hiding (ap)
-import Control.Monad.Reader hiding (ap)
+import Control.Monad.Identity ()
+import Control.Monad.Reader (MonadReader(..), Reader, ReaderT(..), runReader)
+import Control.Monad.State (MonadState(..), State, evalState, modify)
import Control.Lens hiding ((:>), Index, Empty, ix, op)
import Data.Binding.Hobbits hiding (sym)
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs b/heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs
index 8dad282f13..81fc1f2096 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/RustTypes.hs
@@ -36,9 +36,11 @@ import GHC.TypeLits
import qualified Data.BitVector.Sized as BV
import Data.Functor.Constant
import Data.Functor.Product
-import Control.Applicative
-import Control.Monad.Reader
-import Control.Monad.Except
+import qualified Control.Applicative as App
+import Control.Monad (MonadPlus(..))
+import Control.Monad.Except (Except, MonadError(..), runExcept)
+import Control.Monad.Reader (MonadReader(..), ReaderT(..), asks)
+import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Monad.Trans.Maybe
import qualified Control.Monad.Fail as Fail
@@ -1313,7 +1315,7 @@ data SomeMbWithPerms a where
instance Functor SomeMbWithPerms where
fmap f (SomeMbWithPerms ctx ps mb_a) = SomeMbWithPerms ctx ps (fmap f mb_a)
-instance Applicative SomeMbWithPerms where
+instance App.Applicative SomeMbWithPerms where
pure a = SomeMbWithPerms CruCtxNil (emptyMb MNil) $ emptyMb a
liftA2 f (SomeMbWithPerms ctx1 mb_ps1 mb_a1) (SomeMbWithPerms ctx2 mb_ps2 mb_a2) =
SomeMbWithPerms (appendCruCtx ctx1 ctx2)
@@ -1551,7 +1553,7 @@ parseFunPermFromRust :: (Fail.MonadFail m, 1 <= w, KnownNat w) =>
parseFunPermFromRust env w args ret str =
do get3SomeFunPerm <- parseSome3FunPermFromRust env w str
un3SomeFunPerm args ret get3SomeFunPerm
-
+
-- | Just like `parseFunPermFromRust`, but returns a `Some3FunPerm`
parseSome3FunPermFromRust :: (Fail.MonadFail m, 1 <= w, KnownNat w) =>
@@ -1585,10 +1587,7 @@ parseSome3FunPermFromRust _ _ str =
parseNamedShapeFromRustDecl :: (Fail.MonadFail m, 1 <= w, KnownNat w) =>
PermEnv -> prx w -> String ->
m (SomePartialNamedShape w)
-parseNamedShapeFromRustDecl env w str
- | Right item <- parse @(Item Span) (inputStreamFromString str) =
- runLiftRustConvM (mkRustConvInfo env) $ rsConvert w item
- | Left err <- parse @(Item Span) (inputStreamFromString str) =
- fail ("Error parsing top-level item: " ++ show err)
-parseNamedShapeFromRustDecl _ _ str =
- fail ("Malformed Rust type: " ++ str)
+parseNamedShapeFromRustDecl env w str =
+ case parse @(Item Span) (inputStreamFromString str) of
+ Right item -> runLiftRustConvM (mkRustConvInfo env) $ rsConvert w item
+ Left err -> fail ("Error parsing top-level item: " ++ show err)
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/SAWTranslation.hs b/heapster-saw/src/Verifier/SAW/Heapster/SAWTranslation.hs
index 7369ccecc6..c8ca5a60d8 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/SAWTranslation.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/SAWTranslation.hs
@@ -36,16 +36,17 @@ import Data.Maybe
import Numeric.Natural
import Data.List hiding (inits)
import Data.Text (pack)
-import GHC.TypeLits
+import GHC.TypeLits (KnownNat, natVal)
import Data.BitVector.Sized (BV)
import qualified Data.BitVector.Sized as BV
import Data.Functor.Compose
-import Control.Applicative
+import qualified Control.Applicative as App
import Control.Lens hiding ((:>), Index, ix, op)
-import Control.Monad.Reader hiding (ap)
-import Control.Monad.Writer hiding (ap)
-import Control.Monad.State hiding (ap)
+import Control.Monad (MonadPlus(..), zipWithM)
+import Control.Monad.Reader (MonadReader(..), Reader, runReader, withReader)
+import Control.Monad.State (MonadState(..), StateT, evalStateT)
import Control.Monad.Trans.Maybe
+import Control.Monad.Writer (MonadWriter(..), Writer, runWriter)
import qualified Control.Monad.Fail as Fail
import What4.ProgramLoc
@@ -212,7 +213,7 @@ strictTupleTypeTrans ttrans =
-- | Build a type translation for a list of translations
listTypeTrans :: [TypeTrans tr] -> TypeTrans [tr]
listTypeTrans [] = pure []
-listTypeTrans (trans:transs) = liftA2 (:) trans $ listTypeTrans transs
+listTypeTrans (trans:transs) = App.liftA2 (:) trans $ listTypeTrans transs
-- | The result of translating a 'PermExpr' at 'CrucibleType' @a@. This is a
@@ -879,7 +880,7 @@ instance TransInfo info =>
translate mb_ctx = case mbMatch mb_ctx of
[nuMP| CruCtxNil |] -> return $ mkTypeTrans0 MNil
[nuMP| CruCtxCons ctx tp |] ->
- liftA2 (:>:) <$> translate ctx <*> translate tp
+ App.liftA2 (:>:) <$> translate ctx <*> translate tp
-- | Translate all types in a Crucible context and lambda-abstract over them
lambdaExprCtx :: TransInfo info => CruCtx ctx -> TransM info ctx OpenTerm ->
@@ -1985,7 +1986,7 @@ instance TransInfo info =>
translate mb_ps = case mbMatch mb_ps of
[nuMP| ValPerms_Nil |] -> return $ mkTypeTrans0 MNil
[nuMP| ValPerms_Cons ps p |] ->
- liftA2 (:>:) <$> translate ps <*> translate p
+ App.liftA2 (:>:) <$> translate ps <*> translate p
-- Translate a DistPerms by translating its corresponding ValuePerms
instance TransInfo info =>
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/TypedCrucible.hs b/heapster-saw/src/Verifier/SAW/Heapster/TypedCrucible.hs
index 38c95b1e24..708b73eda5 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/TypedCrucible.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/TypedCrucible.hs
@@ -38,15 +38,18 @@ import Data.Type.Equality
import Data.Kind
import Data.Reflection
import qualified Data.BitVector.Sized as BV
-import GHC.TypeLits
+import GHC.TypeLits (KnownNat)
import What4.ProgramLoc
import What4.FunctionName
import What4.Interface (StringLiteral(..))
import Control.Lens hiding ((:>), Index, ix)
-import Control.Monad.State.Strict hiding (ap)
-import Control.Monad.Reader hiding (ap)
+import Control.Monad ((>=>), foldM, forM, forM_)
+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
+import Control.Monad.State.Strict (MonadState(..), State, evalState, execState,
+ gets, modify, runState)
+import Control.Monad.Trans.Class (MonadTrans(..))
import Prettyprinter as PP
diff --git a/heapster-saw/src/Verifier/SAW/Heapster/Widening.hs b/heapster-saw/src/Verifier/SAW/Heapster/Widening.hs
index 0e61cea46c..278e25f211 100644
--- a/heapster-saw/src/Verifier/SAW/Heapster/Widening.hs
+++ b/heapster-saw/src/Verifier/SAW/Heapster/Widening.hs
@@ -7,7 +7,6 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ConstraintKinds #-}
-{-# LANGUAGE TypeInType #-}
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
@@ -31,11 +30,13 @@ module Verifier.SAW.Heapster.Widening where
import Data.Maybe
import Data.List
+import Data.Functor (void)
import Data.Functor.Constant
import Data.Functor.Product
-import Control.Monad.State
--- import Control.Monad.Cont
-import GHC.TypeLits
+import Control.Monad (ap, zipWithM)
+import Control.Monad.State (MonadState(..), StateT(..), modify)
+import Control.Monad.Trans.Class (MonadTrans(..))
+import GHC.TypeLits (KnownNat)
import Control.Lens hiding ((:>), Index, Empty, ix, op)
import Control.Monad.Extra (concatMapM)
diff --git a/intTests/test_ghost/test.saw b/intTests/test_ghost/test.saw
index 24b38a02dd..951a09423d 100644
--- a/intTests/test_ghost/test.saw
+++ b/intTests/test_ghost/test.saw
@@ -26,7 +26,7 @@ let f_spec (counter : Ghost) : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- counter <- llvm_declare_ghost_state "counter";
+ counter <- declare_ghost_state "counter";
m <- llvm_load_module "test.bc";
get_and_increment_ov <-
llvm_unsafe_assume_spec m "get_and_increment" (get_and_increment_spec counter);
diff --git a/intTests/test_ghost_branch_00/test.saw b/intTests/test_ghost_branch_00/test.saw
index 78d1b77983..3fa4841445 100644
--- a/intTests/test_ghost_branch_00/test.saw
+++ b/intTests/test_ghost_branch_00/test.saw
@@ -25,7 +25,7 @@ let g_spec : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- x <- llvm_declare_ghost_state "x";
+ x <- declare_ghost_state "x";
m <- llvm_load_module "test.bc";
f_lt_ov <- llvm_unsafe_assume_spec m "f" (f_lt_spec x);
f_ge_ov <- llvm_unsafe_assume_spec m "f" (f_ge_spec x);
diff --git a/intTests/test_ghost_branch_01/test.saw b/intTests/test_ghost_branch_01/test.saw
index 6d41b68b25..87b13e5ec1 100644
--- a/intTests/test_ghost_branch_01/test.saw
+++ b/intTests/test_ghost_branch_01/test.saw
@@ -28,7 +28,7 @@ let h_spec : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- x <- llvm_declare_ghost_state "x";
+ x <- declare_ghost_state "x";
m <- llvm_load_module "test.bc";
get_ov <- llvm_unsafe_assume_spec m "get" (get_spec x);
f_ov <- llvm_unsafe_assume_spec m "f" (f_spec x);
diff --git a/intTests/test_ghost_branch_02/test.saw b/intTests/test_ghost_branch_02/test.saw
index 55f5eb8047..3efffb984d 100644
--- a/intTests/test_ghost_branch_02/test.saw
+++ b/intTests/test_ghost_branch_02/test.saw
@@ -21,7 +21,7 @@ let g_spec : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- x <- llvm_declare_ghost_state "x";
+ x <- declare_ghost_state "x";
m <- llvm_load_module "test.bc";
f_lt_ov <- llvm_unsafe_assume_spec m "f" (f_lt_spec x);
f_ge_ov <- llvm_unsafe_assume_spec m "f" (f_ge_spec x);
diff --git a/intTests/test_ghost_branch_03/test.saw b/intTests/test_ghost_branch_03/test.saw
index 30f7373e5f..3f6bfd5393 100644
--- a/intTests/test_ghost_branch_03/test.saw
+++ b/intTests/test_ghost_branch_03/test.saw
@@ -28,7 +28,7 @@ let h_spec : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- x <- llvm_declare_ghost_state "x";
+ x <- declare_ghost_state "x";
m <- llvm_load_module "test.bc";
get_ov <- llvm_unsafe_assume_spec m "get" (get_spec x);
f_ov <- llvm_unsafe_assume_spec m "f" (f_spec x);
diff --git a/intTests/test_ghost_types_00/test.saw b/intTests/test_ghost_types_00/test.saw
index f88faaef10..fc61fe0a86 100644
--- a/intTests/test_ghost_types_00/test.saw
+++ b/intTests/test_ghost_types_00/test.saw
@@ -23,7 +23,7 @@ let h_spec : CrucibleSetup () = do {
};
let main : TopLevel () = do {
- x <- llvm_declare_ghost_state "x";
+ x <- declare_ghost_state "x";
m <- llvm_load_module "test.bc";
f_ov <- llvm_unsafe_assume_spec m "f" (f_spec x);
// This spec should probably use a different variable, but doesn't:
diff --git a/intTests/test_mir_fresh_cryptol_var/Makefile b/intTests/test_mir_fresh_cryptol_var/Makefile
new file mode 100644
index 0000000000..bc6297ae15
--- /dev/null
+++ b/intTests/test_mir_fresh_cryptol_var/Makefile
@@ -0,0 +1,13 @@
+all: test.linked-mir.json
+
+test.linked-mir.json: test.rs
+ saw-rustc $<
+ $(MAKE) remove-unused-build-artifacts
+
+.PHONY: remove-unused-build-artifacts
+remove-unused-build-artifacts:
+ rm -f test libtest.mir libtest.rlib
+
+.PHONY: clean
+clean: remove-unused-build-artifacts
+ rm -f test.linked-mir.json
diff --git a/intTests/test_mir_fresh_cryptol_var/test.linked-mir.json b/intTests/test_mir_fresh_cryptol_var/test.linked-mir.json
new file mode 100644
index 0000000000..cba5b3ad45
--- /dev/null
+++ b/intTests/test_mir_fresh_cryptol_var/test.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Array::a60250c8af2ca6f4"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Array::a60250c8af2ca6f4"}},"pos":"test.rs:2:5: 2:6","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Array::a60250c8af2ca6f4"}},"kind":"Copy"}}}],"terminator":{"kind":"Return","pos":"test.rs:3:2: 3:2"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Array::a60250c8af2ca6f4"}]},"name":"test/bfa24f84::id_array","return_ty":"ty::Array::a60250c8af2ca6f4","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Tuple::f54c7b3282e27392"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::f54c7b3282e27392"}},"pos":"test.rs:6:5: 6:6","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Tuple::f54c7b3282e27392"}},"kind":"Copy"}}}],"terminator":{"kind":"Return","pos":"test.rs:7:2: 7:2"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::f54c7b3282e27392"}]},"name":"test/bfa24f84::id_tuple","return_ty":"ty::Tuple::f54c7b3282e27392","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"test.rs:10:5: 10:6","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}}],"terminator":{"kind":"Return","pos":"test.rs:11:2: 11:2"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}]},"name":"test/bfa24f84::id_u32","return_ty":"ty::u32","spread_arg":null}],"adts":[],"statics":[],"vtables":[],"traits":[],"intrinsics":[{"inst":{"def_id":"test/bfa24f84::id_array","kind":"Item","substs":[]},"name":"test/bfa24f84::id_array"},{"inst":{"def_id":"test/bfa24f84::id_tuple","kind":"Item","substs":[]},"name":"test/bfa24f84::id_tuple"},{"inst":{"def_id":"test/bfa24f84::id_u32","kind":"Item","substs":[]},"name":"test/bfa24f84::id_u32"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::usize","ty":{"kind":"Uint","uintkind":{"kind":"Usize"}}},{"name":"ty::Array::a60250c8af2ca6f4","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"5"},"ty":"ty::usize"},"ty":"ty::u32"}},{"name":"ty::Tuple::f54c7b3282e27392","ty":{"kind":"Tuple","tys":["ty::u32","ty::u32"]}}],"roots":["test/bfa24f84::id_array","test/bfa24f84::id_tuple","test/bfa24f84::id_u32"]}
\ No newline at end of file
diff --git a/intTests/test_mir_fresh_cryptol_var/test.rs b/intTests/test_mir_fresh_cryptol_var/test.rs
new file mode 100644
index 0000000000..ff6888b215
--- /dev/null
+++ b/intTests/test_mir_fresh_cryptol_var/test.rs
@@ -0,0 +1,11 @@
+pub fn id_array(x: [u32; 5]) -> [u32; 5] {
+ x
+}
+
+pub fn id_tuple(x: (u32, u32)) -> (u32, u32) {
+ x
+}
+
+pub fn id_u32(x: u32) -> u32 {
+ x
+}
diff --git a/intTests/test_mir_fresh_cryptol_var/test.saw b/intTests/test_mir_fresh_cryptol_var/test.saw
new file mode 100644
index 0000000000..515bae145d
--- /dev/null
+++ b/intTests/test_mir_fresh_cryptol_var/test.saw
@@ -0,0 +1,15 @@
+enable_experimental;
+
+let id_spec cty = do {
+ x <- mir_fresh_cryptol_var "x" cty;
+
+ mir_execute_func [mir_term x];
+
+ mir_return (mir_term x);
+};
+
+m <- mir_load_module "test.linked-mir.json";
+
+mir_verify m "test::id_array" [] false (id_spec {| [5][32] |}) z3;
+mir_verify m "test::id_tuple" [] false (id_spec {| ([32], [32]) |}) z3;
+mir_verify m "test::id_u32" [] false (id_spec {| [32] |}) z3;
diff --git a/intTests/test_mir_fresh_cryptol_var/test.sh b/intTests/test_mir_fresh_cryptol_var/test.sh
new file mode 100755
index 0000000000..2315cc233c
--- /dev/null
+++ b/intTests/test_mir_fresh_cryptol_var/test.sh
@@ -0,0 +1,3 @@
+set -e
+
+$SAW test.saw
diff --git a/intTests/test_mir_ghost/Makefile b/intTests/test_mir_ghost/Makefile
new file mode 100644
index 0000000000..bc6297ae15
--- /dev/null
+++ b/intTests/test_mir_ghost/Makefile
@@ -0,0 +1,13 @@
+all: test.linked-mir.json
+
+test.linked-mir.json: test.rs
+ saw-rustc $<
+ $(MAKE) remove-unused-build-artifacts
+
+.PHONY: remove-unused-build-artifacts
+remove-unused-build-artifacts:
+ rm -f test libtest.mir libtest.rlib
+
+.PHONY: clean
+clean: remove-unused-build-artifacts
+ rm -f test.linked-mir.json
diff --git a/intTests/test_mir_ghost/test.linked-mir.json b/intTests/test_mir_ghost/test.linked-mir.json
new file mode 100644
index 0000000000..238971f5f7
--- /dev/null
+++ b/intTests/test_mir_ghost/test.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::53e788cd45991c87"},"kind":"Constant"},"kind":"Call","pos":"test.rs:6:5: 6:11"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::53e788cd45991c87"},"kind":"Constant"},"kind":"Call","pos":"test.rs:7:5: 7:11"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::53e788cd45991c87"},"kind":"Constant"},"kind":"Call","pos":"test.rs:8:5: 8:11"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:9:2: 9:2"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}]},"name":"test/9f9d7d4c::example","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/9f9d7d4c190de41a::{{alloc}}[0]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:48","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:2:20: 2:47","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/9f9d7d4c190de41a::{{alloc}}[1]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:2:20: 2:47","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:2:20: 2:47","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::675b2a8049aad652"}},"pos":"test.rs:2:20: 2:47","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/9f9d7d4c190de41a::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Adt::ba5184b53bc36a4d"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::Adt::613f1953a8669d14"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::72bf0f6662028c6a"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:48"}},"blockid":"bb1"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Array::6167cd8fdeb01e06"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:48","rhs":{"akind":{"kind":"Array","ty":"ty::Adt::613f1953a8669d14"},"kind":"Aggregate","ops":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::Adt::613f1953a8669d14"}},"kind":"Move"}]}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:48","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Array::6167cd8fdeb01e06"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:48","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:48"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !test.rs:2:5: 2:48"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":true,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Array::6167cd8fdeb01e06"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"test/9f9d7d4c::next","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:23: 400:24","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Lt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb2","bb1"],"values":["0"]}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"bool","size":1,"val":"1"},"ty":"ty::bool"},"kind":"Constant"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:52: 400:53","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:65: 400:66","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"kind":"Constant"},"kind":"BinaryOp","op":{"kind":"Add"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Gt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"kind":"Move"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb2"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb6","bb4"],"values":["0"]}},"blockid":"bb3"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/9f9d7d4c190de41a::{{alloc}}[3]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:33: 401:34","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/9f9d7d4c190de41a::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb5"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb4"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb5"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:402:9: 402:10","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38"},{"kind":"SetDiscriminant","lvalue":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","variant_index":0},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::675b2a8049aad652"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::Adt::45883e75bd5c5ca5"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":2,"kind":"Field","ty":"ty::Ref::913e2ff5487f7787"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:404:6: 404:6"}},"blockid":"bb6"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","return_ty":"ty::Adt::ba5184b53bc36a4d","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Cast","op":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::b30b83d63051810b"},"kind":"Constant"},"ty":"ty::FnPtr::07cd89921cc84271","type":{"kind":"Pointer(ReifyFnPointer)"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::788a983faed72be6"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb0"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:58: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f532a620418c4246"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:84: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::4e8e6a61a1ceb622"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:329:10: 329:10 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","return_ty":"ty::Adt::613f1953a8669d14","spread_arg":null}],"adts":[{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Arguments::pieces","ty":"ty::Ref::675b2a8049aad652"},{"name":"core/73237d41::fmt::Arguments::fmt","ty":"ty::Adt::45883e75bd5c5ca5"},{"name":"core/73237d41::fmt::Arguments::args","ty":"ty::Ref::913e2ff5487f7787"}],"inhabited":true,"name":"core/73237d41::fmt::Arguments"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::ArgumentV1::value","ty":"ty::Ref::4e8e6a61a1ceb622"},{"name":"core/73237d41::fmt::ArgumentV1::formatter","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"inhabited":true,"name":"core/73237d41::fmt::ArgumentV1"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","orig_substs":[],"repr_transparent":false,"size":56,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::Argument::position","ty":"ty::usize"},{"name":"core/73237d41::fmt::rt::v1::Argument::format","ty":"ty::Adt::ed8948c5d0b3a39f"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Argument"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","orig_substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::result::Result::Ok::0","ty":"ty::Tuple::e93222e871854c41"}],"inhabited":true,"name":"core/73237d41::result::Result::Ok"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::result::Result::Err::0","ty":"ty::Adt::8d47b311e48cbf8f"}],"inhabited":true,"name":"core/73237d41::result::Result::Err"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":64,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Formatter::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::Formatter::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::Formatter::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::Formatter::width","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::precision","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::buf","ty":"ty::Ref::0cd866b4eb1c792b"}],"inhabited":true,"name":"core/73237d41::fmt::Formatter"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::Ref::5f3877d5405402c5"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::Ref::5f3877d5405402c5"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","orig_substs":[],"repr_transparent":false,"size":0,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[],"inhabited":true,"name":"core/73237d41::fmt::Error"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::usize"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","orig_substs":[],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::FormatSpec::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::precision","ty":"ty::Adt::389b970f3565f26b"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::width","ty":"ty::Adt::389b970f3565f26b"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::FormatSpec"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","orig_substs":[],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Left"},{"ctor_kind":{"kind":"Const"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Right"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Center"},{"ctor_kind":{"kind":"Const"},"discr":{"index":3,"kind":"Relative"},"discr_value":"3","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Unknown"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","orig_substs":[],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Is::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Is"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Param::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Param"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Implied"}]}],"statics":[{"kind":"constant","mutable":false,"name":"test/9f9d7d4c190de41a::{{alloc}}[0]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,58,32]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"test/9f9d7d4c190de41a::{{alloc}}[1]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[84,104,105,115,32,115,104,111,117,108,100,32,98,101,32,111,118,101,114,114,105,100,100,101,110]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"test/9f9d7d4c190de41a::{{alloc}}[2]","rendered":{"element_ty":"ty::Adt::613f1953a8669d14","elements":[],"kind":"array"},"ty":"ty::Array::0e1a52ee2b2d3e97"},{"kind":"constant","mutable":false,"name":"test/9f9d7d4c190de41a::{{alloc}}[3]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[105,110,118,97,108,105,100,32,97,114,103,115]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"}],"vtables":[],"traits":[{"items":[{"item_id":"core/73237d41::fmt::Write::write_str","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Ref::fb1cfdc5725cd03b"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_char","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::char"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_fmt","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Adt::ba5184b53bc36a4d"],"output":"ty::Adt::30ed5848b4f625b6"}}],"name":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}],"intrinsics":[{"inst":{"def_id":"test/9f9d7d4c::example","kind":"Item","substs":[]},"name":"test/9f9d7d4c::example"},{"inst":{"def_id":"test/9f9d7d4c::next","kind":"Item","substs":[]},"name":"test/9f9d7d4c::next"},{"inst":{"def_id":"core/73237d41::fmt::{impl#4}::new_v1","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]"},{"inst":{"def_id":"core/73237d41::fmt::{impl#3}::new_display","kind":"Item","substs":["nonty::Lifetime","ty::Adt::ba5184b53bc36a4d"]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]"},{"inst":{"def_id":"core/73237d41::panicking::panic_fmt","kind":"Item","substs":[]},"name":"core/73237d41::panicking::panic_fmt"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::FnPtr::07cd89921cc84271","ty::FnPtr::bd6bee7b1f95b7bf"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]"},{"inst":{"def_id":"core/73237d41::fmt::{impl#7}::fmt","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::Ref::bf4d6d337c623aee","ty::Ref::4e8e6a61a1ceb622"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::FnDef::53e788cd45991c87","ty":{"defid":"test/9f9d7d4c::next","kind":"FnDef"}},{"name":"ty::Never::7199a9b06188843c","ty":{"kind":"Never"}},{"name":"ty::Adt::ba5184b53bc36a4d","ty":{"kind":"Adt","name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","substs":["nonty::Lifetime"]}},{"name":"ty::str","ty":{"kind":"Str"}},{"name":"ty::Ref::fb1cfdc5725cd03b","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::str"}},{"name":"ty::Slice::563a94fdd2fd2b33","ty":{"kind":"Slice","ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::675b2a8049aad652","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::563a94fdd2fd2b33"}},{"name":"ty::usize","ty":{"kind":"Uint","uintkind":{"kind":"Usize"}}},{"name":"ty::Array::e5bd840a2dafa04a","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::c2a5dcbb98af2a61","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::e5bd840a2dafa04a"}},{"name":"ty::Adt::613f1953a8669d14","ty":{"kind":"Adt","name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","substs":["nonty::Lifetime"]}},{"name":"ty::Slice::818a2c6d5f962f99","ty":{"kind":"Slice","ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::913e2ff5487f7787","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::818a2c6d5f962f99"}},{"name":"ty::Array::6167cd8fdeb01e06","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::41f3f8f95d02c3e9","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::6167cd8fdeb01e06"}},{"name":"ty::Ref::bf4d6d337c623aee","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Adt::ba5184b53bc36a4d"}},{"name":"ty::Array::0e1a52ee2b2d3e97","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"0"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::d0bd7bf253977b90","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::0e1a52ee2b2d3e97"}},{"name":"ty::FnDef::76afb566734aff77","ty":{"defid":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::72bf0f6662028c6a","ty":{"defid":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","kind":"FnDef"}},{"name":"ty::FnDef::906e67453a1bbab9","ty":{"defid":"core/73237d41::panicking::panic_fmt","kind":"FnDef"}},{"name":"ty::Adt::afb4c9f4ce8cdadf","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","substs":[]}},{"name":"ty::Slice::26b8a0a5e2b22aa9","ty":{"kind":"Slice","ty":"ty::Adt::afb4c9f4ce8cdadf"}},{"name":"ty::Ref::5f3877d5405402c5","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::26b8a0a5e2b22aa9"}},{"name":"ty::Adt::45883e75bd5c5ca5","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::Ref::5f3877d5405402c5"]}},{"name":"ty::Foreign::66d9923797cfc204","ty":{"kind":"Foreign"}},{"name":"ty::Ref::4e8e6a61a1ceb622","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Foreign::66d9923797cfc204"}},{"name":"ty::Adt::ad5a554022507816","ty":{"kind":"Adt","name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","substs":["nonty::Lifetime"]}},{"name":"ty::Ref::7984c7d8fa40d865","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Adt::ad5a554022507816"}},{"name":"ty::Tuple::e93222e871854c41","ty":{"kind":"Tuple","tys":[]}},{"name":"ty::Adt::8d47b311e48cbf8f","ty":{"kind":"Adt","name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","substs":[]}},{"name":"ty::Adt::30ed5848b4f625b6","ty":{"kind":"Adt","name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"]}},{"name":"ty::FnPtr::bd6bee7b1f95b7bf","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::4e8e6a61a1ceb622","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::bool","ty":{"kind":"Bool"}},{"name":"ty::FnPtr::07cd89921cc84271","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::bf4d6d337c623aee","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::FnDef::b30b83d63051810b","ty":{"defid":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::788a983faed72be6","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]","kind":"FnDef"}},{"name":"ty::FnDef::f532a620418c4246","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]","kind":"FnDef"}},{"name":"ty::Adt::ed8948c5d0b3a39f","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","substs":[]}},{"name":"ty::isize","ty":{"intkind":{"kind":"Isize"},"kind":"Int"}},{"name":"ty::char","ty":{"kind":"Char"}},{"name":"ty::Adt::c4745d1cf6b33a46","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","substs":[]}},{"name":"ty::Adt::ba42a94c73933868","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::usize"]}},{"name":"ty::Dynamic::08a22e65af9638be","ty":{"kind":"Dynamic","predicates":[{"kind":"Trait","substs":[],"trait":"core/73237d41::fmt::Write"}],"trait_id":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}},{"name":"ty::Ref::0cd866b4eb1c792b","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Dynamic::08a22e65af9638be"}},{"name":"ty::Adt::389b970f3565f26b","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","substs":[]}}],"roots":["test/9f9d7d4c::next","test/9f9d7d4c::example"]}
\ No newline at end of file
diff --git a/intTests/test_mir_ghost/test.rs b/intTests/test_mir_ghost/test.rs
new file mode 100644
index 0000000000..fafa13669c
--- /dev/null
+++ b/intTests/test_mir_ghost/test.rs
@@ -0,0 +1,9 @@
+pub fn next() -> u32 {
+ unimplemented!("This should be overridden")
+}
+
+pub fn example() -> u32 {
+ next();
+ next();
+ next()
+}
diff --git a/intTests/test_mir_ghost/test.saw b/intTests/test_mir_ghost/test.saw
new file mode 100644
index 0000000000..01046b4bcc
--- /dev/null
+++ b/intTests/test_mir_ghost/test.saw
@@ -0,0 +1,28 @@
+enable_experimental;
+
+let next_spec counter = do {
+ n <- mir_fresh_var "n" mir_u32;
+ mir_ghost_value counter n;
+
+ mir_execute_func [];
+
+ mir_ghost_value counter {{n+1}};
+ mir_return (mir_term {{n}});
+};
+
+let example_spec counter = do {
+ n <- mir_fresh_var "nm" mir_u32;
+ mir_precond {{n < 2}};
+ mir_ghost_value counter n;
+
+ mir_execute_func [];
+
+ mir_ghost_value counter {{n+3}};
+ mir_return (mir_term {{n+2}});
+};
+
+counter <- declare_ghost_state "ctr";
+m <- mir_load_module "test.linked-mir.json";
+
+next <- mir_unsafe_assume_spec m "test::next" (next_spec counter);
+mir_verify m "test::example" [next] false (example_spec counter) z3;
diff --git a/intTests/test_mir_ghost/test.sh b/intTests/test_mir_ghost/test.sh
new file mode 100755
index 0000000000..2315cc233c
--- /dev/null
+++ b/intTests/test_mir_ghost/test.sh
@@ -0,0 +1,3 @@
+set -e
+
+$SAW test.saw
diff --git a/intTests/test_mir_ghost_symbolic_branch/Makefile b/intTests/test_mir_ghost_symbolic_branch/Makefile
new file mode 100644
index 0000000000..bc6297ae15
--- /dev/null
+++ b/intTests/test_mir_ghost_symbolic_branch/Makefile
@@ -0,0 +1,13 @@
+all: test.linked-mir.json
+
+test.linked-mir.json: test.rs
+ saw-rustc $<
+ $(MAKE) remove-unused-build-artifacts
+
+.PHONY: remove-unused-build-artifacts
+remove-unused-build-artifacts:
+ rm -f test libtest.mir libtest.rlib
+
+.PHONY: clean
+clean: remove-unused-build-artifacts
+ rm -f test.linked-mir.json
diff --git a/intTests/test_mir_ghost_symbolic_branch/test.linked-mir.json b/intTests/test_mir_ghost_symbolic_branch/test.linked-mir.json
new file mode 100644
index 0000000000..deea148368
--- /dev/null
+++ b/intTests/test_mir_ghost_symbolic_branch/test.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::bool"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::bool"}},"pos":"test.rs:5:8: 5:9","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::bool"}},"kind":"Copy"}}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::bool"}},"kind":"Move"},"discr_span":"test.rs:5:8: 5:9 !test.rs:5:8: 5:9","kind":"SwitchInt","pos":"test.rs:5:8: 5:9 !test.rs:5:8: 5:9","switch_ty":"ty::bool","targets":["bb2","bb1"],"values":["0"]}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[{"data":{"rendered":{"kind":"uint","size":4,"val":"27"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::140cf1f14525dfe1"},"kind":"Constant"},"kind":"Call","pos":"test.rs:6:9: 6:14"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"args":[{"data":{"rendered":{"kind":"uint","size":4,"val":"42"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::140cf1f14525dfe1"},"kind":"Constant"},"kind":"Call","pos":"test.rs:8:9: 8:14"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:10:2: 10:2"}},"blockid":"bb3"}],"vars":[{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::bool"}]},"name":"test/2c9d3c4c::g","return_ty":"ty::Tuple::e93222e871854c41","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:2:21: 2:21"}},"blockid":"bb0"}],"vars":[{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"}]},"name":"test/2c9d3c4c::f","return_ty":"ty::Tuple::e93222e871854c41","spread_arg":null}],"adts":[],"statics":[],"vtables":[],"traits":[],"intrinsics":[{"inst":{"def_id":"test/2c9d3c4c::g","kind":"Item","substs":[]},"name":"test/2c9d3c4c::g"},{"inst":{"def_id":"test/2c9d3c4c::f","kind":"Item","substs":[]},"name":"test/2c9d3c4c::f"}],"tys":[{"name":"ty::bool","ty":{"kind":"Bool"}},{"name":"ty::Tuple::e93222e871854c41","ty":{"kind":"Tuple","tys":[]}},{"name":"ty::FnDef::140cf1f14525dfe1","ty":{"defid":"test/2c9d3c4c::f","kind":"FnDef"}},{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}}],"roots":["test/2c9d3c4c::f","test/2c9d3c4c::g"]}
\ No newline at end of file
diff --git a/intTests/test_mir_ghost_symbolic_branch/test.rs b/intTests/test_mir_ghost_symbolic_branch/test.rs
new file mode 100644
index 0000000000..6a3d06e7fd
--- /dev/null
+++ b/intTests/test_mir_ghost_symbolic_branch/test.rs
@@ -0,0 +1,10 @@
+// Meant to be overridden
+pub fn f(_x: u32) {}
+
+pub fn g(b: bool) {
+ if b {
+ f(27)
+ } else {
+ f(42)
+ }
+}
diff --git a/intTests/test_mir_ghost_symbolic_branch/test.saw b/intTests/test_mir_ghost_symbolic_branch/test.saw
new file mode 100644
index 0000000000..e35b0652cc
--- /dev/null
+++ b/intTests/test_mir_ghost_symbolic_branch/test.saw
@@ -0,0 +1,24 @@
+enable_experimental;
+
+m <- mir_load_module "test.linked-mir.json";
+
+g <- declare_ghost_state "g";
+
+let f_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+
+ mir_execute_func [mir_term x];
+
+ mir_ghost_value g x;
+};
+
+let g_spec = do {
+ b <- mir_fresh_var "b" mir_bool;
+
+ mir_execute_func [mir_term b];
+
+ mir_ghost_value g ({{ if b then 27 else 42 : [32] }});
+};
+
+f_ov <- mir_unsafe_assume_spec m "test::f" f_spec;
+mir_verify m "test::g" [f_ov] false g_spec z3;
diff --git a/intTests/test_mir_ghost_symbolic_branch/test.sh b/intTests/test_mir_ghost_symbolic_branch/test.sh
new file mode 100755
index 0000000000..2315cc233c
--- /dev/null
+++ b/intTests/test_mir_ghost_symbolic_branch/test.sh
@@ -0,0 +1,3 @@
+set -e
+
+$SAW test.saw
diff --git a/intTests/test_mir_points_to_overrides/Makefile b/intTests/test_mir_points_to_overrides/Makefile
new file mode 100644
index 0000000000..bc6297ae15
--- /dev/null
+++ b/intTests/test_mir_points_to_overrides/Makefile
@@ -0,0 +1,13 @@
+all: test.linked-mir.json
+
+test.linked-mir.json: test.rs
+ saw-rustc $<
+ $(MAKE) remove-unused-build-artifacts
+
+.PHONY: remove-unused-build-artifacts
+remove-unused-build-artifacts:
+ rm -f test libtest.mir libtest.rlib
+
+.PHONY: clean
+clean: remove-unused-build-artifacts
+ rm -f test.linked-mir.json
diff --git a/intTests/test_mir_points_to_overrides/test.linked-mir.json b/intTests/test_mir_points_to_overrides/test.linked-mir.json
new file mode 100644
index 0000000000..cf06bc2647
--- /dev/null
+++ b/intTests/test_mir_points_to_overrides/test.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}],"body":{"blocks":[{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:1:30: 1:30"}},"blockid":"bb0"}],"vars":[{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"}]},"name":"test/425520ec::inner","return_ty":"ty::Tuple::e93222e871854c41","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::953fce25114368d0"}},"pos":"test.rs:4:11: 4:12","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}},"region":"unimplement"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::953fce25114368d0"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::6782e33718bea688"},"kind":"Constant"},"kind":"Call","pos":"test.rs:4:5: 4:13"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:5:2: 5:2"}},"blockid":"bb1"}],"vars":[{"is_zst":true,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Tuple::e93222e871854c41"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::953fce25114368d0"}]},"name":"test/425520ec::outer","return_ty":"ty::Tuple::e93222e871854c41","spread_arg":null}],"adts":[],"statics":[],"vtables":[],"traits":[],"intrinsics":[{"inst":{"def_id":"test/425520ec::inner","kind":"Item","substs":[]},"name":"test/425520ec::inner"},{"inst":{"def_id":"test/425520ec::outer","kind":"Item","substs":[]},"name":"test/425520ec::outer"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::Ref::953fce25114368d0","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::u32"}},{"name":"ty::Tuple::e93222e871854c41","ty":{"kind":"Tuple","tys":[]}},{"name":"ty::FnDef::6782e33718bea688","ty":{"defid":"test/425520ec::inner","kind":"FnDef"}}],"roots":["test/425520ec::inner","test/425520ec::outer"]}
\ No newline at end of file
diff --git a/intTests/test_mir_points_to_overrides/test.rs b/intTests/test_mir_points_to_overrides/test.rs
new file mode 100644
index 0000000000..148f216e3b
--- /dev/null
+++ b/intTests/test_mir_points_to_overrides/test.rs
@@ -0,0 +1,5 @@
+pub fn inner(_x: &mut u32) {}
+
+pub fn outer(x: &mut u32) {
+ inner(x)
+}
diff --git a/intTests/test_mir_points_to_overrides/test.saw b/intTests/test_mir_points_to_overrides/test.saw
new file mode 100644
index 0000000000..ee484e48ac
--- /dev/null
+++ b/intTests/test_mir_points_to_overrides/test.saw
@@ -0,0 +1,26 @@
+enable_experimental;
+
+impl_mir <- mir_load_module "test.linked-mir.json";
+
+let inner_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+ r <- mir_alloc_mut mir_u32;
+ mir_points_to r (mir_term x);
+
+ mir_execute_func [r];
+
+ mir_points_to r (mir_term x);
+};
+
+let outer_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+ r <- mir_alloc_mut mir_u32;
+ mir_points_to r (mir_term x);
+
+ mir_execute_func [r];
+
+ mir_points_to r (mir_term x);
+};
+
+inner_ov <- mir_verify impl_mir "test::inner" [] false inner_spec z3;
+outer_ov <- mir_verify impl_mir "test::outer" [inner_ov] false outer_spec z3;
diff --git a/intTests/test_mir_points_to_overrides/test.sh b/intTests/test_mir_points_to_overrides/test.sh
new file mode 100755
index 0000000000..2315cc233c
--- /dev/null
+++ b/intTests/test_mir_points_to_overrides/test.sh
@@ -0,0 +1,3 @@
+set -e
+
+$SAW test.saw
diff --git a/intTests/test_mir_unsafe_assume_spec/Makefile b/intTests/test_mir_unsafe_assume_spec/Makefile
new file mode 100644
index 0000000000..bc6297ae15
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec/Makefile
@@ -0,0 +1,13 @@
+all: test.linked-mir.json
+
+test.linked-mir.json: test.rs
+ saw-rustc $<
+ $(MAKE) remove-unused-build-artifacts
+
+.PHONY: remove-unused-build-artifacts
+remove-unused-build-artifacts:
+ rm -f test libtest.mir libtest.rlib
+
+.PHONY: clean
+clean: remove-unused-build-artifacts
+ rm -f test.linked-mir.json
diff --git a/intTests/test_mir_unsafe_assume_spec/test.linked-mir.json b/intTests/test_mir_unsafe_assume_spec/test.linked-mir.json
new file mode 100644
index 0000000000..a5d29a520d
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec/test.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"pos":"test.rs:6:7: 6:8","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::95d37a33656fd654"},"kind":"Constant"},"kind":"Call","pos":"test.rs:6:5: 6:9"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"kind":"Move"},{"data":{"rendered":{"kind":"uint","size":4,"val":"1"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f55acdef755f1aaa"},"kind":"Constant"},"kind":"Call","pos":"test.rs:6:5: 6:25"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:7:2: 7:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}]},"name":"test/ca04d5a3::g","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"pos":"test.rs:10:5: 10:6","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"kind":"Move"},{"data":{"rendered":{"kind":"uint","size":4,"val":"1"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f55acdef755f1aaa"},"kind":"Constant"},"kind":"Call","pos":"test.rs:10:5: 10:22"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:11:2: 11:2"}},"blockid":"bb1"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}]},"name":"test/ca04d5a3::h","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::e028c0f25e8b6323"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::e028c0f25e8b6323"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::e028c0f25e8b6323"}},"pos":"test.rs:22:7: 22:8","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::e028c0f25e8b6323"}},"pos":"test.rs:22:10: 22:11","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::d8f5e5d50376e8aa"},"kind":"Constant"},"kind":"Call","pos":"test.rs:22:5: 22:12"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:23:2: 23:2"}},"blockid":"bb1"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::e028c0f25e8b6323"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::e028c0f25e8b6323"}]},"name":"test/ca04d5a3::q","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"pos":"test.rs:32:22: 32:23","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::953fce25114368d0"}},"pos":"test.rs:33:17: 33:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::953fce25114368d0"}},"pos":"test.rs:33:17: 33:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::953fce25114368d0"}},"region":"unimplement"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::953fce25114368d0"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_3","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::b153432b719d377c"},"kind":"Constant"},"kind":"Call","pos":"test.rs:33:5: 33:24"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::953fce25114368d0"}},"pos":"test.rs:34:17: 34:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::953fce25114368d0"}},"pos":"test.rs:34:17: 34:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::953fce25114368d0"}},"region":"unimplement"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::953fce25114368d0"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::b153432b719d377c"},"kind":"Constant"},"kind":"Call","pos":"test.rs:34:5: 34:24"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:35:2: 35:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_3","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::953fce25114368d0"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::953fce25114368d0"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::953fce25114368d0"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::953fce25114368d0"}]},"name":"test/ca04d5a3::foo","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[],"terminator":{"args":[{"data":{"rendered":{"kind":"uint","size":4,"val":"2"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::95d37a33656fd654"},"kind":"Constant"},"kind":"Call","pos":"test.rs:14:5: 14:9"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::u32"}},"kind":"Move"},{"data":{"rendered":{"kind":"uint","size":4,"val":"1"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f55acdef755f1aaa"},"kind":"Constant"},"kind":"Call","pos":"test.rs:14:5: 14:25"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:15:2: 15:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::u32"}]},"name":"test/ca04d5a3::g2","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::e028c0f25e8b6323"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::e028c0f25e8b6323"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[0]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_7","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_7","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:18:5: 18:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:18:20: 18:43","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[1]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:18:20: 18:43","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:18:20: 18:43","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::675b2a8049aad652"}},"pos":"test.rs:18:20: 18:43","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Adt::ba5184b53bc36a4d"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Adt::613f1953a8669d14"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::72bf0f6662028c6a"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:18:5: 18:44"}},"blockid":"bb1"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_11","ty":"ty::Array::6167cd8fdeb01e06"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:18:5: 18:44","rhs":{"akind":{"kind":"Array","ty":"ty::Adt::613f1953a8669d14"},"kind":"Aggregate","ops":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Adt::613f1953a8669d14"}},"kind":"Move"}]}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:18:5: 18:44","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_11","ty":"ty::Array::6167cd8fdeb01e06"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:18:5: 18:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:18:5: 18:44"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !test.rs:18:5: 18:44"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_3","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_7","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_11","ty":"ty::Array::6167cd8fdeb01e06"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"test/ca04d5a3::p","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[3]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !test.rs:2:5: 2:45","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:2:20: 2:44","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[4]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:2:20: 2:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"test.rs:2:20: 2:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::675b2a8049aad652"}},"pos":"test.rs:2:20: 2:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Adt::ba5184b53bc36a4d"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Adt::613f1953a8669d14"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::72bf0f6662028c6a"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !test.rs:2:5: 2:45"}},"blockid":"bb1"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Array::6167cd8fdeb01e06"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:45","rhs":{"akind":{"kind":"Array","ty":"ty::Adt::613f1953a8669d14"},"kind":"Aggregate","ops":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Adt::613f1953a8669d14"}},"kind":"Move"}]}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:45","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Array::6167cd8fdeb01e06"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:45","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !test.rs:2:5: 2:45"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !test.rs:2:5: 2:45"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Array::6167cd8fdeb01e06"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"test/ca04d5a3::f","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"test.rs:26:18: 26:20","rhs":{"kind":"Use","usevar":{"data":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}},"pos":"test.rs:27:5: 27:11","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"uint","size":4,"val":"0"},"ty":"ty::u32"},"kind":"Constant"}}}],"terminator":{"kind":"Return","pos":"test.rs:29:2: 29:2"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}]},"name":"test/ca04d5a3::side_effect","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Cast","op":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::b30b83d63051810b"},"kind":"Constant"},"ty":"ty::FnPtr::07cd89921cc84271","type":{"kind":"Pointer(ReifyFnPointer)"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::788a983faed72be6"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb0"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:58: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f532a620418c4246"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:84: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::4e8e6a61a1ceb622"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:329:10: 329:10 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","return_ty":"ty::Adt::613f1953a8669d14","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:38: 1162:42 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:38: 1162:42 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:44: 1162:47 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:44: 1162:47 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:13: 1162:48 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Add"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:47: 1162:48 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:47: 1162:48 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1163:10: 1163:10 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}]},"name":"core/73237d41::num::{impl#9}::wrapping_add","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:23: 400:24","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Lt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb2","bb1"],"values":["0"]}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"bool","size":1,"val":"1"},"ty":"ty::bool"},"kind":"Constant"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:52: 400:53","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:65: 400:66","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"kind":"Constant"},"kind":"BinaryOp","op":{"kind":"Add"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Gt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"kind":"Move"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb2"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb6","bb4"],"values":["0"]}},"blockid":"bb3"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[5]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:33: 401:34","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/ca04d5a3286a7930::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb5"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb4"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb5"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:402:9: 402:10","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38"},{"kind":"SetDiscriminant","lvalue":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","variant_index":0},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::675b2a8049aad652"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::Adt::45883e75bd5c5ca5"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":2,"kind":"Field","ty":"ty::Ref::913e2ff5487f7787"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:404:6: 404:6"}},"blockid":"bb6"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","return_ty":"ty::Adt::ba5184b53bc36a4d","spread_arg":null}],"adts":[{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Arguments::pieces","ty":"ty::Ref::675b2a8049aad652"},{"name":"core/73237d41::fmt::Arguments::fmt","ty":"ty::Adt::45883e75bd5c5ca5"},{"name":"core/73237d41::fmt::Arguments::args","ty":"ty::Ref::913e2ff5487f7787"}],"inhabited":true,"name":"core/73237d41::fmt::Arguments"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::ArgumentV1::value","ty":"ty::Ref::4e8e6a61a1ceb622"},{"name":"core/73237d41::fmt::ArgumentV1::formatter","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"inhabited":true,"name":"core/73237d41::fmt::ArgumentV1"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","orig_substs":[],"repr_transparent":false,"size":56,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::Argument::position","ty":"ty::usize"},{"name":"core/73237d41::fmt::rt::v1::Argument::format","ty":"ty::Adt::ed8948c5d0b3a39f"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Argument"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":64,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Formatter::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::Formatter::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::Formatter::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::Formatter::width","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::precision","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::buf","ty":"ty::Ref::0cd866b4eb1c792b"}],"inhabited":true,"name":"core/73237d41::fmt::Formatter"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::Ref::5f3877d5405402c5"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::Ref::5f3877d5405402c5"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","orig_substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::result::Result::Ok::0","ty":"ty::Tuple::e93222e871854c41"}],"inhabited":true,"name":"core/73237d41::result::Result::Ok"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::result::Result::Err::0","ty":"ty::Adt::8d47b311e48cbf8f"}],"inhabited":true,"name":"core/73237d41::result::Result::Err"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","orig_substs":[],"repr_transparent":false,"size":0,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[],"inhabited":true,"name":"core/73237d41::fmt::Error"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::usize"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","orig_substs":[],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::FormatSpec::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::precision","ty":"ty::Adt::389b970f3565f26b"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::width","ty":"ty::Adt::389b970f3565f26b"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::FormatSpec"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","orig_substs":[],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Left"},{"ctor_kind":{"kind":"Const"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Right"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Center"},{"ctor_kind":{"kind":"Const"},"discr":{"index":3,"kind":"Relative"},"discr_value":"3","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Unknown"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","orig_substs":[],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Is::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Is"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Param::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Param"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Implied"}]}],"statics":[{"kind":"constant","mutable":false,"name":"test/ca04d5a3286a7930::{{alloc}}[0]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,58,32]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"test/ca04d5a3286a7930::{{alloc}}[1]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[112,32,115,104,111,117,108,100,32,98,101,32,111,118,101,114,114,105,100,101,110]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"test/ca04d5a3286a7930::{{alloc}}[2]","rendered":{"element_ty":"ty::Adt::613f1953a8669d14","elements":[],"kind":"array"},"ty":"ty::Array::0e1a52ee2b2d3e97"},{"kind":"constant","mutable":false,"name":"test/ca04d5a3286a7930::{{alloc}}[3]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,58,32]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"test/ca04d5a3286a7930::{{alloc}}[4]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[102,32,115,104,111,117,108,100,32,98,101,32,111,118,101,114,114,105,100,100,101,110]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"test/ca04d5a3286a7930::{{alloc}}[5]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[105,110,118,97,108,105,100,32,97,114,103,115]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"}],"vtables":[],"traits":[{"items":[{"item_id":"core/73237d41::fmt::Write::write_str","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Ref::fb1cfdc5725cd03b"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_char","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::char"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_fmt","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Adt::ba5184b53bc36a4d"],"output":"ty::Adt::30ed5848b4f625b6"}}],"name":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}],"intrinsics":[{"inst":{"def_id":"test/ca04d5a3::g","kind":"Item","substs":[]},"name":"test/ca04d5a3::g"},{"inst":{"def_id":"test/ca04d5a3::h","kind":"Item","substs":[]},"name":"test/ca04d5a3::h"},{"inst":{"def_id":"test/ca04d5a3::q","kind":"Item","substs":[]},"name":"test/ca04d5a3::q"},{"inst":{"def_id":"test/ca04d5a3::foo","kind":"Item","substs":[]},"name":"test/ca04d5a3::foo"},{"inst":{"def_id":"test/ca04d5a3::g2","kind":"Item","substs":[]},"name":"test/ca04d5a3::g2"},{"inst":{"def_id":"test/ca04d5a3::p","kind":"Item","substs":[]},"name":"test/ca04d5a3::p"},{"inst":{"def_id":"test/ca04d5a3::f","kind":"Item","substs":[]},"name":"test/ca04d5a3::f"},{"inst":{"def_id":"test/ca04d5a3::side_effect","kind":"Item","substs":[]},"name":"test/ca04d5a3::side_effect"},{"inst":{"def_id":"core/73237d41::panicking::panic_fmt","kind":"Item","substs":[]},"name":"core/73237d41::panicking::panic_fmt"},{"inst":{"def_id":"core/73237d41::fmt::{impl#3}::new_display","kind":"Item","substs":["nonty::Lifetime","ty::Adt::ba5184b53bc36a4d"]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]"},{"inst":{"def_id":"core/73237d41::num::{impl#9}::wrapping_add","kind":"Item","substs":[]},"name":"core/73237d41::num::{impl#9}::wrapping_add"},{"inst":{"def_id":"core/73237d41::fmt::{impl#4}::new_v1","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::Ref::bf4d6d337c623aee","ty::Ref::4e8e6a61a1ceb622"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::FnPtr::07cd89921cc84271","ty::FnPtr::bd6bee7b1f95b7bf"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]"},{"inst":{"def_id":"core/73237d41::fmt::{impl#7}::fmt","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::FnDef::95d37a33656fd654","ty":{"defid":"test/ca04d5a3::f","kind":"FnDef"}},{"name":"ty::FnDef::f55acdef755f1aaa","ty":{"defid":"core/73237d41::num::{impl#9}::wrapping_add","kind":"FnDef"}},{"name":"ty::Ref::e028c0f25e8b6323","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::u32"}},{"name":"ty::FnDef::d8f5e5d50376e8aa","ty":{"defid":"test/ca04d5a3::p","kind":"FnDef"}},{"name":"ty::Ref::953fce25114368d0","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::u32"}},{"name":"ty::FnDef::b153432b719d377c","ty":{"defid":"test/ca04d5a3::side_effect","kind":"FnDef"}},{"name":"ty::Never::7199a9b06188843c","ty":{"kind":"Never"}},{"name":"ty::Adt::ba5184b53bc36a4d","ty":{"kind":"Adt","name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","substs":["nonty::Lifetime"]}},{"name":"ty::str","ty":{"kind":"Str"}},{"name":"ty::Ref::fb1cfdc5725cd03b","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::str"}},{"name":"ty::Slice::563a94fdd2fd2b33","ty":{"kind":"Slice","ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::675b2a8049aad652","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::563a94fdd2fd2b33"}},{"name":"ty::usize","ty":{"kind":"Uint","uintkind":{"kind":"Usize"}}},{"name":"ty::Array::e5bd840a2dafa04a","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::c2a5dcbb98af2a61","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::e5bd840a2dafa04a"}},{"name":"ty::Adt::613f1953a8669d14","ty":{"kind":"Adt","name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","substs":["nonty::Lifetime"]}},{"name":"ty::Slice::818a2c6d5f962f99","ty":{"kind":"Slice","ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::913e2ff5487f7787","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::818a2c6d5f962f99"}},{"name":"ty::Array::6167cd8fdeb01e06","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::41f3f8f95d02c3e9","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::6167cd8fdeb01e06"}},{"name":"ty::Ref::bf4d6d337c623aee","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Adt::ba5184b53bc36a4d"}},{"name":"ty::Array::0e1a52ee2b2d3e97","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"0"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::d0bd7bf253977b90","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::0e1a52ee2b2d3e97"}},{"name":"ty::FnDef::76afb566734aff77","ty":{"defid":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::72bf0f6662028c6a","ty":{"defid":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","kind":"FnDef"}},{"name":"ty::FnDef::906e67453a1bbab9","ty":{"defid":"core/73237d41::panicking::panic_fmt","kind":"FnDef"}},{"name":"ty::Adt::afb4c9f4ce8cdadf","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","substs":[]}},{"name":"ty::Slice::26b8a0a5e2b22aa9","ty":{"kind":"Slice","ty":"ty::Adt::afb4c9f4ce8cdadf"}},{"name":"ty::Ref::5f3877d5405402c5","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::26b8a0a5e2b22aa9"}},{"name":"ty::Adt::45883e75bd5c5ca5","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::Ref::5f3877d5405402c5"]}},{"name":"ty::Foreign::66d9923797cfc204","ty":{"kind":"Foreign"}},{"name":"ty::Ref::4e8e6a61a1ceb622","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Foreign::66d9923797cfc204"}},{"name":"ty::Adt::ad5a554022507816","ty":{"kind":"Adt","name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","substs":["nonty::Lifetime"]}},{"name":"ty::Ref::7984c7d8fa40d865","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Adt::ad5a554022507816"}},{"name":"ty::Tuple::e93222e871854c41","ty":{"kind":"Tuple","tys":[]}},{"name":"ty::Adt::8d47b311e48cbf8f","ty":{"kind":"Adt","name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","substs":[]}},{"name":"ty::Adt::30ed5848b4f625b6","ty":{"kind":"Adt","name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"]}},{"name":"ty::FnPtr::bd6bee7b1f95b7bf","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::4e8e6a61a1ceb622","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::FnPtr::07cd89921cc84271","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::bf4d6d337c623aee","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::FnDef::b30b83d63051810b","ty":{"defid":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::788a983faed72be6","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]","kind":"FnDef"}},{"name":"ty::FnDef::f532a620418c4246","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]","kind":"FnDef"}},{"name":"ty::bool","ty":{"kind":"Bool"}},{"name":"ty::Adt::ed8948c5d0b3a39f","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","substs":[]}},{"name":"ty::char","ty":{"kind":"Char"}},{"name":"ty::Adt::c4745d1cf6b33a46","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","substs":[]}},{"name":"ty::Adt::ba42a94c73933868","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::usize"]}},{"name":"ty::Dynamic::08a22e65af9638be","ty":{"kind":"Dynamic","predicates":[{"kind":"Trait","substs":[],"trait":"core/73237d41::fmt::Write"}],"trait_id":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}},{"name":"ty::Ref::0cd866b4eb1c792b","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Dynamic::08a22e65af9638be"}},{"name":"ty::isize","ty":{"intkind":{"kind":"Isize"},"kind":"Int"}},{"name":"ty::Adt::389b970f3565f26b","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","substs":[]}}],"roots":["test/ca04d5a3::f","test/ca04d5a3::g","test/ca04d5a3::h","test/ca04d5a3::g2","test/ca04d5a3::p","test/ca04d5a3::q","test/ca04d5a3::side_effect","test/ca04d5a3::foo"]}
\ No newline at end of file
diff --git a/intTests/test_mir_unsafe_assume_spec/test.rs b/intTests/test_mir_unsafe_assume_spec/test.rs
new file mode 100644
index 0000000000..062ad042ed
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec/test.rs
@@ -0,0 +1,35 @@
+pub fn f(_x: u32) -> u32 {
+ unimplemented!("f should be overridden");
+}
+
+pub fn g(x: u32) -> u32 {
+ f(x).wrapping_add(1)
+}
+
+pub fn h(x: u32) -> u32 {
+ x.wrapping_add(1)
+}
+
+pub fn g2() -> u32 {
+ f(2).wrapping_add(1)
+}
+
+pub fn p(_x: &u32, _y: &u32) -> u32 {
+ unimplemented!("p should be overriden");
+}
+
+pub fn q(x: &u32, y: &u32) -> u32 {
+ p(x, y)
+}
+
+pub fn side_effect(a: &mut u32) -> u32 {
+ let v: u32 = *a;
+ *a = 0;
+ v
+}
+
+pub fn foo(x: u32) -> u32 {
+ let mut b: u32 = x;
+ side_effect(&mut b);
+ side_effect(&mut b)
+}
diff --git a/intTests/test_mir_unsafe_assume_spec/test.saw b/intTests/test_mir_unsafe_assume_spec/test.saw
new file mode 100644
index 0000000000..5b650a3139
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec/test.saw
@@ -0,0 +1,159 @@
+enable_experimental;
+
+let f_generic_spec (x : Term) = do {
+ mir_execute_func [mir_term x];
+
+ mir_return (mir_term x);
+};
+
+let f_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+ f_generic_spec x;
+};
+
+let f2_spec = do {
+ let x = {{ 2 : [32] }};
+ f_generic_spec x;
+};
+
+let f3_spec = do {
+ let x = {{ 3 : [32] }};
+ f_generic_spec x;
+};
+
+let g_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+
+ mir_execute_func [mir_term x];
+
+ mir_return (mir_term {{ x + 1 }});
+};
+
+let g2_spec = do {
+ mir_execute_func [];
+
+ mir_return (mir_term {{ 3 : [32] }});
+};
+
+let h_spec = g_spec;
+
+let p_spec_1 = do {
+ x_ptr <- mir_alloc mir_u32;
+ x <- mir_fresh_var "x" mir_u32;
+ mir_points_to x_ptr (mir_term x);
+
+ y_ptr <- mir_alloc mir_u32;
+ y <- mir_fresh_var "y" mir_u32;
+ mir_points_to y_ptr (mir_term y);
+
+ mir_execute_func [x_ptr, y_ptr];
+
+ mir_return (mir_term {{ x + y }});
+};
+
+let p_spec_2 = do {
+ x_ptr <- mir_alloc mir_u32;
+ x <- mir_fresh_var "x" mir_u32;
+ mir_points_to x_ptr (mir_term x);
+
+ mir_execute_func [x_ptr, x_ptr];
+
+ mir_return (mir_term {{ 2 * x }});
+};
+
+let q_spec = p_spec_1;
+
+let side_spec_1 = do {
+ a_ptr <- mir_alloc_mut mir_u32;
+ a <- mir_fresh_var "a" mir_u32;
+ mir_points_to a_ptr (mir_term a);
+
+ mir_execute_func [a_ptr];
+
+ mir_points_to a_ptr (mir_term {{ 0 : [32] }});
+ mir_return (mir_term a);
+};
+
+let side_spec_2 = do {
+ a_ptr <- mir_alloc_mut mir_u32;
+ a <- mir_fresh_var "a" mir_u32;
+ mir_points_to a_ptr (mir_term a);
+
+ mir_execute_func [a_ptr];
+
+ mir_return (mir_term a);
+};
+
+// This spec is erroneous. See the comments below in the "Avoid unsoundness"
+// part of the test.
+let foo_spec = do {
+ x <- mir_fresh_var "x" mir_u32;
+
+ mir_execute_func [mir_term x];
+
+ mir_return (mir_term {{ x }});
+};
+
+m <- mir_load_module "test.linked-mir.json";
+
+////////////
+// Basics //
+////////////
+
+f_ov <- mir_unsafe_assume_spec m "test::f" f_spec;
+f2_ov <- mir_unsafe_assume_spec m "test::f" f2_spec;
+f3_ov <- mir_unsafe_assume_spec m "test::f" f3_spec;
+
+// `g` should fail without an override for `f`...
+fails (
+ mir_verify m "test::g" [] false g_spec z3
+);
+// ...but should succeed with an `f` override.
+mir_verify m "test::g" [f_ov] false g_spec z3;
+// `h` never calls `f`, but it's still fine to redundantly pass an `f` override
+mir_verify m "test::h" [f_ov] false h_spec z3;
+
+// `g2` will succeed with both a generic `f` override as well as a specialized
+// one where the argument and result values are concrete.
+mir_verify m "test::g2" [f_ov] false g2_spec z3;
+mir_verify m "test::g2" [f2_ov] false g2_spec z3;
+mir_verify m "test::g2" [f_ov, f2_ov] false g2_spec z3;
+
+// Overrides that fail to match.
+fails (
+ mir_verify m "test::g" [f3_ov] false g_spec z3
+);
+fails (
+ mir_verify m "test::g2" [f3_ov] false g2_spec z3
+);
+
+//////////////
+// Pointers //
+//////////////
+
+p_ov_1 <- mir_unsafe_assume_spec m "test::p" p_spec_1;
+p_ov_2 <- mir_unsafe_assume_spec m "test::p" p_spec_2;
+
+mir_verify m "test::q" [p_ov_1] false q_spec z3;
+fails (
+ mir_verify m "test::q" [p_ov_2] false q_spec z3
+);
+
+///////////////////////
+// Avoid unsoundness //
+///////////////////////
+
+side_ov_1 <- mir_verify m "test::side_effect" [] false side_spec_1 z3;
+side_ov_2 <- mir_verify m "test::side_effect" [] false side_spec_2 z3;
+
+// This should not verify, as invoking `side_effect` should cause `foo` to
+// always return `0` rather than the argument value.
+fails (
+ mir_verify m "test::foo" [side_ov_1] false foo_spec z3
+);
+// This should not verify, as side_spec_2 underspecifies the mutable
+// allocation `a_ptr` in its postconditions. SAW will catch this when attempting
+// to use side_ov_2 as an override.
+fails (
+ mir_verify m "test::foo" [side_ov_2] false foo_spec z3
+);
diff --git a/intTests/test_mir_unsafe_assume_spec/test.sh b/intTests/test_mir_unsafe_assume_spec/test.sh
new file mode 100755
index 0000000000..2315cc233c
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec/test.sh
@@ -0,0 +1,3 @@
+set -e
+
+$SAW test.saw
diff --git a/intTests/test_mir_unsafe_assume_spec_statics/Makefile b/intTests/test_mir_unsafe_assume_spec_statics/Makefile
new file mode 100644
index 0000000000..bc6297ae15
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec_statics/Makefile
@@ -0,0 +1,13 @@
+all: test.linked-mir.json
+
+test.linked-mir.json: test.rs
+ saw-rustc $<
+ $(MAKE) remove-unused-build-artifacts
+
+.PHONY: remove-unused-build-artifacts
+remove-unused-build-artifacts:
+ rm -f test libtest.mir libtest.rlib
+
+.PHONY: clean
+clean: remove-unused-build-artifacts
+ rm -f test.linked-mir.json
diff --git a/intTests/test_mir_unsafe_assume_spec_statics/test.linked-mir.json b/intTests/test_mir_unsafe_assume_spec_statics/test.linked-mir.json
new file mode 100644
index 0000000000..1a3481a675
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec_statics/test.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"test.rs:1:21: 1:23","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"uint","size":4,"val":"42"},"ty":"ty::u32"},"kind":"Constant"}}}],"terminator":{"kind":"Return","pos":"test.rs:1:1: 1:24"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}]},"name":"test/65ce71a4::A","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::5c073f3fd0b9c562"},"kind":"Constant"},"kind":"Call","pos":"test.rs:12:5: 12:18"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::5c073f3fd0b9c562"},"kind":"Constant"},"kind":"Call","pos":"test.rs:13:5: 13:18"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"test.rs:14:2: 14:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}]},"name":"test/65ce71a4::foo","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::RawPtr::63e5937014067f41"}},"pos":"test.rs:5:22: 5:23","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/65ce71a4::A","kind":"static_ref"},"ty":"ty::RawPtr::63e5937014067f41"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"test.rs:5:22: 5:23","rhs":{"kind":"Use","usevar":{"data":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::RawPtr::63e5937014067f41"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::RawPtr::63e5937014067f41"}},"pos":"test.rs:6:9: 6:10","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"test/65ce71a4::A","kind":"static_ref"},"ty":"ty::RawPtr::63e5937014067f41"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::RawPtr::63e5937014067f41"}},"pos":"test.rs:6:9: 6:14","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"uint","size":4,"val":"0"},"ty":"ty::u32"},"kind":"Constant"}}}],"terminator":{"kind":"Return","pos":"test.rs:9:2: 9:2"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::RawPtr::63e5937014067f41"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::RawPtr::63e5937014067f41"}]},"name":"test/65ce71a4::side_effect","return_ty":"ty::u32","spread_arg":null}],"adts":[],"statics":[{"kind":"body","mutable":true,"name":"test/65ce71a4::A","ty":"ty::u32"}],"vtables":[],"traits":[],"intrinsics":[{"inst":{"def_id":"test/65ce71a4::foo","kind":"Item","substs":[]},"name":"test/65ce71a4::foo"},{"inst":{"def_id":"test/65ce71a4::side_effect","kind":"Item","substs":[]},"name":"test/65ce71a4::side_effect"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::FnDef::5c073f3fd0b9c562","ty":{"defid":"test/65ce71a4::side_effect","kind":"FnDef"}},{"name":"ty::RawPtr::63e5937014067f41","ty":{"kind":"RawPtr","mutability":{"kind":"Mut"},"ty":"ty::u32"}}],"roots":["test/65ce71a4::side_effect","test/65ce71a4::foo"]}
\ No newline at end of file
diff --git a/intTests/test_mir_unsafe_assume_spec_statics/test.rs b/intTests/test_mir_unsafe_assume_spec_statics/test.rs
new file mode 100644
index 0000000000..ce4f1d0f11
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec_statics/test.rs
@@ -0,0 +1,14 @@
+static mut A: u32 = 42;
+
+pub fn side_effect() -> u32 {
+ unsafe {
+ let v: u32 = A;
+ A = 0;
+ v
+ }
+}
+
+pub fn foo() -> u32 {
+ side_effect();
+ side_effect()
+}
diff --git a/intTests/test_mir_unsafe_assume_spec_statics/test.saw b/intTests/test_mir_unsafe_assume_spec_statics/test.saw
new file mode 100644
index 0000000000..e8dd49c9ca
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec_statics/test.saw
@@ -0,0 +1,55 @@
+enable_experimental;
+
+m <- mir_load_module "test.linked-mir.json";
+
+let side_spec_1 = do {
+ let a_static = mir_static "test::A";
+ a_init <- mir_fresh_var "A" mir_u32;
+ mir_points_to a_static (mir_term a_init);
+
+ mir_execute_func [];
+
+ mir_points_to a_static (mir_term {{ 0 : [32] }});
+ mir_return (mir_term a_init);
+};
+
+let side_spec_2 = do {
+ let a_static = mir_static "test::A";
+ a_init <- mir_fresh_var "A" mir_u32;
+ mir_points_to a_static (mir_term a_init);
+
+ mir_execute_func [];
+
+ mir_return (mir_term a_init);
+};
+
+// This spec is erroneous. See the comments below in the "Avoid unsoundness"
+// part of the test.
+let foo_spec = do {
+ let a_static = mir_static "test::A";
+ a_init <- mir_fresh_var "A" mir_u32;
+ mir_points_to a_static (mir_term a_init);
+
+ mir_execute_func [];
+
+ mir_return (mir_term a_init);
+};
+
+///////////////////////
+// Avoid unsoundness //
+///////////////////////
+
+side_ov_1 <- mir_verify m "test::side_effect" [] false side_spec_1 z3;
+side_ov_2 <- mir_verify m "test::side_effect" [] false side_spec_2 z3;
+
+// This should not verify, as invoking `side_effect` should cause `foo` to
+// always return `0` rather than the original value of A.
+fails (
+ mir_verify m "test::foo" [side_ov_1] false foo_spec z3
+);
+// This should not verify, as side_spec_2 underspecifies the mutable
+// static `a_ptr` in its postconditions. SAW will catch this when attempting
+// to use side_ov_2 as an override.
+fails (
+ mir_verify m "test::foo" [side_ov_2] false foo_spec z3
+);
diff --git a/intTests/test_mir_unsafe_assume_spec_statics/test.sh b/intTests/test_mir_unsafe_assume_spec_statics/test.sh
new file mode 100755
index 0000000000..2315cc233c
--- /dev/null
+++ b/intTests/test_mir_unsafe_assume_spec_statics/test.sh
@@ -0,0 +1,3 @@
+set -e
+
+$SAW test.saw
diff --git a/saw-core-coq/src/Verifier/SAW/Translation/Coq.hs b/saw-core-coq/src/Verifier/SAW/Translation/Coq.hs
index fd781cd27c..a58cd89266 100644
--- a/saw-core-coq/src/Verifier/SAW/Translation/Coq.hs
+++ b/saw-core-coq/src/Verifier/SAW/Translation/Coq.hs
@@ -21,7 +21,6 @@ module Verifier.SAW.Translation.Coq (
translateSAWModule,
) where
-import Control.Monad.Reader hiding (fail)
import Data.String.Interpolate (i)
import Prelude hiding (fail)
import Prettyprinter
diff --git a/saw-core-coq/src/Verifier/SAW/Translation/Coq/Monad.hs b/saw-core-coq/src/Verifier/SAW/Translation/Coq/Monad.hs
index b2fc710c41..8ad5d8e5e6 100644
--- a/saw-core-coq/src/Verifier/SAW/Translation/Coq/Monad.hs
+++ b/saw-core-coq/src/Verifier/SAW/Translation/Coq/Monad.hs
@@ -22,8 +22,8 @@ module Verifier.SAW.Translation.Coq.Monad
) where
import qualified Control.Monad.Except as Except
-import Control.Monad.Reader hiding (fail)
-import Control.Monad.State hiding (fail, state)
+import Control.Monad.Reader (MonadReader, ReaderT(..))
+import Control.Monad.State (MonadState, StateT(..))
import Prelude hiding (fail)
import Verifier.SAW.SharedTerm
diff --git a/saw-core-coq/src/Verifier/SAW/Translation/Coq/SAWModule.hs b/saw-core-coq/src/Verifier/SAW/Translation/Coq/SAWModule.hs
index eca5a410f3..fcbddbf104 100644
--- a/saw-core-coq/src/Verifier/SAW/Translation/Coq/SAWModule.hs
+++ b/saw-core-coq/src/Verifier/SAW/Translation/Coq/SAWModule.hs
@@ -25,7 +25,7 @@ Portability : portable
module Verifier.SAW.Translation.Coq.SAWModule where
import qualified Control.Monad.Except as Except
-import Control.Monad.Reader hiding (fail)
+import Control.Monad.Reader (asks)
import Prelude hiding (fail)
import Prettyprinter (Doc, pretty)
diff --git a/saw-core-coq/src/Verifier/SAW/Translation/Coq/Term.hs b/saw-core-coq/src/Verifier/SAW/Translation/Coq/Term.hs
index 1afaf91218..90d393ddd6 100644
--- a/saw-core-coq/src/Verifier/SAW/Translation/Coq/Term.hs
+++ b/saw-core-coq/src/Verifier/SAW/Translation/Coq/Term.hs
@@ -30,10 +30,11 @@ Portability : portable
module Verifier.SAW.Translation.Coq.Term where
import Control.Lens (makeLenses, over, set, to, view)
+import Control.Monad (forM)
import qualified Control.Monad.Except as Except
import qualified Control.Monad.Fail as Fail
-import Control.Monad.Reader hiding (fail, fix)
-import Control.Monad.State hiding (fail, fix, state)
+import Control.Monad.Reader (MonadReader(ask, local), asks)
+import Control.Monad.State (MonadState(get), modify)
import Data.Char (isDigit)
import Data.IntMap.Strict (IntMap)
import qualified Data.IntMap.Strict as IntMap
diff --git a/saw-core-sbv/saw-core-sbv.cabal b/saw-core-sbv/saw-core-sbv.cabal
index 386a740dde..45c38e431c 100644
--- a/saw-core-sbv/saw-core-sbv.cabal
+++ b/saw-core-sbv/saw-core-sbv.cabal
@@ -20,7 +20,7 @@ library
lens,
mtl,
saw-core,
- sbv >= 9.1 && < 9.3,
+ sbv >= 9.1 && < 10.3,
text,
transformers,
vector
diff --git a/saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs b/saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs
index 979bb21af2..d1e12804e9 100644
--- a/saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs
+++ b/saw-core-sbv/src/Verifier/SAW/Simulator/SBV.hs
@@ -37,6 +37,9 @@ module Verifier.SAW.Simulator.SBV
) where
import Data.SBV.Dynamic
+#if MIN_VERSION_sbv(10,0,0)
+import Data.SBV.Internals (UICodeKind(..))
+#endif
import Verifier.SAW.Simulator.SBV.SWord
@@ -56,8 +59,9 @@ import Data.Traversable as T
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
+import Control.Monad ((<=<), (>=>), foldM, unless, void)
import Control.Monad.IO.Class
-import Control.Monad.State as ST
+import Control.Monad.State as ST (MonadState(..), StateT(..), evalStateT, modify)
import Numeric.Natural (Natural)
import qualified Verifier.SAW.Prim as Prim
@@ -667,7 +671,14 @@ parseUninterpreted cws nm ty =
_ -> fail $ "could not create uninterpreted type for " ++ show ty
mkUninterpreted :: Kind -> [SVal] -> String -> SVal
-mkUninterpreted k args nm = svUninterpreted k nm' Nothing args
+mkUninterpreted k args nm =
+ svUninterpreted k nm'
+#if MIN_VERSION_sbv(10,0,0)
+ UINone
+#else
+ Nothing
+#endif
+ args
where nm' = "|" ++ nm ++ "|" -- enclose name to allow primes and other non-alphanum chars
sbvSATQuery :: SharedContext -> Map Ident SPrim -> SATQuery -> IO ([Labeler], [ExtCns Term], Symbolic SBool)
diff --git a/saw-core-what4/src/Verifier/SAW/Simulator/What4.hs b/saw-core-what4/src/Verifier/SAW/Simulator/What4.hs
index 9205af1b23..5a718180ae 100644
--- a/saw-core-what4/src/Verifier/SAW/Simulator/What4.hs
+++ b/saw-core-what4/src/Verifier/SAW/Simulator/What4.hs
@@ -79,7 +79,9 @@ import Data.Traversable as T
import Control.Applicative
#endif
import qualified Control.Exception as X
-import Control.Monad.State as ST
+import Control.Monad ((<=<), foldM, unless)
+import Control.Monad.State as ST (MonadState(..), StateT(..), evalStateT, modify)
+import Control.Monad.Trans.Class (MonadTrans(..))
import Numeric.Natural (Natural)
-- saw-core
diff --git a/saw-core-what4/src/Verifier/SAW/Simulator/What4/PosNat.hs b/saw-core-what4/src/Verifier/SAW/Simulator/What4/PosNat.hs
index a8f842f5dd..0dee4c1a91 100644
--- a/saw-core-what4/src/Verifier/SAW/Simulator/What4/PosNat.hs
+++ b/saw-core-what4/src/Verifier/SAW/Simulator/What4/PosNat.hs
@@ -6,7 +6,7 @@
-- Maintainer : sweirich@galois.com
-- Stability : experimental
-- Portability : non-portable (language extensions)
---
+--
-- A runtime representation of positive nats
------------------------------------------------------------------------
@@ -36,13 +36,13 @@
-- to allow implicitly provided nats
{-# LANGUAGE AllowAmbiguousTypes #-}
--- to allow 'WithKnownNat'
+-- to allow 'WithKnownNat'
{-# OPTIONS_GHC -Wno-warnings-deprecations #-}
module Verifier.SAW.Simulator.What4.PosNat where
-- TODO: find the right place for this code
-import GHC.TypeNats
+import GHC.TypeNats (KnownNat, Nat)
import Data.Parameterized.NatRepr
import Data.Parameterized.Some(Some(..))
@@ -58,7 +58,7 @@ data PosNat (n :: Nat) where
-- | Check whether an integer is a positive nat
somePosNat :: Integral a => a -> Maybe (Some PosNat)
-somePosNat n
+somePosNat n
| Just (Some nr) <- someNat n,
Just LeqProof <- testLeq (knownNat @1) nr
= withKnownNat nr $ Just (Some (PosNat nr))
@@ -79,7 +79,7 @@ addPosNat =
let w1 = knownNat @w1
w2 = knownNat @w2
sm = addNat w1 w2 in
- case leqAddPos w1 w2 of
+ case leqAddPos w1 w2 of
LeqProof -> withKnownNat sm $ PosNat sm
-- I would hope that the 'leqAddPos' call can be compiled away...
diff --git a/saw-core/src/Verifier/SAW/Change.hs b/saw-core/src/Verifier/SAW/Change.hs
index d2af8fb388..c47daf0b9a 100644
--- a/saw-core/src/Verifier/SAW/Change.hs
+++ b/saw-core/src/Verifier/SAW/Change.hs
@@ -24,7 +24,7 @@ module Verifier.SAW.Change
, flatten
) where
-import Control.Applicative (liftA2)
+import qualified Control.Applicative as App (liftA2)
import Control.Monad (liftM)
import Control.Monad.Trans
@@ -110,7 +110,7 @@ instance Functor m => Functor (ChangeT m) where
instance Applicative m => Applicative (ChangeT m) where
pure x = ChangeT (pure (Original x))
- ChangeT m1 <*> ChangeT m2 = ChangeT (liftA2 (<*>) m1 m2)
+ ChangeT m1 <*> ChangeT m2 = ChangeT (App.liftA2 (<*>) m1 m2)
instance Monad m => Monad (ChangeT m) where
return = pure
diff --git a/saw-core/src/Verifier/SAW/ExternalFormat.hs b/saw-core/src/Verifier/SAW/ExternalFormat.hs
index 5c0482b25d..e7668f0bfb 100644
--- a/saw-core/src/Verifier/SAW/ExternalFormat.hs
+++ b/saw-core/src/Verifier/SAW/ExternalFormat.hs
@@ -17,7 +17,9 @@ module Verifier.SAW.ExternalFormat (
scWriteExternal, scReadExternal
) where
-import Control.Monad.State.Strict as State
+import Control.Monad (forM)
+import qualified Control.Monad.State.Strict as State
+import Control.Monad.Trans.Class (MonadTrans(..))
#if !MIN_VERSION_base(4,8,0)
import Data.Traversable
#endif
@@ -221,7 +223,7 @@ scReadExternal sc input =
tf <- parse tokens
t <- lift $ scTermF sc tf
(ts, nms, vs) <- State.get
- put (Map.insert i t ts, nms, vs)
+ State.put (Map.insert i t ts, nms, vs)
go [] = pure () -- empty lines are ignored
readM :: forall a. Read a => String -> ReadM a
diff --git a/saw-core/src/Verifier/SAW/FiniteValue.hs b/saw-core/src/Verifier/SAW/FiniteValue.hs
index 3f7db224a0..73474c498f 100644
--- a/saw-core/src/Verifier/SAW/FiniteValue.hs
+++ b/saw-core/src/Verifier/SAW/FiniteValue.hs
@@ -17,7 +17,7 @@ import Data.Traversable
#endif
import GHC.Generics (Generic)
-import Control.Monad (mzero)
+import Control.Monad (replicateM, mzero)
import Control.Monad.Trans (lift)
import Control.Monad.Trans.Maybe
import qualified Control.Monad.State as S
@@ -355,7 +355,7 @@ readFiniteValue' en ft =
case bs of
[] -> S.lift Nothing
b : bs' -> S.put bs' >> return (FVBit b)
- FTVec n t -> (fvVec t . fixup) <$> S.replicateM (fromIntegral n) (readFiniteValue' en t)
+ FTVec n t -> (fvVec t . fixup) <$> replicateM (fromIntegral n) (readFiniteValue' en t)
where fixup = case (t, en) of
(FTBit, LittleEndian) -> reverse
_ -> id
diff --git a/saw-core/src/Verifier/SAW/ParserUtils.hs b/saw-core/src/Verifier/SAW/ParserUtils.hs
index 20e015119b..54f997e5d6 100644
--- a/saw-core/src/Verifier/SAW/ParserUtils.hs
+++ b/saw-core/src/Verifier/SAW/ParserUtils.hs
@@ -27,7 +27,9 @@ module Verifier.SAW.ParserUtils
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
-import Control.Monad.State
+import Control.Monad (forM_)
+import Control.Monad.State (StateT, execStateT, modify)
+import Control.Monad.Trans.Class (MonadTrans(..))
import qualified Data.ByteString.Lazy as BL
#if !MIN_VERSION_template_haskell(2,8,0)
import qualified Data.ByteString.Lazy.UTF8 as UTF8
diff --git a/saw-core/src/Verifier/SAW/Rewriter.hs b/saw-core/src/Verifier/SAW/Rewriter.hs
index dc1119875d..aa51f2638d 100644
--- a/saw-core/src/Verifier/SAW/Rewriter.hs
+++ b/saw-core/src/Verifier/SAW/Rewriter.hs
@@ -62,8 +62,8 @@ module Verifier.SAW.Rewriter
import Control.Applicative ((<$>), pure, (<*>))
import Data.Foldable (Foldable)
#endif
-import Control.Monad.Identity
-import Control.Monad.State
+import Control.Monad (MonadPlus(..), (>=>), guard, join, unless)
+import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Monad.Trans.Maybe
import Data.IORef
import qualified Data.Foldable as Foldable
diff --git a/saw-core/src/Verifier/SAW/SCTypeCheck.hs b/saw-core/src/Verifier/SAW/SCTypeCheck.hs
index 20700dac03..5129ea06fd 100644
--- a/saw-core/src/Verifier/SAW/SCTypeCheck.hs
+++ b/saw-core/src/Verifier/SAW/SCTypeCheck.hs
@@ -47,9 +47,11 @@ module Verifier.SAW.SCTypeCheck
) where
import Control.Applicative
-import Control.Monad.Except
-import Control.Monad.State.Strict
-import Control.Monad.Reader
+import Control.Monad (foldM, forM, forM_, mapM, unless, void)
+import Control.Monad.Except (MonadError(..), ExceptT, runExceptT)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (MonadReader(..), Reader, ReaderT(..), runReader)
+import Control.Monad.State.Strict (MonadState(..), StateT, evalStateT, modify)
import Data.Map (Map)
import qualified Data.Map as Map
diff --git a/saw-core/src/Verifier/SAW/SharedTerm.hs b/saw-core/src/Verifier/SAW/SharedTerm.hs
index 7a3fb99580..b9da0f1c5f 100644
--- a/saw-core/src/Verifier/SAW/SharedTerm.hs
+++ b/saw-core/src/Verifier/SAW/SharedTerm.hs
@@ -283,8 +283,11 @@ import Control.Applicative
import Control.Concurrent.MVar
import Control.Exception
import Control.Lens
-import Control.Monad.State.Strict as State
-import Control.Monad.Reader
+import Control.Monad (foldM, forM, join, unless, when)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
+import qualified Control.Monad.State.Strict as State
+import Control.Monad.Trans.Class (MonadTrans(..))
import Data.Bits
import Data.List (inits, find)
import Data.Maybe
@@ -306,7 +309,7 @@ import qualified Data.Set as Set
import qualified Data.Text as Text
import qualified Data.Vector as V
import Numeric.Natural (Natural)
-import Prelude hiding (mapM, maximum)
+import Prelude hiding (maximum)
import Text.URI
import Verifier.SAW.Cache
diff --git a/saw-core/src/Verifier/SAW/Simulator/MonadLazy.hs b/saw-core/src/Verifier/SAW/Simulator/MonadLazy.hs
index 575a382e91..3205f110b8 100644
--- a/saw-core/src/Verifier/SAW/Simulator/MonadLazy.hs
+++ b/saw-core/src/Verifier/SAW/Simulator/MonadLazy.hs
@@ -8,7 +8,8 @@ Portability : non-portable (language extensions)
-}
module Verifier.SAW.Simulator.MonadLazy where
-import Control.Monad.Identity
+import Control.Monad (liftM)
+import Control.Monad.Identity (Identity)
import Control.Monad.IO.Class
import Data.IORef
diff --git a/saw-core/src/Verifier/SAW/Simulator/RME.hs b/saw-core/src/Verifier/SAW/Simulator/RME.hs
index 77ba4e2d88..d03b5b4948 100644
--- a/saw-core/src/Verifier/SAW/Simulator/RME.hs
+++ b/saw-core/src/Verifier/SAW/Simulator/RME.hs
@@ -24,8 +24,9 @@ module Verifier.SAW.Simulator.RME
, withBitBlastedSATQuery
) where
-import Control.Monad.Identity
-import Control.Monad.State
+import Control.Monad (unless)
+import Control.Monad.Identity (Identity(..))
+import Control.Monad.State (MonadState(..), State, evalState)
import Data.Bits
import Data.IntTrie (IntTrie)
import qualified Data.IntTrie as IntTrie
@@ -315,14 +316,14 @@ vSignedShiftR xs i
toIntModOp :: RPrim
toIntModOp =
- Prims.natFun $ \n ->
+ Prims.natFun $ \n ->
Prims.intFun $ \x ->
Prims.PrimValue (VIntMod n (x `mod` toInteger n))
fromIntModOp :: RPrim
fromIntModOp =
Prims.constFun $
- Prims.intModFun $ \x ->
+ Prims.intModFun $ \x ->
Prims.PrimValue (VInt x)
intModEqOp :: RPrim
diff --git a/saw-core/src/Verifier/SAW/Term/Pretty.hs b/saw-core/src/Verifier/SAW/Term/Pretty.hs
index a06d930828..72c1b97798 100644
--- a/saw-core/src/Verifier/SAW/Term/Pretty.hs
+++ b/saw-core/src/Verifier/SAW/Term/Pretty.hs
@@ -46,8 +46,9 @@ module Verifier.SAW.Term.Pretty
import Data.Char (intToDigit, isDigit)
import Data.Maybe (isJust)
-import Control.Monad.Reader
-import Control.Monad.State.Strict as State
+import Control.Monad (forM)
+import Control.Monad.Reader (MonadReader(..), Reader, asks, runReader)
+import Control.Monad.State.Strict (MonadState(..), State, execState)
#if !MIN_VERSION_base(4,8,0)
import Data.Foldable (Foldable)
#endif
@@ -311,9 +312,9 @@ withMemoVar global_p idx f =
-- "pretend" we memoized by calling `updateMemoVar`, so that non-inlined
-- memoization identifiers are kept constant between two
-- otherwise-identical terms with differing inline strategies.
- (skip:skips)
+ (skip:skips)
| skip == memoVar -> local (updateMemoVar . addIdxSkip . setMemoSkips skips) (f Nothing)
- _
+ _
| idx `Set.member` idxSkips -> f Nothing
| otherwise -> local (updateMemoVar . bind memoVar) (f (Just memoVar))
where
@@ -693,7 +694,7 @@ ppLets global_p ((idx, (t_rhs,_)):idxs) bindings baseDoc =
if isBound then ppLets global_p idxs bindings baseDoc else
do doc_rhs <- ppTerm' PrecTerm t_rhs
withMemoVar global_p idx $ \memoVarM ->
- let bindings' = case memoVarM of
+ let bindings' = case memoVarM of
Just memoVar -> (memoVar, doc_rhs):bindings
Nothing -> bindings
in ppLets global_p idxs bindings' baseDoc
diff --git a/saw-core/src/Verifier/SAW/Typechecker.hs b/saw-core/src/Verifier/SAW/Typechecker.hs
index 1ad0b42757..b04a190773 100644
--- a/saw-core/src/Verifier/SAW/Typechecker.hs
+++ b/saw-core/src/Verifier/SAW/Typechecker.hs
@@ -33,7 +33,8 @@ module Verifier.SAW.Typechecker
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
-import Control.Monad.State
+import Control.Monad (forM, forM_, void)
+import Control.Monad.IO.Class (MonadIO(..))
import Data.List (findIndex)
import Data.Text (Text)
import qualified Data.Vector as V
diff --git a/saw-remote-api/CHANGELOG.md b/saw-remote-api/CHANGELOG.md
index 62a8ab9989..8aafd8075b 100644
--- a/saw-remote-api/CHANGELOG.md
+++ b/saw-remote-api/CHANGELOG.md
@@ -8,6 +8,8 @@
* The `SAW/MIR/verify` command performs verification of a MIR function.
* The `SAW/MIR/find ADT` command looks up an algebraic data type (ADT) name in
a MIR module.
+ * The `SAW/MIR/assume` command assumes a specification for a MIR function
+ without performing any verification.
See the [remote API
documentation](https://github.com/GaloisInc/saw-script/blob/master/saw-remote-api/docs/SAW.rst#sawmirload-module-command)
@@ -33,6 +35,8 @@
* Add `"slice"` and `"slice range"` `setup value`s representing slices in MIR
verification. Attempting to use these in LLVM or JVM verification will raise
an error.
+* The `SAW/create ghost variable` command and the associated
+ `ghost variable value` value are now supported with JVM and MIR verification.
## 1.0.0 -- 2023-06-26
diff --git a/saw-remote-api/Dockerfile b/saw-remote-api/Dockerfile
index 75f5d3ecb8..348a75aacd 100644
--- a/saw-remote-api/Dockerfile
+++ b/saw-remote-api/Dockerfile
@@ -14,16 +14,16 @@ USER saw
WORKDIR /home/saw
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
-COPY cabal.GHC-9.2.7.config cabal.project.freeze
+COPY cabal.GHC-9.2.8.config cabal.project.freeze
ENV PATH=/home/saw/ghcup-download/bin:/home/saw/.ghcup/bin:$PATH
RUN mkdir -p /home/saw/ghcup-download/bin && \
- curl -L https://downloads.haskell.org/~ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 -o /home/saw/ghcup-download/bin/ghcup && \
+ curl -L https://downloads.haskell.org/~ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 -o /home/saw/ghcup-download/bin/ghcup && \
chmod +x /home/saw/ghcup-download/bin/ghcup
RUN mkdir -p /home/saw/.ghcup && \
ghcup --version && \
ghcup install cabal 3.8.1.0 && \
- ghcup install ghc 9.2.7 && \
- ghcup set ghc 9.2.7
+ ghcup install ghc 9.2.8 && \
+ ghcup set ghc 9.2.8
RUN cabal v2-update && cabal v2-build -j exe:saw-remote-api
RUN mkdir -p /home/saw/rootfs/usr/local/bin
RUN cp $(cabal v2-exec which saw-remote-api) /home/saw/rootfs/usr/local/bin/saw-remote-api
diff --git a/saw-remote-api/python/CHANGELOG.md b/saw-remote-api/python/CHANGELOG.md
index fa1ab56f1e..b2434fd8fc 100644
--- a/saw-remote-api/python/CHANGELOG.md
+++ b/saw-remote-api/python/CHANGELOG.md
@@ -8,7 +8,8 @@
* The `mir_verify` function performs verification of a MIR function.
* The `mir_find_adt` function looks up an algebraic data type (ADT) name in a
MIR module.
-
+ * The `mir_assume` function assumes a specification for a MIR function without
+ performing any verification.
* The `saw_client.mir` module contains utility functions for constructing
MIR types.
@@ -37,6 +38,8 @@
variable. This function is currently only supported with LLVM and MIR
verification, and using this function with JVM verification will raise an
error.
+* The `create_ghost_variable()` and `ghost_value()` functions are now supported
+ with JVM and MIR verification.
## 1.0.1 -- YYYY-MM-DD
diff --git a/saw-remote-api/python/saw_client/connection.py b/saw-remote-api/python/saw_client/connection.py
index 25dfc4018e..8675dcfe65 100644
--- a/saw-remote-api/python/saw_client/connection.py
+++ b/saw-remote-api/python/saw_client/connection.py
@@ -265,7 +265,7 @@ def mir_assume(self,
function.
"""
self.most_recent_result = \
- LLVMAssume(self, module, function, contract, lemma_name, timeout)
+ MIRAssume(self, module, function, contract, lemma_name, timeout)
return self.most_recent_result
def mir_find_adt(self,
diff --git a/saw-remote-api/python/tests/saw/test-files/mir_ghost.linked-mir.json b/saw-remote-api/python/tests/saw/test-files/mir_ghost.linked-mir.json
new file mode 100644
index 0000000000..f09a6a8147
--- /dev/null
+++ b/saw-remote-api/python/tests/saw/test-files/mir_ghost.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::ae5488df1dc4e585"},"kind":"Constant"},"kind":"Call","pos":"mir_ghost.rs:6:5: 6:11"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::ae5488df1dc4e585"},"kind":"Constant"},"kind":"Call","pos":"mir_ghost.rs:7:5: 7:11"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"args":[],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::ae5488df1dc4e585"},"kind":"Constant"},"kind":"Call","pos":"mir_ghost.rs:8:5: 8:11"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"mir_ghost.rs:9:2: 9:2"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}]},"name":"mir_ghost/150ed446::example","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_ghost/150ed4465f8cb026::{{alloc}}[0]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_ghost.rs:2:20: 2:47","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_ghost/150ed4465f8cb026::{{alloc}}[1]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_ghost.rs:2:20: 2:47","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_ghost.rs:2:20: 2:47","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::675b2a8049aad652"}},"pos":"mir_ghost.rs:2:20: 2:47","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_ghost/150ed4465f8cb026::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Adt::ba5184b53bc36a4d"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::Adt::613f1953a8669d14"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::72bf0f6662028c6a"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_ghost.rs:2:5: 2:48"}},"blockid":"bb1"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Array::6167cd8fdeb01e06"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_ghost.rs:2:5: 2:48","rhs":{"akind":{"kind":"Array","ty":"ty::Adt::613f1953a8669d14"},"kind":"Aggregate","ops":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::Adt::613f1953a8669d14"}},"kind":"Move"}]}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_ghost.rs:2:5: 2:48","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Array::6167cd8fdeb01e06"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_ghost.rs:2:5: 2:48","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_ghost.rs:2:5: 2:48"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !mir_ghost.rs:2:5: 2:48"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":true,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Array::6167cd8fdeb01e06"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"mir_ghost/150ed446::next","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Cast","op":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::b30b83d63051810b"},"kind":"Constant"},"ty":"ty::FnPtr::07cd89921cc84271","type":{"kind":"Pointer(ReifyFnPointer)"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::788a983faed72be6"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb0"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:58: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f532a620418c4246"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:84: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::4e8e6a61a1ceb622"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:329:10: 329:10 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","return_ty":"ty::Adt::613f1953a8669d14","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:23: 400:24","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Lt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb2","bb1"],"values":["0"]}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"bool","size":1,"val":"1"},"ty":"ty::bool"},"kind":"Constant"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:52: 400:53","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:65: 400:66","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"kind":"Constant"},"kind":"BinaryOp","op":{"kind":"Add"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Gt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"kind":"Move"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb2"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb6","bb4"],"values":["0"]}},"blockid":"bb3"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_ghost/150ed4465f8cb026::{{alloc}}[3]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:33: 401:34","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_ghost/150ed4465f8cb026::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb5"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb4"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb5"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:402:9: 402:10","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38"},{"kind":"SetDiscriminant","lvalue":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","variant_index":0},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::675b2a8049aad652"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::Adt::45883e75bd5c5ca5"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":2,"kind":"Field","ty":"ty::Ref::913e2ff5487f7787"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:404:6: 404:6"}},"blockid":"bb6"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","return_ty":"ty::Adt::ba5184b53bc36a4d","spread_arg":null}],"adts":[{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Arguments::pieces","ty":"ty::Ref::675b2a8049aad652"},{"name":"core/73237d41::fmt::Arguments::fmt","ty":"ty::Adt::45883e75bd5c5ca5"},{"name":"core/73237d41::fmt::Arguments::args","ty":"ty::Ref::913e2ff5487f7787"}],"inhabited":true,"name":"core/73237d41::fmt::Arguments"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::ArgumentV1::value","ty":"ty::Ref::4e8e6a61a1ceb622"},{"name":"core/73237d41::fmt::ArgumentV1::formatter","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"inhabited":true,"name":"core/73237d41::fmt::ArgumentV1"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::Ref::5f3877d5405402c5"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::Ref::5f3877d5405402c5"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","orig_substs":[],"repr_transparent":false,"size":0,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[],"inhabited":true,"name":"core/73237d41::fmt::Error"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","orig_substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::result::Result::Ok::0","ty":"ty::Tuple::e93222e871854c41"}],"inhabited":true,"name":"core/73237d41::result::Result::Ok"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::result::Result::Err::0","ty":"ty::Adt::8d47b311e48cbf8f"}],"inhabited":true,"name":"core/73237d41::result::Result::Err"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","orig_substs":[],"repr_transparent":false,"size":56,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::Argument::position","ty":"ty::usize"},{"name":"core/73237d41::fmt::rt::v1::Argument::format","ty":"ty::Adt::ed8948c5d0b3a39f"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Argument"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":64,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Formatter::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::Formatter::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::Formatter::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::Formatter::width","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::precision","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::buf","ty":"ty::Ref::0cd866b4eb1c792b"}],"inhabited":true,"name":"core/73237d41::fmt::Formatter"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","orig_substs":[],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::FormatSpec::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::precision","ty":"ty::Adt::389b970f3565f26b"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::width","ty":"ty::Adt::389b970f3565f26b"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::FormatSpec"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","orig_substs":[],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Left"},{"ctor_kind":{"kind":"Const"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Right"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Center"},{"ctor_kind":{"kind":"Const"},"discr":{"index":3,"kind":"Relative"},"discr_value":"3","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Unknown"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::usize"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","orig_substs":[],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Is::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Is"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Param::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Param"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Implied"}]}],"statics":[{"kind":"constant","mutable":false,"name":"mir_ghost/150ed4465f8cb026::{{alloc}}[0]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,58,32]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"mir_ghost/150ed4465f8cb026::{{alloc}}[1]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[84,104,105,115,32,115,104,111,117,108,100,32,98,101,32,111,118,101,114,114,105,100,100,101,110]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"mir_ghost/150ed4465f8cb026::{{alloc}}[2]","rendered":{"element_ty":"ty::Adt::613f1953a8669d14","elements":[],"kind":"array"},"ty":"ty::Array::0e1a52ee2b2d3e97"},{"kind":"constant","mutable":false,"name":"mir_ghost/150ed4465f8cb026::{{alloc}}[3]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[105,110,118,97,108,105,100,32,97,114,103,115]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"}],"vtables":[],"traits":[{"items":[{"item_id":"core/73237d41::fmt::Write::write_str","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Ref::fb1cfdc5725cd03b"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_char","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::char"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_fmt","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Adt::ba5184b53bc36a4d"],"output":"ty::Adt::30ed5848b4f625b6"}}],"name":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}],"intrinsics":[{"inst":{"def_id":"mir_ghost/150ed446::example","kind":"Item","substs":[]},"name":"mir_ghost/150ed446::example"},{"inst":{"def_id":"mir_ghost/150ed446::next","kind":"Item","substs":[]},"name":"mir_ghost/150ed446::next"},{"inst":{"def_id":"core/73237d41::fmt::{impl#3}::new_display","kind":"Item","substs":["nonty::Lifetime","ty::Adt::ba5184b53bc36a4d"]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]"},{"inst":{"def_id":"core/73237d41::fmt::{impl#4}::new_v1","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]"},{"inst":{"def_id":"core/73237d41::panicking::panic_fmt","kind":"Item","substs":[]},"name":"core/73237d41::panicking::panic_fmt"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::Ref::bf4d6d337c623aee","ty::Ref::4e8e6a61a1ceb622"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::FnPtr::07cd89921cc84271","ty::FnPtr::bd6bee7b1f95b7bf"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]"},{"inst":{"def_id":"core/73237d41::fmt::{impl#7}::fmt","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::FnDef::ae5488df1dc4e585","ty":{"defid":"mir_ghost/150ed446::next","kind":"FnDef"}},{"name":"ty::Never::7199a9b06188843c","ty":{"kind":"Never"}},{"name":"ty::Adt::ba5184b53bc36a4d","ty":{"kind":"Adt","name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","substs":["nonty::Lifetime"]}},{"name":"ty::str","ty":{"kind":"Str"}},{"name":"ty::Ref::fb1cfdc5725cd03b","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::str"}},{"name":"ty::Slice::563a94fdd2fd2b33","ty":{"kind":"Slice","ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::675b2a8049aad652","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::563a94fdd2fd2b33"}},{"name":"ty::usize","ty":{"kind":"Uint","uintkind":{"kind":"Usize"}}},{"name":"ty::Array::e5bd840a2dafa04a","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::c2a5dcbb98af2a61","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::e5bd840a2dafa04a"}},{"name":"ty::Adt::613f1953a8669d14","ty":{"kind":"Adt","name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","substs":["nonty::Lifetime"]}},{"name":"ty::Slice::818a2c6d5f962f99","ty":{"kind":"Slice","ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::913e2ff5487f7787","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::818a2c6d5f962f99"}},{"name":"ty::Array::6167cd8fdeb01e06","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::41f3f8f95d02c3e9","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::6167cd8fdeb01e06"}},{"name":"ty::Ref::bf4d6d337c623aee","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Adt::ba5184b53bc36a4d"}},{"name":"ty::Array::0e1a52ee2b2d3e97","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"0"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::d0bd7bf253977b90","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::0e1a52ee2b2d3e97"}},{"name":"ty::FnDef::76afb566734aff77","ty":{"defid":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::72bf0f6662028c6a","ty":{"defid":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","kind":"FnDef"}},{"name":"ty::FnDef::906e67453a1bbab9","ty":{"defid":"core/73237d41::panicking::panic_fmt","kind":"FnDef"}},{"name":"ty::Adt::afb4c9f4ce8cdadf","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","substs":[]}},{"name":"ty::Slice::26b8a0a5e2b22aa9","ty":{"kind":"Slice","ty":"ty::Adt::afb4c9f4ce8cdadf"}},{"name":"ty::Ref::5f3877d5405402c5","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::26b8a0a5e2b22aa9"}},{"name":"ty::Adt::45883e75bd5c5ca5","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::Ref::5f3877d5405402c5"]}},{"name":"ty::Foreign::66d9923797cfc204","ty":{"kind":"Foreign"}},{"name":"ty::Ref::4e8e6a61a1ceb622","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Foreign::66d9923797cfc204"}},{"name":"ty::Adt::ad5a554022507816","ty":{"kind":"Adt","name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","substs":["nonty::Lifetime"]}},{"name":"ty::Ref::7984c7d8fa40d865","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Adt::ad5a554022507816"}},{"name":"ty::Tuple::e93222e871854c41","ty":{"kind":"Tuple","tys":[]}},{"name":"ty::Adt::8d47b311e48cbf8f","ty":{"kind":"Adt","name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","substs":[]}},{"name":"ty::Adt::30ed5848b4f625b6","ty":{"kind":"Adt","name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"]}},{"name":"ty::FnPtr::bd6bee7b1f95b7bf","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::4e8e6a61a1ceb622","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::FnPtr::07cd89921cc84271","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::bf4d6d337c623aee","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::FnDef::b30b83d63051810b","ty":{"defid":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::788a983faed72be6","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]","kind":"FnDef"}},{"name":"ty::FnDef::f532a620418c4246","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]","kind":"FnDef"}},{"name":"ty::bool","ty":{"kind":"Bool"}},{"name":"ty::isize","ty":{"intkind":{"kind":"Isize"},"kind":"Int"}},{"name":"ty::Adt::ed8948c5d0b3a39f","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","substs":[]}},{"name":"ty::char","ty":{"kind":"Char"}},{"name":"ty::Adt::c4745d1cf6b33a46","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","substs":[]}},{"name":"ty::Adt::ba42a94c73933868","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::usize"]}},{"name":"ty::Dynamic::08a22e65af9638be","ty":{"kind":"Dynamic","predicates":[{"kind":"Trait","substs":[],"trait":"core/73237d41::fmt::Write"}],"trait_id":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}},{"name":"ty::Ref::0cd866b4eb1c792b","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Dynamic::08a22e65af9638be"}},{"name":"ty::Adt::389b970f3565f26b","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","substs":[]}}],"roots":["mir_ghost/150ed446::next","mir_ghost/150ed446::example"]}
\ No newline at end of file
diff --git a/saw-remote-api/python/tests/saw/test-files/mir_ghost.rs b/saw-remote-api/python/tests/saw/test-files/mir_ghost.rs
new file mode 100644
index 0000000000..fafa13669c
--- /dev/null
+++ b/saw-remote-api/python/tests/saw/test-files/mir_ghost.rs
@@ -0,0 +1,9 @@
+pub fn next() -> u32 {
+ unimplemented!("This should be overridden")
+}
+
+pub fn example() -> u32 {
+ next();
+ next();
+ next()
+}
diff --git a/saw-remote-api/python/tests/saw/test-files/mir_unsafe_assume_spec.linked-mir.json b/saw-remote-api/python/tests/saw/test-files/mir_unsafe_assume_spec.linked-mir.json
new file mode 100644
index 0000000000..81e0684024
--- /dev/null
+++ b/saw-remote-api/python/tests/saw/test-files/mir_unsafe_assume_spec.linked-mir.json
@@ -0,0 +1 @@
+{"fns":[{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::e028c0f25e8b6323"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::e028c0f25e8b6323"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[0]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_7","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_7","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_unsafe_assume_spec.rs:18:20: 18:43","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[1]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_unsafe_assume_spec.rs:18:20: 18:43","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_unsafe_assume_spec.rs:18:20: 18:43","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::675b2a8049aad652"}},"pos":"mir_unsafe_assume_spec.rs:18:20: 18:43","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Adt::ba5184b53bc36a4d"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Adt::613f1953a8669d14"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::72bf0f6662028c6a"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:18:5: 18:44"}},"blockid":"bb1"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_11","ty":"ty::Array::6167cd8fdeb01e06"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"akind":{"kind":"Array","ty":"ty::Adt::613f1953a8669d14"},"kind":"Aggregate","ops":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Adt::613f1953a8669d14"}},"kind":"Move"}]}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_11","ty":"ty::Array::6167cd8fdeb01e06"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:18:5: 18:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:18:5: 18:44"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !mir_unsafe_assume_spec.rs:18:5: 18:44"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_3","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_7","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_11","ty":"ty::Array::6167cd8fdeb01e06"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::p","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::e028c0f25e8b6323"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::e028c0f25e8b6323"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::e028c0f25e8b6323"}},"pos":"mir_unsafe_assume_spec.rs:22:7: 22:8","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::e028c0f25e8b6323"}},"pos":"mir_unsafe_assume_spec.rs:22:10: 22:11","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::e028c0f25e8b6323"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::6788526e8b011d28"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:22:5: 22:12"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"mir_unsafe_assume_spec.rs:23:2: 23:2"}},"blockid":"bb1"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Ref::e028c0f25e8b6323"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::e028c0f25e8b6323"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::q","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[],"body":{"blocks":[{"block":{"data":[],"terminator":{"args":[{"data":{"rendered":{"kind":"uint","size":4,"val":"2"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::5862378a14bfe788"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:14:5: 14:9"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::u32"}},"kind":"Move"},{"data":{"rendered":{"kind":"uint","size":4,"val":"1"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f55acdef755f1aaa"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:14:5: 14:25"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"mir_unsafe_assume_spec.rs:15:2: 15:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_1","ty":"ty::u32"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::g2","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"pos":"mir_unsafe_assume_spec.rs:32:22: 32:23","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::953fce25114368d0"}},"pos":"mir_unsafe_assume_spec.rs:33:17: 33:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::953fce25114368d0"}},"pos":"mir_unsafe_assume_spec.rs:33:17: 33:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::953fce25114368d0"}},"region":"unimplement"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::953fce25114368d0"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_3","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::54f52d7b1f637d68"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:33:5: 33:24"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::953fce25114368d0"}},"pos":"mir_unsafe_assume_spec.rs:34:17: 34:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::953fce25114368d0"}},"pos":"mir_unsafe_assume_spec.rs:34:17: 34:23","rhs":{"borrowkind":"Mut","kind":"Ref","refvar":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::953fce25114368d0"}},"region":"unimplement"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::953fce25114368d0"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::54f52d7b1f637d68"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:34:5: 34:24"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"mir_unsafe_assume_spec.rs:35:2: 35:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_3","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::953fce25114368d0"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::953fce25114368d0"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::953fce25114368d0"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::953fce25114368d0"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::foo","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"pos":"mir_unsafe_assume_spec.rs:6:7: 6:8","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::5862378a14bfe788"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:6:5: 6:9"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"kind":"Move"},{"data":{"rendered":{"kind":"uint","size":4,"val":"1"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f55acdef755f1aaa"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:6:5: 6:25"}},"blockid":"bb1"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"mir_unsafe_assume_spec.rs:7:2: 7:2"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::g","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[3]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:24: 709:45 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_unsafe_assume_spec.rs:2:20: 2:44","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[4]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_unsafe_assume_spec.rs:2:20: 2:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"mir_unsafe_assume_spec.rs:2:20: 2:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::675b2a8049aad652"}},"pos":"mir_unsafe_assume_spec.rs:2:20: 2:44","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45"}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Adt::ba5184b53bc36a4d"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Adt::613f1953a8669d14"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::72bf0f6662028c6a"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/macros/mod.rs:709:47: 709:77 !mir_unsafe_assume_spec.rs:2:5: 2:45"}},"blockid":"bb1"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Array::6167cd8fdeb01e06"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"akind":{"kind":"Array","ty":"ty::Adt::613f1953a8669d14"},"kind":"Aggregate","ops":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Adt::613f1953a8669d14"}},"kind":"Move"}]}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"borrowkind":"Shared","kind":"Ref","refvar":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Array::6167cd8fdeb01e06"}},"region":"unimplement"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:2:5: 2:45","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb3"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !mir_unsafe_assume_spec.rs:2:5: 2:45"}},"blockid":"bb2"},{"block":{"data":[],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !mir_unsafe_assume_spec.rs:2:5: 2:45"}},"blockid":"bb3"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_6","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_9","ty":"ty::Ref::41f3f8f95d02c3e9"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_10","ty":"ty::Array::6167cd8fdeb01e06"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_13","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_14","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_15","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_17","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_19","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_20","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_22","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::f","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"mir_unsafe_assume_spec.rs:26:18: 26:20","rhs":{"kind":"Use","usevar":{"data":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::953fce25114368d0"}},"pos":"mir_unsafe_assume_spec.rs:27:5: 27:11","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"uint","size":4,"val":"0"},"ty":"ty::u32"},"kind":"Constant"}}}],"terminator":{"kind":"Return","pos":"mir_unsafe_assume_spec.rs:29:2: 29:2"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::side_effect","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"pos":"mir_unsafe_assume_spec.rs:10:5: 10:6","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}},"kind":"Move"},{"data":{"rendered":{"kind":"uint","size":4,"val":"1"},"ty":"ty::u32"},"kind":"Constant"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f55acdef755f1aaa"},"kind":"Constant"},"kind":"Call","pos":"mir_unsafe_assume_spec.rs:10:5: 10:22"}},"blockid":"bb0"},{"block":{"data":[],"terminator":{"kind":"Return","pos":"mir_unsafe_assume_spec.rs:11:2: 11:2"}},"blockid":"bb1"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::u32"}]},"name":"mir_unsafe_assume_spec/bdfefe3d::h","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:24","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:23: 400:24","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:27: 400:37","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Lt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:36: 400:37","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:37","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb2","bb1"],"values":["0"]}},"blockid":"bb0"},{"block":{"data":[{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"kind":"bool","size":1,"val":"1"},"ty":"ty::bool"},"kind":"Constant"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:53","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:52: 400:53","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:66","rhs":{"kind":"Len","lv":{"data":[{"kind":"Deref"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:65: 400:66","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:56: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"kind":"Constant"},"kind":"BinaryOp","op":{"kind":"Add"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:41: 400:70","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Gt"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},"kind":"Move"}}}],"terminator":{"kind":"Goto","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","target":"bb3"}},"blockid":"bb2"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:69: 400:70","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"}}],"terminator":{"discr":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},"kind":"Move"},"discr_span":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","kind":"SwitchInt","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:400:12: 400:70","switch_ty":"ty::bool","targets":["bb6","bb4"],"values":["0"]}},"blockid":"bb3"},{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[5]","kind":"static_ref"},"ty":"ty::Ref::c2a5dcbb98af2a61"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:20: 401:34","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},"kind":"Move"},"ty":"ty::Ref::675b2a8049aad652","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:33: 401:34","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","slvar":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"rendered":{"def_id":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[2]","kind":"static_ref"},"ty":"ty::Ref::d0bd7bf253977b90"},"kind":"Constant"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","rhs":{"kind":"Cast","op":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}},"kind":"Move"},"ty":"ty::Ref::913e2ff5487f7787","type":{"kind":"Pointer(Unsize)"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"},{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"bb5"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::76afb566734aff77"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:38: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb4"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:71: 57:72 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"}},"kind":"Move"}],"cleanup":null,"destination":null,"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::906e67453a1bbab9"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/panic.rs:57:9: 57:73 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:401:13: 401:35"}},"blockid":"bb5"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:402:9: 402:10","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:21: 403:27","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38"},{"kind":"SetDiscriminant","lvalue":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:34: 403:38","variant_index":0},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:40: 403:44","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Copy"}}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::675b2a8049aad652"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::Adt::45883e75bd5c5ca5"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":2,"kind":"Field","ty":"ty::Ref::913e2ff5487f7787"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:9: 403:46","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:403:45: 403:46","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:404:6: 404:6"}},"blockid":"bb6"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_8","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_9","ty":"ty::bool"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_10","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_11","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_12","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_13","ty":"ty::usize"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_14","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":true,"mut":{"kind":"Not"},"name":"_15","ty":"ty::Never::7199a9b06188843c"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_16","ty":"ty::Adt::ba5184b53bc36a4d"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_17","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_18","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_19","ty":"ty::Ref::c2a5dcbb98af2a61"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_20","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_21","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_22","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_23","ty":"ty::Ref::675b2a8049aad652"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_24","ty":"ty::Adt::45883e75bd5c5ca5"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_25","ty":"ty::Ref::913e2ff5487f7787"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_26","ty":"ty::Ref::d0bd7bf253977b90"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_27","ty":"ty::Ref::c2a5dcbb98af2a61"}]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","return_ty":"ty::Adt::ba5184b53bc36a4d","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:38: 1162:42 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:38: 1162:42 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::u32"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:44: 1162:47 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:44: 1162:47 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_2","ty":"ty::u32"}},"kind":"Copy"}}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:13: 1162:48 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","rhs":{"L":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}},"kind":"Move"},"R":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},"kind":"Move"},"kind":"BinaryOp","op":{"kind":"Add"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:47: 1162:48 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1162:47: 1162:48 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/uint_macros.rs:1163:10: 1163:10 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/num/mod.rs:921:5: 922:101"}},"blockid":"bb0"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::u32"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::u32"}]},"name":"core/73237d41::num::{impl#9}::wrapping_add","return_ty":"ty::u32","spread_arg":null},{"abi":{"kind":"Rust"},"args":[{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}],"body":{"blocks":[{"block":{"data":[{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:23: 328:24 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Not"},"name":"_1","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:26: 328:33 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Cast","op":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::b30b83d63051810b"},"kind":"Constant"},"ty":"ty::FnPtr::07cd89921cc84271","type":{"kind":"Pointer(ReifyFnPointer)"}}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:57: 347:58 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"bb1"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::788a983faed72be6"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:42: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb0"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:58: 347:59 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageLive","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","slvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Assign","lhs":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:83: 347:84 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Copy"}}}],"terminator":{"args":[{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},"kind":"Move"}],"cleanup":null,"destination":[{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"bb2"],"from_hir_call":true,"func":{"data":{"rendered":{"kind":"zst"},"ty":"ty::FnDef::f532a620418c4246"},"kind":"Constant"},"kind":"Call","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:68: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb1"},{"block":{"data":[{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:84: 347:85 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}},{"kind":"Deinit","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"},{"kind":"Assign","lhs":{"data":[{"field":0,"kind":"Field","ty":"ty::Ref::4e8e6a61a1ceb622"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},"kind":"Move"}}},{"kind":"Assign","lhs":{"data":[{"field":1,"kind":"Field","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"}},"pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:18: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","rhs":{"kind":"Use","usevar":{"data":{"data":[],"var":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},"kind":"Move"}}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:347:86: 347:87 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"}},{"kind":"StorageDead","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:328:33: 328:34 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35","sdvar":{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"}}],"terminator":{"kind":"Return","pos":"/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:329:10: 329:10 !/rustc/5e37043d63bfe2f3be8fa5a05b07d6c0dad5775d/library/core/src/fmt/mod.rs:350:5: 350:35"}},"blockid":"bb2"}],"vars":[{"is_zst":false,"mut":{"kind":"Mut"},"name":"_0","ty":"ty::Adt::613f1953a8669d14"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_2","ty":"ty::Ref::bf4d6d337c623aee"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_3","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_4","ty":"ty::FnPtr::bd6bee7b1f95b7bf"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_5","ty":"ty::FnPtr::07cd89921cc84271"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_6","ty":"ty::Ref::4e8e6a61a1ceb622"},{"is_zst":false,"mut":{"kind":"Mut"},"name":"_7","ty":"ty::Ref::bf4d6d337c623aee"}]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","return_ty":"ty::Adt::613f1953a8669d14","spread_arg":null}],"adts":[{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::ArgumentV1::value","ty":"ty::Ref::4e8e6a61a1ceb622"},{"name":"core/73237d41::fmt::ArgumentV1::formatter","ty":"ty::FnPtr::bd6bee7b1f95b7bf"}],"inhabited":true,"name":"core/73237d41::fmt::ArgumentV1"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Arguments::pieces","ty":"ty::Ref::675b2a8049aad652"},{"name":"core/73237d41::fmt::Arguments::fmt","ty":"ty::Adt::45883e75bd5c5ca5"},{"name":"core/73237d41::fmt::Arguments::args","ty":"ty::Ref::913e2ff5487f7787"}],"inhabited":true,"name":"core/73237d41::fmt::Arguments"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","orig_substs":["nonty::Lifetime"],"repr_transparent":false,"size":64,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::Formatter::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::Formatter::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::Formatter::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::Formatter::width","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::precision","ty":"ty::Adt::ba42a94c73933868"},{"name":"core/73237d41::fmt::Formatter::buf","ty":"ty::Ref::0cd866b4eb1c792b"}],"inhabited":true,"name":"core/73237d41::fmt::Formatter"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","orig_substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::result::Result::Ok::0","ty":"ty::Tuple::e93222e871854c41"}],"inhabited":true,"name":"core/73237d41::result::Result::Ok"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::result::Result::Err::0","ty":"ty::Adt::8d47b311e48cbf8f"}],"inhabited":true,"name":"core/73237d41::result::Result::Err"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","orig_substs":[],"repr_transparent":false,"size":0,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[],"inhabited":true,"name":"core/73237d41::fmt::Error"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::Ref::5f3877d5405402c5"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::Ref::5f3877d5405402c5"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","orig_substs":[],"repr_transparent":false,"size":56,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::Argument::position","ty":"ty::usize"},{"name":"core/73237d41::fmt::rt::v1::Argument::format","ty":"ty::Adt::ed8948c5d0b3a39f"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Argument"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","orig_substs":["ty::usize"],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::option::Option::None"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::option::Option::Some::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::option::Option::Some"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","orig_substs":[],"repr_transparent":false,"size":1,"variants":[{"ctor_kind":{"kind":"Const"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Left"},{"ctor_kind":{"kind":"Const"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Right"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Center"},{"ctor_kind":{"kind":"Const"},"discr":{"index":3,"kind":"Relative"},"discr_value":"3","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Alignment::Unknown"}]},{"kind":{"kind":"Struct"},"name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","orig_substs":[],"repr_transparent":false,"size":48,"variants":[{"ctor_kind":null,"discr":{"index":0,"kind":"Relative"},"discr_value":null,"fields":[{"name":"core/73237d41::fmt::rt::v1::FormatSpec::fill","ty":"ty::char"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::align","ty":"ty::Adt::c4745d1cf6b33a46"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::flags","ty":"ty::u32"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::precision","ty":"ty::Adt::389b970f3565f26b"},{"name":"core/73237d41::fmt::rt::v1::FormatSpec::width","ty":"ty::Adt::389b970f3565f26b"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::FormatSpec"}]},{"kind":{"discr_ty":"ty::isize","kind":"Enum"},"name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","orig_substs":[],"repr_transparent":false,"size":16,"variants":[{"ctor_kind":{"kind":"Fn"},"discr":{"index":0,"kind":"Relative"},"discr_value":"0","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Is::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Is"},{"ctor_kind":{"kind":"Fn"},"discr":{"index":1,"kind":"Relative"},"discr_value":"1","fields":[{"name":"core/73237d41::fmt::rt::v1::Count::Param::0","ty":"ty::usize"}],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Param"},{"ctor_kind":{"kind":"Const"},"discr":{"index":2,"kind":"Relative"},"discr_value":"2","fields":[],"inhabited":true,"name":"core/73237d41::fmt::rt::v1::Count::Implied"}]}],"statics":[{"kind":"constant","mutable":false,"name":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[0]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,58,32]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[1]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[112,32,115,104,111,117,108,100,32,98,101,32,111,118,101,114,114,105,100,101,110]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[2]","rendered":{"element_ty":"ty::Adt::613f1953a8669d14","elements":[],"kind":"array"},"ty":"ty::Array::0e1a52ee2b2d3e97"},{"kind":"constant","mutable":false,"name":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[3]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[110,111,116,32,105,109,112,108,101,109,101,110,116,101,100,58,32]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[4]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[102,32,115,104,111,117,108,100,32,98,101,32,111,118,101,114,114,105,100,100,101,110]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"},{"kind":"constant","mutable":false,"name":"mir_unsafe_assume_spec/bdfefe3d2871866a::{{alloc}}[5]","rendered":{"element_ty":"ty::Ref::fb1cfdc5725cd03b","elements":[{"kind":"str","val":[105,110,118,97,108,105,100,32,97,114,103,115]}],"kind":"array"},"ty":"ty::Array::e5bd840a2dafa04a"}],"vtables":[],"traits":[{"items":[{"item_id":"core/73237d41::fmt::Write::write_str","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Ref::fb1cfdc5725cd03b"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_char","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::char"],"output":"ty::Adt::30ed5848b4f625b6"}},{"item_id":"core/73237d41::fmt::Write::write_fmt","kind":"Method","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::0cd866b4eb1c792b","ty::Adt::ba5184b53bc36a4d"],"output":"ty::Adt::30ed5848b4f625b6"}}],"name":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}],"intrinsics":[{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::p","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::p"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::q","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::q"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::g2","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::g2"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::foo","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::foo"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::g","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::g"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::f","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::f"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::side_effect","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::side_effect"},{"inst":{"def_id":"mir_unsafe_assume_spec/bdfefe3d::h","kind":"Item","substs":[]},"name":"mir_unsafe_assume_spec/bdfefe3d::h"},{"inst":{"def_id":"core/73237d41::fmt::{impl#4}::new_v1","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]"},{"inst":{"def_id":"core/73237d41::panicking::panic_fmt","kind":"Item","substs":[]},"name":"core/73237d41::panicking::panic_fmt"},{"inst":{"def_id":"core/73237d41::num::{impl#9}::wrapping_add","kind":"Item","substs":[]},"name":"core/73237d41::num::{impl#9}::wrapping_add"},{"inst":{"def_id":"core/73237d41::fmt::{impl#3}::new_display","kind":"Item","substs":["nonty::Lifetime","ty::Adt::ba5184b53bc36a4d"]},"name":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]"},{"inst":{"def_id":"core/73237d41::fmt::{impl#7}::fmt","kind":"Item","substs":["nonty::Lifetime"]},"name":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::FnPtr::07cd89921cc84271","ty::FnPtr::bd6bee7b1f95b7bf"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]"},{"inst":{"def_id":"core/73237d41::intrinsics::{extern#0}::transmute","kind":"Intrinsic","substs":["ty::Ref::bf4d6d337c623aee","ty::Ref::4e8e6a61a1ceb622"]},"name":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]"}],"tys":[{"name":"ty::u32","ty":{"kind":"Uint","uintkind":{"kind":"U32"}}},{"name":"ty::Ref::e028c0f25e8b6323","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::u32"}},{"name":"ty::Never::7199a9b06188843c","ty":{"kind":"Never"}},{"name":"ty::Adt::ba5184b53bc36a4d","ty":{"kind":"Adt","name":"core/73237d41::fmt::Arguments::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Arguments","substs":["nonty::Lifetime"]}},{"name":"ty::str","ty":{"kind":"Str"}},{"name":"ty::Ref::fb1cfdc5725cd03b","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::str"}},{"name":"ty::Slice::563a94fdd2fd2b33","ty":{"kind":"Slice","ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::675b2a8049aad652","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::563a94fdd2fd2b33"}},{"name":"ty::usize","ty":{"kind":"Uint","uintkind":{"kind":"Usize"}}},{"name":"ty::Array::e5bd840a2dafa04a","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Ref::fb1cfdc5725cd03b"}},{"name":"ty::Ref::c2a5dcbb98af2a61","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::e5bd840a2dafa04a"}},{"name":"ty::Adt::613f1953a8669d14","ty":{"kind":"Adt","name":"core/73237d41::fmt::ArgumentV1::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::ArgumentV1","substs":["nonty::Lifetime"]}},{"name":"ty::Slice::818a2c6d5f962f99","ty":{"kind":"Slice","ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::913e2ff5487f7787","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::818a2c6d5f962f99"}},{"name":"ty::Array::6167cd8fdeb01e06","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"1"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::41f3f8f95d02c3e9","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::6167cd8fdeb01e06"}},{"name":"ty::Ref::bf4d6d337c623aee","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Adt::ba5184b53bc36a4d"}},{"name":"ty::Array::0e1a52ee2b2d3e97","ty":{"kind":"Array","size":{"rendered":{"kind":"usize","size":8,"val":"0"},"ty":"ty::usize"},"ty":"ty::Adt::613f1953a8669d14"}},{"name":"ty::Ref::d0bd7bf253977b90","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Array::0e1a52ee2b2d3e97"}},{"name":"ty::FnDef::76afb566734aff77","ty":{"defid":"core/73237d41::fmt::{impl#4}::new_v1::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::72bf0f6662028c6a","ty":{"defid":"core/73237d41::fmt::{impl#3}::new_display::_inst47ac314b85a79c82[0]","kind":"FnDef"}},{"name":"ty::FnDef::906e67453a1bbab9","ty":{"defid":"core/73237d41::panicking::panic_fmt","kind":"FnDef"}},{"name":"ty::FnDef::6788526e8b011d28","ty":{"defid":"mir_unsafe_assume_spec/bdfefe3d::p","kind":"FnDef"}},{"name":"ty::FnDef::5862378a14bfe788","ty":{"defid":"mir_unsafe_assume_spec/bdfefe3d::f","kind":"FnDef"}},{"name":"ty::FnDef::f55acdef755f1aaa","ty":{"defid":"core/73237d41::num::{impl#9}::wrapping_add","kind":"FnDef"}},{"name":"ty::Ref::953fce25114368d0","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::u32"}},{"name":"ty::FnDef::54f52d7b1f637d68","ty":{"defid":"mir_unsafe_assume_spec/bdfefe3d::side_effect","kind":"FnDef"}},{"name":"ty::Foreign::66d9923797cfc204","ty":{"kind":"Foreign"}},{"name":"ty::Ref::4e8e6a61a1ceb622","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Foreign::66d9923797cfc204"}},{"name":"ty::Adt::ad5a554022507816","ty":{"kind":"Adt","name":"core/73237d41::fmt::Formatter::_adtbd21306cbe4f0b9b[0]","orig_def_id":"core/73237d41::fmt::Formatter","substs":["nonty::Lifetime"]}},{"name":"ty::Ref::7984c7d8fa40d865","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Adt::ad5a554022507816"}},{"name":"ty::Tuple::e93222e871854c41","ty":{"kind":"Tuple","tys":[]}},{"name":"ty::Adt::8d47b311e48cbf8f","ty":{"kind":"Adt","name":"core/73237d41::fmt::Error::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::Error","substs":[]}},{"name":"ty::Adt::30ed5848b4f625b6","ty":{"kind":"Adt","name":"core/73237d41::result::Result::_adt0f6d5765b4e92fb6[0]","orig_def_id":"core/73237d41::result::Result","substs":["ty::Tuple::e93222e871854c41","ty::Adt::8d47b311e48cbf8f"]}},{"name":"ty::FnPtr::bd6bee7b1f95b7bf","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::4e8e6a61a1ceb622","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::Adt::afb4c9f4ce8cdadf","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Argument::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Argument","substs":[]}},{"name":"ty::Slice::26b8a0a5e2b22aa9","ty":{"kind":"Slice","ty":"ty::Adt::afb4c9f4ce8cdadf"}},{"name":"ty::Ref::5f3877d5405402c5","ty":{"kind":"Ref","mutability":{"kind":"Not"},"ty":"ty::Slice::26b8a0a5e2b22aa9"}},{"name":"ty::Adt::45883e75bd5c5ca5","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adta9d03177c2d4a99f[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::Ref::5f3877d5405402c5"]}},{"name":"ty::bool","ty":{"kind":"Bool"}},{"name":"ty::FnPtr::07cd89921cc84271","ty":{"kind":"FnPtr","signature":{"abi":{"kind":"Rust"},"inputs":["ty::Ref::bf4d6d337c623aee","ty::Ref::7984c7d8fa40d865"],"output":"ty::Adt::30ed5848b4f625b6"}}},{"name":"ty::FnDef::b30b83d63051810b","ty":{"defid":"core/73237d41::fmt::{impl#7}::fmt::_instbd21306cbe4f0b9b[0]","kind":"FnDef"}},{"name":"ty::FnDef::788a983faed72be6","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst82602b44b15ef1cb[0]","kind":"FnDef"}},{"name":"ty::FnDef::f532a620418c4246","ty":{"defid":"core/73237d41::intrinsics::{extern#0}::transmute::_inst79e1dbb43599bccf[0]","kind":"FnDef"}},{"name":"ty::char","ty":{"kind":"Char"}},{"name":"ty::Adt::c4745d1cf6b33a46","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Alignment::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Alignment","substs":[]}},{"name":"ty::Adt::ba42a94c73933868","ty":{"kind":"Adt","name":"core/73237d41::option::Option::_adtaffa7a8b1157c078[0]","orig_def_id":"core/73237d41::option::Option","substs":["ty::usize"]}},{"name":"ty::Dynamic::08a22e65af9638be","ty":{"kind":"Dynamic","predicates":[{"kind":"Trait","substs":[],"trait":"core/73237d41::fmt::Write"}],"trait_id":"core/73237d41::fmt::Write::_trait3e5b0354795cc029[0]"}},{"name":"ty::Ref::0cd866b4eb1c792b","ty":{"kind":"Ref","mutability":{"kind":"Mut"},"ty":"ty::Dynamic::08a22e65af9638be"}},{"name":"ty::isize","ty":{"intkind":{"kind":"Isize"},"kind":"Int"}},{"name":"ty::Adt::ed8948c5d0b3a39f","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::FormatSpec::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::FormatSpec","substs":[]}},{"name":"ty::Adt::389b970f3565f26b","ty":{"kind":"Adt","name":"core/73237d41::fmt::rt::v1::Count::_adtb7803c2264daf0ec[0]","orig_def_id":"core/73237d41::fmt::rt::v1::Count","substs":[]}}],"roots":["mir_unsafe_assume_spec/bdfefe3d::f","mir_unsafe_assume_spec/bdfefe3d::g","mir_unsafe_assume_spec/bdfefe3d::h","mir_unsafe_assume_spec/bdfefe3d::g2","mir_unsafe_assume_spec/bdfefe3d::p","mir_unsafe_assume_spec/bdfefe3d::q","mir_unsafe_assume_spec/bdfefe3d::side_effect","mir_unsafe_assume_spec/bdfefe3d::foo"]}
\ No newline at end of file
diff --git a/saw-remote-api/python/tests/saw/test-files/mir_unsafe_assume_spec.rs b/saw-remote-api/python/tests/saw/test-files/mir_unsafe_assume_spec.rs
new file mode 100644
index 0000000000..062ad042ed
--- /dev/null
+++ b/saw-remote-api/python/tests/saw/test-files/mir_unsafe_assume_spec.rs
@@ -0,0 +1,35 @@
+pub fn f(_x: u32) -> u32 {
+ unimplemented!("f should be overridden");
+}
+
+pub fn g(x: u32) -> u32 {
+ f(x).wrapping_add(1)
+}
+
+pub fn h(x: u32) -> u32 {
+ x.wrapping_add(1)
+}
+
+pub fn g2() -> u32 {
+ f(2).wrapping_add(1)
+}
+
+pub fn p(_x: &u32, _y: &u32) -> u32 {
+ unimplemented!("p should be overriden");
+}
+
+pub fn q(x: &u32, y: &u32) -> u32 {
+ p(x, y)
+}
+
+pub fn side_effect(a: &mut u32) -> u32 {
+ let v: u32 = *a;
+ *a = 0;
+ v
+}
+
+pub fn foo(x: u32) -> u32 {
+ let mut b: u32 = x;
+ side_effect(&mut b);
+ side_effect(&mut b)
+}
diff --git a/saw-remote-api/python/tests/saw/test_mir_ghost.py b/saw-remote-api/python/tests/saw/test_mir_ghost.py
new file mode 100644
index 0000000000..3d4e388cad
--- /dev/null
+++ b/saw-remote-api/python/tests/saw/test_mir_ghost.py
@@ -0,0 +1,53 @@
+import unittest
+from pathlib import Path
+
+from saw_client import *
+from saw_client.crucible import cry_f
+from saw_client.mir import Contract, GhostVariable, u32
+
+
+class NextContract(Contract):
+ def __init__(self, counter: GhostVariable) -> None:
+ super().__init__()
+ self.counter = counter
+
+ def specification(self) -> None:
+ n = self.fresh_var(u32, 'n')
+ self.ghost_value(self.counter, n)
+
+ self.execute_func()
+
+ self.ghost_value(self.counter, cry_f('{n} + 1'))
+ self.returns(n)
+
+
+class ExampleContract(Contract):
+ def __init__(self, counter: GhostVariable) -> None:
+ super().__init__()
+ self.counter = counter
+
+ def specification(self) -> None:
+ n = self.fresh_var(u32, 'n')
+ self.precondition_f('{n} < 2')
+ self.ghost_value(self.counter, n)
+
+ self.execute_func()
+ self.ghost_value(self.counter, cry_f('{n} + 3'))
+ self.returns_f('{n} + 2')
+
+
+class MIRGhostTest(unittest.TestCase):
+ def test_mir_ghost(self):
+ connect(reset_server=True)
+ if __name__ == "__main__": view(LogResults())
+ json_name = str(Path('tests', 'saw', 'test-files', 'mir_ghost.linked-mir.json'))
+ mod = mir_load_module(json_name)
+
+ counter = create_ghost_variable('ctr');
+ next_ov = mir_assume(mod, 'mir_ghost::next', NextContract(counter))
+ example_result = mir_verify(mod, 'mir_ghost::example', ExampleContract(counter), lemmas=[next_ov])
+ self.assertIs(example_result.is_success(), True)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/saw-remote-api/python/tests/saw/test_mir_unsafe_assume_spec.py b/saw-remote-api/python/tests/saw/test_mir_unsafe_assume_spec.py
new file mode 100644
index 0000000000..58d794ca3c
--- /dev/null
+++ b/saw-remote-api/python/tests/saw/test_mir_unsafe_assume_spec.py
@@ -0,0 +1,116 @@
+import unittest
+from pathlib import Path
+
+from saw_client import *
+from saw_client.crucible import cry_f
+from saw_client.mir import Contract, FreshVar, MIRType, SetupVal, u32
+
+
+def ref_to_fresh(c : Contract, ty : MIRType, name : Optional[str] = None,
+ read_only : bool = False) -> Tuple[FreshVar, SetupVal]:
+ """Add to ``Contract`` ``c`` an allocation of a reference of type ``ty`` initialized to an unknown fresh value.
+ If ``read_only == True`` then the allocated memory is immutable.
+
+ :returns A fresh variable bound to the reference's initial value and the newly allocated reference. (The fresh
+ variable will be assigned ``name`` if provided/available.)"""
+ var = c.fresh_var(ty, name)
+ ptr = c.alloc(ty, points_to = var, read_only = read_only)
+ return (var, ptr)
+
+
+class FContract(Contract):
+ def specification(self) -> None:
+ x = self.fresh_var(u32, 'x')
+
+ self.execute_func(x)
+
+ self.returns(x)
+
+
+class F2Contract(Contract):
+ def specification(self) -> None:
+ x = cry_f('2 : [32]')
+
+ self.execute_func(x)
+
+ self.returns(x)
+
+
+class GContract(Contract):
+ def specification(self) -> None:
+ x = self.fresh_var(u32, 'x')
+
+ self.execute_func(x)
+
+ self.returns(cry_f('{x} + 1'))
+
+
+class G2Contract(Contract):
+ def specification(self) -> None:
+ self.execute_func()
+
+ self.returns(cry_f('3 : [32]'))
+
+
+class HContract(Contract):
+ def specification(self) -> None:
+ x = self.fresh_var(u32, 'x')
+
+ self.execute_func(x)
+
+ self.returns(cry_f('{x} + 1'))
+
+
+class PContract(Contract):
+ def specification(self) -> None:
+ (x, x_ref) = ref_to_fresh(self, u32, "x", read_only = True)
+ (y, y_ref) = ref_to_fresh(self, u32, "y", read_only = True)
+
+ self.execute_func(x_ref, y_ref)
+
+ self.returns(cry_f('{x} + {y}'))
+
+
+class QContract(Contract):
+ def specification(self) -> None:
+ (x, x_ref) = ref_to_fresh(self, u32, "x", read_only = True)
+ (y, y_ref) = ref_to_fresh(self, u32, "y", read_only = True)
+
+ self.execute_func(x_ref, y_ref)
+
+ self.returns(cry_f('{x} + {y}'))
+
+
+class MIRUnsafeAssumeSpecTest(unittest.TestCase):
+ def test_mir_unsafe_assume_spec(self):
+ connect(reset_server=True)
+ # if __name__ == "__main__": view(LogResults())
+ if __name__ == "__main__": view(LogResults(verbose_failure=True))
+ json_name = str(Path('tests', 'saw', 'test-files', 'mir_unsafe_assume_spec.linked-mir.json'))
+ mod = mir_load_module(json_name)
+
+ f_ov = mir_assume(mod, 'mir_unsafe_assume_spec::f', FContract())
+ f2_ov = mir_assume(mod, 'mir_unsafe_assume_spec::f', F2Contract())
+ p_ov = mir_assume(mod, 'mir_unsafe_assume_spec::p', PContract())
+
+ g_result = mir_verify(mod, 'mir_unsafe_assume_spec::g', GContract(), lemmas=[f_ov])
+ self.assertIs(g_result.is_success(), True)
+
+ h_result = mir_verify(mod, 'mir_unsafe_assume_spec::h', HContract(), lemmas=[f_ov])
+ self.assertIs(h_result.is_success(), True)
+
+ g2_result1 = mir_verify(mod, 'mir_unsafe_assume_spec::g2', G2Contract(), lemmas=[f_ov])
+ self.assertIs(g2_result1.is_success(), True)
+
+ g2_result2 = mir_verify(mod, 'mir_unsafe_assume_spec::g2', G2Contract(), lemmas=[f2_ov])
+ self.assertIs(g2_result2.is_success(), True)
+
+ g2_result3 = mir_verify(mod, 'mir_unsafe_assume_spec::g2', G2Contract(), lemmas=[f_ov, f2_ov])
+ self.assertIs(g2_result3.is_success(), True)
+
+ q_result = mir_verify(mod, 'mir_unsafe_assume_spec::q', QContract(), lemmas=[p_ov])
+ self.assertIs(q_result.is_success(), True)
+
+
+if __name__ == "__main__":
+ unittest.main()
diff --git a/saw-remote-api/saw-remote-api.cabal b/saw-remote-api/saw-remote-api.cabal
index 6be87a64b5..d477bfa175 100644
--- a/saw-remote-api/saw-remote-api.cabal
+++ b/saw-remote-api/saw-remote-api.cabal
@@ -34,8 +34,8 @@ common errors
-Werror=overlapping-patterns
common deps
- build-depends: base >=4.11.1.0 && <4.18,
- aeson >= 1.4.2 && < 2.2,
+ build-depends: base >=4.11.1.0 && <4.19,
+ aeson >= 1.4.2 && < 2.3,
aig,
argo,
base64-bytestring,
diff --git a/saw-remote-api/src/SAWServer/JVMCrucibleSetup.hs b/saw-remote-api/src/SAWServer/JVMCrucibleSetup.hs
index c601974f4a..8262e46c81 100644
--- a/saw-remote-api/src/SAWServer/JVMCrucibleSetup.hs
+++ b/saw-remote-api/src/SAWServer/JVMCrucibleSetup.hs
@@ -26,7 +26,7 @@ import qualified Data.Map as Map
import qualified Cryptol.Parser.AST as P
import Cryptol.Utils.Ident (mkIdent)
import qualified Lang.Crucible.JVM as CJ
-import SAWScript.Crucible.Common.MethodSpec as MS (SetupValue(..))
+import qualified SAWScript.Crucible.Common.MethodSpec as MS
import SAWScript.Crucible.JVM.Builtins
( jvm_alloc_array,
jvm_alloc_object,
@@ -35,6 +35,7 @@ import SAWScript.Crucible.JVM.Builtins
jvm_static_field_is,
jvm_execute_func,
jvm_fresh_var,
+ jvm_ghost_value,
jvm_postcond,
jvm_precond,
jvm_return )
@@ -56,10 +57,11 @@ import SAWServer
import SAWServer.Data.Contract
( PointsTo(PointsTo),
PointsToBitfield,
+ GhostValue(GhostValue),
Allocated(Allocated),
ContractVar(ContractVar),
- Contract(preVars, preConds, preAllocated, prePointsTos, prePointsToBitfields,
- argumentVals, postVars, postConds, postAllocated, postPointsTos, postPointsToBitfields,
+ Contract(preVars, preConds, preAllocated, preGhostValues, prePointsTos, prePointsToBitfields,
+ argumentVals, postVars, postConds, postAllocated, postGhostValues, postPointsTos, postPointsToBitfields,
returnVal) )
import SAWServer.Data.SetupValue ()
import SAWServer.CryptolExpression (CryptolModuleException(..), getTypedTermOfCExp)
@@ -82,28 +84,29 @@ instance Doc.DescribedMethod StartJVMSetupParams OK where
]
resultFieldDescription = []
-newtype ServerSetupVal = Val (SetupValue CJ.JVM)
+newtype ServerSetupVal = Val (MS.SetupValue CJ.JVM)
compileJVMContract ::
(FilePath -> IO ByteString) ->
BuiltinContext ->
+ Map ServerName MS.GhostGlobal ->
CryptolEnv ->
Contract JavaType (P.Expr P.PName) ->
JVMSetupM ()
-compileJVMContract fileReader bic cenv0 c =
+compileJVMContract fileReader bic ghostEnv cenv0 c =
do allocsPre <- mapM setupAlloc (preAllocated c)
(envPre, cenvPre) <- setupState allocsPre (Map.empty, cenv0) (preVars c)
mapM_ (\p -> getTypedTerm cenvPre p >>= jvm_precond) (preConds c)
mapM_ (setupPointsTo (envPre, cenvPre)) (prePointsTos c)
mapM_ setupPointsToBitfields (prePointsToBitfields c)
- --mapM_ (setupGhostValue ghostEnv cenvPre) (preGhostValues c)
+ mapM_ (setupGhostValue ghostEnv cenvPre) (preGhostValues c)
traverse (getSetupVal (envPre, cenvPre)) (argumentVals c) >>= jvm_execute_func
allocsPost <- mapM setupAlloc (postAllocated c)
(envPost, cenvPost) <- setupState (allocsPre ++ allocsPost) (envPre, cenvPre) (postVars c)
mapM_ (\p -> getTypedTerm cenvPost p >>= jvm_postcond) (postConds c)
mapM_ (setupPointsTo (envPost, cenvPost)) (postPointsTos c)
mapM_ setupPointsToBitfields (postPointsToBitfields c)
- --mapM_ (setupGhostValue ghostEnv cenvPost) (postGhostValues c)
+ mapM_ (setupGhostValue ghostEnv cenvPost) (postGhostValues c)
case returnVal c of
Just v -> getSetupVal (envPost, cenvPost) v >>= jvm_return
Nothing -> return ()
@@ -149,7 +152,10 @@ compileJVMContract fileReader bic cenv0 c =
setupPointsToBitfields _ =
JVMSetupM $ fail "Points-to-bitfield not supported in JVM API."
- --setupGhostValue _ _ _ = fail "Ghost values not supported yet in JVM API."
+ setupGhostValue genv cenv (GhostValue serverName e) =
+ do g <- resolve genv serverName
+ t <- getTypedTerm cenv e
+ jvm_ghost_value g t
resolve :: Map ServerName a -> ServerName -> JVMSetupM a
resolve env name =
diff --git a/saw-remote-api/src/SAWServer/JVMVerify.hs b/saw-remote-api/src/SAWServer/JVMVerify.hs
index f7c97654ed..293d424e79 100644
--- a/saw-remote-api/src/SAWServer/JVMVerify.hs
+++ b/saw-remote-api/src/SAWServer/JVMVerify.hs
@@ -9,6 +9,7 @@ module SAWServer.JVMVerify
import Prelude hiding (mod)
import Control.Lens
+import qualified Data.Map as Map
import SAWScript.Crucible.JVM.Builtins
( jvm_unsafe_assume_spec, jvm_verify )
@@ -26,6 +27,7 @@ import SAWServer
pushTask,
dropTask,
setServerVal,
+ getGhosts,
getJVMClass,
getJVMMethodSpecIR )
import SAWServer.CryptolExpression (getCryptolExpr)
@@ -51,7 +53,8 @@ jvmVerifyAssume mode (VerifyParams className fun lemmaNames checkSat contract sc
let bic = view sawBIC state
cenv = rwCryptol (view sawTopLevelRW state)
fileReader <- Argo.getFileReader
- setup <- compileJVMContract fileReader bic cenv <$> traverse getCryptolExpr contract
+ ghostEnv <- Map.fromList <$> getGhosts
+ setup <- compileJVMContract fileReader bic ghostEnv cenv <$> traverse getCryptolExpr contract
res <- case mode of
VerifyContract -> do
lemmas <- mapM getJVMMethodSpecIR lemmaNames
diff --git a/saw-remote-api/src/SAWServer/MIRCrucibleSetup.hs b/saw-remote-api/src/SAWServer/MIRCrucibleSetup.hs
index a1ce2f07d3..b6cf3555df 100644
--- a/saw-remote-api/src/SAWServer/MIRCrucibleSetup.hs
+++ b/saw-remote-api/src/SAWServer/MIRCrucibleSetup.hs
@@ -31,6 +31,7 @@ import SAWScript.Crucible.MIR.Builtins
mir_fresh_expanded_value,
mir_fresh_var,
mir_execute_func,
+ mir_ghost_value,
mir_load_module,
mir_points_to,
mir_postcond,
@@ -58,10 +59,11 @@ import SAWServer.CryptolExpression (CryptolModuleException(..), getTypedTermOfCE
import SAWServer.Data.Contract
( PointsTo(PointsTo),
PointsToBitfield,
+ GhostValue(GhostValue),
Allocated(Allocated),
ContractVar(ContractVar),
- Contract(preVars, preConds, preAllocated, prePointsTos, prePointsToBitfields,
- argumentVals, postVars, postConds, postAllocated, postPointsTos, postPointsToBitfields,
+ Contract(preVars, preConds, preAllocated, preGhostValues, prePointsTos, prePointsToBitfields,
+ argumentVals, postVars, postConds, postAllocated, postGhostValues, postPointsTos, postPointsToBitfields,
returnVal) )
import SAWServer.Data.MIRType (JSONMIRType, mirType)
import SAWServer.Exceptions ( notAtTopLevel )
@@ -74,24 +76,25 @@ newtype ServerSetupVal = Val (MS.SetupValue MIR)
compileMIRContract ::
(FilePath -> IO ByteString) ->
BuiltinContext ->
+ Map ServerName MS.GhostGlobal ->
CryptolEnv ->
SAWEnv ->
Contract JSONMIRType (P.Expr P.PName) ->
MIRSetupM ()
-compileMIRContract fileReader bic cenv0 sawenv c =
+compileMIRContract fileReader bic ghostEnv cenv0 sawenv c =
do allocsPre <- mapM setupAlloc (preAllocated c)
(envPre, cenvPre) <- setupState allocsPre (Map.empty, cenv0) (preVars c)
mapM_ (\p -> getTypedTerm cenvPre p >>= mir_precond) (preConds c)
mapM_ (setupPointsTo (envPre, cenvPre)) (prePointsTos c)
mapM_ setupPointsToBitfields (prePointsToBitfields c)
- --mapM_ (setupGhostValue ghostEnv cenvPre) (preGhostValues c)
+ mapM_ (setupGhostValue ghostEnv cenvPre) (preGhostValues c)
traverse (getSetupVal (envPre, cenvPre)) (argumentVals c) >>= mir_execute_func
allocsPost <- mapM setupAlloc (postAllocated c)
(envPost, cenvPost) <- setupState (allocsPre ++ allocsPost) (envPre, cenvPre) (postVars c)
mapM_ (\p -> getTypedTerm cenvPost p >>= mir_postcond) (postConds c)
mapM_ (setupPointsTo (envPost, cenvPost)) (postPointsTos c)
mapM_ setupPointsToBitfields (postPointsToBitfields c)
- --mapM_ (setupGhostValue ghostEnv cenvPost) (postGhostValues c)
+ mapM_ (setupGhostValue ghostEnv cenvPost) (postGhostValues c)
case returnVal c of
Just v -> getSetupVal (envPost, cenvPost) v >>= mir_return
Nothing -> return ()
@@ -136,7 +139,10 @@ compileMIRContract fileReader bic cenv0 sawenv c =
setupPointsToBitfields _ =
MIRSetupM $ fail "Points-to-bitfield not supported in the MIR API."
- --setupGhostValue _ _ _ = fail "Ghost values not supported yet in the MIR API."
+ setupGhostValue genv cenv (GhostValue serverName e) =
+ do g <- resolve genv serverName
+ t <- getTypedTerm cenv e
+ mir_ghost_value g t
resolve :: Map ServerName a -> ServerName -> MIRSetupM a
resolve env name =
diff --git a/saw-remote-api/src/SAWServer/MIRVerify.hs b/saw-remote-api/src/SAWServer/MIRVerify.hs
index 09261a2f8c..f3bf31e447 100644
--- a/saw-remote-api/src/SAWServer/MIRVerify.hs
+++ b/saw-remote-api/src/SAWServer/MIRVerify.hs
@@ -9,9 +9,10 @@ module SAWServer.MIRVerify
import Prelude hiding (mod)
import Control.Lens
+import qualified Data.Map as Map
import SAWScript.Crucible.MIR.Builtins
- ( mir_verify )
+ ( mir_unsafe_assume_spec, mir_verify )
import SAWScript.Value (rwCryptol)
import qualified Argo
@@ -26,6 +27,7 @@ import SAWServer
pushTask,
dropTask,
setServerVal,
+ getGhosts,
getMIRModule,
getMIRMethodSpecIR )
import SAWServer.CryptolExpression (getCryptolExpr)
@@ -53,7 +55,8 @@ mirVerifyAssume mode (VerifyParams modName fun lemmaNames checkSat contract scri
cenv = rwCryptol (view sawTopLevelRW state)
sawenv = view sawEnv state
fileReader <- Argo.getFileReader
- setup <- compileMIRContract fileReader bic cenv sawenv <$>
+ ghostEnv <- Map.fromList <$> getGhosts
+ setup <- compileMIRContract fileReader bic ghostEnv cenv sawenv <$>
traverse getCryptolExpr contract
res <- case mode of
VerifyContract -> do
@@ -61,7 +64,7 @@ mirVerifyAssume mode (VerifyParams modName fun lemmaNames checkSat contract scri
proofScript <- interpretProofScript script
tl $ mir_verify rm fun lemmas checkSat setup proofScript
AssumeContract ->
- tl $ error "mir_unsafe_assume_spec not yet supported"
+ tl $ mir_unsafe_assume_spec rm fun setup
dropTask
setServerVal lemmaName res
ok
diff --git a/saw-script.cabal b/saw-script.cabal
index 4d596c0018..2b52c55716 100644
--- a/saw-script.cabal
+++ b/saw-script.cabal
@@ -23,7 +23,7 @@ library
default-language: Haskell2010
build-depends:
base >= 4.9
- , aeson >= 2.0 && < 2.2
+ , aeson >= 2.0 && < 2.3
, aig
, array
, binary
@@ -84,7 +84,7 @@ library
, saw-core-coq
, saw-core-sbv
, saw-core-what4
- , sbv >= 9.1 && < 9.3
+ , sbv >= 9.1 && < 10.3
, serialise
, split
, temporary
diff --git a/saw/Dockerfile b/saw/Dockerfile
index 339bca8471..301d783c00 100644
--- a/saw/Dockerfile
+++ b/saw/Dockerfile
@@ -14,16 +14,16 @@ USER saw
WORKDIR /home/saw
ENV LANG=C.UTF-8 \
LC_ALL=C.UTF-8
-COPY cabal.GHC-9.2.7.config cabal.project.freeze
+COPY cabal.GHC-9.2.8.config cabal.project.freeze
ENV PATH=/home/saw/ghcup-download/bin:/home/saw/.ghcup/bin:$PATH
RUN mkdir -p /home/saw/ghcup-download/bin && \
- curl -L https://downloads.haskell.org/~ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 -o /home/saw/ghcup-download/bin/ghcup && \
+ curl -L https://downloads.haskell.org/~ghcup/0.1.19.5/x86_64-linux-ghcup-0.1.19.5 -o /home/saw/ghcup-download/bin/ghcup && \
chmod +x /home/saw/ghcup-download/bin/ghcup
RUN mkdir -p /home/saw/.ghcup && \
ghcup --version && \
ghcup install cabal 3.8.1.0 && \
- ghcup install ghc 9.2.7 && \
- ghcup set ghc 9.2.7
+ ghcup install ghc 9.2.8 && \
+ ghcup set ghc 9.2.8
RUN cabal v2-update
RUN cabal v2-build
RUN mkdir -p /home/saw/rootfs/usr/local/bin
diff --git a/src/SAWScript/AutoMatch/Interaction.hs b/src/SAWScript/AutoMatch/Interaction.hs
index f0049625c0..1a03ea38c5 100644
--- a/src/SAWScript/AutoMatch/Interaction.hs
+++ b/src/SAWScript/AutoMatch/Interaction.hs
@@ -14,13 +14,15 @@ import SAWScript.AutoMatch.Util
import Data.Map (Map)
import Data.Set (Set)
-import Control.Monad
+import Control.Monad (forM_, when)
+import Control.Monad.Fix (fix)
import Control.Monad.Free
-import Control.Monad.Trans
-import Control.Monad.Writer
-import Control.Monad.State
-import Control.Monad.Reader
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (ReaderT(..))
+import Control.Monad.State (MonadState(..), StateT(..), evalStateT, modify)
+import Control.Monad.Trans (MonadTrans(..))
import Control.Monad.Trans.Maybe
+import Control.Monad.Writer (MonadWriter(..), WriterT(..))
#if !MIN_VERSION_base(4,8,0)
import Control.Applicative
#endif
diff --git a/src/SAWScript/AutoMatch/LLVM.hs b/src/SAWScript/AutoMatch/LLVM.hs
index 7758db852a..3272056b96 100644
--- a/src/SAWScript/AutoMatch/LLVM.hs
+++ b/src/SAWScript/AutoMatch/LLVM.hs
@@ -4,7 +4,7 @@
module SAWScript.AutoMatch.LLVM where
-import Control.Monad.State hiding (mapM)
+import Control.Monad (when)
import Control.Monad.Free
import qualified Data.AIG as AIG
diff --git a/src/SAWScript/Bisimulation.hs b/src/SAWScript/Bisimulation.hs
index 726ea59409..97e2d48ba6 100644
--- a/src/SAWScript/Bisimulation.hs
+++ b/src/SAWScript/Bisimulation.hs
@@ -74,7 +74,10 @@ module SAWScript.Bisimulation
( BisimTheorem, proveBisimulation )
where
-import Control.Monad.State.Strict as State
+import Control.Monad (foldM, forM_, unless)
+import Control.Monad.IO.Class (MonadIO(..))
+import qualified Control.Monad.State.Strict as State
+import Control.Monad.Trans.Class (MonadTrans(..))
import Data.Foldable (foldl')
import qualified Data.IntSet as IntSet
import qualified Data.Map.Strict as Map
diff --git a/src/SAWScript/Builtins.hs b/src/SAWScript/Builtins.hs
index 279c3acddd..dc41073628 100644
--- a/src/SAWScript/Builtins.hs
+++ b/src/SAWScript/Builtins.hs
@@ -27,8 +27,12 @@ import Data.Functor
import Control.Applicative
import Data.Monoid
#endif
+import Control.Lens (view)
+import Control.Monad (foldM, forM, unless, when)
import Control.Monad.Except (MonadError(..))
-import Control.Monad.State
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.State (MonadState(..), gets, modify)
+import Control.Monad.Trans.Class (MonadTrans(..))
import qualified Control.Exception as Ex
import Data.Char (toLower)
import qualified Data.ByteString as StrictBS
@@ -39,6 +43,7 @@ import Data.IORef
import Data.List (isPrefixOf, isInfixOf, sort)
import qualified Data.Map as Map
import Data.Maybe (fromMaybe)
+import Data.Parameterized.Classes (KnownRepr(..))
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text)
@@ -115,6 +120,9 @@ import qualified Cryptol.Utils.Ident as C (mkIdent, packModName,
textToModName, PrimIdent(..))
import qualified Cryptol.Utils.RecordMap as C (recordFromFields)
+-- crucible
+import Lang.Crucible.CFG.Common (freshGlobalVar)
+
import qualified SAWScript.SBVParser as SBV
import SAWScript.ImportAIG
@@ -128,7 +136,8 @@ import SAWScript.Value (ProofScript, printOutLnTop, AIGNetwork)
import SAWScript.SolverCache
import SAWScript.SolverVersions
-import SAWScript.Crucible.Common.MethodSpec (ppTypedTermType)
+import qualified SAWScript.Crucible.Common.MethodSpec as MS
+import SAWScript.Crucible.Common.Setup.Type (addCondition, croTags)
import SAWScript.Prover.Util(checkBooleanSchema)
import SAWScript.Prover.SolverStats
import qualified SAWScript.Prover.SBV as Prover
@@ -154,7 +163,7 @@ definePrim name (TypedTerm (TypedTermSchema schema) rhs) =
definePrim _name (TypedTerm tp _) =
fail $ unlines
[ "Expected term with Cryptol schema type, but got"
- , show (ppTypedTermType tp)
+ , show (MS.ppTypedTermType tp)
]
sbvUninterpreted :: String -> Term -> TopLevel Uninterp
@@ -471,7 +480,7 @@ print_goal_inline noInline =
execTactic $ tacticId $ \goal ->
do
opts <- getTopLevelPPOpts
- let opts' = opts { ppNoInlineMemo = sort noInline }
+ let opts' = opts { ppNoInlineMemo = sort noInline }
sc <- getSharedContext
nenv <- io (scGetNamingEnv sc)
let output = prettySequent opts' nenv (goalSequent goal)
@@ -692,7 +701,7 @@ term_type tt =
TypedTermSchema sch -> pure sch
tp -> fail $ unlines
[ "Term does not have a Cryptol type"
- , show (ppTypedTermType tp)
+ , show (MS.ppTypedTermType tp)
]
goal_eval :: [String] -> ProofScript ()
@@ -2462,3 +2471,26 @@ writeVerificationSummary = do
JSON -> jsonVerificationSummary
Pretty -> prettyVerificationSummary ppOpts nenv
in io $ writeFile f' $ formatSummary summary
+
+declare_ghost_state ::
+ String ->
+ TopLevel SV.Value
+declare_ghost_state name =
+ do allocator <- getHandleAlloc
+ global <- liftIO (freshGlobalVar allocator (Text.pack name) knownRepr)
+ return (SV.VGhostVar global)
+
+ghost_value ::
+ MS.GhostGlobal ->
+ TypedTerm ->
+ SV.CrucibleSetup ext ()
+ghost_value ghost val =
+ do loc <- SV.getW4Position "ghost_value"
+ tags <- view croTags
+ let md = MS.ConditionMetadata
+ { MS.conditionLoc = loc
+ , MS.conditionTags = tags
+ , MS.conditionType = "ghost value"
+ , MS.conditionContext = ""
+ }
+ addCondition (MS.SetupCond_Ghost md ghost val)
diff --git a/src/SAWScript/Crucible/Common/MethodSpec.hs b/src/SAWScript/Crucible/Common/MethodSpec.hs
index e8ce39d657..acba975084 100644
--- a/src/SAWScript/Crucible/Common/MethodSpec.hs
+++ b/src/SAWScript/Crucible/Common/MethodSpec.hs
@@ -13,8 +13,10 @@ Grow\", and is prevalent across the Crucible codebase.
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
@@ -22,6 +24,7 @@ Grow\", and is prevalent across the Crucible codebase.
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeFamilyDependencies #-}
{-# LANGUAGE UndecidableInstances #-}
+{-# OPTIONS_GHC -Wno-orphans #-}
module SAWScript.Crucible.Common.MethodSpec
( AllocIndex(..)
@@ -62,7 +65,6 @@ module SAWScript.Crucible.Common.MethodSpec
, setupToTypedTerm
, setupToTerm
- , XGhostState
, GhostValue
, GhostType
, GhostGlobal
@@ -118,6 +120,7 @@ import Data.Set (Set)
import Data.Time.Clock
import Data.Void (absurd)
+import Control.Monad (when)
import Control.Monad.Trans.Maybe
import Control.Monad.Trans (lift)
import Control.Lens
@@ -132,13 +135,17 @@ import Lang.Crucible.JVM (JVM)
import qualified Lang.Crucible.Types as Crucible
(IntrinsicType, EmptyCtx)
import qualified Lang.Crucible.CFG.Common as Crucible (GlobalVar)
+import qualified Lang.Crucible.Simulator.Intrinsics as Crucible
import Mir.Intrinsics (MIR)
+import qualified Cryptol.TypeCheck.Type as Cryptol (Schema)
import qualified Cryptol.Utils.PP as Cryptol
import Verifier.SAW.TypedTerm as SAWVerifier
import Verifier.SAW.SharedTerm as SAWVerifier
+import Verifier.SAW.Simulator.What4.ReturnTrip as SAWVerifier
+import SAWScript.Crucible.Common (Sym, sawCoreState)
import SAWScript.Crucible.Common.Setup.Value
import SAWScript.Crucible.LLVM.Setup.Value (LLVM)
import SAWScript.Crucible.JVM.Setup.Value ()
@@ -344,21 +351,33 @@ type GhostValue = "GhostValue"
type GhostType = Crucible.IntrinsicType GhostValue Crucible.EmptyCtx
type GhostGlobal = Crucible.GlobalVar GhostType
+instance Crucible.IntrinsicClass Sym GhostValue where
+ type Intrinsic Sym GhostValue ctx = (Cryptol.Schema, Term)
+ muxIntrinsic sym _ _namerep _ctx prd (thnSch,thn) (elsSch,els) =
+ do when (thnSch /= elsSch) $ fail $ unlines $
+ [ "Attempted to mux ghost variables of different types:"
+ , show (Cryptol.pp thnSch)
+ , show (Cryptol.pp elsSch)
+ ]
+ st <- sawCoreState sym
+ let sc = saw_ctx st
+ prd' <- toSC sym st prd
+ typ <- scTypeOf sc thn
+ res <- scIte sc typ prd' thn els
+ return (thnSch, res)
+
--------------------------------------------------------------------------------
-- *** StateSpec
data SetupCondition ext where
SetupCond_Equal :: ConditionMetadata -> SetupValue ext -> SetupValue ext -> SetupCondition ext
SetupCond_Pred :: ConditionMetadata -> TypedTerm -> SetupCondition ext
- SetupCond_Ghost :: XGhostState ext ->
- ConditionMetadata ->
+ SetupCond_Ghost :: ConditionMetadata ->
GhostGlobal ->
TypedTerm ->
SetupCondition ext
-deriving instance ( SetupValueHas Show ext
- , Show (XGhostState ext)
- ) => Show (SetupCondition ext)
+deriving instance SetupValueHas Show ext => Show (SetupCondition ext)
-- | Verification state (either pre- or post-) specification
data StateSpec ext = StateSpec
diff --git a/src/SAWScript/Crucible/Common/Override.hs b/src/SAWScript/Crucible/Common/Override.hs
index 6e01203e38..fac57dcb20 100644
--- a/src/SAWScript/Crucible/Common/Override.hs
+++ b/src/SAWScript/Crucible/Common/Override.hs
@@ -13,6 +13,7 @@ Stability : provisional
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE MultiParamTypeClasses #-}
+{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
@@ -52,14 +53,28 @@ module SAWScript.Crucible.Common.Override
, failure
, getSymInterface
, enforceCompleteSubstitution
+ , refreshTerms
+ , OverrideWithPreconditions(..)
+ , owpPreconditions
+ , owpMethodSpec
+ , partitionOWPsConcrete
+ , partitionBySymbolicPreds
+ , findFalsePreconditions
+ , unsatPreconditions
+ , ppConcreteFailure
--
, assignmentToList
, MetadataMap
+ --
+ , learnGhost
+ , executeGhost
+ , instantiateExtMatchTerm
+ , matchTerm
) where
import qualified Control.Exception as X
import Control.Lens
-import Control.Monad (unless)
+import Control.Monad (foldM, unless, when)
import Control.Monad.Trans.State hiding (get, put)
import Control.Monad.State.Class (MonadState(..))
import Control.Monad.Error.Class (MonadError)
@@ -70,6 +85,9 @@ import Control.Monad.Trans.Class
import Control.Monad.IO.Class
import qualified Data.Map as Map
import Data.Map (Map)
+import Data.Maybe (fromMaybe)
+import Data.Proxy (Proxy(..))
+import qualified Data.Set as Set
import Data.Set (Set)
import Data.Typeable (Typeable)
import Data.Void
@@ -80,9 +98,15 @@ import qualified Data.Parameterized.Context as Ctx
import Data.Parameterized.Some (Some)
import Data.Parameterized.TraversableFC (toListFC)
+import Verifier.SAW.Prelude as SAWVerifier (scEq)
import Verifier.SAW.SharedTerm as SAWVerifier
+import Verifier.SAW.TypedAST as SAWVerifier
import Verifier.SAW.TypedTerm as SAWVerifier
+import qualified Cryptol.Utils.PP as Cryptol (pp)
+
+import qualified Lang.Crucible.Backend as Crucible
+import qualified Lang.Crucible.Backend.Online as Crucible
import qualified Lang.Crucible.CFG.Core as Crucible (TypeRepr, GlobalVar)
import qualified Lang.Crucible.Simulator.GlobalState as Crucible
import qualified Lang.Crucible.Simulator.RegMap as Crucible
@@ -93,9 +117,10 @@ import qualified What4.LabeledPred as W4
import qualified What4.ProgramLoc as W4
import SAWScript.Exceptions
-import SAWScript.Crucible.Common (Sym)
+import SAWScript.Crucible.Common (Backend, OnlineSolver, Sym)
import SAWScript.Crucible.Common.MethodSpec as MS
import SAWScript.Crucible.Common.Setup.Value as MS
+import SAWScript.Utils (bullets)
-- TODO, not sure this is the best place for this definition
type MetadataMap =
@@ -397,6 +422,115 @@ enforceCompleteSubstitution loc ss =
unless (null missing) (failure loc (AmbiguousVars missing))
+-- | Allocate fresh variables for all of the "fresh" vars
+-- used in this phase and add them to the term substitution.
+refreshTerms ::
+ SharedContext {- ^ shared context -} ->
+ MS.StateSpec ext {- ^ current phase spec -} ->
+ OverrideMatcher ext w ()
+refreshTerms sc ss =
+ do extension <- Map.fromList <$> traverse freshenTerm (view MS.csFreshVars ss)
+ OM (termSub %= Map.union extension)
+ where
+ freshenTerm (TypedExtCns _cty ec) =
+ do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec)
+ new <- liftIO $ scExtCns sc ec'
+ return (ecVarIndex ec, new)
+
+-- | An override packaged together with its preconditions, labeled with some
+-- human-readable info about each condition.
+data OverrideWithPreconditions ext =
+ OverrideWithPreconditions
+ { _owpPreconditions :: [(MS.ConditionMetadata, LabeledPred Sym)]
+ -- ^ c.f. '_osAsserts'
+ , _owpMethodSpec :: MS.CrucibleMethodSpecIR ext
+ , owpState :: OverrideState ext
+ }
+ deriving (Generic)
+
+makeLenses ''OverrideWithPreconditions
+
+-- | Partition into three groups:
+-- * Preconditions concretely succeed
+-- * Preconditions concretely fail
+-- * Preconditions are symbolic
+partitionOWPsConcrete :: forall ext.
+ Sym ->
+ [OverrideWithPreconditions ext] ->
+ IO ([OverrideWithPreconditions ext], [OverrideWithPreconditions ext], [OverrideWithPreconditions ext])
+partitionOWPsConcrete sym =
+ let trav = owpPreconditions . each . _2 . W4.labeledPred
+ in W4.partitionByPredsM (Just sym) $
+ foldlMOf trav (W4.andPred sym) (W4.truePred sym)
+
+-- | Like 'W4.partitionByPreds', but partitions on solver responses, not just
+-- concretized values.
+partitionBySymbolicPreds ::
+ (OnlineSolver solver, Foldable t) =>
+ Backend solver {- ^ solver connection -} ->
+ (a -> W4.Pred Sym) {- ^ how to extract predicates -} ->
+ t a ->
+ IO (Map Crucible.BranchResult [a])
+partitionBySymbolicPreds sym getPred =
+ let step mp a =
+ Crucible.considerSatisfiability sym Nothing (getPred a) <&> \k ->
+ Map.insertWith (++) k [a] mp
+ in foldM step Map.empty
+
+-- | Find individual preconditions that are symbolically false
+--
+-- We should probably be using unsat cores for this.
+findFalsePreconditions ::
+ OnlineSolver solver =>
+ Backend solver ->
+ OverrideWithPreconditions ext ->
+ IO [(MS.ConditionMetadata, LabeledPred Sym)]
+findFalsePreconditions bak owp =
+ fromMaybe [] . Map.lookup (Crucible.NoBranch False) <$>
+ partitionBySymbolicPreds bak (view (_2 . W4.labeledPred)) (owp ^. owpPreconditions)
+
+-- | Is this group of predicates collectively unsatisfiable?
+unsatPreconditions ::
+ OnlineSolver solver =>
+ Backend solver {- ^ solver connection -} ->
+ Fold s (W4.Pred Sym) {- ^ how to extract predicates -} ->
+ s {- ^ a container full of predicates -}->
+ IO Bool
+unsatPreconditions bak container getPreds = do
+ let sym = Crucible.backendGetSym bak
+ conj <- W4.andAllOf sym container getPreds
+ Crucible.considerSatisfiability bak Nothing conj >>=
+ \case
+ Crucible.NoBranch False -> pure True
+ _ -> pure False
+
+-- | Print a message about failure of an override's preconditions
+ppFailure ::
+ (PP.Pretty (ExtType ext), PP.Pretty (MethodId ext)) =>
+ OverrideWithPreconditions ext ->
+ [LabeledPred Sym] ->
+ PP.Doc ann
+ppFailure owp false =
+ PP.vcat
+ [ MS.ppMethodSpec (owp ^. owpMethodSpec)
+ -- TODO: remove viaShow when crucible switches to prettyprinter
+ , bullets '*' (map (PP.viaShow . Crucible.ppSimError)
+ (false ^.. traverse . W4.labeledPredMsg))
+ ]
+
+-- | Print a message about concrete failure of an override's preconditions
+--
+-- Assumes that the override it's being passed does have concretely failing
+-- preconditions. Otherwise, the error won't make much sense.
+ppConcreteFailure ::
+ (PP.Pretty (ExtType ext), PP.Pretty (MethodId ext)) =>
+ OverrideWithPreconditions ext ->
+ PP.Doc ann
+ppConcreteFailure owp =
+ let (_, false, _) =
+ W4.partitionLabeledPreds (Proxy :: Proxy Sym) (map snd (owp ^. owpPreconditions))
+ in ppFailure owp false
+
------------------------------------------------------------------------
-- | Forget the type indexes and length of the arguments.
@@ -404,3 +538,102 @@ assignmentToList ::
Ctx.Assignment (Crucible.RegEntry sym) ctx ->
[Crucible.AnyValue sym]
assignmentToList = toListFC (\(Crucible.RegEntry x y) -> Crucible.AnyValue x y)
+
+------------------------------------------------------------------------
+
+learnGhost ::
+ SharedContext ->
+ MS.ConditionMetadata ->
+ PrePost ->
+ MS.GhostGlobal ->
+ TypedTerm ->
+ OverrideMatcher ext md ()
+learnGhost sc md prepost var (TypedTerm (TypedTermSchema schEx) tmEx) =
+ do (sch,tm) <- readGlobal var
+ when (sch /= schEx) $ fail $ unlines $
+ [ "Ghost variable had the wrong type:"
+ , "- Expected: " ++ show (Cryptol.pp schEx)
+ , "- Actual: " ++ show (Cryptol.pp sch)
+ ]
+ instantiateExtMatchTerm sc md prepost tm tmEx
+learnGhost _sc _md _prepost _var (TypedTerm tp _)
+ = fail $ unlines
+ [ "Ghost variable expected value has improper type"
+ , "expected Cryptol schema type, but got"
+ , show (MS.ppTypedTermType tp)
+ ]
+
+executeGhost ::
+ SharedContext ->
+ MS.ConditionMetadata ->
+ MS.GhostGlobal ->
+ TypedTerm ->
+ OverrideMatcher ext RW ()
+executeGhost sc _md var (TypedTerm (TypedTermSchema sch) tm) =
+ do s <- OM (use termSub)
+ tm' <- liftIO (scInstantiateExt sc s tm)
+ writeGlobal var (sch,tm')
+executeGhost _sc _md _var (TypedTerm tp _) =
+ fail $ unlines
+ [ "executeGhost: improper value type"
+ , "expected Cryptol schema type, but got"
+ , show (MS.ppTypedTermType tp)
+ ]
+
+-- | NOTE: The two 'Term' arguments must have the same type.
+instantiateExtMatchTerm ::
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MS.ConditionMetadata ->
+ PrePost ->
+ Term {- ^ exported concrete term -} ->
+ Term {- ^ expected specification term -} ->
+ OverrideMatcher ext md ()
+instantiateExtMatchTerm sc md prepost actual expected = do
+ sub <- OM (use termSub)
+ matchTerm sc md prepost actual =<< liftIO (scInstantiateExt sc sub expected)
+
+matchTerm ::
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MS.ConditionMetadata ->
+ PrePost ->
+ Term {- ^ exported concrete term -} ->
+ Term {- ^ expected specification term -} ->
+ OverrideMatcher ext md ()
+
+matchTerm _ _ _ real expect | real == expect = return ()
+matchTerm sc md prepost real expect =
+ do let loc = MS.conditionLoc md
+ free <- OM (use osFree)
+ case unwrapTermF expect of
+ FTermF (ExtCns ec)
+ | Set.member (ecVarIndex ec) free ->
+ do assignTerm sc md prepost (ecVarIndex ec) real
+
+ _ ->
+ do t <- liftIO $ scEq sc real expect
+ let msg = unlines $
+ [ "Literal equality " ++ MS.stateCond prepost
+-- , "Expected term: " ++ prettyTerm expect
+-- , "Actual term: " ++ prettyTerm real
+ ]
+ addTermEq t md $ Crucible.SimError loc $ Crucible.AssertFailureSimError msg ""
+-- where prettyTerm = show . ppTermDepth 20
+
+assignTerm ::
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MS.ConditionMetadata ->
+ PrePost ->
+ VarIndex {- ^ external constant index -} ->
+ Term {- ^ value -} ->
+ OverrideMatcher ext md ()
+
+assignTerm sc md prepost var val =
+ do mb <- OM (use (termSub . at var))
+ case mb of
+ Nothing -> OM (termSub . at var ?= val)
+ Just old ->
+ matchTerm sc md prepost val old
+
+-- do t <- liftIO $ scEq sc old val
+-- p <- liftIO $ resolveSAWPred cc t
+-- addAssert p (Crucible.AssertFailureSimError ("literal equality " ++ MS.stateCond prepost))
diff --git a/src/SAWScript/Crucible/Common/Setup/Value.hs b/src/SAWScript/Crucible/Common/Setup/Value.hs
index 505acce1c9..b9fa6ebcde 100644
--- a/src/SAWScript/Crucible/Common/Setup/Value.hs
+++ b/src/SAWScript/Crucible/Common/Setup/Value.hs
@@ -51,8 +51,6 @@ module SAWScript.Crucible.Common.Setup.Value
, SetupValue(..)
, SetupValueHas
- , XGhostState
-
, ConditionMetadata(..)
, MethodId
@@ -185,15 +183,6 @@ deriving instance (SetupValueHas Show ext) => Show (SetupValue ext)
-- deriving instance (SetupValueHas Eq ext) => Eq (SetupValue ext)
-- deriving instance (SetupValueHas Ord ext) => Ord (SetupValue ext)
---------------------------------------------------------------------------------
--- ** Ghost state
-
--- | This extension field controls whether ghost state is enabled for a
--- particular language backend. At the moment, ghost state is only enabled for
--- the LLVM backend, but we want to expand this to cover other language backends
--- in the future. See .
-type family XGhostState ext
-
--------------------------------------------------------------------------------
-- ** Pre- and post-conditions
diff --git a/src/SAWScript/Crucible/JVM/Builtins.hs b/src/SAWScript/Crucible/JVM/Builtins.hs
index a3920359f6..f2a55d93b4 100644
--- a/src/SAWScript/Crucible/JVM/Builtins.hs
+++ b/src/SAWScript/Crucible/JVM/Builtins.hs
@@ -44,14 +44,18 @@ module SAWScript.Crucible.JVM.Builtins
, jvm_alloc_object
, jvm_alloc_array
, jvm_setup_with_tag
+ , jvm_ghost_value
) where
import Control.Lens
import qualified Control.Monad.Catch as X
-import Control.Monad.State
+import Control.Monad (foldM, forM, forM_, guard, unless, when)
+import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Reader (runReaderT)
+import Control.Monad.State (MonadState(..), StateT(..), execStateT, gets)
import qualified Control.Monad.State.Strict as Strict
+import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Monad.Trans.Except (runExceptT)
import qualified Data.BitVector.Sized as BV
import Data.Foldable (for_)
@@ -67,7 +71,6 @@ import Data.Text (Text)
import qualified Data.Text as Text
import Data.Time.Clock (getCurrentTime, diffUTCTime)
import qualified Data.Vector as V
-import Data.Void (absurd)
import Prettyprinter
import System.IO
@@ -109,6 +112,7 @@ import Verifier.SAW.TypedTerm
import Verifier.SAW.Simulator.What4.ReturnTrip
+import SAWScript.Builtins (ghost_value)
import SAWScript.Exceptions
import SAWScript.Panic
import SAWScript.Proof
@@ -412,7 +416,8 @@ verifyPrestate cc mspec globals0 =
(env, globals1) <- runStateT (Map.traverseWithKey doAlloc preallocs) globals0'
globals2 <- setupPrePointsTos mspec cc env (mspec ^. MS.csPreState . MS.csPointsTos) globals1
- cs <- setupPrestateConditions mspec cc env (mspec ^. MS.csPreState . MS.csConditions)
+ (globals3, cs) <-
+ setupPrestateConditions mspec cc env globals2 (mspec ^. MS.csPreState . MS.csConditions)
args <- resolveArguments cc mspec env
-- Check the type of the return setup value
@@ -432,7 +437,7 @@ verifyPrestate cc mspec globals0 =
]
(Nothing, _) -> return ()
- return (args, cs, env, globals2)
+ return (args, cs, env, globals3)
-- | Check two Types for register compatibility.
registerCompatible :: J.Type -> J.Type -> Bool
@@ -537,32 +542,43 @@ setupPrePointsTos mspec cc env pts mem0 = foldM doPointsTo mem0 pts
_ ->
panic "setupPrePointsTo" ["invalid invariant", "jvm_modifies in pre-state"]
--- | Collects boolean terms that should be assumed to be true.
+-- | Sets up globals (ghost variable), and collects boolean terms
+-- that should be assumed to be true.
setupPrestateConditions ::
MethodSpec ->
JVMCrucibleContext ->
Map AllocIndex JVMRefVal ->
+ Crucible.SymGlobalState Sym ->
[SetupCondition] ->
- IO [Crucible.LabeledPred Term AssumptionReason]
+ IO ( Crucible.SymGlobalState Sym, [Crucible.LabeledPred Term AssumptionReason]
+ )
setupPrestateConditions mspec cc env = aux []
where
tyenv = MS.csAllocations mspec
nameEnv = mspec ^. MS.csPreState . MS.csVarTypeNames
- aux acc [] = return acc
+ aux acc globals [] = return (globals, acc)
- aux acc (MS.SetupCond_Equal loc val1 val2 : xs) =
+ aux acc globals (MS.SetupCond_Equal loc val1 val2 : xs) =
do val1' <- resolveSetupVal cc env tyenv nameEnv val1
val2' <- resolveSetupVal cc env tyenv nameEnv val2
t <- assertEqualVals cc val1' val2'
let lp = Crucible.LabeledPred t (loc, "equality precondition")
- aux (lp:acc) xs
+ aux (lp:acc) globals xs
- aux acc (MS.SetupCond_Pred loc tm : xs) =
+ aux acc globals (MS.SetupCond_Pred loc tm : xs) =
let lp = Crucible.LabeledPred (ttTerm tm) (loc, "precondition") in
- aux (lp:acc) xs
-
- aux _ (MS.SetupCond_Ghost empty_ _ _ _ : _) = absurd empty_
+ aux (lp:acc) globals xs
+
+ aux acc globals (MS.SetupCond_Ghost _md var val : xs) =
+ case val of
+ TypedTerm (TypedTermSchema sch) tm ->
+ aux acc (Crucible.insertGlobal var (sch,tm) globals) xs
+ TypedTerm tp _ ->
+ fail $ unlines
+ [ "Setup term for global variable expected to have Cryptol schema type, but got"
+ , show (MS.ppTypedTermType tp)
+ ]
--------------------------------------------------------------------------------
@@ -657,7 +673,13 @@ verifySimulate opts cc pfs mspec args assumes top_loc lemmas globals _checkSat m
regmap <- prepareArgs (Crucible.handleArgTypes h) (map snd args)
res <-
do let feats = pfs
- let simctx = CJ.jvmSimContext bak halloc stdout jc verbosity SAWCruciblePersonality
+ -- TODO: Use crucible-jvm's jvmSimContext here (instead of manually
+ -- calling mkDelayedBindings/initSimContext), once
+ -- https://github.com/GaloisInc/crucible/issues/1128 has been fixed
+ -- upstream.
+ let bindings = CJ.mkDelayedBindings jc verbosity
+ let simctx = Crucible.initSimContext bak intrinsics halloc stdout
+ bindings CJ.jvmExtensionImpl SAWCruciblePersonality
let simSt = Crucible.InitialState simctx globals Crucible.defaultAbortHandler (Crucible.handleReturnType h)
let fnCall = Crucible.regValue <$> Crucible.callFnVal (Crucible.HandleFnVal h) regmap
let overrideSim =
@@ -1418,6 +1440,13 @@ jvm_setup_with_tag ::
jvm_setup_with_tag tag m =
JVMSetupM (Setup.setupWithTag tag (runJVMSetupM m))
+jvm_ghost_value ::
+ MS.GhostGlobal ->
+ TypedTerm ->
+ JVMSetupM ()
+jvm_ghost_value ghost val = JVMSetupM $
+ ghost_value ghost val
+
--------------------------------------------------------------------------------
-- | Sort a list of things and group them into equivalence classes.
diff --git a/src/SAWScript/Crucible/JVM/MethodSpecIR.hs b/src/SAWScript/Crucible/JVM/MethodSpecIR.hs
index bc9e40a9f6..1e3cd413f8 100644
--- a/src/SAWScript/Crucible/JVM/MethodSpecIR.hs
+++ b/src/SAWScript/Crucible/JVM/MethodSpecIR.hs
@@ -53,9 +53,13 @@ module SAWScript.Crucible.JVM.MethodSpecIR
, initialDefCrucibleMethodSpecIR
, initialCrucibleSetupState
+
+ , intrinsics
) where
import Control.Lens
+import qualified Data.Parameterized.Map as MapF
+import Data.Parameterized.SymbolRepr (SymbolRepr, knownSymbol)
import qualified Prettyprinter as PPL
-- what4
@@ -63,6 +67,8 @@ import What4.ProgramLoc (ProgramLoc)
-- crucible-jvm
import qualified Lang.Crucible.JVM as CJ
+import qualified Lang.Crucible.Simulator.Intrinsics as CS
+ (IntrinsicMuxFn(IntrinsicMuxFn))
import qualified Lang.JVM.Codebase as CB
-- jvm-parser
@@ -184,6 +190,16 @@ initialCrucibleSetupState cc (cls, method) loc =
(J.className cls)
method
loc
+--------------------------------------------------------------------------------
+
+-- | The default JVM intrinsics extended with the 'MS.GhostValue' intrinsic,
+-- which powers ghost state.
+intrinsics :: MapF.MapF SymbolRepr (CS.IntrinsicMuxFn Sym)
+intrinsics =
+ MapF.insert
+ (knownSymbol :: SymbolRepr MS.GhostValue)
+ CS.IntrinsicMuxFn
+ CJ.jvmIntrinsicTypes
--------------------------------------------------------------------------------
diff --git a/src/SAWScript/Crucible/JVM/Override.hs b/src/SAWScript/Crucible/JVM/Override.hs
index 231338987e..680686ac8c 100644
--- a/src/SAWScript/Crucible/JVM/Override.hs
+++ b/src/SAWScript/Crucible/JVM/Override.hs
@@ -92,8 +92,6 @@ import Data.Parameterized.Some (Some(Some))
-- saw-core
import Verifier.SAW.SharedTerm
-import Verifier.SAW.Prelude (scEq)
-import Verifier.SAW.TypedAST
import Verifier.SAW.TypedTerm
import Verifier.SAW.Simulator.What4.ReturnTrip (toSC)
@@ -326,13 +324,13 @@ methodSpecHandler_prestate opts sc cc args cs =
-- which involves writing values into memory, computing the return value,
-- and computing postcondition predicates.
methodSpecHandler_poststate ::
- forall ret w.
+ forall ret.
Options {- ^ output/verbosity options -} ->
SharedContext {- ^ context for constructing SAW terms -} ->
JVMCrucibleContext {- ^ context for interacting with Crucible -} ->
Crucible.TypeRepr ret {- ^ type representation of function return value -} ->
CrucibleMethodSpecIR {- ^ specification for current function override -} ->
- OverrideMatcher CJ.JVM w (Crucible.RegValue Sym ret)
+ OverrideMatcher CJ.JVM RW (Crucible.RegValue Sym ret)
methodSpecHandler_poststate opts sc cc retTy cs =
do executeCond opts sc cc cs (cs ^. MS.csPostState)
computeReturnValue opts cc sc cs retTy (cs ^. MS.csRetValue)
@@ -350,10 +348,22 @@ learnCond opts sc cc cs prepost ss =
do let loc = cs ^. MS.csLoc
matchPointsTos opts sc cc cs prepost (ss ^. MS.csPointsTos)
traverse_ (learnSetupCondition opts sc cc cs prepost) (ss ^. MS.csConditions)
+ assertTermEqualities sc cc
enforceDisjointness cc loc ss
enforceCompleteSubstitution loc ss
+assertTermEqualities ::
+ SharedContext ->
+ JVMCrucibleContext ->
+ OverrideMatcher CJ.JVM md ()
+assertTermEqualities sc cc = do
+ let assertTermEquality (t, md, e) = do
+ p <- instantiateExtResolveSAWPred sc cc t
+ addAssert p md e
+ traverse_ assertTermEquality =<< OM (use termEqs)
+
+
-- execute a pre/post condition
executeCond ::
Options ->
@@ -361,7 +371,7 @@ executeCond ::
JVMCrucibleContext ->
CrucibleMethodSpecIR ->
StateSpec ->
- OverrideMatcher CJ.JVM w ()
+ OverrideMatcher CJ.JVM RW ()
executeCond opts sc cc cs ss =
do refreshTerms sc ss
traverse_ (executeAllocation opts cc) (Map.assocs (ss ^. MS.csAllocs))
@@ -369,21 +379,6 @@ executeCond opts sc cc cs ss =
traverse_ (executeSetupCondition opts sc cc cs) (ss ^. MS.csConditions)
--- | Allocate fresh variables for all of the "fresh" vars
--- used in this phase and add them to the term substitution.
-refreshTerms ::
- SharedContext {- ^ shared context -} ->
- StateSpec {- ^ current phase spec -} ->
- OverrideMatcher CJ.JVM w ()
-refreshTerms sc ss =
- do extension <- Map.fromList <$> traverse freshenTerm (view MS.csFreshVars ss)
- OM (termSub %= Map.union extension)
- where
- freshenTerm (TypedExtCns _cty ec) =
- do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec)
- new <- liftIO $ scExtCns sc ec'
- return (ecVarIndex ec, new)
-
------------------------------------------------------------------------
-- | Generate assertions that all of the memory allocations matched by
@@ -523,26 +518,6 @@ assignVar cc md var ref =
------------------------------------------------------------------------
-
-assignTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- JVMCrucibleContext {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- PrePost ->
- VarIndex {- ^ external constant index -} ->
- Term {- ^ value -} ->
- OverrideMatcher CJ.JVM w ()
-
-assignTerm sc cc md prepost var val =
- do mb <- OM (use (termSub . at var))
- case mb of
- Nothing -> OM (termSub . at var ?= val)
- Just old ->
- matchTerm sc cc md prepost val old
-
-
-------------------------------------------------------------------------
-
-- | Match the value of a function argument with a symbolic 'SetupValue'.
matchArg ::
Options {- ^ saw script print out opts -} ->
@@ -562,7 +537,7 @@ matchArg opts sc cc cs prepost md actual expectedTy expected@(MS.SetupTerm expec
= do sym <- Ov.getSymInterface
failMsg <- mkStructuralMismatch opts cc sc cs actual expected expectedTy
realTerm <- valueToSC sym md failMsg tval actual
- matchTerm sc cc md prepost realTerm (ttTerm expectedTT)
+ matchTerm sc md prepost realTerm (ttTerm expectedTT)
matchArg opts sc cc cs prepost md actual@(RVal ref) expectedTy setupval =
case setupval of
@@ -621,32 +596,6 @@ valueToSC _sym md failMsg _tval _val =
------------------------------------------------------------------------
--- | NOTE: The two 'Term' arguments must have the same type.
-matchTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- JVMCrucibleContext {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- PrePost ->
- Term {- ^ exported concrete term -} ->
- Term {- ^ expected specification term -} ->
- OverrideMatcher CJ.JVM w ()
-
-matchTerm _ _ _ _ real expect | real == expect = return ()
-matchTerm sc cc md prepost real expect =
- do free <- OM (use osFree)
- let loc = MS.conditionLoc md
- case unwrapTermF expect of
- FTermF (ExtCns ec)
- | Set.member (ecVarIndex ec) free ->
- do assignTerm sc cc md prepost (ecVarIndex ec) real
-
- _ ->
- do t <- liftIO $ scEq sc real expect
- p <- liftIO $ resolveBoolTerm (cc ^. jccSym) t
- addAssert p md (Crucible.SimError loc (Crucible.AssertFailureSimError ("literal equality " ++ MS.stateCond prepost) ""))
-
-------------------------------------------------------------------------
-
-- | Use the current state to learn about variable assignments based on
-- preconditions for a procedure specification.
learnSetupCondition ::
@@ -657,9 +606,11 @@ learnSetupCondition ::
PrePost ->
SetupCondition ->
OverrideMatcher CJ.JVM w ()
-learnSetupCondition opts sc cc spec prepost (MS.SetupCond_Equal md val1 val2) = learnEqual opts sc cc spec md prepost val1 val2
-learnSetupCondition _opts sc cc _ prepost (MS.SetupCond_Pred md tm) = learnPred sc cc md prepost (ttTerm tm)
-learnSetupCondition _opts _ _ _ _ (MS.SetupCond_Ghost empty _ _ _) = absurd empty
+learnSetupCondition opts sc cc spec prepost cond =
+ case cond of
+ MS.SetupCond_Equal md val1 val2 -> learnEqual opts sc cc spec md prepost val1 val2
+ MS.SetupCond_Pred md tm -> learnPred sc cc md prepost (ttTerm tm)
+ MS.SetupCond_Ghost md var val -> learnGhost sc md prepost var val
------------------------------------------------------------------------
@@ -732,7 +683,7 @@ learnPointsTo opts sc cc spec prepost pt =
ety_tm <- liftIO $ Cryptol.importType sc Cryptol.emptyEnv ety
ts <- traverse load [0 .. fromInteger len - 1]
realTerm <- liftIO $ scVector sc ety_tm ts
- matchTerm sc cc md prepost realTerm (ttTerm tt)
+ matchTerm sc md prepost realTerm (ttTerm tt)
-- If the right-hand-side is 'Nothing', this is indicates a "modifies" declaration,
-- which should probably not appear in the pre-state section, and has no effect.
@@ -776,6 +727,15 @@ learnPred sc cc md prepost t =
let loc = MS.conditionLoc md
addAssert p md (Crucible.SimError loc (Crucible.AssertFailureSimError (MS.stateCond prepost) ""))
+instantiateExtResolveSAWPred ::
+ SharedContext ->
+ JVMCrucibleContext ->
+ Term ->
+ OverrideMatcher CJ.JVM md (W4.Pred Sym)
+instantiateExtResolveSAWPred sc cc cond = do
+ sub <- OM (use termSub)
+ liftIO $ resolveSAWPred cc =<< scInstantiateExt sc sub cond
+
------------------------------------------------------------------------
-- TODO: replace (W4.ProgramLoc, J.Type) by some allocation datatype
@@ -815,10 +775,13 @@ executeSetupCondition ::
JVMCrucibleContext ->
CrucibleMethodSpecIR ->
SetupCondition ->
- OverrideMatcher CJ.JVM w ()
-executeSetupCondition opts sc cc spec (MS.SetupCond_Equal md val1 val2) = executeEqual opts sc cc spec md val1 val2
-executeSetupCondition _opts sc cc _ (MS.SetupCond_Pred md tm) = executePred sc cc md tm
-executeSetupCondition _ _ _ _ (MS.SetupCond_Ghost empty _ _ _) = absurd empty
+ OverrideMatcher CJ.JVM RW ()
+executeSetupCondition opts sc cc spec =
+ \case
+ MS.SetupCond_Equal md val1 val2 ->
+ executeEqual opts sc cc spec md val1 val2
+ MS.SetupCond_Pred md tm -> executePred sc cc md tm
+ MS.SetupCond_Ghost md var val -> executeGhost sc md var val
------------------------------------------------------------------------
diff --git a/src/SAWScript/Crucible/JVM/Setup/Value.hs b/src/SAWScript/Crucible/JVM/Setup/Value.hs
index 8286704750..a69e29ec05 100644
--- a/src/SAWScript/Crucible/JVM/Setup/Value.hs
+++ b/src/SAWScript/Crucible/JVM/Setup/Value.hs
@@ -87,8 +87,6 @@ type instance MS.XSetupCast CJ.JVM = Void
type instance MS.XSetupUnion CJ.JVM = Void
type instance MS.XSetupGlobalInitializer CJ.JVM = Void
-type instance MS.XGhostState CJ.JVM = Void
-
type JIdent = String -- FIXME(huffman): what to put here?
type instance MS.TypeName CJ.JVM = JIdent
diff --git a/src/SAWScript/Crucible/LLVM/Builtins.hs b/src/SAWScript/Crucible/LLVM/Builtins.hs
index f70e250bc4..625e0db955 100644
--- a/src/SAWScript/Crucible/LLVM/Builtins.hs
+++ b/src/SAWScript/Crucible/LLVM/Builtins.hs
@@ -43,7 +43,6 @@ module SAWScript.Crucible.LLVM.Builtins
, llvm_spec_size
, llvm_spec_solvers
, llvm_ghost_value
- , llvm_declare_ghost_state
, llvm_equal
, llvm_points_to
, llvm_conditional_points_to
@@ -93,14 +92,18 @@ import Prelude hiding (fail)
import qualified Control.Exception as X
import Control.Lens
+import Control.Monad (foldM, forM, forM_, replicateM, unless, when)
import Control.Monad.Extra (findM, whenM)
-import Control.Monad.State hiding (fail)
-import Control.Monad.Reader (runReaderT)
import Control.Monad.Fail (MonadFail(..))
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (runReaderT)
+import Control.Monad.State (MonadState(..), StateT(..), execStateT, gets)
+import Control.Monad.Trans.Class (MonadTrans(..))
import qualified Data.Bimap as Bimap
import Data.Char (isDigit)
import Data.Foldable (for_, toList, fold)
import Data.Function
+import Data.Functor (void)
import Data.IORef
import Data.List
import Data.List.Extra (nubOrd)
@@ -185,6 +188,7 @@ import Verifier.SAW.TypedTerm
-- saw-script
import SAWScript.AST (Located(..))
+import SAWScript.Builtins (ghost_value)
import SAWScript.Proof
import SAWScript.Prover.SolverStats
import SAWScript.Prover.Versions
@@ -1202,7 +1206,7 @@ setupPrestateConditions mspec cc mem env = aux []
let lp = Crucible.LabeledPred (ttTerm tm) (md, "precondition") in
aux (lp:acc) globals xs
- aux acc globals (MS.SetupCond_Ghost () _md var val : xs) =
+ aux acc globals (MS.SetupCond_Ghost _md var val : xs) =
case val of
TypedTerm (TypedTermSchema sch) tm ->
aux acc (Crucible.insertGlobal var (sch,tm) globals) xs
@@ -2791,28 +2795,12 @@ llvm_equal (getAllLLVM -> val1) (getAllLLVM -> val2) =
}
Setup.addCondition (MS.SetupCond_Equal md val1 val2)
-llvm_declare_ghost_state ::
- String ->
- TopLevel Value
-llvm_declare_ghost_state name =
- do allocator <- getHandleAlloc
- global <- liftIO (Crucible.freshGlobalVar allocator (Text.pack name) knownRepr)
- return (VGhostVar global)
-
llvm_ghost_value ::
MS.GhostGlobal ->
TypedTerm ->
LLVMCrucibleSetupM ()
llvm_ghost_value ghost val = LLVMCrucibleSetupM $
- do loc <- getW4Position "llvm_ghost_value"
- tags <- view Setup.croTags
- let md = MS.ConditionMetadata
- { MS.conditionLoc = loc
- , MS.conditionTags = tags
- , MS.conditionType = "ghost value"
- , MS.conditionContext = ""
- }
- Setup.addCondition (MS.SetupCond_Ghost () md ghost val)
+ ghost_value ghost val
llvm_spec_solvers :: SomeLLVM MS.ProvedSpec -> [String]
llvm_spec_solvers (SomeLLVM ps) =
diff --git a/src/SAWScript/Crucible/LLVM/MethodSpecIR.hs b/src/SAWScript/Crucible/LLVM/MethodSpecIR.hs
index 2ed66092e3..f627d36508 100644
--- a/src/SAWScript/Crucible/LLVM/MethodSpecIR.hs
+++ b/src/SAWScript/Crucible/LLVM/MethodSpecIR.hs
@@ -12,11 +12,9 @@ Stability : provisional
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleContexts #-}
-{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE ImplicitParams #-}
{-# LANGUAGE LambdaCase #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE NamedFieldPuns #-}
{-# LANGUAGE PatternGuards #-}
{-# LANGUAGE PatternSynonyms #-}
@@ -119,16 +117,12 @@ module SAWScript.Crucible.LLVM.MethodSpecIR
) where
import Control.Lens
-import Control.Monad (when)
import Data.Functor.Compose (Compose(..))
import qualified Data.Map as Map
import qualified Prettyprinter as PPL
import qualified Text.LLVM.AST as L
import qualified Text.LLVM.PP as L
-import qualified Cryptol.TypeCheck.AST as Cryptol
-import qualified Cryptol.Utils.PP as Cryptol (pp)
-
import Data.Parameterized.All (All(All))
import Data.Parameterized.Some (Some(Some))
import qualified Data.Parameterized.Map as MapF
@@ -137,7 +131,7 @@ import What4.ProgramLoc (ProgramLoc)
import qualified Lang.Crucible.Types as Crucible (SymbolRepr, knownSymbol)
import qualified Lang.Crucible.Simulator.Intrinsics as Crucible
- (IntrinsicClass(Intrinsic, muxIntrinsic), IntrinsicMuxFn(IntrinsicMuxFn))
+ (IntrinsicMuxFn(IntrinsicMuxFn))
import SAWScript.Crucible.Common
import qualified SAWScript.Crucible.Common.MethodSpec as MS
@@ -146,9 +140,6 @@ import qualified SAWScript.Crucible.Common.Setup.Type as Setup
import qualified SAWScript.Crucible.LLVM.CrucibleLLVM as CL
import SAWScript.Crucible.LLVM.Setup.Value
-import Verifier.SAW.Simulator.What4.ReturnTrip ( toSC, saw_ctx )
-
-import Verifier.SAW.SharedTerm
import Verifier.SAW.TypedTerm
@@ -177,24 +168,6 @@ mutIso =
isMut :: Lens' LLVMAllocSpec Bool
isMut = allocSpecMut . mutIso
---------------------------------------------------------------------------------
--- ** Ghost state
-
-instance Crucible.IntrinsicClass Sym MS.GhostValue where
- type Intrinsic Sym MS.GhostValue ctx = (Cryptol.Schema, Term)
- muxIntrinsic sym _ _namerep _ctx prd (thnSch,thn) (elsSch,els) =
- do when (thnSch /= elsSch) $ fail $ unlines $
- [ "Attempted to mux ghost variables of different types:"
- , show (Cryptol.pp thnSch)
- , show (Cryptol.pp elsSch)
- ]
- st <- sawCoreState sym
- let sc = saw_ctx st
- prd' <- toSC sym st prd
- typ <- scTypeOf sc thn
- res <- scIte sc typ prd' thn els
- return (thnSch, res)
-
--------------------------------------------------------------------------------
-- ** CrucibleContext
@@ -249,8 +222,10 @@ instance PPL.Pretty (LLVMPointsToValue arch) where
MS.ppTypedTerm arr PPL.<+> PPL.pretty "[" PPL.<+> MS.ppTypedTerm sz PPL.<+> PPL.pretty "]"
--------------------------------------------------------------------------------
--- ** ???
+-- ** SAW LLVM intrinsics
+-- | The default LLVM intrinsics extended with the 'MS.GhostValue' intrinsic,
+-- which powers ghost state.
intrinsics :: MapF.MapF Crucible.SymbolRepr (Crucible.IntrinsicMuxFn Sym)
intrinsics =
MapF.insert
diff --git a/src/SAWScript/Crucible/LLVM/Override.hs b/src/SAWScript/Crucible/LLVM/Override.hs
index 27b11aed0c..44dc4f89e4 100644
--- a/src/SAWScript/Crucible/LLVM/Override.hs
+++ b/src/SAWScript/Crucible/LLVM/Override.hs
@@ -63,10 +63,10 @@ import Control.Lens.Fold
import Control.Lens.Getter
import Control.Lens.Lens
import Control.Lens.Setter
-import Control.Lens.TH
import Control.Exception as X
-import Control.Monad
-import Control.Monad.Except
+import Control.Monad (filterM, foldM, forM, forM_, zipWithM)
+import Control.Monad.Except (runExcept)
+import Control.Monad.IO.Class (MonadIO(..))
import Data.Either (partitionEithers)
import Data.Foldable (for_, traverse_, toList)
import Data.List
@@ -75,13 +75,11 @@ import Data.IORef (IORef, modifyIORef)
import Data.Map (Map)
import qualified Data.Map as Map
import Data.Maybe
-import Data.Proxy
import Data.Set (Set)
import qualified Data.Set as Set
import Data.Text (Text, pack)
import qualified Data.Vector as V
import Data.Void (absurd)
-import GHC.Generics (Generic)
import Numeric.Natural
import qualified Prettyprinter as PP
@@ -89,10 +87,8 @@ import qualified Text.LLVM.AST as L
import qualified Cryptol.TypeCheck.AST as Cryptol (Schema(..))
import qualified Cryptol.Eval.Type as Cryptol (TValue(..), evalType)
-import qualified Cryptol.Utils.PP as Cryptol (pp)
import qualified Lang.Crucible.Backend as Crucible
-import qualified Lang.Crucible.Backend.Online as Crucible
import qualified Lang.Crucible.CFG.Core as Crucible (TypeRepr(UnitRepr))
import qualified Lang.Crucible.FunctionHandle as Crucible
import qualified Lang.Crucible.LLVM.Bytes as Crucible
@@ -120,9 +116,7 @@ import Data.Parameterized.NatRepr
import Data.Parameterized.Some (Some(..))
import qualified Data.BitVector.Sized as BV
-import Verifier.SAW.Prelude (scEq)
import Verifier.SAW.SharedTerm
-import Verifier.SAW.TypedAST
import Verifier.SAW.Recognizer
import Verifier.SAW.TypedTerm
import Verifier.SAW.Simulator.What4.ReturnTrip (SAWCoreState(..), toSC, bindSAWTerm)
@@ -140,20 +134,7 @@ import SAWScript.Options
import SAWScript.Panic
import SAWScript.Utils (bullets, handleException)
-type LabeledPred sym = W4.LabeledPred (W4.Pred sym) Crucible.SimError
-
--- | An override packaged together with its preconditions, labeled with some
--- human-readable info about each condition.
-data OverrideWithPreconditions arch =
- OverrideWithPreconditions
- { _owpPreconditions :: [(MS.ConditionMetadata, LabeledPred Sym)]
- -- ^ c.f. '_osAsserts'
- , _owpMethodSpec :: MS.CrucibleMethodSpecIR (LLVM arch)
- , owpState :: OverrideState (LLVM arch)
- }
- deriving (Generic)
-
-makeLenses ''OverrideWithPreconditions
+type instance Pointer' (LLVM arch) Sym = LLVMPtr (Crucible.ArchWidth arch)
------------------------------------------------------------------------
-- Translating SAW values to Crucible values for good error messages
@@ -259,89 +240,12 @@ notEqual cond opts loc cc sc spec expected actual = do
------------------------------------------------------------------------
--- | Partition into three groups:
--- * Preconditions concretely succeed
--- * Preconditions concretely fail
--- * Preconditions are symbolic
-partitionOWPsConcrete :: forall arch.
- Sym ->
- [OverrideWithPreconditions arch] ->
- IO ([OverrideWithPreconditions arch], [OverrideWithPreconditions arch], [OverrideWithPreconditions arch])
-partitionOWPsConcrete sym =
- let traversal = owpPreconditions . each . _2 . W4.labeledPred
- in W4.partitionByPredsM (Just sym) $
- foldlMOf traversal (W4.andPred sym) (W4.truePred sym)
-
--- | Like 'W4.partitionByPreds', but partitions on solver responses, not just
--- concretized values.
-partitionBySymbolicPreds ::
- (OnlineSolver solver, Foldable t) =>
- Backend solver {- ^ solver connection -} ->
- (a -> W4.Pred Sym) {- ^ how to extract predicates -} ->
- t a ->
- IO (Map Crucible.BranchResult [a])
-partitionBySymbolicPreds sym getPred =
- let step mp a =
- Crucible.considerSatisfiability sym Nothing (getPred a) <&> \k ->
- Map.insertWith (++) k [a] mp
- in foldM step Map.empty
-
--- | Find individual preconditions that are symbolically false
---
--- We should probably be using unsat cores for this.
-findFalsePreconditions ::
- OnlineSolver solver =>
- Backend solver ->
- OverrideWithPreconditions arch ->
- IO [(MS.ConditionMetadata, LabeledPred Sym)]
-findFalsePreconditions bak owp =
- fromMaybe [] . Map.lookup (Crucible.NoBranch False) <$>
- partitionBySymbolicPreds bak (view (_2 . W4.labeledPred)) (owp ^. owpPreconditions)
-
--- | Is this group of predicates collectively unsatisfiable?
-unsatPreconditions ::
- OnlineSolver solver =>
- Backend solver {- ^ solver connection -} ->
- Fold s (W4.Pred Sym) {- ^ how to extract predicates -} ->
- s {- ^ a container full of predicates -}->
- IO Bool
-unsatPreconditions bak container getPreds = do
- let sym = backendGetSym bak
- conj <- W4.andAllOf sym container getPreds
- Crucible.considerSatisfiability bak Nothing conj >>=
- \case
- Crucible.NoBranch False -> pure True
- _ -> pure False
-
--- | Print a message about failure of an override's preconditions
-ppFailure ::
- OverrideWithPreconditions arch ->
- [LabeledPred Sym] ->
- PP.Doc ann
-ppFailure owp false =
- PP.vcat
- [ MS.ppMethodSpec (owp ^. owpMethodSpec)
- -- TODO: remove viaShow when crucible switches to prettyprinter
- , bullets '*' (map (PP.viaShow . Crucible.ppSimError)
- (false ^.. traverse . W4.labeledPredMsg))
- ]
-
--- | Print a message about concrete failure of an override's preconditions
---
--- Assumes that the override it's being passed does have concretely failing
--- preconditions. Otherwise, the error won't make much sense.
-ppConcreteFailure :: OverrideWithPreconditions arch -> PP.Doc ann
-ppConcreteFailure owp =
- let (_, false, _) =
- W4.partitionLabeledPreds (Proxy :: Proxy Sym) (map snd (owp ^. owpPreconditions))
- in ppFailure owp false
-
-- | Print a message about symbolic failure of an override's preconditions
--
-- TODO: Needs additional testing. Are these messages useful?
{-
ppSymbolicFailure ::
- (OverrideWithPreconditions arch, [LabeledPred Sym]) ->
+ (OverrideWithPreconditions (LLVM arch), [LabeledPred Sym]) ->
PP.Doc
ppSymbolicFailure = uncurry ppFailure
-}
@@ -488,7 +392,7 @@ handleSingleOverrideBranch :: forall arch rtp args ret.
W4.ProgramLoc {- ^ Location of the call site for error reporting-} ->
IORef MetadataMap ->
Crucible.FnHandle args ret {- ^ the handle for this function -} ->
- OverrideWithPreconditions arch ->
+ OverrideWithPreconditions (LLVM arch) ->
Crucible.OverrideSim (SAWCruciblePersonality Sym) Sym Crucible.LLVM rtp args ret
(Crucible.RegValue Sym ret)
handleSingleOverrideBranch opts sc cc call_loc mdMap h (OverrideWithPreconditions preconds cs st) =
@@ -547,8 +451,8 @@ handleOverrideBranches :: forall arch rtp args ret.
NE.NonEmpty (MS.CrucibleMethodSpecIR (LLVM arch))
{- ^ specification for current function override -} ->
Crucible.FnHandle args ret {- ^ the handle for this function -} ->
- [OverrideWithPreconditions arch] ->
- ([OverrideWithPreconditions arch],[OverrideWithPreconditions arch],[OverrideWithPreconditions arch]) ->
+ [OverrideWithPreconditions (LLVM arch)] ->
+ ([OverrideWithPreconditions (LLVM arch)],[OverrideWithPreconditions (LLVM arch)],[OverrideWithPreconditions (LLVM arch)]) ->
Crucible.OverrideSim (SAWCruciblePersonality Sym) Sym Crucible.LLVM rtp args ret
(Crucible.RegValue Sym ret)
@@ -833,21 +737,6 @@ executeCond opts sc cc cs ss = do
(ss ^. MS.csPointsTos)
traverse_ (executeSetupCondition opts sc cc cs) (ss ^. MS.csConditions)
--- | Allocate fresh variables for all of the "fresh" vars
--- used in this phase and add them to the term substitution.
-refreshTerms ::
- SharedContext {- ^ shared context -} ->
- MS.StateSpec (LLVM arch) {- ^ current phase spec -} ->
- OverrideMatcher (LLVM arch) md ()
-refreshTerms sc ss =
- do extension <- Map.fromList <$> traverse freshenTerm (view MS.csFreshVars ss)
- OM (termSub %= Map.union extension)
- where
- freshenTerm (TypedExtCns _cty ec) =
- do ec' <- liftIO $ scFreshEC sc (toShortName (ecName ec)) (ecType ec)
- new <- liftIO $ scExtCns sc ec'
- return (ecVarIndex ec, new)
-
------------------------------------------------------------------------
-- | Generate assertions that all of the memory regions matched by an
@@ -1181,29 +1070,6 @@ assignVar cc md var val =
------------------------------------------------------------------------
-
-assignTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- LLVMCrucibleContext arch {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- PrePost ->
- VarIndex {- ^ external constant index -} ->
- Term {- ^ value -} ->
- OverrideMatcher (LLVM arch) md ()
-
-assignTerm sc cc md prepost var val =
- do mb <- OM (use (termSub . at var))
- case mb of
- Nothing -> OM (termSub . at var ?= val)
- Just old ->
- matchTerm sc cc md prepost val old
-
--- do t <- liftIO $ scEq sc old val
--- p <- liftIO $ resolveSAWPred cc t
--- addAssert p (Crucible.AssertFailureSimError ("literal equality " ++ MS.stateCond prepost))
-
-------------------------------------------------------------------------
-
diffMemTypes ::
Crucible.HasPtrWidth wptr =>
Crucible.MemType ->
@@ -1284,7 +1150,7 @@ matchArg opts sc cc cs prepost md actual expectedTy expected =
, Right tval <- Cryptol.evalType mempty tyexpr
-> do failMsg <- mkStructuralMismatch opts cc sc cs actual expected expectedTy
realTerm <- valueToSC sym md failMsg tval actual
- instantiateExtMatchTerm sc cc md prepost realTerm (ttTerm expectedTT)
+ instantiateExtMatchTerm sc md prepost realTerm (ttTerm expectedTT)
-- match arrays point-wise
(Crucible.LLVMValArray _ xs, Crucible.ArrayType _len y, SetupArray () zs)
@@ -1454,50 +1320,6 @@ typeToSC sc t =
do fields' <- V.toList <$> traverse (typeToSC sc . view Crucible.fieldVal) fields
scTupleType sc fields'
-------------------------------------------------------------------------
-
--- | NOTE: The two 'Term' arguments must have the same type.
-instantiateExtMatchTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- LLVMCrucibleContext arch {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- PrePost ->
- Term {- ^ exported concrete term -} ->
- Term {- ^ expected specification term -} ->
- OverrideMatcher (LLVM arch) md ()
-instantiateExtMatchTerm sc cc md prepost actual expected = do
- sub <- OM (use termSub)
- matchTerm sc cc md prepost actual =<< liftIO (scInstantiateExt sc sub expected)
-
-matchTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- LLVMCrucibleContext arch {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- PrePost ->
- Term {- ^ exported concrete term -} ->
- Term {- ^ expected specification term -} ->
- OverrideMatcher (LLVM arch) md ()
-
-matchTerm _ _ _ _ real expect | real == expect = return ()
-matchTerm sc cc md prepost real expect =
- do let loc = MS.conditionLoc md
- free <- OM (use osFree)
- case unwrapTermF expect of
- FTermF (ExtCns ec)
- | Set.member (ecVarIndex ec) free ->
- do assignTerm sc cc md prepost (ecVarIndex ec) real
-
- _ ->
- do t <- liftIO $ scEq sc real expect
- let msg = unlines $
- [ "Literal equality " ++ MS.stateCond prepost
--- , "Expected term: " ++ prettyTerm expect
--- , "Actual term: " ++ prettyTerm real
- ]
- addTermEq t md $ Crucible.SimError loc $ Crucible.AssertFailureSimError msg ""
--- where prettyTerm = show . ppTermDepth 20
-
-
------------------------------------------------------------------------
-- | Use the current state to learn about variable assignments based on
@@ -1513,39 +1335,13 @@ learnSetupCondition ::
OverrideMatcher (LLVM arch) md ()
learnSetupCondition opts sc cc spec prepost cond =
case cond of
- MS.SetupCond_Equal md val1 val2 -> learnEqual opts sc cc spec md prepost val1 val2
- MS.SetupCond_Pred md tm -> learnPred sc cc md prepost (ttTerm tm)
- MS.SetupCond_Ghost () md var val -> learnGhost sc cc md prepost var val
+ MS.SetupCond_Equal md val1 val2 -> learnEqual opts sc cc spec md prepost val1 val2
+ MS.SetupCond_Pred md tm -> learnPred sc cc md prepost (ttTerm tm)
+ MS.SetupCond_Ghost md var val -> learnGhost sc md prepost var val
------------------------------------------------------------------------
--- TODO(lb): make this language-independent!
-learnGhost ::
- SharedContext ->
- LLVMCrucibleContext arch ->
- MS.ConditionMetadata ->
- PrePost ->
- MS.GhostGlobal ->
- TypedTerm ->
- OverrideMatcher (LLVM arch) md ()
-learnGhost sc cc md prepost var (TypedTerm (TypedTermSchema schEx) tmEx) =
- do (sch,tm) <- readGlobal var
- when (sch /= schEx) $ fail $ unlines $
- [ "Ghost variable had the wrong type:"
- , "- Expected: " ++ show (Cryptol.pp schEx)
- , "- Actual: " ++ show (Cryptol.pp sch)
- ]
- instantiateExtMatchTerm sc cc md prepost tm tmEx
-learnGhost _sc _cc _md _prepost _var (TypedTerm tp _)
- = fail $ unlines
- [ "Ghost variable expected value has improper type"
- , "expected Cryptol schema type, but got"
- , show (MS.ppTypedTermType tp)
- ]
-
-------------------------------------------------------------------------
-
-- | Process a "points_to" statement from the precondition section of
-- the CrucibleSetup block. First, load the value from the address
-- indicated by 'ptr', and then match it against the pattern 'val'.
@@ -1661,7 +1457,7 @@ matchPointsToValue opts sc cc spec prepost md maybe_cond ptr val =
off_tm -- src offset
instantiated_expected_sz_tm -- length
- instantiateExtMatchTerm sc cc md prepost arr_tm $ ttTerm expected_arr_tm
+ instantiateExtMatchTerm sc md prepost arr_tm $ ttTerm expected_arr_tm
sz_tm <- liftIO $ toSC sym st sz
expected_end_off_tm <- liftIO $ scBvAdd sc ptr_width_tm off_tm $ ttTerm expected_sz_tm
@@ -2087,27 +1883,7 @@ executeSetupCondition opts sc cc spec =
MS.SetupCond_Equal md val1 val2 ->
executeEqual opts sc cc spec md val1 val2
MS.SetupCond_Pred md tm -> executePred sc cc md tm
- MS.SetupCond_Ghost () md var val -> executeGhost sc md var val
-
-------------------------------------------------------------------------
-
--- TODO(lb): make this language independent!
-executeGhost ::
- SharedContext ->
- MS.ConditionMetadata ->
- MS.GhostGlobal ->
- TypedTerm ->
- OverrideMatcher (LLVM arch) RW ()
-executeGhost sc _md var (TypedTerm (TypedTermSchema sch) tm) =
- do s <- OM (use termSub)
- tm' <- liftIO (scInstantiateExt sc s tm)
- writeGlobal var (sch,tm')
-executeGhost _sc _md _var (TypedTerm tp _) =
- fail $ unlines
- [ "executeGhost: improper value type"
- , "expected Cryptol schema type, but got"
- , show (MS.ppTypedTermType tp)
- ]
+ MS.SetupCond_Ghost md var val -> executeGhost sc md var val
------------------------------------------------------------------------
diff --git a/src/SAWScript/Crucible/LLVM/Setup/Value.hs b/src/SAWScript/Crucible/LLVM/Setup/Value.hs
index ac5baba510..9f301187f7 100644
--- a/src/SAWScript/Crucible/LLVM/Setup/Value.hs
+++ b/src/SAWScript/Crucible/LLVM/Setup/Value.hs
@@ -130,8 +130,6 @@ type instance Setup.XSetupUnion (LLVM _) = ()
type instance Setup.XSetupGlobal (LLVM _) = ()
type instance Setup.XSetupGlobalInitializer (LLVM _) = ()
-type instance Setup.XGhostState (LLVM _) = ()
-
type instance Setup.TypeName (LLVM arch) = CL.Ident
type instance Setup.ExtType (LLVM arch) = CL.MemType
diff --git a/src/SAWScript/Crucible/LLVM/X86.hs b/src/SAWScript/Crucible/LLVM/X86.hs
index 8cadba3856..0e8f7715b2 100644
--- a/src/SAWScript/Crucible/LLVM/X86.hs
+++ b/src/SAWScript/Crucible/LLVM/X86.hs
@@ -36,12 +36,15 @@ import Control.Lens.TH (makeLenses)
import System.IO (stdout)
import Control.Exception (throw)
import Control.Lens (Getter, to, view, use, (&), (^.), (.~), (%~), (.=))
-import Control.Monad.State
-import Control.Monad.Reader (runReaderT)
+import Control.Monad (forM, forM_, unless, when, zipWithM)
import Control.Monad.Catch (MonadThrow)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (runReaderT)
+import Control.Monad.State (MonadState, StateT(..), execStateT, gets)
import qualified Data.BitVector.Sized as BV
import Data.Foldable (foldlM)
+import Data.Functor (void)
import Data.IORef
import qualified Data.List.NonEmpty as NE
import qualified Data.Vector as Vector
diff --git a/src/SAWScript/Crucible/MIR/Builtins.hs b/src/SAWScript/Crucible/MIR/Builtins.hs
index 9436a31faf..c81a39546d 100644
--- a/src/SAWScript/Crucible/MIR/Builtins.hs
+++ b/src/SAWScript/Crucible/MIR/Builtins.hs
@@ -15,13 +15,16 @@ module SAWScript.Crucible.MIR.Builtins
, mir_assert
, mir_execute_func
, mir_find_adt
+ , mir_fresh_cryptol_var
, mir_fresh_expanded_value
, mir_fresh_var
+ , mir_ghost_value
, mir_load_module
, mir_points_to
, mir_postcond
, mir_precond
, mir_return
+ , mir_unsafe_assume_spec
, mir_verify
-- ** MIR slices
, mir_slice_value
@@ -59,11 +62,12 @@ import Control.Monad.IO.Class (MonadIO(..))
import Control.Monad.Reader (runReaderT)
import Control.Monad.State (MonadState(..), StateT(..), execStateT, gets)
import Control.Monad.Trans.Class (MonadTrans(..))
-import qualified Data.BitVector.Sized as BV
import qualified Data.ByteString.Lazy as BSL
import Data.Foldable (for_)
import Data.IORef
-import qualified Data.List.Extra as List (find, groupOn)
+import qualified Data.List as List (find)
+import qualified Data.List.NonEmpty as NE
+import Data.List.NonEmpty (NonEmpty(..))
import qualified Data.Map as Map
import Data.Map (Map)
import Data.Maybe (fromMaybe)
@@ -78,7 +82,6 @@ import Data.Text (Text)
import Data.Time.Clock (diffUTCTime, getCurrentTime)
import Data.Traversable (mapAccumL)
import Data.Type.Equality (TestEquality(..))
-import Data.Void (absurd)
import qualified Prettyprinter as PP
import System.IO (stdout)
@@ -113,6 +116,7 @@ import Verifier.SAW.SharedTerm
import Verifier.SAW.Simulator.What4.ReturnTrip
import Verifier.SAW.TypedTerm
+import SAWScript.Builtins (ghost_value)
import SAWScript.Crucible.Common
import qualified SAWScript.Crucible.Common.MethodSpec as MS
import SAWScript.Crucible.Common.Override
@@ -128,6 +132,7 @@ import SAWScript.Panic
import qualified SAWScript.Position as SS
import SAWScript.Proof
import SAWScript.Prover.SolverStats
+import SAWScript.Utils (neGroupOn)
import SAWScript.Value
type AssumptionReason = (MS.ConditionMetadata, String)
@@ -173,10 +178,19 @@ mir_alloc_internal mut mty =
_ ->
pure ()
+ loc <- getW4Position "mir_alloc"
Some tpr <- pure $ Mir.tyToRepr col mty
n <- Setup.csVarCounter <<%= MS.nextAllocIndex
+ tags <- view Setup.croTags
+ let md = MS.ConditionMetadata
+ { MS.conditionLoc = loc
+ , MS.conditionTags = tags
+ , MS.conditionType = "fresh allocation"
+ , MS.conditionContext = ""
+ }
Setup.currentState . MS.csAllocs . at n ?=
- Some (MirAllocSpec { _maType = tpr
+ Some (MirAllocSpec { _maConditionMetadata = md
+ , _maType = tpr
, _maMutbl = mut
, _maMirType = mty
, _maLen = 1
@@ -221,6 +235,22 @@ mir_find_adt rm origName substs = do
origDid <- findDefId crateDisambigs (Text.pack origName)
findAdt col origDid (Mir.Substs substs)
+-- | Generate a fresh term of the given Cryptol type. The name will be used when
+-- pretty-printing the variable in debug output.
+mir_fresh_cryptol_var ::
+ Text ->
+ Cryptol.Schema ->
+ MIRSetupM TypedTerm
+mir_fresh_cryptol_var name s =
+ MIRSetupM $
+ do loc <- getW4Position "mir_fresh_var"
+ case s of
+ Cryptol.Forall [] [] ty ->
+ do sc <- lift $ lift getSharedContext
+ Setup.freshVariable sc name ty
+ _ ->
+ throwCrucibleSetup loc $ "Unsupported polymorphic Cryptol type schema: " ++ show s
+
-- | Create a MIR value entirely populated with fresh symbolic variables.
-- For compound types such as structs and arrays, this will explicitly set
-- each field or element to contain a fresh symbolic variable. The Text
@@ -366,6 +396,13 @@ mir_fresh_var name mty =
Nothing -> X.throwM $ MIRFreshVarInvalidType mty
Just cty -> Setup.freshVariable sc name cty
+mir_ghost_value ::
+ MS.GhostGlobal ->
+ TypedTerm ->
+ MIRSetupM ()
+mir_ghost_value ghost val = MIRSetupM $
+ ghost_value ghost val
+
-- | Load a MIR JSON file and return a handle to it.
mir_load_module :: String -> TopLevel Mir.RustModule
mir_load_module inputFile = do
@@ -468,6 +505,22 @@ mir_points_to_check_lhs_validity ref loc =
_ -> throwCrucibleSetup loc $ "lhs not a reference type: "
++ show (PP.pretty refTy)
+mir_unsafe_assume_spec ::
+ Mir.RustModule ->
+ String {- ^ Name of the function -} ->
+ MIRSetupM () {- ^ Boundary specification -} ->
+ TopLevel Lemma
+mir_unsafe_assume_spec rm nm setup =
+ do cc <- setupCrucibleContext rm
+ pos <- getPosition
+ let loc = SS.toW4Loc "_SAW_assume_spec" pos
+ fn <- findFn rm nm
+ let st0 = initialCrucibleSetupState cc fn loc
+ ms <- (view Setup.csMethodSpec) <$>
+ execStateT (runReaderT (runMIRSetupM setup) Setup.makeCrucibleSetupRO) st0
+ ps <- io (MS.mkProvedSpec MS.SpecAdmitted ms mempty mempty mempty 0)
+ returnProof ps
+
mir_verify ::
Mir.RustModule ->
String {- ^ method name -} ->
@@ -488,19 +541,16 @@ mir_verify rm nm lemmas checkSat setup tactic =
let sym = cc^.mccSym
let globals0 = cc^.mccSymGlobalState
+ sosp <- rwSingleOverrideSpecialCase <$> getTopLevelRW
+ let ?singleOverrideSpecialCase = sosp
+
pos <- getPosition
let loc = SS.toW4Loc "_SAW_verify_prestate" pos
profFile <- rwProfilingFile <$> getTopLevelRW
(writeFinalProfile, pfs) <- io $ setupProfiling sym "mir_verify" profFile
- let cs = rm ^. Mir.rmCS
- col = cs ^. Mir.collection
- crateDisambigs = cs ^. Mir.crateHashesMap
- did <- findDefId crateDisambigs (Text.pack nm)
- fn <- case Map.lookup did (col ^. Mir.functions) of
- Just x -> return x
- Nothing -> fail $ "Couldn't find MIR function named: " ++ nm
+ fn <- findFn rm nm
let st0 = initialCrucibleSetupState cc fn loc
-- execute commands of the method spec
@@ -646,18 +696,22 @@ assertEqualVals cc v1 v2 =
toSC sym st =<< equalValsPred cc v1 v2
registerOverride ::
+ (?singleOverrideSpecialCase :: Bool) =>
Options ->
MIRCrucibleContext ->
Crucible.SimContext (SAWCruciblePersonality Sym) Sym MIR ->
W4.ProgramLoc ->
IORef MetadataMap {- ^ metadata map -} ->
- [MethodSpec] ->
+ NonEmpty MethodSpec ->
Crucible.OverrideSim (SAWCruciblePersonality Sym) Sym MIR rtp args ret ()
-registerOverride _opts cc _ctx _top_loc _mdMap cs =
- do let c0 = head cs
+registerOverride opts cc _ctx _top_loc mdMap cs =
+ do let sym = cc^.mccSym
+ let c0 = NE.head cs
let method = c0 ^. MS.csMethod
let rm = cc^.mccRustModule
+ sc <- saw_ctx <$> liftIO (sawCoreState sym)
+
Crucible.AnyCFG cfg <- lookupDefIdCFG rm method
let h = Crucible.cfgHandle cfg
let retTy = Crucible.handleReturnType h
@@ -667,7 +721,7 @@ registerOverride _opts cc _ctx _top_loc _mdMap cs =
$ Crucible.mkOverride'
(Crucible.handleName h)
retTy
- (panic "registerOverride.methodSpecHandler" ["not yet implemented"])
+ (methodSpecHandler opts sc cc mdMap cs h)
resolveArguments ::
MIRCrucibleContext ->
@@ -708,73 +762,46 @@ setupPrePointsTos ::
[MirPointsTo] ->
Crucible.SymGlobalState Sym ->
IO (Crucible.SymGlobalState Sym)
-setupPrePointsTos mspec cc env pts mem0 = foldM doPointsTo mem0 pts
- where
- tyenv = MS.csAllocations mspec
- nameEnv = mspec ^. MS.csPreState . MS.csVarTypeNames
-
- doPointsTo ::
- Crucible.SymGlobalState Sym
- -> MirPointsTo
- -> IO (Crucible.SymGlobalState Sym)
- doPointsTo globals (MirPointsTo _ reference referents) =
- mccWithBackend cc $ \bak -> do
- MIRVal referenceShp referenceVal <-
- resolveSetupVal cc env tyenv nameEnv reference
- -- By the time we reach here, we have already checked (in mir_points_to)
- -- that we are in fact dealing with a reference value, so the call to
- -- `testRefShape` below should always succeed.
- IsRefShape _ _ _ referenceInnerTy <-
- case testRefShape referenceShp of
- Just irs -> pure irs
- Nothing ->
- panic "setupPrePointsTos"
- [ "Unexpected non-reference type:"
- , show $ PP.pretty $ shapeMirTy referenceShp
- ]
- referent <- firstPointsToReferent referents
- MIRVal referentShp referentVal <-
- resolveSetupVal cc env tyenv nameEnv referent
- -- By the time we reach here, we have already checked (in mir_points_to)
- -- that the type of the reference is compatible with the right-hand side
- -- value, so the equality check below should never fail.
- Refl <-
- case W4.testEquality referenceInnerTy (shapeType referentShp) of
- Just r -> pure r
- Nothing ->
- panic "setupPrePointsTos"
- [ "Unexpected type mismatch between reference and referent"
- , "Reference type: " ++ show referenceInnerTy
- , "Referent type: " ++ show (shapeType referentShp)
- ]
- Mir.writeMirRefIO bak globals Mir.mirIntrinsicTypes referenceVal referentVal
+setupPrePointsTos mspec cc env pts mem0 =
+ foldM (doPointsTo mspec cc env) mem0 pts
--- | Collects boolean terms that should be assumed to be true.
+-- | Sets up globals (ghost variable), and collects boolean terms
+-- that should be assumed to be true.
setupPrestateConditions ::
MethodSpec ->
MIRCrucibleContext ->
Map MS.AllocIndex (Some (MirPointer Sym)) ->
+ Crucible.SymGlobalState Sym ->
[SetupCondition] ->
- IO [Crucible.LabeledPred Term AssumptionReason]
+ IO ( Crucible.SymGlobalState Sym, [Crucible.LabeledPred Term AssumptionReason]
+ )
setupPrestateConditions mspec cc env = aux []
where
tyenv = MS.csAllocations mspec
nameEnv = mspec ^. MS.csPreState . MS.csVarTypeNames
- aux acc [] = return acc
+ aux acc globals [] = return (globals, acc)
- aux acc (MS.SetupCond_Equal loc val1 val2 : xs) =
+ aux acc globals (MS.SetupCond_Equal loc val1 val2 : xs) =
do val1' <- resolveSetupVal cc env tyenv nameEnv val1
val2' <- resolveSetupVal cc env tyenv nameEnv val2
t <- assertEqualVals cc val1' val2'
let lp = Crucible.LabeledPred t (loc, "equality precondition")
- aux (lp:acc) xs
+ aux (lp:acc) globals xs
- aux acc (MS.SetupCond_Pred loc tm : xs) =
+ aux acc globals (MS.SetupCond_Pred loc tm : xs) =
let lp = Crucible.LabeledPred (ttTerm tm) (loc, "precondition") in
- aux (lp:acc) xs
-
- aux _ (MS.SetupCond_Ghost empty_ _ _ _ : _) = absurd empty_
+ aux (lp:acc) globals xs
+
+ aux acc globals (MS.SetupCond_Ghost _md var val : xs) =
+ case val of
+ TypedTerm (TypedTermSchema sch) tm ->
+ aux acc (Crucible.insertGlobal var (sch,tm) globals) xs
+ TypedTerm tp _ ->
+ fail $ unlines
+ [ "Setup term for global variable expected to have Cryptol schema type, but got"
+ , show (MS.ppTypedTermType tp)
+ ]
verifyObligations ::
MIRCrucibleContext ->
@@ -948,11 +975,14 @@ verifyPrestate cc mspec globals0 =
liftIO $ W4.setCurrentProgramLoc sym prestateLoc
(env, globals1) <- runStateT
- (traverse (doAlloc cc) (mspec ^. MS.csPreState . MS.csAllocs))
+ (traverse
+ (\alloc -> StateT (\globals -> doAlloc cc globals alloc))
+ (mspec ^. MS.csPreState . MS.csAllocs))
globals0
globals2 <- setupPrePointsTos mspec cc env (mspec ^. MS.csPreState . MS.csPointsTos) globals1
- cs <- setupPrestateConditions mspec cc env (mspec ^. MS.csPreState . MS.csConditions)
+ (globals3, cs) <-
+ setupPrestateConditions mspec cc env globals2 (mspec ^. MS.csPreState . MS.csConditions)
args <- resolveArguments cc mspec env
-- Check the type of the return setup value
@@ -973,11 +1003,12 @@ verifyPrestate cc mspec globals0 =
]
(Nothing, _) -> return ()
- return (args, cs, env, globals2)
+ return (args, cs, env, globals3)
-- | Simulate a MIR function with Crucible as part of a 'mir_verify' command,
-- making sure to install any overrides that the user supplies.
verifySimulate ::
+ (?singleOverrideSpecialCase :: Bool) =>
Options ->
MIRCrucibleContext ->
[Crucible.GenericExecutionFeature Sym] ->
@@ -1014,7 +1045,7 @@ verifySimulate opts cc pfs mspec args assumes top_loc lemmas globals _checkSat m
let fnCall = Crucible.regValue <$> Crucible.callCFG methodCfg regmap
let overrideSim =
do mapM_ (registerOverride opts cc simctx top_loc mdMap)
- (List.groupOn (view MS.csMethod) (map (view MS.psSpec) lemmas))
+ (neGroupOn (view MS.csMethod) (map (view MS.psSpec) lemmas))
liftIO $
for_ assumes $ \(Crucible.LabeledPred p (md, reason)) ->
do expr <- resolveSAWPred cc p
@@ -1104,41 +1135,6 @@ cryptolTypeOfActual mty =
baseSizeType Mir.B128 = Just $ Cryptol.tWord $ Cryptol.tNum (128 :: Integer)
baseSizeType Mir.USize = Just $ Cryptol.tWord $ Cryptol.tNum $ natValue $ knownNat @Mir.SizeBits
--- | Allocate memory for each 'mir_alloc' or 'mir_alloc_mut'.
-doAlloc ::
- MIRCrucibleContext
- -> Some MirAllocSpec
- -> StateT (Crucible.SymGlobalState Sym) IO (Some (MirPointer Sym))
-doAlloc cc (Some ma) =
- mccWithBackend cc $ \bak ->
- do let col = cc ^. mccRustModule ^. Mir.rmCS ^. Mir.collection
- let halloc = cc^.mccHandleAllocator
- let sym = backendGetSym bak
- let iTypes = Mir.mirIntrinsicTypes
- Some tpr <- pure $ Mir.tyToRepr col (ma^.maMirType)
-
- -- Create an uninitialized `MirVector_PartialVector` of length 1 and
- -- return a pointer to its element.
- ref <- liftIO $
- Mir.newMirRefIO sym halloc (Mir.MirVectorRepr tpr)
-
- globals <- get
- globals' <- liftIO $ do
- one <- W4.bvLit sym W4.knownRepr $ BV.mkBV W4.knownRepr 1
- vec <- Mir.mirVector_uninitIO bak one
- Mir.writeMirRefIO bak globals iTypes ref vec
- put globals'
-
- ptr <- liftIO $ do
- zero <- W4.bvLit sym W4.knownRepr $ BV.mkBV W4.knownRepr 0
- Mir.subindexMirRefIO bak iTypes tpr ref zero
- pure $ Some MirPointer
- { _mpType = tpr
- , _mpMutbl = ma^.maMutbl
- , _mpMirType = ma^.maMirType
- , _mpRef = ptr
- }
-
-- Find the ADT definition that is monomorphized from `origName` with `substs`.
-- This should only be used on types that are known to be present in the crate
-- after dead code elimination - for example, because the type appears in the
@@ -1151,6 +1147,20 @@ findAdt col origName substs =
where
insts = col ^. Mir.adtsOrig . at origName . to (fromMaybe [])
+-- | Find the 'Mir.Fn' corresponding to the given function name (supplied as a
+-- 'String'). If none can be found or if there are multiple functions
+-- corresponding to that name (see the Haddocks for 'findDefId'), then this will
+-- fail.
+findFn :: Mir.RustModule -> String -> TopLevel Mir.Fn
+findFn rm nm = do
+ let cs = rm ^. Mir.rmCS
+ col = cs ^. Mir.collection
+ crateDisambigs = cs ^. Mir.crateHashesMap
+ did <- findDefId crateDisambigs (Text.pack nm)
+ case Map.lookup did (col ^. Mir.functions) of
+ Just x -> return x
+ Nothing -> fail $ "Couldn't find MIR function named: " ++ nm
+
getMIRCrucibleContext :: CrucibleSetup MIR MIRCrucibleContext
getMIRCrucibleContext = view Setup.csCrucibleContext <$> get
@@ -1250,7 +1260,7 @@ setupCrucibleContext rm =
(Crucible.UseCFG cfg (Crucible.postdomInfo cfg))) $
Map.elems cfgMap
let simctx0 = Crucible.initSimContext bak
- Mir.mirIntrinsicTypes halloc stdout
+ intrinsics halloc stdout
bindings Mir.mirExtImpl
SAWCruciblePersonality
let globals0 = Crucible.emptyGlobals
diff --git a/src/SAWScript/Crucible/MIR/MethodSpecIR.hs b/src/SAWScript/Crucible/MIR/MethodSpecIR.hs
index 74995675b4..c52292ea43 100644
--- a/src/SAWScript/Crucible/MIR/MethodSpecIR.hs
+++ b/src/SAWScript/Crucible/MIR/MethodSpecIR.hs
@@ -1,4 +1,5 @@
{-# Language DataKinds #-}
+{-# Language LambdaCase #-}
{-# Language OverloadedStrings #-}
{-# Language RankNTypes #-}
{-# Language TemplateHaskell #-}
@@ -16,6 +17,7 @@ module SAWScript.Crucible.MIR.MethodSpecIR
, mccSymGlobalState
, mccStaticInitializerMap
, mccHandleAllocator
+ , mccIntrinsicTypes
, mccWithBackend
, mccSym
@@ -27,11 +29,15 @@ module SAWScript.Crucible.MIR.MethodSpecIR
-- * @MirAllocSpec@
, MirAllocSpec(..)
+ , maConditionMetadata
, maType
, maMutbl
, maMirType
, maLen
+ , mutIso
+ , isMut
+
-- * @MirPointer@
, MirPointer(..)
, mpType
@@ -48,13 +54,20 @@ module SAWScript.Crucible.MIR.MethodSpecIR
-- * Initial CrucibleSetupMethodSpec
, initialDefCrucibleMethodSpecIR
, initialCrucibleSetupState
+
+ -- * Intrinsics
+ , intrinsics
) where
-import Control.Lens (Getter, (^.), to)
+import Control.Lens (Getter, Iso', Lens', (^.), iso, to)
+import qualified Data.Parameterized.Map as MapF
+import Data.Parameterized.SymbolRepr (SymbolRepr, knownSymbol)
import qualified Prettyprinter as PP
import Lang.Crucible.FunctionHandle (HandleAllocator)
import Lang.Crucible.Simulator (SimContext(..))
+import Lang.Crucible.Simulator.Intrinsics
+ (IntrinsicMuxFn(IntrinsicMuxFn), IntrinsicTypes)
import Mir.Generator
import Mir.Intrinsics
import qualified Mir.Mir as M
@@ -68,6 +81,9 @@ import SAWScript.Crucible.MIR.Setup.Value
mccHandleAllocator :: Getter MIRCrucibleContext HandleAllocator
mccHandleAllocator = mccSimContext . to simHandleAllocator
+mccIntrinsicTypes :: Getter MIRCrucibleContext (IntrinsicTypes Sym)
+mccIntrinsicTypes = mccSimContext . to ctxIntrinsicTypes
+
mccWithBackend ::
MIRCrucibleContext ->
(forall solver. OnlineSolver solver => Backend solver -> a) ->
@@ -82,6 +98,19 @@ instance PP.Pretty MirPointsTo where
pretty (MirPointsTo _md ref sv) = PP.parens $
MS.ppSetupValue ref PP.<+> "->" PP.<+> PP.list (map MS.ppSetupValue sv)
+mutIso :: Iso' M.Mutability Bool
+mutIso =
+ iso
+ (\case
+ M.Mut -> True
+ M.Immut -> False)
+ (\case
+ True -> M.Mut
+ False -> M.Immut)
+
+isMut :: Lens' (MirAllocSpec tp) Bool
+isMut = maMutbl . mutIso
+
type MIRMethodSpec = MS.CrucibleMethodSpecIR MIR
initialDefCrucibleMethodSpecIR ::
@@ -109,3 +138,12 @@ initialCrucibleSetupState cc fn loc =
(cc ^. mccRustModule ^. rmCS)
fn
loc
+
+-- | The default MIR intrinsics extended with the 'MS.GhostValue' intrinsic,
+-- which powers ghost state.
+intrinsics :: MapF.MapF SymbolRepr (IntrinsicMuxFn Sym)
+intrinsics =
+ MapF.insert
+ (knownSymbol :: SymbolRepr MS.GhostValue)
+ IntrinsicMuxFn
+ mirIntrinsicTypes
diff --git a/src/SAWScript/Crucible/MIR/Override.hs b/src/SAWScript/Crucible/MIR/Override.hs
index 5d957ddf68..0cee024cc5 100644
--- a/src/SAWScript/Crucible/MIR/Override.hs
+++ b/src/SAWScript/Crucible/MIR/Override.hs
@@ -1,6 +1,14 @@
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE GADTs #-}
+{-# LANGUAGE ImplicitParams #-}
+{-# LANGUAGE LambdaCase #-}
+{-# LANGUAGE MultiWayIf #-}
+{-# LANGUAGE OverloadedStrings #-}
+{-# LANGUAGE PolyKinds #-}
+{-# LANGUAGE RankNTypes #-}
+{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeApplications #-}
+{-# LANGUAGE TypeOperators #-}
-- | Override matching and application for MIR.
module SAWScript.Crucible.MIR.Override
@@ -14,23 +22,29 @@ module SAWScript.Crucible.MIR.Override
, learnCond
, matchArg
+ , methodSpecHandler
, decodeMIRVal
- , firstPointsToReferent
) where
import qualified Control.Exception as X
import Control.Lens
-import Control.Monad (unless)
+import Control.Monad (filterM, forM, forM_, unless, zipWithM)
import Control.Monad.IO.Class (MonadIO(..))
import qualified Data.BitVector.Sized as BV
-import Data.Foldable (for_, traverse_)
+import Data.Either (partitionEithers)
+import qualified Data.Foldable as F
import qualified Data.Functor.Product as Functor
+import Data.IORef (IORef, modifyIORef)
import Data.List (tails)
+import qualified Data.List.NonEmpty as NE
import qualified Data.Map as Map
import Data.Map (Map)
+import Data.Maybe (catMaybes, isJust)
+import qualified Data.Parameterized.Classes as PC
import qualified Data.Parameterized.Context as Ctx
import Data.Parameterized.Some (Some(..))
import qualified Data.Parameterized.TraversableFC as FC
+import Data.Proxy (Proxy(..))
import qualified Data.Set as Set
import Data.Set (Set)
import qualified Data.Vector as V
@@ -39,8 +53,12 @@ import qualified Prettyprinter as PP
import qualified Cryptol.TypeCheck.AST as Cryptol
import qualified Cryptol.Eval.Type as Cryptol (TValue(..), evalType)
+import qualified Lang.Crucible.Backend as Crucible
+import qualified Lang.Crucible.FunctionHandle as Crucible
import qualified Lang.Crucible.Simulator as Crucible
import qualified Lang.Crucible.Types as Crucible
+import qualified Mir.DefId as Mir
+import qualified Mir.FancyMuxTree as Mir
import qualified Mir.Generator as Mir
import qualified Mir.Intrinsics as Mir
import Mir.Intrinsics (MIR)
@@ -48,12 +66,11 @@ import qualified Mir.Mir as Mir
import qualified Mir.TransTy as Mir
import qualified What4.Expr as W4
import qualified What4.Interface as W4
+import qualified What4.LabeledPred as W4
import qualified What4.ProgramLoc as W4
-import Verifier.SAW.Prelude (scEq)
import Verifier.SAW.SharedTerm
import Verifier.SAW.Simulator.What4.ReturnTrip (saw_ctx, toSC)
-import Verifier.SAW.TypedAST
import Verifier.SAW.TypedTerm
import SAWScript.Crucible.Common
@@ -66,7 +83,7 @@ import SAWScript.Crucible.MIR.ResolveSetupValue
import SAWScript.Crucible.MIR.TypeShape
import SAWScript.Options
import SAWScript.Panic (panic)
-import SAWScript.Utils (handleException)
+import SAWScript.Utils (bullets, handleException)
-- A few convenient synonyms
type SetupValue = MS.SetupValue MIR
@@ -82,7 +99,7 @@ assertTermEqualities sc cc = do
let assertTermEquality (t, md, e) = do
p <- instantiateExtResolveSAWPred sc cc t
addAssert p md e
- traverse_ assertTermEquality =<< OM (use termEqs)
+ F.traverse_ assertTermEquality =<< OM (use termEqs)
-- | Assign the given reference value to the given allocation index in
-- the current substitution. If there is already a binding for this
@@ -97,25 +114,408 @@ assignVar ::
assignVar cc md var sref@(Some ref) =
do old <- OM (setupValueSub . at var <<.= Just sref)
let loc = MS.conditionLoc md
- for_ old $ \(Some ref') ->
+ F.for_ old $ \(Some ref') ->
do p <- liftIO (equalRefsPred cc ref ref')
addAssert p md (Crucible.SimError loc (Crucible.AssertFailureSimError "equality of aliased references" ""))
-assignTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- MS.PrePost ->
- VarIndex {- ^ external constant index -} ->
- Term {- ^ value -} ->
- OverrideMatcher MIR w ()
+-- | When a specification is used as a composition override, this function
+-- checks that the postconditions of the specification fully specify (via
+-- @mir_points_to@ statements) the values of all local mutable allocations
+-- (which are declared in the preconditions via @mir_alloc_mut@) and all
+-- mutable static items. If not, this function will raise an appropriate error
+-- message. See @Note [MIR compositional verification and mutable allocations]@.
+checkMutableAllocPostconds ::
+ Options ->
+ SharedContext ->
+ MIRCrucibleContext ->
+ CrucibleMethodSpecIR ->
+ OverrideMatcher MIR md ()
+checkMutableAllocPostconds opts sc cc cs = do
+ sub <- use setupValueSub
+
+ -- Gather all of the references used in `mir_points_to` statements in the
+ -- postconditions. This corresponds to step (1) of the plan in
+ -- Note [MIR compositional verification and mutable allocations]
+ postRefs <- Set.fromList <$>
+ traverse
+ (\(MirPointsTo _cond ref _val) -> do
+ MIRVal refShp refVal <-
+ resolveSetupValueMIR opts cc sc cs ref
+ case testRefShape refShp of
+ Just IsRefShape{} ->
+ pure $ Some $ MirReferenceMuxConcrete refVal
+ Nothing ->
+ panic "checkMutableAllocPostconds"
+ [ "Unexpected non-reference type:"
+ , show $ PP.pretty $ shapeMirTy refShp
+ ])
+ (cs ^. MS.csPostState ^. MS.csPointsTos)
+
+ -- Check if a `mir_alloc_mut`-computed allocation isn't used in a
+ -- `mir_points_to` statement in the postconditions, and if so, error.
+ -- This corresponds to step (2) of the plan in
+ -- Note [MIR compositional verification and mutable allocations]
+ let mutAllocSpecs =
+ Map.filter (\(Some mas) -> view isMut mas) $
+ cs ^. MS.csPreState . MS.csAllocs
+ let mutAllocRefs =
+ map
+ (\(Some mp, Some spec) ->
+ ( Some $ MirReferenceMuxConcrete $ mp ^. mpRef
+ , spec ^. maConditionMetadata
+ ))
+ (Map.elems (Map.intersectionWith (,) sub mutAllocSpecs))
+ F.for_ mutAllocRefs $ \(mutAllocRef, cond) ->
+ unless (Set.member mutAllocRef postRefs) $
+ fail $ underspecified_mut_alloc_err cond
+
+ -- Check if a mutable static isn't used in a `mir_points_to` statement in the
+ -- postconditions, and if so, error.
+ -- This corresponds to step (3) of the plan in
+ -- Note [MIR compositional verification and mutable allocations]
+ let mutStatics =
+ Map.filter (view Mir.sMutable) $
+ col ^. Mir.statics
+ let mutStaticRefs =
+ map
+ (\(mutStaticDid, (_, Mir.StaticVar gv)) ->
+ ( mutStaticDid
+ , Some $ MirReferenceMuxConcrete $ staticRefMux sym gv
+ ))
+ (Map.toList
+ (Map.intersectionWith
+ (,) mutStatics (colState ^. Mir.staticMap)))
+ F.for_ mutStaticRefs $ \(mutStaticDid, mutStaticRef) ->
+ unless (Set.member mutStaticRef postRefs) $
+ fail $ underspecified_mut_static_err mutStaticDid
+ where
+ sym = cc ^. mccSym
+ colState = cc ^. mccRustModule . Mir.rmCS
+ col = colState ^. Mir.collection
+
+ underspecified_mut_alloc_err ::
+ MS.ConditionMetadata -> String
+ underspecified_mut_alloc_err cond =
+ concat
+ [ "State of memory allocated in precondition (at "
+ , show $ W4.plSourceLoc $ MS.conditionLoc cond
+ , ") not described in postcondition"
+ ]
+
+ underspecified_mut_static_err ::
+ Mir.DefId -> String
+ underspecified_mut_static_err did =
+ concat
+ [ "State of mutable static variable \""
+ , show did
+ , "\" not described in postcondition"
+ ]
+
+-- | A newtype around 'Mir.MirReferenceMux' that allows comparing values that
+-- are known to be fully concrete.
+-- See @Note [MIR compositional verification and mutable allocations]@.
+newtype MirReferenceMuxConcrete tp =
+ MirReferenceMuxConcrete (Mir.MirReferenceMux Sym tp)
+
+instance W4.TestEquality MirReferenceMuxConcrete where
+ testEquality x y = PC.orderingF_refl (PC.compareF x y)
+
+instance PC.EqF MirReferenceMuxConcrete where
+ eqF x y = isJust (W4.testEquality x y)
+
+instance PC.OrdF MirReferenceMuxConcrete where
+ compareF (MirReferenceMuxConcrete x) (MirReferenceMuxConcrete y) =
+ cmpRefMuxConcretely Proxy x y
+
+-- | Compare two 'Mir.MirReferenceMux' values that are known to be concrete.
+-- In particular, this assumes that the underlying 'Mir.FancyMuxTree' in each
+-- value has exactly one leaf with a 'W4.Pred' that concretely evaluates to
+-- 'W4.truePred'. If this is not the case, this function will panic.
+-- See @Note [MIR compositional verification and mutable allocations]@.
+cmpRefMuxConcretely ::
+ forall sym tp1 tp2 proxy.
+ Crucible.IsSymInterface sym =>
+ proxy sym ->
+ Mir.MirReferenceMux sym tp1 ->
+ Mir.MirReferenceMux sym tp2 ->
+ PC.OrderingF tp1 tp2
+cmpRefMuxConcretely sym (Mir.MirReferenceMux fmt1) (Mir.MirReferenceMux fmt2) =
+ cmpRefConcretely sym
+ (fancyMuxTreeConcrete fmt1) (fancyMuxTreeConcrete fmt2)
+ where
+ fancyMuxTreeConcrete :: Mir.FancyMuxTree sym a -> a
+ fancyMuxTreeConcrete fmt =
+ case Mir.viewFancyMuxTree fmt of
+ [(x, p)] ->
+ if Just True == W4.asConstantPred p
+ then x
+ else panic "cmpRefMuxConcretely"
+ [ "FancyMuxTree leaf with symbolic predicate"
+ , show $ W4.printSymExpr p
+ ]
+ [] ->
+ panic "cmpRefMuxConcretely" ["FancyMuxTree with no leaves"]
+ (_:_) ->
+ panic "cmpRefMuxConcretely" ["FancyMuxTree with multiple leaves"]
+
+-- | Compare two 'Mir.MirReference' values that are known to be concrete.
+-- See @Note [MIR compositional verification and mutable allocations]@.
+cmpRefConcretely ::
+ Crucible.IsSymInterface sym =>
+ proxy sym ->
+ Mir.MirReference sym tp1 ->
+ Mir.MirReference sym tp2 ->
+ PC.OrderingF tp1 tp2
+cmpRefConcretely sym (Mir.MirReference r1 p1) (Mir.MirReference r2 p2) =
+ cmpRootConcretely r1 r2 <<>> cmpPathConcretely sym p1 p2
+cmpRefConcretely sym (Mir.MirReference_Integer tpr1 i1) (Mir.MirReference_Integer tpr2 i2) =
+ PC.compareF tpr1 tpr2 <<>> cmpSymBVConcretely sym i1 i2 <<>> PC.EQF
+cmpRefConcretely _ (Mir.MirReference _ _) (Mir.MirReference_Integer _ _) =
+ PC.LTF
+cmpRefConcretely _ (Mir.MirReference_Integer _ _) (Mir.MirReference _ _) =
+ PC.GTF
+
+-- | Compare two 'Mir.MirReferenceRoot' values that are known to be concrete.
+-- Like the 'Mir.refRootEq' function, this will panic if it attempts to compare
+-- 'Mir.GlobalVar_RefRoot' values, which should not be possible with the way
+-- that SAW is currently set up.
+-- See @Note [MIR compositional verification and mutable allocations]@.
+cmpRootConcretely ::
+ Mir.MirReferenceRoot sym tp1 ->
+ Mir.MirReferenceRoot sym tp2 ->
+ PC.OrderingF tp1 tp2
+
+-- RefCell_RefRoot
+cmpRootConcretely (Mir.RefCell_RefRoot rc1) (Mir.RefCell_RefRoot rc2) =
+ PC.compareF rc1 rc2
+
+cmpRootConcretely (Mir.RefCell_RefRoot _) _ = PC.LTF
+cmpRootConcretely _ (Mir.RefCell_RefRoot _) = PC.GTF
+
+-- GlobalVar_RefRoot
+cmpRootConcretely (Mir.GlobalVar_RefRoot gv1) (Mir.GlobalVar_RefRoot gv2) =
+ PC.compareF gv1 gv2
+cmpRootConcretely (Mir.GlobalVar_RefRoot _) _ = PC.LTF
+cmpRootConcretely _ (Mir.GlobalVar_RefRoot _) = PC.GTF
+
+-- Const_RefRoot
+cmpRootConcretely (Mir.Const_RefRoot _ _) (Mir.Const_RefRoot _ _) =
+ panic "cmpRootConcretely" ["Cannot compare Const_RefRoots"]
+
+-- | Compare two 'Mir.MirReferencePath' values that are known to be concete.
+-- See @Note [MIR compositional verification and mutable allocations]@.
+cmpPathConcretely ::
+ Crucible.IsSymInterface sym =>
+ proxy sym ->
+ Mir.MirReferencePath sym tp tp1 ->
+ Mir.MirReferencePath sym tp tp2 ->
+ PC.OrderingF tp1 tp2
+
+-- Empty_RefPath
+cmpPathConcretely _ Mir.Empty_RefPath Mir.Empty_RefPath = PC.EQF
+cmpPathConcretely _ Mir.Empty_RefPath _ = PC.LTF
+cmpPathConcretely _ _ Mir.Empty_RefPath = PC.GTF
+
+-- Any_RefPath
+cmpPathConcretely sym (Mir.Any_RefPath tpr1 p1) (Mir.Any_RefPath tpr2 p2) =
+ PC.compareF tpr1 tpr2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ PC.EQF
+cmpPathConcretely _ (Mir.Any_RefPath _ _) _ = PC.LTF
+cmpPathConcretely _ _ (Mir.Any_RefPath _ _) = PC.GTF
+
+-- Field_RefPath
+cmpPathConcretely sym (Mir.Field_RefPath ctx1 p1 idx1) (Mir.Field_RefPath ctx2 p2 idx2) =
+ PC.compareF ctx1 ctx2 <<>>
+ PC.compareF idx1 idx2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ PC.EQF
+cmpPathConcretely _ (Mir.Field_RefPath _ _ _) _ = PC.LTF
+cmpPathConcretely _ _ (Mir.Field_RefPath _ _ _) = PC.GTF
-assignTerm sc cc md prepost var val =
- do mb <- OM (use (termSub . at var))
- case mb of
- Nothing -> OM (termSub . at var ?= val)
- Just old ->
- matchTerm sc cc md prepost val old
+-- Variant_RefPath
+cmpPathConcretely sym (Mir.Variant_RefPath discrTp1 ctx1 p1 idx1) (Mir.Variant_RefPath discrTp2 ctx2 p2 idx2) =
+ PC.compareF discrTp1 discrTp2 <<>>
+ PC.compareF ctx1 ctx2 <<>>
+ PC.compareF idx1 idx2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ PC.EQF
+cmpPathConcretely _ (Mir.Variant_RefPath _ _ _ _) _ = PC.LTF
+cmpPathConcretely _ _ (Mir.Variant_RefPath _ _ _ _) = PC.GTF
+
+-- Index_RefPath
+cmpPathConcretely sym (Mir.Index_RefPath tpr1 p1 i1) (Mir.Index_RefPath tpr2 p2 i2) =
+ PC.compareF tpr1 tpr2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ cmpSymBVConcretely sym i1 i2 <<>>
+ PC.EQF
+cmpPathConcretely _ (Mir.Index_RefPath _ _ _) _ = PC.LTF
+cmpPathConcretely _ _ (Mir.Index_RefPath _ _ _) = PC.GTF
+
+-- Just_RefPath
+cmpPathConcretely sym (Mir.Just_RefPath tpr1 p1) (Mir.Just_RefPath tpr2 p2) =
+ PC.compareF tpr1 tpr2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ PC.EQF
+cmpPathConcretely _ (Mir.Just_RefPath _ _) _ = PC.LTF
+cmpPathConcretely _ _ (Mir.Just_RefPath _ _) = PC.GTF
+
+-- VectorAsMirVector_RefPath
+cmpPathConcretely sym (Mir.VectorAsMirVector_RefPath tpr1 p1) (Mir.VectorAsMirVector_RefPath tpr2 p2) =
+ PC.compareF tpr1 tpr2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ PC.EQF
+cmpPathConcretely _ (Mir.VectorAsMirVector_RefPath _ _) _ = PC.LTF
+cmpPathConcretely _ _ (Mir.VectorAsMirVector_RefPath _ _) = PC.GTF
+
+-- ArrayAsMirVector_RefPath
+cmpPathConcretely sym (Mir.ArrayAsMirVector_RefPath tpr1 p1) (Mir.ArrayAsMirVector_RefPath tpr2 p2) =
+ PC.compareF tpr1 tpr2 <<>>
+ cmpPathConcretely sym p1 p2 <<>>
+ PC.EQF
+
+-- | Compare two 'W4.SymBV' values that are known to be concrete. If they are
+-- not concrete, this function will panic.
+-- See @Note [MIR compositional verification and mutable allocations]@.
+cmpSymBVConcretely ::
+ Crucible.IsSymInterface sym =>
+ proxy sym ->
+ W4.SymBV sym w ->
+ W4.SymBV sym w ->
+ PC.OrderingF w w
+cmpSymBVConcretely _ symBV1 symBV2
+ | Just bv1 <- W4.asBV symBV1
+ , Just bv2 <- W4.asBV symBV2
+ = PC.fromOrdering $ compare bv1 bv2
+ | otherwise
+ = panic "cmpSymBVConcretely"
+ [ "SymBV not concrete"
+ , show $ W4.printSymExpr symBV1
+ , show $ W4.printSymExpr symBV2
+ ]
+
+-- | An infix version of 'PC.joinOrderingF' that is right associative, allowing
+-- it to be chained together more easily. See
+-- for further
+-- motivation.
+infixr 6 <<>>
+(<<>>) ::
+ forall j k (a :: j) (b :: j) (c :: k) (d :: k).
+ PC.OrderingF a b ->
+ (a ~ b => PC.OrderingF c d) ->
+ PC.OrderingF c d
+(<<>>) = PC.joinOrderingF
+
+{-
+Note [MIR compositional verification and mutable allocations]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+When using compositional verification in the SAW MIR backend, we want to ensure
+that any specifications that are used as compositional overrides properly
+specify the values of local mutable allocations (i.e., things allocated with
+mir_alloc_mut) and mutable static items (i.e., things declared with `static
+mut`) in the postconditions of the specs. (See the "Compositional Verification"
+section of the SAW manual for more discussion on why this is important.) This
+is something that the SAW LLVM backend also must do, but the MIR backend
+differs from how it accomplishes this in a number of key ways.
+
+The main entrypoint to this check is the `checkMutableAllocPostconds` function,
+which is roughly the MIR counterpart to the LLVM backend's
+`SAWScript.Crucible.LLVM.Override.invalidateMutableAllocs` function. The LLVM
+function takes the approach of invalidating the underlying memory of
+underspecified mutable allocations or global variables such that if they are
+read from later, then a simulation-time error is thrown. The MIR memory model,
+on the other hand, does not have a notion of memory invalidation that we can
+readily use (see https://github.com/GaloisInc/crucible/issues/1109), so the SAW
+MIR backend requires a slightly different approach.
+
+The SAW MIR backend instead implements a stricter check: any specification used
+as a compositional override *must* specify the values of all local mutable
+allocations and the values of all mutable static items in the postconditions.
+There are no exceptions to this rule: if you do not specify one, then SAW will
+throw an error before simulation begins. This differs from the LLVM backend in
+that you can get away with not specifying the value of a mutable allocation or
+global variable in an overrides postconditions, provided that that value is
+never read from during simulation.
+
+In order to implement the necessary checks in the `checkMutableAllocPostconds`
+function, we employ the following plan:
+
+1. Compute all of the MirReferenceMux values corresponding to each
+ mir_points_to statement in the postconditions of the compositional override
+ and put them into a Set.
+
+2. Gather all of the MirReferenceMux values corresponding to local mutable
+ references that were allocated in the preconditions. If one of these
+ values is not contained in the Set of things produced in step (1),
+ then throw an error.
+
+3. Gather all of the MirReferenceMux values corresponding to mutable static
+ items that might be used in the program. If one of these values is not
+ contained in the Set of things produced in step (1), then throw an error.
+
+Using a Set turns this from an O(n) operation to an O(log n) one, which can be
+important for specifications that have lots of mutable allocations or mutable
+static items.
+
+There is one wrinkle not mentioned in the plan above: how exactly do you put
+`MirReferenceMux tp` values (where each `tp` can potentially be different) into
+the same Set? At a first approximation, we actually put `Some MirReferenceMux`
+values, which lets us ignore the `tp` parameter. But that's still not the full
+story, since that would require MirReferenceMux to have an OrdF instance in
+order to use Set operations, and MirReferenceMux has no such instance. Indeed,
+it's not clear how to define such an instance: MirReferenceMux values can
+contain symbolic information in the general case, which makes it tricky to
+return a definite True-or-False answer regarding whether two values are equal.
+
+Thankfully, it happens to be the case that all MirReferenceMux values that we
+check in `checkMutableAllocPostconds` are concrete. Therefore, we can compare
+MirReferenceMux values by concretizing the symbolic information whenever
+necessary. The cmp*Concretely family of functions implements these concrete
+comparisons. More precisely:
+
+* The `cmpRefMuxConcretely` function checks that the FancyMuxTree in a
+ MirReferenceMux consists of exactly one leaf with a Pred that concretely
+ evaluates to truePred. (This must be the case if the FancyMuxTree is
+ concrete.) The function then takes the MirReference values from the leaf
+ of each FancyMuxTree and compares them using `cmpRefConcretely`.
+
+* The `cmpRefConcretely` function is very close to the OrdSkel instance for
+ MirReference, except that it concretizes SymBV values as necessary using
+ the `cmpSymBVConcretely` function.
+
+* We create a MirReferenceMuxConcrete newtype around MirReferenceMux, and
+ we give MirReferenceMuxConcrete an OrdF instance defined in terms of
+ `cmpRefMuxConcretely`. We then put MirReferenceMuxConcrete values into
+ the Set in step (1) of the plan above.
+
+If there is symbolic information at any point in this process, then a panic is
+thrown. If we ever add the ability to create symbolic MirReferenceMux values in
+a specification (e.g., via a MIR equivalent of the llvm_fresh_pointer command),
+then we will need to rethink this plan.
+-}
+
+computeReturnValue ::
+ Options {- ^ saw script debug and print options -} ->
+ MIRCrucibleContext {- ^ context of the crucible simulation -} ->
+ SharedContext {- ^ context for generating saw terms -} ->
+ MS.CrucibleMethodSpecIR MIR {- ^ method specification -} ->
+ Crucible.TypeRepr ret {- ^ representation of function return type -} ->
+ Maybe SetupValue {- ^ optional symbolic return value -} ->
+ OverrideMatcher MIR md (Crucible.RegValue Sym ret)
+ {- ^ concrete return value -}
+computeReturnValue opts cc sc spec ty mbVal =
+ case mbVal of
+ Nothing ->
+ case ty of
+ Crucible.UnitRepr -> return ()
+ _ -> fail_
+ Just val -> do
+ MIRVal shp val' <- resolveSetupValueMIR opts cc sc spec val
+ case W4.testEquality ty (shapeType shp) of
+ Just Refl -> pure val'
+ Nothing -> fail_
+ where
+ fail_ = failure (spec ^. MS.csLoc) (BadReturnSpecification (Some ty))
decodeMIRVal :: Mir.Collection -> Mir.Ty -> Crucible.AnyValue Sym -> Maybe MIRVal
decodeMIRVal col ty (Crucible.AnyValue repr rv)
@@ -150,17 +550,312 @@ enforceDisjointness cc loc ss =
, (_, Some q) <- ps
]
--- | @mir_points_to@ always creates a 'MirPointsTo' value with exactly one
--- referent on the right-hand side. As a result, this function should never
--- fail.
-firstPointsToReferent ::
- MonadFail m => [MS.SetupValue MIR] -> m (MS.SetupValue MIR)
-firstPointsToReferent referents =
- case referents of
- [referent] -> pure referent
- _ -> fail $
- "Unexpected mir_points_to statement with " ++ show (length referents) ++
- " referent(s)"
+-- | Perform an allocation as indicated by a 'mir_alloc'
+-- statement from the postcondition section.
+executeAllocation ::
+ Options ->
+ MIRCrucibleContext ->
+ (AllocIndex, Some MirAllocSpec) ->
+ OverrideMatcher MIR w ()
+executeAllocation opts cc (var, someAlloc@(Some alloc)) =
+ do liftIO $ printOutLn opts Debug $ unwords ["executeAllocation:", show var, show alloc]
+ globals <- OM (use overrideGlobals)
+ (ptr, globals') <- liftIO $ doAlloc cc globals someAlloc
+ OM (overrideGlobals .= globals')
+ assignVar cc (alloc^.maConditionMetadata) var ptr
+
+-- | Process a "points_to" statement from the postcondition section of
+-- the CrucibleSetup block. First we compute the value indicated by
+-- 'val', and then write it to the address indicated by 'ptr'.
+executePointsTo ::
+ Options ->
+ SharedContext ->
+ MIRCrucibleContext ->
+ CrucibleMethodSpecIR ->
+ MirPointsTo ->
+ OverrideMatcher MIR w ()
+executePointsTo _opts sc cc spec pt = do
+ env <- OM (use setupValueSub)
+ globals <- OM (use overrideGlobals)
+ sub <- OM (use termSub)
+ pt' <- liftIO $ instantiateMirPointsTo sc sub pt
+ globals' <- liftIO $ doPointsTo spec cc env globals pt'
+ OM (overrideGlobals .= globals')
+
+-- execute a pre/post condition
+executeCond ::
+ Options ->
+ SharedContext ->
+ MIRCrucibleContext ->
+ CrucibleMethodSpecIR ->
+ StateSpec ->
+ OverrideMatcher MIR RW ()
+executeCond opts sc cc cs ss =
+ do refreshTerms sc ss
+ F.traverse_ (executeAllocation opts cc) (Map.assocs (ss ^. MS.csAllocs))
+ checkMutableAllocPostconds opts sc cc cs
+ F.traverse_ (executePointsTo opts sc cc cs) (ss ^. MS.csPointsTos)
+ F.traverse_ (executeSetupCondition opts sc cc cs) (ss ^. MS.csConditions)
+
+-- | Process a "mir_equal" statement from the postcondition
+-- section of the CrucibleSetup block.
+executeEqual ::
+ Options ->
+ SharedContext ->
+ MIRCrucibleContext ->
+ CrucibleMethodSpecIR ->
+ MS.ConditionMetadata ->
+ SetupValue {- ^ first value to compare -} ->
+ SetupValue {- ^ second value to compare -} ->
+ OverrideMatcher MIR w ()
+executeEqual opts sc cc spec md v1 v2 =
+ do val1 <- resolveSetupValueMIR opts cc sc spec v1
+ val2 <- resolveSetupValueMIR opts cc sc spec v2
+ p <- liftIO (equalValsPred cc val1 val2)
+ addAssume p md
+
+-- | Process a "mir_postcond" statement from the postcondition
+-- section of the CrucibleSetup block.
+executePred ::
+ SharedContext ->
+ MIRCrucibleContext ->
+ MS.ConditionMetadata ->
+ TypedTerm {- ^ the term to assert as a postcondition -} ->
+ OverrideMatcher MIR w ()
+executePred sc cc md tt =
+ do s <- OM (use termSub)
+ t <- liftIO $ scInstantiateExt sc s (ttTerm tt)
+ p <- liftIO $ resolveBoolTerm (cc ^. mccSym) t
+ addAssume p md
+
+-- | Update the simulator state based on the postconditions from the
+-- procedure specification.
+executeSetupCondition ::
+ Options ->
+ SharedContext ->
+ MIRCrucibleContext ->
+ CrucibleMethodSpecIR ->
+ SetupCondition ->
+ OverrideMatcher MIR RW ()
+executeSetupCondition opts sc cc spec =
+ \case
+ MS.SetupCond_Equal md val1 val2 ->
+ executeEqual opts sc cc spec md val1 val2
+ MS.SetupCond_Pred md tm -> executePred sc cc md tm
+ MS.SetupCond_Ghost md var val -> executeGhost sc md var val
+
+handleSingleOverrideBranch :: forall rtp args ret.
+ Options {- ^ output/verbosity options -} ->
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
+ W4.ProgramLoc {- ^ Location of the call site for error reporting -} ->
+ IORef MetadataMap ->
+ Crucible.FnHandle args ret {- ^ the handle for this function -} ->
+ OverrideWithPreconditions MIR ->
+ Crucible.OverrideSim (SAWCruciblePersonality Sym) Sym MIR rtp args ret
+ (Crucible.RegValue Sym ret)
+handleSingleOverrideBranch opts sc cc call_loc mdMap h (OverrideWithPreconditions preconds cs st) =
+ mccWithBackend cc $ \bak -> do
+ let sym = backendGetSym bak
+ let fnName = cs ^. MS.csMethod
+ let retTy = Crucible.handleReturnType h
+
+ liftIO $ printOutLn opts Info $ unwords
+ [ "Found a single potential override for"
+ , show fnName
+ ]
+
+ -- First assert the override preconditions
+ liftIO $ forM_ preconds $ \(md,W4.LabeledPred p r) ->
+ do (ann,p') <- W4.annotateTerm sym p
+ let caller = unwords ["Override called from:", show (W4.plSourceLoc call_loc)]
+ let md' = md{ MS.conditionContext = MS.conditionContext md ++ caller }
+ modifyIORef mdMap (Map.insert ann md')
+ Crucible.addAssertion bak (Crucible.LabeledPred p' r)
+
+ g <- Crucible.readGlobals
+ res <- liftIO $ runOverrideMatcher sym g
+ (st^.setupValueSub)
+ (st^.termSub)
+ (st^.osFree)
+ (st^.osLocation)
+ (methodSpecHandler_poststate opts sc cc retTy cs)
+ case res of
+ Left (OF loc rsn) ->
+ -- TODO, better pretty printing for reasons
+ liftIO
+ $ Crucible.abortExecBecause
+ $ Crucible.AssertionFailure
+ $ Crucible.SimError loc
+ $ Crucible.AssertFailureSimError "assumed false" (show rsn)
+ Right (ret,st') ->
+ do liftIO $ forM_ (st'^.osAssumes) $ \(_md,asum) ->
+ Crucible.addAssumption bak
+ $ Crucible.GenericAssumption (st^.osLocation) "override postcondition" asum
+ Crucible.writeGlobals (st'^.overrideGlobals)
+ Crucible.overrideReturn' (Crucible.RegEntry retTy ret)
+
+handleOverrideBranches :: forall rtp args ret.
+ Options {- ^ output/verbosity options -} ->
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
+ W4.ProgramLoc {- ^ Location of the call site for error reporting -} ->
+ NE.NonEmpty (MS.CrucibleMethodSpecIR MIR)
+ {- ^ specification for current function override -} ->
+ Crucible.FnHandle args ret {- ^ the handle for this function -} ->
+ [OverrideWithPreconditions MIR] ->
+ ([OverrideWithPreconditions MIR],[OverrideWithPreconditions MIR],[OverrideWithPreconditions MIR]) ->
+ Crucible.OverrideSim (SAWCruciblePersonality Sym) Sym MIR rtp args ret
+ (Crucible.RegValue Sym ret)
+
+handleOverrideBranches opts sc cc call_loc css h branches (true, false, unknown) =
+ mccWithBackend cc $ \bak -> do
+ let sym = backendGetSym bak
+ let fnName = show $ NE.head css ^. MS.csMethod
+ Crucible.RegMap args <- Crucible.getOverrideArgs
+
+ -- Collapse the preconditions to a single predicate
+ branches' <- liftIO $ forM (true ++ unknown) $
+ \(OverrideWithPreconditions preconds cs st) ->
+ W4.andAllOf sym (folded . _2 . W4.labeledPred) preconds <&>
+ \precond -> (precond, cs, st)
+
+ -- Now use crucible's symbolic branching machinery to select between the branches.
+ -- Essentially, we are doing an n-way if statement on the precondition predicates
+ -- for each override, and selecting the first one whose preconditions hold.
+ --
+ -- Then, in the body of the branch, we run the poststate handler to update the
+ -- memory state, compute return values and compute postcondition predicates.
+ --
+ -- For each override branch that doesn't fail outright, we assume the relevant
+ -- postconditions, update the crucible global variable state, and return the
+ -- computed return value.
+ --
+ -- We add a final default branch that simply fails unless some previous override
+ -- branch has already succeeded.
+ liftIO $ printOutLn opts Info $ unwords
+ [ "Branching on"
+ , show (length branches')
+ , "override variants of"
+ , fnName
+ , "..."
+ ]
+ let retTy = Crucible.handleReturnType h
+ res <- Crucible.regValue <$> Crucible.callOverride h
+ (Crucible.mkOverride' "overrideBranches" retTy
+ (Crucible.symbolicBranches Crucible.emptyRegMap $
+ [ ( precond
+ , do g <- Crucible.readGlobals
+ res <- liftIO $ runOverrideMatcher sym g
+ (st^.setupValueSub)
+ (st^.termSub)
+ (st^.osFree)
+ (st^.osLocation)
+ (methodSpecHandler_poststate opts sc cc retTy cs)
+ case res of
+ Left (OF loc rsn) ->
+ -- TODO, better pretty printing for reasons
+ liftIO
+ $ Crucible.abortExecBecause
+ $ Crucible.AssertionFailure
+ $ Crucible.SimError loc
+ $ Crucible.AssertFailureSimError "assumed false" (show rsn)
+ Right (ret,st') ->
+ do liftIO $ forM_ (st'^.osAssumes) $ \(_md,asum) ->
+ Crucible.addAssumption bak
+ $ Crucible.GenericAssumption (st^.osLocation) "override postcondition" asum
+ Crucible.writeGlobals (st'^.overrideGlobals)
+ Crucible.overrideReturn' (Crucible.RegEntry retTy ret)
+ , Just (W4.plSourceLoc (cs ^. MS.csLoc))
+ )
+ | (precond, cs, st) <- branches'
+ ] ++
+ [ let e prettyArgs symFalse unsat = show $ PP.vcat $ concat
+ [ [ PP.pretty $
+ "No override specification applies for " ++ fnName ++ "."
+ ]
+ , [ "Arguments:"
+ , bullets '-' prettyArgs
+ ]
+ , if | not (null false) ->
+ [ PP.vcat
+ [ PP.pretty (unwords
+ [ "The following overrides had some preconditions"
+ , "that failed concretely:"
+ ])
+ , bullets '-' (map ppConcreteFailure false)
+ ]
+ ]
+ -- See comment on ppSymbolicFailure: this needs more
+ -- examination to see if it's useful.
+ -- - | not (null symFalse) ->
+ -- [ PP.text (unwords
+ -- [ "The following overrides had some preconditions "
+ -- , "that failed symbolically:"
+ -- ]) PP.<$$> bullets '-' (map ppSymbolicFailure symFalse)
+ -- ]
+
+ -- Note that we only print these in case no override had
+ -- individually (concretely or symbolically) false
+ -- preconditions.
+ | not (null unsat) && null false && null symFalse ->
+ [ PP.vcat
+ [ PP.pretty (unwords
+ [ "The conjunction of these overrides' preconditions"
+ , "was unsatisfiable, meaning your override can never"
+ , "apply. You probably have unintentionally specified"
+ , "mutually exclusive/inconsistent preconditions."
+ ])
+ , bullets '-' (unsat ^.. each . owpMethodSpec . to MS.ppMethodSpec)
+ ]
+ ]
+ | null false && null symFalse ->
+ [ PP.pretty (unwords
+ [ "No overrides had any single concretely or"
+ , "symbolically failing preconditions."
+ ])
+ ]
+ | otherwise -> []
+ , if | simVerbose opts < 3 ->
+ [ PP.pretty $ unwords
+ [ "Run SAW with --sim-verbose=3 to see a description"
+ , "of each override."
+ ]
+ ]
+ | otherwise ->
+ [ PP.vcat
+ [ "Here are the descriptions of each override:"
+ , bullets '-'
+ (branches ^.. each . owpMethodSpec . to MS.ppMethodSpec)
+ ]
+ ]
+ ]
+ in ( W4.truePred sym
+ , liftIO $ do
+ -- Now that we're failing, do the additional work of figuring out
+ -- if any overrides had symbolically false preconditions
+ symFalse <- catMaybes <$> (forM unknown $ \owp ->
+ findFalsePreconditions bak owp <&>
+ \case
+ [] -> Nothing
+ ps -> Just (owp, ps))
+
+ prettyArgs <-
+ ppArgs sym cc (NE.head css) (Crucible.RegMap args)
+
+ unsat <-
+ filterM
+ (unsatPreconditions bak (owpPreconditions . each . _2 . W4.labeledPred))
+ branches
+
+ Crucible.addFailedAssertion bak
+ (Crucible.GenericSimError (e prettyArgs symFalse unsat))
+ , Just (W4.plSourceLoc call_loc)
+ )
+ ]))
+ (Crucible.RegMap args)
+ liftIO $ printOutLn opts Info $ unwords ["Applied override!", fnName]
+ return res
instantiateExtResolveSAWPred ::
SharedContext ->
@@ -171,6 +866,17 @@ instantiateExtResolveSAWPred sc cc cond = do
sub <- OM (use termSub)
liftIO $ resolveSAWPred cc =<< scInstantiateExt sc sub cond
+-- | Map the given substitution over all 'SetupTerm' constructors in
+-- the given 'MirPointsTo' value.
+instantiateMirPointsTo ::
+ SharedContext ->
+ Map VarIndex Term ->
+ MirPointsTo ->
+ IO MirPointsTo
+instantiateMirPointsTo sc s (MirPointsTo md reference referents) =
+ MirPointsTo md <$> instantiateSetupValue sc s reference
+ <*> traverse (instantiateSetupValue sc s) referents
+
-- | Map the given substitution over all 'SetupTerm' constructors in
-- the given 'SetupValue'.
instantiateSetupValue ::
@@ -219,12 +925,12 @@ learnCond ::
learnCond opts sc cc cs prepost ss =
do let loc = cs ^. MS.csLoc
matchPointsTos opts sc cc cs prepost (ss ^. MS.csPointsTos)
- traverse_ (learnSetupCondition opts sc cc cs prepost) (ss ^. MS.csConditions)
+ F.traverse_ (learnSetupCondition opts sc cc cs prepost) (ss ^. MS.csConditions)
assertTermEqualities sc cc
enforceDisjointness cc loc ss
enforceCompleteSubstitution loc ss
--- | Process a "crucible_equal" statement from the precondition
+-- | Process a "mir_equal" statement from the precondition
-- section of the CrucibleSetup block.
learnEqual ::
Options ->
@@ -274,12 +980,14 @@ learnPointsTo opts sc cc spec prepost (MirPointsTo md reference referents) =
]
let innerShp = tyToShapeEq col referenceInnerMirTy referenceInnerTpr
referentVal <- firstPointsToReferent referents
- v <- liftIO $ Mir.readMirRefIO bak globals Mir.mirIntrinsicTypes
+ v <- liftIO $ Mir.readMirRefIO bak globals iTypes
referenceInnerTpr referenceVal
matchArg opts sc cc spec prepost md (MIRVal innerShp v)
referenceInnerMirTy referentVal
+ where
+ iTypes = cc ^. mccIntrinsicTypes
--- | Process a "crucible_precond" statement from the precondition
+-- | Process a "mir_precond" statement from the precondition
-- section of the CrucibleSetup block.
learnPred ::
SharedContext ->
@@ -305,9 +1013,11 @@ learnSetupCondition ::
MS.PrePost ->
SetupCondition ->
OverrideMatcher MIR w ()
-learnSetupCondition opts sc cc spec prepost (MS.SetupCond_Equal md val1 val2) = learnEqual opts sc cc spec md prepost val1 val2
-learnSetupCondition _opts sc cc _ prepost (MS.SetupCond_Pred md tm) = learnPred sc cc md prepost (ttTerm tm)
-learnSetupCondition _opts _ _ _ _ (MS.SetupCond_Ghost empty _ _ _) = absurd empty
+learnSetupCondition opts sc cc spec prepost cond =
+ case cond of
+ MS.SetupCond_Equal md val1 val2 -> learnEqual opts sc cc spec md prepost val1 val2
+ MS.SetupCond_Pred md tm -> learnPred sc cc md prepost (ttTerm tm)
+ MS.SetupCond_Ghost md var val -> learnGhost sc md prepost var val
-- | Match the value of a function argument with a symbolic 'SetupValue'.
matchArg ::
@@ -328,7 +1038,7 @@ matchArg opts sc cc cs prepost md actual expectedTy expected@(MS.SetupTerm expec
= do sym <- Ov.getSymInterface
failMsg <- mkStructuralMismatch opts cc sc cs actual expected expectedTy
realTerm <- valueToSC sym md failMsg tval actual
- matchTerm sc cc md prepost realTerm (ttTerm expectedTT)
+ matchTerm sc md prepost realTerm (ttTerm expectedTT)
matchArg opts sc cc cs prepost md actual expectedTy expected =
mccWithBackend cc $ \bak -> do
@@ -465,6 +1175,7 @@ matchArg opts sc cc cs prepost md actual expectedTy expected =
where
colState = cc ^. mccRustModule . Mir.rmCS
col = colState ^. Mir.collection
+ iTypes = cc ^. mccIntrinsicTypes
tyenv = MS.csAllocations cs
nameEnv = MS.csTypeNames cs
@@ -473,9 +1184,6 @@ matchArg opts sc cc cs prepost md actual expectedTy expected =
mkStructuralMismatch opts cc sc cs actual expected expectedTy
notEq = notEqual prepost opts loc cc sc cs expected actual
- iTypes :: Crucible.IntrinsicTypes Sym
- iTypes = Mir.mirIntrinsicTypes
-
-- | For each points-to statement read the memory value through the
-- given pointer (lhs) and match the value against the given pattern
-- (rhs). Statements are processed in dependency order: a points-to
@@ -551,32 +1259,159 @@ matchPointsTos opts sc cc spec prepost = go False []
setupSlice (MirSetupSliceRange arr _start _end) =
setupVars arr
-matchTerm ::
- SharedContext {- ^ context for constructing SAW terms -} ->
- MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
- MS.ConditionMetadata ->
- MS.PrePost ->
- Term {- ^ exported concrete term -} ->
- Term {- ^ expected specification term -} ->
- OverrideMatcher MIR md ()
+-- | This function is responsible for implementing the \"override\" behavior
+-- of method specifications. The main work done in this function to manage
+-- the process of selecting between several possible different override
+-- specifications that could apply. We want a proof to succeed if _any_
+-- choice of method spec allows the proof to go through, which is a slightly
+-- awkward thing to fit into the symbolic simulation framework.
+--
+-- The main work of determining the preconditions, postconditions, memory
+-- updates and return value for a single specification is done by
+-- the @methodSpecHandler_prestate@ and @methodSpecHandler_poststate@ functions.
+--
+-- In a first phase, we attempt to apply the precondition portion of each of
+-- the given method specifications. Each of them that might apply generate
+-- a substitution for the setup variables and a collection of preconditions
+-- that guard the specification. We use these preconditions to compute
+-- a multiway symbolic branch, one for each override which might apply.
+--
+-- In the body of each of the individual branches, we compute the postcondition
+-- actions of the corresponding method specification. This will update memory
+-- and compute function return values, in addition to assuming postcondition
+-- predicates.
+methodSpecHandler ::
+ forall rtp args ret.
+ (?singleOverrideSpecialCase :: Bool) =>
+ Options {- ^ output/verbosity options -} ->
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
+ IORef MetadataMap ->
+ NE.NonEmpty (MS.CrucibleMethodSpecIR MIR)
+ {- ^ specification for current function override -} ->
+ Crucible.FnHandle args ret {- ^ the handle for this function -} ->
+ Crucible.OverrideSim (SAWCruciblePersonality Sym) Sym MIR rtp args ret
+ (Crucible.RegValue Sym ret)
+methodSpecHandler opts sc cc mdMap css h =
+ mccWithBackend cc $ \bak -> do
+ let sym = backendGetSym bak
+ let fnName = NE.head css ^. MS.csMethod
+ call_loc <- liftIO $ W4.getCurrentProgramLoc sym
+ liftIO $ printOutLn opts Info $ unwords
+ [ "Matching"
+ , show (length css)
+ , "overrides of "
+ , show fnName
+ , "..."
+ ]
+ Crucible.RegMap args <- Crucible.getOverrideArgs
+
+ -- First, run the precondition matcher phase. Collect together a list of the results.
+ -- For each override, this will either be an error message, or a matcher state and
+ -- a method spec.
+ prestates <-
+ do g0 <- Crucible.readGlobals
+ forM css $ \cs -> liftIO $
+ let initialFree = Set.fromList (map (ecVarIndex . tecExt)
+ (view (MS.csPreState . MS.csFreshVars) cs))
+ in runOverrideMatcher sym g0 Map.empty Map.empty initialFree (view MS.csLoc cs)
+ (do methodSpecHandler_prestate opts sc cc args cs
+ return cs)
+
+ -- Print a failure message if all overrides failed to match. Otherwise, collect
+ -- all the override states that might apply, and compute the conjunction of all
+ -- the preconditions. We'll use these to perform symbolic branches between the
+ -- various overrides.
+ branches <-
+ let prettyError methodSpec failureReason = do
+ prettyArgs <- liftIO $ ppArgs sym cc methodSpec (Crucible.RegMap args)
+ pure $
+ PP.vcat
+ [ MS.ppMethodSpec methodSpec
+ , "Arguments:"
+ , bullets '-' prettyArgs
+ , ppOverrideFailure failureReason
+ ]
+ in
+ case partitionEithers (F.toList prestates) of
+ (errs, []) -> do
+ msgs <-
+ mapM (\(cs, err) ->
+ ("*" PP.<>) . PP.indent 2 <$> prettyError cs err)
+ (zip (F.toList css) errs)
+ fail $ show $
+ PP.vcat ["All overrides failed during structural matching:", PP.vcat msgs]
+ (_, ss) -> liftIO $
+ forM ss $ \(cs,st) ->
+ return (OverrideWithPreconditions (st^.osAsserts) cs st)
+
+ -- Now we do a second phase of simple compatibility checking: we check to see
+ -- if any of the preconditions of the various overrides are concretely false.
+ -- If so, there's no use in branching on them with @symbolicBranches@.
+ (true, false, unknown) <- liftIO $ partitionOWPsConcrete sym branches
+
+ -- Check if there is only a single override branch that might apply at this
+ -- point. If so, commit to it and handle that case specially. If there is
+ -- more than one (or zero) branches that might apply, go to the general case.
+ case true ++ unknown of
+ [singleBranch] | ?singleOverrideSpecialCase ->
+ handleSingleOverrideBranch opts sc cc call_loc mdMap h singleBranch
+ _ -> handleOverrideBranches opts sc cc call_loc css h branches (true, false, unknown)
+
+-- | Use a method spec to override the behavior of a function.
+-- This function computes the post-state portion of the override,
+-- which involves writing values into memory, computing the return value,
+-- and computing postcondition predicates.
+methodSpecHandler_poststate ::
+ forall ret.
+ Options {- ^ output/verbosity options -} ->
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
+ Crucible.TypeRepr ret {- ^ type representation of function return value -} ->
+ CrucibleMethodSpecIR {- ^ specification for current function override -} ->
+ OverrideMatcher MIR RW (Crucible.RegValue Sym ret)
+methodSpecHandler_poststate opts sc cc retTy cs =
+ do executeCond opts sc cc cs (cs ^. MS.csPostState)
+ computeReturnValue opts cc sc cs retTy (cs ^. MS.csRetValue)
+
+-- | Use a method spec to override the behavior of a function.
+-- This function computes the pre-state portion of the override,
+-- which involves reading values from arguments and memory and computing
+-- substitutions for the setup value variables, and computing precondition
+-- predicates.
+methodSpecHandler_prestate ::
+ forall ctx w.
+ Options {- ^ output/verbosity options -} ->
+ SharedContext {- ^ context for constructing SAW terms -} ->
+ MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
+ Ctx.Assignment (Crucible.RegEntry Sym) ctx
+ {- ^ the arguments to the function -} ->
+ CrucibleMethodSpecIR {- ^ specification for current function override -} ->
+ OverrideMatcher MIR w ()
+methodSpecHandler_prestate opts sc cc args cs =
+ do let expectedArgTypes = Map.elems (cs ^. MS.csArgBindings)
+ let col = cc ^. mccRustModule ^. Mir.rmCS ^. Mir.collection
+ let aux ::
+ (Mir.Ty, SetupValue) -> Crucible.AnyValue Sym ->
+ IO (MIRVal, Mir.Ty, SetupValue)
+ aux (argTy, setupVal) val =
+ case decodeMIRVal col argTy val of
+ Just val' -> return (val', argTy, setupVal)
+ Nothing -> fail "unexpected type"
-matchTerm _ _ _ _ real expect | real == expect = return ()
-matchTerm sc cc md prepost real expect =
- do let loc = MS.conditionLoc md
- free <- OM (use osFree)
- case unwrapTermF expect of
- FTermF (ExtCns ec)
- | Set.member (ecVarIndex ec) free ->
- do assignTerm sc cc md prepost (ecVarIndex ec) real
-
- _ ->
- do t <- liftIO $ scEq sc real expect
- let msg = unlines $
- [ "Literal equality " ++ MS.stateCond prepost
--- , "Expected term: " ++ prettyTerm expect
--- , "Actual term: " ++ prettyTerm real
- ]
- addTermEq t md $ Crucible.SimError loc $ Crucible.AssertFailureSimError msg ""
+ -- todo: fail if list lengths mismatch
+ xs <- liftIO (zipWithM aux expectedArgTypes (assignmentToList args))
+
+ let md = MS.ConditionMetadata
+ { MS.conditionLoc = cs ^. MS.csLoc
+ , MS.conditionTags = mempty
+ , MS.conditionType = "formal argument matching"
+ , MS.conditionContext = ""
+ }
+
+ sequence_ [ matchArg opts sc cc cs MS.PreState md x y z | (x, y, z) <- xs]
+
+ learnCond opts sc cc cs MS.PreState (cs ^. MS.csPreState)
-- | Try to translate the spec\'s 'SetupValue' into a 'MIRVal', pretty-print
-- the 'MIRVal'.
@@ -589,10 +1424,11 @@ mkStructuralMismatch ::
SetupValue {- ^ the value from the spec -} ->
Mir.Ty {- ^ the expected type -} ->
OverrideMatcher MIR w (OverrideFailureReason MIR)
-mkStructuralMismatch _opts cc _sc spec (MIRVal shp _) setupval mty = do
+mkStructuralMismatch _opts cc _sc spec mirVal setupval mty = do
+ let sym = cc^.mccSym
setupTy <- typeOfSetupValueMIR cc spec setupval
pure $ StructuralMismatch
- (PP.pretty shp) -- TODO: Print the entire value, not just the type shape
+ (ppMIRVal sym mirVal)
(MS.ppSetupValue setupval)
(Just setupTy)
mty
@@ -623,6 +1459,22 @@ notEqual cond opts loc cc sc spec expected actual = do
]
pure $ Crucible.SimError loc $ Crucible.AssertFailureSimError msg ""
+-- | Pretty-print the arguments passed to an override
+ppArgs ::
+ forall args ann.
+ Sym ->
+ MIRCrucibleContext {- ^ context for interacting with Crucible -} ->
+ MS.CrucibleMethodSpecIR MIR {- ^ specification for current function override -} ->
+ Crucible.RegMap Sym args {- ^ arguments from the simulator -} ->
+ IO [PP.Doc ann]
+ppArgs sym cc cs (Crucible.RegMap args) = do
+ let expectedArgTypes = map fst (Map.elems (cs ^. MS.csArgBindings))
+ let col = cc ^. mccRustModule ^. Mir.rmCS ^. Mir.collection
+ let aux memTy (Crucible.AnyValue tyrep val) =
+ MIRVal (tyToShapeEq col memTy tyrep) val
+ let vals = zipWith aux expectedArgTypes (assignmentToList args)
+ pure $ map (ppMIRVal sym) vals
+
-- | Resolve a 'SetupValue' into a 'MIRVal' and pretty-print it
ppSetupValueAsMIRVal ::
Options {- ^ output/verbosity options -} ->
diff --git a/src/SAWScript/Crucible/MIR/ResolveSetupValue.hs b/src/SAWScript/Crucible/MIR/ResolveSetupValue.hs
index bff2122922..4727199da3 100644
--- a/src/SAWScript/Crucible/MIR/ResolveSetupValue.hs
+++ b/src/SAWScript/Crucible/MIR/ResolveSetupValue.hs
@@ -23,6 +23,9 @@ module SAWScript.Crucible.MIR.ResolveSetupValue
, equalValsPred
, checkCompatibleTys
, readMaybeType
+ , doAlloc
+ , doPointsTo
+ , firstPointsToReferent
, mirAdtToTy
, findDefId
, findDefIdEither
@@ -63,7 +66,8 @@ import qualified Cryptol.Eval.Type as Cryptol (TValue(..), tValTy, evalValType)
import qualified Cryptol.TypeCheck.AST as Cryptol (Type, Schema(..))
import qualified Cryptol.Utils.PP as Cryptol (pp)
import Lang.Crucible.Backend (IsSymInterface)
-import Lang.Crucible.Simulator (AnyValue(..), GlobalVar(..), RegValue, RegValue'(..))
+import Lang.Crucible.Simulator
+ ( AnyValue(..), GlobalVar(..), RegValue, RegValue'(..), SymGlobalState )
import Lang.Crucible.Types (MaybeType, TypeRepr(..))
import qualified Mir.DefId as Mir
import qualified Mir.FancyMuxTree as Mir
@@ -418,7 +422,7 @@ resolveSetupVal mcc env tyenv nameEnv val =
where
cs = mcc ^. mccRustModule . Mir.rmCS
col = cs ^. Mir.collection
- iTypes = Mir.mirIntrinsicTypes
+ iTypes = mcc ^. mccIntrinsicTypes
usizeBvLit :: Sym -> Int -> IO (W4.SymBV Sym Mir.SizeBits)
usizeBvLit sym = W4.bvLit sym W4.knownNat . BV.mkBV W4.knownNat . toInteger
@@ -952,6 +956,94 @@ readPartExprMaybe _sym (W4.PE p v)
| Just True <- W4.asConstantPred p = Just v
| otherwise = Nothing
+-- | Allocate memory for each 'mir_alloc' or 'mir_alloc_mut'.
+doAlloc ::
+ MIRCrucibleContext
+ -> SymGlobalState Sym
+ -> Some MirAllocSpec
+ -> IO (Some (MirPointer Sym), SymGlobalState Sym)
+doAlloc cc globals (Some ma) =
+ mccWithBackend cc $ \bak ->
+ do let col = cc ^. mccRustModule ^. Mir.rmCS ^. Mir.collection
+ let halloc = cc^.mccHandleAllocator
+ let sym = backendGetSym bak
+ let iTypes = cc^.mccIntrinsicTypes
+ Some tpr <- pure $ Mir.tyToRepr col (ma^.maMirType)
+
+ -- Create an uninitialized `MirVector_PartialVector` of length 1 and
+ -- return a pointer to its element.
+ ref <- Mir.newMirRefIO sym halloc (Mir.MirVectorRepr tpr)
+
+ one <- W4.bvLit sym W4.knownRepr $ BV.mkBV W4.knownRepr 1
+ vec <- Mir.mirVector_uninitIO bak one
+ globals' <- Mir.writeMirRefIO bak globals iTypes ref vec
+
+ zero <- W4.bvLit sym W4.knownRepr $ BV.mkBV W4.knownRepr 0
+ ptr <- Mir.subindexMirRefIO bak iTypes tpr ref zero
+ let mirPtr = Some MirPointer
+ { _mpType = tpr
+ , _mpMutbl = ma^.maMutbl
+ , _mpMirType = ma^.maMirType
+ , _mpRef = ptr
+ }
+
+ pure (mirPtr, globals')
+
+doPointsTo ::
+ MS.CrucibleMethodSpecIR MIR
+ -> MIRCrucibleContext
+ -> Map MS.AllocIndex (Some (MirPointer Sym))
+ -> SymGlobalState Sym
+ -> MirPointsTo
+ -> IO (SymGlobalState Sym)
+doPointsTo mspec cc env globals (MirPointsTo _ reference referents) =
+ mccWithBackend cc $ \bak -> do
+ MIRVal referenceShp referenceVal <-
+ resolveSetupVal cc env tyenv nameEnv reference
+ -- By the time we reach here, we have already checked (in mir_points_to)
+ -- that we are in fact dealing with a reference value, so the call to
+ -- `testRefShape` below should always succeed.
+ IsRefShape _ _ _ referenceInnerTy <-
+ case testRefShape referenceShp of
+ Just irs -> pure irs
+ Nothing ->
+ panic "doPointsTo"
+ [ "Unexpected non-reference type:"
+ , show $ PP.pretty $ shapeMirTy referenceShp
+ ]
+ referent <- firstPointsToReferent referents
+ MIRVal referentShp referentVal <-
+ resolveSetupVal cc env tyenv nameEnv referent
+ -- By the time we reach here, we have already checked (in mir_points_to)
+ -- that the type of the reference is compatible with the right-hand side
+ -- value, so the equality check below should never fail.
+ Refl <-
+ case W4.testEquality referenceInnerTy (shapeType referentShp) of
+ Just r -> pure r
+ Nothing ->
+ panic "doPointsTo"
+ [ "Unexpected type mismatch between reference and referent"
+ , "Reference type: " ++ show referenceInnerTy
+ , "Referent type: " ++ show (shapeType referentShp)
+ ]
+ Mir.writeMirRefIO bak globals iTypes referenceVal referentVal
+ where
+ iTypes = cc ^. mccIntrinsicTypes
+ tyenv = MS.csAllocations mspec
+ nameEnv = mspec ^. MS.csPreState . MS.csVarTypeNames
+
+-- | @mir_points_to@ always creates a 'MirPointsTo' value with exactly one
+-- referent on the right-hand side. As a result, this function should never
+-- fail.
+firstPointsToReferent ::
+ MonadFail m => [MS.SetupValue MIR] -> m (MS.SetupValue MIR)
+firstPointsToReferent referents =
+ case referents of
+ [referent] -> pure referent
+ _ -> fail $
+ "Unexpected mir_points_to statement with " ++ show (length referents) ++
+ " referent(s)"
+
-- | Construct an 'Mir.TyAdt' from an 'Mir.Adt'.
mirAdtToTy :: Mir.Adt -> Mir.Ty
mirAdtToTy adt =
diff --git a/src/SAWScript/Crucible/MIR/Setup/Value.hs b/src/SAWScript/Crucible/MIR/Setup/Value.hs
index c3c2857345..bbdfbd85a9 100644
--- a/src/SAWScript/Crucible/MIR/Setup/Value.hs
+++ b/src/SAWScript/Crucible/MIR/Setup/Value.hs
@@ -34,6 +34,7 @@ module SAWScript.Crucible.MIR.Setup.Value
-- * @MirAllocSpec@
, MirAllocSpec(..)
+ , maConditionMetadata
, maType
, maMutbl
, maMirType
@@ -80,8 +81,6 @@ type instance MS.XSetupCast MIR = Void
type instance MS.XSetupUnion MIR = Void
type instance MS.XSetupGlobalInitializer MIR = ()
-type instance MS.XGhostState MIR = Void
-
type instance MS.TypeName MIR = Text
type instance MS.ExtType MIR = M.Ty
@@ -122,7 +121,8 @@ data MirPointsTo = MirPointsTo MS.ConditionMetadata (MS.SetupValue MIR) [MS.Setu
deriving (Show)
data MirAllocSpec tp = MirAllocSpec
- { _maType :: TypeRepr tp
+ { _maConditionMetadata :: MS.ConditionMetadata
+ , _maType :: TypeRepr tp
, _maMutbl :: M.Mutability
, _maMirType :: M.Ty
, _maLen :: Int
diff --git a/src/SAWScript/HeapsterBuiltins.hs b/src/SAWScript/HeapsterBuiltins.hs
index 252b70c0dc..491b4c75e4 100644
--- a/src/SAWScript/HeapsterBuiltins.hs
+++ b/src/SAWScript/HeapsterBuiltins.hs
@@ -75,7 +75,7 @@ import qualified Control.Monad.Fail as Fail
import System.Directory
import qualified Data.ByteString.Lazy as BL
import qualified Data.ByteString.Lazy.UTF8 as BL
-import GHC.TypeLits
+import GHC.TypeLits (KnownNat)
import Data.Text (Text)
import Data.Binding.Hobbits hiding (sym)
@@ -645,7 +645,7 @@ heapster_define_reachability_perm _bic _opts henv
_ -> Fail.fail "Incorrect type for last argument of reachability perm"
let args_ctx = appendParsedCtx pre_args_ctx last_args_ctx
let args = parsedCtxCtx args_ctx
- trans_tp <- liftIO $
+ trans_tp <- liftIO $
translateCompleteTypeInCtx sc env args $
nus (cruCtxProxies args) $ const $ ValuePermRepr tp
trans_tp_ident <- parseAndInsDef henv nm trans_tp trans_tp_str
@@ -1054,7 +1054,7 @@ heapster_translate_rust_type _bic _opts henv perms_string =
Some3FunPerm fun_perm <-
parseSome3FunPermFromRust env w64 perms_string
liftIO $ putStrLn $ permPrettyString emptyPPInfo fun_perm
-
+
-- | Create a new SAW core primitive named @nm@ with type @tp@ in the module
-- associated with the supplied Heapster environment, and return its identifier
insPrimitive :: HeapsterEnv -> String -> Term -> TopLevel Ident
diff --git a/src/SAWScript/Interpreter.hs b/src/SAWScript/Interpreter.hs
index 619605a321..34a021d769 100644
--- a/src/SAWScript/Interpreter.hs
+++ b/src/SAWScript/Interpreter.hs
@@ -3605,16 +3605,21 @@ primitives = Map.fromList
]
-- Ghost state support
- , prim "llvm_declare_ghost_state"
+ , prim "declare_ghost_state"
"String -> TopLevel Ghost"
- (pureVal llvm_declare_ghost_state)
+ (pureVal declare_ghost_state)
Current
[ "Allocates a unique ghost variable." ]
+ , prim "llvm_declare_ghost_state"
+ "String -> TopLevel Ghost"
+ (pureVal declare_ghost_state)
+ Current
+ [ "Legacy alternative name for `declare_ghost_state`." ]
, prim "crucible_declare_ghost_state"
"String -> TopLevel Ghost"
- (pureVal llvm_declare_ghost_state)
+ (pureVal declare_ghost_state)
Current
- [ "Legacy alternative name for `llvm_declare_ghost_state`." ]
+ [ "Legacy alternative name for `declare_ghost_state`." ]
, prim "llvm_ghost_value"
"Ghost -> Term -> LLVMSetup ()"
@@ -3628,6 +3633,20 @@ primitives = Map.fromList
Current
[ "Legacy alternative name for `llvm_ghost_value`."]
+ , prim "jvm_ghost_value"
+ "Ghost -> Term -> JVMSetup ()"
+ (pureVal jvm_ghost_value)
+ Current
+ [ "Specifies the value of a ghost variable. This can be used"
+ , "in the pre- and post- conditions of a setup block."]
+
+ , prim "mir_ghost_value"
+ "Ghost -> Term -> MIRSetup ()"
+ (pureVal mir_ghost_value)
+ Current
+ [ "Specifies the value of a ghost variable. This can be used"
+ , "in the pre- and post- conditions of a setup block."]
+
, prim "llvm_spec_solvers" "LLVMSpec -> [String]"
(\_ _ -> toValue llvm_spec_solvers)
Current
@@ -3938,6 +3957,15 @@ primitives = Map.fromList
, "be found in the MIRModule, this will raise an error."
]
+ , prim "mir_fresh_cryptol_var" "String -> Type -> MIRSetup Term"
+ (pureVal mir_fresh_cryptol_var)
+ Experimental
+ [ "Create a fresh symbolic variable of the given Cryptol type for use"
+ , "within a MIR specification. The given name is used only for"
+ , "pretty-printing. Unlike 'mir_fresh_var', this can be used when"
+ , "there isn't an appropriate MIR type, such as the Cryptol Array type."
+ ]
+
, prim "mir_fresh_expanded_value" "String -> MIRType -> MIRSetup MIRValue"
(pureVal mir_fresh_expanded_value)
Experimental
@@ -4046,6 +4074,14 @@ primitives = Map.fromList
, "values as elements."
]
+ , prim "mir_unsafe_assume_spec"
+ "MIRModule -> String -> MIRSetup () -> TopLevel MIRSpec"
+ (pureVal mir_unsafe_assume_spec)
+ Experimental
+ [ "Return a MIRSpec corresponding to a MIRSetup block, as would be"
+ , "returned by mir_verify but without performing any verification."
+ ]
+
, prim "mir_verify"
"MIRModule -> String -> [MIRSpec] -> Bool -> MIRSetup () -> ProofScript () -> TopLevel MIRSpec"
(pureVal mir_verify)
diff --git a/src/SAWScript/Proof.hs b/src/SAWScript/Proof.hs
index eb98ba95b2..f75cf0b0db 100644
--- a/src/SAWScript/Proof.hs
+++ b/src/SAWScript/Proof.hs
@@ -129,8 +129,11 @@ module SAWScript.Proof
, predicateToSATQuery
) where
+import Control.Monad (foldM, forM_, unless)
import qualified Control.Monad.Fail as F
-import Control.Monad.Except
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Except (ExceptT, MonadError(..), runExceptT)
+import Control.Monad.Trans.Class (MonadTrans(..))
import qualified Data.Foldable as Fold
import Data.List
import Data.Maybe (fromMaybe)
diff --git a/src/SAWScript/Prover/Exporter.hs b/src/SAWScript/Prover/Exporter.hs
index 39d56f3455..216836c01a 100644
--- a/src/SAWScript/Prover/Exporter.hs
+++ b/src/SAWScript/Prover/Exporter.hs
@@ -1,3 +1,4 @@
+{-# Language CPP #-}
{-# Language GADTs #-}
{-# Language ImplicitParams #-}
{-# Language NamedFieldPuns #-}
@@ -299,8 +300,12 @@ write_smtlib2_w4 f (TypedTerm schema t) = do
writeSMTLib2 :: FilePath -> SATQuery -> TopLevel ()
writeSMTLib2 f satq = getSharedContext >>= \sc -> io $
do (_, _, l) <- SBV.sbvSATQuery sc mempty satq
+#if MIN_VERSION_sbv(10,0,0)
+ txt <- SBV.generateSMTBenchmarkSat l
+#else
let isSat = True -- l is encoded as an existential formula
txt <- SBV.generateSMTBenchmark isSat l
+#endif
writeFile f txt
-- | Write a SAT query an SMT-Lib version 2 file.
diff --git a/src/SAWScript/Prover/MRSolver/Monad.hs b/src/SAWScript/Prover/MRSolver/Monad.hs
index f7b4663444..72cc2a0aab 100644
--- a/src/SAWScript/Prover/MRSolver/Monad.hs
+++ b/src/SAWScript/Prover/MRSolver/Monad.hs
@@ -27,10 +27,13 @@ module SAWScript.Prover.MRSolver.Monad where
import Data.List (find, findIndex, foldl')
import qualified Data.Text as T
import System.IO (hPutStrLn, stderr)
-import Control.Monad.Reader
-import Control.Monad.State
-import Control.Monad.Except
+import Control.Monad (MonadPlus(..), foldM)
import Control.Monad.Catch (MonadThrow, MonadCatch)
+import Control.Monad.Except (MonadError(..), ExceptT, runExceptT)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
+import Control.Monad.State (MonadState(..), StateT(..), modify)
+import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Monad.Trans.Maybe
import GHC.Generics
@@ -451,7 +454,7 @@ runMRM sc env timeout askSMT rs m =
-- | Run an 'MRM' computation and return a result or an error, discarding the
-- final state
-evalMRM ::
+evalMRM ::
SharedContext ->
MREnv {- ^ The Mr Solver environment -} ->
Maybe Integer {- ^ Timeout in milliseconds for each SMT call -} ->
@@ -465,7 +468,7 @@ evalMRM sc env timeout askSMT rs =
-- | Run an 'MRM' computation and return a final state or an error, discarding
-- the result
-execMRM ::
+execMRM ::
SharedContext ->
MREnv {- ^ The Mr Solver environment -} ->
Maybe Integer {- ^ Timeout in milliseconds for each SMT call -} ->
diff --git a/src/SAWScript/Prover/MRSolver/SMT.hs b/src/SAWScript/Prover/MRSolver/SMT.hs
index 5856d252d3..e02ddbfd69 100644
--- a/src/SAWScript/Prover/MRSolver/SMT.hs
+++ b/src/SAWScript/Prover/MRSolver/SMT.hs
@@ -24,8 +24,10 @@ module SAWScript.Prover.MRSolver.SMT where
import qualified Data.Vector as V
import Numeric.Natural (Natural)
-import Control.Monad.Except
+import Control.Monad (MonadPlus(..), (<=<), join, when, zipWithM)
import Control.Monad.Catch (throwM, catch)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Trans.Class (MonadTrans(..))
import Control.Monad.Trans.Maybe
import Data.Foldable (foldrM, foldlM)
import GHC.Generics
@@ -319,7 +321,7 @@ smtNormPrims sc = Map.fromList
Just n -> scNat sc n >>= \n' -> scBvNat sc n' ix'
tm <- scApplyBeta sc f ix''
tm' <- smtNorm sc tm
- return $ VExtra $ VExtraTerm a tm')
+ return $ VExtra $ VExtraTerm a tm')
),
-- Don't normalize applications of @SpecM@ and its arguments
("Prelude.SpecM",
@@ -613,7 +615,7 @@ mrConvOfTerm _ = NoConv
-- as large as possible, using information from the given terms (i.e. using
-- 'mrConvOfTerm') where possible. In pictorial form, this function finds
-- a @tp@, @c1@, and @c2@ which satisfy the following diagram:
---
+--
-- > tp1 tp2
-- > ^ ^
-- > c1 \ / c2
@@ -655,10 +657,10 @@ findInjConvs tp1 t1 (asNatType -> Just ())
-- add a 'BVToNat' conversion we have a BV on the other side, using the
-- bit-width from the other side
findInjConvs (asNatType -> Just ()) _ (asBitvectorType -> Just n) _ =
- do bv_tp <- liftSC1 scBitvector n
+ do bv_tp <- liftSC1 scBitvector n
return $ Just (bv_tp, BVToNat n, NoConv)
findInjConvs (asBitvectorType -> Just n) _ (asNatType -> Just ()) _ =
- do bv_tp <- liftSC1 scBitvector n
+ do bv_tp <- liftSC1 scBitvector n
return $ Just (bv_tp, NoConv, BVToNat n)
-- add a 'BVVecToVec' conversion if the (optional) given term has a
-- 'BVVecToVec' conversion
@@ -882,7 +884,7 @@ mrProveRelH' _ _ _ _ (asNum -> Just (Left t1)) (asNum -> Just (Left t2)) =
mrProveEqSimple (liftSC2 scEqualNat) t1 t2
mrProveRelH' _ _ (asNatType -> Just _) (asNatType -> Just _) t1 t2 =
mrProveEqSimple (liftSC2 scEqualNat) t1 t2
-mrProveRelH' _ _ tp1@(asVectorType -> Just (n1, asBoolType -> Just ()))
+mrProveRelH' _ _ tp1@(asVectorType -> Just (n1, asBoolType -> Just ()))
tp2@(asVectorType -> Just (n2, asBoolType -> Just ())) t1 t2 =
do ns_are_eq <- mrConvertible n1 n2
if ns_are_eq then return () else
diff --git a/src/SAWScript/Prover/MRSolver/Solver.hs b/src/SAWScript/Prover/MRSolver/Solver.hs
index 20f2d2254f..ec4a6795b2 100644
--- a/src/SAWScript/Prover/MRSolver/Solver.hs
+++ b/src/SAWScript/Prover/MRSolver/Solver.hs
@@ -35,7 +35,7 @@ defined in the SAW core prelude:
> (if b then m1 else m2) >>= k = if b then m1 >>= k else m2 >>= k
> (either f1 f2 e) >>= k = either (\x -> f1 x >>= k) (\x -> f2 x >>= k) e
> (multiFixS funs body) >>= k = multiFixS funs (\F1 ... Fn -> body F1 ... Fn >>= k)
->
+>
> liftStackS (retS x) = retS x
> liftStackS (errorS str) = errorS str
> liftStackS (m >>= k) = liftStackS m >>= \x -> liftStackS (k x)
@@ -74,65 +74,65 @@ The goal of the solver at any point is of the form @C |- m1 |= m2@, meaning that
we are trying to prove @m1@ refines @m2@ in context @C@. This proceeds by cases:
> C |- retS e1 |= retS e2: prove C |- e1 = e2
->
+>
> C |- errorS str1 |= errorS str2: vacuously true
->
+>
> C |- if b then m1' else m1'' |= m2: prove C,b=true |- m1' |= m2 and
> C,b=false |- m1'' |= m2, skipping either case where C,b=X is unsatisfiable;
->
+>
> C |- m1 |= if b then m2' else m2'': similar to the above
->
+>
> C |- either T U (SpecM V) f1 f2 e |= m: prove C,x:T,e=inl x |- f1 x |= m and
> C,y:U,e=inl y |- f2 y |= m, again skippping any case with unsatisfiable context;
->
+>
> C |- m |= either T U (SpecM V) f1 f2 e: similar to previous
->
+>
> C |- m |= forallS f: make a new universal variable x and recurse
->
+>
> C |- existsS f |= m: make a new universal variable x and recurse (existential
> elimination uses universal variables and vice-versa)
->
+>
> C |- m |= existsS f: make a new existential variable x and recurse
->
+>
> C |- forallS f |= m: make a new existential variable x and recurse
->
+>
> C |- m |= orS m1 m2: try to prove C |- m |= m1, and if that fails, backtrack and
> prove C |- m |= m2
->
+>
> C |- orS m1 m2 |= m: prove both C |- m1 |= m and C |- m2 |= m
->
+>
> C |- multiFixS (\F1 ... Fn -> (f1, ..., fn)) (\F1 ... Fn -> body) |= m: create
> multiFixS-bound variables F1 through Fn in the context bound to their unfoldings
> f1 through fn, respectively, and recurse on body |= m
->
+>
> C |- m |= multiFixS (\F1 ... Fn -> (f1, ..., fn)) (\F1 ... Fn -> body): similar to
> previous case
->
+>
> C |- F e1 ... en >>= k |= F e1' ... en' >>= k': prove C |- ei = ei' for each i
> and then prove k x |= k' x for new universal variable x
->
+>
> C |- F e1 ... en >>= k |= F' e1' ... em' >>= k':
->
+>
> * If we have an assumption that forall x1 ... xj, F a1 ... an |= F' a1' .. am',
> prove ei = ai and ei' = ai' and then that C |- k x |= k' x for fresh uvar x
->
+>
> * If we have an assumption that forall x1, ..., xn, F e1'' ... en'' |= m' for
> some ei'' and m', match the ei'' against the ei by instantiating the xj with
> fresh evars, and if this succeeds then recursively prove C |- m' >>= k |= RHS
->
+>
> (We don't do this one right now)
> * If we have an assumption that forall x1', ..., xn', m |= F e1'' ... en'' for
> some ei'' and m', match the ei'' against the ei by instantiating the xj with
> fresh evars, and if this succeeds then recursively prove C |- LHS |= m' >>= k'
->
+>
> * If either side is a definition whose unfolding does not contain multiFixS, or
> any related operations, unfold it
->
+>
> * If F and F' have the same return type, add an assumption forall uvars in scope
> that F e1 ... en |= F' e1' ... em' and unfold both sides, recursively proving
> that F_body e1 ... en |= F_body' e1' ... em'. Then also prove k x |= k' x for
> fresh uvar x.
->
+>
> * Otherwise we don't know to "split" one of the sides into a bind whose
> components relate to the two components on the other side, so just fail
@@ -150,8 +150,11 @@ import Numeric.Natural (Natural)
import Data.List (find, findIndices)
import Data.Foldable (foldlM)
import Data.Bits (shiftL)
-import Control.Monad.Reader
-import Control.Monad.Except
+import Control.Monad ((>=>), forM, zipWithM, zipWithM_)
+import Control.Monad.Except (MonadError(..))
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (MonadReader(..), ReaderT(..))
+import Control.Monad.Trans.Class (MonadTrans(..))
import qualified Data.Map as Map
import qualified Data.Text as Text
import Data.Set (Set)
diff --git a/src/SAWScript/Prover/MRSolver/Term.hs b/src/SAWScript/Prover/MRSolver/Term.hs
index 3b6d2399b3..ccbb3d04af 100644
--- a/src/SAWScript/Prover/MRSolver/Term.hs
+++ b/src/SAWScript/Prover/MRSolver/Term.hs
@@ -34,7 +34,9 @@ module SAWScript.Prover.MRSolver.Term where
import Data.String
import Data.IORef
-import Control.Monad.Reader
+import Control.Monad (foldM)
+import Control.Monad.IO.Class (MonadIO(..))
+import Control.Monad.Reader (MonadReader(..), Reader, runReader)
import qualified Data.IntMap as IntMap
import Numeric.Natural (Natural)
import GHC.Generics
diff --git a/src/SAWScript/SBVParser.hs b/src/SAWScript/SBVParser.hs
index 3aef0a3277..609bbd8e2a 100644
--- a/src/SAWScript/SBVParser.hs
+++ b/src/SAWScript/SBVParser.hs
@@ -20,7 +20,9 @@ module SAWScript.SBVParser
import Prelude hiding (mapM)
-import Control.Monad.State hiding (mapM)
+import Control.Monad (foldM, liftM, replicateM, unless)
+import Control.Monad.State (MonadState(..), StateT(..))
+import Control.Monad.Trans.Class (MonadTrans(..))
import Data.List (intercalate)
import Data.Map (Map)
import qualified Data.Map as Map
diff --git a/src/SAWScript/X86Spec.hs b/src/SAWScript/X86Spec.hs
index e066fd3569..7128e688b8 100644
--- a/src/SAWScript/X86Spec.hs
+++ b/src/SAWScript/X86Spec.hs
@@ -70,7 +70,8 @@ import Data.Proxy(Proxy(..))
import qualified Data.Map as Map
import Data.IORef(newIORef,atomicModifyIORef')
import Data.String
-import Control.Monad.Reader
+import Control.Monad (MonadPlus(..), foldM, join, zipWithM)
+import Control.Monad.IO.Class (MonadIO(..))
import Data.Parameterized.NatRepr
import Data.Parameterized.Classes