An operational semantics and type safety proof for multiple inheritance in C++

被引:10
|
作者
Wasserrab, Daniel [1 ]
Nipkow, Tobias [2 ]
Snelting, Gregor [1 ]
Tip, Frank [3 ]
机构
[1] Univ Passau, Passau, Germany
[2] Tech Univ Munich, D-8000 Munich, Germany
[3] IBM Corp, TJ Watson Res Ctr, St Louis, MO 63123 USA
关键词
languages; theory; multiple inheritance; C plus; semantics; type safety;
D O I
10.1145/1167515.1167503
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We present an operational semantics and type safety proof for multiple inheritance in C++. The semantics models the behaviour of method calls, field accesses, and two forms of casts in C++ class hierarchies exactly, and the type safety proof was formalized and machine-checked in Isabelle/HOL. Our semantics enables one, for the first time, to understand the behaviour of operations on C++ class hierarchies without referring to implementation-level artifacts such as virtual function tables. Moreover, it can-as the semantics is executable-act as a reference for compilers, and it can form the basis for more advanced correctness proofs of, e. g., automated program transformations. The paper presents the semantics and type safety proof, and a discussion of the many subtleties that we encountered in modeling the intricate multiple inheritance model of C++.
引用
收藏
页码:345 / 362
页数:18
相关论文
共 50 条
  • [41] Workshop: Type-theoretic languages: Proof-search and semantics
    Galmiche, D
    [J]. AUTOMATED DEDUCTION - CADE-17, 2000, 1831 : 515 - 515
  • [42] Research on method of static analysis for safety of C++ program
    Lai, Xiaochen
    Wang, Xiaoliang
    Zhou, Kuanjiu
    Yao, Yanshuang
    Tang, Lemin
    Li, Likun
    [J]. International Journal of Advancements in Computing Technology, 2012, 4 (21) : 337 - 345
  • [43] New publication focuses on C++ in safety critical systems
    不详
    [J]. JOURNAL OF RESEARCH OF THE NATIONAL INSTITUTE OF STANDARDS AND TECHNOLOGY, 1996, 101 (03): : 414 - 414
  • [44] Casting in C++: Bringing safety and smartness to your programs
    Wise, GB
    [J]. ACM SIGPLAN NOTICES, 1996, 31 (08) : 10 - 15
  • [45] TYPE INFERENCE FOR RECORD CONCATENATION AND MULTIPLE INHERITANCE
    WAND, M
    [J]. INFORMATION AND COMPUTATION, 1991, 93 (01) : 1 - 15
  • [46] TYPE INFERENCE FOR RECORD CONCATENATION AND MULTIPLE INHERITANCE
    WAND, M
    [J]. FOURTH ANNUAL SYMPOSIUM ON LOGIC IN COMPUTER SCIENCE, 1989, : 92 - 97
  • [47] An Operational and Axiomatic Semantics for Non-determinism and Sequence Points in C
    Krebbers, Robbert
    [J]. ACM SIGPLAN NOTICES, 2014, 49 (01) : 101 - 112
  • [48] Handling multiple concurrent exceptions in C++ using futures
    Rintala, Matti
    [J]. ADVANCED TOPICS IN EXCEPTION HANDLING TECHNIQUES, 2006, 4119 : 62 - 80
  • [49] Type Checking Modular Multiple Dispatch with Parametric Polymorphism and Multiple Inheritance
    Allen, Eric
    Hilburn, Justin
    Kilpatrick, Scott
    Luchangco, Victor
    Ryu, Sukyoung
    Chase, David
    Steele, Guy L., Jr.
    [J]. ACM SIGPLAN NOTICES, 2011, 46 (10) : 973 - 992
  • [50] Type Checking Modular Multiple Dispatch with Parametric Polymorphism and Multiple Inheritance
    Allen, Eric
    Hilburn, Justin
    Kilpatrick, Scott
    Luchangco, Victor
    Ryu, Sukyoung
    Chase, David
    Steele, Guy L., Jr.
    [J]. OOPSLA 11: PROCEEDINGS OF THE 2011 ACM INTERNATIONAL CONFERENCE ON OBJECT ORIENTED PROGRAMMING SYSTEMS LANGUAGES AND APPLICATIONS, 2011, : 973 - 992