@Test public void testRatMul() { assertEquals(Rat(1, 1), simplify(Mul(Rat(2, 1), Rat(1, 1), Rat(1, 2)))); assertEquals(Rat(3, 4), simplify(Mul(Rat(3, 2), Rat(1, 1), Rat(1, 2)))); assertEquals(Mul(Rat(3, 4), d), simplify(Mul(Rat(3, 2), d, Rat(1, 2)))); assertEquals(Mul(Rat(3, 4), d), simplify(Mul(Rat(3, 2), Mul(d, Rat(1, 2))))); assertEquals(Rat(0, 1), simplify(Mul(Rat(3, 2), Rat(0, 1), Rat(1, 2)))); }
@SuppressWarnings("unchecked") public static <T extends Type> Expr<T> simplify(final Expr<T> expr, final Valuation valuation) { return (Expr<T>) TABLE.dispatch(expr, valuation); }
ExprSimplifier { @SuppressWarnings("unchecked") public static <T extends Type> Expr<T> simplify(final Expr<T> expr, final Valuation valuation) { return (Expr<T>) TABLE.dispatch(expr, valuation); } }
ExprSimplifier { @SuppressWarnings("unchecked") public static <T extends Type> Expr<T> simplify(final Expr<T> expr, final Valuation valuation) { return (Expr<T>) TABLE.dispatch(expr, valuation); } private  ExprSimplifier(); }
ExprSimplifier { @SuppressWarnings("unchecked") public static <T extends Type> Expr<T> simplify(final Expr<T> expr, final Valuation valuation) { return (Expr<T>) TABLE.dispatch(expr, valuation); } private  ExprSimplifier(); @SuppressWarnings("unchecked") static Expr<T> simplify(final Expr<T> expr, final Valuation valuation); }
ExprSimplifier { @SuppressWarnings("unchecked") public static <T extends Type> Expr<T> simplify(final Expr<T> expr, final Valuation valuation) { return (Expr<T>) TABLE.dispatch(expr, valuation); } private  ExprSimplifier(); @SuppressWarnings("unchecked") static Expr<T> simplify(final Expr<T> expr, final Valuation valuation);  }