anchor.diff:      val startFinal: array<int*HashSet<int>*HashSet<int>>
       new (grm, strtFnl) = {grammar = grm; startFinal = strtFnl}
   
  -let closure (toUpdate:ResizeArray<_*_*_>) (atm:Double.SparseMatrix) (gpuSparseMatrix:MySparseMatrix) (gpuSparseMatrix1:MySparseMatrix) =    
  -    //printfn "closure start"
  -    let upCsr = Storage.SparseCompressedRowMatrixStorage.OfIndexedEnumerable(atm.RowCount,atm.RowCount,toUpdate) 
  -    let csr = (atm.Storage :?> Storage.SparseCompressedRowMatrixStorage<_>)    
  -    //let gpuSparseMatrix = new MySparseMatrix(atm.RowCount, atm.NonZerosCount, csr.Values, csr.RowPointers, csr.ColumnIndices)
  -    //let gpuSparseMatrix1 = new MySparseMatrix(atm.RowCount, toUpdate.Count, upCsr.Values, upCsr.RowPointers, upCsr.ColumnIndices)
  -    gpuSparseMatrix1.Update (toUpdate.Count, upCsr.Values, upCsr.RowPointers, upCsr.ColumnIndices)
  -    //gpuSparseMatrix.Update (atm.NonZerosCount, csr.Values, csr.RowPointers, csr.ColumnIndices)
  -    let mutable zeros = atm.NonZerosCount
  -    let mutable res = sparseCudaGeam gpuSparseMatrix gpuSparseMatrix1 atm.RowCount
  -    let _go = ref true
  -    while !_go do
  -        res <- sparseCudaGeam res (sparseCudaGemm res res atm.RowCount) atm.RowCount
  -        let newZeros = res.Nnz
  -        _go := not (zeros = newZeros )
  -        zeros <- newZeros
  -
  -    csr.ColumnIndices <- res.CsrColInd
  -    res.CsrRow.CopyTo(csr.RowPointers,0)  //csr.col  <- res.CsrRow
  -    csr.Values <- res.CsrVal
  -    //printfn "closure end"
  -    atm
  -//    printfn "closure start"
  -//    let mutable zeros = atm.NonZerosCount
  -//    let mutable res = atm
  -//    let _go = ref true
  -//    while !_go do
  -//        res <- (res.Add (res.Multiply res) :?> Single.SparseMatrix)
  -//        let newZeros = res.NonZerosCount
  -//        _go := not (zeros = newZeros )
  -//        zeros <- newZeros
  -//    printfn "closure end"
  -//    res
  -
   let main (input:HashSet<int> [,]) (grammar:Grammar) =
       let inputSize = Array2D.length1 input
       let grammarSize = Array2D.length1 grammar.grammar    
  -    //let xxx = Double.SparseMatrix.Create((inputSize * grammarSize), (inputSize * grammarSize), 0.0)
  -    let mutable intersectionResult = Double.SparseMatrix.Create((inputSize * grammarSize), (inputSize * grammarSize), 0.0)
  +    let intersectionResult = Double.SparseMatrix.Create((inputSize * grammarSize), (inputSize * grammarSize), 0.0)
       let csr = (intersectionResult.Storage :?> Storage.SparseCompressedRowMatrixStorage<_>)    
       let gpuSparseMatrix = new MySparseMatrix(intersectionResult.RowCount, intersectionResult.NonZerosCount, csr.Values, csr.RowPointers, csr.ColumnIndices)
       let gpuSparseMatrix1 = new MySparseMatrix(intersectionResult.RowCount, intersectionResult.NonZerosCount, csr.Values, csr.RowPointers, csr.ColumnIndices)
  +
       let stateRemap,backStateRemap =
           let m = new Dictionary<_,_>()
           let n = new ResizeArray<_>()
  
positive.code:                 incr k
          n,m
  
      let mutable _go = true
  
      let toUpdate = new ResizeArray<_>()
  
      while _go do
          //printfn "s1"
          //let toUpdate = new System.Collections.Concurrent.ConcurrentBag<_>()
          //System.Threading.Tasks.Parallel.For(0,inputSize,fun _startInput ->
          //input
          //|> Array2D.iteri (fun _startInput _endInput e -> 
          for _startInput in 0..inputSize-1 do
              for _endInput in 0..inputSize-1 do
                  if input.[_startInput,_endInput].Count <> 0 || _startInput = _endInput
  
negative.code:                             if ((_startInput = _endInput && _startGrammar = _endGrammar)
                                 || input.[_startInput,_endInput].Overlaps grammar.grammar.[_startGrammar, _endGrammar])
                              then 
                                   toUpdate.Add(backStateRemap.[(_startInput,_startGrammar)], backStateRemap.[(_endInput,_endGrammar)], 1.0)
  
          let upCsr = Storage.SparseCompressedRowMatrixStorage.OfIndexedEnumerable(intersectionResult.RowCount,intersectionResult.RowCount,toUpdate) 
          gpuSparseMatrix1.Update (toUpdate.Count, upCsr.Values, upCsr.RowPointers, upCsr.ColumnIndices)    
          closure ()
          toUpdate.Clear()
          _go <- false
          intersectionResult
          |> Matrix.iteriSkipZeros (fun i j n ->
              let _startInput,_startGrammar = stateRemap.[i] 
              let _endInput,_endGrammar = stateRemap.[j]
  