A pattern enforcing compiler (PEC) for Java: using the compiler

  • Authors:
  • Howard C. Lovatt;Anthony M. Sloane;Dominic R. Verity

  • Affiliations:
  • Macquarie University, Sydney, Australia;Macquarie University, Sydney, Australia;Macquarie University, Sydney, Australia

  • Venue:
  • APCCM '05 Proceedings of the 2nd Asia-Pacific conference on Conceptual modelling - Volume 43
  • Year:
  • 2005

Quantified Score

Hi-index 0.00

Visualization

Abstract

A PEC is a Pattern Enforcing Compiler, which is like a conventional compiler only extended to include the extra checks needed to enforce design patterns. PECs are currently a research project and the PEC written is targeted at the Java programming language. This paper:• Describes the PEC• Describes how to use the PEC• Demonstrates how the PEC combines static testing, dynamic testing (unit testing), and code generation synergistically into one utility• Shows that the user of the PEC can write their own design patterns and have the compiler enforce them• The PEC is believed to be unique in statically testing, dynamically testing, generating code and being user extendable.• The PEC is stable enough for production code and is available for free download under the Lesser GNU General Public License (Lovatt 2004).The PEC makes extensive use of reflection (runtime type identification); both when testing that a class conforms to pattern and also to allow the compiler to be user extendable.