Analyze Python code for correctness using symbolic execution.
Project description
CrossHair
An analysis tool for Python that blurs the line between testing and type systems.
THE LATEST NEWS: CrossHair is growing new commands that are unrelated to contracts; compare the behavior of two functions with the diffbehavior command!
If you have a function with type annotations and add a contract in a supported syntax, CrossHair will attempt to find counterexamples for you:
CrossHair works by repeatedly calling your functions with symbolic inputs. It uses an SMT solver (a kind of theorem prover) to explore viable execution paths and find counterexamples for you. This is not a new idea; an approach for Python was first described in this paper. However, to my knowledge, CrossHair is the most complete implementation of the idea: it supports symbolic lists, dictionaries, sets, and custom mutable objects.
Try CrossHair right now, in your browser, at crosshair-web.org!
NOTE: CrossHair is in an experimental state right now. You can help though - keep reading!
Documentation
The documentation is available at: [https://crosshair.readthedocs.io/].
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for crosshair_tool-0.0.10-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dfac3aa144cffda78062c692e71837f2ac0fedfc61958e026bfe6f8959ad75a5 |
|
MD5 | 094db3ce68a46addfdd9f5d77ba2a19d |
|
BLAKE2b-256 | ce50107a50cf0347379720979c4d725b06baf6a69464d2fb7600aaa128af5af7 |