The notion of refinement is a particularly useful concept in many forms of engineering activity. If we can establish a relation between components of a system which captures the fact that one satisfies at least the same conditions as another, then we may replace a worse component by a better one without degrading the properties of the system. Obviously the notion of refinement must reflect the properties of a system which are important: in building bridges it may acceptable to replace a (weaker) aluminium rivet by a (stronger) iron one, but if weight is critical, say in an aircraft, this is not a valid refinement.
In describing reactive computer systems, CSP has been found to be a useful tool. Refinement relations can be defined for systems described in CSP in several ways, depending on the semantic model of the language which is used. In the untimed versions of CSP, three main forms of refinement are relevant, corresponding to the three models presented above. We briefly outline these below, for more information see [Roscoe97].
PQ traces(Q)traces(P)Traces refinement does not allow us to say anything about what will actually happen, however. The process STOP, which never performs any events, is a refinement of any process in this framework, and satisfies any safety specification.
PQ failures(Q)failures(P)A state of a process is deadlocked if it can refuse to do every event, and STOP is the simplest deadlocked process. Deadlock is also commonly introduced when parallel processes do not succeed in synchronising on the same event.
The failures-divergences model meets this requirement by adding the concept of divergences. The divergences of a process are the set of traces after which the process may livelock. This gives two major enhancements: we may analyse systems which have the potential to never perform another visible event and assert this does not occur in the situations being considered; and we may also use divergence in the specification to describe "don't care" situations. The relation is defined as follows:
Formally, after a divergence we consider a process to be acting chaotically and able to do or refuse anything. This means that processes are considered to be identical after they have diverged.
PQ failures(Q)failures(P) divergences(Q)divergences(P)
Naturally, for divergence-free processes, which include the vast majority of practical systems, is equivalent to
As implied by the name of FDR, we consider to be the most important of these three. We will generally abbreviate by . The failures-divergence model, and its corresponding notion of refinement, are usually taken as the standard model of CSP.
All three of these forms of refinement are supported in FDR. We would normally expect them to be used in the following contexts:
The following sections illustrate how refinement might be used (by working through a simple example) and explain how the FDR tool can check refinement in an automated way.
Go to the Next or Previous section, the Detailed Contents, or the FS(E)L Home Page.