Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

ghost seq not implemented #1508

Open
nishanthkarthik opened this issue Mar 9, 2024 · 1 comment
Open

ghost seq not implemented #1508

nishanthkarthik opened this issue Mar 9, 2024 · 1 comment
Labels
bug Something isn't working error-reporting Something needs to be fixed in the error reporting

Comments

@nishanthkarthik
Copy link

I am using Prusti version: 0.2.2, commit 528f4c2 2024-03-06 10:13:12 UTC, built on 2024-03-06 10:25:48 UTC

use prusti_contracts::*;

struct Token<T> {
    _p: std::marker::PhantomData<T>
}

#[model]
struct Token<#[generic] T: Copy> {
    ptrs: Seq<*mut T>,
}

This panics with a not-implemented. I followed the example from the examples in prusti-tests using a model with a built-in seq.

backtrace
thread 'rustc' panicked at prusti-viper/src/encoder/high/lower/predicates.rs:36:55:
not implemented
stack backtrace:
   0:     0x717ce1562efc - std::backtrace_rs::backtrace::libunwind::trace::h652247f520429b18
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
   1:     0x717ce1562efc - std::backtrace_rs::backtrace::trace_unsynchronized::h20ba733a518048ae
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x717ce1562efc - std::sys_common::backtrace::_print_fmt::ha9cb2d71bba5eb16
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x717ce1562efc - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h527f3c0db321cf86
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/sys_common/backtrace.rs:44:22
   4:     0x717ce15c915c - core::fmt::rt::Argument::fmt::hc5a8cd063e05c609
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/core/src/fmt/rt.rs:138:9
   5:     0x717ce15c915c - core::fmt::write::h818c732e4e373aa5
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/core/src/fmt/mod.rs:1094:21
   6:     0x717ce1555b1e - std::io::Write::write_fmt::h9fe6c7e095e96a32
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/io/mod.rs:1714:15
   7:     0x717ce1562ce4 - std::sys_common::backtrace::_print::h4b50c3b478ae2a37
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/sys_common/backtrace.rs:47:5
   8:     0x717ce1562ce4 - std::sys_common::backtrace::print::hf2c7643f5414af94
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/sys_common/backtrace.rs:34:9
   9:     0x717ce1565dda - std::panicking::panic_hook_with_disk_dump::{{closure}}::h62ff4ef3ec32306d
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/panicking.rs:280:22
  10:     0x717ce1565a98 - std::panicking::panic_hook_with_disk_dump::hcd58ca7cb67f8702
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/panicking.rs:307:9
  11:     0x717ce47690b9 - <rustc_driver_impl[8b2874cda94e7cd4]::install_ice_hook::{closure#0} as core[b0493a3e457862f3]::ops::function::FnOnce<(&core[b0493a3e457862f3]::panic::panic_info::PanicInfo,)>>::call_once::{shim:vtable#0}
  12:     0x717ce1566693 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h2b79b1e8b8bd4402
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/alloc/src/boxed.rs:2021:9
  13:     0x717ce1566693 - std::panicking::rust_panic_with_hook::ha2c93276d1208654
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/panicking.rs:757:13
  14:     0x717ce15663c6 - std::panicking::begin_panic_handler::{{closure}}::hb78d7a76234f0397
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/panicking.rs:623:13
  15:     0x717ce1563426 - std::sys_common::backtrace::__rust_end_short_backtrace::h96e02fd19b415b36
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/sys_common/backtrace.rs:170:18
  16:     0x717ce1566152 - rust_begin_unwind
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/panicking.rs:619:5
  17:     0x717ce15c5505 - core::panicking::panic_fmt::h62ee289ca1991433
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/core/src/panicking.rs:72:14
  18:     0x717ce15c55a3 - core::panicking::panic::ha5a2b79f85789cae
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/core/src/panicking.rs:127:5
  19:     0x5d4a801489da - <prusti_viper::encoder::encoder::Encoder as prusti_viper::encoder::high::types::interface::HighTypeEncoderInterfacePrivate>::ensure_viper_predicate_encoded::h343084aaefbc612d
  20:     0x5d4a8014bd34 - <prusti_viper::encoder::encoder::Encoder as prusti_viper::encoder::high::types::interface::HighTypeEncoderInterface>::ensure_type_predicate_encoded::h86f45db38461aab2
  21:     0x5d4a80387588 - <prusti_viper::encoder::encoder::Encoder as prusti_viper::encoder::high::types::interface::HighTypeEncoderInterface>::encode_type::h890d1564464375a8
  22:     0x5d4a80039b29 - prusti_viper::encoder::mir_encoder::PlaceEncoder::encode_local::h4bf8171dd1a28497
  23:     0x5d4a802d8938 - prusti_viper::encoder::mir_encoder::PlaceEncoder::encode_projection::h54ea4a6fe994673b
  24:     0x5d4a802d5db1 - prusti_viper::encoder::mir_encoder::PlaceEncoder::encode_place::h971861316b2a6161
  25:     0x5d4a80283cec - prusti_viper::encoder::encoder::Encoder::encode_procedure::hee51d6caed060b78
  26:     0x5d4a8028c8e4 - prusti_viper::encoder::encoder::Encoder::process_encoding_queue::h8ac45f31b189ebe9
  27:     0x5d4a8038c4c6 - prusti_viper::verifier::Verifier::verify::h1d62cd60f58c6fcc
  28:     0x5d4a7fde8b25 - <prusti_driver::callbacks::PrustiCompilerCalls as rustc_driver_impl::Callbacks>::after_analysis::h7d8f5df69404394f
  29:     0x717ce3c789d6 - <rustc_interface[1527d435bc9889c9]::interface::Compiler>::enter::<rustc_driver_impl[8b2874cda94e7cd4]::run_compiler::{closure#1}::{closure#2}, core[b0493a3e457862f3]::result::Result<core[b0493a3e457862f3]::option::Option<rustc_interface[1527d435bc9889c9]::queries::Linker>, rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>>
  30:     0x717ce3c71c04 - std[843b1ee06368cddb]::sys_common::backtrace::__rust_begin_short_backtrace::<rustc_interface[1527d435bc9889c9]::util::run_in_thread_with_globals<rustc_interface[1527d435bc9889c9]::interface::run_compiler<core[b0493a3e457862f3]::result::Result<(), rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>, rustc_driver_impl[8b2874cda94e7cd4]::run_compiler::{closure#1}>::{closure#0}, core[b0493a3e457862f3]::result::Result<(), rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b0493a3e457862f3]::result::Result<(), rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>>
  31:     0x717ce3c7135e - <<std[843b1ee06368cddb]::thread::Builder>::spawn_unchecked_<rustc_interface[1527d435bc9889c9]::util::run_in_thread_with_globals<rustc_interface[1527d435bc9889c9]::interface::run_compiler<core[b0493a3e457862f3]::result::Result<(), rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>, rustc_driver_impl[8b2874cda94e7cd4]::run_compiler::{closure#1}>::{closure#0}, core[b0493a3e457862f3]::result::Result<(), rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>>::{closure#0}::{closure#0}, core[b0493a3e457862f3]::result::Result<(), rustc_span[82af0e0afe7e8690]::ErrorGuaranteed>>::{closure#1} as core[b0493a3e457862f3]::ops::function::FnOnce<()>>::call_once::{shim:vtable#0}
  32:     0x717ce1571075 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h7bff668e3fcc7cec
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/alloc/src/boxed.rs:2007:9
  33:     0x717ce1571075 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h6cf1c11e2e0c58d1
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/alloc/src/boxed.rs:2007:9
  34:     0x717ce1571075 - std::sys::unix::thread::Thread::new::thread_start::hfa7d5fcc9039f5da
                               at /rustc/ca2b74f1ae5075d62e223c0a91574a1fc3f51c7c/library/std/src/sys/unix/thread.rs:108:17
  35:     0x717cdfca955a - <unknown>
  36:     0x717cdfd26a3c - <unknown>
  37:                0x0 - <unknown>


rustc version: 1.74.0-nightly (ca2b74f1a 2023-09-14)
platform: x86_64-unknown-linux-gnu

query stack during panic:
end of query stack

@fpoli
Copy link
Member

fpoli commented Mar 11, 2024

@Aurel300

@fpoli fpoli added bug Something isn't working error-reporting Something needs to be fixed in the error reporting labels Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working error-reporting Something needs to be fixed in the error reporting
Projects
None yet
Development

No branches or pull requests

2 participants