Software Tool Development Through the Visual Age for C++ Extension API:S

Total Page:16

File Type:pdf, Size:1020Kb

Software Tool Development Through the Visual Age for C++ Extension API:S Software Tool Development through the Visual Age for C++ Extension API:s by MINWEI WEI A thesis submitted to the Department of Electrical and Cornputer Engineering in confonnity with the requirements for the degree of Master of Science (Engineering) Queen's University Kingston, Ontario, Canada Dec, 2000 copyright O Minwei Wei, 2000 National Library Bibliothèque nationale 1*1 of Canada du Canada Acquisitions and Acquisitions et Bibliographic Services services bibliographiques 395 Wellington Street 395, nie Wellington Ottawa ON KIA ON4 Ottawa ON KI A ON4 Canada Canada The author has granted a non- L'auteur a accordé une licence non exclusive licence allowing the exclusive permettant a àa National Library of Canada to Bibliothèque nationale du Canada de reproduce, loan, distribute or sell reproduire' prêter, distribuer ou copies of this thesis in microform, vendre des copies de cette thèse sous paper or electronic formais. la forme de microfiche/fïh, de reproduction sur papier ou sur fomat électronique. The author retains ownership of the L'auteur conserve la propriété du copyright in this thesis. Neither the droit d'auteur qui protège cette thèse. thesis nor substantid extracts fiom it Ni la thèse ni des extraits substantiels may be printed or otherwise de celle-ci ne doivent être imprimés reproduced without the author's ou autrement reproduits sans son permission. autorisation. Glossary API - Application Program Interface. GUI - Graphic User Interface. IDE - Integrated Development Environment. incremental build - A compiling and linking process that depends on smaller language element than fde, for example, function, class and variable. This technique aUow fast rebuild after first build with minor change to a huge project since it only rebuild the Ianguage elements that are depends on the changed one(s). J2CPP - A Ci+ to Java wrapper generator developed by IBM. It takes Ci-+ header file as input and generate the wrapper fde for the definition in the header file to enable Java program directly use Ci+ classes. parser - Also known as a recognizer. A parser scans a Stream of input tokens or lexemes that constitute a source file or program. The parser can build a symbol table and a parse tree, but it does not generate the object code that constitutes the compiled program. parsing - The process of finding a parse tree for a given string of input tokens. Parsing is actually a two-part process consisting of breaking a sequence of characters into tokens (scanning) and building a symbol table and parse tree from the resulting sequence of tokens. token - The minimal lexical unit of input for a parser. A scanner groups appropriate sequences of characters into strings (or delimiters) classified as input tokens. translation - The process of converting a source language (for example C, C*, and Java) into a destination language (machine code, byte codes, or possibly another language like Pascal). OEten called compilation. UI. - User Interface, the interface between the human users and the computer prograrns- VAC - VisualAge for Cu, a integrated development environment developed by IBM that provide many utilities for building Ci+ language projects. visual GUI builder - A programming environment or a set of programming tools that enables rapid-graphic user interface construction by mostly mouse based operation. Abstract: Many software-engineering tasks require parsing source code. Typically, this has been accomplished by either independently developing the required parsing hinctionality or by rnodifying existing parsers. Both techniques, however, involve considerable effort and generally result in code with much less generality and sophistication than a parser included in a commercial availabIe compiler. In contrast, the IBM Visual Age C++ product wraps its interna1 CH- parser to offer a unique API (Application Programming Interface) set that provides aimost all the hinctionality of a Ctt parser. In this thesis, we wish to explore new directions for the application of this fimctionality in the areas of GUI integration, cross-language implementations and software reuse. The results of Our work shows that using this API will greatly simpliq both the tool development process and the resulting tool. In one of our exarnple, the tool rewntten with this API has only 1/30 lines of code of the original tool. This result cari be extended to many other applications designed, for example, to simpliS the construction of GUI'S, to display general information about a program, and to port between different languages. Glossary ....................,........................................................................................................ 1 Abstract: ............................................................................................................................ ILI -1 Introduction .......,....................................................................................................... 1 -1.1 Background and Motivation ............................................................................... I -1-2 Contributions of the Thesis .................................. ... I 1.2.1 Tool intemation and scalability .................................................................. I 1.2.2 GUI intemation ........................................................................................... 2 -1.2.3 Software reuse and cross-Ianguage. implementation ................................... 3 -1.3 Introduction to the APL ....................................................................................... 4 1.3.1 Cornmon Features ....................................................................................... 5 1.3.2 Stores........................................................................................................... 6 1.3.3 Downcasterss .............................................................................................. 6 1.3.4 Classifiers .................................................................................................... 7 -1.3-5 Iterators ........................ .... ............................................................................ 8 -2 Tools development and scalable IDE ......................................................................... 9 -2.1 VAC++ IDE Extensions ........................................ ................... 9 2.2 - Graphmrt Example. ............ .... ............................................................................9 -2.3 Filter exarn~le................... ... .....................................~.................................... 15 3 GUI intemtion ..................... .... ................................................................................ 21 - . -3.1 Graphical User Interface ................................................................................. 22 -3.2 htejgating GUI construction with the IDE ......................................................22 3.2.1 VACtt IDE introduction - Obiect fiow .................................................. 22 3.2.2 Intemtion-A sample study .................................................................... 23 3.2.3 Conclusion ................................................................................................ 29 -4 Cross-lanmaae- Irnplementation and Software Reuse .............................................. 3 1 -4.1 Introduction ..........................,,......................................................................... 3 1 -4.2 Introduction to Software Reuse ........................................................................ 3 1 4.3 Cross-lanmage and software reuse ............................................ ...33 -5 Rewriting the J2CPP Tooi ........................................................................................ 35 -5.1 JNI introduction ................................................................................................ 36 -5.2 API Re-implementation for the J2CPP tool .................. .. ...........................-42 5.2.1 TvDe conversion....................................................................................... 42 5.2.2 Method Wra~~inp;........................ ... ................................................... 63 -5 2.3 VariabIe wra~~ine;.................................................................................... 78 5.2.4 COIIS~UC~OXSWrapping .................... ....... .............................................. 85 -5.2.5 Destmctors and delete0 method ............................................................. 90 -5.2.6 Meritance .................................... ... ............................................---.-..92 -5.3 Resdt and Conclusion ..................................................................................-... 95 6 Siimmary and Conclusion ...................................................................................... 97 Reference: ....................... ...,.. ......................................................................................... 99 mA............................................................................................................................... 102 1 Introduction 1.1 Background and Motivation This thesis explores the unique features of the IBM Vis;ual Age CH- prodt ~ctin several areas of software engineering tool development. Unlike most existing software tools that parse C/C++ source code, the IBM product provides a simple and user-friendly Application Progamming Interface (AH) set that enables direct and immediate
Recommended publications
  • System Calls
    System Calls What are they? ● Standard interface to allow the kernel to safely handle user requests – Read from hardware – Spawn a new process – Get current time – Create shared memory ● Message passing technique between – OS kernel (server) – User (client) Executing System Calls ● User program issues call ● Core kernel looks up call in syscall table ● Kernel module handles syscall action ● Module returns result of system call ● Core kernel forwards result to user Module is not Loaded... ● User program issues call ● Core kernel looks up call in syscall table ● Kernel module isn't loaded to handle action ● ... ● Where does call go? System Call Wrappers ● Wrapper calls system call if loaded – Otherwise returns an error ● Needs to be in a separate location so that the function can actually be called – Uses function pointer to point to kernel module implementation Adding System Calls ● You'll need to add and implement: – int start_elevator(void); – int issue_request(int, int, int); – int stop_elevator(void); ● As an example, let's add a call to printk an argument passed in: – int test_call(int); Adding System Calls ● Files to add (project files): – /usr/src/test_kernel/hello_world/test_call.c – /usr/src/test_kernel/hello_world/hello.c – /usr/src/test_kernel/hello_world/Makefile ● Files to modify (core kernel): – /usr/src/test_kernel/arch/x86/entry/syscalls/syscall_64.tbl – /usr/src/test_kernel/include/linux/syscalls.h – /usr/src/test_kernel/Makefile hello_world/test_call.c ● #include <linux/linkage.h> ● #include <linux/kernel.h> ● #include
    [Show full text]
  • Programming Project 5: User-Level Processes
    Project 5 Operating Systems Programming Project 5: User-Level Processes Due Date: ______________________________ Project Duration: One week Overview and Goal In this project, you will explore user-level processes. You will create a single process, running in its own address space. When this user-level process executes, the CPU will be in “user mode.” The user-level process will make system calls to the kernel, which will cause the CPU to switch into “system mode.” Upon completion, the CPU will switch back to user mode before resuming execution of the user-level process. The user-level process will execute in its own “logical address space.” Its address space will be broken into a number of “pages” and each page will be stored in a frame in memory. The pages will be resident (i.e., stored in frames in physical memory) at all times and will not be swapped out to disk in this project. (Contrast this with “virtual” memory, in which some pages may not be resident in memory.) The kernel will be entirely protected from the user-level program; nothing the user-level program does can crash the kernel. Download New Files The files for this project are available in: http://www.cs.pdx.edu/~harry/Blitz/OSProject/p5/ Please retain your old files from previous projects and don’t modify them once you submit them. You should get the following files: Switch.s Runtime.s System.h System.c Page 1 Project 5 Operating Systems List.h List.c BitMap.h BitMap.c makefile FileStuff.h FileStuff.c Main.h Main.c DISK UserRuntime.s UserSystem.h UserSystem.c MyProgram.h MyProgram.c TestProgram1.h TestProgram1.c TestProgram2.h TestProgram2.c The following files are unchanged from the last project and you should not modify them: Switch.s Runtime.s System.h System.c -- except HEAP_SIZE has been modified List.h List.c BitMap.h BitMap.c The following files are not provided; instead you will modify what you created in the last project.
    [Show full text]
  • CS 0449: Introduction to Systems Software
    CS 0449: Introduction to Systems Software Jonathan Misurda Computer Science Department University of Pittsburgh [email protected] http://www.cs.pitt.edu/∼jmisurda Version 3, revision 1 Last modified: July 27, 2017 at 1:33 P.M. Copyright © 2017 by Jonathan Misurda This text is meant to accompany the course CS 0449 at the University of Pittsburgh. Any other use, commercial or otherwise, is prohibited without permission of the author. All rights reserved. Java is a registered trademark of Oracle Corporation. This reference is dedicated to the students of CS 0449, Fall 2007 (2081). Their patience in dealing with a changing course and feedback on the first version of this text was greatly appreciated. Contents Contents i List of Figures v List of Code Listings vii Preface ix 1 Pointers 1 1.1 Basic Pointers . 2 1.1.1 Fundamental Operations . 2 1.2 Passing Pointers to Functions . 4 1.3 Pointers, Arrays, and Strings . 5 1.3.1 Pointer Arithmetic . 6 1.4 Terms and Definitions . 7 2 Variables: Scope & Lifetime 8 2.1 Scope and Lifetime in C . 9 2.1.1 Global Variables . 11 2.1.2 Automatic Variables . 12 2.1.3 Register variables . 13 2.1.4 Static Variables . 13 2.1.5 Volatile Variables . 16 2.2 Summary Table . 17 2.3 Terms and Definitions . 17 ii Contents 3 Compiling & Linking: From Code to Executable 19 3.1 The Stages of Compilation . 19 3.1.1 The Preprocessor . 20 3.1.2 The Compiler . 21 3.1.3 The Linker . 22 3.2 Executable File Formats .
    [Show full text]
  • Foreign Library Interface by Daniel Adler Dia Applications That Can Run on a Multitude of Plat- Forms
    30 CONTRIBUTED RESEARCH ARTICLES Foreign Library Interface by Daniel Adler dia applications that can run on a multitude of plat- forms. Abstract We present an improved Foreign Function Interface (FFI) for R to call arbitary na- tive functions without the need for C wrapper Foreign function interfaces code. Further we discuss a dynamic linkage framework for binding standard C libraries to FFIs provide the backbone of a language to inter- R across platforms using a universal type infor- face with foreign code. Depending on the design of mation format. The package rdyncall comprises this service, it can largely unburden developers from the framework and an initial repository of cross- writing additional wrapper code. In this section, we platform bindings for standard libraries such as compare the built-in R FFI with that provided by (legacy and modern) OpenGL, the family of SDL rdyncall. We use a simple example that sketches the libraries and Expat. The package enables system- different work flow paths for making an R binding to level programming using the R language; sam- a function from a foreign C library. ple applications are given in the article. We out- line the underlying automation tool-chain that extracts cross-platform bindings from C headers, FFI of base R making the repository extendable and open for Suppose that we wish to invoke the C function sqrt library developers. of the Standard C Math library. The function is de- clared as follows in C: Introduction double sqrt(double x); We present an improved Foreign Function Interface The .C function from the base R FFI offers a call (FFI) for R that significantly reduces the amount of gate to C code with very strict conversion rules, and C wrapper code needed to interface with C.
    [Show full text]
  • Debugging Mixedenvironment Programs with Blink
    SOFTWARE – PRACTICE AND EXPERIENCE Softw. Pract. Exper. (2014) Published online in Wiley Online Library (wileyonlinelibrary.com). DOI: 10.1002/spe.2276 Debugging mixed-environment programs with Blink Byeongcheol Lee1,*,†, Martin Hirzel2, Robert Grimm3 and Kathryn S. McKinley4 1Gwangju Institute of Science and Technology, Gwangju, Korea 2IBM, Thomas J. Watson Research Center, Yorktown Heights, NY, USA 3New York University, New York, NY, USA 4Microsoft Research, Redmond, WA, USA SUMMARY Programmers build large-scale systems with multiple languages to leverage legacy code and languages best suited to their problems. For instance, the same program may use Java for ease of programming and C to interface with the operating system. These programs pose significant debugging challenges, because programmers need to understand and control code across languages, which often execute in different envi- ronments. Unfortunately, traditional multilingual debuggers require a single execution environment. This paper presents a novel composition approach to building portable mixed-environment debuggers, in which an intermediate agent interposes on language transitions, controlling and reusing single-environment debug- gers. We implement debugger composition in Blink, a debugger for Java, C, and the Jeannie programming language. We show that Blink is (i) simple: it requires modest amounts of new code; (ii) portable: it supports multiple Java virtual machines, C compilers, operating systems, and component debuggers; and (iii) pow- erful: composition eases debugging, while supporting new mixed-language expression evaluation and Java native interface bug diagnostics. To demonstrate the generality of interposition, we build prototypes and demonstrate debugger language transitions with C for five of six other languages (Caml, Common Lisp, C#, Perl 5, Python, and Ruby) without modifications to their debuggers.
    [Show full text]
  • Analyzing a Decade of Linux System Calls
    Noname manuscript No. (will be inserted by the editor) Analyzing a Decade of Linux System Calls Mojtaba Bagherzadeh Nafiseh Kahani · · Cor-Paul Bezemer Ahmed E. Hassan · · Juergen Dingel James R. Cordy · Received: date / Accepted: date Abstract Over the past 25 years, thousands of developers have contributed more than 18 million lines of code (LOC) to the Linux kernel. As the Linux kernel forms the central part of various operating systems that are used by mil- lions of users, the kernel must be continuously adapted to changing demands and expectations of these users. The Linux kernel provides its services to an application through system calls. The set of all system calls combined forms the essential Application Programming Interface (API) through which an application interacts with the kernel. In this paper, we conduct an empirical study of the 8,770 changes that were made to Linux system calls during the last decade (i.e., from April 2005 to December 2014) In particular, we study the size of the changes, and we manually identify the type of changes and bug fixes that were made. Our analysis provides an overview of the evolution of the Linux system calls over the last decade. We find that there was a considerable amount of technical debt in the kernel, that was addressed by adding a number of sibling calls (i.e., 26% of all system calls). In addition, we find that by far, the ptrace() and signal handling system calls are the most difficult to maintain and fix. Our study can be used by developers who want to improve the design and ensure the successful evolution of their own kernel APIs.
    [Show full text]
  • XL C/C++: Language Reference the Static Storage Class Specifier
    IBM XL C/C++ for Blue Gene/Q, V12.1 Language Reference Ve r s i o n 12 .1 GC14-7364-00 IBM XL C/C++ for Blue Gene/Q, V12.1 Language Reference Ve r s i o n 12 .1 GC14-7364-00 Note Before using this information and the product it supports, read the information in “Notices” on page 511. First edition This edition applies to IBM XL C/C++ for Blue Gene/Q, V12.1 (Program 5799-AG1) and to all subsequent releases and modifications until otherwise indicated in new editions. Make sure you are using the correct edition for the level of the product. © Copyright IBM Corporation 1998, 2012. US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. Contents About this information ........ix The register storage class specifier ......54 Who should read this information .......ix The __thread storage class specifier (IBM How to use this information .........ix extension) ..............56 How this information is organized .......ix Type specifiers .............58 Conventions ..............x Integral types.............58 Related information ...........xiii Boolean types ............59 IBM XL C/C++ information .......xiii floating-point types...........59 Standards and specifications .......xiv Character types ............60 Other IBM information .........xv The void type ............61 Other information ...........xv Vector types (IBM extension) .......61 Technical support ............xv User-defined types ...........62 How to send your comments ........xv The auto type specifier (C++0x) ......81 The decltype(expression) type specifier (C++0x) . 83 Chapter 1. Scope and linkage .....1 Compatibility of arithmetic types (C only) ....88 Type qualifiers .............89 Scope .................2 The __align type qualifier (IBM extension) .
    [Show full text]
  • Analyzing a Decade of Linux System Calls
    Empir Software Eng https://doi.org/10.1007/s10664-017-9551-z Analyzing a decade of Linux system calls Mojtaba Bagherzadeh1 · Nafiseh Kahani1 · Cor-Paul Bezemer1 · Ahmed E. Hassan1 · Juergen Dingel1 · James R. Cordy1 © Springer Science+Business Media, LLC 2017 Abstract Over the past 25 years, thousands of developers have contributed more than 18 million lines of code (LOC) to the Linux kernel. As the Linux kernel forms the central part of various operating systems that are used by millions of users, the kernel must be continuously adapted to the changing demands and expectations of these users. The Linux kernel provides its services to an application through system calls. The combined set of all system calls forms the essential Application Programming Interface (API) through which an application interacts with the kernel. In this paper, we conduct an empirical study of 8,770 changes that were made to Linux system calls during the last decade (i.e., from April 2005 to December 2014). In particular, we study the size of the changes, and we manually identify the type of changes and bug fixes that were made. Our analysis provides an overview of the evolution of the Linux system calls over the last decade. We find that there was a considerable amount of technical debt in the kernel, that was addressed by adding a number of sibling calls (i.e., 26% of all system calls). In addition, we find that by far, the ptrace() and signal handling Communicated by: Harald Gall Cor-Paul Bezemer [email protected] Mojtaba Bagherzadeh [email protected] Nafiseh Kahani [email protected] Ahmed E.
    [Show full text]
  • Bridging the Gap Between Haskell and Java
    Bridging the Gap between Haskell and Java Julian Fleischer June 27, 2013 Abstract This thesis investigates the possibility of translating interfaces between Haskell and Java libraries. Furthermore a library and a tool are developed for invoking the virtual machine from within Haskell processes and for the automatic trans- lation of Java APIs into Haskell. In dieser Arbeit wird die M¨oglichkeit einer Ubersetzung¨ von Schnittstellen zwis- chen Haskell und Java Bibliotheken untersucht. Außerdem werden eine Bib- liothek und ein Werkzeug entwickelt um die virtuelle Maschine aus Haskell Prozessen heraus zu nutzen und um automatische Ubersetzungen¨ von Java APIs nach Haskell durchzuf¨uhren.vorgesetellt Selbstst¨andigkeitserkl¨arung Hiermit best¨atigeich, dass ich die vorliegende Ausarbeitung mit dem Titel: \Bridging the Gap between Haskell and Java" selbstst¨andigund ohne unerlaubte Hilfe angefer- tigt habe. Ich versichere, dass ich ausschließlich die angegebenen Quellen in Anspruch genommen habe. Zitate sind als solche gekennzeichnet, durch Anf¨uhrungszeichen und Fußnoten. ||||||||||| Julian Fleischer Contents 1 Introduction and Motivation5 1.1 Scope of this Thesis............................5 1.2 Organization of this Document......................5 2 Similarities and Differences between Haskell & Java7 2.1 A Brief Overview of the Haskell Programming Language........7 2.2 A Brief Overview of the Java Programming Language.........7 2.3 Syntax and Semantics...........................8 2.3.1 (Restricted) Polymorphism....................8 2.3.2 Higher-kinded Polymorphism...................9 2.3.3 Order, State, and Side Effects................... 10 2.3.4 Excecution Model......................... 10 2.4 The Awkward Squad............................ 12 2.4.1 Exceptions............................. 12 2.4.2 The Java Virtual Machine..................... 13 2.4.3 Haskell Implementations.....................
    [Show full text]
  • System Call Tracing with Strace
    OpenFest 2015 System Call Tracing with strace c 2015 Michael Kerrisk man7.org Training and Consulting http://man7.org/training/ @mkerrisk [email protected] 7 November 2015 Sofia, Bulgaria @openfestbg #OpenFest2015 Outline 1 Preamble 2 Getting started 3 Tracing child processes 4 Filtering strace output 5 Further strace options Outline 1 Preamble 2 Getting started 3 Tracing child processes 4 Filtering strace output 5 Further strace options Who am I? Maintainer of Linux man-pages (since 2004) Documents kernel-user-space + C library APIs ˜1000 manual pages http://www.kernel.org/doc/man-pages/ Linux involvement: API review, testing, and documentation “Day job”: trainer, writer, programmer OpenFest 2015 (C) 2015 Michael Kerrisk Preamble 4 / 29 Audience Programmers? C/C++ Programmers? OpenFest 2015 (C) 2015 Michael Kerrisk Preamble 5 / 29 What is a system call? Various possible answers, from different perspectives Answer 1: request to kernel to perform a service Open a file Execute a new program Create a new process Send a message to another process Answer 2 (programmer’s perspective): “call a function” fd = open("myfile.txt", O_CREAT|O_RDWR, 0644); System call looks like any other function call OpenFest 2015 (C) 2015 Michael Kerrisk Preamble 6 / 29 What is a system call? Answer 3: entry point providing controlled mechanism to execute kernel code User-space programs can’t call functions inside kernel Syscall = one of few mechanisms by which program can ask to execute kernel code Others: /proc, /sys, etc. Set of system calls is: Operating-system specific
    [Show full text]
  • Checking Type Safety of Foreign Function Calls
    Checking Type Safety of Foreign Function Calls MICHAEL FURR and JEFFREY S. FOSTER University of Maryland, College Park Foreign function interfaces (FFIs) allow components in different languages to communicate directly with each other. While FFIs are useful, they often require writing tricky, low-level code and include little or no static safety checking, thus providing a rich source of hard-to-find programming errors. In this paper, we study the problem of enforcing type safety across the OCaml-to-C FFI and the Java Native Interface (JNI). We present O-Saffire and J-Saffire, a pair of multilingual type inference systems that ensure C code that uses these FFIs accesses high-level data safely. Our inference systems use representational types to model C's low-level view of OCaml and Java values, and singleton types to track integers, strings, memory offsets, and type tags through C. J-Saffire, our Java system, uses a polymorphic, flow-insensitive, unification-based analysis. Polymorphism is important because it allows us to precisely model user-defined wrapper functions and the more than 200 JNI functions. O-Saffire, our OCaml system, uses a monomorphic, flow-sensitive analysis, because while polymorphism is much less important for the OCaml FFI, flow-sensitivity is critical to track conditional branches, which are used when \pattern matching" OCaml data in C. O- Saffire also tracks garbage collection information to ensure that local C pointers to the OCaml heap are registered properly, which is not necessary for the JNI. We have applied O-Saffire and J-Saffire to a set of benchmarks and found many bugs and questionable coding practices.
    [Show full text]
  • Accessors and Views with Lifetime Extension
    Document number: P0066 Date: 2015–09–28 To: SC22/WG21 EWG Revises: N4221 References: N3918, N0345 Reply to: David Krauss (david_work at me dot com) Accessors and views with lifetime extension Abstract A new model associates an expression with the set of temporary objects needed to represent its value. This enables lifetime extension to work transparently through accessor functions which opt in using the export keyword. The same mechanism enables view classes and adaptors to retain an underlying container. The current lifetime extension behavior is also more elegantly described, and the “temporary expression” controversy is resolved. This solves EWG 120 and many other dangling reference issues. When lifetime extension is impossible, lifetime analysis is improved to enable diagnosis. No dedicated lifetime analyzer is needed; export annotations take only three distinct values. Full polymorphic lifetime analysis is left open to future development. Since the export keyword marks accessor functions, it also provides a notation to eliminate the boilerplate associated with const- and rvalue- (&&) qualified overloads. !1 1. Background.................................................................................................................... 3 1.1. Origins of lifetime extension 1.2. Status quo 1.3. Temporary expressions 2. Motivating examples...................................................................................................... 5 2.1. Range-based for statement 2.2. Value-selection functions 2.3. Refactoring argument expressions 2.4. Views and ranges as handles 2.5. Return by output parameter and method chaining 2.5.1. Expression templates with rvalue semantics 2.6. Accessor boilerplate 2.6.1. Rvalue accessor conventions 2.7. Diagnosis of dangling references 2.7.1. Hard diagnosis in NSDMIs 3. Analysis.......................................................................................................................... 8 3.1. Referents of glvalues 3.2. Referents of pointers 3.3.
    [Show full text]