BotBeat
...
← Back

> ▌

AnthropicAnthropic
OPEN SOURCEAnthropic2026-04-24

Chiasmus: Formal Reasoning Engine Gives LLMs Code Analysis Superpowers

Key Takeaways

  • ▸Chiasmus pairs LLMs with formal reasoning engines (Z3 constraint solver, Tau Prolog logic engine) for exhaustive code analysis
  • ▸Replaces grep-based searching with structured parsing (tree-sitter) and logical queries, enabling true semantic code understanding
  • ▸Neurosymbolic approach: LLMs provide perception and language understanding; symbolic solvers provide provable reasoning and verification
Source:
Hacker Newshttps://yogthos.net/posts/2026-04-08-neurosymbolic-mcp.html↗

Summary

Chiasmus, an open-source MCP server, addresses a fundamental weakness in how large language models analyze code. While traditional LLM code assistants rely on grep and ad hoc pattern matching to search through source files and reconstruct call chains, these methods fail for complex structural questions like 'Can user input reach this SQL query through any chain of calls?' or 'What's all the dead code in this module?' These problems require exhaustive structural analysis that grep simply cannot provide.

The project implements a neurosymbolic AI approach, combining the pattern recognition and language understanding of neural networks (LLMs) with the deterministic reasoning power of symbolic systems. Chiasmus leverages Z3 for constraint solving and Tau Prolog for logic programming, while using tree-sitter to parse source files into structured abstract syntax trees. These ASTs are converted into Prolog facts representing code structure—method definitions, call relationships, imports—which the logic solver can query to answer code structure questions with certainty.

Supporting Python, Go, TypeScript, JavaScript, and Clojure out of the box, Chiasmus enables LLMs to perform exhaustive code analysis including reachability analysis, dead code detection, and impact analysis while using a fraction of the tokens required by grep-based approaches. By shifting from text search to formal logical reasoning, the tool demonstrates how symbolic reasoning can complement LLM capabilities to build more reliable AI-assisted development tools.

  • Dramatically more token-efficient and accurate than traditional grep-based code analysis approaches
  • Open-source MCP server enabling enhanced code assistant capabilities for Claude and other LLMs
Large Language Models (LLMs)AI AgentsMachine LearningOpen Source

More from Anthropic

AnthropicAnthropic
UPDATE

Anthropic Brings Claude to Apple's Foundation Models Framework

2026-06-08
AnthropicAnthropic
INDUSTRY REPORT

Supply Chain Attack Targets Claude, Gemini, and Other AI Coding Assistants Through Compromised Microsoft Repositories

2026-06-08
AnthropicAnthropic
PRODUCT LAUNCH

Anthropic Launches sx, a Package Manager for AI Agent Assets

2026-06-08

Comments

Suggested

NVIDIANVIDIA
RESEARCH

Researchers Challenge HPC Dogma: FP8 With Ozaki Scheme II Can Match FP64 Accuracy on NVIDIA's Blackwell GPUs

2026-06-08
AnthropicAnthropic
UPDATE

Anthropic Brings Claude to Apple's Foundation Models Framework

2026-06-08
DoublewordDoubleword
RESEARCH

Doubleword Achieves 15% Expert Load Reduction in MoE Inference Through Input Reordering

2026-06-08
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us