<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Understanding Clock Constraints Coalgebraically</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Grygoriy Zholtkevych[</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Maksym L</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Department of Theoretical and Applied Computer Science School of Mathematics and Computer Science V.N. Karazin Kharkiv National University 4</institution>
          ,
          <addr-line>Svobody Sqr., Kharkiv, 61022</addr-line>
          ,
          <country country="UA">Ukraine</country>
        </aff>
      </contrib-group>
      <abstract>
        <p>The paper is devoted to the problem specifying causality relationships in distributed (including cyber-physical) systems. This problem is studied based on the coalgebraic approach used authors for studying safety constraints for distributed systems. The special class of coalgebras, counter-based detectors, is introduced and studied in the paper. It is shown that this approach allows using the technique of Diophantine equations for specifying clock constraints of the system being studied. The advantage of the approach is the possibility for defining the complexity of detectors that provides to control respond time of the detectors in the system.</p>
      </abstract>
      <kwd-group>
        <kwd>a coalgebra</kwd>
        <kwd>a detector coalgebra</kwd>
        <kwd>a counter-based detector</kwd>
        <kwd>Diophantine equation</kwd>
        <kwd>Clock Constraint Specification Language</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>This paper presents the authors’ research continuing the research presented in
[1] and applying the proposed approach and results in a more specific situation.</p>
      <p>The general context of our study is determined by the observation that
modern technical systems are, as a rule, compound and smart. Moreover, such
systems can be hybrid in the sense that ones consisted of physical, cybernetic
(software), and, maybe, social components. This character of the systems should be
taken into account under designing ones.</p>
      <p>The software components of such systems are reactive, that is, they are
designed for providing the required behaviour of the system, and not for obtaining
any computational result.</p>
      <p>Components of such systems are distributed in space but should act for
guaranteeing the required behaviour of the system in the whole. So, supporting
the necessary causality relationships during operating of system components is
one of the principal problems of designing a system of such a kind.
? The author thanks professors R. de Simone, F. Mallet, and L. Liquori for detailed
discussions of the problems related to this paper during his internship at Inria Sophia</p>
      <p>Antipolis - Médi and Campus France for funding this internship.</p>
      <p>Copyright © 2020 for this paper by its authors. Use permitted under Creative Commons License Attribution 4.0 International (CC BY 4.0).</p>
      <p>Also, we need to remark the incorrect behaviour of a system of the considering
kind can have serious and some times catastrophic consequences for the system
surroundings. Hence, systems of this class can be characterised as safety-critical
systems. Thus, all designing solutions for them should be rigorous verified.</p>
      <p>This research is some attempt to build a foundation for rigorous and effective
specification and analysis of causality relationships in systems of the considering
class.</p>
      <p>This paper applies the general framework proposed in [1] for constructing
rigorous models of logical time intended for using under developing
domainspecific languages for specifying causality constraints.</p>
      <p>The paper is structured as follows.</p>
      <p>Sec. 2 reminds basic concepts and notation.</p>
      <p>Sec. 3 contains the necessary definitions and results for understanding the
general coalgebraic framework.</p>
      <p>Sec. 4 contains a survey of used below results from [1].</p>
      <p>Sec. 5 explains how results mentioned above can be used for specification and
analysis causality constraints.</p>
      <p>Sec. 6 is the key in the article. Here, it is introduced the concept of a counter–
based detector; it is explained that this class of detectors is not complete; it is
constructed a Diophantine representation for detectors of this class.</p>
      <p>Finally, Sec. 7 presents the construction of a universal simulator based on
the Diophantine representation for counter-based detectors.
2</p>
    </sec>
    <sec id="sec-2">
      <title>Basic Concepts and Notation</title>
      <p>This section is a copy of the corresponding section of our article [1] and here it is
presented only for providing notation consistency. Thus, we assume that X is a
finite set with at least two elements. Elements of this set are usually interpreted
as system notifications.</p>
      <p>A mapping (generally speaking partial) s : N ! X is called an X-sequence
if for any k 2 N, s k0 is defined whenever s k is defined and 0 k0 &lt; k.</p>
      <p>An X-sequence s is called an X-word if there exists k 2 N such that s k is
undefined; in contrast, an X-sequence s is called a X-stream if s k is defined
for all k 2 N.</p>
      <p>We use the notation X for referring to the set of all X-words, and XN for
referring to the set of all X-streams. The set X contains the sequence defined
nowhere, which is below denoted by .</p>
      <p>We use also the notation X1 for referring to the set X S XN, and X+ for
referring to the set of all X-words without the word defined nowhere.</p>
      <p>For an X-word u, we denote by juj the minimal natural number such that
u juj is undefined.</p>
      <p>The value juj where u 2 X is called length of u.</p>
      <p>As usually, we identify n 2 X with the X-word u 2 X such that u 0 = n
and u k is undefined if k &gt; 0.
us =
k 2 N :
s(k
u k</p>
      <p>if k &lt; juj
juj) otherwise</p>
      <sec id="sec-2-1">
        <title>Below we need in the following set</title>
        <p>n 1 A = fu 2 X j nu 2 Ag
where A</p>
        <p>X and n 2 X:
For s 2 X1 and m 2 N, we denote by sm:: the next X-sequence
sm:: =
k 2 N :
s(k + m) if this value is defined
is undefined otherwise
Also for s 2 X1 and m; l 2 N, we denote by sm::l the next X-word
sm::l =
k 2 N :
s(k + m) if this value is defined and k &lt; l
is undefined otherwise
m</p>
        <p>The principal concepts for our studying is given by the following definitions</p>
        <sec id="sec-2-1-1">
          <title>Definition 1. A subset P</title>
          <p>P whenever 0 m &lt; juj.</p>
          <p>X is called prefix-free if u 2 P ensures u0::m 2=
Remark 1. If a prefix-free subset of X contains then this subset is f g. Indeed,
if a prefix-free subset of X contains both and another X-word u then u0::0 =
cannot belong to this subset. This contradiction grounds the remark.</p>
        </sec>
        <sec id="sec-2-1-2">
          <title>Definition 2 (see [2]). A safety constraint is a subset S</title>
          <p>s 2 S if for any m 2 N, s0::m = s00::m for some s0 2 S.
XN such that
3</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>Coalgebras Preliminaries</title>
      <p>In this section, we remind the basic definitions and facts related to the concept of
a coalgebra in an arbitrary category. In addition, we give some specific concepts
in the case when C = Set.</p>
      <p>Thus, we assume the category C and the endofunctor F of C are given and
held fixed in this section1.</p>
      <p>Definition 3. A morphism a of C is called an F -coalgebra if the equation
cod a = F (dom a) is fulfilled. In the case, dom a is called the carrier of a and
denoted below by a.
1 General information on category theory can be found in [3,4], proofs of some facts
formulated in the subsection can be found in [1, Sec. 3]
Definition 4. Let a and b be F -coalgebras then a morphism f : a ! b is called
an F -morphism from a into b (symbolically, f : a ! b) if the diagram
a
a
F a
f
F f
b</p>
      <p>b
F b
commutes or, equivalently, the equation (F f ) a = b f holds.</p>
      <p>Proposition 1. The class of F -coalgebras equipped with F -morphisms is a
category denoted usually by CoalgF (C) or CoalgF if the category C is clear from
the context.</p>
      <sec id="sec-3-1">
        <title>Definition 5.</title>
        <p>
          (
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) A terminal object of CoalgF if it exists is called a final F -coalgebra, which
is denoted by nF .
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) For any F -coalgebra a, the unique F -morphism from a into nF is called an
anamorphism and denoted by (a) .
4
        </p>
      </sec>
    </sec>
    <sec id="sec-4">
      <title>Safety Behavioural Constraints</title>
      <p>This section contains some servey of the results obtained in [1].</p>
      <p>In [1], three endofunctors T, SN, and DN of category Set are considered.
Here N refers to some finite set of system notifications. The definitions of these
functors are given in Table 1.
In Table 1, “ +” means disjoint union, 1 = f+g for some +, and “ ” means
Cartesian product.</p>
      <p>In the mentioned above paper, any SN-system : ! SN is interpreted
as a system with output N (see [1, Subsec. 4.2]), any DN-system a : a ! DN a
is interpreted as a detector of behavioural violations (see [1, Subsec. 4.3]), and
interrelation between systems with output and detectors is established using the
bifunctor combining a system and a detector into the system with termination
Join : Sys(SN)</p>
      <p>Sys(DN) ! Sys(T)
(see [1, Subsec. 5.1]). This bifunctor is defined as follows, let and a be a system
with output N and an N-detector respectively, one can define the system with
termination Join( ; a) : a ! T( a) by the next rules</p>
      <p>Join( ; a) =
(x; y) 2
a :</p>
      <p>+
tr x; (ay)( out x)
if (ay)( out x) = +
otherwise</p>
      <sec id="sec-4-1">
        <title>Further for systems morphism f :</title>
        <p>Join(f; g) :</p>
        <p>and with output N and N-detectors a and b, an
SN! , and a detector morphism g : a ! b, we define the mapping
a ! b by the formula
(1a)
(1b)
Join(f; g) = f</p>
        <p>g:
