Lune

ICML2026Top-tier venue

MALICE: Memory-aware Loop Invariants Generation on Symbolic Execution Traces

Tong Chen, Siyu Liu, Hongyi Zhong, liao zhang, Lixiang Wang, Xiwei Wu, Junchi Yan, Qinxiang Cao

2026Year

Abstract

Automatic loop invariant generation remains a challenging problem in program verification, particularly for memory-manipulating programs where shape invariants are required to characterize heap-allocated structures and memory layouts. While existing approaches succeed on numerical invariants, they achieve limited accuracy on shape invariants. We hypothesize that this stems from the need to reason about memory state evolution—information that remains implicit in source code. To address this, we ground LLM reasoning in symbolic execution traces that explicitly capture such transitions. We propose Malice, a two-stage framework incorporating these traces: (1) guided multi-step reasoning that predicts invariants via chain-of-thought analysis of traces, and (2) agentic iterative refinement that corrects candidates through verification tool feedback. Evaluated on LIG-MM+, a benchmark featuring common operations on typical memory structures, Malice substantially outperforms existing approaches.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

lune papers fulltext 0e57fa3a-62c6-4c6e-a700-8fd851adb280

Builds on5

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines