Journal of Computer and Communications
Vol.05 No.08(2017), Article ID:77380,14 pages
10.4236/jcc.2017.58006
A Stable and Consistent Document Model Suitable for Asynchronous Cooperative Edition
Maurice Tchoupé Tchendji1, Rodrigue D. Djeumen2, Marcellin T. Atemkeng3
1Department of Mathematics and Computer Science, Faculty of Sciences, University of Dschang, Dschang, Cameroon
2Department of Mathematics and Computer Science, Faculty of Sciences, University of Douala, Douala, Cameroon
3Department of Physics and Electronics, Rhodes University, Grahamstown, South Africa

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/



Received: May 10, 2017; Accepted: June 27, 2017; Published: June 30, 2017
ABSTRACT
Complex structured documents can be intentionally represented as a tree structure decorated with attributes. Ignoring attributes (these are related to semantic aspects that can be treated separately from purely structural aspects which interest us here), in the context of a cooperative edition, legal structures are characterized by a document model (an abstract grammar) and each intentional representation can be manipulated independently and eventually asynchronously by several co-authors through various editing tools that operate on its “partial replicas”. For unsynchronized edition of a partial replica, considered co-author must have a syntactic document local model that constraints him to ensure minimum consistency of local representation that handles with respect to the global model. This consistency is synonymous with the existence of one or more (global) intentional representations towards the global model, assuming the current local representation as her/their partial replica. The purpose of this paper is to present the grammatical structures which are grammars that permit not only to specify a (global) model for documents published in a cooperative manner, but also to derive automatically via a so call projection operation, consistent (local) models for each co-authors involved in the cooperative edition. We also show some properties that meet these grammatical structures.
Keywords:
Structured Documents, Documents Models, Grammars, Cooperative Edition, Structured Edition, Projections, Views, Partial Replicas

1. Introduction
With the rise of XML technologies and Web services, structured documents have become important tools for the publication and exchange of information bet- ween most often heterogeneous and remote applications. The ever-increasing power of communication networks in terms of throughput and security as well as efficiency is concern, has revolutionized the way of such documents are edited. Indeed, to the classical model of an author editing his document locally and autonomously, was added the (asynchronous) cooperative editing in which, several authors located on geographically distant sites, coordinate to edit asynch- ronously the same structured document (Figure 1).
Cooperative structured editing is a research field related to computer- supported cooperative work―CSCW [1] , which Baecker, et al. in [2] defined as a set of activities performed on computers and coordinated by a group of collaborative entities. Structured cooperative publishing is a hierarchically orga- nized group publishing work, that operates according to a schedule involving deadlines and task sharing (coordination). When it is asynchronous, each of the participating co-authors in the edition has on its site, a replica of the structured document (intentionally represented as an abstract tree) on which he acts. It is generally preferable for safety reasons1, efficiency2, … that this copy is only a partial replica of the global document, i.e. consisting only of parts of the document containing relevant information related to the considered co-author. In this case, in order to minimize the inconsistencies that can be introduced in the partial replica when locally edited, and to ensure that at the end of edition (or at specific times), the different contributions will be structurally merged [3] [4] , each co-author must have on his publishing local site a local document model (a grammar) which is consistent with the global model. Intuitively, a local document model is consistent with respect to the global model, when any partial document t’ that is conform to him is the partial replica of at least one document t conform to the global model.
The central issue addressed in this paper can be simply presented by means of an example of unsynchronized cooperative structured editing process (Figure 1). In fact, one can easily imagine an editing process in which several authors work together to produce a pluri-disciplinary book and such that, according to its own field of expertise, everyone contribute to more or less disjointed parts of the same document.
It may be interesting for these authors to specify previously (may be together) the overall hierarchical structure of the document via a grammatical model; we call thereafter global model of the document. From it are derive for each of the co-authors a dedicated (local) model called thereafter local model. This local model can be regarded as a “view” on the global model and obtained by means of a projection operation performed on it, which retains on the global model only syntactic categories with a demonstrated interest for the considered author.
For example, Figure 1 present an overview of the cooperative edition distributed on three sites. Site 1 is dedicated to the edition and the merging of
Figure 1. The desynchronized cooperative editing of partial replicas of a structured document.
the (global) document according to the (global) document model G hosted on him. On G, two projections are made to obtain G1 and G2, the local models hosted by site 2 and 3 an used for syntactically constrain the desynchronized edition of the partial replicas of the global document on the sites 2 (resp. site 3). Note that, documents published on these sites can be saved (serialized) then restored by parsing. The overall document is subsequently obtained from the site 1 by performing a consistent expansion3 of the various documents published on sites 2 and 3.
The purpose of this paper is to propose a generic document model allowing to specify syntactically both the global model and derived local models, which are consistent with the global model.
In order to do this, we propose the grammatical structures (a subset of the extended context free grammars) as well as a projection operation which allows to derive from a grammatical structure (global model) and a set of syntactic categories relevant to a given co-author, a local grammatical structure dedicated to him.
Organization of the manuscript: Section 2 presents some concepts and definitions used thereafter. Section 3 presents the grammatical structures, the projection algorithm on grammatical structures and some features of this model. Section 4 is devoted to the conclusion.
2. Preliminaries
2.1. Extended Context Free Grammars, Documents and Compliances
It is usual to represent the abstract structure of a document by a tree (derivation tree) and its model by an Extended Context Free grammars (ECFG)4. In an ECFG, the right member of each production is a regular expression as opposed to the sequence of terminal and non-terminal that constitute the right hand side of productions in classical context free grammar. More formally, an extended context free grammar
is given by a finite set of syntactic categories
, a finite set of production rules
written as
such that,
and
is a regular expression defined on
.
The dependency graph
of grammar
is a graph whose set of node tags is included in
and, for all rules
in
, there is an arrow from
to
, for all
in a word belonging to the language denoted by
and termed
. An ECFG is said to be non recursive if and only if 
A document t conforms to a grammar 






