var A, B :string
put "type string A, terminate with "
get A :*
put "type string B, terminate with "
get B :*
var ed :int
include "edit.dist.t" % computes value of edit distance
D(ed, A, B)
put "D(", A, ", ", B, ")=", ed
put "----------"
include "edit.matrix.t" % compute edit distance matrix DM(,)
Dist(ed, A, B)
put "----------"
include "edit.Hirsch1.t" % the O(|B|) space
include "edit.Hirsch2.t" % calculate last row of DM(,), fwd or reverse
include "edit.Hirsch3.t" % divide and conquer strings A and B
include "edit.Hirsch.t" % driver, start recursion off
Hirschberg(ed, A, B) % gives an optimal alignment
put "D(", A, ", ", B, ")=", ed
put "----------"
%\fB Test Driver for Edit Distance Routines.\fP