Skip to main content

Analyze Python code for correctness using symbolic execution.

Project description

CrossHair

Join the chat at https://gitter.im/Cross_Hair/Lobby Check status Downloads

An analysis tool for Python that blurs the line between testing and type systems.

THE LATEST NEWS:
Check out the new crosshair cover command which finds inputs to get you code coverage.

If you have a function with type annotations and add a contract in a supported syntax, CrossHair will attempt to find counterexamples for you:

Animated GIF demonstrating the verification of a python function

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; a Python approach was first described in this paper. However, to my knowledge, CrossHair is the most complete implementation: it supports symbolic lists, dictionaries, sets, and custom classes.

Try CrossHair right now, in your browser, at crosshair-web.org!

CrossHair has IDE integrations for VS Code, PyCharm, and more.

Want to do me a favor? Sign up for email or RSS updates. There are other ways to help too.

Documentation

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

crosshair-tool-0.0.30.tar.gz (313.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crosshair_tool-0.0.30-py3-none-any.whl (355.0 kB view details)

Uploaded Python 3

File details

Details for the file crosshair-tool-0.0.30.tar.gz.

File metadata

  • Download URL: crosshair-tool-0.0.30.tar.gz
  • Upload date:
  • Size: 313.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.7

File hashes

Hashes for crosshair-tool-0.0.30.tar.gz
Algorithm Hash digest
SHA256 9d0e4bf8facb6aad6e8133801d5464b761f74455a594e075e97558dccc57a2d8
MD5 5ce08b7b2934874b632a14aa82f68a43
BLAKE2b-256 ede19dafd7fe39e46b38b48e79ce5ea7e300b819201f0e7d6aca5e17320be49c

See more details on using hashes here.

File details

Details for the file crosshair_tool-0.0.30-py3-none-any.whl.

File metadata

File hashes

Hashes for crosshair_tool-0.0.30-py3-none-any.whl
Algorithm Hash digest
SHA256 98a93ae72b939ac7f8bb46d963e562f135e6745b10a5bfe74cfb045b8d566869
MD5 291872a0760a15a20ff9c3e4e317639b
BLAKE2b-256 763f8cc9d045f4f114db362fdcaf48e566e99ac8f1e5557021b4352b24344fa9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page