2.2. View, Projection, Partial Replica and Consistency
The derivation tree giving a (global) representation of a structured document published cooperatively, makes visible all the grammar’s grammatical symbols. As mentioned in Section 1 above, a coauthor handling such a document using a structured dedicated editor of his area of expertise, do not necessarily have access to all of these grammatical symbols; only a subset of them correspond to syntactic categories perceptible as such by this tool: hence the notion of “view” [4] . A view

Each view 






The edition type considered in this paper is asynchronous. On a site i hosting a document model 











2.3. Some Definitions and Notations
Let 








Figure 2. One document (center) and two partial replicas obtained by projections.






We note 

The notation “















3. A Document Model Stable by Projection Operation, for Cooperative Asynchronous Edition
In this section, we present grammatical structures which are a particular form of non-recursive extended context free grammars (ECFG). Indeed, to make the projection (defined below, Section 3.2) possible, it is not permitted to have in this model, recursive grammar symbols5. The grammatical structures will then be models for documents of bounded depths (consequence of the non- recursivity of the symbols) but of unbounded widths. Moreover, they will allow to specify in a homogeneous way both the global model for the global document and the local models for its various partial replicas.
3.1. Defining (Abstract) Grammatical Structures
A grammatical structure 
・ a set 
・ a set 

- 
- 


We recall that an equivalent ECFG can be evidently be derived from a grammatical structure.
3.2. Projection of a Grammatical Structure
Let 








・ 







6For example a form of rule like 



・ 

The algorithm for deriving 

Step 1: consider the subset 


them by successive rewriting to rules like





Indeed, 




From Equation (1), one easily deduces that 










Algorithm 1 describes the construction process of

Algorithm 1. Construction of
sets 

7Note that
Step 2: Consider the subset 






As for 









Algorithm 3 purpose is to construct
3.3. Grammatical Structures Properties
Let 


Property 1: 
Algorithm 2. Construction of
Algorithm 3. Construction of
Property 2: if 

Property 3: if 



We present below, the proof of the Property 2. The proof of Property 3 can be obtained from the proof of Theorem 3.3 given in [7] .
Proof. Let 


In order to do this, if we consider an internal node n of 







Note that one can define a partition 















Considering the decomposition of t into subtrees of type 









Case 1: 





Figure 3. A document (a), its partitioning ((b), (c)) and one of its projections (d).
Figure 4. Case where an inner node n and its children 


Figure 5. Case of labeled 


Figure 6. Case of an internal node n labeled 


Case 2: Node n labeled 








8Reminder: the non-terminals of 


There is therefore m sub-terms of t, says





As


Case 3: node n labeled 





















and then,
3.4. Illustration: Grammatical Structures for the Cooperative Writing of a Small Phone Book
Some of the concepts and algorithms presented in the previous sections are illustrated in this section by considering a simplified case of cooperative writing of a small phone book.
Suppose that two employees of an organization want to cooperate in writing a phone book for their organization. One entry of the book is given by the name (Name), two first names (Fname1 and Fname2), the mails addresses (Emails) and phones numbers (Phones).
A corresponding grammatical structure 








4. Conclusion
Asynchronous cooperative editing tools generally allows co-authors to edit complete replicas of a document and perform a posteriori merging [8] [9] [10] [11] [12] regardless if document is structured or not; It’s the case in many tools
Figure 7. A grammatical Structure 
Figure 8. Two local models resulting from the projection on global model of Figure 7 according to view 

of version managing like CVs for unstructured documents (textual merge) [13] .
In the case of structured editing, all co-authors have the same document model and the merging of complete replicas relies on this model (syntactic merging software) [14] [15] . We were interested in this paper to an innovative case―we did not find any study that was done in this direction―in which the co-authors act on partial replicas of the overall document and each with a local model allowing him to validate locally updates made on its (partial) local replica.
We proposed as a document model in this context, grammatical structures allowing both to specify the model for the global document, and local models - for partial replicas―dedicated to each co-author. Furthermore, we have defined a projection operation to automatically derive the local models (grammatical structures) of documents from the global one.
Stability and consistency are some of the major properties enjoyed by grammatical structures. Consistency ensures that, every document validated locally with the local grammatical structure is always the projection of at least one valid document according to the overall grammatical structure: the gra- mmatical structures thus offer to the different co-authors a suitable means of carrying out local syntactic validations of the asynchronously edited documents, while ensuring consistency.
One can further this study by focusing on bottom-up construction of grammatical structures. The goal is to propose a “grammatical structures merger” similar to the “documents merger” presented in [4] .
Cite this paper
Tchoupé, M.T., Rodrigue, D.D. and Atemkeng, M.T. (2017) A Stable and Consistent Document Model Suitable for Asynchronous Cooperative Edition. Journal of Computer and Communications, 5, 69-82. https://doi.org/10.4236/jcc.2017.58006
References
- 1. Grudin, J. (1994) Computer-Supported Cooperative Work: History and Focus. Computer, 27, 19-26.
https://doi.org/10.1109/2.291294 - 2. Baecker, R.M., Grudin, J., Buxton, W.A.S. and Greenberg, S. (1995) Readings in Human-Computer Interaction: Towards the Year 2000. 2nd Edition, Morgan Kaufmann Publishers, Inc., Burlington.
- 3. Mens, T. (2002) A State-of-the-Art Survey on Software Merging. Journal of IEEE Transactions on Software Engineering, 28, 449-462.
https://doi.org/10.1109/TSE.2002.1000449 - 4. Badouel, E. and Tchoupé, M. (2008) Merging Hierarchically Structured Documents in Workflow Systems, Proceedings of the Ninth Workshop on Coalgebraic Methods in Computer Science (CMCS 2008), Budapest. Electronic Notes in Theoretical Computer Science, 203, 3-24.
https://doi.org/10.1016/j.entcs.2008.05.017 - 5. Brüggemann-Klein, A. and Wood, D. (1998) One-Unambiguous Regular Languages. Information and Computation, 142, 182-206.
https://doi.org/10.1006/inco.1997.2695 - 6. Baecker R.M., Cristiana C. and Rosu, D. (2004) On Validation of XML Streams Using Finite State Machines. Proceedings of the Seventh International Workshop on the Web and Databases, Paris, 17-18 June 2004, 85-90.
- 7. Badouel, E. and Lamine, M. (2014) Opacité des artefacts d’un système workflow. Revue ARIMA, 17, 177-196.
- 8. Berlage, T. and Genau, A. (1993) A Framework for Shared Applications with Replicated Architectures. Proceedings of the Conference User Interface Systems and Technology, 17, 249-257.
- 9. Balasubramaniam, S. and Pierce, B.C. (1998) What Is a File Synchronizer? Proceedings of the 4th Annual ACM/IEEE International Conference on Mobile Computing and Networking (MOBICOM), Dallas, 25-30 October 1998, 98-108.
https://doi.org/10.1145/288235.288261 - 10. Wilm, J. and Frebel, D. (2015) Real-World Challenges to Collaborative Text Creation. DChanges’14 Proceedings of the 2nd International Workshop on (Document) Changes: Modeling, Detection, Storage and Visualization, Fort Collins, 16 September 2014, Article ID: No. 8.
- 11. Decouchant, D., Quint, V., Riveill, M. and Vatton, I. (1993) Griffon: A Cooperative, Structured, Distributed Document Editor. Bull-IMAG, Grenoble.
- 12. Fish R.S., Kraut, R.E., Leland, M.D.P. and Cohen, M. (1988) Quilt: A Collaborative Tool for Cooperative Writing. Proceedings of Conference on Office Information Systems, Palo Alto, 23-25 March 1988, 30-37.
https://doi.org/10.1145/45410.45414 - 13. Berliner, B. (1990) CVS II: Parallelizing Software Development. The Advanced Computing Systems Professional and Technical Association (USENIX), Prisma, Inc., Colorado Springs, 22-26.
- 14. Buffenbarger, J. (1995) Syntactic Sofware Merging, Software Configuration Management: Selected Papers SCM-4 and SCM-5. In: Estublier, J., Ed., ACM, New York, 153-172.
- 15. Fontaine, R.L. (2002) Merging Xml Files: A New Approach Providing Intelligent Merge of Xml Data Sets. The Pennsylvania State University, Philadelphia.
NOTES
1For a given co-author, some parts of the document may contain sensitive information. It is preferable that he is not even informed of the presence of this information in the document. As we shall see later, the projection operation will resolve this confidentiality problem.
2Handled documents pass through the network. They will circulate all the more quickly as their size is reduced. For this reason, the replica of the document to be sent to a co-author must contain only the parts which are of obvious interest to him: it’s a partial replica. Here too, the projection operation will solve this concern.
3The problem of re-synchronization―consistent expansion―a posteriori is presented and resolved in [4] where we can also find many basic definitions reused here.
4The DTD (Document Type Definition) for example are special cases of extended context free grammars verifying property of one-unambiguity [5] .
5As in [6] , we are just interested by non recursive models. This is not an aberration because, from statistical point of view, non recursive DTDs are more frequent than recursive ones.





















