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.

52 lines
1.3 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="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  9. executable=$DIR/../build/src/storm
  10. timeout="timeout 3600"
  11. declare -a modeltypes=("pdtmc" "pmdp")
  12. for modeltype in "${modeltypes[@]}"
  13. do
  14. if [ "$modeltype" == "pdtmc" ];
  15. then
  16. declare -a models=("crowds" "nand" "brp_rewards2" "brp_rewards4" "brp")
  17. dobisim="-bisim"
  18. else
  19. declare -a models=("brp" "coin2" "coin4" "zeroconf" "reporter2" "reporter4")
  20. dobisim=""
  21. fi
  22. for model in "${models[@]}"
  23. do
  24. modelfolder="$DIR/$modeltype/$model"
  25. suffix="-"
  26. while read instance;
  27. do
  28. suffix="1$suffix"
  29. echo "Working on $modelfolder/$instance"
  30. echo "___WORKING ON $modeltype: $instance""____________" >>$1$suffix
  31. echo "_________________________________________________________________________________" >> $1$suffix
  32. $timeout "$executable" -s $modelfolder/$instance $dobisim --prop $modelfolder/$model.prctl --parametric --parametricRegion --region:regionfile $modelfolder/$model"_regions.txt" >> $1$suffix &
  33. done < "$modelfolder/models"
  34. wait
  35. # write logs into result file
  36. suffix="-"
  37. while read instance;
  38. do
  39. suffix="1$suffix"
  40. cat $1$suffix >> $1
  41. rm $1$suffix
  42. done < "$modelfolder/models"
  43. done
  44. done
  45. fi