VariED: an editor for collaborative, real-time feature modeling

Page created by Edgar Todd
 
CONTINUE READING
VariED: an editor for collaborative, real-time feature modeling
Empirical Software Engineering      (2021) 26:24
https://doi.org/10.1007/s10664-020-09892-x

variED: an editor for collaborative, real-time feature
modeling

Elias Kuiter1 · Sebastian Krieter1,2           · Jacob Krüger1,3 · Gunter Saake1 ·
Thomas Leich2

Accepted: 27 November 2020
© The Author(s) 2021

Abstract
Feature models are a helpful means to document, manage, maintain, and configure the
variability of a software system, and thus are a core artifact in software product-line engi-
neering. Due to the various purposes of feature models, they can be a cross-cutting concern
in an organization, integrating technical and business aspects. For this reason, various stake-
holders (e.g., developers and consultants) may get involved into modeling the features of
a software product line. Currently, collaboration in such a scenario can only be done with
face-to-face meetings or by combining single-user feature-model editors with additional
communication and version-control systems. While face-to-face meetings are often costly
and impractical, using version-control systems can cause merge conflicts and inconsistency
within a model, due to the different intentions of the involved stakeholders. Advanced tools
that solve these problems by enabling collaborative, real-time feature modeling, analogous
to Google Docs or Overleaf for text editing, are missing. In this article, we build on a pre-
vious paper and describe (1) the extended formal foundations of collaborative, real-time
feature modeling, (2) our conflict resolution algorithm in more detail, (3) proofs that our
formalization converges and preserves causality as well as user intentions, (4) the imple-
mentation of our prototype, and (5) the results of an empirical evaluation to assess the
prototype’s usability. Our contributions provide the basis for advancing existing feature-
modeling tools and practices to support collaborative feature modeling. The results of our
evaluation show that our prototype is considered helpful and valuable by 17 users, also
indicating potential for extending our tool and opportunities for new research directions.

Keywords Software product lines · Groupware · Feature modeling · Variability ·
Consistency maintenance · Collaboration

Communicated by: Laurence Duchien, Thomas Thüm and Paul Grünbacher
This paper has been awarded the Empirical Software Engineering (EMSE) open science badge.
This article belongs to the Topical Collection: Configurable Systems
This article belongs to the Topical Collection: Open Science
 Sebastian Krieter
    skrieter@hs-harz.de

Extended author information available on the last page of the article.
VariED: an editor for collaborative, real-time feature modeling
24     Page 2 of 47                                    Empir Software Eng     (2021) 26:24

1 Introduction

Modeling the variability of a configurable platform (i.e., a Software Product Line (SPL))
is essential for an organization to document and manage all implemented software features
and to derive valid product configurations that are tailored to different customer require-
ments (Apel et al. 2013a; Pohl et al. 2005; Czarnecki et al. 2012; Berger et al. 2015). The
variability model of an SPL is not limited to representing implementation artifacts, but can
incorporate additional artifacts, such as requirements, documentation, and tests (Berger et al.
2013; Czarnecki 2013). Moreover, while variability models are usually structured according
to design decisions specific to the SPL’s domain, they can also provide a more abstract rep-
resentation for other stakeholders (Nešić et al. 2019). For instance, a variability model may
be used to allow end users to configure their own products. To derive a meaningful variabil-
ity model that satisfies the defined needs (e.g., representing solution or problem space), all
relevant stakeholders must work collaboratively (Berger et al. 2014; Nešić et al. 2019).
    Various tools have been proposed to facilitate variability modeling with tailored user
interfaces, automated analyses, and other editing support. Established examples in the com-
mercial domain are pure::variants (Beuche 2008) and Gears (Krueger 2007); as well as
several research prototypes (Alves Pereira et al. 2014; Horcas et al. 2019). Still, to the best of
our knowledge, there is neither a tool nor a technique that supports collaborative, real-time
editing of the same variability model, similar to the text editors Google Docs and Overleaf.
As far as we know, existing tools allow only a single user to edit the model, and multi-
ple users have to rely on direct communication or version-control systems to collaborate.
Both of these strategies can have major drawbacks that hamper efficient collaboration dur-
ing the modeling process. Direct communication requires either locality of all stakeholders
or screen-sharing, and does not allow all stakeholders to edit the model (e.g., to sketch a
solution or to work on different parts of the model). Version-control systems, such as Git,
allow the stakeholders to share and edit a variability model at different places and at the
same time. However, version-control systems are not designed for real-time editing, which
may easily cause merge conflicts, not only syntactically, but also semantically (e.g., merged
changes may result in an invalid feature model, dead features, or broken dependencies).
Collaborative, real-time variability modeling promises advantages in several use cases, such
as:
–        Multiple domain engineers can work simultaneously on the same variability model,
         either on different tasks (e.g., editing existing constraints) or on a coordinated task (e.g.,
         introducing a set of new features).
–        Domain engineers can share and discuss the variability model with other domain
         experts, allowing them to evolve the model based on real-time feedback without
         requiring costly co-location of the participants.
–        Lecturers can teach variability-modeling concepts in a collaborative manner and can
         more easily involve the audience in hands-on exercises.
The most established notation for variability models are feature models and their visual rep-
resentations, feature diagrams (Czarnecki et al. 2012; Berger et al. 2013; Chen and Babar
2011; Nešić et al. 2019). For this reason, we focus on the collaborative editing of feature dia-
grams in this article. However, our general technique can be applied to other representations
of variability models as well.
   In this article, we extend a previous paper (Kuiter et al. 2019b), in which we describe
the conceptual foundations of collaborative, real-time feature modeling. Within that paper,
we define requirements that our technique aims to fulfill, derive formal specifications for
VariED: an editor for collaborative, real-time feature modeling
Empir Software Eng      (2021) 26:24                                          Page 3 of 47 24

Fig. 1 Editing a feature model inside our web-based modeling tool variED

the operations that we need to develop, sketch how to resolve conflicts, and implement and
verify a corresponding tool for collaborative feature modeling (cf. Figure 1). To extend that
paper, we include more details and new information on our specifications, algorithms, and
their implementation, resulting in the first complete description of our technique, including
all operations, conflict detection, and conflict resolution. We further present new contribu-
tions by showing the correctness of our technique, adding a description of our tool, and
providing an empirical evaluation in the form of a user study with 17 participants. Conse-
quently, the overall focus in this article is not on theoretical foundations, as in our previous
paper. Instead, we focus on the concrete implementation of our technique and its evaluation.
Overall, we make the following contributions:
1.   We extend the formal foundations of collaborative, real-time feature modeling.
2.   We report the algorithms, requirements, and techniques that are part of our own
     technique and describe our corresponding tool implementation.
3.   We show that our technique works correctly in terms of concurrency control.
4.   We report upon a user study to evaluate the usability of our tool.
5.   We provide public GitHub repositories that include the open-source implementation of
     our tool1 as well as our questionnaire and anonymized responses.2
The goal of our technique is to support use cases that fulfill three general conditions. First,
we assume that different stakeholders want to work on the same feature model at the same
time, for example, to coordinate independent or interacting tasks (Manz et al. 2013), which
requires techniques for concurrency control. Second, based on insights from real-world case
studies and established practices (Fogdal et al. 2016; Berger et al. 2014; Nešić et al. 2019),
we assume that a small team (i.e., ten or fewer stakeholders) edits and maintains a feature
model. Considering larger teams, collaboration and automatic conflict resolution become
much more challenging. Finally, we assume that not all stakeholders are co-located, but

1 https://doi.org/10.5281/zenodo.4259912
2 https://doi.org/10.5281/zenodo.4259914
VariED: an editor for collaborative, real-time feature modeling
24    Page 4 of 47                                       Empir Software Eng   (2021) 26:24

remotely connected (Manz et al. 2013). For this reason, we aim to support peer-to-peer as
well as client-server architectures (Schollmeier 2001).
   The remainder of this article is structured as follows. In Section 2, we introduce the for-
mal foundations of feature models and their properties, and describe the general concept of
collaborative, real-time editing. We present the details of our technique, including the oper-
ation model, conflict detection, and conflict resolution in Section 3. Then, in Section 4, we
show the correctness of our technique using formal proofs before explaining the details of
our implementation in Section 5. In Section 6, we present the design and results of our user
study. Finally, we present related work in Section 7 and conclude our findings in Section 8.

2 Foundations

In this section, we present the background and formal concepts of feature modeling and
collaborative, real-time editing.

2.1 Feature Modeling

Feature modeling is a domain-engineering activity, during which an organization defines
and documents the desired variability of its SPL (Apel et al. 2013a; Pohl et al. 2005; Krüger
et al. 2020). This activity results in a feature model, which expresses variability in the
notion of features and dependencies between these features (e.g., one feature may require
or exclude another one). Features typically represent a user-visible functionality that can
be either present or absent in a concrete product of the SPL. Several notations for feature
models have been proposed in the literature, including feature diagrams, grammars, and
propositional formulas (Batory 2005; Berger et al. 2013; Chen and Babar 2011; Czarnecki
et al. 2012; Schobbens et al. 2006).
   In this article, we focus on feature diagrams (cf. Figure 1 for a larger example in var-
iED), which are visual representations of feature models as tree structures. This notation is
human-readable, established in practice (Berger et al. 2013; Nešić et al. 2019), and well-
supported by feature-modeling tools (Meinicke et al. 2017; Beuche 2008; Krueger 2007).
We consider basic feature diagrams, which use binary features and constraints that can be

                                   GraphLibrary

                        Edge Type               Algorithm

                  Directed       Undirected       Cycle

Fig. 2 A simplified feature diagram of an SPL of graphs and their algorithms
VariED: an editor for collaborative, real-time feature modeling
Empir Software Eng     (2021) 26:24                                            Page 5 of 47 24

expressed as propositional formulas. In contrast, extended feature diagrams allow organiza-
tions to add additional attributes to features and to use constraints of higher-order logic. As
an example, we display an excerpt of a feature diagram in Fig. 2, which represents an SPL of
graph algorithms. The feature model specifies that every product must contain the manda-
tory feature Edge Type and that each product’s Edge Type must either be Directed
or Undirected. Further, a product may include the optional feature Algorithm, which
requires the feature Cycle. The cross-tree constraint below the tree defines that any product
comprising the feature Cycle must also include Directed. In contrast to concrete fea-
tures, the abstract features Edge Type and Algorithm do not map to implementation
artifacts of the underlying SPL, but are used for structuring the feature model.
   To allow us to precisely define our technique for collaborative feature modeling, we
formalize feature models as follows:
Definition 1 (Feature Model)
–   The identifier pool ID is an infinite set of strings that may be used within a feature
    model to identify features or cross-tree constraints.
–   A feature is a tuple (ID, parentID, optional, groupType, abstract, name) where
          –    ID ∈ ID,
          –    parentID ∈ ID ∪ {⊥, †},
          –    optional ∈ {true, false},
          –    groupType ∈ {and, or, alternative},
          –    abstract ∈ {true, false}, and
          –    name is any string.
–   A cross-tree constraint is a tuple (ID, parentID, φ) where ID ∈ ID, parentID ∈ {⊥, †},
    and φ is a propositional formula with variables ranging over ID, that is, Var(φ) ⊆ ID.
–   A feature model FM then is a tuple (F, C) where F is a finite set of features and C is a
    finite set of cross-tree constraints.
   In this definition, ⊥ denotes the parentID of the root feature and of all visible constraints,
while † denotes the parentID of removed features and constraints (cf. Definition 4). Our
definition captures the properties of basic feature diagrams and integrates well with our
technique for collaborative feature modeling. In particular, we introduce the identifier pool
ID, which is critical for describing the feature-modeling operations needed. This identifier
pool and our formalization of the tree structure sets our definition apart from previous for-
malizations by Schobbens et al. (2007) and Durán et al. (2017), and makes it suitable for
our concurrency-control technique.
Example 1 (Feature Model) We use Definition 1 to describe the feature diagram in Fig. 2.
Let FM = (F, C) where

                     F = {(GPL, ⊥, false, and, false, GraphLibrary),
                           (ET, GPL, false, alternative, true, Edge Type),
                           (Dir, ET, true, and, false, Directed),
                           (Undir, ET, true, and, false, Undirected),
                           (Alg, GPL, true, or, true, Algorithm),
                           (Cyc, Alg, true, and, false, Cycle)}
                 and C = {(constraint1, ⊥, Cyc ⇒ Dir)}.
VariED: an editor for collaborative, real-time feature modeling
24     Page 6 of 47                                Empir Software Eng    (2021) 26:24

