atlas

Research map / Large language models / Agents, code and math

Verified Code Transpilation with LLMs

NeurIPS 2024 · Large language models › Agents, code and math · approach: Execution-based code verification · 5 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes LLMLift, which uses GPT-4 to generate Python-IR program summaries and loop invariants for verified lifting, translating code into four DSLs (Spark, P4/Domino, TACO, tensor IR) with SMT-based verification.

Problem

Automated code transpilation into domain-specific languages with functional correctness guarantees; existing verified lifting tools are symbolic, DSL-specific, and require heavy domain-specific search heuristics, while plain LLM transpilation offers no guarantees.

Approach

Use an LLM to lift source code into a Python-based intermediate representation that defines DSL operator semantics, generating both program summaries and loop invariants via prompting, then verify equivalence with an SMT theorem prover and map the verified summary to DSL syntax with rewrite rules.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
use LLMLift instead of MetaLiftSpark lifting · Spark (45 benchmarks)benchmarks solved: 40 -> 44Helped
use LLMLift instead of MetaLiftSpark lifting · Sparkaverage solving time: 3 minutes -> less than 1 minuteHelped
use LLMLift instead of MetaLiftDomino lifting · Domino (10 benchmarks)benchmarks solved: 10 -> 10No clear effect
use LLMLift instead of MetaLiftDomino lifting · Dominoaverage solving time: 6 seconds -> 2 secondsHelped
use LLMLift instead of C2TACOTACO lifting · TACO (60 benchmarks)benchmarks solved: 57 -> 60Helped
use LLMLift instead of C2TACOTACO lifting · TACOaverage solving time: 41 seconds -> 2 secondsHelped
use LLMLift instead of Tenspilertensor processing lifting · Tensor processing (23 benchmarks)benchmarks solved: 23 -> 23No clear effect
use LLMLift instead of Tenspilertensor processing lifting · Tensor processingaverage solving time: 115.14 seconds -> 95.89 secondsHelped
generate program summary and invariants together in one step instead of using the two-phase approach (ablation)LLMLift · Tensor processing (23 benchmarks)benchmarks solved: 23 -> 20Hurt
remove all three domain-specific optimizations (ablation)Tenspiler · Tensor processing (23 benchmarks)benchmarks solved: 23 -> 5Hurt
use LLMLift instead of C2TACOTACO lifting · TACO scalability (10 synthetic benchmarks)benchmarks solved: C2TACO: any of the 10; LLMLift: 10Helped

Surprising findings

Limitations

Experimental setup

Datasets: MetaLift Spark benchmarks Domino benchmarks C2TACO benchmarks Tenspiler benchmarks

Benchmarks: MetaLift Spark benchmarks (45) Domino (10) C2TACO TACO benchmarks (60) Tenspiler tensor benchmarks (23)

Metrics: number of benchmarks solved solving time lines of code effort

Baselines: MetaLift C2TACO Tenspiler Casper Mold

Builds on: verified lifting Metalift C2TACO Tenspiler SyGuS

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy