001 package escjava.vcGeneration;
002
003 // TBoolOp = return a boolean and sons are boolean : list(boolean) -> boolean
004 public class TIsAllocated extends TBoolOp {
005
006 public void typeTree(){
007
008 if(sons.size()!=2)
009 TDisplay.err(this, "typeTree()", "Node with "+sons.size()+" instead of 2, that's strange...");
010 else {
011 TNode n1 = getChildAt(0);
012 TNode n2 = getChildAt(1);
013
014 // we are sure about the type of the sons
015 n1.setType(_Reference,true);
016 n2.setType(_Time,true);
017
018 n1.typeTree();
019 n2.typeTree();
020 }
021
022 }
023
024 public void accept(/*@ non_null @*/ TVisitor v) throws java.io.IOException{
025 v.visitTIsAllocated(this);
026 }
027
028 } // %Reference -> bool
029
030 // %Reference -> %Time