Repository navigation
Expand file tree
/
Copy pathcopilot.cabal
More file actions
85 lines (80 loc) · 3.79 KB
/
Copy pathcopilot.cabal
File metadata and controls
85 lines (80 loc) · 3.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: copilot
version: 1.0.3
cabal-version: >= 1.6
license: BSD3
license-file: LICENSE
author: Lee Pike, Robin Morisset, Alwyn Goodloe, Sebastian Niller
synopsis: A stream DSL for writing embedded C monitors.
build-type: Simple
maintainer: Lee Pike <leepike@galois.com>
category: Language, Embedded
homepage: http://leepike.github.com/Copilot/
description: 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
> let f = varW64 "fib"
> let t = varB "t"
> f .= [0,1] ++ f + (drop 1 f)
> t .= even f
> where even :: Spec Word64 -> Spec Bool
> even w' = w' `mod` 2 == 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.
extra-source-files: README
source-repository head
type: git
location: git://github.com/leepike/Copilot.git
library
ghc-options: -Wall
-- These build depends represent my current system. This will probably
-- build on packages outside these constraints.
build-depends:
base >= 4.0
, atom >= 1.0.8
, containers >= 0.2.0.1
, process >= 1.0.0.0
, random >= 1.0.0.0
, directory >= 1.0.0.0
, mtl >= 1.0.0.0
, filepath >= 1.0.0.0
, parsec >= 2.0
, unix >= 2.0
extensions:
exposed-modules: Language.Copilot
Language.Copilot.AdHocC
Language.Copilot.Core
Language.Copilot.Language
Language.Copilot.Language.Sampling
Language.Copilot.Language.FunctionCalls
Language.Copilot.Language.RandomOps
Language.Copilot.Language.Casting
Language.Copilot.AtomToC
Language.Copilot.Compiler
Language.Copilot.Interpreter
Language.Copilot.Help
Language.Copilot.Analyser
Language.Copilot.PrettyPrinter
Language.Copilot.Tests.Test
Language.Copilot.Tests.Random
Language.Copilot.Dispatch
Language.Copilot.Interface
Language.Copilot.Libs.ErrorChks
Language.Copilot.Libs.PTLTL
Language.Copilot.Libs.LTL
Language.Copilot.Libs.Indexes
Language.Copilot.Libs.Statistics
Language.Copilot.Libs.Vote
Language.Copilot.Libs.Clocks
Language.Copilot.Libs.RegExp
Language.Copilot.Examples.Examples
Language.Copilot.Examples.LTLExamples
Language.Copilot.Examples.PTLTLExamples
Language.Copilot.Examples.StatExamples