Atom : a domain specific language for hard realtime applications

Atom 0.1.0 has just been released by Tom Hawkins.

Atom is an open source language, embedded in Haskell, for writing embedded real-time software. It was originally designed and deployed at Eaton Corporation to improve development times and ease of verification of hydraulic hybrid systems in buses and trucks. It has been open sourced, and is starting to be used for other embedded systems programming tasks.

Atom uses ideas from conditional term rewriting to compile atomic transition rules into C code with guarantees of constant memory use and execution time.

The productivity benefits were impressive from April 2009:

  • 5K lines of Haskell/atom replaced 120K lines of matlab, simulink,
    and visual basic.
  • 2 months to port simulink design to atom. – 3K lines of atom generates 22K lines of embedded C.
  • Rules with execution periods from 1ms to 10s all scheduled at
    compile time to a 1 ms main loop.
  • Atom design clears electronic/sw testing on first pass.
  • Currently in vehicle testing with no major issues.

Atom compiles Haskell source to C (so you can use it for writing regular old C programs). Here’s an example Atom kernel by Lee Pike:

atom "computeFib" $ do
  cond $ value runFib
  cond $ value i >. 0
  decr i
  snd <== (value fst) + (value snd)
  fst <== value snd

Examples are included in the Atom source.

It is available for Arch Linux:

Resources for Atom Programming

About these ads

2 responses to “Atom : a domain specific language for hard realtime applications

  1. Pingback: Top Posts « WordPress.com

  2. Pingback: Using Haskell for sizable real-time systems: how (if?)? | Ask Programming & Technology

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s