Lune

ISSTA2025Top-tier venue

Tratto: A Neuro-Symbolic Approach to Deriving Axiomatic Test Oracles

Davide Molinelli, Alberto Martin-Lopez, Elliott Zackrone, Beyza Eken, Michael D. Ernst, Mauro Pezzè

Abstract

This paper presents Tratto, a neuro-symbolic approach that generates assertions (boolean expressions) that can serve as axiomatic oracles, from source code and documentation. The symbolic module of Tratto takes advantage of the grammar of the programming language, the unit under test, and the context of the unit (its class and available APIs) to restrict the search space of the tokens that can be successfully used to generate valid oracles. The neural module of Tratto uses transformers fine-tuned for both deciding whether to output an oracle or not and selecting the next lexical token to incrementally build the oracle from the set of tokens returned by the symbolic module. Our experiments show that Tratto outperforms the state-of-the-art axiomatic oracle generation approaches, with 73% accuracy, 72% precision, and 61% F1-score, largely higher than the best results of the symbolic and neural approaches considered in our study (61%, 62%, and 37%, respectively). Tratto can generate three times more axiomatic oracles than current symbolic approaches, while generating 10 times less false positives than GPT4 complemented with few-shot learning and Chain-of-Thought prompting.

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

4 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • TOGA: A Neural Method for Test Oracle Generation cites Evolutionary improvement of assertion oracles
  • TOGA: A Neural Method for Test Oracle Generation cites On learning meaningful assert statements for unit test cases
  • Do LLMs Generate Useful Test Oracles? An Empirical Study with an Unbiased Dataset cites TOGA: A Neural Method for Test Oracle Generation
  • Do LLMs Generate Useful Test Oracles? An Empirical Study with an Unbiased Dataset cites On learning meaningful assert statements for unit test cases
  • LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test Generation cites Chain-of-Thought Prompting Elicits Reasoning in Large Language Models
  • RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement Learning cites TOGA: A Neural Method for Test Oracle Generation
  • RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement Learning cites On learning meaningful assert statements for unit test cases
  • RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement Learning cites SATORI: Static Test Oracle Generation for REST APIs
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers4

  1. Do LLMs Generate Useful Test Oracles? An Empirical Study with an Unbiased DatasetDavide Molinelli, Luca Di Grazia, Alberto Martin-Lopez, Michael D. Ernst et al.ASE 2025 · 3 citations
  2. SATORI: Static Test Oracle Generation for REST APIsJuan C. Alonso, Alberto Martin-Lopez, Sergio Segura, Gabriele Bavota et al.ASE 2025 · 2 citations
  3. LSPRAG: LSP-Guided RAG for Language-Agnostic Real-Time Unit Test GenerationGwihwan Go, Quan Zhang, Chijin Zhou, Zhao Wei et al.ICSE 2026 · 2 citations
  4. RESTOR: Automated Test Oracle Generation for RESTful APIs via Reinforcement LearningXun Zhou, Zhen Dong, Mingyu Ren, Qiang Li et al.ISSTA 2026

Builds on9

  1. Chain-of-Thought Prompting Elicits Reasoning in Large Language ModelsJason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma et al.NeurIPS 2022 · 22,562 citations
  2. Code Prediction by Feeding Trees to TransformersSeohyun Kim, Jinman Zhao, Yuchi Tian, Satish ChandraICSE 2021 · 179 citations
  3. On learning meaningful assert statements for unit test casesCody Watson, Michele Tufano, Kevin Moran, Gabriele Bavota et al.ICSE 2020 · 96 citations
  4. TOGA: A Neural Method for Test Oracle GenerationElizabeth Dinella, Gabriel Ryan, Todd Mytkowicz, Shuvendu K. LahiriICSE 2022 · 92 citations
  5. Evolutionary improvement of assertion oraclesValerio Terragni, Gunel Jahangirova, Paolo Tonella, Mauro PezzèFSE 2020 · 50 citations

Related papers

  1. Towards More Realistic Evaluation for Neural Test Oracle GenerationZhongxin Liu, Kui Liu, Xin Xia, Xiaohu YangISSTA 2023 · 24 citations
  2. FactReasoner: A Probabilistic Approach to Long-Form Factuality Assessment for Large Language ModelsRadu Marinescu, Debarun Bhattacharjya, Junkyu Lee, Tigran T. Tchrakian et al.EMNLP Findings 2025 · 2 citations
  3. TrustTable: A Neuro-Symbolic Auditing Framework for Faithful Table QAGuangzhen Zhao, Dechang Kong, Tongyu Wu, Zhenjiang DongACL 2026
  4. STARS: Static Analysis-Guided Assertion Synthesis using Large Language ModelsJialun Cao, Haoyu Wang, Haoran Yan, Ming Wen et al.ISSTA 2026
  5. LINC: A Neurosymbolic Approach for Logical Reasoning by Combining Language Models with First-Order Logic ProversTheo Olausson, Alex Gu, Benjamin Lipkin, Cedegao E. Zhang et al.EMNLP 2023 · 37 citations
Dusk over the sea between two cliffs drawn in fine vertical lines