You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

54 lines
1.4 KiB

  1. #!/bin/bash
  2. if [ "$#" != 1 ];
  3. then
  4. echo "Wrong number of arguments! Provide a filename for the results!"
  5. elif [ -a $1 ]; then
  6. echo "File for results already exists!"
  7. else
  8. DIR="."
  9. echo '#!/bin/bash' >> $1
  10. echo 'executable="timeout 3600 ../build/src/storm"' >> $1
  11. echo 'arguments="-bisim -i 1000000 --parametric --parametricRegion --region:refinement 0.05 --region:samplemode off"' >> $1
  12. echo "mkdir results" >> $1
  13. declare -a modeltypes=("pdtmc" "pmdp")
  14. for modeltype in "${modeltypes[@]}"
  15. do
  16. if [ "$modeltype" == "pdtmc" ];
  17. then
  18. declare -a models=("crowds" "nand" "brp_rewards2" "brp_rewards4" "brp")
  19. dobisim="-bisim"
  20. else
  21. declare -a models=("brp" "coin2" "coin4" "zeroconf" "reporter2" "reporter4")
  22. dobisim=""
  23. fi
  24. echo "# $modeltype""s" >> $1
  25. for model in "${models[@]}"
  26. do
  27. modelfolder="$DIR/$modeltype/$model"
  28. suffix="-"
  29. while read instance;
  30. do
  31. output='$executable '
  32. output="$output""-s $modelfolder/$instance --prop $modelfolder/$model.prctl --region:regions "
  33. region=$(head -n 1 $modelfolder/$model"_space.txt")
  34. region="$(echo -e "${region}" | tr -d '[[:space:]]')"
  35. output="$output"'"'$region'" $arguments | tee '
  36. instanceString="$(echo -e "${instance}" | tr -d '[[:space:]]')"
  37. instanceString=${instanceString//[,=]/_}
  38. output="$output""./results/$modeltype""_$instanceString.log &"
  39. echo $output >> $1
  40. done < "$modelfolder/models"
  41. done
  42. done
  43. echo 'wait' >> $1
  44. fi