Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ea188e40c4
Lee Pike
file 21 lines (17 sloc) 0.847 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
--------------------------------------------------------------------------------
-- Copyright © 2011 National Institute of Aerospace / Galois, Inc.
--------------------------------------------------------------------------------

-- | Generate a random spec and pretty-print it.

module Random ( randomEx ) where

import Copilot.Core.PrettyPrint as P
import Copilot.Core.Random (randomSpec)
import Copilot.Core.Random.Weights (simpleWeights)
import System.Random (newStdGen)

randomEx :: IO ()
randomEx = do
  g <- newStdGen
  let p = randomSpec 10 simpleWeights g -- have to give a dummy number of rounds
                                        -- to simulate to generate a
                                        -- spec---mostly used for
                                        -- interpreting/QuickCheck testing.
  putStrLn (P.prettyPrint p)
Something went wrong with that request. Please try again.