计算机科学 > 程序设计语言
[提交于 2013年1月17日]
标题:Design Pattern-Based Extension of Class Hierarchies to Support Runtime Invariant Checks
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读摘要:We present a technique for automatically weaving structural invariant checks into an existing collection of classes. Using variations on existing design patterns, we use a concise specification to generate from this collection a new set of classes that implement the interfaces of the originals, but with the addition of user-specified class invariant checks. Our work is notable in the scarcity of assumptions made. Unlike previous design pattern approaches to this problem, our technique requires no modification of the original source code, relies only on single inheritance, and does not require that the attributes used in the checks be publicly visible. We are able to instrument a wide variety of class hierarchies, including those with pure interfaces, abstract classes and classes with type parameters. We have implemented the construction as an Eclipse plug-in for Java development.
提交历史
来自:John Lasseter[v1] 2013年1月17日 星期四 22:12:36 UTC