Ctrl + k

or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/crosshair-tool@0.0.x
tile.json

tessl/pypi-crosshair-tool

tessl install tessl/pypi-crosshair-tool@0.0.0

Analyze 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%

task.mdevals/scenario-3/

Function Behavior Comparator

Build a tool that compares two Python function implementations to find inputs where they behave differently.

Capabilities

Detect return value differences

  • Given two functions with different arithmetic logic, find an input where return values differ @test
  • Given two string processing functions with different logic, discover an input string that produces different outputs @test

Detect exception differences

  • Given two functions where one raises an exception and the other doesn't, find the input that triggers this difference @test

Report discovered differences

  • When a difference is found, the result includes the input arguments that caused the difference @test
  • When no difference is found within the timeout, return a result indicating this @test

Implementation

@generates

API

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']}")
    """
    pass

Dependencies { .dependencies }

crosshair-tool { .dependency }

Provides symbolic execution and behavioral difference detection capabilities.