copilot: A lazy-list language for generating constant-time and constant-space C programs. Uses Atom as a backend.
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]
Modules
[Index]
- Language
- Language.Copilot
- Language.Copilot.AdHocC
- Language.Copilot.Analyser
- Language.Copilot.AtomToC
- Language.Copilot.Compiler
- Language.Copilot.Core
- Language.Copilot.Dispatch
- Examples
- Language.Copilot.Help
- Language.Copilot.Interface
- Language.Copilot.Interpreter
- Language.Copilot.Language
- Libs
- Language.Copilot.PrettyPrinter
- Tests
- Language.Copilot.Variables
- Language.Copilot
Downloads
- copilot-0.21.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.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, 2.2.0, 2.2.1, 3.0, 3.0.1, 3.1, 3.2, 3.2.1, 3.3, 3.4, 3.5, 3.6, 3.7, 3.8, 3.9, 3.10, 3.11, 3.12, 3.13, 3.14, 3.15, 3.16, 3.16.1, 3.17, 3.18, 3.18.1, 3.19, 3.19.1, 3.20, 4.0, 4.1 |
---|---|
Dependencies | atom (>=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] |
License | BSD-3-Clause |
Author | Lee Pike <leepike@gmail.com>, Robin Morisset, Alwyn Goodloe, Sebastian Niller |
Maintainer | Lee Pike <leepike@gmail.com> |
Category | Language |
Home page | http://leepike.github.com/Copilot/ |
Uploaded | by LeePike at 2010-09-21T00:57:38Z |
Distributions | LTSHaskell:3.19.1, Stackage:4.1 |
Reverse Dependencies | 6 direct, 0 indirect [details] |
Downloads | 27825 total (207 in the last 30 days) |
Rating | 2.0 (votes: 1) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |