Tree Automata for Extracting Consensus from Partial Replicas of a Structured Document
JJournal of Software Engineering and Applications, 2017, 10, 432-456
Tree Automata for Extracting Consensus from Partial Replicas of a Structured Document
Maurice Tchoupé Tchendji, Milliam M. Zekeng Ndadji
Department of Mathematics and Computer Science, Faculty of Sciences, University of Dschang, Dschang, Cameroon
Abstract
In an asynchronous cooperative editing workflow of a structured document, each of the co-authors receives in the different phases of the editing process, a copy of the document to insert its contribution. For confidentiality reasons, this copy may be only a partial replica containing only parts of the (global) document which are of demonstrated interest for the considered co-author. Note that some parts may be a demonstrated interest over a co-author; they will therefore be accessible concurrently. When it’s synchronization time (e.g. at the end of an asynchronous editing phase of the process), we want to merge all contributions of all authors in a single document. Due to the asynchronism of edition and to the potential existence of the document parts offering con-current access, conflicts may arise and make partial replicas unmergeable in their entirety: they are inconsistent, meaning that they contain conflictual parts. The purpose of this paper is to propose a merging approach said by consensus of such partial replicas using tree automata. Specifically, from the partial replicas updates, we build a tree automaton that accepts exactly the consensus documents. These documents are the maximum prefixes contain-ing no conflict of partial replicas merged.
Keywords
Structured Documents, Workflow of Cooperative Edition, Merging Partial Replicas, Conflict, Consensus, Tree Automata, Automata Product, Lazy Evaluation
1. Introduction
A significant proportion of documents handled and/or exchanged by appli- cations has a regular structure defined by a grammatical model (DTD: Document Type Definition, schema [1]): they are called structured documents. The ever- increasing power of communication networks in terms of throughput and
How to cite this paper: Tchendji, M.T. and Ndadji, M.M.Z. (2017) Tree Automata for Extracting Consensus from Partial Rep- licas of a Structured Document. Journal of Software Engineering and Applications, 10, 432-456. https://doi.org/10.4236/jsea.2017.105025 Received: March 14, 2017 Accepted: May 23, 2017 Published: May 26, 2017 Copyright © 2017 by authors and Scientific Research Publishing Inc. This work is licensed under the Creative Commons Attribution International License (CC BY 4.0). http://creativecommons.org/licenses/by/4.0/
Open Access . T. Tchendji, M. M. Z. Ndadji security, as well as efficiency is concerned, has revolutionized the way of editing such documents. Indeed, to the classical model of an author, editing locally and autonomously his document, was added the (asynchronous) cooperative editing in which, several authors located on geographically distant sites, coordinate to edit asynchronously a same structured document (Figure 1): it is an asyn- chronous cooperative editing workflow. In such editing workflows (Figure 2), the desynchronized editing phases in which each co-author edits on his site his copy of the document, alternate with the synchronization-redistribution phases in which the different contributions (local replicas) are merged (on a dedicated site) into a single document, which is then redistributed to the various co-authors for the continuation of the edition. This pattern is repeated until the document is completely edited. In the literature, there are several cooperative editing systems offering, for some, a concurrent collaborative edition of the same document (Etherpad [2], Google Docs [3], Fidus Writer [4], …), or on the other hand, a truly distributed and asynchronous edition (Wikis [5] [6], Git [7] [8], …) in which the co-authors work on replicas of the document; replication techniques as well as recon- ciliation strategies must then be addressed. If the collectively edited document is structured, it may in some cases be desirable for reasons of confidentiality, for example, a co-author has access only to certain information, meaning that he only has access to certain parts of the document belonging to certain given types (sorts ) of the document model. Thus, the replica i t edited by co-author i c from the site i may be only a partial replica of the (global ) document t, obtained via a projection operation, which conveniently eliminates from global Figure 1. The desynchronized cooperative editing of partial replicas of a structured document. A sort is a datum used to define the structuring rules (syntax) in a document model. Example: a non-terminal symbol in a context free grammar, an ELEMENT in a DTD. We designate by global document or simply document when there is no ambiguity, the document including all parts. . T. Tchendji, M. M. Z. Ndadji
Figure 2. An orchestration diagram of an asynchronous cooperative editing workflow. document t parts which are not accessible to the co-author in question. We call “view” of a co-author, the set of sorts that he can access [9]. Figure 1 is an illustration of such a cooperative edition in which, the edition and the merging of the (global) document in conformity to the (global) model G of documents are perform on site 1; while on site 2 and 3, other co-authors perform the edition of the partial replicas in accordance with projected models of documents G and G obtained from the global model G. When asynchronous local editions are done on partial replicas, it can be assumed that each co-author has on his site a local document model guiding him in his edition. This local model can help to ensure that for any update maji t of a partial replica i t (conform to the considered (local) model), there is at least one document t conform to the global model so that maji t is a partial replica of t: for this purpose, the local model should be coherent towards the global one . Thus, because of the asynchronism of the editing, the only inconsistencies that we can have when the synchronization time arrives are those from the concurrent edition of the same node (in the point of view of the global document) by several co-authors: the partial replicas concerned are said to be in conflict. This paper proposes an approach of detection and resolution of such conflicts by consensus during the synchronisation-redistribution phase, using a tree auto- maton said of consensus, to represent all documents that are the consensus of competing editions realised on the different partial replicas. Intuitively, a local model of document is coherent towards a global model if any (partial) document t i that is conform to it, is the partial replica of at least one (global) document t conform to the global model. Manipulated documents are structured; they can be intentionally represented by a tree. Intuitively, a node is an identifiable part in the document (a section, a subsection, an image, a table, …): it is the instance of a sort. . T. Tchendji, M. M. Z. Ndadji
A structured document t is intentionally represented by a tree that possibly contains buds [9] (see Figure 3). Intuitively, synchronizing or merging consens- ually the updates , , n t t (cid:31) of n partial replicas of a document t, consists in finding a document c t conform to the global model, integrating all the nodes of i t not in conflict and in which, all the conflicting nodes are replaced by buds. Consensus documents are therefore the largest prefixes without conflicts in merged documents. The algorithm of consensual merging presented in this paper is an adaptation of the fusion algorithm presented in [9] which does not handle conflicts. Technically, the process for obtaining the documents forming part of the consensus is: 1) for each update maji t of a partial replica i t , we associate a tree automaton with exit states ( ) i A recognizing the trees (conform to the global model) for which maji t is a projection [9]. 2) The consensual automaton ( ) sc A generating the consensus documents is obtained by perfor- ming a synchronous product of the automata ( ) i A with a commutative and associative operator noted ⊗ that we define. It is such that: ( ) ( ) isc = ⊗ A A . 3) It only remains to generate the set of trees (or those most representative) accepted by the automaton ( ) sc A , to obtain the consensus documents. In the subsequent sections, after the presentation (Section 2) of some concepts and definitions related to the cooperative editing and tree automata, we expose (Section 3) the construction process of the operator ⊗ and a proof of cor- rection of the algorithm proposed for its implementation. The Section 4 is de- voted to the conclusion. In the appendices, we fully unfold the example intro- duced in Section 3 highlighting the major concepts outlined in this paper (Appendix A), as well as some screenshots of an asynchronous cooperative editor prototype operating in a distributed environment that we have developed for the experimental purposes of the algorithms described in this paper (Appendix B). Figure 3. An intentional representation of a docu- ment containing buds. A bud is a leaf node of a tree indicating that an edition must be done at that level in the tree. Edit a bud consists to replace it by a sub-tree using the productions of the grammar of the document. . T. Tchendji, M. M. Z. Ndadji
2. Structured Cooperative Edition and Notion of Partial Replication
In the XML community, the document model is typically specified using a Document Type Definition (DTD) or a XML Schema [1]. It is shown that these DTD are equivalent to (regular) grammars with special characteristics called XML grammars [10]. The (context free) grammars are therefore a generalization of the DTD and on the basis of the studies they have undergone, mainly as formal models for the specification of programming languages, they provide an ideal framework for formal study of the transformations involved in XML technologies. That’s why we use them in our work as tools for specifying the structure of documents. We will therefore represent the abstract structure of a structured document by a tree and its model by an abstract context free grammar; a valid structured document will then be a derivation tree for this grammar. A context free grammar defines the structure of its instances (the documents that are conform to it) by means of the productions. A production, generally denoted : n p X X X → (cid:31) is comparable in this context, to a structuring rule which show how the symbol X located in the left part of the production is divided into a sequence of other symbols n X X (cid:31) located on its right side. More formally. Definition 1. A abstract context free grammar is given by ( ) , , A = S P composed of a finite set S of grammatical symbols or sorts corresponding to the different syntactic categories involved, a particular grammatical symbol A ∈ S called axiom, and a finite set * ⊆ × P S S of productions. A production ( ) ( ) ( ) ( ) , , ,
P P P n
P X X X = (cid:31) is denoted ( ) ( ) ( ) : P P P n
P X X X → (cid:31) and P de- notes the length of the right hand side of P. A production with the symbol X as left part is called a X-production. For certain treatments on trees (documents) it is necessary to designate precisely a particular node. Several indexing techniques exist, among them, the so-called Dynamic Level Numbering [11] based on identifiers with variable lengths inspired by the Dewey decimal classification (see Figure 4). According to this indexing system, a tree can be defined as follows: Definition 2. A tree whose nodes are labelled in an alphabet S is a partial map * : t → S whose domain ( ) * Dom t ⊆ is a prefix closed set such that, for all ( ) u Dom t ∈ the set ( ) { } | i u i Dom t ∈ ⋅ ∈ is a not empty interval of integers [ ]
1, , n ∩ (cid:31) ( ( ) Dom t ε∈ is the root label); the integer n is the arity of the node whose address is u. ( ) t w is the value (label) of the node in t whose address is w. If , , n t t (cid:31) are trees and a ∈ S , we denote [ ] , , n t a t t = (cid:31) the tree t of domain ( ) { } ( ) { } | 1 , i Dom t i u i n u Dom t ε= ∪ ⋅ ≤ ≤ ∈ with ( ) t a ε = and ( ) ( ) i t i u t u ⋅ = . Let t be a document and ( ) , , A = S P a grammar. t is a derivation tree for XML is the acronym for Extensible Markup Language. . T. Tchendji, M. M. Z. Ndadji
Figure 4. Example of an indexed tree. if its root node is labelled by the axiom A of , and if for all internal node n labelled by the sort X , and whose sons , , n n n (cid:31) , are respectively labelled by the sorts , , n X X (cid:31) , there is one production P ∈ P such that, : n P X X X → (cid:31) and P n = . It is also said in this case that t belongs to the language generated by from the symbol A and it is denoted ( ) , t A ∈ L or t ∴ . There is a bijective correspondence between the set of derivation trees of one grammar and all its Abstract Syntax Tree (AST). In an AST, nodes are labelled by the names of the productions. Definition 3. The set ( ) , AST X of abstract syntax trees according to the grammar associated with grammatical symbol X consists of trees in the form [ ] , , n P t t (cid:31) where P is a production such that ( ) P X X = , n P = and ( ) ( ) , , i i i P i t AST X X X ∈ = for all i n ≤ ≤ . AST are used to show that a given tree labelled with grammatical symbols is an instance of a given grammar. A structured document being edited is represented by a tree containing buds (or open nodes) which indicate in a tree, the only places where editions (i.e. updates) are possible . Buds are typed; a bud of sort X is a leaf node labelled by X ω : it can only be edited (i.e extended to a sub-tree) by using a X-production of the form : n P X X X → (cid:31) which have as effect, 1) the replacement of X ω labelled bud by a P labelled node and, 2) the creation of n buds labelled respectively by ,1 i X i n ω ≤ ≤ . Thus, a structured document being edited and that have the grammar ( ) , , A = S P as model, is a derivation tree for the extended grammar ( ) , , A ωΩ Ω = ∪ ∪ S S P S obtained from as follows: for all sort X, we not only add in the set S of sorts a new sort X ω , but we also add a new ε -production : X X ω ε Ω → in the set P of productions; so we have: { } , X X ω ω = ∈
S S and { } : ,
X X X ω ω ω ε Ω Ω = → ∈
S S . We are interested in this paper only in the positive edition, based on a partial optimistic replication [12] of edited documents; In fact, the published documents are only increasing: there is no erasure possible as soon as a synchronization has been performed. . T. Tchendji, M. M. Z. Ndadji
When we look at the productions of a grammar, we can notice that each sort is associated with a set of productions. From this point of view, therefore, we can consider a grammar as an application [ ] ( ) : , gram symb prod symb → (1) which associates to each sort a list of pairs formed by a production name and the list of sorts in the right hand side of this production. Such an observation suggests that a grammar can be interpreted as a (descending) tree automaton that can be used for recognition or for the generation of its instances. Definition 4. A (descending) tree automaton defined on Σ is a quadruplet ( ) , , , Q R q = Σ A of a set Σ of symbols; its elements are the labels of the nodes of the trees to be generated (or recognized), a set Q of states, a particular state q Q ∈ called initial state, and a finite set * R Q Q ⊆ × Σ × of transitions. • An element of R is denoted [ ] ( ) , , , n q q q σ→ (cid:31) or in an equivalent way ( ) , , n q q q σ → (cid:31) : intuitively, [ ] , , n q q (cid:31) is the list of states accessible from the q state by crossing a transition labelled σ . • If ( ) ( ) , , , , , , k k k kn n q q q q q q σσ → → (cid:31) (cid:31) (cid:31) denotes the set of transitions associated to the state q, we denote ( ) ( ) , , , , , , , , k k kn k n next q q q q q σ σ = (cid:31) (cid:31) (cid:31) the list that consists of pairs ( ) , , , i i ii n q q σ (cid:31) . A transition of the form [ ] ( ) , q σ→ is called final tran- sition and a state possessing this transition is a final state. One can interpret a grammar ( ) , , A = S P as a (descending) tree auto- maton [13] ( ) , , , Q R q = Σ A considering that: 1) Σ = P is the type of labels of the nodes forming the tree to recognize. 2) Q = S is the type of states and, 3) [ ] ( ) , , , n q q q σ→ (cid:31) is a transition of the automaton when the pair [ ] ( ) , , , n q q σ (cid:31) appears in the list ( ) gram q . We note A the tree auto- maton derived from . To obtain the set AST A of AST generated by a tree automaton A from an initial state q , you must: 1) Create a root node r, associate the initial state q and add it to the set AST A initially empty. 2) Remove from AST A an AST t under construction i.e with at least one leaf node node unlabelled. Let q be the state associated to node . For all transition ( ) , , n q q q σ → (cid:31) of A , add in AST A the trees t ′ which are replicas of t in which the node node has been substituted by a node node ′ labelled σ and possessing n (unlabelled) sons, each associated to a (distinct) state i q of [ ] , , n q q (cid:31) . 3) Iterate step (2) until you obtain trees with all the leaf nodes labelled (they are consequently associated to the final states of A ): these are AST. We note t q (cid:30) A the fact that the tree automaton A accepts the tree t from the initial state q, and ( ) , q L A (tree language) the set of trees generated by the automaton A from the initial state q. Thus, ( ) ( ) ( ) , t q t q ⇔ ∈ (cid:30) L A A . As for automata on words, one can define a synchronous product on tree automata to obtain the automaton recognizing the intersection, the union, …, of Reminder: gram is the application obtained by abstraction of and have as type: [ ] ( ) : , gram symb prod symb → . . T. Tchendji, M. M. Z. Ndadji regular tree languages [13]. We introduce below the definition of the synchronous product of k tree automata whose adaptation will be used in the next section for the derivation of the consensual automaton. Definition 5. Synchronous product of k automata: Let ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) , , , , , , , , k k kk Q R q Q R q = Σ = Σ (cid:31)
A A be k tree automata. The synchronous product of these k automata k ⊗ ⊗ (cid:31) A A denoted ( ) iki = ⊗ A , is the automaton ( ) ( ) , , , sc Q R q = Σ A defined as follows: 1) Its states are vectors of states : ( ) ( ) k Q Q Q = × × (cid:31) ; 2) Its initial state is the vector formed by the initial states of the different automata : ( ) ( ) ( )
10 0 0 , , k q q q = (cid:31) ; 3) Its transitions are given by: ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) , , , , , , , ,, , , 1 k k ka n ni i ia n q q q q q qq q q i i k →⇔ → ∀ ≤ ≤ (cid:31) (cid:31) (cid:31) (cid:31)(cid:31) The derivation tree giving the (global) representation of a structured document edited in a cooperative way makes visible the set of grammatical symbols of the grammar that participated in its construction. As we mentioned in Section 1 above, for reasons of confidentiality (accreditation degree), a co-author mani- pulating such a document will not necessarily have access to all of these gram- matical symbols; only a subset of them can be considered relevant for him: it is his view. A view V is then a subset of grammatical symbols ( ⊆ V S ). A partial replica of t according to the view V , is a partial copy of t obtained by deleting in t all the nodes labelled by symbols that are not in V . Figure 5 shows a document t (center) and two partial replicas v t (left) and v t (right) obtained respectively by projections from the views { } , A B = V and { } , A C = V . Practically, a partial replica is obtained via a projection operation denoted π . We therefore denote ( ) t t π = V V the fact that t V is a partial replica obtained by projection of t according to the view V . Figure 5. Example of projections made on a document and partial replicas obtained. . T. Tchendji, M. M. Z. Ndadji
Let’s note i i maj t t ≤ V V the fact that the document i maj t V is an update of the document i t V , i.e. i maj t V is obtained from i t V by replacing some of its buds by trees. In an asynchronous cooperative editing process, there are synchronization points in which one tries to merge all contributions i maj t V of the various co- authors to obtain a single comprehensive document f t . A merging algorithm that does not incorporate conflict management and that relies on a solution to the reverse projection problem is given in [9]. The reverse projection (also call the expansion) of an updated partial replica i maj t V relatively to a given grammar ( ) , , A = S P , is the set maji T S of documents conform to that admit i maj t V as partial replica according to i V : ( ) { } | i i maj maj maj maji i i T t t t π= ∴ = S S SV V . A solution to this problem using tree automata is given in [9]; in that solution, productions of the grammar are used, to bind to a view i ⊆ V S a tree automaton ( ) i A such as the trees he recognizes from an initial state built from i maj t V are exactly those having this partial replica as projection according to the view i V : ( ) ( ) , i imaji t T q = L V S A . Practically, a state q of the automaton ( ) i A is a pair ( ) , Tag X ts where X is a grammatical symbol, ts is a forest (tree set), and Tag is a label that is either Open or Close and indicates whether the concerned state q can be used to generate a closed node or a bud. The states of ( ) i A are typed: a state of the form ( ) tsXTag , is of type X. We also have a function named typeState which, when applied to a state returns its type . A transition from one state q is of one of the forms ( ) [ ] ( ) , , , , n Close X ts p q q → (cid:31) or [ ] ( ) [ ] ( ) , , Open X X ω → . A transition of the form ( ) [ ] ( ) , , , , n Close X ts p q q → (cid:31) is used to generate AST of type X (i.e. those whose root is labelled by a X-production) admitting “ts” for projection ac- cording to the view i V if X does not belong to i V , and “ [ ] X ts ” otherwise. Similarly, a transition of the form [ ] ( ) [ ] ( ) , ,
Open X X ω → is used to generate a single AST reduced to a bud of type X. The interested reader may consult [9] for a more detailed description of the process of associating a tree automaton with a view and Appendix A for an illustration.
3. Reconciliation by Consensus
There are generally two distinct phases when synchronizing replicas of a A synchronization point can be defined statically or triggered by a co-author as soon as certain properties are satisfied. It may happen that the edition must be continued after the merging (this is the case if there are still buds in the merged document): we must redistribute to each of the n co-authors a (partial) replica i t V of f t such that ( ) i i f t t π= V V for the continuation of the editing process. :: typeState state symb → ( ) , typeState Open X ts X = ( ) , typeState Close X ts X = . T. Tchendji, M. M. Z. Ndadji document [14]: the updates detection phase which consists of recognizing the different replica nodes (locations) where updates have been made since the last synchronization, and the propagation phase which consists in combining the updates made on the various replicas to produce a new synchronized state (document) for each replica. In an asynchronous cooperative editing workflow of several partial replicas of a document, when you reach a synchronization point, you can end up with unmergeable replicas in their entirety as they contain not compatible updates they must be reconciled. This can be done by ques- tioning (cancelling) some local editing actions in order to resolve conflicts and result in a coherent global version said of consensus. Studies on reconciling a document versions are based on heuristics [15] insofar as there is no general solution to this problem. In our case, since all editing actions are reversible and it is easy to locate conflicts when trying to merge the partial replicas (see Section 3.2), we have a canonical method to eliminate conflicts: when merging, we replace any node (of the global document) whose replicas are in conflict by a bud. Thus, we prune at the nodes where a conflict appears, replacing the corresponding sub-tree with a bud of the ap- propriate type, indicating that this part of the document is not yet edited: the documents obtained are called consensus. These are the maximum prefixes without conflicts of the fusion of the documents resulting from the different expansions of the various updated partial replicas. For example, in Figure 8, the parts highlighted (blue backgrounds) in trees (f) and (g) are in conflict; they are replaced in the consensus tree (h) by a bud of type C (node labelled C ω ). The problem of the consensual merging of k updated partial replica whose global model is given by a grammar ( ) , , A = S P can therefore be stated as follows : Problem of the consensual merging: Given k views ( ) i i k ≤ ≤ V and k partial replica ( ) i maj i k t ≤ ≤ V , merge consensually the family ( ) i maj i k t ≤ ≤ V is to find the most large documents maj t S conforming to such that, for any document t con- forming to and admitting i maj t V as projection according to the view i V , maj t S and t are eventually updates each for other. i.e. (formula 2): ( ) ( ) i) ,1 , such that , ., ii) such that , i i maj majmaj k maji i i i maj k maji i i i i i k t t t t tt t t T t t t t t T π = = ∀ ≤ ≤ ∀ ∴ = ≅∈ ⊗ ∈ ⇔ ′ ′∃ ≤ ∈ ⊗ ∈ SV VS S S S (2) The solution that we propose to this problem stems from an instrumenta- lization of that proposed for the expansion (Section 2.2.2). Indeed, we use an associative and commutative operator noted ⊗ to synchronize the tree auto- mata ( ) i A constructed to carry out the various expansions in order to generate the tree automaton of consensual merging. Noting ( ) sc A this automaton, the This is particularly the case if there is at least one node of the global document accessible by more than one co-author and edited by at least two of them using different productions. Reminder: the editing actions made on a partial replica may be cancelled as long as they do not have been incorporated into the global document. The binary relation ≅ when it exists between two trees t and t expresses the fact that they are possibly updates each for other. This relationship is more explicitly explained in definition 6. . T. Tchendji, M. M. Z. Ndadji documents of the consensus are the trees of the language generated by the automaton ( ) sc A from an initial state built from the vector made of the initial states of the automata ( ) ( ) i A : ( ) ( ) , , maj maji i isc t t q consensus q = L L
V V
A A . ( ) sc A is obtained by proceeding as follows: 1) For each view i V , build the automaton ( ) i A who will carry out the expansion of the partial replica i maj t V as previously indicated (Section 2.2.2): ( ) , maji i majit q T = L A S A . 2) Using the op- erator ⊗ , compute the automaton generating the consensus language ( ) ( ) =1 ikisc = ⊗ A A . Before presenting the consensus calculation algorithm, let us specify using the concepts introduced in Section 2.1 the notion of (two) documents in conflict. Let *1 2 , : t t → A be two trees (documents) with respectively ( ) Dom t and ( ) Dom t their domains. We say that t and t admit a consensus, and we note t t , if theirs roots are of the same type i.e. ( ) ( ) ( ) ( ) ( ) ( ) t t typeNode t typeNode t ε ε⇔ = . It is then say that t and t are in conflict, and it is noted t t , when they admit a consensus but are not mergeable in their entirety. Intuitively, two documents t and t (not reduced to buds) are not fully mergeable (see Figure 6), if there exists an address ( ) ( ) w Dom t Dom t ∈ ∩ such that if we note n (resp. n ) the node located to address w in t (resp. in t ), then, n and n which are not buds are of the same type but have different labels. i.e. (formula 3): Figure 6. Example of documents in conflict. Trees we handle are AST and therefore, the nodes are labelled by productions names. Any node labelled by a X-production is said of type X. Furthermore, there is a function type Node such that type Node (t(w)) returns the type of the node located at the address w in t. It may then be noted that two documents (AST) admit no consensus if their roots are of different types. However, for applications that interest us, namely structured editing, since the editions are done from the root (which is always of the type of the axiom) to the leaves using productions, the documents we manipulate always admit at least a consensus. . T. Tchendji, M. M. Z. Ndadji ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ( ) ( ) ( ) ( ) ) ,and , and t t with t X t Xt tw Dom t Dom t t w t w XtypeNode t w typeNode t w ω ω ω ε ε≠ ≠⇔ ∃ ∈ ∪ ≠ ≠ = (3) Figure 6 shows two conflicting documents. In fact, at address 2.1 we have two nodes of the same type (“C”) but edited with different C-productions: pro- duction
C C C → in the first document, and production C A C → in the second one. Let *1 2 , : t t → A be two trees (documents) in conflict with respectively ( ) Dom t and ( ) Dom t their domains. The consensual tree * : c t → A de- rived from t and t ( c t t t = ⊗ ) has as domain the union of domains of the two trees in which we subtract elements belonging to domains of sub-trees derived from the conflicting nodes. In fact, we prune at the nodes in conflict and they appear in the consensus tree as a (unique) bud. So, ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( ) ( )( ) ( ) ( ) ( ) ( ) ( )( ) ( )( ) ( ) ( ) ( ) ( ) ( ) if andif andif andif and , . ,, andif c c t w typeNode t w typeNode t w t w t wt w typeNode t w typeNode t w t w Xt w typeNode t w typeNode t w t w Xt w w Dom t u v tq w u vw Dom t t w t u X typeNode t u typeNode t ut w w Dom ωωω = == == =∉ ∃ ∈ =∀ ∈ = = =∉ (cid:29) ( )( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )( ) ( ) ( ) *11 1 21 2 12 1 2 and , . , and if andand and t u v tq w u vt u X typeNode t u typeNode t uX typeNode t w typeNode t w t w Xt w X t w t w ωω ωω ∃ ∈ = = = = ≠ ≠ ≠ (cid:29) (4) Figure 7 present the document resulting from the consensual merging of the Figure 7. Document resulting from the consensual merging of the documents in Figure 6. . T. Tchendji, M. M. Z. Ndadji documents in Figure 6. We have prume at the level of nodes 2.1 in both do- cuments who are in conflict. When c t t t = ⊗ , there may be nodes of t and those of t which are updates of the nodes of c t : it is said in this case that t (resp. t ) and c t are updates each for other. Definition 6. Let , t t be two documents that are not in conflict. It will be said that they are updates each for other and it is noted t t ≅ , if there exists at least two addresses , w w ′ of their respective domains such that ( ) t w (resp. ( ) t w ′ ) is a bud and ( ) t w (resp. ( ) t w ′ ) is not. Consideration of documents with buds requires the readjustment of some models. For example, in the following, we will handle the tree automata with exit states instead of tree automata introduced in definition 4. Intuitively, a state q of an automaton is called an exit state if there is a unique transition [ ] ( ) , q X ω → associated to it for generating a tree reduced to a bud of type X ∈ Σ : q is then of the form (Open X, []). A tree automata with exit states A is a quintuplet ( ) , , , , Q R q exit Σ where , , , Q R q Σ designate the same objects as those introduced in the definition 4, and exit is a predicate defined on the states ( : exit Q Bool → ). Any state q of Q for which exit q is True is an exit state. A type for automata with exit states can be defined in Haskell [16] [17] by: In Section 3.2.1 above, we said that, when two nodes are in conflict, “they appear in the consensus tree as a (unique) bud”. From the point of view of automata synchronization, the concept of “nodes in conflict” is the counterpart of the concept of “states in conflict” (as we specify below) and the above extract is reflected in the automata context by “when two state are in conflict, they appear in the consensus automaton in the form of a (single) exit state”. Thus, if we consider two states of the same type q and q (which are not exit states) of two automata auto and auto with associated transitions families re- spectively ( ) ( ) , , , , n n q a qs a qs → (cid:31) and ( ) ( ) , , , , n n q a qs a qs ′ ′→ (cid:31) , we say that the states q and q are in conflict (and we note q q ) if there is no transition starting from each of them and with the same label, i.e. ( ) ( ) { } ( ) { } ( ) , , , , , o o q q a a qs next q a qs next q qs qs ′ ′⇔ ∃ ∈ ∈ = This can be coded in Haskell by the following function: . T. Tchendji, M. M. Z. Ndadji
If X is the type of two states q and q ′ in conflict, they admit a single con- sensual state [ ] ( ) , q Open X ω = such as [ ] ( ) , next q X ω ω = . It is therefore obvious that two given automata admit a consensual automaton when their initials states are of the same type. The following function performs this test. The operator ⊗ used to calculate the synchronized consensual automaton ( ) ( ) ikisc = ⊗ A A is a relaxation of the operator used for calculating the automata product presented in the definition 5. ( ) ( ) , , , , sc Q R q exit = Σ A is an auto- maton with exit states and is constructed as follows: • Its states are vectors of states : ( ) ( ) k Q Q Q = × × (cid:31) ; • its initial state is formed by the vector of initial states of different automata: ( ) ( ) ( )
10 0 0 , , k q q q = (cid:31) ; • For the exit function , it is considered that when a given automaton ( ) j A reached an exit state , it no longer contributes to behavior, but is not opposed to the synchronization of the others automata: it is said “asleep” (see listing “Consensus Listing” below, lines 16, 18 and 23). So, a state ( ) , , k q q q = (cid:31) is an exit state if: (a) all composite states i q are asleep (see listing “Consensus Listing” below, line 5) or (b) there exist any two states i q and , j q i j ≠ , components of q that are in conflict (see listing “Consensus Listing” below, line 11) ( ) ( ) ( ) ( ) ( ) { } ( ) ( ) ( ) ( ) ( ) , , , 1, , or , , , ki i j exit q qexit q i k i j i j q q ⇔ ∀ ∈ ∃ ≠ (cid:31) (cid:31) • Its transitions are given by: a) If exit q then [ ] ( ) , q X ω → is the unique transition of q; X is the type of q. b) Else ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) , , , , , , , , , 1 ak k kn n q q q q q q i i k → ⇔ ∀ ≤ ≤ (cid:31) (cid:31) (cid:31) (cid:31) b1) ( ) i exit q and ( ) [ ] ( ) ( ) , , , 1 ij q Open X j j n = ∀ ≤ ≤ /* ( ) i q is asleep*/, else b2) ( ) ( ) ( ) ( ) , , i i ia n q q q → (cid:31) . a) reflects the fact that if a state q is an exit one, we associate a single transition for generating a tree reduced to a bud of the type of q (see listing “Consensus Listing” below, line 11). With (b1) we say that, if the component ( ) i q of q is an exit state, then for all composite state ( ) ( ) ( ) , , kj j q q (cid:31) , ( j n ≤ ≤ ) appearing in the right hand side in the transition (b), the i th component should be asleep. Since it must not prevent other non-asleep states to synchronize, it must be of the form [ ] ( ) , Open X where X is the type of the other states ( ) lj q (being yet synchronized) belonging The corresponding node in the reverse projection of the document is a bud and reflects the fact that the corresponding author did not publish it. In the case that this node is shared with another co-author who published it in its (partial) replica, it is the edition made by the latter that will be re-tained when merging. . T. Tchendji, M. M. Z. Ndadji to ( ) ( ) ( ) , , kj j q q (cid:31) (see function forward Sleep State defined in listing “Consensus Listing” below line 23 and used in lines 16 and 18). Finally, with (b2) we stipulate that if ( ) ( ) ( ) ( ) , , i i ia n q q q → (cid:31) is a transition of the automaton i A , then for all composite state ( ) ( ) ( ) , , kj j q q (cid:31) , ( j n ≤ ≤ ) appearing in the right part in the transition (b) above, the i th component is ( ) ij q (see listing “Con- sensus Listing” below, lines 12 to 15). Consensus Listing Proposition 7. The tree automaton ( ) iki = = ⊗ A A recognizes/generates from the initial state ( ) , , k q q q = (cid:31) all the trees from the consensual merging of trees recognized/generated by each automaton ( ) i A from the initial state i q . Moreover, these trees are the biggest prefixes without conflicts of merged trees. ( ) ( ) ( ) ( ) ( )
01 0 1 0 i) andii) prefix of , ii i i iiki iki i t t q t tt q t t t q = = ∀ ∃ ≅⊗ ⇔ ′ ′∀ ¬ ⊗ (cid:30)(cid:30) (cid:30)
AA A (5) Proof. A tree t is recognized by the synchronized automaton ( ) iki = ⊗ A if, and only if, one can label each of its nodes by a state of the automaton in accordance with what is specified by the transitions of the automaton. Moreover, all the leaf nodes of t must be labelled by using final transitions; in our case, they are of the form [ ] ( ) , q p → . This means that if a node whose initial label is a is labelled by the state q and if it admits n successors respectively labelled by , , n q q (cid:31) , then ( ) , , a n q q q → (cid:31) must be a transition of the automaton. As the automaton is deterministic this labelling is unique elsewhere (including the initial state attached to the root of the tree). By focusing our attention both on the state q labelling a node and its i th component i q , on each of the branches of t, 1) we cut as soon as we reach an exit state in relation to the automaton ( ) i A (i.e. i q is Automata ( ) i A being deterministic (see proposition 3.3.3 of [18]), ( ) iki = ⊗ A is deterministic as synchronous product of deterministic automata. . T. Tchendji, M. M. Z. Ndadji an exit state), or, 2) if q is an exit state (in this case we are handling a leaf) and i q is not, relative to ( ) i A (in this case, i q was in conflict with at least one other component j q of q); we replace that node with any sub-tree i t ′ that can be generated by ( ) i A from the state i q . So, ( ) ( ) ( ) ( ) and i iki i i i i t q i t t q t t = ⊗ ⇒ ∀ ∃ ≅ (cid:30) (cid:30) A A (6) since a state of A is an exit one if and only if each of its components is (in the i A ) or if at least two of its components are in conflict. Conversely, suppose ( ) i i i t q (cid:30) A , by definition of the synchronized con- sensual automaton, we have ( ) ( ) , , ik ki i i k t q q = = ⊗ ⊗ (cid:30) (cid:31) A . So overall ( ) ( ) ( ) { } , | i ik ki i i i i L q t t q = = ⊗ = ⊗ (cid:30) A A (7) Suppose that t is recognized by ( ) iki = ⊗ A ; thus there is a labelling of its nodes with the states of ( ) iki = ⊗ A and as the transitions used for the labelling of its leaves are final. Let p t be a prefix of t. Let us show that p t is not recognized by ( ) iki = ⊗ A using the fact that any labelling of p t has at least one leaf node labelled by a state that is not associated to a final transition. The labels associated to the nodes of p t are the same as those associated to the nodes of same addresses in t because p t is a prefix of t and ( ) iki = ⊗ A is deterministic. p t is obtained from t by pruning some sub-trees of t; so naturally he has a (non-zero) number of leaf nodes that can be developed to obtain t. Let us choose a such node and call it f n . Suppose that it is labelled p and was associated with a state ( ) , , f k q q q = (cid:31) when labelling t. The p_transition that permit to recognize f n is not a final transition. Indeed, f n has in t p sons whose labels can be suppose to be the states | |1 , , f p q qf (cid:31) . This means according to the labelling process and considering the fact that ( ) iki = ⊗ A is deterministic, that the single transition used for labelling f n and of its p sons is ( ) , , p pf f f q q q → (cid:31) which is not a final transition. Therefore, p t is not recognized by ( ) iki = ⊗ A . □ Figure 8 is an illustration of an asynchronous cooperative editing process generating partial replicas (Figure 8(c) and Figure 8(e)) in conflict from the grammar having as productions: : : :: : :: P A C B P B C A P C A CP A P B B B P C C CP C ε ε→ → →→ → →→ (8) Initially in the process, two partial replicas (Figure 8(b) and Figure 8(d)) are obtained by projections of the global document (Figure 8(a)). After their update (Figure 8(c) and Figure 8(e)) a synchronization point is reached and, by applying the approach described in Section 3.1 i.e, association of tree automata ( ) A and ( ) A respectively to the partial replicas tv and tv , their con- sensual synchronization in the automaton ( ) ( ) ( ) sc = ⊗ A A A , and finally, By realising expansions of each of the replicas, we respectively obtain among others, the documents presented by Figure 8(f) and Figure 8(g) on which one can easily observe a conflict highlighted by areas having a blue background. . T. Tchendji, M. M. Z. Ndadji
Figure 8. An edition with conflicts and corresponding consensus. generation of consensus trees (Figure 8(h)). Remember that this example is fully unfold in Appendix A: therein, we present the different manipulated automata and a set of the simplest consensus documents (Figure 9).
4. Conclusions
We presented in this paper a reconciliation approach said by consensus, of partial replicas of a document submitted to an asynchronous cooperative editing process: so we opted for a partial optimistic replication approach [12]. The approach proposed is based on a relaxation of the synchronous product of auto- mata to construct an automaton capable of generating consensus documents. The approach proposed in this paper is supported by mathematical proofs of the proposals. The presented algorithms have been implemented in Haskell [16] and experienced in many examples (including the one introduced in Section 3.3 and fully unfold in Appendix A) with convincing results. These algorithms can be also experienced in a truly distributed environment via the graphical editor prototype that we have built for this need; some screenshots are provided in Appendix B. The deployment and use of this prototype will probably be better off if one incorporates a publishing environment generator which, from a specification of an asynchronous cooperative editing process describing in a DSL (Domain Specific Language) [19], the model of licit documents (grammar), various co- authors, their publishing sites and views, etc., will generate for each co-author . T. Tchendji, M. M. Z. Ndadji her dedicated publishing environment including, for example, among others: a dedicated editor with conventional facilities of currents editors (syntax high- lighting, code completion, etc.), tools for asking synchronizations, tools for back- up and restoration of partial replicas being edited etc.
References [1]
Official Site of Google Docs. https://docs.google.com/ [4]
Wilm, J. and Frebel, D. (2015) Real-World Challenges to Collaborative Text Crea-tion. Proceedings of the 2nd International Workshop on (Document) Changes: Modeling, Detection, Storage and Visualization, New York, 1-4. [5]
Ward Cunningham (2014) Wikiwikiweb History. http://c2.com/cgi/wiki?WikiHistory [6]
Wikimedia. Wikipedia: The Free Encyclopedia That Anyone Can Edit. https://en.wikipedia.org/ [7]
Scott Chacon. Official Site of Git. https://git-scm.com/ [8]
Wikipédia. git—Wikipédia. https://fr.wikipedia.org/wiki/git [9]
Badouel, E. and Tchoupé, M. (2008) Merging Hierarchically Structured Documents in Workflow Systems. Electronic Notes in Theoretical Computer Science, 203, 3-24. [10]
Berstel, J. and Boasson, L. (2000) Xml-Grammars. In: Nielsen, M. and Rovan, B., Eds., Mathematical Foundations of Computer Science 2000. MFCS 2000. Lecture Notes in Computer Science, Vol. 1893, Springer, Berlin, Heidelberg, 182-191. [11]
Timo, B. and Erhard, R. (2004) Supporting Efficient Streaming and Insertion of XML Data in RDBMS. 3rd International Workshop on Data Integration over the Web, 8 June 2004, Riga, Latvia, 70-81. [12]
Saito, Y. and Shapiro, M. (2005) Optimistic Replication. ACM Computing Surveys, 37, 42-81. [13]
Balasubramaniam, S. and Pierce, B.C. (1998) What Is a File Synchronizer? Pro-ceeding of 4th International Conference on Mobile Computing and Networking (MOBICOM), ACM/IEEE, Dallas, TX, 25-30 October 1998, 98-108. https://doi.org/10.1145/288235.288261 [15]
Mens, T. (2002) A State-of-the-Art Survey on Software Merging. IEEE Transactions on Software Engineering, 28, 449-462. https://doi.org/10.1109/TSE.2002.1000449 [16]
Davie, A. (1992) An Introduction to Functional Programming Systems Using Haskell. Cambridge University Press, Cambridge. [18]
Maurice Tchoupé, T. (2009) Une approche grammaticale pour la fusion des répli-cats partiels d’un document structuré: Application à l’édition coopérative asyn-chrone. Thèse de Doctorat/PhD, Université de Rennes I/Université de Yaoundé I, Rennes/Yaoundé. [19]
Van Deursen, A., Klint, P. and Visser, N.D.J. (2000) Domain-Specific Languages: An Annotated Bibliography. ACM SIGPLAN Notices, 35, 26-36. https://doi.org/10.1145/352029.352035 . T. Tchendji, M. M. Z. Ndadji
Appendix A. An Illustration of the Merging Algorithm
We illustrate the consensual merging algorithm with the grammar of Section 3.3 (formula 8). We associate the automata ( ) A and ( ) A respectively to the updated partial replicas tv and tv (Figure 8(c) and Figure 8(e)), then we build the automaton of consensus ( ) ( ) ( ) sc Ω = ⊗ A A A by applying the ap- proach described in Section 3.2.2 and finally, present the simplest documents of consensus (Figure 9).
Linearization of a Structured Document
To simplify the presentation, we represent in the following, trees by their linearization in the form of a Dyck word. To do this, we associate a (various) pair of brackets to each grammatical symbol and the linearization of a tree is obtained by performing a Depth First Search (DFS) of the resulting tree.
The Transition Schemas for the View { A , B } A list of trees (forest) is represented by the concatenation of their lineari- zations.We use the opening parenthesis “(‘and the closing one’)” to represent Dyck symbols associated with the visible symbol A and the opening bracket “[” and closing “]” to represent those associated with the visible symbol B. Each transition of the automata associated to partial replicas according to the view { } , A B is conform to one of the following transition schema ( ) [ ][ ] ( ) ( ) ( ) ( ) [ ][ ] ( ) ( ) ( ) [ ] ( ) , , , , , if, , if, , , , , if, , , , , if, , , , , if, , , , , if, , if A w P C u B v w u vA w P wB w P C u A v w u vB w P B u B v w u vC w P A u C v w u vC w P C u C v w uvC w C w ω ε εε→ = → =→ = → = → = → = ≠ → = (9) These schemas are obtained from the grammar productions [9] and the pairs , i X w are states where X is a grammatical symbol and i w a forest encoded in the Dyck language. The first schema for example, states that the Abstract Syntax Tree (AST) generated from the state , A w are those obtained using the pro- duction P to create a tree of the form [ ] , P t t ; t and t being generated respectively from the states , C u and , B v such that [ ] w u v = . The state , C w with w ε= being an exit state [9], the rule [ ] ( ) , , C w C ω → linked to the production P states that the AST generated from the state , C w is reduced to a bud of type C (C is the symbol located at the left hand side of P ). We do not represent the whole set of transition schemas in this example; only the useful subset for reconciliation of closed documents is shown here because the documents to reconcile in this exam-ple are all closed (has no buds). To consider buds, one should, for each visible sort X, associate a new pair of Dyck symbols to the bud of type X then, derive the new schemas. . T. Tchendji, M. M. Z. Ndadji
Figure 9. Consensual trees generated from the automaton ( ) sc A . Construction of the Automaton ( ) A Associated to tv Having associated Dyck symbols “(‘and’)” (resp. “[‘and’]”) to the grammatical symbol A (resp. B), the linearization of the partial replica tv (Figure 8(c)) gives (([[()()][()]])[()]) . As A is the axiom of the grammar, the initial state of the automaton ( ) A is , ([[()()][()]])[()] q A = . When considering only the states accessible from q and by applying the previous schema of transition, we obtain the following automaton (Table 1) for the replica tv (Figure 8(c)). The state , q C ε= in Table 1 is the only exit state of ( ) A . It is easy to verify that the document of Figure 8(f) resulting from the reverse projection of tv belongs to the language accepted by the automaton ( ) A . Construction of the Automaton ( ) A Associated to tv As before, by associating to the grammatical symbol C (resp. A) the Dyck symbols “[‘and’]” (resp. “(‘and’)”), we obtain the transition schemas (formula 10) for the automata associated to the partial replicas according to the view { } , A C . ( ) [ ][ ] ( ) ( ) [ ] ( ) ( ) [ ] ( ) ( ) ( ) [ ] ( ) [ ][ ][ ] ( ) , , , , , if, , if, , , , , if, , , , , if, , if, , , , , if, , , , , if, , if A w P C u B v w u vA w P wB w P C u A v w u vB w P B u B v w uvB w B wC w P A u C v w u vC w P C u C v w u vC w P w ω ε εεε→ = → =→ = → = ≠ → =→ = → = → = (10) The linearization of the partial replica tv (Figure 8(e)) is ([([][]()[]())[]][[][]]()) . The automaton ( ) A associates to this replica has as . T. Tchendji, M. M. Z. Ndadji Table 1. Automaton accepting updates of the (partial) replica tv1. ( ) , , q P q q → with ,([[()()][()]]) q C = and ,() q B = ( ) , , q P q q → with ,[[()()][()]] q A = and , q C ε= ( ) ( ) , , | , , ] q P q q P q q → ( ) , , q P q q → with , q A ε= ( ) , , q P q q → with ,[()()][()] q B = ( ) ,[] q C ω → ( )
15 2 ,[] q P → ( ) , , q P q q → with ,()() q B = ( ) , , q P q q → with ,() q C = ( ) , , q P q q → ( ) ( ) , , | , , q P q q P q q → initial state ,[([][]()[]())[]][[][]]() q A = and its transitions are given in Table 2. Let’s note that, the state , q B ε= is the only exit state of the automaton ( ) A . Construction of the Consensus Automaton ( ) sc A By application of synchronous product of several tree automata described in Section 3.2.2 to the automata ( ) A and ( ) A , the consensual automaton ( ) ( ) ( ) sc Ω = ⊗ A A A has ( ) , q q q = as initial state. ( ) A has a transition from q to , q q labelled P . Similarly, ( ) A has a transition from q to , q q labelled P . So we have in ( ) sc A a transition labelled P for accessing states ( ) ( ) , , , q q q q q q = = from the initial state ( ) , q q q = . Following this principle, we construct the following consensual automaton (Table 3). The states { }
10 11 12 15 16 17 21 22 , , , , , , , q q q q q q q q are the exit states of the auto- maton ( ) sc A . They are states whose composite states are either in conflict (for example ( ) , q q q = et q q ), or are all exit states (for example ( )
122 4 1 , s q q q = ). The use of function that generates the simplest AST (with buds) of a tree language from its automaton [9] on ( ) sc A , produced four AST whose derivation trees (the consensus) are shown schematically in Figure 9. Appendix B. A Prototype of a Cooperative Editor Using Our Algorithms
We present below some screenshots of the cooperative editor prototype for graphic and cooperative editing of the abstract structure of structured do- . T. Tchendji, M. M. Z. Ndadji
Table 2. Automaton accepting updates of the (partial) replica tv2. ( ) , , q P q q → with ,([][]()[]())[] q C = and ,[[][]]() q B = ( ) , , q P q q → with ,[][]()[]() q A = and , q C ε= ( ) , , q P q q → with ,[][] q C = and , q A ε= ( ) , , q P q q → with ,[]()[]() q B = ( )
24 7 ,[] q P → ( ) , , q P q q → ( )
26 2 ,[] q P → ( ) ( ) ( )( ) ( ) , , | , , | , ,| , , | , , q P q q P q q P q qP q q P q q → with , q B ε= , ,[] q B = , ,()[]() q B = , ,[]() q B = , ,[]()[] q B = and ,() q B = ( ) ,[] q B ω → ( ) ( ) , , | , , q P q q P q q → ( ) ( )( ) ( ) , , | , ,| , , | , , q P q q P q qP q q P q q → with ,()[] q B = ( ) , , q P q q → ( ) ( )( ) ( ) , , | , ,| , , | , , q P q q P q qP q q P q q → ( ) ( ) , , | , , q P q q P q q → ( ) ( ) ( ) , , | , , | , , q P q q P q q P q q → cuments using our algorithms for consensus merging of edited partial replicas. This prototype is used following a networked client-server model. Its user interface offers to the user facilities for creating workflows: grammars, actors and views, initial document, … (Figure 10), editing and validation of partial replicas, connecting to a local or remote workflow (Figure 11). Moreover, this interface also offers him functionality to experience the concepts of projection, expansion and consensual merging (Figure 12). This prototype is designed using Java and Haskell languages. . T. Tchendji, M. M. Z. Ndadji Table 3. The consensus automaton. ( ) , q q q = [ ] ( ) , , q P q q → with ( ) , q q q = and ( ) , q q q = [ ] ( ) , , q P q q → with ( ) , q q q = and ( ) , q q q = [ ] ( ) , , q P q q → with ( ) , q q q = and ( ) , q q q = [ ] ( ) , , q P q q → with ( ) , q q q = ( ) ,[] q P → [ ] ( ) , , q P q q → with ( ) , s q q q = and ,[] s q Open C = ( ) ,[] q P → [ ] ( ) [ ] ( ) [ ] ( ) [ ] ( ) [ ] ( ) , , | , , | , ,| , , | , , q P q q P q q P q qP q q P q q → with ( ) , q q q = , ( ) , q q q = , ( ) , q q q = , ( ) , q q q = , ( ) , q q q = , ( ) , q q q = , ( ) , q q q = , ( ) , q q q = , ( ) , q q q = and ( ) , q q q = ( ) ,[] q P → [ ] ( ) , , q P q q → with ( )
119 8 1 , s q q q = and ( )
120 5 2 , s q q q = , ,[] s q Open A = [ ] ( )
13 3 21 6 , , q P q q → with ( ) , q q q = [ ] ( )
14 3 4 6 , , q P q q → [ ] ( )
18 3 22 20 , , q P q q → with ( )
122 4 1 , s q q q = [ ] ( ) [ ] ( ) [ ] ( )
19 5 20 22 6 19 22 6 22 19 , , | , , | , , q P q q P q q P q q → ( )
20 2 ,[] q P → ( ) ,[] q B ω → , ( ) ,[] q B ω → , ( ) ,[] q B ω → , ( ) ,[] q B ω → , ( ) ,[] q B ω → , ( ) ,[] q B ω → , ( ) ,[] q C ω → , ( ) ,[] q C ω → . T. Tchendji, M. M. Z. Ndadji Figure 10. Some prototype screenshots showing windows for the creation of a cooperative editing workflow.
Figure 11. Some prototype screenshots showing the authentication window of a co-author (Auteur1) as well as those displaying the different workflows, local and remote in which he is implicated.
1- Workflow name, synchronization server and then, click on "Next" 2- Definitions of productions, axiom of the grammar and various views.3- Informations on workflow owner and on different co-authors 4- Creation of the global initial document . T. Tchendji, M. M. Z. Ndadji
Figure 12. An illustration of the consensual merging in the prototype.
Submit or recommend next manuscript to SCIRP and we will provide best service for you:
Accepting pre-submission inquiries through Email, Facebook, LinkedIn, Twitter, etc. A wide selection of journals (inclusive of 9 subjects, more than 200 journals) Providing 24-hour high-quality service User-friendly online submission system Fair and swift peer-review system Efficient typesetting and proofreading procedure Display of the result of downloads and visits, as well as the number of cited articles Maximum dissemination of your research work