}
else if(policy instanceof Negation){
Negation temp = (Negation) policy;
findFreeVars(temp.getPolicy(), free_vars);
}
else if (policy instanceof Conjunction){
Conjunction temp = (Conjunction) policy;
Set temp_setA = findFreeVars(temp.getPolicyA(), new HashSet<Object>());
Set temp_setB = findFreeVars(temp.getPolicyB(), new HashSet<Object>());
free_vars.addAll(temp_setA);
free_vars.addAll(temp_setB);
}
else if (policy instanceof Disjunction){
Disjunction temp = (Disjunction) policy;
Set temp_setA = findFreeVars(temp.getPolicyA(), new HashSet<Object>());
Set temp_setB = findFreeVars(temp.getPolicyB(), new HashSet<Object>());
free_vars.addAll(temp_setA);
free_vars.addAll(temp_setB);
}
else if (policy instanceof Box){
Box temp = (Box) policy;
findFreeVars(temp.getPolicy(), free_vars);
}
else if (policy instanceof Diamond){
Diamond temp = (Diamond) policy;
free_vars = findFreeVars(temp.getPolicy(), free_vars);
}
else if (policy instanceof Bind){
Bind temp = (Bind) policy;
findFreeVars(temp.getPolicy(), free_vars);
free_vars.remove(temp.getVariable());
}
else if (policy instanceof At){
At temp = (At) policy;
findFreeVars(temp.getPolicy(), free_vars);
free_vars.add(temp.getVariable());
}
return free_vars;