Commit 3869c2a7 authored by Felipe Cerqueira's avatar Felipe Cerqueira
Browse files

Port development to Coq 8.5

parent d5cf8f9d
...@@ -2,3 +2,4 @@ ...@@ -2,3 +2,4 @@
*.glob *.glob
*.vo *.vo
*.html *.html
*.aux
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
## v # The Coq Proof Assistant ## ## v # The Coq Proof Assistant ##
## <O___,, # INRIA - CNRS - LIX - LRI - PPS ## ## <O___,, # INRIA - CNRS - LIX - LRI - PPS ##
## \VV/ # ## ## \VV/ # ##
## // # Makefile automagically generated by coq_makefile V8.4pl4 ## ## // # Makefile automagically generated by coq_makefile V8.5pl1 ##
############################################################################# #############################################################################
# WARNING # WARNING
...@@ -14,14 +14,15 @@ ...@@ -14,14 +14,15 @@
# #
# This Makefile was generated by the command line : # This Makefile was generated by the command line :
# coq_makefile -R . rt ./util/fixedpoint.v ./util/ssromega.v ./util/bigcat.v ./util/nat.v ./util/notation.v ./util/list.v ./util/powerset.v ./util/all.v ./util/sorting.v ./util/tactics.v ./util/bigord.v ./util/exists.v ./util/induction.v ./util/sum.v ./util/divround.v ./util/counting.v ./implementation/basic/bertogna_edf_example.v ./implementation/basic/task.v ./implementation/basic/schedule.v ./implementation/basic/job.v ./implementation/basic/arrival_sequence.v ./implementation/jitter/bertogna_edf_example.v ./implementation/jitter/task.v ./implementation/jitter/schedule.v ./implementation/jitter/job.v ./implementation/jitter/arrival_sequence.v ./analysis/basic/bertogna_fp_theory.v ./analysis/basic/interference_bound_edf.v ./analysis/basic/interference_bound_fp.v ./analysis/basic/interference_bound.v ./analysis/basic/bertogna_edf_comp.v ./analysis/basic/bertogna_fp_comp.v ./analysis/basic/bertogna_edf_theory.v ./analysis/basic/workload_bound.v ./analysis/parallel/bertogna_fp_theory.v ./analysis/parallel/interference_bound_edf.v ./analysis/parallel/interference_bound_fp.v ./analysis/parallel/interference_bound.v ./analysis/parallel/bertogna_edf_comp.v ./analysis/parallel/bertogna_fp_comp.v ./analysis/parallel/bertogna_edf_theory.v ./analysis/parallel/workload_bound.v ./analysis/jitter/bertogna_fp_theory.v ./analysis/jitter/interference_bound_edf.v ./analysis/jitter/interference_bound_fp.v ./analysis/jitter/interference_bound.v ./analysis/jitter/bertogna_edf_comp.v ./analysis/jitter/bertogna_fp_comp.v ./analysis/jitter/bertogna_edf_theory.v ./analysis/jitter/workload_bound.v ./model/basic/time.v ./model/basic/schedulability.v ./model/basic/task.v ./model/basic/task_arrival.v ./model/basic/platform.v ./model/basic/schedule.v ./model/basic/priority.v ./model/basic/interference_edf.v ./model/basic/interference.v ./model/basic/workload.v ./model/basic/job.v ./model/basic/arrival_sequence.v ./model/basic/response_time.v ./model/basic/platform_fp.v ./model/jitter/time.v ./model/jitter/schedulability.v ./model/jitter/task.v ./model/jitter/task_arrival.v ./model/jitter/platform.v ./model/jitter/schedule.v ./model/jitter/priority.v ./model/jitter/interference_edf.v ./model/jitter/interference.v ./model/jitter/workload.v ./model/jitter/job.v ./model/jitter/arrival_sequence.v ./model/jitter/response_time.v ./model/jitter/platform_fp.v -o Makefile # coq_makefile -f _CoqProject ./util/fixedpoint.v ./util/ssromega.v ./util/bigcat.v ./util/nat.v ./util/notation.v ./util/list.v ./util/powerset.v ./util/all.v ./util/sorting.v ./util/tactics.v ./util/bigord.v ./util/exists.v ./util/induction.v ./util/sum.v ./util/divround.v ./util/counting.v ./implementation/basic/bertogna_edf_example.v ./implementation/basic/task.v ./implementation/basic/schedule.v ./implementation/basic/job.v ./implementation/basic/arrival_sequence.v ./implementation/jitter/bertogna_edf_example.v ./implementation/jitter/task.v ./implementation/jitter/schedule.v ./implementation/jitter/job.v ./implementation/jitter/arrival_sequence.v ./analysis/basic/bertogna_fp_theory.v ./analysis/basic/interference_bound_edf.v ./analysis/basic/interference_bound_fp.v ./analysis/basic/interference_bound.v ./analysis/basic/bertogna_edf_comp.v ./analysis/basic/bertogna_fp_comp.v ./analysis/basic/bertogna_edf_theory.v ./analysis/basic/workload_bound.v ./analysis/parallel/bertogna_fp_theory.v ./analysis/parallel/interference_bound_edf.v ./analysis/parallel/interference_bound_fp.v ./analysis/parallel/interference_bound.v ./analysis/parallel/bertogna_edf_comp.v ./analysis/parallel/bertogna_fp_comp.v ./analysis/parallel/bertogna_edf_theory.v ./analysis/parallel/workload_bound.v ./analysis/jitter/bertogna_fp_theory.v ./analysis/jitter/interference_bound_edf.v ./analysis/jitter/interference_bound_fp.v ./analysis/jitter/interference_bound.v ./analysis/jitter/bertogna_edf_comp.v ./analysis/jitter/bertogna_fp_comp.v ./analysis/jitter/bertogna_edf_theory.v ./analysis/jitter/workload_bound.v ./model/basic/time.v ./model/basic/schedulability.v ./model/basic/task.v ./model/basic/task_arrival.v ./model/basic/platform.v ./model/basic/schedule.v ./model/basic/priority.v ./model/basic/interference_edf.v ./model/basic/interference.v ./model/basic/workload.v ./model/basic/job.v ./model/basic/arrival_sequence.v ./model/basic/response_time.v ./model/basic/platform_fp.v ./model/jitter/time.v ./model/jitter/schedulability.v ./model/jitter/task.v ./model/jitter/task_arrival.v ./model/jitter/platform.v ./model/jitter/schedule.v ./model/jitter/priority.v ./model/jitter/interference_edf.v ./model/jitter/interference.v ./model/jitter/workload.v ./model/jitter/job.v ./model/jitter/arrival_sequence.v ./model/jitter/response_time.v ./model/jitter/platform_fp.v -o Makefile
# #
.DEFAULT_GOAL := all .DEFAULT_GOAL := all
#
# This Makefile may take arguments passed as environment variables: # This Makefile may take arguments passed as environment variables:
# COQBIN to specify the directory where Coq binaries resides; # COQBIN to specify the directory where Coq binaries resides;
# TIMECMD set a command to log .v compilation time;
# TIMED if non empty, use the default time command as TIMECMD;
# ZDEBUG/COQDEBUG to specify debug flags for ocamlc&ocamlopt/coqc; # ZDEBUG/COQDEBUG to specify debug flags for ocamlc&ocamlopt/coqc;
# DSTROOT to specify a prefix to install path. # DSTROOT to specify a prefix to install path.
...@@ -33,14 +34,25 @@ endef ...@@ -33,14 +34,25 @@ endef
includecmdwithout@ = $(eval $(subst @,$(donewline),$(shell { $(1) | tr -d '\r' | tr '\n' '@'; }))) includecmdwithout@ = $(eval $(subst @,$(donewline),$(shell { $(1) | tr -d '\r' | tr '\n' '@'; })))
$(call includecmdwithout@,$(COQBIN)coqtop -config) $(call includecmdwithout@,$(COQBIN)coqtop -config)
TIMED=
TIMECMD=
STDTIME?=/usr/bin/time -f "$* (user: %U mem: %M ko)"
TIMER=$(if $(TIMED), $(STDTIME), $(TIMECMD))
vo_to_obj = $(addsuffix .o,\
$(filter-out Warning: Error:,\
$(shell $(COQBIN)coqtop -q -noinit -batch -quiet -print-mod-uid $(1))))
########################## ##########################
# # # #
# Libraries definitions. # # Libraries definitions. #
# # # #
########################## ##########################
COQLIBS?= -R . rt COQLIBS?=\
COQDOCLIBS?=-R . rt -R "." rt
COQDOCLIBS?=\
-R "." rt
########################## ##########################
# # # #
...@@ -50,14 +62,15 @@ COQDOCLIBS?=-R . rt ...@@ -50,14 +62,15 @@ COQDOCLIBS?=-R . rt
OPT?= OPT?=
COQDEP?=$(COQBIN)coqdep -c COQDEP?="$(COQBIN)coqdep" -c
COQFLAGS?=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML) COQFLAGS?=-q $(OPT) $(COQLIBS) $(OTHERFLAGS) $(COQ_XML)
COQCHKFLAGS?=-silent -o COQCHKFLAGS?=-silent -o
COQDOCFLAGS?=-interpolate -utf8 COQDOCFLAGS?=-interpolate -utf8
COQC?=$(COQBIN)coqc COQC?=$(TIMER) "$(COQBIN)coqc"
GALLINA?=$(COQBIN)gallina GALLINA?="$(COQBIN)gallina"
COQDOC?=$(COQBIN)coqdoc COQDOC?="$(COQBIN)coqdoc"
COQCHK?=$(COQBIN)coqchk COQCHK?="$(COQBIN)coqchk"
COQMKTOP?="$(COQBIN)coqmktop"
################## ##################
# # # #
...@@ -66,12 +79,13 @@ COQCHK?=$(COQBIN)coqchk ...@@ -66,12 +79,13 @@ COQCHK?=$(COQBIN)coqchk
################## ##################
ifdef USERINSTALL ifdef USERINSTALL
XDG_DATA_HOME?=$(HOME)/.local/share XDG_DATA_HOME?="$(HOME)/.local/share"
COQLIBINSTALL=$(XDG_DATA_HOME)/coq COQLIBINSTALL=$(XDG_DATA_HOME)/coq
COQDOCINSTALL=$(XDG_DATA_HOME)/doc/coq COQDOCINSTALL=$(XDG_DATA_HOME)/doc/coq
else else
COQLIBINSTALL=${COQLIB}user-contrib COQLIBINSTALL="${COQLIB}user-contrib"
COQDOCINSTALL=${DOCDIR}user-contrib COQDOCINSTALL="${DOCDIR}user-contrib"
COQTOPINSTALL="${COQLIB}toploop"
endif endif
###################### ######################
...@@ -159,15 +173,25 @@ VFILES:=util/fixedpoint.v\ ...@@ -159,15 +173,25 @@ VFILES:=util/fixedpoint.v\
model/jitter/response_time.v\ model/jitter/response_time.v\
model/jitter/platform_fp.v model/jitter/platform_fp.v
ifneq ($(filter-out archclean clean cleanall printenv,$(MAKECMDGOALS)),)
-include $(addsuffix .d,$(VFILES))
else
ifeq ($(MAKECMDGOALS),)
-include $(addsuffix .d,$(VFILES)) -include $(addsuffix .d,$(VFILES))
endif
endif
.SECONDARY: $(addsuffix .d,$(VFILES)) .SECONDARY: $(addsuffix .d,$(VFILES))
VOFILES:=$(VFILES:.v=.vo) VO=vo
VOFILES:=$(VFILES:.v=.$(VO))
GLOBFILES:=$(VFILES:.v=.glob) GLOBFILES:=$(VFILES:.v=.glob)
VIFILES:=$(VFILES:.v=.vi)
GFILES:=$(VFILES:.v=.g) GFILES:=$(VFILES:.v=.g)
HTMLFILES:=$(VFILES:.v=.html) HTMLFILES:=$(VFILES:.v=.html)
GHTMLFILES:=$(VFILES:.v=.g.html) GHTMLFILES:=$(VFILES:.v=.g.html)
OBJFILES=$(call vo_to_obj,$(VOFILES))
ALLNATIVEFILES=$(OBJFILES:.o=.cmi) $(OBJFILES:.o=.cmo) $(OBJFILES:.o=.cmx) $(OBJFILES:.o=.cmxs)
NATIVEFILES=$(foreach f, $(ALLNATIVEFILES), $(wildcard $f))
ifeq '$(HASNATDYNLINK)' 'true' ifeq '$(HASNATDYNLINK)' 'true'
HASNATDYNLINK_OR_EMPTY := yes HASNATDYNLINK_OR_EMPTY := yes
else else
...@@ -182,8 +206,12 @@ endif ...@@ -182,8 +206,12 @@ endif
all: $(VOFILES) all: $(VOFILES)
spec: $(VIFILES) quick: $(VOFILES:.vo=.vio)
vio2vo:
$(COQC) $(COQDEBUG) $(COQFLAGS) -schedule-vio2vo $(J) $(VOFILES:%.vo=%.vio)
checkproofs:
$(COQC) $(COQDEBUG) $(COQFLAGS) -schedule-vio-checking $(J) $(VOFILES:%.vo=%.vio)
gallina: $(GFILES) gallina: $(GFILES)
html: $(GLOBFILES) $(VFILES) html: $(GLOBFILES) $(VFILES)
...@@ -214,7 +242,7 @@ beautify: $(VFILES:=.beautified) ...@@ -214,7 +242,7 @@ beautify: $(VFILES:=.beautified)
@echo 'Do not do "make clean" until you are sure that everything went well!' @echo 'Do not do "make clean" until you are sure that everything went well!'
@echo 'If there were a problem, execute "for file in $$(find . -name \*.v.old -print); do mv $${file} $${file%.old}; done" in your shell/' @echo 'If there were a problem, execute "for file in $$(find . -name \*.v.old -print); do mv $${file} $${file%.old}; done" in your shell/'
.PHONY: all opt byte archclean clean install userinstall depend html validate .PHONY: all archclean beautify byte clean cleanall gallina gallinahtml html install install-doc install-natdynlink install-toploop opt printenv quick uninstall userinstall validate vio2vo
#################### ####################
# # # #
...@@ -232,33 +260,72 @@ userinstall: ...@@ -232,33 +260,72 @@ userinstall:
+$(MAKE) USERINSTALL=true install +$(MAKE) USERINSTALL=true install
install: install:
for i in $(VOFILES); do \ cd "." && for i in $(VOFILES) $(VFILES) $(GLOBFILES) $(NATIVEFILES) $(CMOFILES) $(CMIFILES) $(CMAFILES); do \
install -d `dirname $(DSTROOT)$(COQLIBINSTALL)/rt/$$i`; \ install -d "`dirname "$(DSTROOT)"$(COQLIBINSTALL)/rt/$$i`"; \
install -m 0644 $$i $(DSTROOT)$(COQLIBINSTALL)/rt/$$i; \ install -m 0644 $$i "$(DSTROOT)"$(COQLIBINSTALL)/rt/$$i; \
done done
install-doc: install-doc:
install -d $(DSTROOT)$(COQDOCINSTALL)/rt/html install -d "$(DSTROOT)"$(COQDOCINSTALL)/rt/html
for i in html/*; do \ for i in html/*; do \
install -m 0644 $$i $(DSTROOT)$(COQDOCINSTALL)/rt/$$i;\ install -m 0644 $$i "$(DSTROOT)"$(COQDOCINSTALL)/rt/$$i;\
done done
clean: uninstall_me.sh: Makefile
rm -f $(VOFILES) $(VIFILES) $(GFILES) $(VFILES:.v=.v.d) $(VFILES:=.beautified) $(VFILES:=.old) echo '#!/bin/sh' > $@
printf 'cd "$${DSTROOT}"$(COQLIBINSTALL)/rt && rm -f $(VOFILES) $(VFILES) $(GLOBFILES) $(NATIVEFILES) $(CMOFILES) $(CMIFILES) $(CMAFILES) && find . -type d -and -empty -delete\ncd "$${DSTROOT}"$(COQLIBINSTALL) && find "rt" -maxdepth 0 -and -empty -exec rmdir -p \{\} \;\n' >> "$@"
printf 'cd "$${DSTROOT}"$(COQDOCINSTALL)/rt \\\n' >> "$@"
printf '&& rm -f $(shell find "html" -maxdepth 1 -and -type f -print)\n' >> "$@"
printf 'cd "$${DSTROOT}"$(COQDOCINSTALL) && find rt/html -maxdepth 0 -and -empty -exec rmdir -p \{\} \;\n' >> "$@"
chmod +x $@
uninstall: uninstall_me.sh
sh $<
.merlin:
@echo 'FLG -rectypes' > .merlin
@echo "B $(COQLIB) kernel" >> .merlin
@echo "B $(COQLIB) lib" >> .merlin
@echo "B $(COQLIB) library" >> .merlin
@echo "B $(COQLIB) parsing" >> .merlin
@echo "B $(COQLIB) pretyping" >> .merlin
@echo "B $(COQLIB) interp" >> .merlin
@echo "B $(COQLIB) printing" >> .merlin
@echo "B $(COQLIB) intf" >> .merlin
@echo "B $(COQLIB) proofs" >> .merlin
@echo "B $(COQLIB) tactics" >> .merlin
@echo "B $(COQLIB) tools" >> .merlin
@echo "B $(COQLIB) toplevel" >> .merlin
@echo "B $(COQLIB) stm" >> .merlin
@echo "B $(COQLIB) grammar" >> .merlin
@echo "B $(COQLIB) config" >> .merlin
clean::
rm -f $(OBJFILES) $(OBJFILES:.o=.native) $(NATIVEFILES)
find . -name .coq-native -type d -empty -delete
rm -f $(VOFILES) $(VOFILES:.vo=.vio) $(GFILES) $(VFILES:.v=.v.d) $(VFILES:=.beautified) $(VFILES:=.old)
rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob $(VFILES:.v=.glob) $(VFILES:.v=.tex) $(VFILES:.v=.g.tex) all-mli.tex rm -f all.ps all-gal.ps all.pdf all-gal.pdf all.glob $(VFILES:.v=.glob) $(VFILES:.v=.tex) $(VFILES:.v=.g.tex) all-mli.tex
- rm -rf html mlihtml - rm -rf html mlihtml uninstall_me.sh
cleanall:: clean
rm -f $(patsubst %.v,.%.aux,$(VFILES))
archclean: archclean::
rm -f *.cmx *.o rm -f *.cmx *.o
printenv: printenv:
@$(COQBIN)coqtop -config @"$(COQBIN)coqtop" -config
@echo CAMLC = $(CAMLC) @echo 'CAMLC = $(CAMLC)'
@echo CAMLOPTC = $(CAMLOPTC) @echo 'CAMLOPTC = $(CAMLOPTC)'
@echo PP = $(PP) @echo 'PP = $(PP)'
@echo COQFLAGS = $(COQFLAGS) @echo 'COQFLAGS = $(COQFLAGS)'
@echo COQLIBINSTALL = $(COQLIBINSTALL) @echo 'COQLIBINSTALL = $(COQLIBINSTALL)'
@echo COQDOCINSTALL = $(COQDOCINSTALL) @echo 'COQDOCINSTALL = $(COQDOCINSTALL)'
Makefile: _CoqProject
mv -f $@ $@.bak
"$(COQBIN)coq_makefile" -f $< -o $@
################### ###################
# # # #
...@@ -266,31 +333,34 @@ printenv: ...@@ -266,31 +333,34 @@ printenv:
# # # #
################### ###################
%.vo %.glob: %.v $(VOFILES): %.vo: %.v
$(COQC) $(COQDEBUG) $(COQFLAGS) $*
$(GLOBFILES): %.glob: %.v
$(COQC) $(COQDEBUG) $(COQFLAGS) $* $(COQC) $(COQDEBUG) $(COQFLAGS) $*
%.vi: %.v $(VFILES:.v=.vio): %.vio: %.v
$(COQC) -i $(COQDEBUG) $(COQFLAGS) $* $(COQC) -quick $(COQDEBUG) $(COQFLAGS) $*
%.g: %.v $(GFILES): %.g: %.v
$(GALLINA) $< $(GALLINA) $<
%.tex: %.v $(VFILES:.v=.tex): %.tex: %.v
$(COQDOC) $(COQDOCFLAGS) -latex $< -o $@ $(COQDOC) $(COQDOCFLAGS) -latex $< -o $@
%.html: %.v %.glob $(HTMLFILES): %.html: %.v %.glob
$(COQDOC) $(COQDOCFLAGS) -html $< -o $@ $(COQDOC) $(COQDOCFLAGS) -html $< -o $@
%.g.tex: %.v $(VFILES:.v=.g.tex): %.g.tex: %.v
$(COQDOC) $(COQDOCFLAGS) -latex -g $< -o $@ $(COQDOC) $(COQDOCFLAGS) -latex -g $< -o $@
%.g.html: %.v %.glob $(GHTMLFILES): %.g.html: %.v %.glob
$(COQDOC)$(COQDOCFLAGS) -html -g $< -o $@ $(COQDOC) $(COQDOCFLAGS) -html -g $< -o $@
%.v.d: %.v $(addsuffix .d,$(VFILES)): %.v.d: %.v
$(COQDEP) -slash $(COQLIBS) "$<" > "$@" || ( RV=$$?; rm -f "$@"; exit $${RV} ) $(COQDEP) $(COQLIBS) "$<" > "$@" || ( RV=$$?; rm -f "$@"; exit $${RV} )
%.v.beautified: $(addsuffix .beautified,$(VFILES)): %.v.beautified:
$(COQC) $(COQDEBUG) $(COQFLAGS) -beautify $* $(COQC) $(COQDEBUG) $(COQFLAGS) -beautify $*
# WARNING # WARNING
......
-R . rt
\ No newline at end of file
Add LoadPath "../.." as rt.
Require Import rt.util.all. Require Import rt.util.all.
Require Import rt.analysis.basic.bertogna_edf_theory. Require Import rt.analysis.basic.bertogna_edf_theory.
Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop div path. From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop div path.
Module ResponseTimeIterationEDF. Module ResponseTimeIterationEDF.
...@@ -238,7 +237,7 @@ Module ResponseTimeIterationEDF. ...@@ -238,7 +237,7 @@ Module ResponseTimeIterationEDF.
Proof. Proof.
intros l; unfold all_le; rewrite eq_refl andTb. intros l; unfold all_le; rewrite eq_refl andTb.
destruct l; first by done. destruct l; first by done.
by apply/(zipP (fun x y => snd x <= snd y)). by apply/(zipP t (fun x y => snd x <= snd y)).
Qed. Qed.
(* ... and transitive. *) (* ... and transitive. *)
...@@ -247,8 +246,8 @@ Module ResponseTimeIterationEDF. ...@@ -247,8 +246,8 @@ Module ResponseTimeIterationEDF.
unfold transitive, all_le. unfold transitive, all_le.
move => y x z /andP [/eqP ZIPxy LExy] /andP [/eqP ZIPyz LEyz]. move => y x z /andP [/eqP ZIPxy LExy] /andP [/eqP ZIPyz LEyz].
apply/andP; split; first by rewrite ZIPxy -ZIPyz. apply/andP; split; first by rewrite ZIPxy -ZIPyz.
move: LExy => /(zipP (fun x y => snd x <= snd y)) LExy. move: LExy => /(zipP _ (fun x y => snd x <= snd y)) LExy.
move: LEyz => /(zipP (fun x y => snd x <= snd y)) LEyz. move: LEyz => /(zipP _ (fun x y => snd x <= snd y)) LEyz.
assert (SIZExy: size (unzip1 x) = size (unzip1 y)). assert (SIZExy: size (unzip1 x) = size (unzip1 y)).
by rewrite ZIPxy. by rewrite ZIPxy.
assert (SIZEyz: size (unzip1 y) = size (unzip1 z)). assert (SIZEyz: size (unzip1 y) = size (unzip1 z)).
...@@ -259,21 +258,22 @@ Module ResponseTimeIterationEDF. ...@@ -259,21 +258,22 @@ Module ResponseTimeIterationEDF.
apply size0nil in SIZExy; symmetry in SIZEyz. apply size0nil in SIZExy; symmetry in SIZEyz.
by apply size0nil in SIZEyz; subst. by apply size0nil in SIZEyz; subst.
} }
apply/(zipP (fun x y => snd x <= snd y)); rewrite -SIZExy in SIZEyz.
[by apply (t, 0) | by rewrite SIZExy -SIZEyz|]. have ZIP := zipP t (fun x y => snd x <= snd y) _ _ SIZEyz.
apply/ZIP.
intros i LTi. intros i LTi.
specialize (LExy t); specialize (LEyz t).
exploit LExy; first by rewrite SIZExy. exploit LExy; first by rewrite SIZExy.
{ {
rewrite size_zip -SIZEyz -SIZExy minnn in LTi. rewrite size_zip -SIZExy minnn.
by rewrite size_zip -SIZExy minnn; apply LTi. rewrite size_zip -SIZEyz minnn in LTi; apply LTi.
} }
instantiate (1 := t); intro LE. intro LE.
exploit LEyz; first by apply SIZEyz. exploit LEyz; first by rewrite -SIZExy.
{ {
rewrite size_zip SIZExy SIZEyz minnn in LTi. by rewrite size_zip -SIZExy -size_zip; apply LTi.
by rewrite size_zip SIZEyz minnn; apply LTi.
} }
by instantiate (1 := t); intro LE'; apply (leq_trans LE). by intro LE'; apply (leq_trans LE).
Qed. Qed.
(* At any step of the iteration, the corresponding list (* At any step of the iteration, the corresponding list
...@@ -294,8 +294,8 @@ Module ResponseTimeIterationEDF. ...@@ -294,8 +294,8 @@ Module ResponseTimeIterationEDF.
by rewrite iterSr IHstep. by rewrite iterSr IHstep.
} }
apply/(zipP (fun x y => snd x <= snd y)); apply/(zipP (tsk0,0) (fun x y => snd x <= snd y));
[by apply (tsk0,0)|by rewrite edf_claimed_bounds_size size_map |]. first by rewrite edf_claimed_bounds_size size_map.
intros i LTi; rewrite iterS; unfold edf_rta_iteration at 1. intros i LTi; rewrite iterS; unfold edf_rta_iteration at 1.
have MAP := @nth_map _ (tsk0,0) _ (tsk0,0). have MAP := @nth_map _ (tsk0,0) _ (tsk0,0).
...@@ -349,10 +349,9 @@ Module ResponseTimeIterationEDF. ...@@ -349,10 +349,9 @@ Module ResponseTimeIterationEDF.
apply f_equal with (B := nat) (f := fun x => size x) in UNZIP'. apply f_equal with (B := nat) (f := fun x => size x) in UNZIP'.
rename UNZIP' into SIZE. rename UNZIP' into SIZE.
rewrite size_map [size (unzip1 _)]size_map in SIZE. rewrite size_map [size (unzip1 _)]size_map in SIZE.
move: LE => /(zipP (fun x y => snd x <= snd y)) LE. move: LE => /(zipP _ (fun x y => snd x <= snd y)) LE.
destruct x1 as [| p0 x1'], x2 as [| p0' x2']; try (by ins). destruct x1 as [| p0 x1'], x2 as [| p0' x2']; try (by ins).
apply/(zipP (fun x y => snd x <= snd y)); apply/(zipP p0 (fun x y => snd x <= snd y)); first by done.
[by apply (p0,0) | by done |].
intros i LTi. intros i LTi.
exploit LE; first by rewrite 2!size_map in SIZE. exploit LE; first by rewrite 2!size_map in SIZE.
...@@ -420,7 +419,7 @@ Module ResponseTimeIterationEDF. ...@@ -420,7 +419,7 @@ Module ResponseTimeIterationEDF.
assert (GE_COST: all (fun p => task_cost (fst p) <= snd p) ((tsk0, R0) :: x1')). assert (GE_COST: all (fun p => task_cost (fst p) <= snd p) ((tsk0, R0) :: x1')).
{ {
clear LE; move: LEinit => /andP [/eqP UNZIP' LE]. clear LE; move: LEinit => /andP [/eqP UNZIP' LE].
move: LE => /(zipP (fun x y => snd x <= snd y)) LE. move: LE => /(zipP _ (fun x y => snd x <= snd y)) LE.
specialize (LE (tsk0, R0)). specialize (LE (tsk0, R0)).
apply/(all_nthP (tsk0,R0)). apply/(all_nthP (tsk0,R0)).
intros j LTj; generalize UNZIP'; simpl; intro SIZE'. intros j LTj; generalize UNZIP'; simpl; intro SIZE'.
...@@ -614,6 +613,8 @@ Module ResponseTimeIterationEDF. ...@@ -614,6 +613,8 @@ Module ResponseTimeIterationEDF.
k <= max_steps ts -> k <= max_steps ts ->
\sum_((tsk, R) <- f k) (R - task_cost tsk) + 1 > k. \sum_((tsk, R) <- f k) (R - task_cost tsk) + 1 > k.
Proof. Proof.
have INC := bertogna_edf_comp_f_increases.
have MONO := bertogna_edf_comp_iteration_monotonic.
rename H_at_least_one_task into NONEMPTY. rename H_at_least_one_task into NONEMPTY.
unfold valid_sporadic_taskset, is_valid_sporadic_task in *. unfold valid_sporadic_taskset, is_valid_sporadic_task in *.
rename H_valid_task_parameters into VALID. rename H_valid_task_parameters into VALID.
...@@ -661,12 +662,12 @@ Module ResponseTimeIterationEDF. ...@@ -661,12 +662,12 @@ Module ResponseTimeIterationEDF.
} }
rewrite -2!big_seq_cond. rewrite -2!big_seq_cond.
have LT := bertogna_edf_comp_f_increases step (ltnW LE). have LT := INC step (ltnW LE).
have MONO := bertogna_edf_comp_iteration_monotonic step. specialize (MONO step).
move: LT => /andP [_ LT]; move: LT => /hasP LT. move: LT => /andP [_ LT]; move: LT => /hasP LT.
destruct LT as [[x1 x2] INzip LT]; simpl in *. destruct LT as [[x1 x2] INzip LT]; simpl in *.
move: MONO => /andP [_ /(zipP (fun x y => snd x <= snd y)) MONO]. move: MONO => /andP [_ /(zipP _ (fun x y => snd x <= snd y)) MONO].
rewrite 2!(big_nth (elem, 0)). rewrite 2!(big_nth (elem, 0)).
apply mem_zip_exists with (elem := (elem, 0)) (elem' := (elem, 0)) in INzip; des; apply mem_zip_exists with (elem := (elem, 0)) (elem' := (elem, 0)) in INzip; des;
last by rewrite size_map. last by rewrite size_map.
...@@ -940,6 +941,9 @@ Module ResponseTimeIterationEDF. ...@@ -940,6 +941,9 @@ Module ResponseTimeIterationEDF.
Theorem taskset_schedulable_by_edf_rta : Theorem taskset_schedulable_by_edf_rta :
forall tsk, tsk \in ts -> no_deadline_missed_by_task tsk. forall tsk, tsk \in ts -> no_deadline_missed_by_task tsk.
Proof. Proof.
have RLIST := (edf_analysis_yields_response_time_bounds).
have DL := (edf_claimed_bounds_le_deadline ts).
have HAS := (edf_claimed_bounds_has_R_for_every_task ts).
unfold no_deadline_missed_by_task, task_misses_no_deadline, unfold no_deadline_missed_by_task, task_misses_no_deadline,
job_misses_no_deadline, completed, job_misses_no_deadline, completed,
edf_schedulable, edf_schedulable,
...@@ -953,10 +957,6 @@ Module ResponseTimeIterationEDF. ...@@ -953,10 +957,6 @@ Module ResponseTimeIterationEDF.
H_test_succeeds into TEST. H_test_succeeds into TEST.
move => tsk INtsk j JOBtsk. move => tsk INtsk j JOBtsk.
have RLIST := (edf_analysis_yields_response_time_bounds).
have DL := (edf_claimed_bounds_le_deadline ts).
have HAS := (edf_claimed_bounds_has_R_for_every_task ts).
destruct (edf_claimed_bounds ts) as [rt_bounds |] eqn:SOME; last by ins. destruct (edf_claimed_bounds ts) as [rt_bounds |] eqn:SOME; last by ins.
exploit (HAS rt_bounds tsk); [by ins | by ins | clear HAS; intro HAS; des]. exploit (HAS rt_bounds tsk); [by ins | by ins | clear HAS; intro HAS; des].
have COMPLETED := RLIST tsk R HAS j JOBtsk. have COMPLETED := RLIST tsk R HAS j JOBtsk.
......
Add LoadPath "../.." as rt.
Require Import rt.util.all. Require Import rt.util.all.
Require Import rt.model.basic.task rt.model.basic.job rt.model.basic.task_arrival Require Import rt.model.basic.task rt.model.basic.job rt.model.basic.task_arrival
rt.model.basic.schedule rt.model.basic.platform rt.model.basic.interference rt.model.basic.schedule rt.model.basic.platform rt.model.basic.interference
rt.model.basic.workload rt.model.basic.schedulability rt.model.basic.priority rt.model.basic.workload rt.model.basic.schedulability rt.model.basic.priority
rt.model.basic.platform rt.model.basic.response_time. rt.model.basic.platform rt.model.basic.response_time.
Require Import rt.analysis.basic.workload_bound rt.analysis.basic.interference_bound_edf. Require Import rt.analysis.basic.workload_bound rt.analysis.basic.interference_bound_edf.
Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop div path. From mathcomp Require Import ssreflect ssrbool eqtype ssrnat seq fintype bigop div path.
Module ResponseTimeAnalysisEDF. Module ResponseTimeAnalysisEDF.
...@@ -284,8 +283,8 @@ Module ResponseTimeAnalysisEDF. ...@@ -284,8 +283,8 @@ Module ResponseTimeAnalysisEDF.
| by apply JOBtsk | by apply BACK | ]. | by apply JOBtsk | by apply BACK | ].
{ {
intros j0 tsk0 TSK0 LE. intros j0 tsk0 TSK0 LE.
cut (tsk0 \in unzip1 rt_bounds); [intro IN | by rewrite UNZIP -TSK0 FROMTS]. cut (tsk0 \in unzip1 rt_bounds = true); last by rewrite UNZIP -TSK0 FROMTS.
move: IN => /mapP [p IN