public Term Visit(VCExprLiteral node, bool arg) { if (node == VCExpressionGenerator.True) { return(new BoolConst(true)); } if (node == VCExpressionGenerator.False) { return(new BoolConst(false)); } if (node is VCExprIntLit lit) { return(new TermWithExplicitType(new IntConst(lit.Val), PrimitiveType.CreateIntType())); } throw new NotImplementedException(); }
public override Type VisitBasicType(BasicType node) { if (node.IsBool) { ReturnResult(PrimitiveType.CreateBoolType()); } else if (node.IsInt) { ReturnResult(PrimitiveType.CreateIntType()); } else { throw new ProofGenUnexpectedStateException("unexpected pure basic type"); } return(node); }