public string GetStringFromBinary(TermBinary.BinaryOpCode bop) { switch (bop) { case TermBinary.BinaryOpCode.MetaImp: return("\\<Longrightarrow>"); case TermBinary.BinaryOpCode.Add: return("+"); case TermBinary.BinaryOpCode.Sub: return("-"); case TermBinary.BinaryOpCode.Mul: return("*"); case TermBinary.BinaryOpCode.And: return("\\<and>"); case TermBinary.BinaryOpCode.Eq: return("="); case TermBinary.BinaryOpCode.Neq: return("\\<noteq>"); case TermBinary.BinaryOpCode.Implies: return("\\<longrightarrow>"); case TermBinary.BinaryOpCode.Lt: return("<"); case TermBinary.BinaryOpCode.Le: return("\\<le>"); case TermBinary.BinaryOpCode.Gt: return(">"); case TermBinary.BinaryOpCode.Ge: return("\\<ge>"); case TermBinary.BinaryOpCode.Or: return("\\<or>"); default: throw new NotImplementedException(); } }
public static Term BinaryOpAggregate(IEnumerable <Term> term, TermBinary.BinaryOpCode bop) { return(term.Aggregate((arg, res) => new TermBinary(arg, res, bop))); }
public Term HandleBinaryOp(TermBinary.BinaryOpCode bop, List <Term> arg) { Contract.Assert(arg.Count == 2); return(new TermBinary(arg[0], arg[1], bop)); }