tessl install tessl/pypi-crosshair-tool@0.0.0Analyze Python code for correctness using symbolic execution and SMT solving to automatically find counterexamples for functions with type annotations and contracts.
Agent Success
Agent success rate when using this tile
86%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.25x
Baseline
Agent success rate without this tile
69%
Build a tool that compares two Python function implementations to find inputs where they behave differently.
@generates
def compare_functions(func1, func2, timeout=5.0):
"""
Compare two functions to find inputs where they behave differently.
Args:
func1: First function to compare
func2: Second function to compare
timeout: Maximum time in seconds to search for differences
Returns:
dict with keys:
- 'found': bool, True if a difference was discovered
- 'input': dict mapping argument names to values (present if found=True)
- 'difference_type': str, one of 'return_value' or 'exception' (present if found=True)
Example:
result = compare_functions(version1, version2, timeout=10.0)
if result['found']:
print(f"Functions differ on input: {result['input']}")
"""
passProvides symbolic execution and behavioral difference detection capabilities.