5 public class Constraint {
7 private static int count = 1;
10 boolean crash = false;
11 SymbolTable st = new SymbolTable();
12 Vector quantifiers = new Vector();
13 LogicStatement logicstatement = null;
16 label = new String("c" + count++);
19 public String getLabel() {
23 public SymbolTable getSymbolTable() {
27 public void addQuantifier(Quantifier q) {
28 quantifiers.addElement(q);
31 public void setLogicStatement(LogicStatement ls) {
35 public LogicStatement getLogicStatement() {
36 return logicstatement;
39 public void setCrash(boolean crash) {
43 public ListIterator quantifiers() {
44 return quantifiers.listIterator();
47 public Set getRequiredDescriptorsFromQuantifiers() {
49 HashSet topdescriptors = new HashSet();
51 for (int i = 0; i < quantifiers.size(); i++) {
52 Quantifier q = (Quantifier) quantifiers.elementAt(i);
53 topdescriptors.addAll(q.getRequiredDescriptors());
56 return SetDescriptor.expand(topdescriptors);
59 public Set getRequiredDescriptorsFromLogicStatement() {
61 HashSet topdescriptors = new HashSet();
63 topdescriptors.addAll(logicstatement.getRequiredDescriptors());
65 return SetDescriptor.expand(topdescriptors);
68 public Set getRequiredDescriptors() {
69 Set set = getRequiredDescriptorsFromQuantifiers();
70 set.addAll(getRequiredDescriptorsFromLogicStatement());