Monthly Archives: August 2009

Automated Package Tracking for Arch Haskell

It’s a lot of work managing the Haskell packages for Arch Linux. We use the principle of automating all parts of the packaging process, and rely on cabal to give us good metadata about our packages. However, over time we end up with packages generated for Arch using old versions of tools, or gaps in coverage.

In order to ensure consistent, high quality packages, we’ve been building a programmatic interface to AUR and Hackage, to automate checking of package sanity.

You can find:

With the new AUR package linter tool it should be easier to ensure all those Haskell packages are building and working as desired.

Advertisements

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