From: Petra M. <pe...@cs...> - 2005-02-24 20:18:54
|
Hi Leo, Leo wrote: > In zlive set implementations for EvalSet interface, I noticed there are > corresponding visitor classes > (eg. FlatDiscreteSetVisitor). I couldn't find any examples (or Javadoc) > of using such visitors. You can find a general introduction into the visitor design pattern used in CZT in our ZB 2005 paper: CZT---A Framework for Z Tools I will send you a copy of this. > For waht purpose they were introduced? FlatDiscreteSet extends FlatPred which extends Pred and therefore Term. That is, a FlatDiscreteSet needs to implement the method Object accept(Visitor visitor); defined in the Term interface. To be properly visitable one needs the FlatDiscreteSetVisitor interface. I do not know what Mark is planning to do with FlatDiscreteSets, but almost every tool that traverses an AST is implemented as a visitor. Cheers, Petra |