Permalink
Browse files

Updated README and syntax tweak in Examples.hs.

  • Loading branch information...
1 parent aadab6e commit bb98a29e8e72a975bef522a22218f15280b11d51 @leepike committed Dec 31, 2011
Showing with 43 additions and 7 deletions.
  1. +42 −3 Examples/README
  2. +1 −4 Examples/StackExamples.hs
View
@@ -1,3 +1,42 @@
-This directory contains a number of examples. Examples.hs contains the simplest
-examples as well as demonstrating how to use the interpreter and multiple
-back-ends. Other files demonstrate the use of Copilot libraries.
+This directory contains a number of examples. They show off various aspects of
+the language and various backends, including compiling through the Atom (C99)
+backend, SBV backend, interpreting, and generating driver to model-check the two
+back-ends against each other (in Examples). The libraries are in the
+copilot-libraries package.
+
+ * AddMult: demonstrates Haskell-level recursion
+
+ * Array: external arrays
+
+ * BadExtVars: demonstrates the analyzer catches badly-typed external variables
+
+ * Cast: demonstrates type-safe casting
+
+ * ClockExamples: demonstrates the use of clocks (to control sampling rates)
+
+ * EngineExample: simple engine temperature monitor example
+
+ * Examples: a large number of small examples
+
+ * Examples2: more small examples
+
+ * ExtFuns: sampling external functions
+
+ * Local: using local variables (let expressions inside of Copilot)
+
+ * LTLExamples: demonstrates the bounded LTL library
+
+ * PTLTLExamples: demonstrates the past-time LTL library
+
+ * Random: how to generate a random specification for QuickCheck-type testing
+ (use the copilot-c99-qc executable to run QuickCheck tests against the Atom
+ backend).
+
+ * RegExpExamples: demonstrates the regular expressions library
+
+ * StackExamples: demonstrates the stack library
+
+ * StatExamples: demonstrates the statistics library
+
+ * VotingExamples: demonstrates the fault-tolerant voting library
+
@@ -22,18 +22,15 @@ pushValue = [ 1 ] ++ pushValue + 1
popSignal :: Stream Bool
popSignal = replicate 6 False P.++ replicate 6 True ++ false
-
-- all operations on a stack of depth 5, of type Word16 and with
-- start/default value 0
stackStream :: Stream Word16
stackStream = stack (5::Int) 0 popSignal pushSignal pushValue
-
stackTest :: Spec
-stackTest = do
+stackTest =
observer "stack" stackStream
-
stackExamples :: IO ()
stackExamples = do
prettyPrint stackTest

0 comments on commit bb98a29

Please sign in to comment.