# Is a composition of clocked entities a clocked entity in the UC model?

In the book titled "Secure Multiparty Computation and Secret Sharing" the authors define an interactive agent and an interactive system. Further, the author defines a clocked entity for considering both synchronous and asynchronous protocols in the UC model. A clocked entity is an interactive agent which has certain rules that define how the activation token is passed. The exact formulation of interactive agents, interactive systems and clocked entities can be found in the above mentioned book.

I have two doubts regarding the concept of clocked entities, which are described below:

1. Is the composition of clocked entities a clocked entity? The authors claim that this is trivially true and does not require a proof, however, I'm not convinced with this claim. I have constructed the following counter example for the same:

• Consider an interactive system $\mathcal{IS}$ composed of three clocked entities A, B and C. Further, consider a clocked entity D outside the system $\mathcal{IS}$. Let say the activation token enters the interactive system $\mathcal{IS}$ at port A.infl. Further A calls B, which in turn calls D. At this stage, A, B and $IS$ are in the calling state by definition. Now let say D calls C, which is currently inactive, hence C is activated now. But if $\mathcal{IS}$ was a clocked entity in the calling state, it should have bounced back the activation token when it receives activation token on any port other than D.leak. Hence $\mathcal{IS}$ does not follow the satisfy all the requirements of a clocked entity. Please let me know as to what is wrong with my construction above and how the composition lemma follows from the definition of clocked entities and interactive systems.

1. How do clocked entities help implement synchronous protocols? What does the word "clock" signify in the word "clocked entities"?

When you compose $2$ interactive systems $\mathcal{IS}_1$ and $\mathcal{IS}_2$ into $\mathcal{IS}_1 \circ \mathcal{IS}_2$, the book indicates that you're simply connecting the matching ports between them.
In your example $\mathcal{IS} \circ D$ is a clocked entity because when $B$ calls $D$ then $D$ makes a recursive call to $\mathcal{IS}$ by sending the token to $C$. Taking from the book: "When it is clocked it must eventually return the activation on the matching outport leak" not immediately.