Refinement types have been extensively used in class-based languages to specify and verify fine-grained logical specifications. Despite the advances in practical aspects such as applicability and usability, two fundamental issues persist. First, the soundness of existing class-based refinement type systems is inadequately explored, casting doubts on their reliability. Second, the expressiveness of existing systems is limited, restricting the depiction of semantic properties related to object-oriented constructs. This work tackles these issues through a systematic framework. We formalize a declarative class-based refinement type calculus (named RFJ), that is expressive and concise. We rigorously develop the soundness meta-theory of this calculus, followed by its mechanization in Coq. Finally, to ensure the calculus’s verifiability, we propose an algorithmic verification approach based on a fragment of first-order logic (named LFJ), and implement this approach as a type checker.
@InProceedings{sun_et_al:LIPIcs.ECOOP.2024.39, author = {Sun, Ke and Wang, Di and Chen, Sheng and Wang, Meng and Hao, Dan}, title = {{Formalizing, Mechanizing, and Verifying Class-Based Refinement Types}}, booktitle = {38th European Conference on Object-Oriented Programming (ECOOP 2024)}, pages = {39:1--39:30}, series = {Leibniz International Proceedings in Informatics (LIPIcs)}, ISBN = {978-3-95977-341-6}, ISSN = {1868-8969}, year = {2024}, volume = {313}, editor = {Aldrich, Jonathan and Salvaneschi, Guido}, publisher = {Schloss Dagstuhl -- Leibniz-Zentrum f{\"u}r Informatik}, address = {Dagstuhl, Germany}, URL = {https://drops.dagstuhl.de/entities/document/10.4230/LIPIcs.ECOOP.2024.39}, URN = {urn:nbn:de:0030-drops-208881}, doi = {10.4230/LIPIcs.ECOOP.2024.39}, annote = {Keywords: Refinement Types, Program Verification, Object-oriented Programming} }
Feedback for Dagstuhl Publishing