aspect Interactive { public boolean Start.interactive() { return getExp().interactive(); } /* Returns true if this subtree contains any "Ask User" construct. */ public boolean Exp.interactive() { return false; // Default result } public boolean MulExp.interactive() { return getLeftExp().interactive() || getRightExp().interactive(); } public boolean DivExp.interactive() { return getLeftExp().interactive() || getRightExp().interactive(); } public boolean LetExp.interactive() { boolean soFar = false; for (int k = 0; k < getNumBinding(); k++) { soFar = soFar || getBinding(k).interactive(); } return soFar || getExp().interactive(); } public boolean Binding.interactive() { return getExp().interactive(); } public boolean AskUserExp.interactive() { return true; } }