aboutsummaryrefslogtreecommitdiffstats
path: root/src/Main.hs
blob: 513b8cc735e4b98a723ba47f8a1498608fc6cda7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module Main where

import Data.GraphViz
import Data.Graph.Inductive
import Data.Graph.Inductive.PatriciaTree
import Data.GraphViz.Attributes.Complete
import Data.GraphViz.Commands
import Data.Text.Lazy
import Data.Text.IO as T

import Test.VeriFuzz

instance Labellable Gate where
  toLabelValue gate = StrLabel . pack $ show gate

main :: IO ()
--main = sample (arbitrary :: Gen (Circuit Input))
main = do
  gr <- (randomDAG 100 :: IO (Gr Gate ()))
  runGraphviz (graphToDot quickParams $ emap (\_ -> "") gr) Png "output.png"
  T.putStrLn $ generate gr