import Criterion.Main import Foster.Interpreter import System.Environment (withArgs) main :: IO () main = defaultMain [ bgroup "foster generate" [ bench "100,100" $ whnfIO $ withArgs ["generate", "100,100", "-s", "-op1.txt"] interpret , bench "200,200" $ whnfIO $ withArgs ["generate", "200,200", "-s", "-op2.txt"] interpret , bench "500,500" $ whnfIO $ withArgs ["generate", "500,500", "-s", "-op3.txt"] interpret ] , bgroup "foster solve" [ bench "p1.txt" $ whnfIO $ withArgs ["solve", "-s", "-ip1.txt", "-os1.txt"] interpret , bench "p2.txt" $ whnfIO $ withArgs ["solve", "-s", "-ip2.txt", "-os2.txt"] interpret , bench "p3.txt" $ whnfIO $ withArgs ["solve", "-s", "-ip3.txt", "-os3.txt"] interpret ] , bgroup "foster check" [ bench "s1.txt" $ whnfIO $ withArgs ["check", "-s", "-ip1.txt", "-os1.txt"] interpret , bench "s2.txt" $ whnfIO $ withArgs ["check", "-s", "-ip2.txt", "-os2.txt"] interpret , bench "s3.txt" $ whnfIO $ withArgs ["check", "-s", "-ip3.txt", "-os3.txt"] interpret ] ]