// sanity.beh -- Functions for sanity-checking the class dictionary. // $Id: sanity.beh,v 1.1 2000/09/15 22:53:10 dougo Exp $ Program { boolean checkForDuplicatePartNames() via Part to PartName { start (@ return_val = true; @) (@ Set partnames, duplicates; ClassDef def; @) before ClassDef (@ partnames = new HashSet(); duplicates = new HashSet(); def = host; @) before PartName (@ if (!partnames.add(host) && duplicates.add(host)) { System.err.println("Error: Class " + def.get_classname() + " has more than one part named " + host + "."); return_val = false; } @) } }