ClassInvGen: Class Invariant Synthesis Using Large Language Models. Sun, C., Agashe, V., Chakraborty, S., Taneja, J., Barrett, C., Dill, D., Qiu, X., & Lahiri, S. K. In Giacobbe, M. & Lukina, A., editors, AI Verification, pages 64–96, Cham, 2026. Springer Nature Switzerland.
doi  abstract   bibtex   
Formal program specifications in the form of preconditions, postconditions, and class invariants have several benefits for the construction and maintenance of programs. They not only aid in program understanding due to their unambiguous semantics but can also be enforced dynamically (or even statically when the language supports a formal verifier). However, synthesizing high-quality specifications in an underlying programming language is limited by the expressivity of the specifications or the need to express them in a declarative manner. Prior work has demonstrated the potential of large language models (LLMs) for synthesizing high-quality method pre/postconditions for Python and Java, but does not consider class invariants.
@inproceedings{sun_classinvgen_2026,
	address = {Cham},
	title = {{ClassInvGen}: {Class} {Invariant} {Synthesis} {Using} {Large} {Language} {Models}},
	isbn = {978-3-031-99991-8},
	shorttitle = {{ClassInvGen}},
	doi = {10.1007/978-3-031-99991-8_4},
	abstract = {Formal program specifications in the form of preconditions, postconditions, and class invariants have several benefits for the construction and maintenance of programs. They not only aid in program understanding due to their unambiguous semantics but can also be enforced dynamically (or even statically when the language supports a formal verifier). However, synthesizing high-quality specifications in an underlying programming language is limited by the expressivity of the specifications or the need to express them in a declarative manner. Prior work has demonstrated the potential of large language models (LLMs) for synthesizing high-quality method pre/postconditions for Python and Java, but does not consider class invariants.},
	language = {en},
	booktitle = {{AI} {Verification}},
	publisher = {Springer Nature Switzerland},
	author = {Sun, Chuyue and Agashe, Viraj and Chakraborty, Saikat and Taneja, Jubi and Barrett, Clark and Dill, David and Qiu, Xiaokang and Lahiri, Shuvendu K.},
	editor = {Giacobbe, Mirco and Lukina, Anna},
	year = {2026},
	keywords = {Class Invariants, Formal Verification, Large Language Models, Program Synthesis},
	pages = {64--96},
}

Downloads: 0