anchor.diff:                          which we need to convert to expression format first.
                           dex uses Unmarked constants, so we do too. *)
                        let eparams = List.map (uncurry (mkVarExp Unmarked)) vs.Params
  -                     let funcApp = applyFunc ctx funcDecl eparams
  -
  -                     (funcApp, boolToZ3 ctx dex))
  +                     let vfunc = { Name = vs.Name ; Params = eparams }
  +
  +                     (vfunc, dex))
                   ex
   
           (mapEntry, rule)
  
positive.code: module MuTranslator =
      open Starling.Core.Z3.Expr
  
      (*
       * View definitions
       *)
  
negative.code: 
          List.iter
              (fun (view, def) ->
                   // TODO(CaptainHayashi): de-duplicate this with mkRule.
                   let vars =
                      seq {
                          yield! (varsInBool def)
                          for param in view.Params do
                              yield! (varsIn param)
                      }
                      |> Set.ofSeq
                      |> Set.map (fun (name, ty) ->
                                      ctx.MkConst (constToString name, typeToSort ctx ty))
                      |> Set.toArray
  
                   fixedpoint.AddRule (
                      ctx.MkForall (vars,
                                    ctx.MkImplies (ctx.MkAnd [| def |> mkNot |> boolToZ3 ctx
                                                                translateVFunc ctx fm view |],
                                                   unsafeapp))))
              ds
  
          Map.iter (fun (s : string) g -> fixedpoint.AddRule (g, ctx.MkSymbol s :> Z3.Symbol)) rs
  