Coding rules are used in industry to enforce good software practices that improve software reliability and maintainability. Some examples of standard rule sets are MISRA-C/C++ and High Integrity C++. In a previous work we developed a framework to formalize coding rules as logic programs, that can be later run on a knowledge base of the program to inspect. In order to formalize all the rules in standard sets the knowledge base needs to contain information about the program that ranges from syntactic to undecidable semantic properties. As many of the complex properties that coding rules depend upon (or approximations to them) are computed by static analyzers present in the literature, we aim at reusing them presenting their result in a uniform way that can be easily understood and combined by engineers responsible for defining new rules. In fact, some of those analyzes are implemented in modern compilers, but their results are almost exclusively applied to optimization. In this talk we present initial work on trying to use the LLVM compiling infrastructure (http://llvm.org) for enriching our program facts base with pointer aliasing information, and how this information can be used to define and enforce actual coding rules.
Coding rules are often used in industry to foster best practices when coding software and to avoid the many hazardous constructions present in languages such as C or C++. Predictable, reliable tools are needed to automatically measure adherence to these practices, as manually checking for compliance is cumbersome. Moreover, due to the wide range of possible coding rule sets, easy of customization is a need in order for these tools to be of practical use. With this aim in mind, we present an extension of the GNU Compiler Collection (GCC) that flags those code fragments that do not conform to coding rules belonging to a given set. These sets of coding rules can be defined using a high-level declarative language based on logic programming, thereby making it possible to easily check code for conformance with respect to rules addressing the particular needs of a project, company, or application area.
Coding rules are often used in industry for codifying software best practices and avoiding the many hazardous constructions present in languages such as C or C++. Predictable and customisable tools are needed to automatically measure adherence to these practices. Many of the properties about software needed for rule conformance analysis are calculated by modern compilers. We present an extension of the GNU Compiler Collection (GCC) that flags those code fragments that do not conform to a given set of rules. The user can define coding rules using a high-level declarative language based on logic programming.
Coding rules, which codify software best practices by constraining the set of “admissible” programs, are often used in industry to increase program reliability and maintainability. We present a tool that seamlessly integrates coding rule checking capabilities into the main development work-flow. In the proposed framework, the necessary source code features are extracted from the GCC compilation process. In this way, both compiler infrastructure and compilation stages can be reused. The coding rules themselves are defined using a high-level declarative language.
An extended practice in the realm of Software Engineering and programming in industry is the application of coding rules. Coding rules are customarily used to constrain the use (or abuse) of certain programming language constructions. However, these rules are usually written using natural language, which is intrinsically ambiguous and which may complicate their use and hinder their automatic enforcement. This paper presents some early work aiming at defining a framework to formalise and check for coding rule conformance using logic programming. We show how a certain class of rules - structural rules - can be reformulated as logic programs, which provides both a framework for formal specification and also for automatic conformance checking using a Prolog engine. Some examples of rules belonging to actual, third-party coding rule sets are discussed, along with the corresponding Prolog code. Experimental data regarding the practicality and impact of their application to real-life software projects is presented and discussed.
Coding rules are customarily used to constrain the use (or abuse) of certain constructions in a programming language. Standard coding rule sets exist that target different languages and application domains. However, these rules are usually written using a natural language, which is intrinsically ambiguous, and which may hinder their automatic application. This short paper presents some early work aiming at defining a framework to formalise and check for coding rule conformance using logic programming. We show how a certain class of rules - structural rules - can be reformulated as logic programs. Some real examples, including Prolog code formalising them, are shown and discussed.
Coding rules are customarily used to constrain the use (or abuse) of certain constructions in a programming language. Standard coding rule sets exist that target different languages and application domains. However, these rules are usually written using a natural language, which is intrinsically ambiguous, and which may hinder their automatic application. This short paper presents some early work aiming at defining a framework to formalise and check for coding rule conformance using logic programming. We show how a certain class of rules - structural rules - can be reformulated as logic programs. Some real examples, including Prolog code formalising them, are shown and discussed.
This short paper presents some early work in the context of an European project aiming at defining a framework to formalise and check for coding rule conformance using logic programming. We show how a certain class of rules - structural rules - can be reformulated as logic programs. This provides both a framework for formal specification and also for automatic conformance checking using a Prolog engine.
SmartEiffel has been enjoying two different mechanisms to express subtyping and implementation inheritance for one year. After large scale practical tests and thanks to user feedback, this paper finalises the new typing policy of SmartEiffel, which combines two forms of multiple inheritance with genericity in one statically-checked, object-oriented language. Having two forms of inheritance allows the designer to capture more design decisions in the source code. It is now straightforward to share reusable code between otherwise unrelated types. The new mechanism allows to reuse code from an existing class without polluting the reuser's interface. It also enables an elegant implementation of some design patterns. Furthermore, this mechanism helps compilers to statically remove more dynamic dispatch code. It can also be used to add a no-penalty and no-risk multiple-inheritance-like construct to a single-inheritance language such as Java.
This file was generated by bibtex2html 1.95.