export A1="(Get_Left'Count>0)or(Get_Right'Count>0)"
export A2="(Get_Left'Count>0)and(Get_Right'Count>0)"

export A3="(Get_Left_Q'Count>0)or(Get_Right_Q'Count>0)"
export A4="(Get_Left_Q'Count>0)and(Get_Right_Q'Count>0)"

echo "DEBUT" > res.diner

for i3 in $A4 $A3 $A1 $A2 
do
for i1 in $A1 $A2 $A3 $A4
do
for i2 in $A1 $A2 $A3 $A4
do
   echo "-- ========================================================="
   echo EXP1=$i1 
   echo EXP2=$i2 
   echo EXP3=$i3
   sed s/EXP1/$i1/ < chop_glob.adb |sed s/EXP2/$i2/ |sed s/EXP3/$i3/ > chop.adb
   gnatmake -f diner 2> /dev/null
   echo "-- =========================================================" >> res.diner
   echo EXP1=$i1 >> res.diner
   echo EXP2=$i2 >> res.diner
   echo EXP3=$i3>> res.diner
   if ./lance_philo >> res.partiel
   then
      echo OK >> res.diner
      echo OK
   else
      echo PROBLEME >> res.diner
      echo PROBLEME 
   fi
   tail res.partiel >> res.diner
   echo "-- ========================================================="
done
done
done
