Hume
A functionally based research language from Scotland that wrapped a Haskell-style expression layer inside concurrent finite-state boxes, aiming to prove - not just hope - that real-time embedded programs stay within space and time bounds.
Created by Kevin Hammond (University of St Andrews) and Greg Michaelson (Heriot-Watt University), with contributors at both institutions including Robert Pointon; the name honours the 18th-century Scottish philosopher David Hume and doubles as the backronym Higher-order Unified Meta-Environment
Hume is what happens when functional programmers take hard real-time seriously. Designed from 2000 onwards by Kevin Hammond at the University of St Andrews and Greg Michaelson at Heriot-Watt University, it is named for the 18th-century Scottish philosopher David Hume - fitting for a language built in Edinburgh’s and St Andrews’ academic orbit - with the engineer’s backronym Higher-order Unified Meta-Environment attached for good measure.
The problem Hume attacked is easy to state and brutally hard to solve. Languages like Haskell offer higher-order functions, polymorphic types, pattern matching and automatic memory management - but with essentially no way to promise how much memory or time a program will use. Embedded and safety-critical systems demand exactly those promises. Hume’s wager was that you could keep the abstraction and the guarantees, if you designed the language around cost modelling from day one.
History and origins
Hume first appeared in July 2000, in a paper titled “Hume: a Functionally Inspired Language for Safety-Critical Systems” at the 2nd Scottish Functional Programming Workshop in St Andrews, followed within months by “The Dynamic Properties of Hume” at the IFL 2000 workshop in Aachen. Both authors came from the functional-programming research community - Hammond had been deeply involved in Haskell implementation work - and the language wears that heritage openly: its expression language reads like Haskell.
But Hume was never a general-purpose Haskell competitor. Its stated purpose was to explore what the designers called the expressibility/costability spectrum: how much expressive power a language can offer while its space and time behaviour remains statically analysable. That framing - treating decidable cost analysis as a first-class design constraint, on equal footing with type safety - is Hume’s signature idea.
Design: boxes, wires, and two languages in one
A Hume program is built from boxes - concurrent processes that never terminate. Each box repeatedly pattern-matches on its inputs and generates outputs, which travel along asynchronous wires to other boxes or to streams connected to devices. The result is a layered design:
- an outer declaration and metaprogramming layer,
- a coordination layer describing the network of boxes, wires, streams and devices - essentially a dataflow language of communicating finite-state machines,
- an inner expression layer - stateless and purely functional, mapping input patterns to output expressions in Haskell-like style.
State lives only in the wiring (a wire can be initialised with a value, and a box can feed its own output back to an input), so each box body stays purely functional and analysable, while the coordination layer provides the reactive, concurrent behaviour an embedded controller needs.
The canonical small example - this one adapted from the community’s LiteratePrograms archive - shows all three pieces at once. The box counts as it greets, feeding its counter back to itself while routing the printable tuple to standard output:
| |
The ladder of Humes
Hume’s most distinctive contribution is that it is not one language but a nested family, each level a sublanguage of the next, each with different formal properties:
| Level | What it allows | What can be proved |
|---|---|---|
| HW-Hume | Bits and tuples only - a deliberately impoverished language for characterising hardware | Decidable equivalence and termination; predictable time and space |
| FSM-Hume | Adds fixed-precision integers, reals, strings and vectors with conditionals - finite-state-machine designs | Strongly bounded time and space |
| HO-Hume / Template-Hume | Adds a repertoire of higher-order functions with known cost models, such as map and fold | Costs derived from the known models |
| PR-Hume | Adds user-defined primitive-recursive bounded functions | Termination still guaranteed; bounds computable |
| Full Hume | Unrestricted recursion - Turing complete | General analysis undecidable |
The idea is that a developer writes at the highest level the problem needs, and the toolchain tells you what guarantees survive. A hardware interface might live in HW-Hume with everything decidable; a control loop in FSM-Hume with hard space and time bounds; only the parts that truly need general recursion pay the price of undecidability. Few languages before or since have made “how analysable is this program?” such an explicit, graduated dial.
EmBounded: putting the proofs on the road
The theory met practice in EmBounded (2005-2008), a €1.26M EU Framework 6 project (IST-510255) coordinated by Hammond at St Andrews, with Heriot-Watt, Ludwig-Maximilians-Universität München, the French LASMEA laboratory in Clermont-Ferrand, and the timing-analysis company AbsInt GmbH. Its goal was to automatically identify, quantify and certify resource bounds for Hume programs, evaluated against realistic applications from real-time control and computer vision.
The results gave Hume its best war stories. Researchers at LMU Munich and St Andrews developed new theoretical models - in the amortised-analysis tradition - that predict dynamic memory and time usage directly from Hume source code. AbsInt’s aiT analyser supplied worst-case-execution-time figures for the compiled code, the same class of tool used to certify avionics software. Prototype Hume implementations ran in under 30KB on a standalone Renesas M32C development board, according to the project’s 2006 report in ERCIM News - a striking footprint for a language with higher-order functions and automatic memory management. And the showcase application was real-time vision: LASMEA researchers wrote road-feature-detection algorithms in Hume, intended for CyCab, the laboratory’s small autonomous electric vehicle - reportedly capable of speeds up to about 30 km/h.
Toolchain and evolution
Over its life the project produced a full research toolchain: a Hume interpreter, the prototype phamc compiler targeting the Hume Abstract Machine (HAM), the later humec compiler (final recorded release 1.0.3, November 2008), an extended HAM interpreter, and the hamdb debugger. The last stable language release is recorded as version 0.8, on April 25, 2008. Reference implementations ran on ordinary developer machines of the era - the language’s Wikipedia entry records IA-32 and PowerPC support on Linux and macOS - alongside the embedded targets developed in EmBounded.
After EmBounded, the EPSRC-funded Islay project (2008-2011) at Heriot-Watt carried the research forward into areas including image processing, vision and control. The Heriot-Watt project page records the Hume effort as running “from around 2000 to 2013”; after that, development stopped. The language is dormant: the reports, papers, interpreters and compilers remain archived on the university sites, but there is no active community, package ecosystem or maintained distribution.
Why it matters
Hume never escaped the research world, and it is fair to say no mainstream language descends from it. Its importance is of a different kind.
It took cost seriously as a language-design problem. Most languages treat resource usage as an implementation detail to be measured afterwards. Hume made “can we statically bound this program’s space and time?” the organising principle, and its ladder of sublanguages remains one of the clearest demonstrations that expressiveness and analysability can be traded deliberately rather than surrendered wholesale.
It proved functional programming could fit a microcontroller. A pattern-matching, higher-order, garbage-collected language running in under 30KB on an embedded board, with machine-checked memory and timing bounds, was a genuinely provocative demonstration in the mid-2000s - and remains relevant as functional techniques continue to press into embedded and safety-critical domains.
It carried a research lineage bigger than itself. The amortised resource-analysis techniques sharpened on Hume during EmBounded fed a research tradition of automatic resource-bound inference that has long outlived the language. Like its philosopher namesake - who was famously sceptical about what can be known with certainty - Hume the language was an extended, rigorous inquiry into exactly how much a compiler can promise. The answers it found are still cited; the language that asked them sleeps in the archives of two Scottish universities.
Timeline
Notable Uses & Legacy
CyCab autonomous vehicle computer vision (EmBounded)
The flagship EmBounded case study developed real-time computer-vision algorithms in Hume that could detect road features from a moving vehicle, with the stated aim of applying them to the CyCab, an autonomous electric vehicle used by the LASMEA laboratory in Clermont-Ferrand - a domain where the project argued formally guaranteed memory and timing bounds matter more than raw throughput
Renesas M32C embedded deployment
EmBounded produced prototype Hume implementations compact enough to run in under 30KB on a standalone Renesas M32C development board (as reported by the project in ERCIM News, 2006), demonstrating that a garbage-collected, higher-order functional language could fit genuine microcontroller constraints
Certified worst-case timing with AbsInt's aiT
EmBounded partner AbsInt GmbH applied its aiT worst-case-execution-time analyser to compiled Hume code, so that timing guarantees for Hume programs rested on the same industrial-strength binary-level analysis used for avionics and automotive software
Resource-analysis research at LMU Munich and St Andrews
Hume served as the vehicle for a line of formal resource-analysis research: EmBounded researchers at Ludwig-Maximilians-Universität München and St Andrews built new theoretical models that predict dynamic memory and time bounds directly from Hume source, work in the amortised-analysis tradition that continued to develop long after the language itself went quiet