3 pointsby lflin007 hours ago1 comment
  • lflin007 hours ago
    I built a tool that detects when two functions or classes implement identical logic even if they have different names, variable names, or are written in different languages. A Java function and a Python function that do the same thing produce the same hash. It works by translating any language to Python via LLM, then applying alpha equivalence — stripping all variable names and hashing the canonical AST structure. Same hash means same logic, guaranteed. This week I added class-level detection using Merkle tree hashing and an MCP server so Claude Code can check its own output against your codebase before creating duplicates. Live demo: https://sri-engine-7amwtce7a23k7q34cpnxem.streamlit.app GitHub: https://github.com/lflin00/SIR-ENGINE