The copilot package

[Tags: bsd3, library, program]

Can you write a list in Haskell? Then you can write embedded C code using Copilot. Here's a Copilot program that computes the Fibonacci sequence (over Word 64s) and tests for even numbers:

 fib :: Streams
 fib = do
  "fib" .= [0,1] ++ var "fib" + (drop 1 $ varW64 "fib")
  "t" .= even (var "fib")
    where even :: Spec Word64 -> Spec Bool
          even w = w `mod` const 2 == const 0

Copilot contains an interpreter, a compiler, and uses a model-checker to check the correctness of your program. The compiler generates constant time and constant space C code via Tom Hawkin's Atom (thanks Tom!). Copilot was originally developed to write embedded monitors for more complex embedded systems, but it can be used to develop a variety of functional-style embedded code.


[Skip to ReadMe]

Properties

Versions0.21, 0.22, 0.23, 0.25, 0.26, 0.27, 0.28, 1.0, 1.0.1, 1.0.2, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.1.0, 2.1.1, 2.1.2
Change logNone available
Dependenciesatom (>=1.0.5), base (>4 && <5), containers (>=0.2.0.1), directory, filepath (>=1.0.0.0), mtl (>=1.0.0.0), process (>=1.0.0.0), random (>=1.0.0.0) [details]
LicenseBSD3
AuthorLee Pike <leepike@gmail.com>, Robin Morisset, Alwyn Goodloe, Sebastian Niller
MaintainerLee Pike <leepike@gmail.com>
CategoryLanguage
Home pagehttp://leepike.github.com/Copilot/
UploadedTue Sep 21 01:07:36 UTC 2010 by LeePike
DistributionsNixOS:2.1.2
Downloads3406 total (119 in last 30 days)
Votes
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees

Readme for copilot-0.22

Copilot: A (Haskell DSL) stream language for generating hard real-time C code.

Can you write a list in Haskell? Then you can write embedded C code using
Copilot. Here's a Copilot program that computes the Fibonacci sequence (over
Word 64s) and tests for even numbers:


fib :: Streams
fib = do
  "fib" .= [0,1] ++ var "fib" + (drop 1 $ varW64 "fib")
  "t" .= even (var "fib")
    where even :: Spec Word64 -> Spec Bool
          even w = w `mod` const 2 == const 0    

Copilot contains an interpreter, a compiler, and uses a model-checker to check
the correctness of your program. The compiler generates constant time and
constant space C code via Tom Hawkin's Atom (thanks Tom!). Copilot was
originally developed to write embedded monitors for more complex embedded
systems, but it can be used to develop a variety of functional-style embedded
code.


********
Please visit <http://leepike.github.com/Copilot/> for more information about
installing and using Copilot.

Also available as index.html in the gh-pages branch of the Copilot repo.  In
your local repo,

  > git checkout gh-pages 

and you should see index.html.
********