Phillip Schanely

Results 53 issues of Phillip Schanely

We now have some effective strategies for dealing with non-deterministic behavior, by [adding contracts to existing functions](https://crosshair.readthedocs.io/en/latest/plugins.html#adding-contracts-to-external-functions). Let's apply them to the standard library. Some high-priority ones off the top...

enhancement

Python 3.11 has some heavily modified the way invocation opcodes work (See [CALL](https://docs.python.org/3.11/library/dis.html#opcode-CALL)) and CrossHair will need to handle some new opcodes. (hopefully it can!)

Some CrossHair tests are failing on Windows, like [test_proxy_alone](https://github.com/pschanely/CrossHair/blob/4abaac436f383abf3bcc705a4a521d9cd824d4e5/crosshair/core_test.py#L313). I've followed these failures back to this Python tracing bug: python/cpython#89271. Supposedly, this is fixed in Python 3.11. We'll need to...

**Is your feature request related to a problem? Please describe.** At present, using the `not` operator realizes symbolic booleans - ideally, it would produce an inverted symbolic boolean. We haven't...

enhancement

Right now, CrossHair can only effectively create symbolic class instances when types are present on the implementation. It would be great if CrossHair could understand `.pyi` typing stubs and use...

enhancement

We expect a counterexample of "hi" here, but get an error instead. There may be some related issues around these unions; note that typing_inspect does not yet understand them: https://github.com/ilevkivskyi/typing_inspect/pull/83...

Similar to #114, literal map constructions with symbolic keys will not be analyzable. We'll need to intercept the BUILD_MAP and BUILD_CONST_KEY_MAP opcodes and upgrade the return to a symbolic dictionary.

enhancement
Hacktoberfest

Although we can operate on StringIO instances symbolically, we cannot for BytesIO. Generally speaking, CrossHair isn't meant for analyzing I/O-based code. However, StringIO/BytesIO are used for emulating I/O, so they...

enhancement

We'd like preserve symbolics across encode/decode for all encodings. But we only can do this for some right now. The current checklist follows. Suggest codecs to tackle next. - [x]...

enhancement

Packages are conspicuously missing from the set of [things CrossHair can target](https://crosshair.readthedocs.io/en/latest/contracts.html#targeting). (though targeting by *module* is supported; see [modules-vs-packages](https://stackoverflow.com/questions/7948494/whats-the-difference-between-a-python-module-and-a-python-package)) I think we should be able to use [pkgutil.walk_packages](https://docs.python.org/3/library/pkgutil.html#pkgutil.walk_packages) to...

enhancement