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
PRODUCT LAUNCH

DingDuff: Claude-Powered Legal Research Tool Launches with Tip-Jar Model

2026-07-23
AnthropicAnthropic
RESEARCH

Anthropic Advances LLM Guardrails with Multilingual, Context-Aware Evaluation Framework

2026-07-23
AnthropicAnthropic
RESEARCH

Anthropic Interpretability Paper Reveals LLMs Have Measurable Internal 'Workspace'

2026-07-23

Comments

Suggested

Hugging FaceHugging Face
RESEARCH

Study Reveals Widespread License Laundering in AI Supply Chains

2026-07-24
OpenAIOpenAI
RESEARCH

GPT-4o Clinical Trial Shows Promise in Kenya, But Results Lack Statistical Significance for Patient Outcomes

2026-07-24
TencentTencent
RESEARCH

Tencent Releases WorkBuddy Bench: Multi-Model Agentic Coding Leaderboard Shows No Clear Winner

2026-07-24
← Back to news
© 2026 BotBeat
AboutPrivacy PolicyTerms of ServiceContact Us