Skip to content

Investigate whether we can use interpreted values rather than byte array values for playback #1527

Open

Description

@sanjit-bhat

Right now, concrete values will look like this:

let det_vals: Vec<Vec<u8>> = vec![
    // 0ul <- interpreted value
    vec![0, 0, 0, 0, 0, 0, 0, 0], // <- byte array value
    // 8192ul
    vec![0, 32, 0, 0, 0, 0, 0, 0],
    // 0
    vec![0],
];

We might be able to initialize directly with the interpreted value, at least for some primitive types. However, we should see whether this is really possible for all primitive types. The types / UX might get messy if we start to mix using interpreted values versus using byte array values.

Activity

  1. celinval commented on Jan 26, 2023

    @celinval
    Contributor

    We could use something like a Vec<&dyn Any> instead. When reading the value, we can compare the TypeId of each and even provide a nice error if they don't match.

  2. celinval commented on Jun 23, 2023

    @celinval
    Contributor

    I tried this out, but I bump into a problem where u64 (on 64 bit machines) and usize both translate to __CPROVER_size_t type and isize and i64 will both translate to long int. We need to investigate further if it's possible to differentiate between them.

  3. celinval commented on Jun 26, 2023

    @celinval
    Contributor

    Or maybe just translate usize / isize to u{width}/ i{width}

  4. added
    [C] Feature / Enhancement
    on Sep 22, 2023
  5. self-assigned this
    on Apr 17, 2024
  6. celinval commented on Jul 17, 2024

    @celinval
    Contributor

    Another problem I faced was with char.

    So to do this we would probably need to get the type from the instance we are parsing. I.e., we would need to have a map from mangled name to the type.

  7. added theissue type on Nov 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

[C] Feature / Enhancement

Type

Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions