Skip to content

Different error report from first example #16

Open

Description

@tlringer

Hello, I'm going through the tutorial and I just want to report any discrepancies I encounter. When I run the first example I get a different error report from the one described in the tutorial. Mine has the values:

y | -2147483647i32
x | -2147483648i32

instead. Does CN just give you any one example in an error report, rather than a specific one? Is there nondeterminism involved in what examples might be presented in the error report? If so, I think this should be clarified in the tutorial, otherwise it is easy to get lost already at this point.

Activity

  1. tlringer commented on May 22, 2024

    @tlringer
    ContributorAuthor

    Oh, I see a small parenthetical about this in the tutorial. I missed it the first time. Can we make it more prominent, or move it earlier? Otherwise I see a mismatch and just assume something has already gone wrong.

  2. tlringer commented on May 22, 2024

    @tlringer
    ContributorAuthor

    Specifically I would put that parenthetical at the top where it says "the report comprises two sections" because the second I see the mismatch, I am going to get confused.

  3. tlringer commented on May 22, 2024

    @tlringer
    ContributorAuthor

    Also, my only constraints are:

    repr<void*>(__builtin_ctzl)
    repr<void*>(__builtin_ctzll)
    repr<void*>(add)
    aligned(&ARG0, 4u64)
    aligned(&ARG1, 4u64)
    

    Accordingly, I have no idea what this is referring to:

    For instance, good<signed int>(x) says that the initial value of x is a “good” signed int value (i.e. in range). Here signed int is the same type as int, CN just makes the sign explicit. For integer types T, good<T> requires the value to be in range of type T; for pointer types T it also requires the pointer to be aligned. For structs and arrays this extends in the obvious way to struct members or array cells.

    I assume the constraints can also vary depending on the version of Z3 installed? I would just put this all at the very top of the section and say the specific error report you see for the same function might vary depending on the version of Z3 installed.

  4. dc-mak commented on Dec 27, 2024

    @dc-mak
    Collaborator

    Apologies for the discrepancy. The specific values are non-deterministic, but sometimes solvers have random seed values to help with this (we used to support this but don't know).

    The other constraints are just down to the fact that CN is still not stable and the tutorial does not get updated that often (would be nice to automate this somehow).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions