Towards a provably correct hardware implementation of occam

  • He Jifeng
  • Ian Page
  • Jonathan Bowen
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 683)


This paper shows how to compile a program written in a subset of occam into a normal form suitable for further processing into a netlist of components which may be loaded into a Field-Programmable Gate Array (FPGA). A simple state-machine model is adopted for specifying the behaviour of a synchronous circuit where the observable includes the state of the control path and the data path of the circuit. We identify the behaviour of a circuit with a program consisting of a very restricted subset of occam. Algebraic laws are used to facilitate the transformation from a program into a normal form. The compiling specification is presented as a set of theorems that must be proved correct with respect to these laws. A rapid prototype compiler in the form of a logic program may be implemented from these theorems.


  1. 1.
    J.P. Bowen, From programs to object code using logic and logic programming, in R. Giegerich and S.L. Graham (eds.), Code Generation — Concepts, Tools, Techniques, Springer-Verlag, Workshops in Computer Science, pp. 173–192, 1992.Google Scholar
  2. 2.
    J.P. Bowen (ed.), Towards Verified Systems, Elsevier, Real-Time Safety Critical Systems Series, 1993. In preparation.Google Scholar
  3. 3.
    J.P. Bowen, M. Fränzle, E.-R. Olderog and A.P. Ravn, Developing correct systems, Proc. 5th Euromicro Workshop on Real-Time Systems, Oulu, Finland, 22–24 June 1993. IEEE Press, 1993. To appear.Google Scholar
  4. 4.
    J.P. Bowen and V. Stavridou, Formal methods and software safety, in H. Frey (ed.), Safety of Computer Control Systems 1992 (SAFECOMP'92), Pergamon Press, pp. 93–98, 1992.Google Scholar
  5. 5.
    G.M. Brown, Towards truly delay-insensitive circuit realizations of process algebras, in G. Jones and M. Sheeran (eds.), Designing Correct Circuits, Springer-Verlag, Workshops in Computing, pp. 120–131, 1991.Google Scholar
  6. 6.
    T.P. Clement and K.-K. Lau (eds.), Logic Program Synthesis and Transformation, Springer-Verlag, Workshops in Computing, 1992.Google Scholar
  7. 7.
    W.F. Clocksin and C.S. Mellish, Programming in Prolog, Springer-Verlag, 3rd edition, 1987.Google Scholar
  8. 8.
    G.V. Collis and E.J. Kappos, Occam as a hardware description language, Software Engineering Journal, 2(6), 213–219, November 1987.Google Scholar
  9. 9.
    He Jifeng and J.P. Bowen, Time interval semantics and implementation of a real-time programming language, Proc. 4th Euromicro Workshop on Real-Time Systems, IEEE Press, pp. 110–115, June 1992.Google Scholar
  10. 10.
    He Jifeng and J.P. Bowen, Specification, Verification and Prototyping of an Optimized Compiler, Draft, Oxford University Computing Laboratory, 1992. Submitted for publication.Google Scholar
  11. 11.
    He Jifeng, I. Page and J.P. Bowen, A Provably Correct Hardware Implementation of Occam, ESPRIT ProCoS project document [OU HJF 9/5], Draft, Oxford University Computing Laboratory, UK, November 1992.Google Scholar
  12. 12.
    C.A.R. Hoare (ed.), Developments in Concurrency and Communication, Addison-Wesley, University of Texas at Austin Year of Programming Series, 1990.Google Scholar
  13. 13.
    C.A.R. Hoare, Refinement algebra proves correctness of compiling specifications, in C.C. Morgan and J.C.P. Woodcock (eds.), 3rd Refinement Workshop, Springer-Verlag, Workshops in Computing, pp. 33–48, 1991.Google Scholar
  14. 14.
    C.A.R. Hoare, Programs are predicates, in ICOT (ed.), Proc. International Conference on Fifth Generation Computer Systems, Tokyo, Japan, pp. 211–218, 1–5 June 1992.Google Scholar
  15. 15.
    C.A.R. Hoare, He Jifeng, J.P. Bowen and P.K. Pandya, An algebraic approach to verifiable compiling specification and prototyping of the ProCoS level 0 programming language, ESPRIT '90 Conference Proceedings, Kluwer Academic Publishers, pp. 804–818, 1990.Google Scholar
  16. 16.
    C.A.R. Hoare, He Jifeng and A. Sampaio, Normal form approach to compiler design, Acta Informatica, 1993. To appear.Google Scholar
  17. 17.
    Inmos Ltd., Occam 2 Reference Manual, Prentice Hall International Series in Computer Science, 1988.Google Scholar
  18. 18.
    M.E. Leeser et al., BEDROC91: The Cornell Hardware Synthesis Project, Technical Report EE-CEG-91-9, School of Electrical Engineering, Cornell University, Ithaca, New York, USA, 1991.Google Scholar
  19. 19.
    A.J. Martin, Programming in VLSI: from communicating processes into delayinsensitive circuits, chapter 1, in [12].Google Scholar
  20. 20.
    D. May, Compiling Occam into silicon, chapter 3, in [12].Google Scholar
  21. 21.
    J. Paakki, Prolog in practical compiler writing, The Computer Journal, 34(1), 64–72, 1991.Google Scholar
  22. 22.
    I. Page and W. Luk, Compiling Occam into field-programmable gate arrays. in W. Moore and W. Luk (eds.), FPGAs, Abingdon EE&CS Books, 15 Harcourt Way, Abingdon OX14 1NV, UK, pp. 271–283, 1991.Google Scholar
  23. 23.
    Quintus Prolog — Sun 4 User Manual, Release 2.5, Quintus Computer Systems, Inc., Mountain View, California, USA, 1990.Google Scholar
  24. 24.
    P.B. Reintjes, A set of tools for VHDL design, in K. Furukawa (ed.), Logic Programming: Proc. 8th International Conference, The MIT Press, pp. 549–562, 1991.Google Scholar
  25. 25.
    A.W. Roscoe and C.A.R. Hoare, Laws of Occam programming, Theoretical Computer Science, 60, 177–229, 1988.Google Scholar
  26. 26.
    C.H. van Berkel, J. Kessels, M. Roncken, R.W.J.J. Saeijs and F. Schalij, The VLSI-programming language Tangram and its translation into handshake circuits, Proc. European Design Automation Conference, 1991.Google Scholar
  27. 27.
    S. Weber, B. Bloom and G. Brown, Compiling Joy into silicon, in T. Knight and J. Savage (eds.), Advanced Research in VLSI and Parallel Systems, The MIT Press, 1992.Google Scholar
  28. 28.
    Xilinx Inc., The Programmable Gate Array Data Book, San Jose, California, USA, 1991.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1993

Authors and Affiliations

  • He Jifeng
    • 1
  • Ian Page
    • 1
  • Jonathan Bowen
    • 1
  1. 1.Programming Research GroupOxford University Computing LaboratoryOxfordEngland

Personalised recommendations