@Test public void testEval() { final ExplState s1 = ExplState.of(ImmutableValuation.builder().put(x, Int(1)).build()); Assert.assertEquals(Optional.of(Int(1)), s1.eval(x)); Assert.assertEquals(Optional.empty(), s1.eval(y)); }
public static ExplState of(final Valuation val) { if (val.getDecls().isEmpty()) { return top(); } return new NonBottom(val); }
ExplState extends Valuation implements ExprState { public static ExplState of(final Valuation val) { if (val.getDecls().isEmpty()) { return top(); } return new NonBottom(val); } }
ExplState extends Valuation implements ExprState { public static ExplState of(final Valuation val) { if (val.getDecls().isEmpty()) { return top(); } return new NonBottom(val); } private  ExplState(); }
ExplState extends Valuation implements ExprState { public static ExplState of(final Valuation val) { if (val.getDecls().isEmpty()) { return top(); } return new NonBottom(val); } private  ExplState(); static ExplState of(final Valuation val); static ExplState bottom(); static ExplState top(); abstract Valuation getVal(); abstract boolean isLeq(final ExplState that); @Override boolean equals(Object obj); @Override int hashCode(); }
ExplState extends Valuation implements ExprState { public static ExplState of(final Valuation val) { if (val.getDecls().isEmpty()) { return top(); } return new NonBottom(val); } private  ExplState(); static ExplState of(final Valuation val); static ExplState bottom(); static ExplState top(); abstract Valuation getVal(); abstract boolean isLeq(final ExplState that); @Override boolean equals(Object obj); @Override int hashCode();  }