Abstract

• A specification and implementation of Trylock are given. • The implementation is not correct for branching time (CTL). • The implementation is correct for linear time (LTL). • It follows that LTL is to be preferred over CTL. • The correctness is proved by means of eternity variables. An example is given of a software algorithm that implements its specification in linear time temporal logic (LTL), but not in branching time temporal logic (CTL). In LTL, a prophecy of future behaviour is needed to prove the simulation. Eternity variables are used for this purpose. The final phase of the proof is a refinement mapping in which two threads exchange roles. The example is a software implementation of trylock in a variation of the fast mutual exclusion algorithm of Lamport (1987). It has been used fruitfully for the construction of software algorithms for high performance mutual exclusion.

Highlights

  • When Dijkstra [4] proposed the mutual exclusion problem in 1965, he more or less apologized for its academic character

  • The linear time temporal logic (LTL) proof of validity of the implementation is based on simulation, in several phases

  • The answer is no in branching time temporal logic, but yes in linear time temporal logic

Read more

Summary

Introduction

When Dijkstra [4] proposed the mutual exclusion problem in 1965, he more or less apologized for its academic character. The LTL proof of validity of the implementation is based on simulation, in several phases. The second phase consists of proofs of two progress properties of the algorithm This is done with UNITY logic [2,16]. System TryL has been used previously in the construction of the Triangle Algorithm [12], a mutual exclusion algorithm that is very efficient both under high contention and under low contention This case studies combines and illustrates several aspects of the treatment of shared-variable fine-grain concurrency: temporal logic, simulation, theorem proving, and UNITY.

The system Try
Some theory
Branching time
Computational definitions
Relating specifications
Eternity extensions
The simulation of Try by TryL
The specification of TryL
How to construct a prophecy?
The construction of the refinement mapping
Conclusions
Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call