Unifying execution of imperative generators and declarative specifications
Pengyu Nie, Marinela Parovic, Zhiqiang Zang, Sarfraz Khurshid, Aleksandar Milicevic, Milos Gligoric
Abstract
We present Deuterium---a framework for implementing Java methods as executable contracts. Deuterium introduces a novel, type-safe way to write method contracts entirely in Java, as a combination of imperative generators and declarative specifications (written in a first-order relational logic with transitive closure). Existing approaches are typically based on encoding both the specification and the program heap into a constraint language, and then using an off-the-shelf constraint solver---without any additional guidance---to search for a new program heap that satisfies the specification. Deuterium takes advantage of user-provided generators to prune the search space and reduce incurred overhead of constraint solving. Deuterium supports two ways of solving declarative constraints: SAT-based and search-based with in-memory state exploration. We evaluate our approach on a suite of data structures, established as a standard benchmark by prior work. Furthermore, we use random and sequence-based test generation to create a new benchmark designed to mimic realistic execution scenarios. Our results show that generators improve the performance of executable contracts and that in-memory state exploration is the algorithm of choice when heap sizes are small.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Your agent calls
Lunesearch_papers
Free to start. No credit card required.
Terminal
Install the CLIlune papers get e693be26-13fc-41d3-9d34-ea7b3b4cbc85Cited by top-tier papers4
- Synthesizing contracts correct modulo a test generatorAngello Astorga, Shambwaditya Saha, Ahmad Dinkins, Felicia Wang et al.OOPSLA 2021 · 13 citations
- Inline TestsYu Liu, Pengyu Nie, Owolabi Legunsen, Milos GligoricASE 2022 · 10 citations
- Extracting Inline Tests from Unit TestsYu Liu, Pengyu Nie, Anna Guo, Milos Gligoric et al.ISSTA 2023 · 7 citations
- Object Graph ProgrammingAditya Thimmaiah, Leonidas Lampropoulos, Christopher J. Rossbach, Milos GligoricICSE 2024 · 1 citation
Related papers
- Verification Modulo Tested Library ContractsAbhishek Uppar, Omar Muhammad, Sumanth Prabhu S, Deepak D'Souza et al.PLDI 2026 · 1 citation
- Fuzzing Class SpecificationsFacundo Molina, Marcelo d'Amorim, Nazareno AguirreICSE 2022 · 25 citations
- Efficient Synthesis of Method Call Sequences for Test Generation and Bounded VerificationYunfan Zhang, Ruidong Zhu, Yingfei Xiong, Tao XieASE 2022 · 2 citations
- EvoSpex: An Evolutionary Algorithm for Learning PostconditionsFacundo Molina, Pablo Ponzio, Nazareno Aguirre, Marcelo F. FriasICSE 2021
- FO-Complete Program Verification for Heap LogicsAdithya Murali, Hrishikesh Balakrishnan, Aaron Councilman, P. MadhusudanOOPSLA 2025
