module Examples where import ChipModel import Algorithms import qualified FunFM as FM import Nat count :: Alg count bp rf = Write bp cnt $ Done (FM.update r0 cnt rf) where cnt = 1+FM.lookup rf r0 cntChip = chip (const count) initChip testcase1 = test (cntChip testInput1) {-#cert:testcase1#-} testInput1 = replicate 10 (O,[0,100,500,1000]) :: [Packet] test tst = putStr . unlines . map show $ tst