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

Unexpected counterexample when indexing a symbolic sequence by a object of unknown type #200

Open
pschanely opened this issue Mar 15, 2023 · 0 comments

Comments

@pschanely
Copy link
Owner

pschanely commented Mar 15, 2023

Expected vs actual behavior
We'd expect a counterexample in this case, but not the one we get:

example:

from typing import Sequence
def try_index(dd: Sequence[int], idx=0) -> None:
    """
    post: True    
    """
    return dd[idx]

actual output:

/tmp/main.py:6: error: TypeError: indices must be integers or slices, not <class 'crosshair.libimpl.builtinslib.SymbolicObject'> when calling try_index((), idx = '')

It's ok for crosshair to try various types for the idx param (it has a default but can legitimately be any type), but we expect the counterexample to be some sort of regular Python type, not a CrossHair internal type.

To Reproduce
https://crosshair-web.org/?crosshair=0.1&python=3.8&flags=verbose&gist=015bea7c81fa2ebaf9bb7d01ccb655d5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant