15,442 research outputs found
Introduction to the GiNaC Framework for Symbolic Computation within the C++ Programming Language
The traditional split-up into a low level language and a high level language
in the design of computer algebra systems may become obsolete with the advent
of more versatile computer languages. We describe GiNaC, a special-purpose
system that deliberately denies the need for such a distinction. It is entirely
written in C++ and the user can interact with it directly in that language. It
was designed to provide efficient handling of multivariate polynomials,
algebras and special functions that are needed for loop calculations in
theoretical quantum field theory. It also bears some potential to become a more
general purpose symbolic package
Runtime Enforcement of Memory Safety for the C Programming Language
Memory access violations are a leading source of unreliability in C programs. Although the low-level features of the C programming language, like unchecked pointer arithmetic and explicit memory management, make it a desirable language for many programming tasks, their use often results in hard-to-detect memory errors. As evidence of this problem, a variety of methods exist for retrofitting C with software checks to detect memory errors at runtime. However, these techniques generally suffer from one or more practical drawbacks that have thus far limited their adoption. These weaknesses include the inability to detect all spatial and temporal violations, the use of incompatible metadata, the need for manual code modifications, and the tremendous runtime cost of providing complete safety.
This dissertation introduces MemSafe, a compiler analysis and transformation for ensuring the memory safety of C programs at runtime while avoiding the above drawbacks. MemSafe makes several novel contributions that improve upon previous work and lower the runtime cost of achieving memory safety. These include (1) a method for modeling temporal errors as spatial errors, (2) a hybrid metadata representation that combines the most salient features of both object- and pointer-based approaches, and (3) a data-flow representation that simplifies optimizations for removing unneeded checks and unused metadata.
Experimental results indicate that MemSafe is capable of detecting memory safety violations in real-world programs with lower runtime overhead than previous methods. Results show that MemSafe detects all known memory errors in multiple versions of two large and widely-used open source applications as well as six programs from a benchmark suite specifically designed for the evaluation of error detection tools. MemSafe enforces complete safety with an average overhead of 88% on 30 widely-used performance evaluation benchmarks. In comparison with previous work, MemSafe's average runtime overhead for one common benchmark suite (29%) is a fraction of that associated with the previous technique (133%) that, until now, had the lowest overhead among all existing complete and automatic methods that are capable of detecting both spatial and temporal violations
Fluent User Defined Function: WindCube_comp_sim : NORSEWInD Report UOSNW013
This report describes the Fluent User Defined Function WindCube_comp_sim used to interrogate FLUENT a Fluent data set by simulating the operation of a LeoSphere Windcube LiDAR. The user defined function is contained in the program lidar.c (version 1.06) which has been written in the C programming language. This report contains a listing of the user defined function, describes its method of operation and presents a validation of the analysis process. The report also includes a description of the output data file formats
Cview, a graphical program generator for the C programming language
The electronics industry has long been a user of graphical design aids. Graphical design tools for VLSI circuits are used to lay out the design, generate data structures for the simulation of the circuit and eventually produce the photomasks for the production of the chip. As such these tools form a working environment that allows an engineer to design, debug and produce a final product. Software design, in general, is still done by writing individual lines of code. At best a macro language or a meta-language will be available to ease the pain of detail coding. While these tools are useful, they are text oriented instead of graphics oriented. It makes more sense to allow programmers to draw regular features of their programs, just as VLSI designers use libraries of common electronic devices. Source code could then be generated from the drawing. A software package, Cview, has been designed and implemented to explore the idea of computer aided software design
User Defined Function: lidar_3D : NORSEWInD Report UoSNW006
This report describes the User Defined Function Lidar_3D used to interrogate FLUENT data files to provide the relevant data for the MathCAD LiDAR simulation program. The UDF was written in the C programming language and compiled using Microsoft visual studio 2008. This report contains a listing of the program (version 1.03). This report contains a description of the methodology required to compile the UDF so that it may be called by an "execute on demand" call from FLUENT. The report also includes a description of the input and output data file formats
Reflection in the C++ Programming Language
Programski jezik C++ je v zadnjem desetletju s standardi C++11, C++14 in C++17 postal prenovljen in moderen programski jezik.
Kljub vsem pridobitvam programski jezik C++ po definiciji še vedno ni refleksijski programski jezik, kar pa se bo v bližnji prihodnosti morda spremenilo.
V diplomskem delu je predstavljen uradni predlog standardizirane refleksije v programskem jeziku C++.
Prav tako je v diplomskem delu narejena primerjava med nekaterimi obstoječimi refleksijskimi knjižnicami in refleksijsko knjižnico, ki smo jo razvili za to diplomsko delo.
Nova refleksijska knjižnica se od obstoječih knjižnic razlikuje v tem, da ima nekatere dodatne zmožnosti, ki so naravnane v poenostavljeno uporabo, možnost uporabe na večji množici obstoječe programske kode, večjo varnost pri uporabi in boljšo učinkovitost pri izvajanju. Z nekaj primeri je predstavljena smiselnost in praktičnost uporabe tovrstne refleksije v programskem jeziku C++.C++ programming language has become renewed and modern programming language in the last decade with standards C++11, C++14 and C++17.
Even though the language has many new features, it is still not a reflective language by definition, which may change in the near future.
In this thesis, the official proposal for standardized reflection in C++ is presented.
In addition, comparison between some already existing reflection libraries and a reflection library, which was implemented for the purpose of this thesis, is also presented.
The new reflection library has some additional and unique features, which address more simplified usage, capability to use the library on a larger set of existing code, better usage safety and better execution performance.
With some examples, the practicality of such reflection in C++ programming language is also demonstrated
Applying Software Engineering Techniques to Parser Design: The Development of a C# Parser
In this paper we describe the development of a parser for the C# programming language. We outline the development process used,
detail its application to the development of a C# parser and present a number of metrics that describe the parser’s evolution. This
paper presents and reinforces an argument for the application of software engineering techniques in the area of parser design. The
development of a parser for the C# programming language is in itself important to software engineering, since parsers form the basis
for tools such as metrics generators, refactoring tools, pretty-printers and reverse engineering tools
Applying Software Engineering Techniques to Parser Design: The Development of a C# Parser
In this paper we describe the development of a parser for the C# programming language. We outline the development process used,
detail its application to the development of a C# parser and present a number of metrics that describe the parser’s evolution. This
paper presents and reinforces an argument for the application of software engineering techniques in the area of parser design. The
development of a parser for the C# programming language is in itself important to software engineering, since parsers form the basis
for tools such as metrics generators, refactoring tools, pretty-printers and reverse engineering tools
HardBound: Architectural Support for Spatial Safety of the C Programming Language
The C programming language is at least as well known for its absence of spatial memory safety guarantees (i.e., lack of bounds checking) as it is for its high performance. C\u27s unchecked pointer arithmetic and array indexing allow simple programming mistakes to lead to erroneous executions, silent data corruption, and security vulnerabilities. Many prior proposals have tackled enforcing spatial safety in C programs by checking pointer and array accesses. However, existing software-only proposals have significant drawbacks that may prevent wide adoption, including: unacceptably high runtime overheads, lack of completeness, incompatible pointer representations, or need for non-trivial changes to existing C source code and compiler infrastructure.
Inspired by the promise of these software-only approaches, this paper proposes a hardware bounded pointer architectural primitive that supports cooperative hardware/software enforcement of spatial memory safety for C programs. This bounded pointer is a new hardware primitive datatype for pointers that leaves the standard C pointer representation intact, but augments it with bounds information maintained separately and invisibly by the hardware. The bounds are initialized by the software, and they are then propagated and enforced transparently by the hardware, which automatically checks a pointer\u27s bounds before it is dereferenced. One mode of use requires instrumenting only malloc, which enables enforcement of per-allocation spatial safety for heap-allocated objects for existing binaries. When combined with simple intra-procedural compiler instrumentation, hardware bounded pointers enable a low-overhead approach for enforcing complete spatial memory safety in unmodified C programs
- …