diff --git a/_config.yml b/_config.yml deleted file mode 100644 index 9544d23..0000000 --- a/_config.yml +++ /dev/null @@ -1,4 +0,0 @@ -theme: jekyll-theme-minimal - -title: Copilot -description: A stream DSL for writing embedded C programs diff --git a/about.html b/about.html new file mode 100644 index 0000000..1d849db --- /dev/null +++ b/about.html @@ -0,0 +1,73 @@ + + + + Copilot: about + + + + +
+ + +
+

About

+ +

Copilot is a realtime programming language and Runtime Verification framework. +It allows users to write concise programs in a simple but powerful way using a +stream-based approach.

+ +

Programs can be interpreted for testing, or translated C99 code to be +incorporated in a project, or as a standalone application. The C99 backend +ensures us that the output is constant in memory and time, making it suitable +for systems with hard realtime requirements. Copilot provides a strong type +system that helps keeping programmers from making common mistakes, aiding in +the quality of the code.

+ +

Copilot provides a library providing higher-level constructs, for example for +defining clocks, a Boyer-Moore majority voting implementation and various +temporal logics, including Linear Temporal logic (LTL) and Past Time LTL.

+ +

Code example

+ +

This is a simple example showing basic usage. It implements a home heating +system: It heats when temp gets too low, and stops when it is high enough. It +reads temperature as a byte (range -50C to 100C) and translates this to +Celsius.

+ +
{-# LANGUAGE RebindableSyntax #-}
+
+module Main where
+
+import Language.Copilot
+import Copilot.Compile.C99
+
+-- External temperature as a byte, range of -50C to 100C.
+temp :: Stream Word8
+temp = extern "temperature" Nothing
+
+-- Calculate temperature in Celsius.
+-- We need to cast the Word8 to a Float. Note that it is an unsafeCast, as there
+-- is no direct relation between Word8 and Float.
+ctemp :: Stream Float
+ctemp = (unsafeCast temp) * (150.0 / 255.0) - 50.0
+
+spec = do
+  -- Triggers that fire when the ctemp is too low or too high,
+  -- pass the current ctemp as an argument.
+  trigger "heaton"  (ctemp < 18.0) [arg ctemp]
+  trigger "heatoff" (ctemp > 21.0) [arg ctemp]
+
+-- Compile the spec
+main = reify spec >>= compile "heater"
+
+
+ + diff --git a/contact.html b/contact.html new file mode 100644 index 0000000..3c738b5 --- /dev/null +++ b/contact.html @@ -0,0 +1,60 @@ + + + + Copilot: contact + + + + +
+ + +
+

Contact & Help

+ +

Having trouble using Copilot, or encountered a possible bug? Asking questions +or reporting bugs can both be done through the issue +tracker at GitHub. This +helps us keep track of open bugs and problems, and allows us to easily comment +and discuss the issue.

+ +

General Questions

+ +

For general questions about Copilot, questions that are unsuited to be posted +publicly or if you are not in the possession of a GitHub account, please send +your questions to the maintainer, Ivan Perez +ivan.perezdominguez@nasa.gov.

+ +

Previous developers

+ +

The development of Copilot spans across several years. During these years +the following people have helped develop Copilot (in no particular order):

+ + +
+
+ + diff --git a/documentation.html b/documentation.html new file mode 100644 index 0000000..004a987 --- /dev/null +++ b/documentation.html @@ -0,0 +1,67 @@ + + + + Copilot: documentation + + + + +
+ + +
+

Documentation

+ +

A manual to Copilot can be downloaded here.

+ +

Copilot comes with a set of examples as part of its distribution, available in +the Examples +directory of +the repository.

+ +

Structure and Sources

+ +

Apart from the Copilot Github project +page, there are a number of sub-projects +that make up Copilot, that all share a single repository:

+ + + + +

Additionally there is a specific repository that lists most of the papers and +articles written on Copilot: +copilot-discussion.

+
+
+ + diff --git a/download.html b/download.html new file mode 100644 index 0000000..57b3c7e --- /dev/null +++ b/download.html @@ -0,0 +1,51 @@ + + + + Copilot: download + + + + +
+ + +
+

Download & Installing

+ +

Copilot is implemented as a Embedded Domain Specific Language in Haskell. +Currently Copilot 3.14 requires a version of the Glasgow Haskell Compiler (GHC) +of at least 8.6 to be installed. The recommended way to do this is by +installing the Haskell Platform. The +Haskell platform comes with the compiler and basic tools necessary to install +Copilot.

+ +

With a newly installed Haskell environment, we can easily install the latest +version of Copilot. As a regular user, just execute the following two commands +from the command line:

+ +
cabal update
+cabal install copilot
+
+ +

These commands first update the list of known packages, and secondly install +the latest available version of Copilot and all of its dependencies.

+ +

After these commands successfully finish, Copilot is installed and ready to +use.

+ +

Sources

+ +

The source code to Copilot can be found at our GitHub +project page.

+
+
+ + diff --git a/copilot_tutorial.pdf b/downloads/copilot_tutorial.pdf similarity index 100% rename from copilot_tutorial.pdf rename to downloads/copilot_tutorial.pdf diff --git a/haskell.css b/haskell.css new file mode 100644 index 0000000..2115ca4 --- /dev/null +++ b/haskell.css @@ -0,0 +1,15 @@ +.language-haskell mark.comment { + color: grey; +} + +.language-haskell mark.string { + color: orangered; +} + +.language-haskell mark.literal { + color: darkgreen; +} + +.language-haskell mark.keyword { + color: blue; +} diff --git a/home.css b/home.css new file mode 100644 index 0000000..11188ea --- /dev/null +++ b/home.css @@ -0,0 +1,27 @@ +#panel { + background: #764B8E; + padding: 2em; + + display: grid; + grid-template-columns: 1fr 1fr; + grid-gap: 2em; +} + +#panel p { + color: white; + text-shadow: 1px 1px black; +} + +#panel a { + color: inherit; +} + +#panel pre { + background: #222; + color: white; + padding: .5em; +} + +#panel .language-haskell mark.literal { + color: greenyellow; +} diff --git a/home.html b/home.html new file mode 100644 index 0000000..2a50714 --- /dev/null +++ b/home.html @@ -0,0 +1,98 @@ + + + + Copilot: home + + + + + +
+ + +
+
+

+ Copilot is a realtime programming language and Runtime Verification + framework. It allows users to write concise programs in a simple + but powerful way using a stream-based approach. +

+

+ Programs can be interpreted for testing, or translated C99 code to be + incorporated in a project, or as a standalone application. The C99 + backend ensures us that the output is constant in memory and time, + making it suitable for systems with hard realtime requirements. +

+

+ Learn more about the project... +

+
+
+
-- Raw temperature from sensor, range -50.0C to 100.0C.
+temp :: Stream Word8
+temp = extern "temperature" Nothing
+
+-- Transform the temperature to Celsius.
+ctemp :: Stream Float
+ctemp = (unsafeCast temp) * (150.0 / 255.0) - 50.0
+
+-- Bind two triggers with a 3.0C hysteresis.
+spec = do
+  trigger "heaton"  (ctemp < 18.0) [arg ctemp]
+  trigger "heatoff" (ctemp > 21.0) [arg ctemp]
+
+
+
+

News

+

Release 3.17 – 2023-11-07

+

We are pleased to announce the release of Copilot 3.16, a + stream-based DSL for writing and monitoring embedded C programs, + with an emphasis on correctness and hard realtime requirements. + Copilot is typically used as a high-level runtime verification + framework, and supports temporal logic (LTL, PTLTL and MTL), + clocks and voting algorithms.

+

Among others, Copilot has been used at the Safety Critical + Avionics Systems Branch of NASA Langley Research Center for + monitoring test flights of drones.

+

This release introduces compatibility with what4 versions up to + 1.5.1, and replaces several functions in copilot-core. The + second change is a breaking change: the functions replaced have been + deprecated and new alternatives introduced instead.

+

Details are available here + and here.

+

Current emphasis is on improving the codebase in terms of stability + and test coverage, removing unnecessary dependencies, hiding internal + definitions, and formatting the code to meet our new coding standards. + Upcoming releases will focus on introducing tests for + copilot-theorem and copilot-libraries. Users + are encouraged to participate by opening issues and asking questions via + our github + repo.

+

License

+

Copilot is distributed under the BSD-3-Clause license, which + can be found here.

+

Acknowledgements

+

We are grateful for NASA Contract NNL08AD13T to Galois, + Inc. and the National Institute of Aerospace, which partially + supported this work.

+

Additionally NASA Langley contracts 80LARC17C0004 and + NNL09AA00A supported further development of Copilot.

+

We would like to thank Kaveh Darafsheh (NASA Langley Research + Center) for his help with testing Copilot. In addition numerous + people have helped with smaller things, reporting bugs etc. + Thanks to all of them!

+
+
+ + diff --git a/index.html b/index.html new file mode 100644 index 0000000..2a50714 --- /dev/null +++ b/index.html @@ -0,0 +1,98 @@ + + + + Copilot: home + + + + + +
+ + +
+
+

+ Copilot is a realtime programming language and Runtime Verification + framework. It allows users to write concise programs in a simple + but powerful way using a stream-based approach. +

+

+ Programs can be interpreted for testing, or translated C99 code to be + incorporated in a project, or as a standalone application. The C99 + backend ensures us that the output is constant in memory and time, + making it suitable for systems with hard realtime requirements. +

+

+ Learn more about the project... +

+
+
+
-- Raw temperature from sensor, range -50.0C to 100.0C.
+temp :: Stream Word8
+temp = extern "temperature" Nothing
+
+-- Transform the temperature to Celsius.
+ctemp :: Stream Float
+ctemp = (unsafeCast temp) * (150.0 / 255.0) - 50.0
+
+-- Bind two triggers with a 3.0C hysteresis.
+spec = do
+  trigger "heaton"  (ctemp < 18.0) [arg ctemp]
+  trigger "heatoff" (ctemp > 21.0) [arg ctemp]
+
+
+
+

News

+

Release 3.17 – 2023-11-07

+

We are pleased to announce the release of Copilot 3.16, a + stream-based DSL for writing and monitoring embedded C programs, + with an emphasis on correctness and hard realtime requirements. + Copilot is typically used as a high-level runtime verification + framework, and supports temporal logic (LTL, PTLTL and MTL), + clocks and voting algorithms.

+

Among others, Copilot has been used at the Safety Critical + Avionics Systems Branch of NASA Langley Research Center for + monitoring test flights of drones.

+

This release introduces compatibility with what4 versions up to + 1.5.1, and replaces several functions in copilot-core. The + second change is a breaking change: the functions replaced have been + deprecated and new alternatives introduced instead.

+

Details are available here + and here.

+

Current emphasis is on improving the codebase in terms of stability + and test coverage, removing unnecessary dependencies, hiding internal + definitions, and formatting the code to meet our new coding standards. + Upcoming releases will focus on introducing tests for + copilot-theorem and copilot-libraries. Users + are encouraged to participate by opening issues and asking questions via + our github + repo.

+

License

+

Copilot is distributed under the BSD-3-Clause license, which + can be found here.

+

Acknowledgements

+

We are grateful for NASA Contract NNL08AD13T to Galois, + Inc. and the National Institute of Aerospace, which partially + supported this work.

+

Additionally NASA Langley contracts 80LARC17C0004 and + NNL09AA00A supported further development of Copilot.

+

We would like to thank Kaveh Darafsheh (NASA Langley Research + Center) for his help with testing Copilot. In addition numerous + people have helped with smaller things, reporting bugs etc. + Thanks to all of them!

+
+
+ + diff --git a/index.md b/index.md deleted file mode 100644 index 0ea0f7c..0000000 --- a/index.md +++ /dev/null @@ -1,179 +0,0 @@ -## Introduction -Copilot is a runtime verification framework written in Haskell. It allows the -user to write programs in a simple but powerful way using a stream-based -approach. - -Programs can be interpreted for testing, or translated C99 code to be -incorporated in a project, or as a standalone application. The C99 backend -ensures us that the output is constant in memory and time, making it suitable -for systems with hard realtime requirements. - - -## Installation - -Currently the Copilot 3.0 release requires GHC 8.0 or higher. - -Copilot is available from -[Hackage](https://hackage.haskell.org/package/copilot), and the latest version -can be installed easily: - - cabal install copilot - -Alternatively one can download and install it from the repositories as well: - - git clone https://github.com/Copilot-Language/copilot.git - cd copilot - git submodule update --init --remote - - Compiling can either be done in a Nix-style build, or a traditional one: - - _Nix-Style build (Cabal >= 2.x)_ - - cabal build # For Cabal 3.x - cabal v2-build # For Cabal 2.x - - _Traditional build (Cabal 1.x)_ - - cabal install --dependencies-only - cabal build - -Typically one would only go this route to develop Copilot. For regular users -the cabal method is highly recommended. - - -## Example -Here follows a simple example of a heating system. Other examples can be found -in the [Examples -directory](https://github.com/Copilot-Language/Copilot/tree/master/Examples) -of the main repository. - - -- This is a simple example with basic usage. It implements a simple home - -- heating system: It heats when temp gets too low, and stops when it is high - -- enough. It read temperature as a byte (range -50C to 100C) and translates - -- this to Celcius. - - module Heater where - - import Language.Copilot - import Copilot.Compile.C99 - - import Prelude hiding ((>), (<), div) - - -- External temperature as a byte, range of -50C to 100C - temp :: Stream Word8 - temp = extern "temperature" Nothing - - -- Calculate temperature in Celcius. - -- We need to cast the Word8 to a Float. Note that it is an unsafeCast, as there - -- is no direct relation between Word8 and Float. - ctemp :: Stream Float - ctemp = (unsafeCast temp) * (150.0 / 255.0) - 50.0 - - spec = do - -- Triggers that fire when the ctemp is too low or too high, - -- pass the current ctemp as an argument. - trigger "heaton" (ctemp < 18.0) [arg ctemp] - trigger "heatoff" (ctemp > 21.0) [arg ctemp] - - -- Compile the spec - main = reify spec >>= compile "heater" - - -## Documentation -A manual to Copilot can be downloaded [here](copilot_tutorial.pdf). - -Copilot comes with a set of examples as part of its distribution, available in -the [Examples -directory](https://github.com/Copilot-Language/Copilot/tree/master/Examples) of -the main repository. - - -## Structure and Sources -Apart from the Copilot [Github project -page](https://github.com/Copilot-Language), there are a number of sub-projects -that make up Copilot: - -- `Copilot`: The main Copilot package, to which all others are a dependency. - One should install this one to install Copilot. - ([Sources](https://github.com/Copilot-Language/Copilot)) - ([Hackage](https://hackage.haskell.org/package/copilot)) - -- `copilot-core`: The core language, which efficiently represents Copilot - expressions. The core is only of interest to implementers wishing to add a - new back-end to Copilot. - ([Sources](https://github.com/Copilot-Language/copilot-core)) - ([Hackage](https://hackage.haskell.org/package/copilot-core)) - -- `copilot-language`: The front-end of Copilot defining the user language. A - user of Copilot typically interacts with this library. - ([Sources](https://github.com/Copilot-Language/copilot-language)) - ([Hackage](https://hackage.haskell.org/package/copilot-language)) - -- `copilot-libraries`: User-supplied libraries for Copilot, including - linear-temporal logic, fault-tolerant voting, regular expressions, etc. - ([Sources](https://github.com/Copilot-Language/copilot-libraries)) - ([Hackage](https://hackage.haskell.org/package/copilot-libraries)) - -- `copilot-c99`: A backend writing hard realtime C99 code. It writes - readable output and ensures the output code is constant in memory and time. - ([Sources](https://github.com/Copilot-Language/copilot-c99)) - ([Hackage](https://hackage.haskell.org/package/copilot-c99)) - -- `copilot-theorem`: Some tools to prove properties on Copilot. - ([Sources](https://github.com/Copilot-Language/copilot-theorem)) - ([Hackage](https://hackage.haskell.org/package/copilot-theorem)) - -Additionally there is a specific repository that lists most of the papers and -articles written on Copilot: -[copilot-discussion](https://github.com/Copilot-Language/copilot-discussion). - - -## Acknowledgements -We are grateful for NASA Contract NNL08AD13T to Galois, Inc. and the National -Institute of Aerospace, which partially supported this work. - -Additionally NASA Langley contracts 80LARC17C0004 and NNL09AA00A supported -further development of Copilot. - -We would like to thank Kaveh Darafsheh (NASA Langley Research Center) for his -help with testing Copilot. - -In addition numerous people have helped with smaller things, reporting bugs -etc. Thanks to all of them! - - -## License -Copilot is distributed under the BSD-3-Clause license, which can be found -[here](https://raw.githubusercontent.com/Copilot-Language/Copilot/master/LICENSE) - - -## Issues / Bugs -If you happen to find any issues or bugs, please add an issue to the -corresponding repository on our Github pages. - - -## Contact -The project is currently maintained by Frank Dedden and Alwyn Goodloe (NASA -Langley Research Center). For any questions, remarks, ideas etc. please send an -email to [dev@dedden.net](mailto:dev@dedden.net). - - -## The Copilot Team -The development of Copilot spans across several years. During these years -the following people have helped develop Copilot (in no particular order): - -* Lee Pike -* Alwyn Goodloe -* Robin Morisset -* Sebastian Niller -* Nis Wegmann -* Chris Hathhorn -* Eli Mendelson -* Jonathan Laurent -* Laura Titolo -* Georges-Axel Jolayan -* Macallan Cruff -* Ryan Spring -* Lauren Pick -* Frank Dedden -* Ivan Perez diff --git a/style.css b/style.css new file mode 100644 index 0000000..e0894ed --- /dev/null +++ b/style.css @@ -0,0 +1,156 @@ +/* Layout and spacing */ +* { + margin: 0; + padding: 0; +} + +#page { + max-width: 60em; + margin: 0 auto; +} + +#header { + line-height: 6em; + padding: 0 1.5em; +} + +#menu { + padding: 0 1em; +} + +#content { + padding: 3em 5em; +} + +p { + padding: .3em 0; + line-height: 1.7em; +} + +h1, h2, h3, h4, h5, h6 { + margin: 1em 0 0 0; +} + +ul { + margin: 0 0 0 3em; +} + +li { + padding: .2em 0; +} + +#menu p { + margin: 0; + padding: 0; +} + + +/* The palette used for the website: +Purple + shade 0 = #582A72 + shade 1 = #9775AA + shade 2 = #764B8E + shade 3 = #3D1255 + shade 4 = #260339 + +Blue + shade 0 = #29506D + shade 1 = #718EA4 + shade 2 = #496D89 + shade 3 = #123652 + shade 4 = #042037 +*/ +/* Theme */ +* { + font-family: sans-serif; +} + +p { + font-size: 93%; + text-align: justify; +} + +h1, h2, h3, h4, h5, h6 { + font-weight: 100; +} + +h1 { + border: 0; + border-style: solid; + border-width: 0 0 2px 0; + border-color: #3D1255; + font-size: 150%; + font-variant: small-caps; +} + +h2 { + font-size: 110%; +} + +code { + font-family: monospace; +} + +pre { + border: 0; + border-style: solid; + border-width: 0 0 0 5px; + border-color: #9775AA; + padding: .5em; +} + +#page { + background: white; + box-shadow: 0 0 .5em lightgrey; +} + +body { + background: #eee; +} + +#header a { + color: #3D1255; + font-variant: small-caps; + font-weight: 100; + font-size: 250%; + text-decoration: none; +} + +#header span { + color: grey; + font-style: italic; + margin: 0 0 0 1.5em; +} + +#menu { + background: #3D1255; +} + +#menu a { + color: white; + display: inline-block; + padding: .2em 1em; + text-decoration: none; + text-shadow: 1px 1px black; +} + +#menu a:hover { + background: #764B8E; +} + +#content a { + color: #29526D; +} + +#content a:hover { + color: #718EA4; +} + +mark { + background: transparent; + font-family: inherit; +} + +li { + font-size: 93%; +}