Chiasmus

•
224
•

Empowers language models with formal verification and advanced code analysis capabilities.

Chiasmus serves as an MCP server, providing Large Language Models (LLMs) access to mathematically certain formal verification. It translates natural language problems into formal logic using a template-based pipeline, leveraging Z3 (SMT solver) and Tau Prolog to verify results with high assurance. Beyond verification, Chiasmus integrates tree-sitter for deep source code analysis, enabling LLMs to reason about call graphs, identify dead code, assess impact, and check reachability across various programming languages. It offers a structured workflow for LLMs to formalize problems, verify solutions, and conduct comprehensive code reviews, bridging the gap between natural language understanding and rigorous formal methods.

Key Features

01Comprehensive code review recipe generation for structured analysis by LLMs
02Ability to create and manage custom verification templates for specialized use cases
03Template-based pipeline to translate natural language problems into formal logic specifications
0441 GitHub stars
05Formal verification using Z3 SMT solver and Tau Prolog for mathematical certainty
06Source code call graph analysis via tree-sitter for reachability, dead code, and impact assessment

Use Cases

01Determine if RBAC rules conflict by identifying exact role/action/resource discrepancies
02Solve complex dependency constraints to find compatible package versions or prove their absence
03Analyze code for taint flows and determine if user input can reach sensitive database sinks