Font Size: a A A

On aspect-oriented programming for enforcing software design rules

Posted on:2011-01-28Degree:Ph.DType:Thesis
University:Northeastern UniversityCandidate:Wu, PengchengFull Text:PDF
GTID:2448390002967094Subject:Computer Science
Abstract/Summary:
Software design rules are important in modern software development, with significance in achieving high quality in many aspects of software engineering including functional correctness, safety, performance, reusability, and so on. The current practice of software engineering tools to enforce software design rules has much to be desired. They usually either can only check a pre-defined set of design rules without allowing customization and extension, or even when customization or extension is allowed, they require programmers to encode new design rules in low level primitives such as byte-code level API, or force programmers to learn new domain specific languages or new meta-models that programmers are not familiar with.;In this thesis work, we argue that the shadow model of AspectJ-like Aspect-oriented programming languages is a useful and suitable meta-model for building customizable software design rule static checkers for programs written in Java-like object-oriented languages. To support this thesis, based on AspectJ's shadow model and pointcut language, we have built two compile time facilities, with which software design rules can be encoded and enforced. The first facility is called Statically Executable Advice, which allows programmers to implement design rule checkers in advice-like constructs, but unlike advice in AspectJ, they are advice that are defined on static shadows, instead of on dynamic join points, and that they are executed at compile time, instead of at run time. The second facility is a further improvement of the idea, by featuring a Datalog based declarative query mechanism on shadows, with a seamless integration with AspectJ's native pointcut expression language. When designing this Datalog shadow query mechanism, we especially developed it with a focus on performance and scalability. We present a Datalog representation of the shadow model of AspectJ so that we can leverage an intelligent data structure capable of dealing with large-scale relational data with much redundancy, called Binary Decision Diagram (BDD). We make use of an advanced third party BDD-based Datalog solver called "bddbddb" to solve design rule constraints encoded in Datalog shadow queries in our system. We have evaluated our Datalog-based approach for enforcing software design rules in terms of its effectiveness, usability, and performance. The evaluation results show that the system can describe and enforce a wide variety of industrial software design rules, it is easier to use than writing queries on an alternative meta-model, i.e., the Abstract-Syntax-Tree based model, and the system indeed can scale well to large size real world programs on diversified queries.
Keywords/Search Tags:Design rules, Model
Related items