We use arbitrary identifiers in this example; in practice they will be generated automatically
to ensure that each identifier is unique. The GPL feature is the root feature, as its parentID is
⊥. Every other feature has a parentID that identifies its parent in the feature tree. We under-
line values that are effectively ignored by the user interface. For example, the Directed
feature is part of an alternative group (defined in its parent Edge Type), which overrides
its optional flag. However, it is advantageous to include this information in the formalization
to facilitate conflict detection.

   We remark that we introduce a dot notation to access a tuple’s elements (which we also
refer to as attributes) in order to improve the readability of our formalizations. For example,
FM.F refers to the first element of FM = (F, C): the set of features F contained in FM.
Further, in several instances, we interpret the sets F and C as functions ID  → F and ID  →
C to look up features and cross-tree constraints by their ID in the feature model (if defined
uniquely). So, in Example 1, FM.F(Dir).parentID refers to the value ET defined in the
parentID field for the feature identified by Dir in FM.
                                                                             ID
   To simplify our algorithms and proofs, we define two sets FID    FM and CFM for feature and
constraint identifiers, as well as the parent-child relation descends from ( FM ):

Definition 2 Let FM be a feature model. Further, define
–          FM := {F .ID | F ∈ FM.F}, that is, the feature IDs defined in FM,
         FID
–          FM := {C.ID | C ∈ FM.C}, that is, the cross-tree constraint IDs defined in FM, and
         CID
–        the relation FM as the reflexive transitive closure of {(A.ID, B ID ) | A ∈ FM.F, B ID ∈
           FM ∪ {⊥, †} ∧ A.parentID = B }, that is, a feature descends from another when it is
         FID                              ID

         an immediate or indirect child.

   Using our notation from Definition 1, we can formally describe any feature model based
on its feature-diagram representation. However, this definition allows that integral prop-
erties of feature models may be violated (e.g., a feature model must not contain cycles).
These properties are important, as we intend to manipulate feature models by means of
operations. Consequently, we also define the following conditions to describe legal feature
models (such as Example 1):

Definition 3 A feature model FM is considered legal if and only if all of the following
conditions are true:
                                     ID                       ID               ID 
– All identifiers are unique: FID                                
                                 FM ∩ CFM = ∅ ∧ |FM.F| = FFM ∧ |FM.C| = CFM
                                                                                        
– All parent identifiers refer to valid features: ∀F ∈ FM.F : F .parentID ∈ FFM ∪ {⊥, †}
                                                                              ID

– All variables in constraints refer to valid features: ∀C ∈ FM.C : Var(C.φ) ⊆ FID FM
– There exists exactly one root feature: ∃!F ∈ FM.F : F .parentID = ⊥
– The feature graph is acyclic and, thus, a tree: ∀F ID ∈ FID
                                                            FM : F
                                                                   ID
                                                                        FM ⊥ ∨ F
                                                                                 ID
                                                                                      FM †

We denote the set of all legal feature models as FM.

   Naturally, our technique has to allow operations for removing features and constraints
from a feature model. However, since our technique should also be extensible for undo and
redo operations, we cannot simply remove an element from F or C, but need to keep track
of its old state and position. To achieve this, instead of removing an element entirely, we
move it to a separate, non-visible area that we call graveyard. So, we adapt the tombstone
concept used in distributed systems, where removed entities are still kept in memory to
VariED: an editor for collaborative, real-time feature modeling
Empir Software Eng    (2021) 26:24                                           Page 7 of 47 24

allow undoing and rejecting changes (Chen and Sun 2001c; Oster et al. 2006; Shapiro et al.
2011).

Definition 4 Let FM ∈ FM.
–   A feature F ∈ FM.F is graveyarded, denoted as F .ID ∈ F†FM , if and only if F .ID FM
    † (where † can be thought of as spanning a second, invisible feature tree).
–   A cross-tree constraint C ∈ FM.C is graveyarded, denoted as C.ID ∈ C†FM , if and only
    if C.parentID = † ∨ ∃F ID ∈ Var(C.φ) : F ID ∈ F†FM (i.e., it has been ex- or implicitly
    removed).

  We utilize this formalization of feature models to design our collaborative operation
model (cf. Section 3.1) and conflict detection algorithms (cf. Section 3.2).

2.2 Collaborative, Real-Time Editing

The research domain of Computer-Supported Cooperative Work (CSCW) is concerned with
collaborative activities and their computer-assisted coordination (Carstensen and Schmidt
1999; Grudin 1994). CSCW systems (also called groupware Ellis et al. 1991) are typically
classified according to the time and location dimensions (Baecker et al. 1995; Johansen
1991). Collaboration may happen synchronously (i.e., at the same time) or asynchronously
(i.e., at different times). Analogously, collaborators may work co-located (i.e., at the same
location) or remotely (i.e., at different locations). We are interested in synchronous, remote
collaboration, as existing feature-modeling tools do not support this combination, yet.
For this reason, we design a collaborative, real-time editor that enables shared editing by
remotely connected users (Prakash 1999). We use an operation-based editing model to
achieve change propagation and use the definitions of Sun et al. (1998) to formally describe
concurrency, conflicts, and consistency.

2.2.1 Operation-Based Editing

A simple, but effective, technique for propagating changes through a network is to send
the entire document of one user to all other users. However, this technique has drawbacks,
as it sends lots of redundant data and makes consistency maintenance more complicated.
Another technique of distributing changes is operation-based editing (Dewan 1999; Shapiro
et al. 2011). Instead of sending complete copies of a modified document to other users, only
an abstract operation is sent, allowing to transform the previous state of a document into the
new state. So, the complete document must be sent only once: when initializing the system.
We define an operation as follows:

Definition 5 (Operation) An operation is the description of an atomic manipulation of a
document with a distinct user intention. It is applied to a document to transform it from an
old to a new (modified) state.

   To identify relevant operations for feature modeling, we reviewed two established
single-user feature-modeling tools that we could investigate without charges, the academic
FeatureIDE (Meinicke et al. 2017) and the industrial pure::variants (Beuche 2008). We can
consider feature-model editors as object-based graphics editors, in which features (or possi-
bly entire subtrees of features) and constraints are represented as objects. Feature-modeling
24     Page 8 of 47                                  Empir Software Eng   (2021) 26:24

operations can target one or multiple objects based on their unique identifiers. To issue
an operation, a user first creates a selection that includes all objects that operation should
target, then proceeds with the actual operation. In Section 2.1, we defined feature models
according to this operation model, as each feature and cross-tree constraint is assigned a
unique identifier that can serve as an operation target. Thus, rather than identifying features
via their name, we use the unique identifiers in the ID set and represent a feature’s name as
an additional attribute.
   We classify operations on the feature model as view-, feature-, or constraint-related. First,
