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: 1) Describes the PEC, 2) Describes how to use the PEC, 3) Demonstrates how the PEC combines static testing, dynamic testing (unit testing), and code generation synergistically into one utility, 4) Shows that the user of the PEC can write their own design patterns and have the compiler enforce them, 5) The PEC is believed to be unique in statically testing, dynamically testing, generating code and being user extendable, and 6) he 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.
|Cite as: Lovatt, H.C., Sloane, A.M. and Verity, D.R. (2005). A Pattern Enforcing Compiler (PEC) for Java: Using the Compiler. In Proc. Second Asia-Pacific Conference on Conceptual Modelling (APCCM2005), Newcastle, Australia. CRPIT, 43. Hartmann, S. and Stumptner, M., Eds. ACS. 69-78. |
(local if available)