Skip to main content
Log in

Hume box calculus: robust system development through software transformation

  • Published:
Higher-Order and Symbolic Computation

Abstract

Hume is a contemporary programming language oriented to systems with strong resource bounds, based on autonomous concurrent “boxes” interacting across “wires”. Hume’s design reflects the explicit separation of coordination and computation aspects of multi-process systems, which greatly eases establishing resource bounds for programs. However, coordination and computation are necessarily tightly coupled in reasoning about Hume programs. Furthermore, in Hume, local changes to coordination or computation, while preserving input/output correctness, can have profound and unforeseen effects on other aspects of programs such as timing of events and scheduling of processes. Thus, traditional program calculi prove inappropriate as they tend to focus exclusively either on the coordination of interacting processes or on computation within individual processes.

The Hume box calculus offers a novel approach to manipulating multi-process systems by accounting seamlessly for both coordination and computation in individual rules. Furthermore, the “Hierarchical Hume” extension enables strong locality of the effects of program manipulation, as well as providing a principled encapsulation mechanism.

In this paper, we present an overview of the Hume box calculus and its applications in program development. First of all, a base set of rules for introducing, changing, composing, separating and eliminating Hume boxes and wires, possibly within hierarchies, is presented. Next additional strategies are derived and a constructive approach to program development is illustrated through two examples of system elaboration from truth tables. Finally, at a considerably higher level, the use of the Hume box calculus to verify a generic transformation from a single box to an equivalent multi-box program, offering a balanced parallel implementation, is discussed.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Similar content being viewed by others