view-related operations customize the visual representation of a feature model to a user’s
demands, for example, changing the diagram layout (e.g., tree, table, or graph visualiza-
tion), visually pruning the feature tree, and hiding cross-tree constraints. As view-related
operations do not change the semantics of the feature model (i.e., the modeled set of product
variants), we do not consider them for collaborative feature modeling. Instead, we can apply
view-related operations locally and provide each collaborator with their own, customized
modeling view according to their preferences. Second, feature-related operations encom-
pass creating, removing, and updating features in the feature tree. Users can create features
at different positions within the feature tree, for instance, below or above another feature.
They can also move features within the tree by moving a sub-tree below another feature.
In addition, most attributes of a feature can be updated, including the optional, groupType,
or any other arbitrary attribute, such as the name or description. Third, constraint-related
operations allow users to create, edit, or remove arbitrary cross-tree constraints. These oper-
ations are similar to the feature-related ones, but they are simpler as they do not span a
tree. As aforementioned, we focus on the last two classes of operations, since they intro-
duce semantic changes that we need to propagate to users. In Section 3.1, we describe our
operation model for collaborative feature modeling.

2.2.2 Concurrency and Conflicts

In collaborative editing systems, multiple users can create operations at different sites (i.e.,
workstations) at different times. To ensure that a document has the same state for all users,
their sites must be synchronized eventually. However, as synchronization between sites is
affected by network latency, and thus not instant, we cannot simply track the order of sub-
mitted operations based on physical time. Instead, we adapt a well-known strict partial
order (Lamport 1978; Mattern 1988; Sun et al. 1998) to determine the temporal (and thus
causal) relationships of operations, and define the notion of concurrency:

Definition 6 (Causal Ordering) Let Oa and Ob be two operations generated at sites i and
j , respectively. Then, Oa → Ob (Oa causally precedes Ob ) if and only if at least one of the
following is true:
–        i = j and Oa is generated before Ob ,
–        i  = j and at site j , Oa is executed before Ob is generated, or
–        ∃Ox : Oa → Ox ∧ Ox → Ob
where before refers to a site’s local physical time. Ob is then said to depend on Oa . Further,
Oa and Ob are causally related if and only if Oa → Ob or Ob → Oa . Otherwise they are
concurrent, denoted as Oa  Ob .

   This causal ordering replaces physical timestamps in the communication between differ-
ent sites. Note that we make no distinction between time and causality: If Oa → Ob , we say
Empir Software Eng     (2021) 26:24                                            Page 9 of 47 24

that Oa causes Ob , even if the intention of Oa is not related to Ob at all. This is a convention
in distributed systems to capture all events that may have caused an event, which facilitates
concurrency control (Mattern 1988).
   Two concurrent operations may cause a conflict, if applying both on a document would
lead to an inconsistent state. Consequently, whether two operation are in conflict, depends
on the kind of document. In Section 3.2, we define conflicts of feature-modeling operations.

2.2.3 Consistency

Several challenges hamper the maintenance of a consistent document state in collaborative,
real-time editors (Sun and Chen 2002; Sun et al. 1998). First, operations in such editors
do not generally commute, meaning that they do not yield the same result for all execu-
tion orders. So, the document state may diverge when concurrent operations are applied
in varying orders at different sites. Second, when an operation arrives before an operation
it depends on, the user interface may behave surprisingly and the document may become
invalid. This challenge arises from network latency, which may lead to causality violation
in peer-to-peer architectures. Third, concurrent operations may violate each other’s inten-
tion (i.e., an operation’s execution effect when applied on the document state from which it
was generated). For example, two operations that set the same feature’s name to different
values are intention-violating, as both override the other operation’s intention. Apart from
these syntactic challenges, semantic consistency properties should also be considered (Sun
et al. 1998). In Section 3.2, we identify semantic properties that we aim to ensure when
editing feature models. Based on these challenges, Sun et al. (1996, 1998) have proposed a
consistency model for collaborative, real-time editors as follows:

Definition 7 (CCI Model) A collaborative, real-time editing system is CCI-consistent if it
always maintains all of the following properties:
–   Convergence: When the same set of operations have been executed at all sites, all copies
    of the shared document are identical.
–   Causality Preservation: For any pair of operations Oa and Ob , if Oa → Ob , then Oa is
    executed before Ob at all sites.
–   Intention Preservation: For any operation O, the effects of executing O at all sites are
    the same as the intention of O, and the effect of executing O does not change the effects
    of concurrent operations.

   These properties define what behavior collaborators can expect from the system. In
Section 4, we point out why our concept conforms to the CCI model. So, we ensure the syn-
tactic and semantic consistency of edited feature models at all times. We proceed to describe
the technique we adapt to build a CCI-consistent collaborative feature model editor.

2.2.4 Multi-Version Multi-Display Technique

To achieve CCI-consistency, several concurrency-control techniques have been proposed.
Roughly, we can distinguish between techniques that work either on a single document or
on multiple versions of a document to resolve conflicts. Single-document techniques are,
for example, turn taking (Ellis et al. 1991; Greenberg 1991), locking (Elmasri and Navathe
2010; Greenberg and Marwood 1994), serialization (Berlage and Genau 1993; Greenberg
and Marwood 1994), and operational transformation (Ellis and Gibbs 1989; Sun et al.
24    Page 10 of 47                                       Empir Software Eng        (2021) 26:24

1998, 2004). However, these techniques have severe disadvantages for our considered use
cases (Kuiter 2019a): None of these techniques can properly handle conflicting operations,
as they usually block the document or its parts completely to avoid conflicts (they are pes-
simistic), or can only resolve conflicts automatically with arbitrary policies, such as “last
writer wins.”
   In the context of feature modeling, we argue that collaborators should participate in the
conflict resolution to preserve the intentions of all conflicting operations. To this end, we
use a multi-versioning concurrency-control technique (Chen 2001a; Stefik et al. 1987; Wulf
1995). In contrast to the single-document techniques, multi-versioning techniques keep dif-
ferent versions of objects on which conflicting operations have been performed (similar to
parent commits that are merged in version-control systems). Multi-versioning techniques
can be implemented in two ways, mainly differentiating whether they expose only a single
document version (and keep others only internally) or expose multiple, conflicting doc-
ument versions (Sun et al. 2002, 2004). The first type of techniques has the problem of
committing to one particular version based on arbitrary rules. Moreover, feature modeling
poses semantic problems during conflict resolution that are hard to address in an automated
process. The second type, called Multi-Version Multi-Display (MVMD) (Sun and Chen
2002; Chen and Sun 2001b), lets users decide which new document version should be used
in case of a conflict. In Fig. 3, we show how this technique allocates two conflicting update
operations to two different versions of an edited feature model, preserving intentions and
allowing for subsequent manual conflict resolution. This technique encourages communi-
cation between collaborators and improves the confidence in the correctness of the resulting
feature model. As MVMD fulfills all of our requirements, we use it as basis for our col-
laborative feature-model editor. However, it needs further adjustments to support feature
modeling, such as defining a conflict relation for feature-modeling operations, which we
describe in Section 3.2.
   MVMD has been introduced in the Graphics Collaborative Editing (GRACE) system to
