Write a Blog >>
CC 2020
Sat 22 - Wed 26 February 2020 San Diego, California, United States
Sun 23 Feb 2020 11:16 - 11:40 - Session 5 Graphs and more Chair(s): EunJung (EJ) Park

Most implementations of the C++ programming language generate binary executable code. However, interpreted execution of C++ sources has its own use cases as the Cling interpreter from CERN’s ROOT project has shown. Some limitations are derived from the ODR (One Definition Rule) that rules out multiple definitions of entities within a single translation unit (TU). ODR is there to ensure uniform view of a given C++ entity across translation units. Ensuring uniform view of C++ entities helps when producing ABI compatible binaries. Interpreting C++ presumes a single ever-growing translation unit that define away some of the ODR use-cases. Therefore, it may well be desirable to relax the ODR and, consequently, to support the ability of developers to override any existing definition for a given declaration. This approach is especially well-suited for iterative prototyping. In this paper, we extend Cling, a Clang/LLVM-based C++ interpreter, to enable redefinitions of C++ entities at the prompt. To achieve this, top-level declarations are nested into inline namespaces and the translation unit lookup table is adjusted to invalidate previous definitions that would otherwise result in ambiguities. Formally, this technique refactors the code to an equivalent that does not violate the ODR, as each definition is nested in a different namespace. Furthermore, any previous definition that has been shadowed is still accessible by means of its fully-qualified name. A prototype implementation of the presented technique has been integrated into the Cling C++ interpreter, showing that our technique is feasible and usable.

Sun 23 Feb

Displayed time zone: Pacific Time (US & Canada) change

10:30 - 11:40
Session 5 Graphs and moreMain Conference
Chair(s): EunJung (EJ) Park Los Alamos National Laboratory
10:30
23m
Research paper
Compiler-Based Graph Representations for Deep Learning Models of Code
Main Conference
Alexander Brauckmann TU Dresden, Germany, Andrés Goens TU Dresden, Sebastian Ertel Composable Operating Systems Group, Barkhausen Institute, Dresden, Jeronimo Castrillon TU Dresden, Germany
10:53
23m
Research paper
Postcondition-Preserving Fusion of Postorder Tree Transformations
Main Conference
Eleanor Davies University of Warwick, Sara Kalvala University of Warwick
11:16
23m
Research paper
Relaxing the One Definition Rule in Interpreted C++
Main Conference
Javier López-Gómez University Carlos III of Madrid, Javier Fernández University Carlos III of Madrid, David del Rio Astorga University Carlos III of Madrid, Vassil Vassilev Princeton University, Axel Naumann CERN, J. Daniel García University Carlos III of Madrid