Commit 47fa7fe5 authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Change the whole non-reg test scheme and make it work for win32 arch.

Add a  --ocamlc-version option to lurettetop and lutin.

The idea is to put all the .exp files into a `lurettetop/lutin --ocamlc-version`
dir so that I have an .exp file for each ocaml version.

If the `lurettetop --ocaml-version`/*.exp does not exist, I generate it.

Also, don't non-reg test lucky dirs anymore (because they are boring).

Aldo, don't rely on the HOSTTYPE env var, but use Sys.os_type instead.
parent cd27afd8
......@@ -22,16 +22,25 @@ build: gen_version
cd polka && make clean && make all && make install&& cd .. &&\
cd GBDDML && make clean && make && make all && make cp && cd ..&&\
cd source && make clean && make install&& cd ..&&\
ln -sf pre_release/$(HOSTTYPE) && \
ln -sf pre_release/$(HOSTTYPE)/bin && \
ln -sf pre_release/$(HOSTTYPE)/lib && \
ln -sf pre_release/$(HOSTTYPE)/include && \
make slink &&\
cd install && autoconf && cd .. &&\
make lus2lic && \
make cpcomp && \
./RUN_ME
lus2lic:
slink:
rm -rf $(HOSTTYPE) && ln -sf pre_release/$(HOSTTYPE)
rm -rf bin && ln -sf pre_release/$(HOSTTYPE)/bin
rm -rf lib && ln -sf pre_release/$(HOSTTYPE)/lib
rm -rf include && ln -sf pre_release/$(HOSTTYPE)/include
cp -rf $(LOCAL_INSTALL)/lib/* $(LIB_INSTALL_DIR)
cp -rf $(LOCAL_INSTALL)/include/* $(INC_INSTALL_DIR)
cpcomp:
cp `which lus2lic$(EXE)` $(BIN_INSTALL_DIR)
cp `which lus2ec` $(BIN_INSTALL_DIR)
cp `which ec2c$(EXE)` $(BIN_INSTALL_DIR)
cp `which simec$(EXE)` $(BIN_INSTALL_DIR)
clean:
......@@ -63,6 +72,8 @@ ci:
git commit -F log && make gen_version
dif:
git --no-pager diff --color-words
diff:
git diff HEAD -w > diff.diff
echo "il y a $(shell grep "+" diff.diff | wc -l) + et $(shell grep "-" diff.diff | wc -l) -"
......
......@@ -7,17 +7,6 @@ A4
Single
-2
1200 2
6 1665 5445 2160 5895
2 2 0 1 0 7 30 -1 20 0.000 0 0 -1 0 0 5
1665 5445 2160 5445 2160 5895 1665 5895 1665 5445
4 0 0 29 -1 18 12 0.0000 4 150 405 1710 5715 PRE\001
-6
6 10665 6840 11745 8190
2 2 0 1 0 7 41 -1 20 0.000 0 0 -1 0 0 5
10665 6840 11745 6840 11745 8190 10665 8190 10665 6840
2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 0 0 2
10665 7020 11745 7020
-6
6 5085 4995 6165 6306
6 5085 4995 6165 6306
2 2 0 1 0 7 40 -1 20 0.000 0 0 -1 0 0 5
......@@ -66,14 +55,18 @@ Single
10665 4995 11591 4995 11591 6152 10665 6152 10665 4995
-6
-6
6 10665 6885 11745 8235
2 2 0 1 0 7 41 -1 20 0.000 0 0 -1 0 0 5
10665 6885 11745 6885 11745 8235 10665 8235 10665 6885
2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 0 0 2
10665 7065 11745 7065
-6
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 2
1 1 3.10 75.00 135.00
3330 5715 4770 5715
2 1 0 1 0 7 50 -1 -1 0.000 0 0 -1 1 0 3
1 1 3.10 75.00 135.00
9810 5715 9810 7380 10665 7380
2 2 0 1 0 11 60 -1 20 0.000 0 0 -1 0 0 5
12060 8595 1215 8595 1215 3285 12060 3285 12060 8595
9810 5715 9810 7650 10665 7650
2 1 0 1 0 7 49 -1 -1 0.000 0 0 -1 1 0 2
1 1 3.10 75.00 135.00
8865 5715 10350 5715
......@@ -129,9 +122,17 @@ Single
2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 0 1 4
1 1 3.10 75.00 135.00
4770 7740 4410 7740 4410 8055 10665 8055
4 0 0 40 -1 12 10 0.0000 4 105 360 10935 6975 .rif\001
2 2 0 1 0 11 60 -1 20 0.000 0 0 -1 0 0 5
12375 8640 1215 8640 1215 3285 12375 3285 12375 8640
2 1 0 1 0 7 40 -1 -1 0.000 0 0 -1 1 0 6
1 1 3.10 75.00 135.00
11880 5715 12060 5715 12060 6750 10215 6750 10215 7335 10665 7335
2 2 0 1 0 26 30 -1 20 0.000 0 0 -1 0 0 5
1665 5445 2160 5445 2160 5895 1665 5895 1665 5445
4 0 0 40 -1 18 10 0.0000 4 120 705 2970 5760 LUCIOLE \001
4 0 0 40 -1 18 10 0.0000 4 120 720 5085 7650 sim2chro \001
4 0 0 40 -1 12 10 0.0000 4 90 270 5490 5265 ENV\001
4 0 0 40 -1 12 10 0.0000 4 90 270 8190 5265 SUT\001
4 0 0 40 -1 12 10 0.0000 4 105 630 10980 5265 oracle \001
4 0 0 40 -1 12 10 0.0000 4 105 360 10980 7020 .rif\001
4 0 0 29 -1 18 12 0.0000 4 150 405 1710 5715 PRE\001
......@@ -47,6 +47,6 @@ test-lutin:
# problem ~
test: test-lucky test-lutin
test: test-lutin
#inputs "a":int "b":bool "c":real
#outputs "x":int "y":bool "z":real
# step 0
10 0 20.000000
#outs 10 1 24.114930
# step 1
10 0 20.000000
#outs 8 0 24.286921
# step 2
10 0 20.000000
#outs 14 1 22.747039
# step 3
10 0 20.000000
#outs 7 0 15.451893
# step 4
10 0 20.000000
#outs 10 1 16.883184
# step 5
10 0 20.000000
#outs 7 1 22.336302
# step 6
10 0 20.000000
#outs 7 1 24.311803
# step 7
10 0 20.000000
#outs 8 0 24.391350
# step 8
10 0 20.000000
#outs 14 1 24.400635
# step 9
10 0 20.000000
#outs 8 0 17.074026
......@@ -62,16 +62,20 @@ $(OBJDIR)/%.o : $(OBJDIR) $(SRCDIR)/%.c
call_external_c_code.luc_pp:call_external_c_code.luc
../../../bin/lucky_cpp call_external_c_code.luc call_external_c_code.luc_pp $(LD_ARCH)
test: clean $(OBJDIR)/$(MAIN).$(DLEXT) call_external_c_code.luc_pp
EXPDIR=`../../../bin/lutin$(EXE) --ocaml-version`
$(EXPDIR):
[ -d $(EXPDIR) ] || mkdir -p $(EXPDIR) ; make utest
test: clean $(OBJDIR)/$(MAIN).$(DLEXT) call_external_c_code.luc_pp $(EXPDIR)
rm -f test.rif0 && \
../../../bin/lucky$(EXE) -l 10 $(OPT) -seed 834966010 \
call_external_c_code.luc_pp | sed -e "s/^M//" | grep -v " Lucky Version" > test.rif
rm -f test.res && diff -u -i test.rif.exp test.rif > test.res
rm -f test.res && diff -u -i $(EXPDIR)/test.rif.exp test.rif > test.res
[ ! -s test.res ] && make clean
utest:
cp test.rif test.rif.exp
cp test.rif $(EXPDIR)/test.rif.exp
clean:
rm -rf $(OBJDIR) *.rif *.rif0 call_external_c_code.luc_pp
......
#inputs
#outputs "f1":real "f2":real "i":int
#step 1
#outs 97.94 0.84 9
#step 2
#outs 6.65 -0.45 4
#step 3
#outs 3.90 0.53 8
#step 4
#outs 54.27 0.92 8
#step 5
#outs 61.70 0.88 10
#step 6
#outs 14.54 1.00 2
#step 7
#outs 28.91 -0.62 3
#step 8
#outs 70.03 -0.79 8
#step 9
#outs 84.84 0.87 3
#step 10
#outs 15.18 0.21 6
#end
-1 true 6.849600
-3 true 8.396126
-6 true 5.273248
-9 true 9.376807
-11 true 11.262250
-7 true 12.155279
-4 true 7.950617
-6 true 5.922781
-1 true 2.435590
-1 true -0.287173
2 true -4.982815
This diff is collapsed.
#inputs
#outputs "cpt":int
#step 1
#outs 1
#step 2
#outs 2
#step 3
#outs 3
#step 4
#outs 3
#step 5
#outs 4
#step 6
#outs 5
#step 7
#outs 6
#step 8
#outs 6
#step 9
#outs 7
#step 10
#outs 8
#step 11
#outs 9
#step 12
#outs 10
#step 13
#outs 10
#step 14
# current node: infinite_weight:3
# No transition is labelled by a satisfiable formula.
# The Lucky automata is blocked.
#inputs
#outputs "x":real
#step 1
#outs 6.55
#step 2
#outs 8.92
#step 3
#outs 5.31
#step 4
#outs 7.14
#step 5
#outs 5.02
#step 6
#outs 8.99
#step 7
#outs 6.03
#step 8
#outs 6.14
#step 9
#outs 0.00
#step 10
#outs -1.00
#step 11
#outs -1.00
#step 12
#outs -1.00
#step 13
#outs -1.00
#step 14
#outs -1.00
#step 15
#outs -1.00
#step 16
#outs -1.00
#step 17
#outs -1.00
#step 18
#outs -1.00
#step 19
#outs -1.00
#step 20
#outs -1.00
#end
#inputs
#outputs "s.f1":bool "s.f2":(zero, one, two) "s.f3[0][0][0]":int "s.f3[0][0][1]":int "s.f3[0][0][2]":int "s.f3[0][0][3]":int "s.f3[0][1][0]":int "s.f3[0][1][1]":int "s.f3[0][1][2]":int "s.f3[0][1][3]":int "s.f3[1][0][0]":int "s.f3[1][0][1]":int "s.f3[1][0][2]":int "s.f3[1][0][3]":int "s.f3[1][1][0]":int "s.f3[1][1][1]":int "s.f3[1][1][2]":int "s.f3[1][1][3]":int "s.f3[2][0][0]":int "s.f3[2][0][1]":int "s.f3[2][0][2]":int "s.f3[2][0][3]":int "s.f3[2][1][0]":int "s.f3[2][1][1]":int "s.f3[2][1][2]":int "s.f3[2][1][3]":int "s.f3[3][0][0]":int "s.f3[3][0][1]":int "s.f3[3][0][2]":int "s.f3[3][0][3]":int "s.f3[3][1][0]":int "s.f3[3][1][1]":int "s.f3[3][1][2]":int "s.f3[3][1][3]":int "s.f3[4][0][0]":int "s.f3[4][0][1]":int "s.f3[4][0][2]":int "s.f3[4][0][3]":int "s.f3[4][1][0]":int "s.f3[4][1][1]":int "s.f3[4][1][2]":int "s.f3[4][1][3]":int
#step 1
#outs f 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#step 2
#outs f 1 0 0 0 0 0 0 0 0 1 3 5 7 1 3 5 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#step 3
#outs t 2 658 831 87 430 394 509 690 888 629 803 247 495 350 790 656 313 114 725 675 225 373 863 924 163 486 27 448 861 209 678 446 779 584 475 445 799 380 592 394 12
#step 4
#outs f 0 128 501 358 722 366 64 355 650 461 36 561 887 287 288 190 955 336 533 470 590 102 112 761 103 200 8 994 153 85 629 451 279 616 152 926 431 527 686 492 759
#step 5
#outs t 2 161 405 634 177 880 569 941 558 383 772 352 417 314 82 76 987 386 256 591 451 550 272 818 545 895 258 818 72 156 98 127 786 990 276 63 650 995 969 851 350
#step 6
#outs f 1 0 0 0 0 0 0 0 0 1 3 5 7 1 3 5 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#step 7
#outs f 1 0 0 0 0 0 0 0 0 1 3 5 7 1 3 5 7 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
#step 8
#outs t 2 598 450 162 197 508 983 146 370 386 275 252 380 652 719 716 327 79 698 548 862 961 35 934 954 366 878 852 666 941 315 801 252 811 160 749 639 260 607 386 875
#step 9
#outs f 0 862 708 385 836 248 104 196 539 372 396 913 83 994 818 538 282 710 158 218 238 430 177 821 424 305 494 285 397 897 132 200 236 207 22 528 963 311 99 543 994
#step 10
#outs f 0 761 897 696 580 432 204 434 425 0 14 969 863 143 264 266 348 277 23 660 198 793 673 258 770 970 908 683 590 126 881 354 791 101 545 392 410 764 966 516 793
#end
#inputs
#outputs "J":int
#step 1
#outs 8
#step 2
#outs 0
#step 3
#outs 10
#step 4
#outs 4
#step 5
#outs 4
#step 6
#outs 3
#step 7
#outs 9
#step 8
#outs 0
#step 9
#outs 5
#step 10
#outs 1
#end
#inputs
#outputs "J":int
#step 1
#outs -1
#step 2
#outs -1
#step 3
#outs -1
#step 4
#outs -1
#step 5
#outs -1
#step 6
#outs -1
#step 7
#outs -1
#step 8
#outs -1
#step 9
#outs -1
#step 10
#outs -1
#end
#inputs
#outputs "J":int
#step 1
#outs 42
#step 2
#outs 100
#step 3
#outs 42
#step 4
#outs 26
#step 5
#outs 99
#step 6
#outs 88
#step 7
#outs 79
#step 8
#outs 47
#step 9
#outs 63
#step 10
#outs 86
#end
This source diff could not be displayed because it is too large. You can view the blob instead.
Constraint:
(if (x + y) >= 0
then (x + y) >= 3
else (x - y) <= 3)
Variables:
x : int
y : int
solve :
draw...
lucky_draw
Les solutions sont :
y = -212860406, x = -229431731
y = 5070364, x = -133059749
y = -168793659, x = -268435456
x = -268435456, y = -268435456
x=16.4559967678
x=10.9897327714
x=16.6330493372
x=11.3612465391
x=19.3769482211
x=12.4031765974
x=18.2400947146
x=19.6916436249
x=17.821818612
x=14.3736468051
x=12.3916040862
x=17.4296989857
x=18.9833623651
x=10.6132791109
x=13.1189539439
x=17.1679842174
x=14.8028839443
x=12.9731629104
x=19.4213686456
x=16.0742588076
x=20.
x=20.
______________________________________
Z=264205979 y=-82 x=53 z=79
Z=-17985497 y=-104 x=99 z=55
Z=268435455 x=99 y=99 z=-148
Z=268435455 x=99 y=99 z=-148
______________________________________
Z=f x=f y=t
......@@ -10,8 +10,8 @@ CFLAGS = \
LIBS = -lluc4c_nc -llucky_nc -lgmp -lm -ldl -lstdc++
LUT2C=../../../bin/lutin$(EXE) --2c-4c -seed 42
LUT2CSOCK=../../../bin/lutin$(EXE) --2c-4c-socks 127.0.0.1 -seed 42
CALLVIASOCKET=../../../bin/call-via-socket -addr 127.0.0.1 -port 2001
LUTIN=../../../bin/lutin -seed 42 -only-outputs -exe
CALLVIASOCKET=../../../bin/call-via-socket -addr 127.0.0.1 -port 2002
LUTIN=../../../bin/lutin$(EXE) -seed 42 -only-outputs -exe
ifeq ($(HOSTTYPE),mac)
LINKER=g++ -g
......@@ -77,32 +77,39 @@ foo-sock$(EXE): sock foo.o call_foo_sock.o
clean:
rm -f run *.o *~ foo foo-sock foo*.h foo*.c foo-sock.c *.gp *.plot *.rif *.log
EXPDIR=`$(LUTIN) --ocaml-version`
$(EXPDIR):
[ -d $(EXPDIR) ] || (mkdir -p $(EXPDIR) ; make utest)
test1 : clean foo$(EXE)
ifeq ($(HOSTTYPE),win32)
foo$(EXE)
else
./foo > test1.rif
rm -f test1.res && diff -B -u -i test1.rif.exp test1.rif > test1.res || true
test1.rif : clean foo$(EXE) $(EXPDIR)
./foo$(EXE) > test1.rif
test1:test1.rif
rm -f test1.res && diff -B -u -i $(EXPDIR)/test1.rif.exp test1.rif > test1.res || true
cat test1.res
[ ! -s test1.res ] && make clean
endif
utest1:
cp test1.rif test1.rif.exp
utest: utest1 utest2
utest1: test1.rif
./foo$(EXE) > test1.rif
cp test1.rif $(EXPDIR)/test1.rif.exp
test2: clean foo-sock$(EXE)
test2: clean foo-sock$(EXE) $(EXPDIR)
./foo-sock$(EXE) > test2.rif &
$(CALLVIASOCKET) "$(LUTIN) foo.lut"
rm -f test2.res && diff -B -u -i test2.rif.exp test2.rif > test2.res || true
rm -f test2.res && diff -B -u -i $(EXPDIR)/test2.rif.exp test2.rif > test2.res || true
cat test2.res
[ ! -s test2.res ] && make clean
utest2:
cp test2.rif test2.rif.exp
utest2:clean foo-sock$(EXE)
./foo-sock$(EXE) > test2.rif &
$(CALLVIASOCKET) "$(LUTIN) foo.lut"
cp test2.rif $(EXPDIR)/test2.rif.exp
test: test1
......
Waiting for someone to connect on 127.0.0.1:2000
#inputs "a":int "b":bool "c":real
#outputs "x":int "y":bool "z":real
# step 1
1 1 1.000000 #outs 0 1 0.000000
# step 2
2 0 2.000000 #outs -2 1 1.610000
# step 3
3 1 3.000000 #outs 1 1 -0.960000
# step 4
4 0 4.000000 #outs 3 0 3.330000
# step 5
5 1 5.000000 #outs 6 1 6.510000
# step 6
6 0 6.000000 #outs 8 0 2.890000
# step 7
7 1 7.000000 #outs 4 1 10.120000
# step 8
8 0 8.000000 #outs 9 0 12.570000
# step 9
9 1 9.000000 #outs 13 1 7.670000
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