maintain multiple versions of edited objects in the face of conflicts (Sun and Chen 2000;
2002; Chen and Sun 2001b). It groups operations according to whether they are conflicting

                                 site A                            site B

                                 setFeatureGroupType(or)

                                                setFeatureOptional(false)

                   ,                                                                  ,
Fig. 3 A conflict scenario detected with the multi-version multi-display technique. Both sites arrive at the
same maximum compatible group set (cf. Definition 9)
Empir Software Eng    (2021) 26:24                                           Page 11 of 47 24

or compatible. To determine algorithmically whether two operations are in conflict, we
utilize a conflict relation (Sun and Chen 2002; Xue et al. 2003):

Definition 8 (Conflict Relation) A conflict relation ⊗ is a binary, irreflexive, and symmet-
ric relation that indicates whether two given operations are in conflict. If two operations Oa
and Ob are not in conflict with each other, namely Oa  ⊗ Ob , they are compatible, denoted
as Oa  Ob . Only concurrent operations may conflict, that is, for any operations Oa and
Ob , Oa ∦ Ob ⇒ Oa  Ob .

   The specific conflict relation used in GRACE states that two concurrent operations are
in conflict if they set the same attribute of the same object to different values. However, the
conflict relation of GRACE is not suitable for collaborative, real-time feature modeling, as it
only captures overwrite conflicts, while feature modeling can cause other kinds of conflicts
as well. For example, the acyclic property in Definition 3 can be violated by concurrently
moving two features below one another. In addition, the conflict relation of GRACE cannot
capture semantic inconsistencies, such as dead features or redundant constraints (Benavides
et al. 2010; Felfernig et al. 2013; Kowal et al. 2016). Therefore, we introduce new conflict
relations specific to feature modeling in Section 3.2.
   By using a proper conflict relation, we can create different versions of a feature model
whenever a conflict occurs. However, as we consider multiple remotely connected collab-
orators, we may also need to resolve conflicts for three or more concurrent operations at a
time. In such a situation, if we would create a different version for each conflicting opera-
tion, the conflict resolution could overwhelm the collaborators. To avoid this problem, we
rely on the combined effect of the MVMD technique to minimize the number of versions,
while still preserving the intentions of all operations (Sun and Chen 2002):

Definition 9 (Combined Effect) Let GO = {O1 , O2 , . . . , On } be a group of operations
targeting the same object.
–   A compatible group CG is a subset CG ⊆ GO where ∀Oa , Ob ∈ CG : Oa  Ob .
–   A compatible group CG is maximum if ∀Oa ∈ GO : (Oa ∈ CG∨∃Ob ∈ CG : Oa ⊗Ob ).
–   A maximum compatible group set MCGS = {CG1 , CG2 , . . . , CGm } is a set of
    maximum compatible groups where all of the following conditions are true:
          –    ∀O ∈ GO : ∃CGi ∈ MCGS : O ∈ CGi
          –    ∀Oa , Ob ∈ GO : (Oa  Ob ⇒ ∃CGi ∈ MCGS : Oa , Ob ∈ CGi )
          –    all maximum compatible groups belonging to GO are included in MCGS.
–   Given a maximum compatible group set MCGS, the combined effect for GO is that
          –    for each CG ∈ MCGS, one version VCG of the targeted object is created, and
          –    for each CG ∈ MCGS, all included operations are applied to VCG .

   By using an MCGS, we can generate a minimum number of versions, while still satisfy-
ing all submitted operations’ intentions. It can be shown that the MCGS, and thus the com-
bined effect for a given group of operations, is unique (Sun and Chen 2002). For example,
given a group of operations {O1 , O2 , O3 , O4 } and the conflict relation O1 O2 , O1 O3 ,
O1 O4 , O2 ⊗O3 , O2 O4 , and O3 ⊗O4 , their unique MCGS is {{O1 , O3 }, {O1 , O2 , O4 }}.
The MCGS for a group of operations can be constructed incrementally at any site using the
MOVIC algorithm proposed by Sun and Chen (2002). When targeting a single object, this
algorithm has been proven to converge to the same MCGS at all sites (Sun and Chen 2002).
24    Page 12 of 47                                 Empir Software Eng    (2021) 26:24

3 Designing a Collaborative, Real-Time Feature Model Editor

In this section, we describe the concepts of our technique that enables users to collabo-
ratively edit the same feature model. For this purpose, we introduce an operation model,
conflict detection, and conflict resolution.

3.1 Operation Model

A collaborative feature-model editor must support a variety of operations to achieve a simi-
lar user experience as single-user editors. However, supporting various operations can lead
to more interactions between these, which makes consistency checking, resolving conflicts,
and reasoning about the editor’s correctness more complex. To address this issue, we use a
two-layered operation architecture (Sun et al. 2006), in which we separate two kinds of oper-
ations: low-level Primitive Operations (POs) and high-level Compound Operations COs.
POs represent fine-grained edits to a feature model and are suitable to use in concurrency-
control techniques. COs then expose actual feature-modeling operations to the application.
A COs is a sequence of POs that are executed in a defined order, and thus can express all
feature-modeling operations mentioned in Section 2.2.
    Using this two-layer architecture instead of single set of operations has several advan-
tages: When detecting conflicts between operations, we can focus on POs and do not need
to analyze COs, since they are PO sequences. For the same reason, we can implement multi-
target operations, such as remove, by composing several single-target COs into a new CO.
Also, to extend the editor with additional operations, we need to implement only new COs,
without making major changes to the conflict detection. In the following, we provide an
overview of the current set of operations that we support.

3.1.1 Primitive Operations

Single-user feature-modeling tools implement COs to create, remove, and modify features
as well as cross-tree constraints in various ways. We define five POs that serve as build-
ing blocks for such COs. For each PO, we specify pre- and postconditions with formal
semantics, where FM and FM’ refer to the feature model before and after applying the PO,
respectively. By convention, no PO shall have any other side effects than those specified in
the postconditions. For the sake of brevity, we only present the formal details of the primitive
operation createFeaturePO and provide the details of all other POs in Appendix A.1.
   The operation createFeaturePO (PO 1) creates a new feature in the feature model:
