Controlling the behaviour of functional language systems
We present a methodology that allows temporal constraints to be imposed on the behaviour of term-rewriting systems and in particular allows the evaluation order of pure functional programs to be constrained. This permits the use of these languages in applications such as operating systems and real-time control, where control of evaluation order is necessary to achieve a correct implementation.
This control is achieved, in the declarative spirit, by utilising a temporal logic that allows the user to specify, at a high level, the temporal conditions his program must satisfy. The temporal logic is a meta-language which talks about events occurring in the execution of the associated program. The program together with the temporal constraints is then automatically transformed to produce a single program that is guaranteed to behave correctly on any implementation. These techniques are of particular interest when developing programs for parallel asynchronous machines such as ALICE [Cripps et al, 1987] that can exhibit genuinely non-deterministic evaluation (even of deterministic programs).
We detail the temporal specification language, the transformations used and their implementation and give an example showing the use of the methodology with an illustration of its execution on the parallel graph reduction machine ALICE.
KeywordsNormal Form Temporal Logic Temporal Constraint Functional Language Reduction Cycle
- 1.Burstall, R.M., MacQueen, D.B. and Sanella, D.T., 1980; "Hope: An Experimental Applicative Language", Proc. 1980 LISP conference, Stanford California. 136–143.Google Scholar
- 2.Cripps, M.D., Darlington, J., Field, A.J., Harrison, P.G. and Reeve, M.J., 1987; "The Design and Implementation of ALICE: A Parallel Graph Reduction Machine", Dataflow and Reduction Architectures, ed. S.S. Thakkar, IEEE publications.Google Scholar
- 3.Gabbay, D., 1986; "Executable Temporal Logic for Interactive Systems", Internal Report, Department of Computing, Imperial College.Google Scholar
- 4.Henderson, P., 1982; "Purely Functional Operating Systems", Functional Programming and its Applications, eds. J. Darlington, P. Henderson and D.A. Turner, Cambridge University Press. 177–189.Google Scholar
- 5.Hoare, C.A.R., 1985; "Communicating Sequential Processes", Prentice-Hall International, Englewood Cliffs, New Jersey.Google Scholar
- 6.Hughes, R.J.M., 1983; "The Design and Implementation of Programming Languages", Ph.D. thesis, Oxford University Computing Laboratory, Programming Research Group. 75–91.Google Scholar
- 7.Karlsson, K., 1981; 'Nebula: A Functional Operating System', Laboratory for Programming Methodology, Chalmers University of Technology and University of Goteborg, Sweden (draft paper).Google Scholar
- 8.May, D., 1983; ‘Occam', ACM Sigplan Notices, Vol. 18, No. 4, 69–79.Google Scholar
- 9.Moszkowski, B., 1985; ‘Executing Temporal Logic Programs', Internal Report, Computer Laboratory, Cambridge.Google Scholar
- 10.Stoye, W., 1986; ‘Message-based Functional Operating Systems', Science of Computer Programming, Vol. 6, No. 3 (Mag). 291–311.Google Scholar
- 11.While, R.L., 1987; ‘Behavioural Aspects of Term-rewriting Systems', Ph.D thesis, Functional Programming Research Group, Imperial College (in preparation).Google Scholar