Predictable Space Behaviour in FSM-Hume
- 190 Downloads
The purpose of the Hume language design is to explore the expressibility/decidability spectrum in resource-constrained systems, such as real-time embedded or control systems. It is unusual in being based on a combination of λ-calculus and finite state machine notions, rather than the more usual propositional logic, or flat finite-state-machine models. It provides a number of high level features including polymorphic types, arbitrary but sized user-defined data structures and automatic memory management, whilst seeking to guarantee strong space/time behaviour and maintaining overall determinacy. A key issue is predictable space behaviour. This paper describes a simple model for calculating stack and heap costs in FSM-Hume, a limited subset of full Hume. This cost model is evaluated against an example taken from the research literature: a simple mine drainage control system. Empirical results suggest that our model is a good predictor of stack and heap usage, and that this can lead to good bounded memory utilisation.
KeywordsCost Model Abstract Machine Space Behaviour Output Wire Cost Rule
Unable to display preview. Download preview PDF.
- 1.K.R. Apt and E.-R. Olderog, Verification of Sequential and Concurrent Programs, 2nd Edition, Springer Verlag, 1997.Google Scholar
- 2.J. Armstrong, S.R. Virding, and M.C. Williams, Concurrent Programming in Erlang, Prentice-Hall, 1993.Google Scholar
- 3.L. Augustsson, Compiling Lazy Functional Languages, Part II, PhD Thesis, Dept. of Computer Science, Chalmers University of Technology, Göteborg, Sweden, 1987.Google Scholar
- 4.M. Barabanov, A Linux-based Real-Time Operating System, M.S. Thesis, Dept. of Comp. Sci., New Mexico Institute of Mining and Technology, June 97.Google Scholar
- 5.A. Burns and A. Wellings, Real-Time Systems and Programming Languages (Third Edition), Addison Wesley Longman, 2001, Chapter 17, pp. 653–684.Google Scholar
- 6.R. Burstall, “Inductively Defined Functions in Functional Programming Languages”, Dept. of Comp. Sci., Univ. of Edinburgh, ECS-LFCS-87-25, April, 1987.Google Scholar
- 7.D.H. Fijma and R.T. Udink, “A Case Study in Functional Real-Time Programming”, Dept. of Computer Science, Univ. of Twente, The Netherlands, Memoranda Informatica 91-62, 1991.Google Scholar
- 8.K. Hammond and G.J. Michaelson “An Abstract Machine Implementation for Embedded Systems Applications in Hume”, http://www.hume-lang.org/papers/HAM.ps, January 2003.
- 9.K. Hammond and G.J. Michaelson “The Mine Drainage Control System in Hume”, http://www.hume-lang.org/examples/pump, January 2003.
- 10.R.J.M. Hughes, L. Pareto, and A. Sabry. “Proving the Correctness of Reactive Systems Using Sized Types”, Proc. POPL’96 — ACM Symp. on Principles of Programming Languages, St. Petersburg Beach, FL, Jan. 1996.Google Scholar
- 11.R.J.M. Hughes and L. Pareto, “Recursion and Dynamic Data Structures in Bounded Space: Towards Embedded ML Programming’, Proc. 1999 ACM Intl. Conf. on Functional Programming (ICFP ”99), Paris, France, pp. 70–81, 1999.Google Scholar
- 12.J. McDermid, “Engineering Safety-Critical Systems”, I. Wand and R. Milner(eds), Computing Tomorrow: Future Research Directions in Computer Science, Cambridge University Press, 1996, pp. 217–245.Google Scholar
- 13.J.C. Peterson, P. Hudak and C. Elliot, “Lambda in Motion: Controlling Robots with Haskell”, First International Workshop. on Practical Aspects of Declarative Languages (PADL’ 99), San Antonio, Texas, January 1999, Springer-Verlag LNCS No. 1551, pp. 91–105.Google Scholar
- 14.S.L. Peyton Jones (ed.), L. Augustsson, B. Boutel, F.W. Burton, J.H. Fasel, A.D. Gordon, K. Hammond, R.J.M. Hughes, P. Hudak, T. Johnsson, M.P. Jones, J.C. Peterson, A. Reid, and P.L. Wadler, Report on the Non-Strict Functional Language, Haskell (Haskell98) Yale University, 1999.Google Scholar
- 16.A.J. Rebón Portillo, Kevin Hammond, H.-W. Loidl and P. Vasconcelos, “A Sized Time System for a Parallel Functional Language”, Proc. Intl. Workshop on Implementation of Functional Languages (IFL 2002), Madrid, Spain, Sept. 2002.Google Scholar
- 18.D.A. Turner, “Elementary Strong Functional Programming”, Proc. Symp. on Funct. Prog. Langs. in Education — FPLE’ 95, Springer-Verlag LNCS No. 1022, Dec. 1995.Google Scholar
- 19.M. Wallace and C. Runciman, “Extending a Functional Programming System for Embedded Applications”, Software: Practice & Experience, 25(1), January 1995.Google Scholar