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.
Similar content being viewed by others
References
Abadi, M., Lamport, L.: The existence of refinement mappings. Theor. Comput. Sci. 82(2), 253–284 (1991)
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)
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)
Baeten, J.C.M.: A brief history of process algebra. Theor. Comput. Sci. 335(2–3), 131–146 (2005)
Bird, R., de Moor, O.: Algebra of Programming. Prentice-Hall, New York (1997)
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)
Burstall, R., Darlington, J.: A transformation system for developing recursive programs. J. ACM 24(1), 44–67 (1977)
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)
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)
Fowler, M.: Refactoring: Improving the Design of Existing Code. Addison-Wesley, Reading (1999)
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)
Grov, G.: Reasoning About Corectness Properties of a Coordination Language. PhD thesis, School of Mathematical and Computer Sciences, Heriot-Watt University (2009)
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)
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)
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)
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)
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)
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)
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)
Hoare, C.A.R.: Communicating Sequential Processes. Prentice-Hall International, Englewood Cliffs (1985)
Hutton, G., Wright, J.: Calculating an exceptional machine. In: Loidl, H.-W. (ed.) Trends in Functional Programming, vol. 5, pp. 49–64 (2006)
Jost, S.: Formal Hume semantics. EmBounded Project Deliverable (2008). Deliverable D12. Available at http://www.embounded.org/
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)
Lamport, L.: The temporal logic of actions. ACM Toplas 16(3), 872–923 (1994)
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)
Madden, P.: Automated Program Transformation Through Proof Transformation. PhD thesis, University of Edinburgh (1991)
Manna, Z.: Mathematical Theory of Computing. McGraw-Hill, New York (1974)
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
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)
Morgan, C.: Programming from Specifications. Prentice-Hall, New York (1990)
Schneider, S., Treharne, H.: CSP theorems for communicating B machines. Form. Asp. Comput. 17(4) (2005)
Trinder, P.W., Hammond, K., Loidl, H.-W., Peyton Jones, S.L.: Algorithm + strategy = parallelism. J. Funct. Program. 8(1), 23–60 (1998)
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
Author information
Authors and Affiliations
Corresponding author
Rights 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
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10990-011-9067-y