From: bdemsky Date: Fri, 4 Aug 2006 23:00:52 +0000 (+0000) Subject: rewrite flags in DNF form X-Git-Tag: preEdgeChange~856 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=95701add85a22544e2e8514ba64fe17bb71d035f;p=IRC.git rewrite flags in DNF form --- diff --git a/Robust/src/IR/Tree/DNFFlag.java b/Robust/src/IR/Tree/DNFFlag.java new file mode 100644 index 00000000..67cdd3c2 --- /dev/null +++ b/Robust/src/IR/Tree/DNFFlag.java @@ -0,0 +1,88 @@ +package IR.Tree; +import java.util.Vector; +import IR.*; + +public class DNFFlag { + Vector conjunctions; + public DNFFlag(FlagNode flag) { + DNFFlagAtom dfa=new DNFFlagAtom(flag, false); + conjunctions=new Vector(); + Vector conjunct=new Vector(); + conjunct.add(dfa); + conjunctions.add(conjunct); + } + private DNFFlag() { + conjunctions=new Vector(); + } + + /** This method negates a DNFFlag expression. */ + + public DNFFlag not() { + DNFFlag notflag=null; + for (int i=0;i