The proposed algorithm for cutpaste string composite operation ITCutPaste (Inclusive Transformation of CutPaste) is based on inclusive transformation of operational transformation. The algorithm ABTS (Shao et al. 2009), already contains ITII (Inclusive Transformation of Insert–Insert)/ITID (Inclusive Transformation of Insert–Delete)/ITDD (Inclusive Transformation of Delete–Delete)/ITDI (Inclusive Transformation of Delete–Insert) algorithms for transformation of insert and delete string operations. So to perform cutpaste operation, first the substring ‘s’ get deleted from p by operation delete(s, p) and then ‘s’ get inserted at position q by operation insert(s, q). Here, delete(s, p) and insert(s, q) are independent operations. At all sharing sites, transformation functions corresponding to both delete(p, s) and insert(q, s) get called which results in increase in the time complexity.
This research work proposes a single transformation algorithm for composite string operation cutpaste. So all sites require only single transformation function for cutpaste operation. The time complexity of transformation function ITCutPaste for cutpaste operation is same as transformation function for insert or delete ITDI/ITID. It is based on inclusive transformation and ABT Framework so it can be formally proved.
Type of operations
ITCutPaste consists of operations o1, o2 as input and o1′ as output. Operations o1, o2 and o1′ may be string or character operations which operate on shared data in multiuser groupware collaborative applications like group editors.
Definition 1
o1 and o2 are contextually equivalent o1o2, o1Uo2 and if input is o1 and output then output should be o2→o1′.
Design and analysis of algorithms
ITCutPaste consists many subalgorithms ITDCp (Inclusive Transformation of Deletion with CutPaste), ITICp (Inclusive Transformation of Insertion with CutPaste), ITCpI (Inclusive Transformation of CutPaste with Insertion), and ITCpD (Inclusive Transformation of CutPaste with Deletion). The proposed algorithm satisfies causality and admissibility preservation.
Definition 2
If we have exec(o_{i}), then all exec(o_{i−1}) must be completed then only oi satisfies causality.
Definition 3
If o1Uo2 then IT(o1,o2) satisfies admissibility. It does not have inconsistent order at shared environment.
Theorem 2
Let H is admissible history of operation which satisfies causality. Also, sq is a sequence of operations and sq^{~}
_{~}H. Then, if o is executed in state s, we have exec(s, H). There should be sq′^{~}~ (sq.o) and sq′ must be consistent.
The ITCutPaste(o1, o2) transforms o1 with another operation o2 with output of this function is o1′. The precondition of ITCutPaste(o1, o2) is o1Uo2 and the postcondition is o2→o1′. The following “Type of operations” presented the algorithm ITDCp and “Design and analysis of algorithms” presented the algorithm ITICp. In algorithm ITCutPaste if o1 operation type is insert and o2 operation type is CutPaste then ITICp is called and if o1 operation type is delete and o2 operation type is CutPaste then ITDCp is called. If o1 operation type is CutPaste and o2 operation type is insert, then ITCpI is called and if o1 operation type is CutPaste and o2 operation type is delete then ITCpD is called.
Algorithm ITDCp
Algorithm ITDCp takes as parameters o1 and o2 and return o1′. Here, o1 is deletion operation and o2 is CutPaste operation. Here, precondition is o1Uo2 and postcondition is o2→o1′. GSMRITFDD(o1, o2) used in Algorithm ITDCp is transformation algorithm to transform o1 (delete) and o2 (delete) operations.
Algorithm ITICp
Algorithm ITICp takes as parameters o1 and o2 and return o1′. Here, o1 is insertion operation and o2 is CutPaste operation. Here, precondition is o1Uo2 and postcondition is o2→o1′.
Algorithm GSMRITFDD
The new algorithm GSMRITFDD is proposed that removed all faults of existing ITDD (Shao et al. 2009) for inclusive transformation of two deletions and work well in all possible cases. It needs to consider the following cases regarding the relations between the two target regions, R1 = s [o1.pos :(o1.str + o1.pos)] and R2 = s[o2.pos:(o2.pos + o2.str)]
Consider the following cases regarding the relations between the two target regions, R2 = s [o2.pos: (o2.pos + lo2.strl)] and R1 = s [o1.pos: (lo1.strl + o1.pos)].

1.
(By line9) When R2 is completely on the right of R1. In this case, Deletion of R2 does not affect o1 and hence o1 is returned asis.

2.
(By line7) If R1 is on the right of R2. In this case, after R2 is deleted, we shift o1′.pos by 1o2.strl characters to the left to get transformed string operation o1′.

3.
(By line16) R1 is included in R2. In this case, after o2 is executed, R1 is already deleted. So there is no longer need to execute o1. That is why it returns an empty operation ¢.

4.
(By line13) When R2 partially overlaps with R1 around the left border of R1. After o2 is executed, the left part of R1 is already deleted. Hence, in this case, we need to reset o1.pos so that it will start from (o2.pos). So o1.str only needs to include the right part that is not deleted by o2, starting from (o2.pos + lo2.strl)—o1.pos in the original o1.str.

5.
(By line11) When R2 partially overlaps with R1 around the right border of R1. In this case, this is similar to case (4). After o2 is executed, o1 only needs to delete the left part that is not deleted by o2.

6.
(By line18) R2 is included in R1. The deletion of R2 within R1 divides R1 into three parts, among which the middle overlapping part is already deleted by o2. Hence, o1 must be split into two suboperations that delete the two remaining substrings left and right, respectively.