Explore chapters and articles related to this topic
DO-332 and Object-Oriented Technology and Related Techniques
Published in Leanna Rierson, Developing Safety-Critical Software, 2017
The issues identified in the OOTiA Handbook became the foundation for evaluating OOT in aviation projects. Applicants and software developers were requested to ensure that their OOT approach addressed the issues identified in volume 2 of the OOTiA Handbook. Volume 3 of the OOTiA Handbook suggested some ways to address the issues raised in the following 10 areas: (1) single inheritance and dynamic dispatch, (2) multiple inheritance, (3) templates, (4) inlining, (5) type conversion, (6) overloading and method resolution, (7) dead and deactivated code and reuse, (8) object-oriented tools, (9) traceability, and (10) structural coverage.
Optimizing Discrete Modeling and Simulation for Real-Time Constraints with Metaprogramming
Published in Katalin Popovici, Pieter J. Mosterman, Real-Time Simulation Technologies, 2017
Luc Touraille, Jonathan Caux, David Hill
Virtual calls dispatch. Genericity is often achieved through inheritance and polymorphism. However, polymorphism comes at a price: since method calls must be bound at runtime, the compiler is deprived of several optimization opportunities, such as inlining. Moreover, the dynamic dispatch most of the time implies additional computation (e.g., a lookup in a virtual method table) generating some overhead. By using a technique called static polymorphism, it is possible to effectively achieve polymorphism at the metaprogram level and remove any necessity for it in the object program.
Efficient computation of derivatives for solving optimization problems in R and Python using SWIG-generated interfaces to ADOL-C†
Published in Optimization Methods and Software, 2018
K. Kulshreshtha, S.H.K. Narayanan, J. Bessac, K. MacIntyre
Another difficulty is imposed by the structure of the R language. It does not allow for operator overloading in the same sense as C++ does. The C++ compiler generates additional code and lookup tables so that the correct operator or function can be chosen at runtime, based on context in any expression, that is, dynamic dispatch. In R, the programmer is responsible for checking the arguments to any overloaded function or operator and dispatching the correct version. As a safeguard against inadvertent overloading of common mathematical operators, the SWIG-generated interface contains named functions for such operators; for example, ‘Plus‘ is generated in R for the C++ operator +. To utilize operator overloading correctly, we needed to modify the generated R source code to save the existing definition of ‘+‘ as shown in the first line of Figure 2(b) and dispatch it if the arguments are not the data types we expect for the ADOL-C library.