Extensible Dynamic Analysis for JML : A Case Study with Loop Annotations

Modern programming languages, such as Java, are large and complex, as are practically useful behavioral interface specification languages that extend them, such as JML. Their size and complexity make it difficult for researchers to build dynamic analysis tools, such as runtime assertion checkers. Researchers wishing to experiment with a small change to a specification language or a dynamic analysis face a prohibitive amount of work before they can run experiments. Even if a research prototype is built, it is difficult to keep it current with rapidly evolving languages, since the changes to the underlying compiler infrastructure are not easily separated from that infrastructure. However, extensible dynamic analysis tools can be written more easily with modern attribute grammar tools, in particular with JastAdd. We describe a small case study that shows how using JastAdd eases development of a runtime assertion checker for the specification language JML.