Commit 842ae816 authored by Benoit Barbot's avatar Benoit Barbot

fix output

parent ebd65551
Pipeline #1059 passed with stages
in 12 minutes and 36 seconds
......@@ -19,6 +19,8 @@ OUTPUT_VARIABLE GIT_REVISION
OUTPUT_STRIP_TRAILING_WHITESPACE
)
message("Compiler used: " ${CMAKE_CXX_COMPILER_ID})
ADD_DEFINITIONS(
-O3 -Wall -Wno-sign-compare
-DGIT_REVISION=\"${GIT_REVISION}\"
......
......@@ -4,9 +4,11 @@ nb_points=${2:-10000}
size_poly=${3:-10}
loopsize=${4:-10}
sage script_tocosmos_PTA.sage $1 $1.grml $size_poly -1 -unif
outname=${1%.*}.grml
Cosmos $1.grml --loop "#$loopsize" --trace-place "x_1,x_2,x_3,t_a,t_b,t_c,t_a1,t_a2,t_b1,t_b2" --output-trace $1.dat 0.0 --max-run "$nb_points" --use-van-der-corput --set-Horizon "#$loopsize" --batch 0 --width 0
sage script_tocosmos_PTA.sage $1 $outname $size_poly -1 -unif
Cosmos $outname --loop "#$loopsize" --trace-place "x_1,x_2,x_3,t_a,t_b,t_c,t_a1,t_a2,t_b1,t_b2" --output-trace $1.dat 0.0 --max-run "$nb_points" --use-van-der-corput --set-Horizon "#$loopsize" --batch 0 --width 0
#grep 'time_' $1.dat > preplot.dat
grep 't_a' $1.dat > preplota.dat
grep 't_b' $1.dat > preplotb.dat
......@@ -14,7 +16,7 @@ grep 't_c' $1.dat > preplotc.dat
#linecombinator $1.dat preplot.dat
gnuplot -c gnplotscript.gp $1_VDC.png
Cosmos $1.grml --loop "#$loopsize" --trace-place "x_1,x_2,x_3,t_a,t_b,t_c,t_a1,t_a2,t_b1,t_b2" --output-trace $1.dat 0.0 --max-run "$nb_points" --batch 0 --width 0
Cosmos $outname --loop "#$loopsize" --trace-place "x_1,x_2,x_3,t_a,t_b,t_c,t_a1,t_a2,t_b1,t_b2" --output-trace $1.dat 0.0 --max-run "$nb_points" --batch 0 --width 0
#grep 'time_' $1.dat > preplot.dat
#grep 'time_0_0\|time_1_0\|time_2_0' $1.dat > preplota.dat
#grep 'time_0_1\|time_1_1\|time_2_1\|time_3_0' $1.dat > preplotb.dat
......@@ -25,7 +27,7 @@ grep 't_c' $1.dat > preplotc.dat
#linecombinator $1.dat preplot.dat
gnuplot -c gnplotscript.gp $1_Unif.png
Cosmos Iso_$1.grml --loop "#$loopsize" --trace-place "x_1,x_2,x_3,t_a,t_b,t_c,t_a1,t_a2,t_b1,t_b2" --output-trace Iso_$1.dat 0.0 --max-run "$nb_points" --batch 0 --width 0
Cosmos Iso_$outname.grml --loop "#$loopsize" --trace-place "x_1,x_2,x_3,t_a,t_b,t_c,t_a1,t_a2,t_b1,t_b2" --output-trace Iso_$1.dat 0.0 --max-run "$nb_points" --batch 0 --width 0
grep 't_a' Iso_$1.dat > preplota.dat
grep 't_b' Iso_$1.dat > preplotb.dat
grep 't_c' Iso_$1.dat > preplotc.dat
......
......@@ -3,7 +3,6 @@
################################################################################
Actions: Generate
Temporary directory set to:tmp
Binary directory path set to:/Users/barbot/Documents/Cosmos/bin/
Start Parsing testdeterministic.grml
read model : formalism = http://formalisms.cosyverif.org/sptgd-net.fml
place i(0){
......
#use "../testTeamCity.ml";;
Sys.command "Cosmos testdeterministic.grml -v 4 --tmp-status only-gen | head -n 50 > testout";;
raw_cosmos "testdeterministic.grml -v 4 --tmp-status only-gen | head -n 50 | grep -v Binary > testout" true;;
if (Sys.command "diff testout defaultOutpoutv4") <> 0
then update_log false "testOutput"
else update_log true "testOutput" ;;
......@@ -9,26 +9,26 @@ test_cosmos "TestWeight" "TestWeight.grml" "" "--loop 2.1 --max-run 10000" ["Thr
test_cosmos "TestWeight2" "TestWeight2.gspn" "" "--loop '#19' --max-run 10000" ["Throughput_t1", 17.27; "Throughput_t0", 1.727] ;;
test_cosmos "lognormal" "testlognormal.grml" "testdistrib.lha" ""
test_cosmos "lognormal" "testlognormal.grml" "testdistrib.lha" ""
["MeanVal", 2.636323945294441 ; "VarVal", 4.626008723827832];;
test_cosmos "geometric" "testgeometric.grml" "testdistrib.lha" ""
test_cosmos "geometric" "testgeometric.grml" "testdistrib.lha" ""
["MeanVal",(0.7 /. 0.98) ; "VarVal",(0.7 *. 0.7 *. 0.02 /. (0.98 *. 0.98))];;
test_cosmos "uniform" "testuniform.grml" "testdistrib.lha" ""
test_cosmos "uniform" "testuniform.grml" "testdistrib.lha" ""
["MeanVal",(1.0)];;
test_cosmos "exponential" "testexponential.grml" "testdistrib.lha" ""
test_cosmos "exponential" "testexponential.grml" "testdistrib.lha" ""
["MeanVal",(0.5); "VarVal",(1. /. 4.)];;
test_cosmos "deterministic" "testdeterministic.grml" "testdistrib.lha" ""
test_cosmos "deterministic" "testdeterministic.grml" "testdistrib.lha" ""
["MeanVal",(2.0)];;
test_cosmos "triangle" "testtriangle.grml" "testdistrib.lha" ""
test_cosmos "triangle" "testtriangle.grml" "testdistrib.lha" ""
["MeanVal",(8.0 /. 3.)];;
(*;"VarVal", (1.0+.9.0+.16.-. 3.0 -. 4.0 -. 12.0)/.18.0 *)
test_cosmos "erlang" "testerlang.grml" "testdistrib.lha" ""
test_cosmos "erlang" "testerlang.grml" "testdistrib.lha" ""
["MeanVal",(5.0/.0.7)];;
test_cosmos "Weibull" "testweibull.grml" "testdistrib.lha" ""
......@@ -37,12 +37,12 @@ test_cosmos "Weibull" "testweibull.grml" "testdistrib.lha" ""
test_cosmos "Pareto" "testpareto.grml" "testdistrib.lha" ""
["MeanVal", 0.75 (* k*x_m/(k-1) = 3/2 * 0.5 *);
"VarVal", 3.0 /. 16.0 (* k*x_m^2 / (k-1)^2(k-1) = 3*0.5^2/2^2 *)];;
test_cosmos "gamma" "testgamma.grml" "testdistrib.lha" ""
"VarVal", 3.0 /. 16.0 (* k*x_m^2 / (k-1)^2(k-1) = 3*0.5^2/2^2 *)];;
test_cosmos "gamma" "testgamma.grml" "testdistrib.lha" ""
["MeanVal",(5.0*.0.7)];;
test_cosmos "discrete uniform" "testdiscreteuniform.grml" "testdistrib.lha" ""
test_cosmos "discrete uniform" "testdiscreteuniform.grml" "testdistrib.lha" ""
["MeanVal",(8.0)];;
test_cosmos "age memory" "testagememory.grml" "testagememory.lha" "--max-run 10000"
......@@ -52,10 +52,10 @@ test_cosmos "normal" "testnormal.grml" "testdistrib.lha" "--max-run 10000"
["MeanVal",(10.0); "VarVal",(2.0*.2.0)];;
test_cosmos "Userdefined" "testuserdefine.grml" "testdistrib.lha" "--max-run 1000"
["MeanVal",(4.0); "VarVal",(5.33321869776)];;
["MeanVal",(4.0); "VarVal",(5.33321869776)];;
test_cosmos "Userdefined" "testuserdefinepoly.grml" "testdistrib.lha" "--max-run 1000"
["MeanVal",(4.0); "VarVal",(5.33321869776)];;
["MeanVal",(4.0); "VarVal",(5.33321869776)];;
test_cosmos "TokenInitialGuard" "tokenInitGuard.grml" "testdistrib.lha" "--max-run 1000"
["MeanVal",(1.0); "VarVal",(1.0)];;
["MeanVal",(1.0); "VarVal",(1.0)];;
......@@ -232,8 +232,8 @@ let string_date () =
Printf.sprintf "%i/%i/%i %i:%i:%i" tm.Unix.tm_mday tm.Unix.tm_mon
(tm.Unix.tm_year+1900) tm.Unix.tm_hour tm.Unix.tm_min tm.Unix.tm_sec
let exec_cosmos model prop opt printcmd =
let cmd = sprintf "%s %s %s %s %s" !cosmos_path model prop !cosmos_options opt in
let raw_cosmos opt printcmd =
let cmd = sprintf "%s %s" !cosmos_path opt in
let wd = Sys.getcwd () in
if printcmd then (
print_string (wd^":\t");
......@@ -245,6 +245,10 @@ let exec_cosmos model prop opt printcmd =
result.date <- string_date ();
result
let exec_cosmos model prop opt printcmd =
let cmd = sprintf "%s %s %s %s" model prop !cosmos_options opt in
raw_cosmos cmd printcmd
let test_cosmosBash testname model prop opt v =
print_color (sprintf "testStarted: %s \n" testname) 33;
flush stdout;
......
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