public override Type VisitBasicType(BasicType node)
        {
            if (node.IsBool)
            {
                if (constructVal)
                {
                    ReturnResult(IsaBoogieTerm.BoolVal(arg));
                }
                else
                {
                    ReturnResult(IsaBoogieTerm.ConvertValToBool(arg));
                }
            }
            else if (node.IsInt)
            {
                if (constructVal)
                {
                    ReturnResult(IsaBoogieTerm.IntVal(arg));
                }
                else
                {
                    ReturnResult(IsaBoogieTerm.ConvertValToInt(arg));
                }
            }
            else
            {
                throw new NotImplementedException();
            }

            return(node);
        }
        public override Type VisitBasicType(BasicType node)
        {
            if (node.IsBool)
            {
                ReturnResult(v => IsaBoogieTerm.BoolVal(v));
            }
            else if (node.IsInt)
            {
                ReturnResult(v => IsaBoogieTerm.IntVal(v));
            }
            else
            {
                throw new NotImplementedException();
            }

            return(node);
        }
        public LemmaDecl AxiomVcLemma(string lemmaName, Axiom axiom, VCExpr vcAxiom, out IList <OuterDecl> requiredDecls)
        {
            var vc        = vcAxiomInst.GetVCObjInstantiation(vcAxiom, declToVCMapping);
            var axiomTerm = basicCmdIsaVisitor.Translate(axiom.Expr);

            requiredDecls = new List <OuterDecl>();

            vcRewriteLemmaGen.RequiredVcRewrite(axiom.Expr, true, out var vcRewriteLemmas);

            VCExprHint exprHint;

            if (vcRewriteLemmas != null && vcRewriteLemmas.Any())
            {
                exprHint = new VCExprHint(vcRewriteLemmas);
                requiredDecls.AddRange(vcRewriteLemmas);
            }
            else
            {
                exprHint = VCExprHint.EmptyExprHint();
            }

            var assumption =
                IsaBoogieTerm.RedExpr(boogieContext, axiomTerm, normalInitState, IsaBoogieTerm.BoolVal(true));
            var statement = vc;

            return
                (new LemmaDecl(lemmaName,
                               ContextElem.CreateWithAssumptions(assumption),
                               statement,
                               new Proof(new List <string>
            {
                "unfolding " + vcAxiomInst.GetVCObjNameRef(vcAxiom) + "_def",
                ProofUtil.By(
                    ProofUtil.MLTactic(
                        "prove_axiom_vc_tac @{context} (" + exprHint.GetMLString() + ") " +
                        MLUtil.IsaToMLThm("assms(1)") + " " + MLUtil.IsaToMLThms(globalAssmsName) +
                        " (@{thm forall_poly_thm}, @{thm exists_poly_thm}) []", 1)
                    )
            })
                               ));
        }