AI-Powered Class Invariant Generation

AI-Powered Class Invariant Generation

Using LLMs to Automate Critical Software Specifications

ClassInvGen is a novel approach that leverages large language models to automatically generate high-quality class invariants for C++ programs, filling a critical gap in formal program specification.

  • Achieves higher precision (97.1%) compared to existing approaches
  • Generates more expressive invariants than traditional techniques
  • Combines LLM strengths with formal verification techniques
  • Shows practical relevance with successful application to real-world codebases

This research enables more reliable software engineering by automating specification creation, reducing developer effort while enhancing code quality and maintainability through formal verification.

ClassInvGen: Class Invariant Synthesis using Large Language Models

188 | 323