diff --git a/src/plugins/qed/engine.mli b/src/plugins/qed/engine.mli
index 65dbd5cad466935c7e185b7d2445dda48014b449..7d91ca390d6f83dfe8a41cf3198a45d7db785aec 100644
--- a/src/plugins/qed/engine.mli
+++ b/src/plugins/qed/engine.mli
@@ -36,7 +36,9 @@ type op =
 
 type link =
   | F_call  of string (** n-ary function *)
-  | F_subst of string (** n-ary function with substitution "foo(%1,%2)" *)
+  | F_subst of string * string (** n-ary function with substitution
+                                   first value is the link name, second is the
+                                   substitution (e.g. "foo(%1,%2)") *)
   | F_left  of string (** 2-ary function left-to-right + *)
   | F_right of string (** 2-ary function right-to-left + *)
   | F_list of string * string (** n-ary function with (cons,nil) constructors *)
diff --git a/src/plugins/qed/export.ml b/src/plugins/qed/export.ml
index c1d37be39205f67ce351c45b0c892c3b08db3656..452b8b472cf64977202d7572ddd5fb92bec34420 100644
--- a/src/plugins/qed/export.ml
+++ b/src/plugins/qed/export.ml
@@ -65,7 +65,7 @@ let link_name = function
 
 let debug = function
   | F_call f | F_left f | F_right f | F_bool_prop(_,f)
-  | F_list(f,_) | F_subst f | F_assoc f -> f
+  | F_list(f,_) | F_subst (f, _) | F_assoc f -> f
 
 (* -------------------------------------------------------------------------- *)
 (* --- Identifiers                                                        --- *)