Above, we use the representation x = h out x; tr xi.</p>
        <p>Further in [1], it is proposed to describe the set of streams accepted by a
detector a as follows
– first of all for s 2 NN, let us define the following system [s] with output
namely
[s] =
sk:: j k 2 N
and [s] =
t 2 [s] : t 0; t1:: ;
– now for any N-detector a and x 2 a, let us define the following set</p>
        <p>JaKx = fs 2 NN j (Join([s]; a))hs; xi = 1g:
One of the main results obtained in [1, Lemmas 5 and 6] is established that any
safety constraint has the described above form.</p>
        <p>Below we use this approach for studying causality constraints in distributed
systems.
5</p>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Causality Constraints as a Kind of Safety Behavioural</title>
    </sec>
    <sec id="sec-6">
      <title>Ones</title>
      <p>Anywhere in this section, C is an arbitrary but fixed finite set of clocks and NC is
the corresponding set of clock notifications that is the set of all non-empty subset
of C. Informally, each message contains a list of clocks had ticked at the same
time as the message was sent. Thus, notifications are no longer atomic entities
or, in other words, first-class citizens. Now, clock ticks are atomic entities or,
in other words, first-class citizens, whose combinations are notifications. In this
section, we show how the results obtained in [1] should be adjusted for this more
specific situation.
5.1</p>
      <sec id="sec-6-1">
        <title>Clock and Schedules Coalgebraically</title>
        <p>The logic clock model considers clock tick notification streams as the only
information available about temporal order between events. These streams are called
schedules in the model context. Thus, the coalgebraic meaning of schedules is
related to the endofunctor SNC : Set ! Set defined like to the endofunctor SN
from [1, Subsec. 4.2] namely</p>
        <p>SNC X = NC X for any object X of category Set;</p>
        <p>SNC f = idNC f for any objects X and Y of category Set and a morphism
f : X ! Y
then a system equipped with the clock set C is an SNC-system.</p>
        <p>In other words, a system equipped with a clock set C is a mapping
: X ! SNC X that both specifies the state transition tr : X ! X and
the corresponding ensemble of clock ticks out : X ! NC of the system such
that = h out; tri is a universal arrow from X into NC X.</p>
        <p>A final SNC-system nSNC is defined on the set NCN of all schedules and has
s 2 NCN : s1:: as the transition function and s 2 NCN : s 0 as the output
function (see, [1, Subsec. 4.2]).</p>
        <p>Due to the general results mentioned in [1, Sec. 3 and Subsec. 4.2], our
capacity to formulate causality constraints for any system equipped with a clock
set C are limited by statements in schedules terms only.
5.2</p>
      </sec>
      <sec id="sec-6-2">
        <title>Detectors of Causality Constraint Violations</title>
        <p>Detectors of causality constraint violations are described with using the
endofunctor DNC : Set ! Set defined like to [1, Sec. 4.3] namely</p>
        <p>DNC X = (1 + X)NC for any object X of category Set;
DNC f = 2 (1 + X)NC : n 2 NC : f ( +n) iofthenrw=ise+</p>
        <p>for any objects X and Y of category Set and a morphism f : X ! Y .</p>
        <p>Definitions of bifunctor Join, sets of the form JaKx where a is an NC-detector,
and x 2 a are remained without changing.
6</p>
      </sec>
    </sec>
    <sec id="sec-7">
      <title>Counter-based Detectors and Their Diophantine</title>
    </sec>
    <sec id="sec-8">
      <title>Representation</title>
      <p>In this section, we consider a special class of NC-detectors2. Some detectors
of this class are used for defining semantics of Clock Constraint Specification
Language (CCSL) [5].</p>
      <p>In this section, we use the function occc : NC ! N associated with c 2 C as
follows
occc =</p>
      <p>u 2 NC :
2 In this section, C is some clock set
8
&lt;</p>
      <p>0 if u =
occc u0 if u = u0n for u0 2 NC ; n 2 NC, and c 2= n
: occc u0 + 1 if u = u0n for u0 2 NC ; n 2 NC, and c 2 n
This function counts how many times the corresponding clock ticked if the
schedule begin coincides with the function argument.
6.1</p>
      <sec id="sec-8-1">
        <title>Counter-based Detectors</title>
        <p>Let V NC NC then an NC-detector cV is called a counter-based NC-detector
if it is defined as follows
cV = NC
cV =
x 2 NC : n 2 NC :</p>
        <p>+ if hn; xi 2 V
x + n otherwise
where x + n = c 2 C : (x cx)c+ 1 oitfhcer2wnise .</p>
        <p>Our nearest aim is to establish whether the family of causality constraints
recognised by counter-based detectors is a family with a universal detector.</p>
        <p>The first step for achieving the claimed aim is given by the next theorem.
Theorem 1. Let P be a prefix-free subset of NC+ then there exists A NC NC
such that (cA) x = P for some x 2 cA if and only if P meets the following
condition
that</p>
        <p>
          u00::m 2= P and u000::k 2= P for all 0 &lt; m
occc u0 = occc u00 for each c 2 C.
for any v 2 NC+,
u0v 2 P is equivalent to u00v 2 P whenever u0; u00 2 NC+ are such
ju0j, 0 &lt; k
ju00j and
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          )
For proving the theorem, we need some auxiliary results.
        </p>
      </sec>
      <sec id="sec-8-2">
        <title>Lemma 1. For any V</title>
        <p>NC</p>
        <p>
          NC and x 2 cV, (cV) x meets condition (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ).
        </p>
        <p>Proof. Let us assume P = (cV) x for some V NC NC and x 2 cV and
take u0; u00 2 NC+ such that u00::m 2= P and u00::k 2= P for all 0 &lt; m ju0j,
0 &lt; k ju00j and occc u0 = occc u00 for each c 2 C.</p>
        <p>Then the first group of conditions ensures cV+(x; u0); cV+(x; u00) 2 cV and the
condition occc u0 = occc u00 for each c 2 C ensures cV+(x; u0) = c+(x; u00).
V
Now, for an arbitrary v 2 NC+ and 0 &lt; k jvj, we have (see [1, Lemma 1])
cV+(x; u0v0::k) = cV+(cV+(x; u0); v0::k)</p>
        <p>= cV+(cV+(x; u00); v0::k) = cV+(x; u00v0::k)
Thus, one can conclude u0v 2 P is equivalent to u00v 2 P .</p>
        <p>
          Proof (Proof of Theorem 1). Taking into account Lemma 1, we need only to
prove that for any prefix-free P NC satisfying condition (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ), there exists
V NC NC such that P = (cV) x for some x 2 cV.
        </p>
        <p>To do this let us take</p>
        <p>V = fhn; xi 2 NC</p>
        <p>NC j
vn 2 P for some v 2 NC such that x =
c 2 C : occc vg
and check that (cV) z = P where z = c 2 C : 0 i.e. that for any u 2 NC+,
u 2 (cV) z iff u 2 P .</p>
        <p>Let us assume that u 2 (cV) z.</p>
        <p>If u = n for some n 2 NC then n 2 (cV) z means (cVz) n = + i.e. n 2 P because
of c 2 C : occc v = z iff v = .</p>
        <p>
          If u 2 (cV) z and m = juj &gt; 1 then for x0 = z, we have xk+1 = (cVxk)(u k) 2
cV whenever k = 0; : : : ; m 2 and (cVxm 1)(u(m 1)) = +. In other words,
hu k; xki 2= V where k = 0; : : : ; m 2 and hu(m 1); xm 1i 2 V.
Thus, u0::k 2= P for any 0 &lt; k m 1 but there exists v 2 NC such that
vu(m 1) 2 P and c 2 C : occc v = c 2 C : occc u0::m 1. But the condition
vu(m 1) 2 P implies v0::l 2= P for any 0 &lt; l jvj due to P is a prefix free set.
Thus, condition (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) ensures u = u0::m 1(u(m 1)) 2 P .
        </p>
        <p>Now assume u 2 P and m = juj.</p>
        <p>
          Then we have u0::k 2= P for any k such that 0 &lt; k &lt; m and hu(m 1); c 2
C : occc u0::m 1i 2 V due to the definition of V. One can conclude that huk; c 2
C : occc u0::ki 2= V for any 0 k &lt; m 1. Indeed, otherwise there exists 0 k &lt;
m 1 and v 2 NC such that v(uk) 2 P and c 2 C:occc v = c 2 C:occc u0::k.
But condition (
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) ensures u0::k(uk) = u0::k+1 2 P for some 0 k &lt; m 1. Thus
cV+(z; u0::k) 2 cV for 0 &lt; k &lt; m and cV+(z; u) = +. Therefore we have u 2 (cV) z.
Corollary 1. If P = (cV) x for some V NC
for some V0 NC NC and z = c 2 C : 0.
        </p>
        <p>NC and x 2 cV then P = (cV0) z
Corollary 2. The family of clock constraints being detected by counter-based
detectors is a constraint family with a universal detector.</p>
        <p>Proof. To prove this fact, we use [1, Theorem 5]. Assume P = (cV) z for some
V NC NC.</p>
        <p>Let n 2= P , u00::m; u000::k 2= n 1 P for all 0 &lt; m ju0j and 0 &lt; k ju00j, and
occc u0 = occc u00 for any c 2 C then nu00::m 2= P and nu000::k 2= P . Theorem 1
ensures (nu0)v 2 P and (nu00)v 2 P are equivalent for any v 2 NC+ i.e.
u0v 2 n 1 P and u00v 2 n 1 P are equivalent.</p>
        <p>Theorem 1 allows us to show the impossibility of confining ourselves to counters
based detectors, as shown in the next example and the remark following after
it.</p>
        <p>Example 1. Let us take C = fc1+; c1 ; : : : ; c+m; cmg for some m &gt; 1 and define the
next NC-detector q
q = fc1; : : : ; cmg
q =
u 2 fc1; : : : ; cmg :
n 2 NC :</p>
        <p>+
8 ufckg if n = fck g</p>
        <p>+
&gt;&gt;&gt;&gt; for some k = 1; : : : ; m
&lt;</p>
        <p>u0 if u = fckgu0 and n = fck g
&gt;&gt;&gt;:&gt; otherfworisseome k = 1; : : : ; m
Also, let us take P = (q) , and fci+gfcj+g; fcj+gfci+g 2 NC+ for any 1 i 6=
j m. Then it is evident q+( ; fci+gfcj+g) 6= +, q+( ; fcj+gfci+g) 6= +, and
occck fci+gfcj+g = occck fcj+gfci+g for all k = 1; : : : ; m. In other words, fci+g 2= P ,
fci+gfcj+g 2= P , fcj+g 2= P , fcj+gfci+g 2= P , and occck fci+gfcj+g = occck fcj+gfci+g
for all k = 1; : : : ; m.</p>
        <p>The assumption P = (cV) x for some V NC NC and x 2 cV leads to the
equivalence of the statements fci+gfcj+gfci g 2 P and fcj+gfci+gfci g 2 P due
to Lemma 1.</p>
        <p>But the definition of q ensures fci+gfcj+gfci g 2= P and fcj+gfci+gfci g 2 P . This
contradiction proofs that for any V NC NC and x 2 cV, P = (cV) x is false.
Remark 2. This abstract example has practical value. Indeed, let we have m(m &gt;
1) servers each of them provides access to the queue being stored by it. Then
ck+ and ck can be interpreted as append and pop operations respectively for the
kth queue.</p>
        <p>Example 1 guarantees the behaviour like to a queue behaviour for the system of
the servers cannot be ensured by a counter-based detector.</p>
        <p>Remark 3. Reasoning similar to the reasoning given in Example 1 leads to the
