SRC = src DIRECTORIES = $(shell find $(SRC) -type d) ALL_FEATURES = LEXER PARSER TRACE SUMMARY EXPAND MANAGER OBJECTS PREPROCESS QUOTE STAGE TYPE FF = $(F:ALL=$(ALL_FEATURES)) EXEC = helena REQUIRES = unix str helm-ng_kernel OCAMLOPTIONS = -rectypes CAMLPOPTIONS = $(FF:%=-D%) BUILDOPTIONS = -Is "$(DIRECTORIES)" KEEP = README CLEAN = etc/log.txt etc/profile.txt TARGETS = test-si-fast test-si test2-opt test2-byte test3 test6 \ profile-fast profile profile-coq profile-coq-byte \ xml-si xml-si-v3 xml xml-v3 \ export-coq export-matita \ export-lp1 export-lp2 export-tj2 export-tj3 export-pts export-lyp \ matita matitac include Makefile.common TIME = `which time` -p -a -o etc/log.txt NULL = >/dev/null 2>&1 COQTOP = coqtop MATITAC = ../../../../matita/matita/matitac.opt MATITA = ../../../../matita/matita/matita.opt XMLDIR = ../../www/lambdadelta INPUT = examples/automath/grundlagen_2.aut INPUTFAST = examples/automath/grundlagen_1.aut OUTPUT = scripts MA = grundlagen_2.ma V = grundlagen_2.v LP1 = grundlagen_2a_ld3.elpi LP2 = grundlagen_2b_ld3.elpi TJ2 = grundlagen_2b_ld3.mod TJ3 = grundlagen_2c_ld3.mod PTS = grundlagen_2b_pts.elpi LYP = grundlagen_2b_lyp.elpi PREAMBLE_MA = ../matita/matita.ma.templ PREAMBLE_V = $(OUTPUT)/coq/grundlagen.template PREAMBLE_LP = $(OUTPUT)/lp/lp.template TEST1 = -T 1 -l -u -1 $(O) $(INPUT) TEST2 = -X -T 2 -l -1 $(O) $(INPUT) test-si-fast: $(EXEC).native etc @echo " HELENA -u -x -y -1 $(INPUTFAST)" $(H)./$(EXEC).native -T 1 -u -x -y -1 $(O) $(INPUTFAST) > etc/log.txt test-si: $(EXEC).native etc @echo " HELENA -d -l -u -0 $(INPUT)" $(H)./$(EXEC).native -T 2 -d -l -u -0 $(O) $(INPUT) > etc/log.txt test1: $(EXEC).native etc @echo " HELENA -l -u -1 $(INPUT)" $(H)./$(EXEC).native $(TEST1) > etc/log.txt test2-opt: $(EXEC).native etc @echo " HELENA -l -1 $(INPUT)" $(H)./$(EXEC).native $(TEST1) $(TEST2) > etc/log.txt test2-byte: $(EXEC).byte etc @echo " HELENA -l -1 $(INPUT)" $(H)./$(EXEC).byte $(TEST1) $(TEST2) > etc/log.txt test3: $(EXEC).native etc @echo " HELENA -T 3 -l $(INPUT)" $(H)./$(EXEC).native -l -u $(O) $(INPUT) -X -T 3 -l $(O) $(INPUT) > etc/log.txt test6: $(EXEC).native etc @echo " HELENA -T 6 -l $(INPUT)" $(H)./$(EXEC).native -l -u $(O) $(INPUT) -X -T 6 -l $(O) $(INPUT) > etc/log.txt profile-fast: $(EXEC).native etc @echo " HELENA -u -x -y -1 $(INPUTFAST) (31 TIMES)" $(H)rm -f etc/log.txt $(H)for T in `seq 31`; do ./$(EXEC).native -T 1 -u -x -y -1 $(O) $(INPUTFAST) >> etc/log.txt; done $(H)grep "at exit" etc/log.txt | sort | uniq > etc/profile.txt profile: $(EXEC).native etc @echo " HELENA -l -u -1 $(INPUT) (31 TIMES)" $(H)rm -f etc/log.txt $(H)for _ in `seq 31`; do ./$(EXEC).native $(TEST1) >> etc/log.txt; done $(H)grep "at exit" etc/log.txt | sort | uniq > etc/profile.txt profile-opt: $(EXEC).native etc @echo " HELENA -l -1 $(INPUT) (31 TIMES)" $(H)rm -f etc/log.txt $(H)for _ in `seq 31`; do ./$(EXEC).native $(TEST1) $(TEST2) >> etc/log.txt; done $(H)grep "processed" etc/log.txt | sort -k 6 | uniq > etc/profile.txt profile-byte: $(EXEC).byte etc @echo " HELENA -l -1 $(INPUT) (31 TIMES)" $(H)rm -f etc/log.txt $(H)for _ in `seq 31`; do ./$(EXEC).byte $(TEST1) $(TEST2) >> etc/log.txt; done $(H)grep "processed" etc/log.txt | sort -k 6 | uniq > etc/profile.txt profile-coq: etc @echo " COQTOP $(V) (31 TIMES)" $(H)rm -f etc/log.txt $(H)for _ in `seq 31`; do echo Load \"$(OUTPUT)/coq/$(V)\". | $(TIME) $(COQTOP) -q $(NULL); done $(H)grep -h user etc/log.txt | sort | uniq > etc/profile.txt profile-coq-byte: etc @echo " COQTOP $(V) (31 TIMES)" $(H)rm -f etc/log.txt $(H)for _ in `seq 31`; do echo Load \"$(OUTPUT)/coq/$(V)\". | $(TIME) $(COQTOP).byte -q $(NULL); done $(H)grep -h user etc/log.txt | sort | uniq > etc/profile.txt xml-si: $(EXEC).native etc @echo " HELENA -l -o -q -s 1 -u -y $(INPUT)" $(H)./$(EXEC).native -O $(XMLDIR) -T 1 -l -o -q -s 1 -u -y $(O) $(INPUT) > etc/log.txt xml-si-v3: $(EXEC).native etc @echo " HELENA -l -o -q -s 2 -u -y $(INPUT)" $(H)./$(EXEC).native -O $(XMLDIR) -T 1 -l -o -q -s 2 -u -y $(O) $(INPUT) > etc/log.txt xml: $(EXEC).native etc @echo " HELENA -l -o -q -s 1 -y $(INPUT)" $(H)./$(EXEC).native -l -u $(O) $(INPUT) -X -O $(XMLDIR) -T 1 -l -o -q -s 1 -y $(O) $(INPUT) > etc/log.txt xml-v3: $(EXEC).native etc @echo " HELENA -l -o -q -s 2 -y $(INPUT)" $(H)./$(EXEC).native -l -u $(O) $(INPUT) -X -O $(XMLDIR) -T 1 -l -o -q -s 2 -y $(O) $(INPUT) > etc/log.txt export-coq $(OUTPUT)/coq/$(V): $(EXEC).native etc @echo " HELENA -m V8 -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m V8 -p $(PREAMBLE_V) -q $(O) $(TEST1) > etc/log.txt export-matita $(OUTPUT)/matita/$(MA): $(EXEC).native etc @echo " HELENA -m MA2 -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m MA2 -p $(PREAMBLE_MA) -q $(O) $(TEST1) > etc/log.txt export-lp1 $(OUTPUT)/lp/$(LP1): $(EXEC).native etc @echo " HELENA -m LP1 -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m LP1 -p $(PREAMBLE_LP) -q $(O) $(TEST1) > etc/log.txt export-lp2 $(OUTPUT)/lp/$(LP2): $(EXEC).native etc @echo " HELENA -m LP2 -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m LP2 -p $(PREAMBLE_LP) -q $(O) $(TEST1) > etc/log.txt export-tj2 $(OUTPUT)/lp/$(TJ2): $(EXEC).native etc @echo " HELENA -m TJ2 -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m TJ2 -p $(PREAMBLE_LP) -q $(O) $(TEST1) > etc/log.txt export-tj3 $(OUTPUT)/lp/$(TJ3): $(EXEC).native etc @echo " HELENA -m TJ3 -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m TJ3 -p $(PREAMBLE_LP) -q $(O) $(TEST1) > etc/log.txt export-pts $(OUTPUT)/lp/$(PTS): $(EXEC).native etc @echo " HELENA -m PTS -c -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m PTS -p $(PREAMBLE_LP) -c -q $(O) $(TEST1) > etc/log.txt export-lyp $(OUTPUT)/lp/$(LYP): $(EXEC).native etc @echo " HELENA -m lyp -c -q $(INPUT)" $(H)./$(EXEC).native -M $(OUTPUT) -a n -m lyp -p $(PREAMBLE_LP) -c -q $(O) $(TEST1) > etc/log.txt matita: $(OUTPUT)/matita/$(MA) @echo " MATITA $(MA)" $(H)cd matita && $(MATITA) $(MA) matitac: $(OUTPUT)/matita/$(MA) @echo " MATITAC $(MA)" $(H)cd matita && $(MATITAC) $(MA) #profile-matita: $(EXEC).native etc # @echo " HELENA -u $(INPUT) (1 TIMES)" # $(H)rm -f etc/log.txt # $(H)for T in `seq 1`; do ./$(EXEC).native -T 1 -M $(OUTPUT) -a n -l -m $(PREAMBLE) -o -u $(INPUT) >> etc/log.txt; done # $(H)grep "at exit" etc/log.txt | sort | uniq > etc/profile-new.txt