packages feed

guarded-rewriting-0.1: performance/Gen/Arith/Test.hs

module Gen.Arith.Test (main) where

import Common.Arith
import Gen.Arith.Rules
import System.CPUTime (getCPUTime)
import Common.GuardedRewriting

main :: IO ()
main = do
   t1 <- getCPUTime
   let p e = if isSolved (solve rules e) then True else error (show e)
   if all p formulas then (return ()) else error "ERROR!"
   t2 <- getCPUTime
   let diff = fromInteger (t2 - t1) / (1000000000 :: Double)
   putStrLn ("\t" ++ show diff)