Commit 93908d6a authored by AVANZINI Martin's avatar AVANZINI Martin
Browse files

initial source code distribution

parent 5fc74657
.stack-work/
*.lock
*flymake.*
pwhile.cabal
*~
\ No newline at end of file
set -o pipefail
tmout="120s"
opt="-degree 2 -dump-stats"
bin="./absynth-exe"
output="absynth-results.txt"
ostimeout="timeout"
pwd
cp /home/pldiae/absynth/source/absynth absynth-exe
cp -r /home/pldiae/absynth/gsl_caller .
cp -r /home/pldiae/absynth/llvm-reader .
rm -f ${output}
if [[ "$OSTYPE" == "darwin"* ]]; then
ostimeout="gtimeout"
fi
for ex in `find examples/oopsla -type f -name '*.imp' -o -name '*.absynth' | sort`
do
echo "------------------------------------" >> ${output}
echo $(basename "${ex}") >> ${output}
echo "------------------------------------" >> ${output}
tmp=/tmp/`basename ${ex}`.imp
cp $ex $tmp
echo -ne "`basename $ex`\t\t"
time $ostimeout $tmout $bin $opt $tmp | tee -a ${output} | tee "`basename $ex`.absynth-out" | head -n 1
code=$?
rm $tmp
code=$?
case $code in
124)
echo "[TIMEOUT]"
;;
esac
echo "" >> ${output}
done
echo "Done."
rm -f ${bin}
rm -rf gsl_caller
rm -rf llvm-reader
......@@ -6,7 +6,7 @@ import Data.Maybe (listToMaybe)
import PWhile.InferEt
import Data.PWhile.CostExpression
import PWhile.Testbed.DSL
import PWhile.DSL
import PWhile.Parser
main :: IO ()
......
......@@ -22,8 +22,7 @@ import qualified Text.PrettyPrint.ANSI.Leijen as PP
import Data.PWhile.CostExpression
import qualified PWhile.InferEt as InferEt
import PWhile.Parser (fromFile')
import PWhile.Testbed.DSL
import PWhile.Testbed.Examples
import PWhile.DSL
import PWhile.Util
......@@ -45,7 +44,7 @@ import PWhile.Util
main :: IO ()
main = do
let bnch = oopsla
let bnch = examples
let ?to = 60
as <- getArgs
case as of
......@@ -154,56 +153,11 @@ run1 (Problem pid p) = do
timeout :: Int -> IO a -> IO (Maybe a)
timeout sec = Timeout.timeout (sec * 1000000)
absynth :: Benchmark
absynth = Benchmark "absynth"
[ Problem "linear/2drdwalk" absynth2drdwalk
, Problem "linear/bayesian_Network" absynthBayesianNetwork
, Problem "linear/ber" absynthBer
, Problem "linear/bin" absynthBin
, Problem "linear/C4B_t09" absynthC4Bt09
, Problem "linear/C4B_t13" absynthC4Bt13
, Problem "linear/C4B_t15" absynthC4Bt15
, Problem "linear/C4B_t19" absynthC4Bt19
, Problem "linear/C4B_t30" absynthC4Bt30
, Problem "linear/C4B_t61" absynthC4Bt61
, Problem "linear/condand" absynthCondand
, Problem "linear/cooling" absynthCooling
, Problem "linear/filling_vol" absynthFillingVol
-- , Problem "linear/hyper" absynthHyper
, Problem "linear/linear01" absynthLinear01
, Problem "linear/trapped_miner" absynthTrappedMiner
, Problem "linear/prnes" absynthPrnes
, Problem "linear/prspeed" absynthPrspeed
, Problem "linear/race" absynthRace
, Problem "linear/rdseql" absynthRdseql
, Problem "linear/rdspeed" absynthRdspeed
, Problem "linear/rdwalk" absynthRdwalk
, Problem "linear/robot" absynthRobot
, Problem "linear/roulette" absynthRoulette
, Problem "linear/rejection_sampling" absynthSampling
, Problem "linear/sprdwalk" absynthSprdwalk
, Problem "polynomial/complex" absynthComplex
, Problem "polynomial/multirace" absynthMultirace
, Problem "polynomial/pol04" absynthPol04
, Problem "polynomial/pol05" absynthPol05
, Problem "polynomial/pol06" absynthPol06
, Problem "polynomial/pol07" absynthPol07
, Problem "polynomial/Rdbub" absynthRdbub
, Problem "polynomial/trader" absynthTrader
, Problem "couponCollector" couponCollector
]
{-# NOINLINE pldi #-}
pldi :: Benchmark
pldi = unsafePerformIO $ Benchmark "pldi" <$> do
fps <- sort . lines <$> readCreateProcess (shell "find examples/pldi -type f") mempty
forM fps $ \fp -> Problem fp <$> fromFile' fp
{-# NOINLINE oopsla #-}
oopsla :: Benchmark
oopsla = unsafePerformIO $ Benchmark "oopsla" <$> do
fps <- sort . lines <$> readCreateProcess (shell "find examples/oopsla -type f -name '*.imp' -o -name '*.pwhile' | sort") mempty
{-# NOINLINE examples #-}
examples :: Benchmark
examples = unsafePerformIO $ Benchmark "example-distribution" <$> do
fps <- sort . lines <$> readCreateProcess (shell "find examples -type f -name '*.imp' | sort") mempty
forM fps $ \fp -> Problem fp <$> fromFile' fp
......@@ -229,25 +183,6 @@ printBenchmarkTex (Benchmark _ ps) =
escaped (x:xs) = x : escaped xs
math s = "$" <> s <> "$"
-- parens t = "(" <> t <> ")"
-- braces t = "{" <> t <> "}"
-- a <+> b = a <> " " <> b
-- mulf = "\\mulf"
-- addf = "\\plusf"
-- divf = "\\divf"
-- texInt i = "\\bm" <> braces (show i)
-- texFrac q
-- | denominator q == 1 = texInt (numerator q)
-- | otherwise = braces (texInt (numerator q)) <> divf <> braces (texInt (denominator q))
-- BExp
-- texDisj (Disj (S.toList -> ds)) = intercalate " \\vee " (map texConj ds)
-- texConj (Conj (S.toList -> es)) = intercalate " \\wedge " (map texLit es)
-- texLit (e1 :>=: e2) = texExp e1 <+> "\\ge" <+> texExp e2
-- texExp :: Exp -> String
-- texExp = show . PP.pretty
texCExp = show . PP.pretty
......
name: pwhile
version: 0.1.0.0
description: Please see the README on Github at <https://github.com/githubuser/pwhile#readme>
name: ecoimp
version: 0.2
author: Martin Avanzini and Michael Schaper
maintainer: martin.avanzini@inria.fr and michael.schaper@uibk.ac.at
copyright: 2018 Martin Avanzini and Michael Schaper
copyright: 2018 Martin Avanzini and Michael Schaper and Georg Moser
license: BSD3
license-file: LICENSE
build-type: Simple
......@@ -43,9 +42,7 @@ library
PWhile.InvariantSolver.Naive
PWhile.InferEt
PWhile.SampleEt
PWhile.Testbed.Examples
PWhile.Testbed.Absynth.Polynomial
PWhile.Testbed.DSL
PWhile.DSL
PWhile.Util
default-extensions:
GADTs
......@@ -61,23 +58,23 @@ library
if flag(Debug)
cpp-options: -DDEBUG
executable pwhile-run-testbed
executable ecoimp-run-testbed
hs-source-dirs: app
main-is: RunTestbed.hs
default-language: Haskell2010
build-depends:
base >= 4.7 && < 5, containers, process, filepath, directory, time, ansi-wl-pprint,
gubs, pwhile
gubs, ecoimp
ghc-options:
-Wall -O2
if flag(Debug)
cpp-options: -DDEBUG
executable pwhile-exe
executable ecoimp
hs-source-dirs: app
main-is: Run.hs
default-language: Haskell2010
build-depends:
base >= 4.7 && < 5, time, pwhile
base >= 4.7 && < 5, time, ecoimp
ghc-options:
-Wall -O2
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment