         delete @unvisited[key]
         [v1, v2, @product_vertices[key]]
 
+    # this only works if arc equivalence is assumed to mean
+    # that the arcs have the same @value
+    intersecting_arcs: (v1, v2, callback) ->
+      vals = {}
+      for arc in v1.arcs()
+        vals[arc.value] = arc
+      for other_arc in v2.arcs()
+        if (this_arc = vals[other_arc.value])
+          callback(this_arc, other_arc)
+
+
 
   # return a new digraph that is the intersection of the two graphs.  
+  # NOTE: FSM subclasses will end up with sinks that aren't final.
   intersect: (other) ->
     digraph = @
     product = new @constructor()

    while (next_vertices = helper.get_next_vertices())
      [this_vertex, other_vertex, product_vertex] = next_vertices

      # for the two current vertices, iterate over the 
      # transitions with same values
      for this_arc in this_vertex.arcs()
        for other_arc in other_vertex.arcs() when this_arc.test(other_arc.value)
          this_next = this_arc.next_vertex
          other_next = other_arc.next_vertex

          # if the new graph does not already have the intersection state,
          # create an intersection state and index it
          product_next = helper.product_next(this_next, other_next)
          product.add_arc(product_vertex, product_next, this_arc.value)
    product




  stepper: ->
    visited_arcs = {}

          next.push(arc.next_vertex)
      return next

  write_graph: (filename) ->
    fs = require("fs")
    string = Graphviz.digraph_preamble("Djinn")