References

  1. Abadi, M., Lamport, L.: The existence of refinement mappings. Theor. Comput. Sci. 82(2), 253–284 (1991)

    Article  MathSciNet  MATH  Google Scholar 

  2. Al Zain, A., Michaelson, G., Hammond, K.: Multi-core parallelisation for Hume. In: Horvath, Z., Zsok, V., Achten, P., Koopman, P. (eds.) Tenth Symposium on Trends in Functional Programming, Komarno, Slovakia, 2–4 June 2009, pp. 131–142 (2009)

    Google Scholar 

  3. Aldinucci, M., Gorlatch, S., Lengauer, C., Pelagatti, S.: Towards parallel programming by transformation: the FAN skeleton framework. Int. J. Parallel Emerg. Distrib. Syst. 16(2), 87–121 (2001)

    MathSciNet  MATH  Google Scholar 

  4. Baeten, J.C.M.: A brief history of process algebra. Theor. Comput. Sci. 335(2–3), 131–146 (2005)

    Article  MathSciNet  MATH  Google Scholar 

  5. Bird, R., de Moor, O.: Algebra of Programming. Prentice-Hall, New York (1997)

    MATH  Google Scholar 

  6. Breitinger, S., Loogen, R., Ortega Mallén, Y., Peña Marí, R.: Eden—the paradise of functional concurrent programming. In: EuroPar’96—European Conference on Parallel Processing, Lyon, France, August. LNCS, vol. 1123, pp. 710–713. Springer, Berlin (1996)

    Google Scholar 

  7. Burstall, R., Darlington, J.: A transformation system for developing recursive programs. J. ACM 24(1), 44–67 (1977)

    Article  MathSciNet  MATH  Google Scholar 

  8. Cook, A., Ireland, A., Michaelson, G.J., Scaife, N.: Discovering applications of higher order functions through proof planning. J. Form. Asp. Comput. 17(1), 38–57 (2005)

    Article  MATH  Google Scholar 

  9. Devillers, R., Klaudel, H., Riemann, R.-C.: General parameterised refinement and recursion for the M-net calculus. Theor. Comput. Sci. 300(1–3), 259–300 (2003)

    Article  MathSciNet  MATH  Google Scholar 

  10. Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Reading (1999)

    Google Scholar 

  11. Grov, G.: Verifying the correctness of Hume programs—an approach combining algorithmic and deductive reasoning. In: Proceedings of the 20th IEEE/ACM International Conference on Automated Software Engineering (ASE-05), pp. 444–447. ACM Press, New York (2005)

    Chapter  Google Scholar 

  12. Grov, G.: Reasoning About Corectness Properties of a Coordination Language. PhD thesis, School of Mathematical and Computer Sciences, Heriot-Watt University (2009)

  13. Grov, G., Ireland, A.: Towards automated property discovery within Hume. In: Ireland, A., Kovacs, L. (eds.) 2nd International Workshop on Invariant Generation (WING’09), pp. 45–59 (2009)

    Google Scholar 

  14. Grov, G., Michaelson, G.: Towards a box calculus for hierarchical Hume. In: Morazon, M. (ed.) Trends in Functional Programming, vol. 8, pp. 71–88 (2008)

    Google Scholar 

  15. Grov, G., Pointon, R., Michaelson, G., Ireland, A.: Preserving coordination properties when transforming concurrent system components. In: Coordination Models, Languages and Applications Track of the 23rd Annual ACM Symposium on Applied Computing, 1515 Broadway, New York, March 2008, vol. 1, pp. 126–127. The Association for Computing Machinery, Inc., New York (2008)

    Google Scholar 

  16. Grov, G., Michaelson, G., Al Zain, A.: Multi-core parallelisation of Hume through structured transformation. In: Draft Proceedings of 21st International Symposium on Implementation and Application of Functional Languages, Seton-Hall University, New Jersey, September (2009)

    Google Scholar 

  17. Hammond, K., Michaelson, G.J.: Hume: a domain-specific language for real-time embedded systems. In: Proc. Conf. Generative Programming and Component Engineering (GPCE ’03). Lecture Notes in Computer Science, pp. 37–56. Springer, Berlin (2003)

    Chapter  Google Scholar 

  18. Hammond, K., Ferdinand, C., Heckmann, R., Dyckhoff, R., Hoffmann, M., Jost, S., Loidl, H.-W., Michaelson, G., Pointon, R., Scaife, N., Sérot, J., Wallace, A.: Towards formally verifiable resource bounds for real-time embedded systems. In: Proc. Workshop on Innovative Techniques for Certification of Embedded Systems (2006)

    Google Scholar 

  19. Hammond, K., Grov, G., Michaelson, G., Ireland, A.: Low-level programming in Hume: an exploration of the HW-Hume level. In: International Conference on Implementation and Application of Functional Languages, Budapest, Hungary, September 2006. LNCS, vol. 4449, pp. 91–107. Springer, Berlin (2007)

    Chapter  Google Scholar 

  20. Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall International, Englewood Cliffs (1985)

    MATH  Google Scholar 

  21. Hutton, G., Wright, J.: Calculating an exceptional machine. In: Loidl, H.-W. (ed.) Trends in Functional Programming, vol. 5, pp. 49–64 (2006)

    Google Scholar 

  22. Jost, S.: Formal Hume semantics. EmBounded Project Deliverable (2008). Deliverable D12. Available at http://www.embounded.org/

  23. Kesseler, M.H.G.: Constructing skeletons in clean: the bare bones. In: HPFC’95—Conference on High Performance Functional Computing, Denver, CO, April 10–12, pp. 182–192 (1995)

    Google Scholar 

  24. Lamport, L.: The temporal logic of actions. ACM Toplas 16(3), 872–923 (1994)

    Article  Google Scholar 

  25. Li, H., Thompson, S.: A comparative study of refactoring Haskell and Erlang programs. In: Proceedings of 6th IEEE Workshop on Source Code Analysis and Manipulation, Philadelphia, USA, September, pp. 197–206 (2006)

    Chapter  Google Scholar 

  26. Madden, P.: Automated Program Transformation Through Proof Transformation. PhD thesis, University of Edinburgh (1991)

  27. Manna, Z.: Mathematical Theory of Computing. McGraw-Hill, New York (1974)

    Google Scholar 

  28. Michaelson, G., Scaife, N., Bristow, P., King, P.: Nested algorithmic skeletons from higher order functions. Parallel Algorithms Appl. 16, 181–206 (2001). Special Issue on High Level Models and Languages for Parallel Processing

    Article  MATH  Google Scholar 

  29. Michaelson, G., Hammond, K., Sérot, J.: The finite state-ness of FSM-Hume. In: Trends in Functional Programming, vol. 4, pp. 19–28. Intellect, Bristol (2004)

    Google Scholar 

  30. Morgan, C.: Programming from Specifications. Prentice-Hall, New York (1990)

    MATH  Google Scholar 

  31. Schneider, S., Treharne, H.: CSP theorems for communicating B machines. Form. Asp. Comput. 17(4) (2005)

  32. Trinder, P.W., Hammond, K., Loidl, H.-W., Peyton Jones, S.L.: Algorithm + strategy = parallelism. J. Funct. Program. 8(1), 23–60 (1998)

    Article  MathSciNet  MATH  Google Scholar 

  33. Visser, E.: A survey of strategies in rule-based program transformation systems. J. Symb. Comput. 40(1), 831–873 (2005). Special issue on Reduction Strategies in Rewriting and Programming

    Article  MathSciNet  MATH  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Greg Michaelson.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Grov, G., Michaelson, G. Hume box calculus: robust system development through software transformation. Higher-Order Symb Comput 23, 191–226 (2010). https://doi.org/10.1007/s10990-011-9067-y

Download citation

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s10990-011-9067-y

Keywords

Navigation