|
|
|
|
A Process Calculus for Universal Concurrent Constraint Programming: Semantics, Logic and Application
Download: PDF Abstract:
We introduce the Universal Timed Concurrent Constraint Programming (utcc) process calculus; a generalisation of Timed Concurrent Constraint Programming. The utcc calculus allows for the specification of mobile behaviours in the sense of Milner's
Introduction
Process calculi treat concurrent processes much like the
Nevertheless, the basic CCP lacks a mechanism to specify generation and communication of private links; i.e. mobility
as usually understood in concurrency theory. Such mechanism is
fundamental for the specification of systems where agents change their
communication structure (mobile systems) as well as protocols where nonces
(i.e, randomly-generated unguessable items) are transmitted. In fact,
generation and communication of private links are the central
operations of one of the main representative formalisms for mobility in
concurrency theory, namely the We aim at extending CCP to specify mobility. The extension ought to comply with two criteria that distinguish basic CCP from other formalisms: (1) Logic correspondence which provides CCP with a unique declarative view of processes and (2) determinism which is the source of CCP's elegant and simple characterisations (e.g., the clousure operator semantics [17]). Another general criterion for our extension is (3) to be applicable to meaningful concurrent scenarios, in particular those not yet explored using CCP calculi. Agents in CCP interact with each other by telling and asking
information represented as constraints in a global store. The process tell(c) adds the constraint
Mobility can be modelled by adding linear parametric ask processes to CCP as done in Linear CCP [6]. A parametric ask A(x) can be viewed as a process when c do P with a variable x declared as a formal parameter. Intuitively, A(x) may evolve into P[y/x], i.e.
The above kind of non-determinism can be avoided by extending CCP only with persistent parametric asks following the semantics of the persistent Our strategy is therefore to extend CCP with temporary parametric ask operations. Intuitively, these operations behave as persistent parametric asks during a time-interval but may disappear afterwards. We do this by generalising the timed CCP model in [16]. We call this extension Universal Timed CCP (utcc). As explained below, we shall show that complies with previously-mentioned criteria (1-3). Contributions. We first give utcc an operational semantics. However, parametric ask operations pose technical problems: They may generate infinitely many substitutions thus causing divergent (i.e., infinite) internal computations. We resolve this problem by endowing utcc with a novel symbolic semantics that uses temporal constraints to represent finitely a possible infinite number substitutions. We then show that allows for mobility and it is deterministic (Criterion 2). We shall show a strong correspondence with Linear-Time Temporal Logic (LTL) by providing a compositional encoding of utcc processes into LTL formulae (Criterion 1). This correspondence with the standard logic for the verification of concurrent systems allows for reachability analysis central to security protocols: If there is a way to reach a state where an intruder knows a secret, then there is a secrecy breach. To illustrate the applicability of (Criterion 3), we use it to model and predict the secrecy flaw in the well-known Needham-Schroeder Protocol [9]. To the our knowledge this is the first symbolic semantics for a CCP calculus as well as the first one in concurrency theory using temporal constraints as finite representations of substitutions. Furthermore, we are not aware of any other work applying a CCP calculus to model security protocols.
In this section we describe the temporal concurrent constraint () model [16] following the presentation in [19].
|
|
We dwell a little upon the description of Rule
as it
may seem somewhat complex. Consider
in Rule
. The global store is
and the local store is
. We distinguish between
the external (corresponding to
) and the internal
point of view (corresponding to
). From the internal
point of view, the information about
, possibly appearing
in the ``global'' store
, cannot be observed. Thus, before
reducing
we first hide the information about
that
may have in
by existentially quantifying
in
. Similarly, from the external point of view, the
observable information
about
that the reduction of internal agent
may produce (i.e.,
) cannot be observed. Thus we hide it by existentially quantifying
in
before adding it to the global store. Additionally, we make
the
new private store of the evolution of the internal process.
Rule
describes the behaviour of
. If the store entails
then
is executed. Additionally, the abstraction persists in the current time interval to allow other potential replacements of
in
but
is augmented with
to avoid executing
again.
Rule
says that an observable transition from
labelled
with
is obtained from a terminating sequence of internal transitions from
to a
. The process
to be executed in the next time interval is equivalent to
(the ``future'' of
).
is obtained by removing from
abstractions and any local information which has been stored in
, and by
``unfolding'' the sub-terms within ``next'' and ``unless'' expressions.
We can now illustrate the observable transition showing the expected behaviour in our mobility example.
Due to abstractions the SOS may induce an infinite sequence of internal transitions within a time interval thus never producing an observable transition.
Abstraction Loops. One source of infinite internal behaviour involves looping (recursion) in abstractions. E.g. let
.
Each time
gets a link on
, it generates a new link
on
thus causing infinite internal behaviour. (A similar problem involves
several abstractions producing mutual recursive behaviour.) This kind
of looping problems can be avoided by requiring for each
that
must be a ``next'' expression. This restriction, however, may also
disallow behaviour which will not cause infinite internal computations.
Infinitely Many Substitutions. Another source of infinite internal behaviour involves the cs under consideration. Let
If the current store
entails
for infinitely many
's, then
will have to produce
for each such
. This kind of infinite internal behaviour can be avoided by allowing only guards
so that for any
the set
modulo logic equivalence is finite. This seems inconvenient for the
modelling of cryptographic knowledge as typically is done in process
calculi: The presence of some messages entails the presence of
arbitrary compositions among them. We discuss this at length in our
security application in Section 6.
In this section we define a symbolic semantics for utcc whose basic idea is to use temporal constraints to represent in a finite way a possibly infinite number of substitutions as well as the information that an infinite loop may provide. It turns out that without appealing to the syntactic restrictions mentioned above, this semantics guarantees that every sequence of internal transitions is finite.
A. Substitutions as Constraints. Take
The operational semantics performs
for every
is entailed by the store
Instead, the symbolic semantics dictates that
should produce
where, similarly,
should be produced according to the symbolic semantics by
. Let
be an arbitrary term
The idea is that if
is operationally produced by
then
should be entailed by
. Since
then
Therefore
entails the constraint that any arbitrary
produces.
B. Timed Dependencies in Substitutions.
The symbolic semantics represents as temporal constraints dependencies
between substitutions from one time interval to another. E.g., suppose
that for
above,
. Operationally, once we move to the next time unit, the constraints produced are of the form
for those
's the final store
in the previous time unit entails
. The symbolic semantics captures this as
where
is the "previous" modality in temporal logic. Intuitively,
means that
holds in the previous time interval.
We shall use (a fragment of) the standard Linear-Time Temporal Logic (LTL) in [10] for our symbolic semantics.
The modalities
and
state, resp., that
holds previously, next and always. We use
for
, and the eventual modality
as an abbreviation of
.
We presuppose the reader is familiar with the basic concepts of Model Theory. The non-logical symbols of
are given meaning in an underlying
-structure, or
-model,
(They are interpreted via
as relations over a domain
of the corresponding arity.) A state
is a mapping assigning to each variable
in
a value
in
. This interpretation is extended to
-expressions in the usual way (
). We write
iff
is true
in
. The state
is an
-variant of
iff
for each
We use
to range over infinite sequences of states. Furthermore,
is an
-variant of
iff
is an
-variant of
for each
.
LTL Theories. Given a cs
with first-order language
, the LTL theory induced by
,
is the set of LTL sentences that are LTL valid in all the
-structures (or
-models) of
We write
iff
. We omit "
" in
when no confusion arises.
Future-free constraints. For the symbolic semantics we
take the liberty of assuming that the constraints in processes and
configurations are replaced with certain LTL formulae. Namely, future-free formulae: Those which do not contain occurrences of
and
So, for example a process-store configuration of the form
may appear in the transitions of the symbolic semantics. We shall abuse
the notation by assuming that, in the context of the symbolic
semantics,
range over future-free formulae. In the context of the SOS, however,
range over state formulae only.
Future-free formulae preserve the decidability of their underlying .
The internal and observable symbolic transitions
are defined as in Table 1 with
replaced by
and with
and
replaced, resp., by
and
in Table 2 (with
and
representing future-free formulae rather than just state-formulae).
The rule
represents with the temporal constraint
the substitutions that its operational counterpart
would induce as intuitively explained in Section 4.1(A). Notice that in the reduction of
the variables
in
are hidden, via existential quantification, to avoid clashes with those
in
.
The function
in
is similar to its operational counterpart
. However,
records the final global and local stores as well as abstraction guards as past information. As explained in Section 4.1(B) this past information is needed in next time unit.
|
Finally, it is easy to verify that no infinite sequence
can be generated by the symbolic semantics. Thus we avoid the problems discussed in Section 3.2.
Operational Correspondence. The correspondence between the two semantics is given below. It states that the (untimed) constraints entailed by the outputs of any arbitrary long sequence of observable reductions coincide with those of the corresponding one in the symbolic semantics.
We say that
is abstracted-unless free iff it has no occurrences of processes of the form
under the scope of an abstraction.
We confined ourselves to abstracted-unless free processes due
to the problem of representing the negation of entailment as logic
formulae. Take
where
Let
be the final store in the first time unit when running
. Operationally,
is executed in the second time unit for those
's
Following Section 4.1 one may try to capture this in the symbolic semantics with
as if we had
This wrongly assumes, however, that in general
is equivalent to
Abstract-unless free processes represent a meaningful and practical fragment of utcc They are sufficient to express all the examples and intended applications of this paper. Furthermore, we have proven they are able to model Turing Machines which bears witness to their universal expressiveness.
LTL Correspondence. The compositional encoding in Definition 8 gives a pleasant correspondence between
processes and LTL formulae. It shows the duality between local and
abstraction operators, represented resp. as existential and universal
quantified formulae.
A key aspect of Theorem 3 is that it allows using well-established techniques from LTL for reachability analysis of utcc processes: E.g., to verify if a given security protocol modelled in utcc can reach a state where secrecy is violated.
This section illustrates the use of in the analysis of
security protocols. In particular, we shall exhibit the secrecy flaw of
the Needham-Schroeder protocol (NS) [9].
Modelling NS in utcc. As typically done we follow the Dolev and Yao thread model [7] which presupposes an attacker that can eavesdrop, disassemble, compose, encrypt and decrypt messages with available keys. It also presupposes that cryptography is unbreakable. We begin by defining a cs based on [7] which follows the Dolev and Yao model.
Intuitively,
and
represent the principal identifiers
and keys
. We use
,
,
, resp., for
(encryption),
(composition) and
(inverse key). Furthermore,
represents the public key of
. From [7] one can show that
is decidable. The rule
says that if one can infer that the message
as well as a key
are output on the global channel
, then one may as well infer that
is also output on
. The other rules can be explained similarly.
We now specify the principals. The NS model uses
and
describing the role of the initiator and the responder
and
in Figure 1(a). Posting messages, nonce generation, message reception are modelled, resp., using tell, local and wait processes.
Notice that since Responder's nonce cannot be known by an attacker,
states that
is secret.
We also define an observer
telling
whenever a secret appears unprotected on the global channel
Additionally the observer remembers every message that was ever on
by transferring them across the time intervals.
The situation in Figure 1(b) can be modelled as:
We can use the symbolic semantics to show that
eventually outputs
Alternatively, the above proposition can be proved using Theorem 3 and LTL deduction.
Notice that we cannot use the SOS to exhibit an output of
since the secure will generate infinite substitutions within a time interval (see Section 3.2). E.g., If
then
and
and so on. This illustrates the relevance of the symbolic semantics and the correspondence in Theorem 3.
Mobility has been introduced in other CCP-related formalisms. In particular LMNtal [18] and Atomic CCP [8] where logical variables also represent links. LMNtal has emerged as an unifying model of concurrency, as such it is not restricted to be deterministic. Similarly, Atomic CCP is non-deterministic. To our knowledge no correspondence between these languages and logic has been given.
Several process calculi have been specifically designed for the analysis of security protocols, e.g., [7,3,5]. Although can be used to reason about certain aspects of security protocols (e.g., secrecy), it was not designed exclusively for this domain of application. Nevertheless, its LTL characterisation offers a reasoning technique for reachability, to our knowledge not provided by the above calculi.
The rather successful logic programming approach to security protocols in [2] is closely related to ours in . The basic difference is that the underlying logic in [2] is Horn clauses while ours is LTL. Also our approach benefits from the operational view of process calculi. Finally, in [1] soft constraints are used to give an interesting quantitative approach to analysing integrity, confidentiality and authentication in security protocols. This approach is, however, more related to constraint satisfaction than to CCP.
Since preserves the basic properties of , we believe it allows
for a smooth extension of the elegant clousure operator semantics in [16]. From a practical point of view, we have implemented in Oz [15]
an interpreter executing programs written in . Following the SOS, the
interpreter computes the final stores given the input sequences and the
process to be executed. To avoid problems with infinitely many
substitutions, we restricted
,
and
in Rules
and
to have less than a fix number of applications of
and
. In this way we have automatically verified Proposition 2.