Verifying traits: an incremental proof system for fine-grained reuse

Author:

Damiani Ferruccio1,Dovland Johan2,Johnsen Einar Broch2,Schaefer Ina3

Affiliation:

1. Dipartimento di Informatica, Università di Torino, Torino, Italy

2. Department of Informatics, University of Oslo, PO Box 1080, 0316, Blindern, Oslo, Norway

3. Institute for Software Engineering, Technische Universität Braunschweig, Brunswick, Germany

Abstract

Abstract Traits have been proposed as a more flexible mechanism than class inheritance for structuring code in object-oriented programming, to achieve fine-grained code reuse. A trait originally developed for one purpose can be adapted and reused in a completely different context. Formalizations of traits have been extensively studied, and implementations of traits have started to appear in programming languages. So far, work on formally establishing properties of trait-based programs has mostly concentrated on type systems. This paper presents the first deductive proof system for a trait-based object-oriented language. If a specification of a trait can be given a priori, covering all actual usage of that trait, our proof system is modular as each trait is analyzed only once. However, imposing such a restriction may in many cases unnecessarily limit traits as a mechanism for flexible code reuse. In order to reflect the flexible reuse potential of traits, our proof system additionally allows new specifications to be added to a trait in an incremental way which does not violate established proofs. We formalize and show the soundness of the proof system.

Publisher

Association for Computing Machinery (ACM)

Subject

Theoretical Computer Science,Software

Cited by 11 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Partial Proofs to Optimize Deductive Verification of Feature-Oriented Software Product Lines;Proceedings of the 18th International Working Conference on Variability Modelling of Software-Intensive Systems;2024-02-07

2. Correctness-by-Construction Meets Refinement Types;Proceedings of the 25th ACM International Workshop on Formal Techniques for Java-like Programs;2023-07-18

3. Flexible Correct-by-Construction Programming;Logical Methods in Computer Science;2023-06-07

4. Traits: Correctness-by-Construction for Free;Formal Techniques for Distributed Objects, Components, and Systems;2022

5. Featherweight Swift: a Core calculus for Swift’s type system;Proceedings of the 13th ACM SIGPLAN International Conference on Software Language Engineering;2020-11-15

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3