conclusion that the behaviour like to a stack for the system of the servers cannot
be ensured by a counter-based detector.
6.2</p>
      </sec>
      <sec id="sec-8-3">
        <title>Diophantine Representation of a Counter-Based Detector</title>
        <p>The definition of a counter-based detector ensures that such a detector cV is
uniquely defined by the corresponding set V NC NC, which below is referred
as the defining set of a counter-based detector. Hence, to specify cV we need
to specify V. Taking into account that any tool for specifying a set can specify a
recursively enumerable set only, we concentrate on counter-based detectors with
the recursively enumerable determining set. Such a counter-based detector is
below called a recursively defined counter-based detector. Everywhere below
we consider counter-based detectors with the recursively enumerable defining set
only.</p>
        <p>Note that a set V NC NC is recursively enumerable if and only if the
sets Vn = fx 2 NC j hn; xi 2 Vg are recursively enumerable for all n 2 NC.
This claim follows directly from the finiteness of NC. In other words, to
specify a recursively enumerable set V NC NC is equivalent to specify the set
fVn j n 2 NCg of recursively enumerable subsets of NC.</p>
        <p>Due to Matiyasevich-Davis-Robinson-Putnam theorem (see, [6]), the last is
equivalent to specifying for any n 2 NC a polynomial Pn such that</p>
        <p>
          Vn = fx 2 NC j Pn(x; y1; : : : ; ys) = 0 for some y1; : : : ; ys 2 Ng:
Thus, any family of the species fPn 2 Z[x1; : : : ; xm; y1; : : : ; ys] j n 2 NCg where
m is the cardinal number of C and s is some positive natural number specifies
the set V NC NC as follows
(
          <xref ref-type="bibr" rid="ref1">1</xref>
          ) let us select some enumeration fc1; : : : ; cmg of clocks from C;
(
          <xref ref-type="bibr" rid="ref2">2</xref>
          ) let us associate natural variable xi with clock ci (1 i m);
(
          <xref ref-type="bibr" rid="ref3">3</xref>
          ) for each n 2 NC, let us specify polynomials Pn 2 Z[x1; : : : ; xm; y1; : : : ; ys];
(
          <xref ref-type="bibr" rid="ref4">4</xref>
          ) let us assume
hn; xi 2 V iff
        </p>
        <p>9 y1 2 N; : : : ; ys 2 N; Pn(x; y1; : : : ; ys) = 0:
Below we refer to this manner of specifying the defining set of a counter-based
detector as to a Diophantine Representation of the detector.
Example 2 (of a Diophantine Representation). Let us assume C = fc1; c2g and
consider the clock constraints specification defined as in Table 2. This
specification determines that clock c1 is strictly faster than clock c2 and can be considered
as a specification of the Lamport’s relation “happen before” (see [7]).</p>
        <p>Note that the rows corresponding to the situation c1 does not tick but c2
ticks and also to the situation c1 and c2 tick at the same time are coincide in
columns 3 and 4. Hence, we can represent Table 2 as follows
c2 ) x1 x2 + y1 = 0
c1 ^ :c2 ) 1 + x1 x2 + y1 = 0
7</p>
      </sec>
    </sec>
    <sec id="sec-9">
      <title>Universal Diophantine Simulator of Recursive</title>
    </sec>
    <sec id="sec-10">
      <title>Counter-Based Detectors</title>
      <p>In this section, we use Diophantine Representation for describing a universal
algorithm simulating any counter-based detector if its defining set is recursive.
The main advantage of this result is that it gives a metric for estimating the
complexity of the detector and the detection problem. Namely, the number of
additional variables and the power of the polynomial representing the
corresponding Diophantine set can be used for defining such a metric. The detailed
discussion of this problem one can find in [8].</p>
      <p>Let us assume the the universal Diophantine simulator is set up for
simulating the counter-based detector with the defining set specified by polynomials
fPn(x1; : : : ; xm; y1; : : : ; ys) j n 2 NCg under assumption that the clock set is
enumerated as follows C = fc1; : : : ; cmg. Also, we choose some algorithm
enumerating the set Ns without repetitions. We mean below that i is the i-th
member of this enumeration.</p>
      <p>We begin describing the universal Diophantine simulator of recursive
counterbased detectors with specifying its composite structure (see Fig. 1). The
simulator consists of one passive component (NotificationLog) and two active ones
(NotificationListener and NotificationHandler).</p>
      <p>Component NotificationLog is a data store that allows to write data items
