Yérom-David Bromberg

Franc ¸ois Taïani Adrien Luxey

CASCADE: Reliable Distributed Session Handoff for Continuous Interaction across Devices

Allowing users to navigate seamlessly between their personal devices while protecting their privacy remains today an ongoing challenge. Existing solutions rely on peer-to-peer designs, and blindly flood the network with session messages. It is particularly hard to come up with proposals that are both costefficient and dependable while relying on poorly connected mobile appliances. We propose CASCADE, a distributed protocol to share applicative sessions among one's devices. Our proactive session handoff algorithm takes inspiration from the BitTorrent P2P file sharing protocol, but adapts it to the specific characteristics of our problem. It eschews in particular trackers, and limits the seeders of each session to the devices most likely to be used next, as computed by a decentralized aggregation protocol. A key aspect of our approach is to trade off network costs for reliability, while providing a faster session handoff than centralized solutions in the vast majority of the cases.

I. INTRODUCTION

In recent years, our relations to digital technologies have become more symbiotic than ever. From desktops to smartphones to connected TVs and cars, the proliferation of Internet-connected devices among us is a step forward to Mark Weiser's vision of "ubiquitous computing" [START_REF] Weiser | The computer for the 21st century[END_REF]. People nowadays own multiple devices (e.g. PCs, smartphones, smart watches, tablets, notebooks...) that they use interchangeably depending on the context (their location, the task at hand, their preference...) [START_REF] Google | The new multi-screen world: Understanding cross-platform consumer behavior[END_REF], [START_REF] Kawsar | Home computing unplugged: Why, where and when people use different connected devices at home[END_REF].

This situation raises a major concern for application designers: how can we maintain a private, convenient and delightful interaction [START_REF]Ethical design[END_REF] with users when they switch back and forth between a variety of heterogeneous devices? The accidental complexity [START_REF] Brooks | No silver bullet essence and accidents of software engineering[END_REF] of using different platforms must be taken out of the users' shoulders: applications need to provide a consistent and continuous experience across platforms. To this end, recent breakthroughs in web technologies and engineering have practically solved the consistency problem. Leveraging HTML, CSS, JavaScript, and native browsers embedded in modern appliances, developers can now provide a consistent output on any support using a single codebase [2], [4], [6], [START_REF]ionicframework.com[END_REF]. As a result, web technologies are becoming a standard for building device-agnostic applications [START_REF] Bellucci | Engineering javascript state persistence of web applications migrating across multiple devices[END_REF], [START_REF] Chi | Weave: Scripting cross-device wearable interaction[END_REF], [START_REF] Hartmann | Hydrascope: Creating multi-surface meta-applications through view synchronization and input multiplexing[END_REF], [START_REF] Husmann | Usage analysis of crossdevice web applications[END_REF], [START_REF] Lo | Imagen: Runtime migration of browser sessions for javascript web applications[END_REF], [START_REF] Mikkonen | Towards Liquid Web Applications[END_REF], [START_REF] Oh | Migration of web applications with seamless execution[END_REF].

To provide a continuous interaction across several devices, the state of a user's applications must be propagated between her devices. (This propagation is also called session handoff.) At the moment, the vast majority of existing solutions rely on cloud services to act as a central point of synchronization. For instance, Evernote [START_REF][END_REF], 1Password [1], Wunderlist [START_REF] Wunderlist | [END_REF],

Chrome [START_REF]Google chrome[END_REF], Amazon Kindle [3], etc. all rely on either Google Drive, Dropbox, iCloud, Amazon S3 and/or other corporate data centers to store and retrieve the user's applicative session. Such an approach raises two concerns: firstly, it violates the right to privacy, by letting applications providers record and analyze their clients' behavior; secondly, it requires the newly opened device to be connected to the Internet to fetch the latest applications' state.

To tackle the privacy issue, a logical remedy is to keep the user's data on appliances that she owns. To the best of our knowledge, though, there exists no adequate solution proposing distributed session handoff among one's devices. A few studies have tackled applications' state sharing in the context of Distributed User Interfaces, by leveraging peer-to-peer (P2P) techniques [START_REF] Fisher | Designing peer-topeer distributed user interfaces: Case studies on building distributed applications[END_REF], [START_REF] Melchior | A toolkit for peer-to-peer distributed user interfaces: Concepts, implementation, and applications[END_REF]. Alas, they require a constant interconnection between devices, and blindly flood the devices with state updates. Applied to session handoff on potentially mobile devices, this approach is neither dependable, scalable, nor economical.

To overcome these limitations, we propose CASCADE, a novel solution to deliver a continuous user experience across personal devices. CASCADE's objectives are to:

• respect the right to privacy by keeping all data on one's devices; • be reliable: CASCADE should have no centralization point and function in any situation; • be fast: the user should instantly find her previous session on her newly opened device; • be lightweight: because most modern devices are mobile assets, CASCADE should use the minimum network and energy resources; • scale with the number of devices: as demonstrated by the popularity of the Internet of Things (IoT), or by Cisco's prediction that there will be 50 billion connected objects by 2020, the amount of devices owned per person is likely to keep rising up. In that regard, we consider a user that would own and frequently use a dozen of devices.

To achieve these goals, CASCADE performs a proactive session handoff using a protocol that is loosely inspired from BitTorrent, a mature P2P file sharing protocol. CASCADE adapts the principles of BitTorrent to the specific characteristics of the session handoff problem: it eschews in particular trackers, and limits the seeders of each session to the devices most likely to be used next, as computed by a decentralized aggregation protocol.

Our contributions are as follows:

• We propose CASCADE, a decentralized session handoff protocol that reinterprets some of the ideas of the P2P BitTorrent protocol in the context of personal device interactions. We model our protocol precisely using communication automata, a rigorous formalism capturing the behavior of communicating entities. • We propose to determine the cohort of seeders (the devices/peers offering a particular file in BitTorrent) of each session based on the devices most likely to be used next.

• We present an in-depth evaluation of our proposal based on a number of synthetic user models, in order to exercise our solution across a wide range of usage scenarios. The remainder of this paper is structured as follows. Section II details the CASCADE concepts and its approach. Section III evaluates the proposed approach regarding the performances and different models emulating different types of user behavior. Section IV reviews related work. Finally, Section V discusses future work and concludes.

II. THE APPROACH

Our protocol, CASCADE, aims at efficiently sharing the state of a user's applications (thereafter called a session) among her devices. Its main objective is to be proactive: ideally, the user's previous session would already be waiting for her on the device she is about to use. To do so, CASCADE gathers information on the user's behavior, and tries to predict her next location. If the proactive handoff fails, the newly opened device must still be able to download the previous session reactively at the moment the user opens it. Alas, mobile appliances are frequently disconnected from the network or turned off. Knowing so, the reactive session handoff must still function reliably, even if the device on which the previous interaction took place is offline when the user opens the next one. Due to the limited resources inherent to mobile appliances, a secondary objective of CASCADE is to be lightweight. Applicative sessions are considered arbitrary heavy: the protocol must minimize the network traffic by avoiding sessions exchanges to irrelevant devices.

We will first introduce our session handoff protocol in Section II-A. Then, Section II-B will cover how CASCADE gathers knowledge on the user to proactively exchange the user's session between devices.

A. Peer-to-peer session handoff

CASCADE is loosely based on the BitTorrent file-sharing protocol [START_REF] Cohen | The bittorrent protocol specification[END_REF]. Similarly to BitTorrent, a newly added file (i.e. the latest session) is split into n chunks of fixed-size. Chunks are then distributed among nodes (i.e. the devices) in a decentralized fashion. Furthermore, any peer having some session chunks can share them again, thus increasing the number of sources for this chunk beyond the original uploader. However, unlike BitTorrent CASCADE does not locate peers through a central server, or using the BitTorrent DHT protocol [START_REF] Loewenstern | [END_REF], but instead manages its own list of peers.

To provide the transfer of sessions among peers, CASCADE uses a small set of messages M = {Sess, Get X , Have X , Chunk X , Bootstrap} according to a communicating automaton CA defined as the following:

Exchanging session metadata: to advertise a new session s to its peers, a device d sends a message Sess containing the metadata Sess = ,W s , H, h, bf . This metadata information describes a specific session s of size W s that is split into N s chunks of size W p 1 . A 20 byte SHA1 hash is calculated for each chunk, and is stored in a contiguous array h: ∀j ∈ [[0, N s [[, h[j] contains the 20 byte hash of the j th piece of the session. Finally a SHA1 hash H is computed from the hash-array h. Each session has a unique timestamp, noted , that enables us to have a total order on a sequence of sessions across time. Additionally, the bit field bf is an array of N s booleans, such that, ∀j ∈ [[0, N s [[, bf [j] = 1 means that the sender owns the j th piece, and can share it with the receiver (bf [j] = 0 otherwise). In follow-up communications, devices only use H to reference a session. Indeed, SHA1 being a cryptographic hash function, it guarantees (with very high probability) that no two sessions can share the same hash, making H a valid identifier.

Exchanging chunks: The message Get X (resp. Have X ) enables a node to request (resp. acknowledge) a specific chunk having the hash h[X]. Furthermore, the message Chunk X carries the raw data of the chunk being previously requested. Bootstrap enables a new device to request the latest ongoing session to a remote peer. All exchanged messages have mandatory fields such as the hash of the session it refers to H.

Finally, to get metadata fields from a message, we use the operator . For instance, getting the H field from a message S is noted S H.

Definition 1: A communicating automaton CA is a tuple (Q, M, q 0 , A, Evt, C, Act, →), where Q is a finite set of states, M is a finite set of messages as defined previously, q 0 ∈ Q is the starting state and A ⊂ Q is a set of accepting states. Evt is a set of event types such that Evt = {⇒, ⇐, #, !, γ, } where ⇒ (resp. ⇐) denotes a received (resp. sent) message from the underlying network. Further we have 3 different way to propagate messages to a set of peers: #, ! and γ. ! is a traditional propagation of multicast messages to a set of peers, and γ is a basic broadcast. Finally, # is a predictive multicast: it dynamically selects peers by inferring the user's future behavior, and is used to propagate the session to relevant peers. The predictive multicast is one of the key contributions of the paper, and will be discussed in details in Section II-B. γ is used when a peer needs to do a traditional broadcast. Moreover, event enables to trigger a transition without the occurence of an external event. For instance, when Alice is opening or closing her device, the latter may trigger by itself an internal event.

Act is the set of actions performed when a transition is taken.

1 apart from the last piece, that can be shorter. -→ s 2 and changes the state of the communicating automaton from s 1 to s 2 once the label L is evaluated to true. The transition label L is defined such as L ⊆ Evt × B(M ) × Act, and has the following format:

L = Event | Constraints | Actions
According to the aforementioned definitions, Figure 1 and Figure 2 describe the control flow that enables CASCADE to exchange sessions, and more particularly the behavior of a device when it acts either as a client (i.e as a leecher) or as a server (i.e as a seeder). We call S l the local session stored on a device, and S r the session received from a remote peer.

The user activity is modeled through an transition. For instance, as soon as a user uses a device that does not have any session stored locally, the device must proceed to a bootstrap to get the latest ongoing sessions (See Figure 1 , transition H→ ). In a similar manner, A new session is created every time the user leaves a device d (See Figure 2 ). After chunking the new session into pieces, d advertises it to thoughtfully selected peers (See Figure 2 ). The recipients perform a predictive broadcast to advertise this new session only if they have never been notified of it yet (See Figure 1 , transition → ). A new session is detected when its related metadata message S r is received from a remote peer with a timestamp higher than the one of the local session's metadata noted S l . When this case occurs, leechers flush both metadata information of the local ongoing session S l and its related raw data chunks (See Figure 1 , transition H → ). Thereafter, S l is initialized from S r with a bit field bf containing only zeros as they do not yet have any data chunks of the new detected session. Whatever, as soon as leechers receive a session, either new or not, they answer with the bit field of the ongoing session to notify their missing chunks (See Figure 1 ). Leechers enter then in a leeching phase (See Figure 1 ): they first calculate the First Find Set (ffs) of the inversed bit field of their ongoing session (i.e. f f s(¬S l bf [. . . ])), to find the index of the first bit that is set to 1 to identify the next chunk to request. Every time a peer d completes the downloading of a chunk, it performs a traditional multicast to propagate the news to any device that was communicating with d . This way, peers will be able to request chunks to d , and not only to d, the device on which the interaction took place. Meanwhile, seeders send data chunks to leechers as long as they possess data chunks unknown to the leechers (See Figure 2 , ).

As a corollary, the transmission of the session can continue even if its original source shuts down, as long as it had time to send its entire session once.

B. Predictive and reliable peers selection

As CASCADE does not rely on any trackers, one of the key features of our approach is to be able to find the most adequate peers to share the chunks of the current session in a reliable manner. To achieve this aim, we need to overcome three issues: (i) representing the user's behavior across time in a compact manner, (ii) propagating the user's behavior among devices, (iii) and finally selecting adequate peers to share the session, by inferring the future user's behavior.

ISSUE 1, representing the user's behavior: as in our previous work [START_REF] Luxey | Sprinkler: A probabilistic dissemination protocol to provide fluid user interaction in multi-device ecosystems[END_REF], we represent Alice's use of her devices as an ever-growing sequence containing k interactions: S k = {r 1 , ..., r i , ..., r k }. Knowing that the user owns a set of N devices D = {d 1 , .., d N }, each interaction r i is characterized by a couple r i = (d, t) ∈ D × R, which means that Alice started using the device r i .d at time r i .t (and stopped using it before r i+1 .t).

From a global point of view, the sequence S k contains every of the k interactions performed by the user since the beginning of the program execution. Locally, however, each device d only knows about the sequence S k | d of interactions that took place on it, that is:

S k | d = {r ∈ S k , r.d = d} =⇒ S k = d∈D S k | d ,
ISSUE 2, propagating the user's behavior: in order to predict the user's future behavior, all devices must gain a global understanding of the user's past behavior, by aggregating their respective local knowledge into a global interaction sequence. Each device d thus holds a local sequence S k,d that is an aggregate of the others appliances' interactions, such that:

S k | d ⊆ S k,d ⊆ S k .
Our goal is to keep the devices' local sequence S k,d as close to S k as possible.

To achieve this aggregation, we leverage on probabilistic dissemination protocols [START_REF] Birman | Bimodal Multicast[END_REF], [START_REF] Demers | Epidemic algorithms for replicated database maintenance[END_REF], [START_REF] Kermarrec | Reliable Probabilistic Communication in Large-Scale Information Dissemination Systems[END_REF], precisely implementing a probabilistic distributed broadcast. This algorithm from earlier works in our team [START_REF] Luxey | Sprinkler: A probabilistic dissemination protocol to provide fluid user interaction in multi-device ecosystems[END_REF] has been called STORYTELLER in the remainder of the paper. ISSUE 3, selecting adequate peers: a device must have some insight on which device will most probably be used next to intelligently choose peers to share its new session with.

We consider the end of interaction k, that took place on the device d curr , thus generating the session s k . At interaction k + 1, Alice will grab the device d next . CASCADE uses the global sequence S k of past interactions (or more precisely its estimation provided by STORYTELLER) to compute a list of the devices that Alice will most likely use after d curr .

This takes the form of a score array sc = [sc dcurr→d ] d∈D . sc dcurr→d is simply the number of times that Alice has switched from d curr to d in the past, and is proportional to the observed experimental probability that Alice switches from d curr to d in S k :

sc dcurr→d = |{(r t , r t+1 ) ⊆ S k | r t .d = d curr ∧ r t+1 .d = d}| .
An intuitive approach would then be to preferably target the devices that have the highest score values, and hence the highest probability of being used. However, Alice might use an unexpected device, and d next might not be connected when devices share s k , thus requesting reactive download from other peers. For these reasons, the session handoff must also reach some other devices with a low probability.

To achieve this, we borrow the well known roulette-wheel selection function [START_REF] Lipowski | Roulette-wheel selection via stochastic acceptance[END_REF] from the genetic algorithms literature: when selecting individuals to reproduce from a generation to another, the roulette-wheel selection picks members of the population with a probability proportional to their individual fitness score (in our case, the score sc dcurr→d ). The name comes from the analogy with a roulette wheel in a casino, where each individual is given a number of holes on the wheel proportional to its score. The roulette has an equal probability of landing in every hole, thus giving fitter individuals a better chance of being picked (while still allowing less fit individuals a chance of being chosen).

In our case, a device d performs a roulette wheel selection, using sc, to pick up to f peers to share a new session s k . f is CASCADE's fanout, a configuration parameter. Every time d chooses a device, it is removed from sc. In Figure 3, we see a graphical representation of sc depicted as the "fitness array": Alice's mobile has the highest likelihood of being selected after d curr , and her TV has the least non-null one. Devices that are either disconnected or have a probability of 0 are never selected: if they were to be chosen next by Alice, they would have to reactively download the session from online devices. In Figure 3, d selected Alice's laptop. After recreating a new roulette wheel with the laptop left out, d can select another device. The algorithm stops when d selected f online peers, or when d could not find more online devices with a nonnull probability of being used next. If d could not find any online peer with a non-null score, it falls back to picking up to f random online peers in its local sequence. This fallback is particularly useful while facing a lot of remote disconnections, where this situation can arise fairly often.

This peers selection function is responsible for the predictive multicast, depicted by the symbol # in the previous Figure 1 and Figure 2. By directing the flow of sessions exchanges, it drives the performance of the proactive session handoff, and guarantees the possibility of the reactive fallback.

We will now proceed to the evaluation, where we will analyze CASCADE's efficiency at performing proactive and reactive session handoff, and its network consumption.

III. EVALUATION

We first introduce several behavioral models in Section III-A, that will be used to evaluate the performances of CASCADE under different scenarii. In Section III-B, we introduce our experimentation methodology. In particular, we describe the different configuration parameters that are used during the experiments. In Section III-C, we show how the STORYTELLER sub-system behaves under our churn model. Finally, we evaluate the performances of our approach CAS-CADE in Section III-D.

A. Evaluation testbed

To the best of our knowledge, there exists no real-world dataset describing a user's behavior among its set of devices. In this context, we have designed an evaluation testbed to evaluate CASCADE's performance in different usage scenarii. The latter includes several standard user behavioral models to mimic the user behavior. These models are introduced in Section III-A1. Moreover in the specific context of this paper, to evaluate our protocol's resilience to devices' appearance and disappearance, we are introducing a model of churn covered in Section III-A2.

In our testbed, the user's interaction is considered atomic: the user provides a new session at the same time as she requests the previous one.

1) Proposed user behavior models: for our experiments, we need to craft sequences of user behavior that show various degrees of predictability. Towards this aim, we will design a discrete time Markov model per kind of desired behavior. Each sequence will be generated by randomly walking on their respective Markov chain.

Indeed, we can consider the user's behavior as a stochastic process having a finite state space (the devices) and a discrete time. Further assuming that the next used device does only depends on the one that is currently used, and not on the previous ones (the Markovian property), the user device switching process is a discrete time Markov process.

Such a Markov process M can be entirely defined by its state space S, the probability of its initial state Π, and the transition matrix P M that gives the probability to switch from a state to another. In our case, S = D, the set of N = 12 devices. We assume that each state is initially equiprobable: ∀d ∈ D, Π d = 1/N . In the end, each of our device switching models will be defined solely by its transition matrix P M :

P M = p di,dj (di,dj )∈D 2 s.t. p di,dj = P [d i → d j ] .
We propose five different ways to generate types of user behavior. For three of these, we create two variants, leading to a total of eight different models. Figure 4 shows an instance of each model's transition matrix P M , using N = 12 devices, such that the i th row P M (d i , * ) represents the transition probabilities from device d i . We designed these models to show both dense transition matrices (that always generate a non-null probability to switch from any device to any other), and sparse ones (that make some device transitions impossible). We also tried to create transition probabilities that would be either very uniform (such that several devices have the same probability of being used) or dominated by one device's probability (that would always be chosen, except in rare exceptions). Their creation is explicated below: 1) uniform: The worst case scenario for our framework is a completely uniform model, where Alice chooses her next device with an even probability of 1/N . In this situation, the currently used device cannot guess what appliance will be used next, making the session handoff as good as random;

2) cyclic: The best usage pattern is when Alice uses her devices in a cyclic order (making a circular Markov chain), because the devices always succeed to predict the next appliance that she will use. In this model, every In our futuristic scenario where a user would own and frequently use a dozen of devices, the assumption that the transition probability between her devices follows a Zipf law seems plausible.

We propose a model where, to each row of the transition matrix, we assign a random permutation of Zipf's law's PMF using n = N using a random exponent s.

We generate two variants: in model 4.1, we pick s in [1, 2.5], which puts the biggest probability z(1; n, s) between 0.32 and 0.75. In model 4.2, we draw s from [2.5, 5], such that z(1; n, s) lies between 0.75 and 0.96. In model 4.2, a transition probability dominates the others way more than in 4.1; 5) sparse: A sparse transition matrix contains null probabilities: there are certain devices d i and d j such that d j will never be used after d i . This is realistic: two desktop computers from two faraway locations will never be accessed in a row. In CASCADE, having null probabilities lowers the search space of our peers selection function (cf Section II-B).

For each d ∈ D, we compute the transition vector P M (d, * ) by drawing samples from a Zipf law Z(n, s) with a "big" n (e.g. 1000) and a fixed s:

P M (d, * ) = X x∈X x s.t.    X = {Z(n, s) -1} N x∈X x = 0
The bigger the exponent s, the bigger the probability that an outgoing transition equals zero, the sparser the matrix. We thus generated two models 5.1 and 5.2 with s = 1 and s = 4 respectively.

While creating these models, we always ensured that the Markov graph was strongly connected, in order to effectively see the user switching between the N devices, instead of looping through a small subset of D.

For each model, we generate a sequence of the user's activity by randomly walking on the obtained Markov chain, starting from a random device. The output sequence S tot = {r 1 , . . . , r L }, of size L, drives the evaluation of our protocol.

The beginning of the sequence, S init = {r 1 , . . . , r Linit } (such that L init < L) is given to the devices on bootstrap: it provides them with an initial knowledge of the user's behavior. The remainder of the sequence, S exp = {r Linit+1 , . . . , r L }, gives the order with which we use the devices during the experiment. As already stated, each device's usage is emulated by calling their REST function. For a given user sequence length L and a given bootstrap sequence length L init , the experiment thus counts L exp = L -L init interactions with the user.

2) Churn model: We call churn the act of devices leaving or entering the network. We do expect one's appliances to frequently loose Internet connection, depending on the user's actions or the devices' system. One of CASCADE's goals is precisely to remain functional despite devices' churn. As long as two devices are online, they should try their best to bring the user's session to the device she will use next.

To assess CASCADE's resilience, we have designed a churn model such that the devices enter and leave the system at random time intervals. Offline devices are awakened by the user when she decides to use them, but this is the only correlation between the device usage and the churning model. Such an autonomous churning model is more general than when the user's behavior drives the churn: if our algorithm survives the former, it should handle the latter.

We randomly assign a target average uptime rate υ to each device d on bootstrap. Initially, d is connected with a probability υ. Stutzbach and Rejaie [START_REF] Stutzbach | Understanding churn in peer-to-peer networks[END_REF] showed that the Weibull distribution fit P2P churning behaviors quite well, therefore we draw connection and disconnection time intervals from a Weibull distribution W(λ, σ). With a small shape parameter σ < 2, Weibull shows a long tail, generating long intervals with a small probability; we choose σ = 1.2. λ is the scale parameter: it is used to change the distribution's expected value without changing its shape.

For a given device d having an average uptime rate of υ, we call T off the random variable representing the time during which the device d remains disconnected, and T on the random variable representing the time that d stays up. They are computed as follows:

T off ∼ t min + W(1 -υ, 1.2)
T on ∼ t min + W(υ, 1.2) Fig. 5. Distribution of the random variables driving the disconnection and connection intervals (resp. T off and Ton) using t min = 0.5, and υ = 0.7, and the timeline of a device's execution using these parameters.

Weibull's support is R + , which makes t min (a constant parameter) the lower bound of the intervals.

Figure 5 (a) shows two histograms representing the distribution of the values taken by T off and T on for t min = 0.5, and υ = 0.7. We see that T on (having λ = 0.7) shows a much longer tail than T off (having λ = 0.3). Using the same parameters, Figure 5 (b) shows the timeline of a device execution. We observe that our model provides uneven connection and disconnection durations. In this case, the output uptime rate is of 62.6%, which is close to the target 70% provided as parameter.

In practice, our churn model makes the behavior of devices fairly unpredictable from the point of view of their peers. Because the devices still need to know whether their peers are online or not when passing sessions (to avoid completely failing a handoff), we crafted a simple oracle, thus avoiding the need to bloat our protocol with acknowledgments. When selecting peers, a device can query a shared object to know whether the queried peer is online at this precise instant (which does not guarantee that it will remain online long enough for a successful communication). A better solution would be to leverage a distributed failure detector such as Consul [5], although this elementary oracle was enough to suit our needs.

We have designed two behavioral models (one for the user's activity, and one for the devices state) to provide our protocol with a challenging testbed. Although certainly not realistic, due to our lack of field data, we believe that our user models show a wide diversity of behaviors, and that our churning model is uncompromising enough to assess the efficiency of CASCADE.

B. Conducted experiments

Experiment methodology: an experiment is made of different steps. We first compute a behavioral model, used to create the sequence of the user's actions S tot of size L.

Then, this sequence is split between the bootstrap part S init (of size L init ), given to each device on boot, and S exp (of size L exp ) that provides the order of the devices' usage. During the experiment, devices will connect and disconnect following the churning model described above; unless we deactivate the churning, in which case the devices are always online. An experiments set comprises an experiment per user behavioral model described in Section

Experiment setting: we conducted 10 experiments sets with the same parameters twice: once enabling the churn, and another time with the churn deactivated for comparison.

Every session weights the same size W s = 1MB, while the session pieces weight W p = 16KB: each session is chunked into 64 pieces. CASCADE's fanout f , that drives the session handoff's spread, is set to 4: it is just superior to log (N ), as suggested by [START_REF] Kermarrec | Probabilistic reliable dissemination in large-scale systems[END_REF]. Further, we set the number of devices to N = 12. We argue that this number of devices is three times above modern usage behaviors [START_REF] Google | The new multi-screen world: Understanding cross-platform consumer behavior[END_REF]. The initial sequence size is set to L init = 30. With such a small initial knowledge, peers selection will make very coarse estimations of the real user's behavior, but will still get the address of most devices. We can imagine that a tech-hungry user would switch 30 times between her devices in a day or two: until this time, our protocol would only gather data without attempting proactive handoffs. The experiment sequence size is empirically set to L exp = 70.

The user performs a new interactions every 2 seconds. Churn-wise, devices stay connected for a minimum time of t min = 0.5s, we randomly pick the average uptime rate υ between 70% and 100%. It is unrealistic to imagine all of a user's devices connected at least 70% of the time, but the churn rate is at the same time very fast, enough to assess the protocol's resiliency to disconnected devices.

Unless otherwise noted, the following results stem from this aggregate of experiments sets, using the parameters described.

C. Evaluation of STORYTELLER

To provide a global overview of the user's past behavior to predict the future, we leverage on a previous contribution named STORYTELLER, which is based on a probabilistic dissemination protocol [START_REF] Luxey | Sprinkler: A probabilistic dissemination protocol to provide fluid user interaction in multi-device ecosystems[END_REF]. However, STORYTELLER was initially designed in a perfect world, i.e without any churns. Hence, we are re-evaluating performances of STORYTELLER and its impact on CASCADE according to our previously introduced churn model.

STORYTELLER principles: devices report their local sequence of the user's actions every time it is updated by STORYTELLER. At time t, a device d knows its local sequence S t,d , whereas the user performed a sequence S t of actions, a superset of S t,d . The goal of STORYTELLER is to successfully propagate the real sequence S t of the user's interactions to the devices.

Thus, to assess the protocol's efficiency, we compare, for each device d and each time t, the size of S t,d against that of S t . By computing 10 experiments sets in two situations (with and without churn), we obtain the results presented in Table I. The number of collected local sequences is written in column "# sequences". Since most local sequences are complete, we show the number of incomplete in column "# incomplete". Among these incomplete sequences, the median difference |S t | -|S t,d | is shown in column "median diff.". We finally show the maximal difference in the last column "max. diff."

Using the outputs from the experiments described in Section III-B, we computed the results found in Table I. The amount of recorded sequences is 30% bigger without churning: devices being always online, they share information more often. The amount of incomplete sessions is way higher with the churn, and incomplete sessions have up to 7 interactions missing, against only one in the other case. Not surprisingly, churning impairs STORYTELLER's efficiency. The median number of missing interactions (among incomplete sequences) is the same in both situations, though, showing a controlled shift between the ground-truth and the local sequences in both situations.

The local sequences are used for the prediction of CAS-CADE: a small sequence error can impair the session handoff more heavily. We show in the next Section that our predictive scheme remains efficient despite these incoherences.

D. Evaluation of CASCADE

To evaluate CASCADE, our primary metric is the success rate of the session handoff. To have an accurate overview of the quality of this metric, we need to get 3 different underlying indicators. First, we must count the amount of successful proactive handoffs (when the previous session is lying on the user's next device before she opens it). Second, we must also count the successful amount of reactive handoffs (when the previous session is downloaded from remote peers at the time the user opens her next device). Thirdly, we must get the number of miss, i.e. how often the next device completely failed to retrieve the user's session.

It appears clearly that one of our objectives is to achieve the highest rate of proactive handoffs as possible: this is our protocol's purpose. However, successfully falling back to reactive handoff is not so bad: it still provides the same functionality as a centralized session handoff solution but in a distributed manner. However, a distributed alternative to cloud-based services must first and foremost be dependable to convince its userbase. Hence, our most prevalent objective is to reach as close as possible 0% of misses.

As an additional metric, we also measure, during each interaction, the number of session exchanges that were completed. This provides a metric of CASCADE's cost: the lower the better. Without churn, the ideal proactive session handoff algorithm would only share the session once: from the currently used to the next one. Unfortunately, in real life, though, we do not know the future.

Devices will thus have to share their session with some peers to have a reasonable probability to reach the correct device. Moreover, because devices can disconnect at unpredictable times, it is better to send several copies of the current session as backups.

In Figure 6, we show two plots for each case: (a) without and (b) with churn. In each sub-figure, the leftmost plot shows a bar per user behavioral model described in Section III-A1, plus an additional bar combining the results from all user models (denoted "all"), that read CASCADE's success rate. The darkest portion represents the rate of successful proactive session handoffs, while the lightest part shows the rate of reactive handoffs. The remaining unfilled area thus represents the rate of missed handoffs. The rightmost plot shows a box and whiskers plot per user model, plus an additional one combining all user models (similarly coined "all"), reading the distribution of the number of completed session exchanges per interaction. The central darker line represents the median, the box read the lower and upper quartiles, and the whiskers represent 3/2 of the interquartile range (they are Tukey plots [START_REF] Frigge | Some implementations of the boxplot[END_REF]).

1) A world without churn: When devices are always on, the peers selection function presented in Section II-B can show its full potential: the session exchange decision is always made according to the sequence of the user's behavior (cf Section III-A1), and is not impeded by the remote devices' state. These results are shown in Figure 6 (a).

We will first take interest in the success rate bar plots. We foremost see that each bar reaches 100%: the session handoff never misses. We will thus focus on the proactive success rate, that does depend on the user's behavior.

As planned, the worst case scenario is the 1. uniform model, with only 20% success rate. Two reasons explain this bad result: (i) the user's behavior is unpredictable, (ii) the peers selection is as good as random implying a wide spread of the session. The best situation arises with model 2. cyclic that reaches 100% success rate. It comes from the fact that: the user's behavior is deterministic, such that the currently used device always knows to which (unique) device it should send the current session.

The next best scores, lying around 95%, are reached with the models 3.1 sequence l = 24, 4.2 zipf s ∈ [2.5, 5] and 5.2 sparse s = 4. These three models are the ones with the most irregular probabilities: a couple of devices always have a bigger probability of being chosen than the others. We conclude that the peers selection function works best when the user has a very predictable behavior.

The last three models, that score from 70 to 75%, propose different user behaviors: in 4.1 zipf s ∈ [1, 2.5], one device always has more than one chance out of three of being chosen; in 3.2 sequence l = 120 and 5.1 sparse s = 1, several devices have similar odds of being chosen, while the rest have zero or close. We see that fairly unpredictable behaviors still provide efficient proactive handoff: devices reactively download the session in less than one third of the cases.

Globally, the proactive handoff succeeds four out of five times when devices are always up.

Turning our attention to the session exchanges box plots, we see that the spread of the session handoff is minimal when the user's behavior is the most predictable. Note that zero session exchanges most certainly that a device anticipated that it would be its own successor. Indeed, CASCADE selects peers proportionally to their probability of being used next: when a device's probability (its score) dominates the others, it will always receive the session. It is when the algorithm cannot choose between devices that it will pick the peers more randomly, thus increasing the total number of session exchanges.

We observe that, for the sparsest models (2., 3.1, 4.2 and 5.2), the number of session exchanges is always inferior or equal to f = 4, the fanout of the peers selection. This means that the number of devices having a non-zero probability of being used next is never higher than f in these cases. However, in the model having the second densest transition matrix, i.e. 3.2, the median reaches f = 4. The 1. uniform model does not have a bigger median (even though it exchanges the session more than 6 times in 25% of the situations).

We understand that the minimum number of session exchanges will asymptotically reach f as the score array gets denser: if our selection function can find f devices having a non-null probability of being chosen, it will send the session to f devices, whatever their scores. And the score array is bound to get denser with time, as the user makes more and more unprecedented device choices. A remedy would be to allow the algorithm to forget: by keeping only the last interactions in the sequence, the score array would forget rare devices switches with time.

The maximum number of session exchanges, on its part, does depend on the probabilities of the devices usage. When a few devices dominate the probability of being used, every device wants to share the new session with them, thus keeping the session exchanges directed at these few.

2) A world with churn: Now that we have thoroughly studied CASCADE's behavior in an ideal (yet power-wasting) situation where our user never turn off her devices, we can see how its performances hold when she does. These results are displayed in Figure 6 (b).

Again, we will start by commenting the success rate plot. We firstly observe that the handoff still succeeds in 98.9% of the cases overall. The complete miss most often arise when the devices that were informed of the previous session (i) are not chosen next and (ii) are disconnected when the user picks the next device: this could happen with any user model.

Apart from these few misses, this plot is very close to one without churn, except that the proactive success rate dropped from 80.0% to 63.3%. The reason is simply that the peers selection now can fail at finding online nodes having a nonzero probability of being picked next, in which case it falls back on choosing random online peers to share the session with. We also see that, if the rank of each user model has remained the same, the approaches that used to be the most successful have suffered a heavier drop in their proactive success rate (2. cyclic has lost 23%, while 1. uniform has not changed a bit). Now detailing the rightmost plot, we observe a global increase of the amount of sessions exchanged. Overall, the median number of session exchanges has risen from two to three, and shows a much higher dispersion. This remark holds true to most user behavior models, apart from the 3.2 (which median session exchanges when down from 4 to 3): the one with the denser transition matrix. This state of fact fits with our previous assumptions: given that model 3.2 sends close to f = 4 sessions per interactions, it is less sensitive to churn. Among these numerous peers, the selection function has more odds of finding one online peer than with other sparser models. As a consequence, it more rarely resolves to random selection (as opposed to e.g. 4.2, that went from a median session exchanges of one with very little dispersion to a median of two, with four or more session exchanges in 25% of the cases).

Wee see that the determinism of the user's behavior in some models, that yielded close to perfect proactive results without churn, impedes the results drastically in presence of churn.

If we were to deploy CASCADE in a real-world system, we could expect proactive results and network costs lying between the uniform worst-case scenario (40% successful proactive handoffs for a median of 4 session exchanges per interaction) and a fairly unpredictable model like 3.2 (whose success rate is 60%, with a median of 3 session exchanges per interactions). More importantly, whatever the user's behavior, we believe that CASCADE would remain as dependable as it proved to be in the above experiments.

IV. RELATED WORK

The problem of providing seamless, cross-device migration capability for interactive applications, including those based on the Web, has received considerable attention from both the research community and the industry. This is due, at least partly, because such feature is an important ingredient to achieve ubiquity and to provide a more fluid user experience across the different devices through which applications can be accessed.

Oh et al. [START_REF] Oh | Migration of web applications with seamless execution[END_REF] present a framework for Web application migration that allows saving the session state of an application in a source device and restoring it on a Web browser running on a target device. The application then has its operation resumed from the point it was stopped in the source device.

Bellucci et al. [START_REF] Bellucci | Engineering javascript state persistence of web applications migrating across multiple devices[END_REF] describe a server-based approach for persisting and restoring the state of Web applications, allowing seamless migration across heterogeneous devices. The mechanism is based on a proxy that intercepts HTTP requests and instruments received Web pages with code to call a migration server whenever session migration is necessary. Control of session migration is performed by the user via a control panel, from which the user can trigger the migration of a session. The control panel at each device also interacts with the migration server to keep a list of devices currently available as targets for migration. Similarly to our work, their approach does not require the original Web applications to be modified in order to enable their migration. However, their approach differs from ours as application state transfer is always performed through a dedicated server -in our approach, application state is propagated directly among devices, resulting in no single point of failure. Moreover, migration control is autonomic in our approach, whereas in Bellucci et al. every migration event requires explicit user intervention.

The Imagen system, proposed by Lo et al. [START_REF] Lo | Imagen: Runtime migration of browser sessions for javascript web applications[END_REF], uses a similar mechanism of source code instrumentation to inject code to control migration. This can be performed in two ways: by requiring application developers to use a code transformation tool, or by requiring users to install an HTTP proxy that intercepts Web pages and instruments their code. Either way, the result is the addition of a GUI button at the end of the page, which the user can push to trigger the execution of injected code to perform state saving. Saved state is stored persistently and a URL is provided, which can be used to retrieve and load the application on the target device. Although the approach, in principle, enables migration of any Web application, the user has to manually determine both the timing and the target device of migration.

Mikkonen et. al [START_REF] Mikkonen | Towards Liquid Web Applications[END_REF] coin the term liquid Web applications to refer to applications that "can seamlessly and dynamically migrate from one device to another, following the user attention and usage context". The approach is based on the more general concept of liquid software [START_REF] Gallidabino | On the architecture of liquid software: Technology alternatives and design space[END_REF], which refers to software (not only end-user applications) that exists independently of the device where it is currently running, being able to work across devices, both simultaneously and at different times, without disruption of its operation. Similarly to our work, liquid Web applications explicitly distinguish between the application data maintained at the server side (e.g., on a SaaS cloud infrastructure) and the application state maintained at client side (in the browser). The latter, despite being transient in nature, is crucial to achieving seamless user experience when migrating application sessions. In fact, while application data mobility is well-supported by current SaaS systems, transient application state is lost if a proper session handoff mechanism is not in place.

It is also worth mentioning a number of industry initiatives on the way to provide seamless end-user experience with applications that work across devices. Apple Handoff 2 , first introduced in iOS8 and macOS Yosemite, enables application interaction to automatically switch from one device to another across a local network link. It works with a number of native Apple applications and an SDK is provided for thirdparty developers to include the feature in their applications. Nevertheless, the feature is limited to the Apple ecosystem.

Similarly, examples that resemble application session migration can be found in the Google SaaS ecosystem. In Google Docs, for instance, a user may start editing a document on a device and later switch to another device and still have access to the same document contents and editing capabilities. Nevertheless, such a process requires a lot of user interaction (explicitly starting the Web application, selecting the same document, and moving to the right point in the document to resume editing it). The approach proposed in this paper can be seen as complementary to current SaaS Web applications, as it makes the process of moving the transient application state smooth and effortless, at the same time that it leverages on cloud to make application data content directly available for the target device.

V. CONCLUSION AND FUTURE WORK

In this paper, we have presented CASCADE, a novel approach to provide a continuous interactive experience to users navigating between multiple personal devices, a problem known as session handoff. CASCADE avoids any remote service dependency and keeps a user's personal data on her own devices. As such, CASCADE is inherently private: no personal information is leaked to any third party. CASCADE revisits some of the ideas of the P2P BitTorrent file sharing protocol 2 https://developer.apple.com/handoff/ while adapting them to the context of personal mobile devices to implement a proactive session handoff protocol.

We have shown through an in-depth evaluation that CAS-CADE is dependable and communication efficient, and is able to proactively deliver session information to the correct device with a success rate of over 60% in realistic user models. Combining this result with its reactive fallback, CASCADE successfully transmits user sessions in 98.9% of the studied cases.

In the future, we envisage to perform user studies and gain more insights into the benefits of our strategy. We would also like to experiment with other peer selection strategies, for instance taking into account additional information such as the time of day of the user's location. Finally, leveraging local connectivity could open new areas of application.

Fig. 3 .

 3 Fig. 3. Illustration of a roulette-wheel selection.

Fig. 4 .

 4 Fig. 4. Heatmaps of the transition matrix P M of each proposed model, with N = 12 devices. For each model, the i th row of the heatmap represents the vector of transition from d i : P M (d i , * ). Model 1. uniform has a constant probability of 1/12.

  transition vector P M (d, * ) is deterministic; 3) sequence: This model is computed from a random model sequence S M containing l interactions. S M is populated by devices randomly selected with an uneven probability P devices ∈ [0, 1] N . P devices favors the use of certain devices (e.g. Alice uses her smart-phone more often than her mother's laptop). We create the transition matrix P M by building a Markov transition matrix out of the sequence of observed states S M . The longer the input sequence S M , the denser the transition matrix. Thus, we generate two sequence models: 3.1, with l = 2 * N , and 3.2, with l = 10 * N ; 4) zipf: Many processes in real life follow a Zipf law [33]: word occurrences, citations of scientific articles, wealth per inhabitant... Zipf's discrete law of probability z(k; n, s) is defined by a constant population size n ∈ N, a rank k ∈ N + , and a constant exponent s ∈ [1, +∞[. It states that: z(k; n, s) = z(1; n, s) * k -s , i.e. the probability of occurrence of the k th most frequent element z(k; n, s) equals the probability of occurrence of the most frequent element z(1; n, s) times k -s . The bigger the exponent s, the faster the function approaches zero, and the more z(1; n, s) dominates the other probabilities.

  churn Models: 1. uniform; 2. cyclic; 3.1 sequence l = 24; 3.2 sequence l = 120; 4.1 zipf s ∈ [1, 2.5]; 4.2 zipf s ∈ [2.5, 5]; 5.1 sparse s = 1; 5.2 sparse s = 4.

Fig. 6 .

 6 Fig. 6. Success rate of the session and amount of exchanged sessions per interaction. (a) shows the results for the experiments sets without churn, while (b) shows the results in presence of churn.

This research was partially funded by the O'Browser ANR grant (ANR-16-CE25-0005-03).


Ranjan Jha

Damien Chablat

Luc Baron

Influence of Design Parameters on the Singularities and Workspace of a 3-RPS Parallel Robot

Keywords: Parallel Robot, Singularities, 3-RPS, Workspace, Kinematics, Parasitic motions Résumé Robot parallèle, Singularité, 3-RPS, Espace de travail, Cinématique, Mouvements parasites

This paper presents the variations in the workspace, singularities and joint space with respect to the design parameter k, which is the ratio between the dimensions of the mobile platform to the dimensions of the base of the 3-RPS parallel manipulator. Also, the influence on the parasitic motions due to the design parameters is studied, which plays an important role in the selection of the manipulator for the desired task. The cylindrical algebraic decomposition method and Gröbner based computations are used to model the workspace and joint space with the parallel singularities in 2R1T and 3T projection spaces, where the orientation of the mobile platform is represented by using quaternions. These computations are useful to select the optimum value for the design parameter k such that the parasitic motions can be limited to specific values. Depending on the design parameter k, three different designs of the 3-RPS parallel robot are analyzed.

Cet article présente les variations de l'espace de travail, les singularités et de l'espace articulaire en fonction d'un paramètre de conception k qui est le ratio entre les dimensions de la plate-forme mobile et les dimensions de la base du manipulateur parallèle 3-RPS. On étudie également l'influence de ce paramà ĺtre de conception sur les mouvements parasites, qui joue un rôle important dans la sélection du robot pour une tâche souhaitée. La méthode de décomposition algébrique cylindrique et les bases de Gröbner sont utilisés pour modéliser l'espace de travail et l'espace

Introduction

The study of workspace, joint space and singularities together assists the engineers and researchers in the efficient task planning and the selection of the particular configuration of the manipulator for a desired task. The accurate computation of the workspace and joint space for 3-RPS parallel robotic manipulator is a highly addressed research work across the world. It is well a known feature that this robot admits two operation modes. As there exists parasitic motions for 3-RPS parallel robot, a complete workspace analysis of this mechanism is possible, only when the analysis is done in both 2R1T (two rotational [2R] and one translational [1T]) and 3T (three translational) projection spaces for both the operation modes.

For the parallel robots with several inverse and direct kinematic solutions, the aspects are defined as the maximal singularity-free sets in the workspace or the crossproduct of the joint space by the workspace. An assembly mode is associated with a solution for the Direct Kinematic Problem (DKP) and a working mode for the Inverse Kinematic Problem (IKP). The notion of aspect, previously defined in [START_REF] Borrel | A study of multiple manipulator inverse kinematic solutions with applications to trajectory planning and workspace determination[END_REF] for serial robots and in [START_REF] Wenger | Definition sets for the direct kinematics of parallel manipulators[END_REF] for parallel robot with one operation mode, and in [START_REF] Chablat | Workspace and joint space analysis of the 3-rps parallel robot[END_REF][START_REF] Chablat | Nonsingular assembly mode changing trajectories in the workspace for the 3-rps parallel robot[END_REF] extended for a parallel robot with several operation modes. There are different techniques based on geometric [START_REF] Gosselin | Determination of the workspace of 6-dof parallel manipulators[END_REF][START_REF] Merlet | Geometrical determination of the workspace of a constrained parallel manipulator[END_REF], discretization [START_REF] Castelli | A fairly general algorithm to evaluate workspace characteristics of serial and parallel manipulators#[END_REF][START_REF] Ilian | A new approach to orientation workspace analysis of 6-dof parallel manipulators[END_REF][START_REF] Chablat | An interval analysis based study for the design and the comparison of three-degrees-of-freedom parallel kinematic machines[END_REF], and algebraic methods [START_REF] Zein | An exhaustive study of the workspace topologies of all 3r orthogonal manipulators with geometric simplifications[END_REF][START_REF] Ottaviano | Identification of the workspace boundary of a general 3-r manipulator[END_REF][START_REF] Chablat | Nonsingular assembly mode changing trajectories in the workspace for the 3-rps parallel robot[END_REF][START_REF] Chablat | Uniqueness domains and non singular assembly mode changing trajectories[END_REF][START_REF] Jha | Workspace and singularity analysis of a delta like family robot[END_REF] which can be used to compute the workspace of parallel robot. Practically, a change of assembly mode may occur during the execution of a trajectory between two configurations in the workspace for the 3-RPS parallel robot with similar base and mobile platforms which is shown in [START_REF] Chablat | Nonsingular assembly mode changing trajectories in the workspace for the 3-rps parallel robot[END_REF][START_REF] Jha | Contributions to the Performance Analysis of Parallel Robots[END_REF]. This paper presents the results which are obtained by applying algebraic methods for the workspace, singularities and joint space analysis of the reconfigurable 3-RPS parallel robot with changeable size ratio of moving and base platform. The cylindrical algebraic decomposition (CAD) algorithm is used to study the workspace and joint space, and a Gröbner based elimination method is used to compute the parallel singularities. The outline of this paper is as follows. Section 2 describes the architecture and kinematic equations of the manipulator. Section 3 discusses the influence of design parameter on parallel singularities. Section 4 and 5 presents the workspace and joint space analysis of the manipulator. Section 6 finally concludes the paper.

Mechanism Under Study

The robot under study is the 3-RPS parallel robot with three degrees of freedom and has been studied recently by many researchers [START_REF] Husty | Non-singular assembly mode change of 3-rps manipulators[END_REF][START_REF] Sabbavarapu | Design for optimal performance of 3-rps parallel manipulator using evolutionary algorithms[END_REF][START_REF] Schadlbauer | The 3-rps parallel manipulator from an algebraic viewpoint[END_REF][START_REF] Lian | Passive and active gravity compensation of horizontally-mounted 3-rps parallel kinematic machine[END_REF]. It is the assembly of two equilateral triangles (the base and the moving platform) by three identical RPS legs where R is a revolute passive joint, P an actuated prismatic joint and S a passive spherical joint. Thus, the revolute joint is connected to the fixed base and the spherical joint to the mobile platform.

Considering the 3-RPS parallel manipulator, as shown in Fig. 1, the fixed base consists of an equilateral triangle with vertices A 1 , A 2 and A 3 , and circumradius g. The moving platform is another equilateral triangle with vertices B 1 , B 2 and B 3 and varying circumradius h, and circumcenter P . The two design parameters g and h are positive numbers. Connecting each of the vertices' pairs A i , B i (i = 1, 2, 3) by a limb, a revolute joint lies at A i and a spherical joint lies at B i . ρ i denotes the length of each limb and the motion control is done through an actuated prismatic joint. Thus, there are five parameters, namely g, h, ρ 1 , ρ 2 and ρ 3 . The g and h parameters (h/g = k) determine the design of the manipulator (shown in fig. 2) whereas the joint parameters ρ 1 , ρ 2 and ρ 3 determine the motion of the robot. Spatial rotations in three dimensions can be parametrized using Euler angles [START_REF] Gallardo | Acceleration analysis of 3-rps parallel manipulators by means of screw theory[END_REF], unit quaternions [START_REF] Zhou | The kinematics algorithm of 3rps mechanism with compound sphere joint[END_REF] or dual quaternions [START_REF] Husty | Non-singular assembly mode change of 3-rps manipulators[END_REF]. The quaternion representation is used for modeling the orientation as quaternions do not suffer from singularities as Euler angles do. Moreover, to transform the trigonometric equations to algebraic equations, we may either introduce the singularity of the transformation t = tan(α/2) or replace the angle α by two parameters cos α and sin α with cos 2 α + sin 2 α -1. In addition, it is easier to represent workspace sections with the quaternions than the dual quaternions because the position is simply defined the Cartesian coordinates.

A quaternion q is defined by

q = q 1 + q 2 i + q 3 j + q 4 k (1)
The quaternion rotation matrix is then

Q =   2q 1 2 + 2q 2 2 -1 -2q 1 q 4 + 2q 2 q 3 2q 1 q 3 + 2q 2 q 4 2q 1 q 4 + 2q 2 q 3 2q 1 2 + 2q 3 2 -1 -2q 1 q 2 + 2q 3 q 4 -2q 1 q 3 + 2q 2 q 4 2q 1 q 2 + 2q 3 q 4 2q 1 2 + 2q 4 2 -1   (2)
with q 2 1 + q 2 2 + q 2 3 + q 2 4 = 1. The transformation from the moving frame to the fixed frame can be described by a position vector OP and a 3 × 3 rotation matrix R. Let u, v and w be the three unit vectors defined along the axes of the moving frame, then the rotation matrix can be expressed in terms of the coordinates of u, v and w as :

R =   u x v x w x u y v y w y u z v z w z   (3)
The vertices of the base triangle and mobile platform triangle are

A 1 =   g 0 0   A 2 =   -g/2 g √ 3/2 0   A 3 =   -g/2 -g √ 3/2 0   (4) b 1 =   h 0 0   b 2 =   -h/2 h √ 3/2 0   b 3 =   -h/2 -h √ 3/2 0   (5)
The coordinates of b i with respect to fixed frame reference are obtained by B i = P + Rb i for i = 1, 2, 3. Also the coordinates of the center of the mobile platform in the fixed reference is P = [x y z] T . The distance constraints yields :

||A i -B i || = ρ i for i = 1, 2, 3 (6)
As A i are revolute joints, the motion of the B i are constrained in planes. This leads to the three constraint equations :

u y h + y = 0 (7) y -u y h/2 + √ 3v y h/2 + √ 3x - √ 3u x h/2 + 3v x h/2 = 0 (8) y -u y h/2 - √ 3v y h/2 - √ 3x + √ 3u x h/2 + 3v x h/2 = 0 (9)
Solving with respect to x and y we get :

y = -hu y (10) x = h √ 3u x - √ 3v y -3u y + 3v x √ 3/6 (11)
In Eqs. [START_REF] Chablat | Workspace and joint space analysis of the 3-rps parallel robot[END_REF][START_REF] Chablat | Uniqueness domains and non singular assembly mode changing trajectories[END_REF][START_REF] Chablat | An interval analysis based study for the design and the comparison of three-degrees-of-freedom parallel kinematic machines[END_REF], we substitute x, y using Eqs. ( 10) and ( 11), and u, v, w by quaternion expressions using Eq. ( 2). Then Eqs. ( 8) and ( 9) become q 1 q 4 = 0. Thus, we have either q 1 = 0 or q 4 = 0. This property is associated with the notion of operation mode. Let OM 1 be the operation mode for q 1 = 0 and OM 2 for q 4 = 0. More information can be found in [START_REF] Chablat | Nonsingular assembly mode changing trajectories in the workspace for the 3-rps parallel robot[END_REF] for the definition of the Operation Modes. Figure 3 represents the two assembly modes plot for ρ 1 = ρ 2 =ρ 3 = 2, which corresponds to the operation modes OM 1 and OM 2 .

To obtain the algebraic equations, we replace √ 3 by the variable s 3 and add the equation s 2 3 -3 = 0 and the constraint s 3 > 0.

Influence of Design Parameter on Parallel Singularities

Differentiating the constraints equations with respect to time leads to the velocity model :

At + B q = 0 (12)
where A and B are the parallel and serial Jacobian matrices, respectively, t is the velocity of P and q the joint velocities. The parallel singularities occur whenever det(A) = 0. As there exist parasitic motions for 3RPS parallel robot, it is possible to analyze the singularities in two different projection spaces, [p z q 2 q 3 ] and [p x p y p z ]. The singularities of the robot in the projection space [z q 2 q 3 ] are presented in [START_REF] Chablat | Nonsingular assembly mode changing trajectories in the workspace for the 3-rps parallel robot[END_REF][START_REF] Chablat | Workspace and joint space analysis of the 3-rps parallel robot[END_REF]. Figures 4 and5 represent the projection of parallel singularities in projection space [p x p y p z ] for OM 1 and OM 2 , respectively. The variations in the parallel singularities surface for different design parameter k are shown in Figures 4 and5. Also the top view of these singularity surfaces is presented to analyze the change in the singularities surface boundaries with the change in the value of k. As the value of k increases the connectivity in the workspace region decreases, can be seen in Figures 4(e-h) and 5(e-h).

Workspace Analysis of the 3-RPS Parallel Robot

The 3-RPS parallel robot is three degrees of freedom parallel robot with two rotational [2R] and one translational [1T] motions, but still there exist two other translational motions in the x and y direction. These motions are termed as parasitic motions as they depend on other existing rotational motions. A complete workspace analysis of this mechanism is possible, only when the analysis is done in both 2R1T [p z q 2 q 3 ] and 3T [p x p y p z ] projection spaces for OM 1 and OM 2 .

The workspace (resp. Joint space) analysis classifies the number of solutions of the parametric system associated with the Inverse (resp. Direct) Kinematic Problem (IKP). This method was introduced for parallel robots in [START_REF] Chablat | Uniqueness domains and non singular assembly mode changing trajectories[END_REF]. The three main steps involved in the analysis are (i) Computation of a subset of the joint space (resp. workspace) where the number of solutions changes : the Discriminant Variety [START_REF] Chablat | Uniqueness domains and non singular assembly mode changing trajectories[END_REF], (ii) Description of the complementary of the discriminant variety in connected cells : the Generic Cylindrical Algebraic Decomposition. and (iii) Connecting the cells belonging to the same connected component in the counterpart of the discriminant variety : interval comparisons. Discriminant varieties can be computed using basic and well known tools from computer algebra such as Gröbner bases [START_REF] David A Cox | Using algebraic geometry[END_REF] and a full package computing such objects in a general framework is available in Maple software through the RootFinding[Parametric] package. The CAD implemented in the SIROPA library has been used to compute the aspects into a set of cells where algebraic equations define its boundaries and a sample point in each one [START_REF] Chablat | Uniqueness domains and non singular assembly mode changing trajectories[END_REF] for the 2PRR-RPR parallel robot. For example, the CAD can provide a formal decomposition of the joint space in cells where the polynomials (A) and det(B) have a constant sign and the number of solutions for the DKP is constant [START_REF]Quantifier elimination for real closed fields by cylindrical algebraic decompostion[END_REF].

The workspace of the robot is a cylinder in the projection space [z q 2 q 3 ] if there are no joint limits on the actuated joints, a is presented in [START_REF] Chablat | Workspace and joint space analysis of the 3-rps parallel robot[END_REF]. The workspace analysis can be done by dividing it into a set of aspects. In other words, an aspect is the largest connected region without any singularity of the corresponding operation mode. As there are several solutions for the DKP in the same aspect, non-singular assembly mode trajectories are possible, which is shown in [START_REF] Husty | Non-singular assembly mode change of 3-rps manipulators[END_REF][START_REF] Chablat | Nonsingular assembly mode changing trajectories in the workspace for the 3-rps parallel robot[END_REF] for 3RPS parallel robot. The variation in the workspace boundaries due to the design parameter k for both the operation modes is shown in Fig. 6. Blue and red regions corresponds to the four solutions for the IKP for det(A) > 0 and det(A) < 0, respectively. These analysis can be useful for the researchers or engineers to select the optimum value for the design parameter such that the parasitic motions can be limited to specific values. From Fig. 6, it can be depicted that as the value of k increases, singularity becomes more complex and there exists a larger area (aspects) without singularities for larger values of k.

Joint space Analysis of the 3-RPS Parallel Robot

The joint space analysis allows the characterization of the regions where the number of real solutions for the direct kinematic model is constant. Using CAD, we can do this study on sections of the joint space. The calculation for the full joint space is possible, but the number of cells obtained is too large for the display capabilities of Maple. Without taking into account the notion of operation mode, Figure 7 depicts the regions with 4, 8, 12 or 16 solutions for the DKP. The maximum number for the DKP for each operation mode is 8.

Cuspidal configurations are associated with second-order degeneracies that appear for triply coalesced configurations. These configurations play an important role in the path planning because they are directly linked to the non-singular assembly mode changing trajectories [START_REF] Mcaree | An explanation of never-special assembly changing motions for 3-3 parallel manipulators[END_REF][START_REF] Zein | Non-singular assemblymode changing motions for 3-rpr parallel manipulators[END_REF][START_REF] Macho | Transitions between multiple solutions of the direct kinematic problem[END_REF][START_REF] Caro | Non-singular assembly mode changing trajectories of a 6-dof parallel robot[END_REF]. A state of the art for the computation of the cusp points is given in [START_REF] Moroz | On the determination of cusp points of 3-rpr parallel manipulators[END_REF]. The variation in the joint space boundaries due to the design parameter k is shown in Figure 8. The slice of joint space is computed for the three different values of ρ 1 and k. For ρ 1 = 2, as the value of k increases the cusp points corresponding to the region with 16 numbers of solution for DKP disappears (in Fig. 8(d), 8(e) and 8(f)). The increase in the area of the joint space with an increase in the value of k, shows the more feasible actuation sets compared with the configuration with lesser value of k.

Conclusions

This work reports the variations in the workspace and the joint space with respect to the design parameter k of the 3-RPS parallel manipulator. The cylindrical algebraic decomposition method and Gröbner based computations are used to model the workspace and joint space with the parallel singularities in 3T and 2R1T projection spaces, where the orientation of the mobile platform is represented using quaternions. Depending on the design parameter k, three different designs of the 3-RPS parallel manipulator are analyzed. A comparative study on the workspace and joint space for different design parameter k, plays an important role in the selection of the manipulator for the specific task or for the trajectory planning. It is shown that as the value of k increases, singularity becomes more complex and there exists a larger area (aspects) without singularities for larger values of k.

Figures 2 - 2

 22 Figures

FIGURE 2 -FIGURE 3 -

 23 FIGURE 1 -3-RPS parallel robot


P Suchon

F Al Frouh

Mona Ibrahim

G Sarlon

G Venton

Marie-Christine C Alessi

PE D.-A A Trégouët

Pierre-Emmanuel Morange

Genetic risk factors for venous thrombosis in women using combined oral contraceptives: update of the PILGRIM study

de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

In women, the overall incidence of venous thrombosis (VT) is about 1.2 per 1000 personyears 1; this incidence being lower in women of reproductive age, with an estimate ranging between 0.4 and 0.6 per 1000 person-years 1. The use of combined oral contraceptive (COC) is a major established risk factor for VT in women of reproductive age. The relative risk for COC use is about 3-6. It is well known that this risk depends on two major factors: the progestogen and the ethinyl estradiol dosage 2. It is estimated that more than 100 million women worldwide are using COC, making the impact of COC use on VT risk and public health of major importance 3. In France, 20 young women die annually of pulmonary embolism (PE) as a consequence of COC use 4. Furthermore, young and middle-aged women with a personal history of VT have a 2.3-fold increased risk of mortality 5. Besides, among survivors, 25-50% will have lasting debilitating health problems such as post-thrombotic syndrome, severely hampering mobility and quality of life 6. Chronic thromboembolic pulmonary hypertension occurs in about 3% PE patients 7.

Oral contraceptives and inherited thrombophilic defects (i.e. factor V Leiden and prothrombin mutations, deficiencies of protein C, protein S or antithrombin) are known to interact synergistically to increase the risk of VT 8. Very recently, we have found that the ABO blood group, an increasingly recognized risk factor for VT in the general population, was also associated with the risk of VT in COC users. In the PILGRIM (Pill Genetic Risk Monitoring) study, we observed that, under COC use, women of non-O blood group displayed a 1.85-fold increased risk of VT compared with O blood group carriers 9.

Last year, the International VENous Thrombosis (INVENT) consortium presented the results of the first international meta-analysis of genome-wide association studies for VT in the general population 10. This project led to the identification of two unsuspected susceptibility loci for VT (TSPAN15 and SLC44A2) and confirmed the strong associations with VT of several previously reported genes (F5,F2,FGG,F11 and PROCR). The aim of this study was to assess the impact of the lead common single nucleotide polymorphisms (SNPs) of these VT-associated genes on VT risk in COC users.

Materials and methods

PILGRIM is a case-control study including child-bearing age women referred to a single center [Exploration Centre of hemorrhagic and thrombotic diseases (CEHT) of the Marseille University Hospital] between 1 January 2003 and 31 December 2013. Cases were all consecutive women who had a first objectively confirmed (i.e. evidenced by imaging or when the patient had received a full-dose anticoagulant therapy for at least 3 months) episode of VT (including PE and proximal or distal deep vein thrombosis of the lower limbs) during COC use, with no history of cancer or autoimmune disease. Controls were defined as consecutive women using COC, who were referred to CEHT for thrombophilia screening as they presented a family history of thrombosis but with no personal history of the disease. Women using first generation pills were excluded. Pills were categorized according to the generation of the progestogen. The whole PILGRIM cohort comprises 968 cases and 874 controls and is extensively described by Suchon et al. 9 Stored DNA was available in 766 (79.1%) cases and 464 (53.1%) controls who participated in this study. Although there are fewer individuals in this study, their general characteristics were comparable to those of the whole PILGRIM study. These PILGRIM participants were genotyped for nine SNPs reported by the INVENT consortium to associate with VT risk, including the lead SNPs at two novel susceptibility genes, SLC44A2 rs2288904 and TSPAN15 rs78707713, and seven SNPs at known VT-associated genes that achieved strong statistical association, F5 rs4524, F2 rs3136516, KNG1 rs710446, F11 rs2289252, F11 rs2036914, FGG rs2066865 and PROCR rs867186 10. Genotyping was performed using real-time polymerase chain reaction.

For each studied SNP, deviation from Hardy-Weinberg model was tested in controls using a chi-squared test with one degree of freedom. Association with VT risk was tested by use of the Cochran-Armitage trend test. Allelic odds ratios (ORs) and 95% confidence intervals (CIs) were also computed using logistic regression analysis, adjusting for age, type and duration of COC use, and family history score (calculated by dividing the number of firstdegree relatives with a personal history of VT by the total number of first-degree relatives) 9. A statistical threshold of 6 × 10 -3 (∼0.05/9), correcting for the number of tested polymorphisms, was used to declare statistical significance for the observed SNP association with disease risk. All statistical analyses were performed using R.

We obtained the informed consent from all participants, and the study met all institutional ethics requirement. The procedures employed were reviewed and approved by the Assistance Publique des Hopitaux de Marseille institutional review committee. 1 and are comparable to the characteristics of the whole PILGRIM cohort previously reported. In particular, the four main risk factors for VT risk we previously identified in the whole PILGRIM study 9, which were smoking, body mass index (BMI) greater than 35 kg/m 2 (class II obesity and above according to the World Health Organization classification of obesity), severe inherited thrombophilia and non-O blood groups, were consistently associated with the disease in the current PILGRIM participants. The corresponding ORs for VT were 1.65 [95% CI (1.30-2.10)], 3.46 (1.81-7.03), 2.13 (1.32-3.51) and1 .98 (1.57-2.49), respectively (data not shown). • COC, combined oral contraceptives; VT, venous thrombosis.

Results

Main characteristics of the population study are shown in Table

• a Shown data are counts (%) unless otherwise indicated.

• b Second generation: levonorgestrel, norgestrel.

• c Third generation: desogestrel, gestodene, norgestimate.

• d Fourth generation: drospirenone, dienogest, nomegestrol.

• e Data available for 714 cases and 429 controls.

• f Only first-degree relatives were considered.

• g Data available for 758 cases and 450 controls.

• h At time of VT episode for cases, at time of inclusion for controls.

• i Protein C, protein S and antithrombin deficiencies, homozygous for factor V Leiden, homozygous for G20210A prothrombin mutation, or combined defects.

Genotype and allele distributions of the nine studied SNPs in cases and controls were provided in Table 2. All SNPs were in Hardy-Weinberg equilibrium. Only the F11 rs2289252

showed statistical significant association with VT risk. The rs2289252-A allele was significantly more frequent in cases than in controls (49% vs 42%) and associated with an adjusted 1.60-fold (1.33-1.94) (p < 10 -4 ) increased risk of VT. The magnitude of its effect was similar to that reported in the general population (OR = 1.35) 11. The OR for VT associated with the rs2289252-A allele was similar in smoker and non-smoker women (OR = 1.62 vs OR = 1.63; p = 0.96) and in O and non-O carrier women (OR = 1.80 vs OR = 1.50; p = 0.45). In addition, the allele frequency of the rs2289252-A allele was similar according to the presence or absence of family history of VT (p > 0.37, regardless of the definition used: the existence of a first-degree family history of VT or a family history score above 0.3) 9. As a consequence of these results, women carrying both the F11 rs2289252-A allele and non-O blood group, representing about 52% of the women population, presented a 4.00-fold (2.49-6.47) (p < 10 -4 ) increased risk compared with women of O blood group and rs2289252-GG genotype. We further stratified this analysis according to obesity, one of the main environmental risk factor for VT in COC users, to better assess the risk associated with those two common genetic risk factors for VT. Because of the small number of patients in the highest class of obesity, we merged the top two classes: 30-35 kg/m 2 and >35 kg/m 2 . Adjusted OR estimating the VT risk associated with different combinations of these three risk factors, rs2289252, ABO blood group and obesity, are presented in Table 3. Women with BMI over 30 kg/m 2 (class I obese and above) of non-O blood group that harbored the rs2289252-A allele were at 13.15-fold (5.20-38.50) (p < 10 -4 ) increased risk compared with non-obese women with O blood group and rs2289252-GG genotype, the former group representing 4.8% of the female population.

Discussion

Efforts to promote a better identification of women at high-risk of COC-related VT are invaluable, as they may lead to more adequate prescription of contraception, with less or no thrombogenic influence and, perhaps, a decrease of these preventable VT events.

In this study, we found that the F11 rs2289252 is a mild and common genetic risk factor for VT in COC users. The allelic OR associated with the polymorphism was 1.60. The risk allele was common in the population, 64% in the control group, and its impact on VT risk was independent on that of the non-O blood group, another common genetic risk factor. As a consequence, the combination of these two genetic factors that occurred together in the general population at a prevalence of ∼52% was associated with an ∼fourfold increased risk for VT.

Eight other established VT-susceptibility alleles were investigated in our study, but failed to reach statistical significance. A nominal association (p = 0.02) was observed for the rs78707713 whose rare allele tend to associate with increased risk of disease as initially reported 11. The lack of statistical significance was probably because of some power issues, as our sample size was not large enough to detect genetic effects characterized by moderate impact on VT risk. As an illustration, the power of the PILGRIM study to detect allele ORs as low as 1.4 was only 47% for a polymorphism with a minor allele frequency of 0.10 (which corresponds to the observed association at TSPAN15 rs78707713) at the statistical threshold of 6 × 10 -3 . However, we cannot exclude that the genetic associations reported in the general population 10 do not hold in specific groups of subjects such as COC users.

This study underlined the role of combination of common genetic risk factors on the risk of VT in COC users and confirmed the complexity of the disease arising from the occurrence of multiple risk factors. Family history, besides being a recognized risk factor for VT, is poorly associated with known genetic risk factors and thus cannot be considered as a surrogate for the search of these genetic factors. Thrombophilia screening is not recommended in most of the international recommendations in part because defects are rare in the general population 12. Conversely, the combination of the non-O blood group with the rs2289252-A allele is far from being rare as it accounts for 52% of COC users. Moreover, in our cohort, the magnitude of risk provided by this combination of at-risk allele is similar to that of class II obesity (BMI higher than 35 kg/m 2 ), which is a relative contraindication for COC use in some international recommendations. Very interestingly, the combination of one demographic (partly genetic and partly environmental) risk factor (obesity) and two common genetic risk factors (non-O blood groups and F11 rs2289252) represented a major risk factor for VT. All current guidelines and recommendations consider the risk associated with COC in women harboring a mild thrombophilia unacceptable. As a consequence, COC use is contraindicated in all women with mild thrombophilia. However, van Vlijmen et al. evaluated in a recent review the additional effect of inherited thrombophilia in COC users and suggested that COC could be prescribed in women with mild thrombophilia in the absence of other risk factors 8. Indeed, most women using COC and harboring mild thrombophilia would not ever undergo VT. As a consequence, environmental and genetic modifiers that may increase the risk of VT in these women need to be identified. In this goal, other common genetic risk factors, such as ABO blood group and F11 rs2289252, could be taken into account in the VT risk assessment. More generally, as VT is a complex disease, combination of risk factors could be more useful to consider for assessing the risk than to consider each risk factor individually. In this study, the OR associated with the combination of three common risk factors was found to be 13.15 (5.20-38.50), which is higher than the risk ratio (RR) associated with factor V Leiden or prothrombin mutation in COC users according to van Vlijmen et al. meta-analysis (RR = 5.89; 95% CI: 4.21-8.23) 8. Of note, only severe obesity (BMI > 35 kg/m 2 ) might be considered as a contraindication for COC use, whereas a 30 kg/m 2 cut-off showed a high level of risk in the present study. The magnitude of this effect was highly influenced by the combination based on the two common genetic risk factors, which suggests that this combination could provide useful information for the VT risk assessment in COC users exposed to environmental risk factors such as obesity. The addition of those three risk factors could result in a state of hypercoagulability. Indeed, F11 rs2289252 is associated with increased plasmatic levels of FXI, which is a key enzyme of the coagulation pathway as it activates factor IX 13. Moreover, thrombin generation is increased in patients with elevated FXI 14. Similarly non-O blood groups are associated with a 30% increased level of factor VIII, which elevation has been shown to increase thrombin generation 15. Finally, obesity is also associated with increased thrombin generation 16. Altogether elevated FXI and FVIII and obesity could increase thrombin generation and VT risk. It is currently unclear whether obesity should contraindicate COC use or not. Obese women (i.e. BMI > 30 kg/m 2 ) could be eligible for the screening of the two common genetic risk factors. Based on their prevalence in general population (non-O blood groups ≈ 50%; F11 rs2289252 ≈ 60%) the screening would identify the combination of the two alleles in 30% of obese women whom should be considered at high risk.

This study suffers from limitations which can prevent us from generalizing the results. The first one is relative to the study design which can cause bias. The control group is not derived from the general population. Indeed, controls were recruited as they had a family history of thrombosis and thus were putatively enriched in genetic risk factors. This explains why factor V Leiden was not associated with VT while it is the most robust and strongest common genetic risk factor of VT 9. However, despite this putative genetically enriched control group, the study has been able to show a 60% increased risk of VT in women using COC who harbored the risk allele for F11 rs2289252. Another limitation is that we used a subcohort of PILGRIM (i.e. patients with DNA available). We have checked for homogeneity between the total cohort and the subcohort. Main characteristics of patients were similar between the two groups as well as the impact of the major risk factors for VT. The former point allows us to consider that this subcohort is representative for the whole PILGRIM cohort. Finally, this study was monocentric and has included individuals only from Marseilles area. Results should thus be replicated in individuals from other countries in order to verify their generalizability.

This study provides evidence of the difficulty in assessing individual risk of VT, which complexity arises from the multiplicity of risk factors that need to be taken into account. In that matter different predictive scores including genetic and environmental risk factors have emerged in the recent literature as useful predictors of VT of an individual 17-19. It is mandatory to validate these scores and design new ones specific for COC users. Effectiveness of these scores should be assessed and compared with current practice in management studies.

Their cost-effectiveness in contraceptive counseling should also be evaluated before implementation in clinical practice. luated before implementation in clinical practice.

Table 1 .

 1 Main characteristics of the population studya

	VT patients (n =	Controls (n =	p
	766)	464)	value

Table 2 .

 2 Association of studied SNPs with the risk of venous thrombosis in combined oral contraceptive users a Cochran Armitage Trend test p value. • b Allelic odds ratio (95% CI) adjusted for age, type of COC, duration of COC use and family history score calculated by logistic regression analysis. • c Allele frequency of the reported risk allele.

		Controls Cases	pa	ORb	p
		AA 272 (59%) 462 (60%)	1
	rs4524 (F5)	AG 166 (36%) 265 (35%) GG 26 (5%) 39 (5%)	0.90 (0.73-1.12) 0.36
	RAFc	0.23	0.22	p = 0.528
		GG 166 (36%) 195 (25%)	1
	rs2289252 (F11)	AG 231 (46%) 387 (51%) AA 85 (18%) 184 (24%)	1.60 (1.33-1.94) <10 -4
	RAF	0.42	0.49	p = 1.84 10 -4
		GG 136 (29%) 266 (35%)	1
	rs2036914 (F11)	GA 230 (50%) 363 (47%) AA 98 (21%) 137 (18%)	1.24 (1.04-1.49) 0.02
	RAF	0.46	0.42	p = 0.037
	rs2066865 (FGG)	GG 272 (59%) 425 (56%) AG 159 (34%) 298 (39%)	1 1.10 (0.89-1.35) 0.38
		AA 33 (7%) 43 (5%)
	RAF	0.24	0.25	p = 0.648
		AA 361 (78%) 611 (80%)	1
	rs867186 (PROCR)	AG 98 (21%) 142 (18%) GG 5 (1%) 13 (2%)	0.88 (0.67-1.17) 0.38
	RAF	0.12	0.11	p = 0.612
		AA 117 (25%) 193 (25%)	1
	rs3136516 (F2)	AG 219 (47%) 392 (51%) GG 128 (28%) 181 (24%)	0.93 (0.78-1.11) 0.43
	RAF	0.51	0.49	p = 0.345
		AA 153 (33%) 215 (28%)	1
	rs710446 (KNG1)	AG 227 (49%) 393 (51%) GG 84 (18%) 158 (21%)	1.19 (0.99-1.43) 0.06
	RAF	0.43	0.46	p = 0.070
	rs2288904 (SLC44A2)	AA 18 (4%) 25 (3%) CG 160 (35%) 243 (32%)	1 1.23 (0.98-1.54) 0.08

•

Table 3 .

 3 Impact on VT risk of obesity, ABO blood group and F11 rs2289252 BMI

(kg/m 2 ) ABO blood group F11 rs2289252a Cases, n (%)

  a Genotype for F11 rs2289252. Risk allele = A. • b Adjusted OR. Adjustment factors = age, type and duration of COC use, and family history score.

	BMI (kg/m 2 )	ABO blood group	F11 rs2289252a	Cases, n (%)	Controls, n (%)	OR (95% CI)b	p
	>30	O	AG/AA	18 (2.5)	6 (1.4)	5.97 (2.08-19.39)	0.002
	<25	Non-O	AG/AA	288 (40.6) 148 (35.2)	2.99 (1.81-4.96)	<10 -4
	25-30	Non-O	AG/AA	68 (9.6)	17 (4.0)	5.58 (2.75-11.76)	<10 -4
	>30	Non-O	AG/AA	48 (6.7)	6 (1.4)	13.15 (5.20-38.50)	<10 -4
	• BMI, body mass index; CI, confidence interval; COC, combined oral contraceptives;
	NA, not applicable; OR, odds ratio; VT, venous thrombosis.
					Controls, n (%)	OR (95% CI)b	p
	<25	O	GG	39 (5.5)	46 (10.9)	1
	25-30	O	GG	4 (0.6)	6 (1.4)	0.99 (0.22-4.03)	0.98
	>30	O	GG	0	1 (0.2)	NA	NA
	<25	Non-O	GG	89 (12.6) 81 (19.2)	1.51 (0.86-2.63)	0.15
	25-30	Non-O	GG	26 (3.7)	15 (3.6)	2.39 (1.07-5.52)	0.04
	>30	Non-O	GG	24 (3.4)	5 (1.2)	6.10 (2.17-20.31)	0.01
	<25	O	AG/AA	83 (11.7) 77 (18.3)	1.46 (0.83-2.57)	0.18
	25-30	O	AG/AA	22 (3.1)	13 (3.1)	3.55 (1.49-8.71)	0.005

•

Acknowledgements

We are grateful to Gene Predictis SA (Switzerland) for genotyping of some SNPs.