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:
Marko Ristin just published an early VS Code extension for CrossHair! Install it from the VS Code Marketplace.
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 even symbolic instances of your own classes.
Try CrossHair right now, in your browser, at crosshair-web.org!
NOTE: CrossHair is in an experimental state right now. You can help though!
Documentation
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.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 233a64b53c393513ef01eb7616b543e4d2d105f78b325268a359307d1dc23fa3 |
|
MD5 | 45c3ae7fe7a65a3124f9b10b24dce7eb |
|
BLAKE2b-256 | 4bc1f8cf362bbbb90df4a9d3c64cc2d5287ebc4774b9728da0f94927ffe0e056 |