Skip to main content

Type Refinement in Ruby

  • Conference paper
Functional Programming, Glasgow 1990

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

  • 58 Accesses

Abstract

This paper is about refinement in David Murphy Ruby. Ruby is a relational language whose main concern is structure; it describes how primitive relations are structured to form a larger relation. As such, it is admirably suited to the design of VLSI or highly parallel systems.

Design in Ruby usually proceeds by calculation. One starts with a highlevel relational description of a system, and gradually refines it towards an implementation. Refinement is achieved by the use of laws, — every Ruby combinator has many laws describing how it can be manipulated, introduced and eliminated, — and by introducing more information. A refinement step, then, involves calculating a new relation from a old one. Most of the Ruby literature concentrates on refinement using ‘built-in’ laws; this paper, in contrast, will focus on the matter of adding new information from outside the system. (Such information will capture pragmatic engineering decisions, and should be articulated as formally as possible, so that the consequences of those decisions can be elucidated.)

Typically, a Ruby specification will involve user-defined types; in writing the specification of an arithmetic chip, for instance, we may well need to deal with various rings of integers. These types must eventually be implemented in whatever the target medium provides: bits in VLSI; more primitive data-types in some parallel software applications. Hence, at some stage in the design, the user-defined types will need to be refined; a ring of integers, for instance, will often be implemented using fixed size words of bits. We will be concerned with describing how such type refinement information can be used properly. In particular, the later a type refinement happens in a design, the more global we want the effects to be. Thus we will show how to drag type constructors thorugh ‘plumbing’ circuitry to achieve this effect.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Bibliograpiiy

  1. R. Bird, Lectures on constructive functional programming, Tech. report, Programming Research Group technical monograph PRG-69, September 1988.

    Google Scholar 

  2. M. Sheeran G. Jones, Timeless truths about sequential circuits,Concurrent computations: algorithms, architecture and technology (S. Schwartz S. Tewksbury, B. Dickinson, ed.), Plenum Press, New York.

    Google Scholar 

  3. G. Jones, Designing circuits by calculation, Tech. Report PRG—TR-10–90, Oxford University Computing Laboratory, 1990.

    Google Scholar 

  4. G. Jones and M. Sheeran, Circuit design in Ruby,Formal Methods for VLSI Design (J. Staunstrup, ed.), North—Holland.

    Google Scholar 

  5. Relations and refinement in circuit design, Refinement, Hursley 1990 ( C. Morgan, ed.), Springer-Verlag Workshops in Computing Series.

    Google Scholar 

  6. W. Luk, Analysing parametrised designs by non-standard interpretation,Application Specific Array Processesors, IEEE Computer Press.

    Google Scholar 

  7. D. Murphy, Arithmetic on the A110, Tech. report, Department of Computing Science, University of Glasgow, 1990.

    Google Scholar 

  8. D. Murphy and G. Hutton, Programming with relations,In preparation.

    Google Scholar 

  9. A. Mycroft, Polymorphic type schemes and recursive definitions,International Symposium on Programming, LNCS 167, Springer-Verlag, pp. 217–239.

    Google Scholar 

  10. M. Sheeran, Describing and reasoning about circuits using relations,Proceedings of the workshop on theoretical aspects of VLSI design (J. Tucker et al., ed.), CUP.

    Google Scholar 

  11. G. Jones W. Luk, From specification to parametrised architectures,The fusion of hardware design and verification (G. Milne, ed.).

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Simon L. Peyton Jones Graham Hutton Carsten Kehler Holst

Rights and permissions

Reprints and permissions

Copyright information

© 1991 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Murphy, D. (1991). Type Refinement in Ruby. In: Jones, S.L.P., Hutton, G., Holst, C.K. (eds) Functional Programming, Glasgow 1990. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3810-5_17

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3810-5_17

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19667-9

  • Online ISBN: 978-1-4471-3810-5

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics