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-7/

Symbolic Value Generator

A Python utility that generates symbolic values for testing and constraint solving. The generator creates symbolic representations of Python types that can be used in symbolic execution and validation scenarios.

Capabilities

Generate symbolic primitives

  • Given a primitive type (int, str, bool), the generator creates a symbolic value of that type. @test
  • When generating a symbolic integer named "x", it returns a symbolic value that behaves like an integer. @test

Generate symbolic collections

  • Given a list type, the generator creates a symbolic list with symbolic elements. @test
  • Given a dictionary type, the generator creates a symbolic dictionary structure. @test

Implementation

@generates

API

from typing import Any, Type

class SymbolicValueGenerator:
    """
    A generator that creates symbolic values for different Python types.
    """

    def create_symbolic(self, type_hint: Type, name: str = "sym") -> Any:
        """
        Creates a symbolic value of the specified type.

        Args:
            type_hint: The Python type to generate a symbolic value for
            name: A variable name for the symbolic value (default: "sym")

        Returns:
            A symbolic value that represents the given type and can be
            used in constraint solving and symbolic execution

        Raises:
            TypeError: If the type is not supported for symbolic generation
        """
        pass

    def realize(self, symbolic_value: Any) -> Any:
        """
        Converts a symbolic value to a concrete value.

        Args:
            symbolic_value: A symbolic value to convert

        Returns:
            A concrete Python value
        """
        pass

Dependencies { .dependencies }

crosshair-tool { .dependency }

Provides symbolic execution and type proxy support for generating symbolic values.