Pattern Detector

A pattern detector tool takes a program as an input and finds all instances of certain patterns inside this program. Here is a list of some of the challenges that need to be tackled:

  class Type {
    public Method getMethods() { ... }
    public Type getSuperClass() { ... }

class Method { ... public Type getDeclaringType() { ... } public boolean canOverride(Method m) { ... } }

Implementing such a system in a statically typed language while avoiding coupling with the low-level classes is not trivial (See Erik Ernst's Family Polymorphism paper, ... ers/ ; Garcia et-al, http://faculty.cs.tamu.e ... apers/cmp_gp.pdf). In particualr, The canOverride(Method m) method is a binary method and thus especially challenging.

Written by Itay Maman (


Last edited May 13, 2007
Return to WelcomeVisitors