ArticleslgStudy

mathematics

Hume (programming language)

Hume (programming language) is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Hume (programming language) rather than just read about it. In short: Hume is a functionally based programming language developed at the University of St Andrews and Heriot-Watt University in Scotland since the year 2000. The language name is both an acronym meaning 'Higher-order Unified Meta-Environment' and an honorific to the 18th-century philosopher David Hume.

Hume (programming language) — main illustration
Hume (programming language) — illustration

Key takeaways

  • Hume (programming language) belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Hume (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Hume (programming language) from memory before moving on to harder problems.

Reference excerpt

Hume is a functionally based programming language developed at the University of St Andrews and Heriot-Watt University in Scotland since the year 2000. The language name is both an acronym meaning 'Higher-order Unified Meta-Environment' and an honorific to the 18th-century philosopher David Hume. It targets real-time computing embedded systems, aiming to produce a design that is both highly abstract, and yet allows precise extraction of time and space execution costs. This allows guaranteeing the bounded time and space demands of executing programs. Hume combines functional programming ideas with ideas from finite-state automata. Automata are used to structure communicating programs into a series of "boxes", where each box maps inputs to outputs in a purely functional way using high-level pattern-matching. It is structured as a series of levels, each of which exposes different machine properties.

Design model The Hume language design attempts to maintain the essential properties and features required by the embedded systems domain (especially for transparent time and space costing) whilst incorporating as high a level of program abstraction as possible. It aims to target applications ranging from simple microcontrollers to complex real-time systems such as smartphones. This ambitious goal requires incorporating both low-level notions such as interrupt handling, and high-level ones of data structure abstraction etc. Such systems are programmed in widely differing ways, but the language design should accommodate such varying requirements. Hume is a three-layer language: an outer (static) declaration/metaprogramming layer, an intermediate coordination layer describing a static layout of dynamic processes and the associated devices, and an inner layer describing each process as a (dynamic) mapping from patterns to expressions. The inner layer is stateless and purely functional. Rather than attempting to apply cost modeling and correctness proving technology to an existing language framework either directly or by altering a more general language (as with e.g., RTSJ), the approach taken by the Hume designers is to design Hume in such a way that formal models and proofs can definitely be constructed. Hume is structured as a series of overlapping language levels, where each level adds expressibility to the expression semantics, but either loses some desirable property or increases the technical difficulty of providing formal correctness/cost models.

Characteristics The interpreter and compiler versions differ a bit.

the interpreter (concept prover) admits timeout and custom exceptions. the compiler admits heap and stack cost bounding but exceptions only print the exception name. The coordination system wires boxes in a dataflow programming style. The expression language is Haskell-like. The message passing concurrency system remembers JoCaml's join-patterns or Polyphonic C Sharp chords, but with all channels asynchronous. There is a scheduler built-in that continuously checks pattern-matching through all boxes in turn, putting on hold the boxes that cannot copy outputs to busy input destinations.

Examples

Vending machine

References

Further reading Patai, Gergely; Hanak, Peter (2007). "Embedded Functional Programming in Hume" (PDF). Archived from the original (PDF) on 23 December 2016.

External links The Hume Programming Language web site The Hume Project at Heriot-Watt University EmBounded project, certifies resource-bounded code in Hume Hume and Multicore

Illustrations

Hume (programming language): Hume Statue in Edinburgh
Hume Statue in Edinburgh

Worked examples

Example 1 — a first encounter with Hume (programming language)

Start with the simplest possible case. Write down what Hume (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Hume (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Hume (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Hume (programming language)

In research
Hume (programming language) appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Hume (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Hume (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Embedded systems, Functional languages, Haskell programming language family, so understanding it makes those chapters shorter.
In everyday life
Look for Hume (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Hume (programming language)” →

How to study Hume (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Hume (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Hume (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Hume (programming language) in simple terms?

Hume is a functionally based programming language developed at the University of St Andrews and Heriot-Watt University in Scotland since the year 2000. The language name is both an acronym meaning 'Higher-order Unified Meta-Environment' and an honorific to the 18th-century philosopher David Hume.

Why does Hume (programming language) matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Hume (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Hume (programming language).

Tags

  • Embedded systems
  • Functional languages
  • Haskell programming language family
  • Systems programming languages

Keep exploring