Explore chapters and articles related to this topic
Towards Self-securing Software Systems
Published in Ivan Mistrik, Matthias Galster, Bruce R. Maxim, Software Engineering for Variability Intensive Systems, 2019
Mohamed Abdelrazek, John Grundy, Amani Ibrahim
Figure 5.8 (a) shows an example of the toolset we have developed to support these re-aspect runtime code update and Figure 5.8 (b) an example of the tool in use. (1) We first convert a target code base into Abstract Syntax Tree format (AST). (2,3) Formal signatures are constructed using a modelling tool, an example shown in the screen dump in Figure 5.8 (b). (4) We then use this set of re-aspect formal signatures to locate parts of the code base to modify. (5) We then determine the full impact analysis of making the code change, which may be at statement, method, class or caller (system-wide) levels, to determine the full set of code changes needed. (6) Finally we propagate changes to the code of the application. We have a .NET-based tool that is able to do this at runtime, modifying compiled CLI code of the application [3].
Model-Based Development of Automotive Embedded Systems
Published in Nicolas Navet, Françoise Simonot-Lion, Automotive Embedded Systems Handbook, 2017
Martin Törngren, DeJiu Chen, Diana Malvius, Jakob Axelsson
Modeling and programming languages are defined using the concepts of syntax and semantics, and in more detail in terms of an abstract syntax, a concrete syntax, and its interpretation [79]. The abstract syntax defines the concepts, relationships, integrity constraints, and model composition principles available in the language, thus determining all the syntactically correct models that can be built. The concrete syntax defines the form of visualization; graphical, textual, or both. The interpretation defines the meaning of the entities of the language and the resulting models, that is, its semantics. The definition of a language’s abstract and concrete syntax is sometimes called its metamodel. A meta–meta model is a modeling language that can be used to define different metamodels. This terminology is used by the Object Management Group (OMG), see Ref. [36], and is exemplified by the definition of meta-object facility (MOF) (the OMG [107]), upon which the definition of the UML2 is based.
SmartAnvil
Published in Massimo Ragnedda, Giuseppe Destefanis, Blockchain and Web 3.0, 2019
Stéphane Ducasse, Henrique Rocha, Santiago Bragagnolo, Marcus Denker, Clément Francomme
Usually, static analysis is employed to examine programming language artifacts. Since Solidity is a programming language and smart contracts are its artifacts, we use static analysis techniques to implement tools for contract understanding and analyses [CCI90]. At their basis, most static analysis foundation techniques rely on ASTs (Abstract Syntax Tree). For instance, it is much easier to create code inspection tools on top of an AST than to rely on the purely textual contents of a contract. Therefore, to build static analyses for Solidity contracts, we need a way to create ASTs. Consequently, we require a parser to read Solidity source code and output a relevant AST representation of it.
Elementary operations: a novel concept for source-level timing estimation
Published in Automatika, 2019
Nikolina Frid, Danko Ivošević, Vlado Sruk
Application profiling uses code analysis and profiling method described in [19] which is slightly adapted to be compatible with the elementary operations classification scheme. Application source code processing starts with the generation of call-tree statistics to produce profiling information at procedure call-graph abstraction level. The compiler transformation flow starts with parsing the source code to the abstract syntax tree (AST). During recursive traversal of the tree, information about data structures, types of variables and procedure arguments is used to identify elementary operations according to the proposed classification scheme. AST is further transformed to a control and data flow graph (CDFG) representation by using recursive traversal of the tree with the introduction of temporary variables that form the three-address code statement notation. During that process, the key is recognizing points where uniform instruction flow is broken by condition testing in branch or loop jump conditions. The final application profile is obtained by unifying procedures calls statistics and profiles obtained using AST and CDFG for each procedure separately.
PDEModelica1: a Modelica language extension for partial differential equations implemented in OpenModelica
Published in International Journal of Modelling and Simulation, 2018
Jan Šilar, Filip Ježek, Jiří Kofránek
OMC is composed of several components. They are described in the same order as the order in which they process a model: the Lexer reads the model text file and splits it into individual keywords and other tokens. The parser builds an abstract syntax tree of these tokens. The front end flattens the model – among others, all classes except the top-level main class are removed and their variables and equations are moved to the top-level class. All derived types are converted into base types (Real, Integer, Boolean, String). All the operations here are in regard to the high-level language constructs reduction. Then equations are prepared for the solution process in the back end. They are sorted in the order they will be evaluated. Systems of equations that must be solved together are marked. Equations are simplified and solved for some variables. Finally the C (or other language) code representing the model is generated using templates. This generated code is compiled and linked with the simulation runtime. Thus, an executable for solving the model is built.
Modeling, analysis and verification of real-time resource access control protocols: a formal approach
Published in International Journal of Computers and Applications, 2018
Rumpa Hazra, Shouvik Dey, Jayashree Singha
ANTLR [20] is a parser generator in computer-based language recognition. Alike LEX/YACC duo, ANTLR is a ‘translator generator tool.’ Language grammars for ANTLR are defined either in ANTLR syntax or in a special Abstract Syntax Tree (AST) syntax. The ANTLR syntax is more like YACC and Extended Backus-Naur Form.