A pattern enforcing compiler (PEC) for Java: a practical way to formally specify patterns

Research output: Chapter in Book/Report/Conference proceedingChapterResearchpeer-review

Abstract

This chapter describes an extended compiler that formalizes patterns, which we call a pattern enforcing compiler (PEC). Developers use standard Java syntax to mark their classes as implementations of particular Design patterns. The compiler is then able to use reflection to check whether the classes do in fact adhere to the constraints of the patterns. The checking possible with our compiler starts with the obvious static adherence to constraints such as method presence, visibility, and naming. However, we go much further and support dynamic testing to check the runtime behavior of classes and code generation to assist in the implementation of complex patterns. The chapter gives examples of using the patterns supplied with our PEC and also examples of how to write your own patterns and have our PEC enforce these.

LanguageEnglish
Title of host publicationDesign pattern formalization techniques
EditorsToufik Taibi
Place of PublicationHershey, PA; London
PublisherIGI Publishing
Pages324-356
Number of pages33
ISBN (Electronic)9781599042213
ISBN (Print)9781599042190
DOIs
Publication statusPublished - 2007

Fingerprint

Visibility
Testing
Code generation

Cite this

Lovatt, H., Sloane, A. M., & Verity, D. R. (2007). A pattern enforcing compiler (PEC) for Java: a practical way to formally specify patterns. In T. Taibi (Ed.), Design pattern formalization techniques (pp. 324-356). Hershey, PA; London: IGI Publishing. https://doi.org/10.4018/978-1-59904-219-0.ch015
Lovatt, Howard ; Sloane, Anthony M. ; Verity, Dominic R. / A pattern enforcing compiler (PEC) for Java : a practical way to formally specify patterns. Design pattern formalization techniques. editor / Toufik Taibi. Hershey, PA; London : IGI Publishing, 2007. pp. 324-356
@inbook{fc298db950c04c2cb6363088d5fb2fca,
title = "A pattern enforcing compiler (PEC) for Java: a practical way to formally specify patterns",
abstract = "This chapter describes an extended compiler that formalizes patterns, which we call a pattern enforcing compiler (PEC). Developers use standard Java syntax to mark their classes as implementations of particular Design patterns. The compiler is then able to use reflection to check whether the classes do in fact adhere to the constraints of the patterns. The checking possible with our compiler starts with the obvious static adherence to constraints such as method presence, visibility, and naming. However, we go much further and support dynamic testing to check the runtime behavior of classes and code generation to assist in the implementation of complex patterns. The chapter gives examples of using the patterns supplied with our PEC and also examples of how to write your own patterns and have our PEC enforce these.",
author = "Howard Lovatt and Sloane, {Anthony M.} and Verity, {Dominic R.}",
year = "2007",
doi = "10.4018/978-1-59904-219-0.ch015",
language = "English",
isbn = "9781599042190",
pages = "324--356",
editor = "Toufik Taibi",
booktitle = "Design pattern formalization techniques",
publisher = "IGI Publishing",
address = "United States",

}

Lovatt, H, Sloane, AM & Verity, DR 2007, A pattern enforcing compiler (PEC) for Java: a practical way to formally specify patterns. in T Taibi (ed.), Design pattern formalization techniques. IGI Publishing, Hershey, PA; London, pp. 324-356. https://doi.org/10.4018/978-1-59904-219-0.ch015

A pattern enforcing compiler (PEC) for Java : a practical way to formally specify patterns. / Lovatt, Howard; Sloane, Anthony M.; Verity, Dominic R.

Design pattern formalization techniques. ed. / Toufik Taibi. Hershey, PA; London : IGI Publishing, 2007. p. 324-356.

Research output: Chapter in Book/Report/Conference proceedingChapterResearchpeer-review

TY - CHAP

T1 - A pattern enforcing compiler (PEC) for Java

T2 - a practical way to formally specify patterns

AU - Lovatt, Howard

AU - Sloane, Anthony M.

AU - Verity, Dominic R.

PY - 2007

Y1 - 2007

N2 - This chapter describes an extended compiler that formalizes patterns, which we call a pattern enforcing compiler (PEC). Developers use standard Java syntax to mark their classes as implementations of particular Design patterns. The compiler is then able to use reflection to check whether the classes do in fact adhere to the constraints of the patterns. The checking possible with our compiler starts with the obvious static adherence to constraints such as method presence, visibility, and naming. However, we go much further and support dynamic testing to check the runtime behavior of classes and code generation to assist in the implementation of complex patterns. The chapter gives examples of using the patterns supplied with our PEC and also examples of how to write your own patterns and have our PEC enforce these.

AB - This chapter describes an extended compiler that formalizes patterns, which we call a pattern enforcing compiler (PEC). Developers use standard Java syntax to mark their classes as implementations of particular Design patterns. The compiler is then able to use reflection to check whether the classes do in fact adhere to the constraints of the patterns. The checking possible with our compiler starts with the obvious static adherence to constraints such as method presence, visibility, and naming. However, we go much further and support dynamic testing to check the runtime behavior of classes and code generation to assist in the implementation of complex patterns. The chapter gives examples of using the patterns supplied with our PEC and also examples of how to write your own patterns and have our PEC enforce these.

UR - http://www.scopus.com/inward/record.url?scp=84900634463&partnerID=8YFLogxK

U2 - 10.4018/978-1-59904-219-0.ch015

DO - 10.4018/978-1-59904-219-0.ch015

M3 - Chapter

SN - 9781599042190

SP - 324

EP - 356

BT - Design pattern formalization techniques

A2 - Taibi, Toufik

PB - IGI Publishing

CY - Hershey, PA; London

ER -

Lovatt H, Sloane AM, Verity DR. A pattern enforcing compiler (PEC) for Java: a practical way to formally specify patterns. In Taibi T, editor, Design pattern formalization techniques. Hershey, PA; London: IGI Publishing. 2007. p. 324-356 https://doi.org/10.4018/978-1-59904-219-0.ch015