in append and direct access modes and to read ones in direct access mode.</p>
      <p>Component NotificationListener provides listening the notifications
channel and writing the corresponding data items using the interface of component
NotificationLog in accordance with the next algorithm.</p>
      <p>
        NotificationListener:
(
        <xref ref-type="bibr" rid="ref1">1</xref>
        ) xk 0 for k = 1; : : : ; m
(
        <xref ref-type="bibr" rid="ref2">2</xref>
        ) wait on receiving a notification
(
        <xref ref-type="bibr" rid="ref3">3</xref>
        ) let the received notification be n then append to NotificationLog the
item (x1; : : : ; xm; n; 0)
(
        <xref ref-type="bibr" rid="ref4">4</xref>
        ) xk xk + 1 for k = 1; : : : ; m such that ck 2 n
(
        <xref ref-type="bibr" rid="ref5">5</xref>
        ) go to (
        <xref ref-type="bibr" rid="ref2">2</xref>
        )
Summing up the mentioned above we can conclude that idea to use the
coalgebraic approach for studying logical time in distributed systems gives some
interesting results.
      </p>
      <p>First of all, we see that the coalgebraic technique developed in [1] can be
used in this more special case. Of course, in this case, we have a possibility
enriching the model by using the specific structure of a notification set. It gives
us to introduce a mechanism of counting clock ticks and to use values of the
corresponding counters for formulating behavioural constraints.</p>
      <p>Unfortunately, such an arithmetization does not provide specifying all
reasonable causality constraints as it is demonstrated by Example 1 and Remark 3.
But it provides a possibility to use a concept of Diophantine complexity [8] for
classifying causality constraints of such a kind in accordance with the efficiency
of detecting algorithms.</p>
      <p>We need to note that assessing the efficiency of detecting algorithms requires
answers the following questions
– How to build new detectors from simpler ones?
– Do such constructions possess the universality property?
– Can assess the complexity of the constructed detectors based on the
complexity of their components?
These questions define the directions of our future research.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Zholtkevych</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Labzhaniia</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Understanding Safety Constraints Coalgebraically</article-title>
          .
          <source>In: Computational Linguistics and Intelligent Systems, CEUR Workshop Proceedings</source>
          , vol.
          <volume>2604</volume>
          , pp.
          <fpage>1</fpage>
          -
          <lpage>19</lpage>
          . CEUR-WS (
          <year>2020</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Alpern</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schneider</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Recognizing safety and liveness</article-title>
          .
          <source>Distributed Computing</source>
          <volume>2</volume>
          ,
          <fpage>117</fpage>
          -
          <lpage>126</lpage>
          (
          <year>1987</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <given-names>Mac</given-names>
            <surname>Lane</surname>
          </string-name>
          ,
          <string-name>
            <surname>S.</surname>
          </string-name>
          :
          <article-title>Categories for the Working Mathematician</article-title>
          . Springer, 2nd edn. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Awodey</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <source>Category Theory</source>
          . Oxford University Press, 2nd edn. (
          <year>2010</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>André</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          :
          <article-title>Syntax and Semantics of the Clock Constraint Specification Language (CCSL)</article-title>
          .
          <source>Tech. Rep. 6925 version 2</source>
          ,
          <string-name>
            <surname>Inria</surname>
          </string-name>
          (
          <year>June 2009</year>
          ), https://hal.inria.fr/ inria-00384077/document
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Matiyasevich</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Hilbert's 10th Problem</article-title>
          . The MIT Press (
          <year>1993</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Lamport</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          :
          <article-title>Time, Clocks, and the Ordering of Events in a Distributed System</article-title>
          .
          <source>CACM</source>
          <volume>21</volume>
          (
          <issue>7</issue>
          ),
          <fpage>558</fpage>
          -
          <lpage>565</lpage>
          (
          <year>1978</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Matiyasevich</surname>
            ,
            <given-names>Y.V.</given-names>
          </string-name>
          :
          <article-title>Diophantine complexity</article-title>
          .
          <source>Journal of Soviet Mathematics</source>
          <volume>55</volume>
          ,
          <fpage>1603</fpage>
          -
          <lpage>1610</lpage>
          (
          <year>1991</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>