Empir Software Eng     (2021) 26:24                                             Page 13 of 47 24

   An existing feature can be updated using the operation updateFeaturePO (PO 2). This
operation allows to modify any attribute of any existing feature. For creating and updat-
ing cross-tree constraints, we define the analogous operations createConstraintPO (PO 3)
and updateConstraintPO (PO 4). We do not require any operations for removing features
or cross-tree constraints, because they can be expressed as update operations, setting the
parentID to † (i.e., graveyarding). Finally, we define a single assertion operation, assert-
NoChildAddedPO (PO 5), which we need to detect conflicts related to operations that
graveyard features (cf. Section 3.2). With these five POs, we can assemble more complex
COs for feature-modeling.

3.1.2 Compound Operations

To allow for high-level modeling operations, we employ COs. Each CO consists of a
sequence of POs, which are applied atomically. A CO is defined by its associated precon-
ditions and an algorithm that generates the CO’s PO sequence, which has to ensure the
preconditions of each comprised PO. To model control flow and loops when generating
COs, we use regular if and for statements; however, their application is strictly sequential
to facilitate conflict detection. Whenever a user requests to generate a CO, its preconditions
are checked against the current feature model FM, then the CO’s algorithm is invoked with
the required arguments, such as the feature model (FM), a feature parent (FP), or feature
children (FC). The generated CO is first applied locally and then propagated to other users.
    In the following, we present the COs that we implemented in our tool. We introduce
six feature-related operations for inserting and arranging features in the feature tree and
three constraint-related operations for creating, modifying, and removing constraints. How-
ever, to allow for new functionality, more COs can be designed on top of the existing POs.
Analogous to POs, we present only one CO and describe all other COs in Appendix A.2.
    The operation createFeatureBelow (CO 1) creates and inserts a feature in the feature
tree as the child of an existing feature:

    Similarly, the operation createFeatureAbove (CO 2) creates a new feature and inserts it
in the feature tree as parent of an existing feature. If the existing feature was not the root fea-
ture, its original parent becomes the parent of the new feature. Features can also be moved
within the feature tree using the operation moveFeatureSubtree (CO 3), which changes the
parent of a subtree to another existing feature. With the operation removeFeatureSubtree
(CO 4), an entire subtree can be removed from the feature tree by graveyarding it. In con-
trast, the operation removeFeature (CO 5) graveyards only a single feature and pulls its
children up by replacing the children’s parent with its own parent. For modifying additional
feature attributes, such as the optional flag, group type, and feature name, we introduce oper-
ations to set the values of these attributes. For instance, the operation setFeatureOptional
24    Page 14 of 47                                 Empir Software Eng    (2021) 26:24

(CO 6) sets the attribute optional of a single feature to either true or false. The definitions
of setFeatureGroupType, setFeatureAbstract, and setFeatureName are analogous.
    The operation createConstraint (CO 7) creates a new constraint and adds it to the feature
model. An existing constraint can be modified by applying the operation setConstraint (CO
8), which replaces a given constraint with a new one. With the operation removeConstraint
(CO 9), an existing constraint can be graveyarded, and thus effectively removed from the
feature model.

3.1.3 Applying Operations

As POs and COs are only descriptions of edits on a feature model, we further need to
define how to apply them to produce a new (modified) feature model. We define application
functions for POs and COs as follows:

Definition 10 Let FM ∈ FM. Further, let PO and CO be a primitive and a compound
operation whose preconditions are satisfied with regard to FM. Then, FM’ = applyPO(FM,
PO) denotes the feature model FM’ that results from applying PO to FM. Further, we define
applyCO(FM, CO) as the subsequent application of all primitive operations contained in
CO to FM with applyPO.

   Our tool provides applyPO and ensures all postconditions of POs. Note that applyCO
does not treat any CO specially, which facilitates conflict detection and extensions. From the
definitions of the application function applyCO and the COs, we can derive that applyCO
always preserves the syntactical correctness of feature models (cf. Section 2.1) when no
concurrent operations are submitted (i.e., in a single-user scenario):

Theorem 1 Let FM ∈ FM be a legal feature model. Further, let CO be a com-
pound operation whose preconditions are satisfied with regard to FM. Then, FM’ =
applyCO(FM, CO) ∈ FM, that is, FM’ is again a legal feature model.

   We omit the proof for this theorem here, but provide it in Appendix A.3.

3.2 Conflict Detection

For any collaborative work, it is essential to detect conflicts between the edits users per-
form (e.g., changing the name of the same feature to different values). In the following,
we describe how we extended the MVMD technique with new conflict relations for fea-
ture modeling to allow for the detection of conflicting operations. To this end, we briefly
motivate and describe several required strategies and mechanisms. The globally targeted
object strategy, causal directed acyclic graph, outer conflict relation, and topological sorting
strategy are novel extensions to the MVMD technique. These extensions are, in principle,
agnostic to feature modeling and may be adapted to other domains of collaborative editing
in the future. Building on these extensions, we then discuss an inner conflict relation that is
specific to feature modeling.

3.2.1 Globally Targeted Object Strategy

The combined effect specified in Definition 9 considers targeted objects for which multiple
versions may be created. In the graphics-editing system GRACE, an object refers to a dis-
tinct graphical element on the screen, which may be duplicated if a conflict appears (as we
Empir Software Eng     (2021) 26:24                                           Page 15 of 47 24

show in Fig. 3). However, we argue that in a collaborative feature-model editor, only one
globally targeted object, namely the feature model, should be considered. Feature models
impose additional semantics (i.e., the variability modeled in an SPL), which can be con-
flicted simply by having two versions of the same feature. Further, certain conflicts, such
as cycle-introducing moveFeatureSubtree operations, cannot be resolved when features are
considered as individual objects. Considering the feature model as one global object enables
more comprehensive conflict detection and avoids the introduction of semantic inconsis-
tencies. So, conflicts cause multiple versions of the feature model, which collaborators can
then inspect to determine the desired resolution.

3.2.2 Causal Directed Acyclic Graph

In Section 2.2, we introduced a causal ordering for tracking operations’ concurrency rela-
tionships in the tool. However, the conflict relations for collaborative feature modeling
require further information about causality relationships. To this end, we utilize that the
causally-preceding relation is a strict partial order, and thus corresponds to a directed acyclic
graph (Mattern 1988; Schwarz and Mattern 1994). Using such a Causal Directed Acyclic
Graph (CDAG), we define the sets of Causally Preceding (CP) and Causally Immediately
Preceding (CIP) operations for a given operation as follows:

Definition 11 (Causal Directed Acyclic Graph) Let GO be a group of operations.
–   The causal directed acyclic graph for GO is the graph G = (V , E) where V = GO
    is the set of vertices and E = {(Oa , Ob ) | Oa , Ob ∈ GO ∧ Oa → Ob } is the set of
    edges. Then, the set of causally preceding operations for an O ∈ GO is defined as
    CPG (O) := {Oa | (Oa , O) ∈ E}.
–   Now, let (V , E  ) be the transitive reduction of (V , E). Then, the set of causally immedi-
    ately preceding operations for an O ∈ GO is defined as CIPG (O) := {Oa | (Oa , O) ∈
    E  }.

   The transitive reduction of a graph removes all edges that represent only transitive
dependencies (Aho et al. 1972). Therefore, an operation Oa causally immediately precedes
another operation Ob when there is no operation Ox such that Oa → Ox → Ob . Both,
the CDAG and its transitive reduction are unique, so that the CP and CIP sets for an oper-
ation are well-defined. Each collaborating site has a copy of the current CDAG, which is
incrementally constructed and includes all previously generated and received operations.

3.2.3 Outer Conflict Relation

The GRACE system uses solely the operation metadata to determine conflicts. However, no
complex syntactic or semantic conflicts can be detected this way, because the underlying
document is not available for conflict detection. In contrast, we propose that a conflict rela-
tion for feature modeling should not only consider operation metadata, but also the targeted
feature model. This is possible due to our globally targeted object strategy. Such a conflict
relation may inspect the involved operations and apply them to the targeted feature model
to check whether their application introduces any inconsistencies.
   In order for such a conflict relation to work properly, we need to address the technical
difficulty of finding the appropriate targeted feature model that the two operations should
be applied on, which may differ from the currently displayed one. Such a feature model can
be derived from the checked operations’ common ancestor in the CDAG and their causally
24    Page 16 of 47                             Empir Software Eng     (2021) 26:24

preceding operations. However, this feature model is only meaningfully defined if all
causally preceding operations of both checked operations are compatible. Otherwise, the
intention preservation property may be violated, so that the conflict relation would rely on
potentially inconsistent and unexpected feature models. Thus, an appropriate outer conflict
relation, termed ⊗O , must propagate any conflict between two operations to all causally
succeeding operations. We can express this property as follows:

Definition 12 (Conflict Propagation) Let GO be a group of operations and Oa , Ob ∈ GO.
Then, Oa ⊗O Ob if at least one of the following conditions is true:
–        ∃Ox ∈ GO : Ox → Oa ∧ Ox ⊗O Ob ,
–        ∃Oy ∈ GO : Oy → Ob ∧ Oa ⊗O Oy , or
–        ∃Ox , Oy ∈ GO : Ox → Oa ∧ Oy → Ob ∧ Ox ⊗O Oy .

     To determine the outer conflict relation for two given COs, we introduce    OUTER C ON -
FLICTING (cf. 1), a recursive algorithm that uses the CDAG to propagate conflicts as defined
above:

   OUTER C ONFLICTING ensures that there is a well-defined feature model for subsequent
conflict detection, which enables us to check arbitrary consistency properties—with the
disadvantage that in few cases operations may be falsely flagged as conflicting, because we
make no distinction between time and causality. Essentially, OUTERCONFLICTING defers
the conflict detection to the inner conflict relation ⊗I , which we discuss below. So, we
separate two concerns, that is, the technical problem of ensuring an appropriate targeted
feature model (⊗O , instead of ⊗ in Definition 9), as well as conflict-detection rules specific
to collaborative feature modeling (⊗I ). Using OUTERCONFLICTING, we can compute ⊗O
as follows:

Definition 13 (Outer Conflict Relation) Two compound operations COa and COb are in
outer conflict (i.e., COa ⊗O COb ), iff OUTERCONFLICTING (G, COa , COb ) = true, where
G is the current CDAG at the site that executes OUTERCONFLICTING. Otherwise, they are
outer compatible, i.e., COa O COb .

3.2.4 Topological Sorting Strategy

The outer conflict relation ⊗O ensures that we can produce an appropriate feature model.
To actually produce such a feature model, we employ a topological sorting of operations
Empir Software Eng    (2021) 26:24                                           Page 17 of 47 24

according to their causality relationships, which we implemented as APPLYCOMPATIBLE-
GROUP (Algorithm 2 ). We need APPLYCOMPATIBLEGROUP to apply (unordered) sets of
mutually compatible operations, namely CGs, to a feature model. Because the application
order of operations is important for producing a correct result, our topological sorting strat-
egy ensures an application order that respects all causal relationships captured in the CDAG.
Note that a topological sorting exists and can be constructed for any CDAG, but is not neces-
sarily unique, since concurrent operations may still be swapped (Kahn 1962). This, however,
does not impact the correctness of our technique, since concurrent compatible operations
always commute in our tool, as guaranteed by the no-overwrites rule that we introduce next.

3.2.5 Inner Conflict Relation

The inner conflict relation ⊗I detects conflicts that are specific to feature modeling. To this
end, we first introduce SYNTACTICALLYCONFLICTING (Algorithm 3), which determines
whether two compound operations have a syntactic conflict that concerns basic syntactic
properties of feature models.
   First, SYNTACTICALLYCONFLICTING applies one compound operation, COy , to an
appropriate feature model. We produce this feature model with APPLYCOMPATIBLEGROUP
from the initial feature model, to which no operations from the CDAGs have been applied,
yet. Then, the POs that COx comprises are subsequently applied to this feature model, so
that, finally, COx and COy are both applied. While applying these COs, we can inspect
the current feature model for potential consistency problems using the following set of
conflict-detection rules.
   The no-overwrites rules state that no two concurrent operations may update the same
feature’s or cross-tree constraint’s attribute to a new value. Thus, the intentions of con-
current updates on the same model element are preserved by accommodating them into
different versions. Next, the no-cycles rule preserves the preconditions of the moveFeature-
Subtree CO by forbidding to move (i.e., updating the parentID) features that are themselves
moved. So, we preserve the acyclic property from Definition 3. The no-graveyarded rules
guarantee that no operation targets a graveyarded feature or cross-tree constraint. This way,
no remove operation can override other collaborators’ update operations. Further, the no-
group-optional rule detects when a groupType update would override a concurrent update
of an optional attribute and ensures that the root feature is always mandatory. Finally, the
assert-no-child-added rule ensures an assumption of the removeFeature CO, namely that
removed features’ children are not changed concurrently. This helps to preserve the single
root property of legal feature models (cf. Definition 3).
24   Page 18 of 47   Empir Software Eng   (2021) 26:24
Empir Software Eng      (2021) 26:24                                               Page 19 of 47 24

  Building on SYNTACTICALLYCONFLICTING, we introduce                          INNER C ONFLICTING
