Browse Prior Art Database

Declarative Architecture Enforcement

IP.com Disclosure Number: IPCOM000240334D
Publication Date: 2015-Jan-23
Document File: 5 page(s) / 139K

Publishing Venue

The IP.com Prior Art Database

Abstract

Disclosed is a tool that checks a program for violations of user specified design and structuring rules and enforces architectural design during software application builds.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 40% of the total text.

Page 01 of 5

Declarative Architecture Enforcement

Commercial software applications are very large and complex, typically consisting of several million lines of code developed by a large team of developers. These large applications are developed over a long period, often spanning many years. Due to the scale of the development effort required to build these applications , it is very easy for the software's internal architecture to vary from the original architecture specified in the application's design. These architectural changes might be intentional, but many times are accidental or are made through attempts to save implementation time for features in the application . Over time, these organic architecture changes accumulate and can greatly complicate finding and fixing program bugs and implementing new features in the application.

Tools exist that can check application source code and behavior. These tools tend to focus on program syntax or semantics, and do not try to enforce architectural/design rules. Syntactic, static, and dynamic analysis tools do not solve the problem of enforcing architectural design in software applications as the applications are built.

The novel contribution is a tool that checks a program for violations of user specified design and structuring rules . It is able to enforce architectural design during the software application builds.

The novel tool detects violations of programming design rules. The current implementation comprises a Clang font-end plug-in that generates a database of program characteristics and a Datalog program, which operates on that database looking for violations of user-specified design rules. The tool can be generalized to cover other front-ends, other program scanning technologies, and other query execution technologies. This approach enables automated checking of design rule compliance, which would otherwise be difficult to validate.

The tool detects violations of programming design rules in application source code. It comprises two main parts:


1. The plugin: a Clang front-end plug-in that generates a database of program characteristics during application compilation


2. The rule checker: a program that loads the program characteristics into a Datalog engine and then evaluates the user

specified design rules against the rules in the Datalog engine to find violations

Figure 1: Overall tool design

1


Page 02 of 5

The Clang front-end plug-in is added to the Clang command line used to compile the application under analysis . During compilation, once parsing is complete and the Abstract Syntax Tree (AST) has been built, Clang calls the plug-in and provides an opportunity for it to traverse the AST. The plugin creates a visitor through which Clang recursively walks down the AST. Any time it encounters a declaration, definition, or method call the plugin records its location, name, and any other relevant information. For example, a call causes the plugin to emit the names of both the caller and c...