public static boolean hasReturn(Statement s){
		if (s instanceof Skip || s instanceof Assignment)
			return false;
		if (s instanceof Conditional){
			Conditional c = (Conditional)s;
			return hasReturn(c.thenBranch()) || hasReturn(c.elseBranch());
		}if (s instanceof Loop){
			return hasReturn(((Loop)s).body());
		}if (s instanceof Block){
			Block b = (Block) s;
			Iterator<Statement> it = b.getMembers();
			while(it.hasNext())
				if(hasReturn(it.next()))
					return true;
			return false;
		}if(s instanceof Return)
			return true;
		throw new IllegalArgumentException("should never reach here");
	}