(Algorithm 4) to determine ⊗I for two given compound operations.

    To ensure the symmetry of ⊗I , INNERCONFLICTING uses SYNTACTICALLYCONFLICT-
ING   to check for syntactic conflicts in both directions. Finally, INNERCONFLICTING may
check additional arbitrary semantic properties of a feature model that includes the effects
of COa and COb . A semantic property SP ∈ SP is a deterministic function SP : FM →
{true, false} that returns whether a given legal feature model includes a semantic inconsis-
tency. SP may be adjusted according to the collaborators’ needs when the tool is initialized.
For instance, collaborators may want to ensure that the modeled SPL has at least one product
(void feature model analysis) at all times and does not include dead features, false-optional
features, or any redundant cross-tree constraints (Benavides et al. 2010; Felfernig et al.
2013; Kowal et al. 2016). Note that our technique allows only pairwise conflict detection of
operations, since interactions of higher order are hard to detect (Bowen et al. 1989; Calder
et al. 2003; Apel et al. 2013b). Using INNERCONFLICTING, we can compute ⊗I as follows:

Definition 14 (Inner Conflict Relation) Two compound operations COa and COb are in
inner conflict, i.e., COa ⊗I COb , iff INNERCONFLICTING (G, FMinit , COa , COb ) = true,

Fig. 4 UML state diagram of feature modeling at a single site with our tool. The substate describes our
conflict resolution process
24    Page 20 of 47                                 Empir Software Eng     (2021) 26:24

where G and FMinit ∈ FM are the current CDAG and initial feature model at the site that
executes INNERCONFLICTING. Otherwise, they are inner compatible, i.e., COa I COb .

3.2.6 Feature-Modeling Loop

In the previous sections, we described algorithms for calculating two conflict relations
for collaborative feature modeling. We apply these algorithms in a feature-modeling loop,
which we show in Fig. 4. In this loop, a site may, after initialization (1), send (i.e., generate
and propagate) new feature-modeling operations (2). Moreover, a site receives all operations
generated at other sites (2). Receiving an operation may lead to a conflict, which triggers
our conflict resolution mechanism (detailed in Section 3.3). We proceed to describe site
initialization and operation processing in more detail.

   When a new site (i.e., collaborator) joins an editing session (1), it must call INITIALIZE-
SITE (Algorithm 5) with the current feature model, which is provided by another site. This
algorithm returns the site’s initial state, which consists of an empty CDAG, empty MCGS,
and the initial feature model. In addition, the returned uiState is passed to the user interface
of the feature model editor, to be rendered as a feature diagram.

   Once initialized, the site may send and receive operations (2), both of which are pro-
cessed by the same algorithm, PROCESSOPERATION (Algorithm 6). To this end, the site
calls PROCESSOPERATION with its current state (CDAG, MCGS, and initial feature model)
and the newly received or sent CO. PROCESSOPERATION adds the new operation to the
Empir Software Eng    (2021) 26:24                                           Page 21 of 47 24

CDAG and detects potential conflicts with MOVIC (the MCGS construction algorithm pro-
posed by Sun and Chen 2002), which utilizes our outer conflict (⊗O ) and compatibility
(O ) relations. Depending on the constructed MCGS, the new uiState is constructed: If
MCGS is empty (just after site initialization) or consists of one version (i.e., compatible
group), a feature model can be constructed with APPLYCOMPATIBLEGROUP and passed
to the user interface for rendering. In case of a conflict (i.e., two or more compatible
groups), a conflict descriptor that comprises detailed information about the conflicting oper-
ations and involved collaborators is passed to the editor to aid in the conflict resolution
(cf. Section 3.3). Note that, in the case of generating a new operation, MOVIC is guaranteed
to not detect any conflicts, because a locally generated operation always causally succeeds
all previously seen operations. In particular, the resulting feature diagram can be rendered
immediately, without waiting for other sites to acknowledge the change, which makes our
technique optimistic (in contrast to, for example, locking).

3.3 Conflict Resolution

Our extension of the MVMD technique fully automates the detection of conflicts and allo-
cation of feature-model versions. However, MVMD does not offer functionality for actually
resolving conflicts. Thus, we propose a manual conflict resolution process (cf. Figure 4)
during which collaborators examine alternative feature-model versions and negotiate a spe-
cific version (Stefik et al. 1987; Wulf 1995). To this end, we allow collaborators to cast
votes for their preferred feature model versions, which allows for fair and flexible conflict
resolution (Dennis et al. 1998; Gibbs 1989; Morris et al. 2004).
    In our process, a site forbids any further editing (referred to as freeze) when a conflict
is detected (i.e., |MCGS| > 1). This forces collaborators to address the conflict, avoiding
any further divergence. Freezing the tool also ensures the correctness of our technique, as
the MVMD technique has only been proven correct for this use case (Sun and Chen 2002;
Xue et al. 2003). After freezing, the tool synchronizes all sites (i.e., waits until all sites
received all pending operations) so that all collaborators are aware of all versions before
starting the voting process, which is the only synchronization period that is required by
our technique. Next, a set of voters V (i.e., collaborators that are eligible to vote) may be
flexibly computed based on the collaborators’ preferences. For example, we implemented
the following possibilities:
–   V = ∅, that is, no collaborator may vote.
–   V consists of all collaborators that are involved in the conflict (they are involved in a
    conflict when they have submitted an operation O such that ∃CG ∈ MCGS : O ∈       / CG).
–   V contains all collaborators participating in the editing session.
To start the voting, we initialize a set of vote results, VR, as an empty set. In the voting
phase, every voter may cast a vote on a single feature-model version, which is added to the
local vote result set and propagated to all other sites. After a vote is processed at a site, a
resolution criterion decides whether the voting phase is complete. Again, we implemented
several resolution criteria in our prototype, including:
–   |VR| = 0, that is, the voting phase is concluded immediately, which is useful to
    implement a reject-all-conflicts policy.
–   |VR| > 0, so the voting phase is concluded after the first vote has been cast, which
    roughly corresponds to a first-writer-wins policy.
–   |VR| = |V |, that is, all collaborators have to vote for the voting phase to conclude.
You can also read