Static Analysis Usage for Customizable Semantic Checks of C and C++ Programming Languages Constraints

Author(s):  
Valery Ignatyev
Author(s):  
A. A. Nedbaylov

The calculations required in project activities for engineering students are commonly performed in electronic spreadsheets. Practice has shown that utilizing those calculations could prove to be quite difficult for students of other fields. One of the causes for such situation (as well as partly for problems observed during Java and C programming languages courses) lies in the lack of a streamlined distribution structure for both the source data and the end results. A solution could be found in utilizing a shared approach for information structuring in spreadsheet and software environment, called “the Book Method”, which takes into account the engineering psychology issues regarding the user friendliness of working with electronic information. This method can be applied at different levels in academic institutions and at teacher training courses.


2012 ◽  
Vol 9 (3) ◽  
pp. 1187-1202
Author(s):  
Zalán Szűgyi ◽  
Márk Török ◽  
Norbert Pataki ◽  
Tamás Kozsik

Nowadays, one of the most important challenges in programming is the efficient usage of multicore processors. All modern programming languages support multicore programming at native or library level. C++11, the next standard of the C++ programming language, also supports multithreading at a low level. In this paper we argue for some extensions of the C++ Standard Template Library based on the features of C++11. These extensions enhance the standard library to be more powerful in the multicore realm. Our approach is based on functors and lambda expressions, which are major extensions in the language. We contribute three case studies: how to efficiently compose functors in pipelines, how to evaluate boolean operators in parallel, and how to efficiently accumulate over associative functors.


2020 ◽  
Vol 23 (3) ◽  
pp. 473-493
Author(s):  
Nikita Andreevich Kataev ◽  
Alexander Andreevich Smirnov ◽  
Andrey Dmitrievich Zhukov

The use of pointers and indirect memory accesses in the program, as well as the complex control flow are some of the main weaknesses of the static analysis of programs. The program properties investigated by this analysis are too conservative to accurately describe program behavior and hence they prevent parallel execution of the program. The application of dynamic analysis allows us to expand the capabilities of semi-automatic parallelization. In the SAPFOR system (System FOR Automated Parallelization), a dynamic analysis tool has been implemented, based on on the instrumentation of the LLVM representation of an analyzed program, which allows the system to explore programs in both C and Fortran programming languages. The capabilities of the static analysis implemented in SAPFOR are used to reduce the overhead program execution, while maintaining the completeness of the analysis. The use of static analysis allows to reduce the number of analyzed memory accesses and to ignore scalar variables, which can be explored in a static way. The developed tool was tested on performance tests from the NAS Parallel Benchmarks package for C and Fortran languages. The implementation of dynamic analysis, in addition to traditional types of data dependencies (flow, anit, output), allows us to determine privitizable variables and a possibility of pipeline execution of loops. Together with the capabilities of DVM and OpenMP these greatly facilitates program parallelization and simplify insertion of the appropriate compiler directives.


2020 ◽  
Author(s):  
Kristóf Umann ◽  
Zoltán Porkoláb

Uninitialized variables have been a source of errors since the beginning of software engineering. Some programming languages (e.g. Java and Python) will automatically zero-initialize such variables, but others, like C and C++, leave their state undefined. While laying aside initialization in C and C++ might be a performance advantage if an initial value can't be supplied, working with such variables is an undefined behavior, and is a common source of instabilities and crashes. To avoid such errors, whenever meaningful initialization is possible, it should be used. Tools for detecting these errors run time have existed for decades, but those require the problematic code to be executed. Since in many cases the number of possible execution paths are combinatoric, static analysis techniques emerged as an alternative. In this paper, we overview the technique for detecting uninitialized C++ variables using the Clang Static Analyzer, and describe various heuristics to guess whether a specific variable was left in an undefined state intentionally. We implemented a prototype tool based on our idea and successfully tested it on large open source projects.


This chapter presents the computer implementation of the tree-based genetic programming in C# programming language. Since C# is a common object-oriented programming language, with little modification the source code presented in the chapter can be easily transformed into Java or C++ programming languages. The chapter covers all aspects of the implementation: node, chromosome, population, function set, and terminal set class implementations. The chapter is carefully structured, so at the end of the chapter fully working GP computer program will be implemented which can solve regression and multiclass classification problems. The reader should not worry about specific operating system, or development environment, since all code implementations are based on cross-OS and open source integrated development environment visual studio code which can run on Windows, Mac, or Linux.


In the recent years there has been a tremendous growth in the field of engineering and sciences, which aided in the growth and development of fast and comfortable transportation media, with this development the number of automobiles have drastically increased, which for sure is a great technological achievement but sadly with this growth, the traffic and the hustle and bustle on roads is unstoppable and with it the number of accidents and road casualties have tremendously increased. But, there is no easy and practical way to reduce the usage of the automobiles. Every day the mankind read about thousands of people dying of road casualties and most of them die because the families or the concerned ones of the indulged people are not timely informed. The death casualties can be minimized to a great extent by just timely informing the families of the concerned ones. The prototype in this paper is an accident notification systemESP8266 NodeMCU and a simple vibration sensor is the heart of this system. The vibration sensor continuously senses the vibrations and on exceeding a predefined threshold limit, sends out a notification to registered numbers. In the past similar models have been proposed, which used costlier sensors such as Accelerometerbut the design in this paper, used simpler and cheaper sensor. Moreover, in earlier designs GSM technology was used but proposed design uses a Wi-Fi based controller, which in comparison to GSM technology is more reliable and fast. Also earlier GSM module needed an additional microcontroller such as Arduino but the use of NodeMCU eliminates the requirement of any additional controller. The prototype system in this paper makes the use of message queuing telemetry transport (MQTT) protocol, which is a very reliable and fast communication protocol which further uses subscribe and publish technology. The IoT cloud platform used in this prototype is Adafruit IO which is quite simpler when compared to other cloud platforms such as Losant Platform and moreover the data is updated every two seconds in Adafruit IO. For the notification purpose protocol is used with the help of IFTTT platform and ClickSend platform, Applets and Triggers are created to fulfill the requirement. The controller is programed using basic C and C++ programming languages and Arduino IDE serves as the programming environment, various library files have also been used for the programming purposes.


2005 ◽  
Vol 12 (32) ◽  
Author(s):  
Anders Møller ◽  
Mads Østerby Olesen ◽  
Michael I. Schwartzbach

XSL Transformations (XSLT) is a programming language for defining transformations between XML languages. The structure of these languages is formally described by schemas, for example using DTD, which allows individual documents to be validated. However, existing XSLT tools offer no static guarantees that, under the assumption that the input is valid relative to the input schema, the output of the transformation is valid relative to the output schema.<br /> <br />We present a validation technique for XSLT based on the summary graph formalism introduced in the static analysis of JWIG Web services. Being able to provide static guarantees, we can detect a large class of errors in an XSLT stylesheet at the time it is written instead of later when it has been deployed, and thereby provide benefits similar to those of static type checkers for modern programming languages.<br /> <br />Our analysis takes a pragmatic approach that focuses its precision on the essential language features but still handles the entire XSLT 1.0 language. We evaluate the analysis precision on a range of real stylesheets and demonstrate how it may be useful in practice.


Sign in / Sign up

Export Citation Format

Share Document