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.27.tar.gz (302.8 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.27-py3-none-any.whl (344.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for crosshair-tool-0.0.27.tar.gz
Algorithm Hash digest
SHA256 5b5d7a1de7f7ea95069f88c924e630336ed17c4e5ef8807fe74ef293433fb415
MD5 eadcc2e956a90f600cc03f63d4544e64
BLAKE2b-256 d2119fefeef27f836a4e7e6df58ab89a2886d3db82ed833f36a7c046d6866657

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for crosshair_tool-0.0.27-py3-none-any.whl
Algorithm Hash digest
SHA256 685906ab9dd2bcaa3f74a73a924b4cbae31bed1ec71a175aee850f2d4754e227
MD5 d9fc1876f7c6fdfd5749e58f10caff48
BLAKE2b-256 873c7115ba5af1a4fad372a203cd1605bfd638e0fd4b84ff1d141d0d513700e9

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