@@ -451,7 +451,7 @@ struct
                       fc self#pp_atom x (plist w) xs
               in plist (self#callstyle,fc,fn) fmt xs
             end
-        | F_subst s, _ ->
+        | F_subst (_, s), _ ->
             let print = match self#callstyle with
               | CallVar | CallVoid -> self#pp_flow
               | CallApply -> self#pp_atom in
diff --git a/src/plugins/qed/export_why3.ml b/src/plugins/qed/export_why3.ml
index 6ed4f1b2e7b448e78d4efabac0a73d73d8626404..2d7b39ce7c3d5412c4ee2cd93ffe2cf283f1e155 100644
--- a/src/plugins/qed/export_why3.ml
+++ b/src/plugins/qed/export_why3.ml
@@ -231,7 +231,7 @@ struct
           | F_left f, _ -> Plib.pp_fold_apply ~f pretty fmt ts
           | F_right f, _ -> Plib.pp_fold_apply_rev ~f pretty fmt (List.rev ts)
           | F_assoc op, _ -> Plib.pp_assoc ~op pretty fmt ts
-          | F_subst s, _ -> Plib.substitute_list pretty s fmt ts
+          | F_subst (_, s), _ -> Plib.substitute_list pretty s fmt ts
           | F_list(fc,fn) , _ ->
               let rec plist fc fn fmt = function
                 | [] -> pp_print_string fmt fn
diff --git a/src/plugins/wp/MemMemory.ml b/src/plugins/wp/MemMemory.ml
index a9c94fe22630c91c111afbfb5bf824c2951fdafd..7c4439368ec666ff44f8782f3c23ba1709fccd26 100644
--- a/src/plugins/wp/MemMemory.ml
+++ b/src/plugins/wp/MemMemory.ml
@@ -34,13 +34,9 @@ let library = "memory"
 let a_addr = Lang.datatype ~library "addr"
 let t_addr = L.Data(a_addr,[])
 let f_base   = Lang.extern_f ~library ~result:L.Int
-    ~link:{why3    = Qed.Engine.F_call "base";
-           coq     = Qed.Engine.F_subst("(base %1)");
-          } "base"
+    ~link:(Qed.Engine.F_subst ("base", "%1.base")) "base"
 let f_offset = Lang.extern_f ~library ~result:L.Int
-    ~link:{why3    = Qed.Engine.F_call "offset";
-           coq     = Qed.Engine.F_subst("(offset %1)");
-          } "offset"
+    ~link:(Qed.Engine.F_subst ("offset", "%1.offset")) "offset"
 let f_shift  = Lang.extern_f ~library ~result:t_addr "shift"
 let f_global = Lang.extern_f ~library ~result:t_addr ~category:L.Injection "global"
 let f_null   = Lang.extern_f ~library ~result:t_addr "null"
@@ -58,15 +54,8 @@ let ty_fst_arg = function
   | Some l :: _ -> l
   | _ -> raise Not_found
 
-let l_havoc = Qed.Engine.{
-    coq = F_call "fhavoc" ;
-    why3 = F_call "havoc" ;
-  }
-
-let l_set_init = Qed.Engine.{
-    coq = F_call "fset_init" ;
-    why3 = F_call "set_init" ;
-  }
+let l_havoc = Qed.Engine.F_call "havoc"
+let l_set_init = Qed.Engine.F_call "set_init"
 
 let p_valid_rd = Lang.extern_fp ~library "valid_rd"
 let p_valid_rw = Lang.extern_fp ~library "valid_rw"
diff --git a/src/plugins/wp/MemVal.ml b/src/plugins/wp/MemVal.ml
index b880015256d4472b63fe6ea04dcc8bace830bc53..f9ce1bc2aee6234cf669662def2482faee5ce75a 100644
--- a/src/plugins/wp/MemVal.ml
+++ b/src/plugins/wp/MemVal.ml
@@ -93,13 +93,9 @@ let library = "memory"
 let a_addr = Lang.datatype ~library "addr"
 let t_addr = Logic.Data(a_addr,[])
 let f_base   = Lang.extern_f ~library ~result:Logic.Int
-    ~link:{why3    = Qed.Engine.F_subst("%1.base");
-           coq     = Qed.Engine.F_subst("(base %1)");
-          } "base"
+    ~link:(Qed.Engine.F_subst ("base", "%1.base")) "base"
 let f_offset = Lang.extern_f ~library ~result:Logic.Int
-    ~link:{why3    = Qed.Engine.F_subst("%1.offset");
-           coq     = Qed.Engine.F_subst("(offset %1)");
-          } "offset"
+    ~link:(Qed.Engine.F_subst ("offset", "%1.offset")) "offset"
 let f_shift  = Lang.extern_f ~library ~result:t_addr "shift"
 let f_global = Lang.extern_f ~library ~result:t_addr "global"
 let f_null   = Lang.extern_f ~library ~result:t_addr "null"
diff --git a/src/plugins/wp/ProverWhy3.ml b/src/plugins/wp/ProverWhy3.ml
index c0cb6f8e847682f6c7baaf38399a02ed2e4ae69b..a21e48d0d86a6ae13935ac743ae2ca4de7b55051 100644
--- a/src/plugins/wp/ProverWhy3.ml
+++ b/src/plugins/wp/ProverWhy3.ml
@@ -520,8 +520,7 @@ let rec of_term ~cnv expected t : Why3.Term.term =
         in
         match lfun_name f, expected with
         | F_call s, _ -> apply_from_ns' s l sort
-        | Qed.Engine.F_subst _, _ ->
-            why3_failure "Driver link with subst not yet implemented"
+        | Qed.Engine.F_subst (s, _), _ -> apply_from_ns' s l sort
         | Qed.Engine.F_left s, _ | Qed.Engine.F_assoc s, _ ->
             let rec aux = function
               | [] -> why3_failure "Empty application"
diff --git a/src/plugins/wp/driver.mll b/src/plugins/wp/driver.mll
index 3f297a4ddd5fa79c1f875b742c11bb91b0c75135..400780fc71d0bafcd88602899de0d5c30747847f 100644
--- a/src/plugins/wp/driver.mll
+++ b/src/plugins/wp/driver.mll
@@ -81,10 +81,7 @@
     | `Default -> conv_bal default (name,default)
     | `Left  -> Qed.Engine.F_left name
     | `Right -> Qed.Engine.F_right name
-    | `Nary  ->
-        if Qed.Plib.is_template name
-        then Qed.Engine.F_subst name
-        else Qed.Engine.F_call name
+    | `Nary  -> Qed.Engine.F_call name
 
 }