anchor.diff:          // Write quotation
           let command = 
               <@
  -                fun (r:_3D) (rulesIndexed:_[]) (recTable:_[]) -> 
  +                fun (r:_3D) (rulesIndexed:_[]) (recTable:_[]) (rules:rule[]) -> 
                       let tx = r.GlobalID0 // len
                       let ty = r.GlobalID1 // i
   
  
positive.code:                                 else [| int noLbl; int LblState.Conflict |] // new LabelWithState(noLbl, LblState.Conflict)
                      
                          let processRule rule ruleIndex i k l =
                              let rule = getRuleStruct rule
                              if rule.R2 <> 0us then
                                  let leftStart = ( k * rowSize + i - calcDiff k ) * nTermsCount
                                  let rightStart = ( (l-k-1) * rowSize + k+i+1 - (calcDiff (l-k-1)) ) * nTermsCount
  
                                  for m in 0..nTermsCount - 1 do
                                      let leftCell:CellData = recTable.[leftStart + m]
                                      if not (isCellDataEmpty (leftCell)) && getCellRuleTop leftCell rules = rule.R1 then
                                          let cellData1 = getCellDataStruct leftCell
                                          for n in 0..nTermsCount - 1 do
                                              let rightCell = recTable.[rightStart + n]
                                              if not (isCellDataEmpty (rightCell)) && getCellRuleTop rightCell rules = rule.R2 then
                                                  let cellData2 = getCellDataStruct rightCell
                                                  let lblWithState = chooseNewLabel rule.Label cellData1.Label cellData2.Label cellData1.LabelState cellData2.LabelState
                                                  let newWeight = 0uy//weightCalcFun rule.Weight cellData1.Weight cellData2.Weight
                                                  let currentElem = buildData ruleIndex (toState (lblWithState.[1])) (byte lblWithState.[0]) newWeight
                                                  recTable.[( l * rowSize + i - calcDiff l ) * nTermsCount + int rule.RuleName - 1].rData <- currentElem
                                                  recTable.[( l * rowSize + i - calcDiff l ) * nTermsCount + int rule.RuleName - 1]._k <- uint32 k
                                                      // <- new CellData(currentElem, uint32 k) |> Some
  
                          for k in 0..(len-1) do
                              let curRule:RuleIndexed = rulesIndexed.[k]
                          
                              let h = ref 0
                              h := 9
                              
                              //processRule curRule.Rule curRule.Index i k len
                      
              @>
      
  
negative.code:         // computation grid configuration: 2D grid with size = rows*columns and local block with size=localWorkSize*localWorkSize
          let d =(new _3D(rulesIndexed.Length, recTable.Length, recTable.Length, maxLocalWorkSize, maxLocalWorkSize, maxLocalWorkSize))
          // Prepare kernel. Pass actual parameters for computation:
          kernelPrepare d rulesIndexed recTable rules
          // Add command into queue and finish it
          let _ = commandQueue.Add(kernelRun()).Finish()
      
  