Commit 5a46baf2 authored by Adam Chlipala's avatar Adam Chlipala

Pass through first half of StackMachine, along with some reorganization of the build process

parent be92d106
...@@ -24,7 +24,7 @@ cpdt.tgz ...@@ -24,7 +24,7 @@ cpdt.tgz
*.aux *.aux
*.dvi *.dvi
*.log *.log
*.tex *.v.tex
*.toc *.toc
*.bbl *.bbl
*.blg *.blg
......
...@@ -6,6 +6,7 @@ MODULES_CODE := StackMachine InductiveTypes Predicates Coinductive Subset \ ...@@ -6,6 +6,7 @@ MODULES_CODE := StackMachine InductiveTypes Predicates Coinductive Subset \
MODULES_DOC := $(MODULES_PROSE) $(MODULES_CODE) MODULES_DOC := $(MODULES_PROSE) $(MODULES_CODE)
MODULES := $(MODULES_NODOC) $(MODULES_DOC) MODULES := $(MODULES_NODOC) $(MODULES_DOC)
VS := $(MODULES:%=src/%.v) VS := $(MODULES:%=src/%.v)
TEX := $(MODULES:%=latex/%.v.tex)
VS_DOC := $(MODULES_DOC:%=%.v) VS_DOC := $(MODULES_DOC:%=%.v)
TEMPLATES := $(MODULES_CODE:%=templates/%.v) TEMPLATES := $(MODULES_CODE:%=templates/%.v)
...@@ -22,22 +23,17 @@ Makefile.coq: Makefile $(VS) ...@@ -22,22 +23,17 @@ Makefile.coq: Makefile $(VS)
clean:: Makefile.coq clean:: Makefile.coq
$(MAKE) -f Makefile.coq clean $(MAKE) -f Makefile.coq clean
rm -f Makefile.coq .depend cpdt.tgz \ rm -f Makefile.coq .depend cpdt.tgz templates/*.v
latex/*.sty latex/cpdt.* templates/*.v cd latex; rm -f *.sty *.log *.aux *.dvi *.tex *.toc *.bbl *.blg *.idx *.ilg *.pdf *.ind *.out
rm -f *.aux *.log
doc: latex/cpdt.pdf html doc: latex/cpdt.pdf html
latex/cpdt.tex: Makefile $(VS) src/BackMatter.v latex/cpdt.bib latex/%.v.tex: Makefile src/%.v src/%.glob
cd src ; coqdoc --interpolate --latex -s $(VS_DOC) BackMatter.v \ cd src ; coqdoc --interpolate --latex --body-only -s \
-p "\usepackage{url}" \ $*.v -o ../latex/$*.v.tex
-p "\iffalse" \
-o ../latex/cpdt.tex
latex/%.tex: src/%.v src/%.glob latex/cpdt.pdf: latex/cpdt.tex $(TEX) latex/cpdt.bib
cd src ; coqdoc --interpolate --latex \ cd latex ; pdflatex cpdt ; pdflatex cpdt ; bibtex cpdt ; makeindex cpdt ; pdflatex cpdt ; pdflatex cpdt
-p "\usepackage{url}" \
$*.v -o ../latex/$*.tex
latex/%.pdf: latex/%.tex latex/cpdt.bib latex/%.pdf: latex/%.tex latex/cpdt.bib
cd latex ; pdflatex $* ; pdflatex $* ; bibtex $* ; makeindex $* ; pdflatex $* ; pdflatex $* cd latex ; pdflatex $* ; pdflatex $* ; bibtex $* ; makeindex $* ; pdflatex $* ; pdflatex $*
......
...@@ -107,3 +107,25 @@ ...@@ -107,3 +107,25 @@
year = 2010, year = 2010,
url={http://coq.inria.fr/refman/} url={http://coq.inria.fr/refman/}
} }
@inproceedings{CIC,
author = {Christine Paulin-Mohring},
title = {Inductive Definitions in the System {Coq} - Rules and Properties},
year = {1993},
booktitle = {Proceedings of the International Conference on {Typed Lambda Calculi and Applications}},
}
@inproceedings{SetsInTypes,
author = {Benjamin Werner},
title = {Sets in Types, Types in Sets},
booktitle = {Proceedings of the Third International Symposium on Theoretical Aspects of Computer Software},
year = {1997},
}
@article{CoC,
author = {Thierry Coquand and G\'erard Huet},
title = {The {Calculus} of {Constructions}},
journal = {Information and Computation},
volume = {76(2-3)},
year = {1988}
}
\documentclass[12pt]{report}
\usepackage[]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{fullpage}
\usepackage{coqdoc}
\usepackage{amsmath,amssymb}
\usepackage{url}
\usepackage{makeidx,hyperref}
\title{Certified Programming with Dependent Types}
\author{Adam Chlipala}
\makeindex
\begin{document}
\maketitle
\thispagestyle{empty}
\mbox{}\vfill
\begin{center}
Copyright Adam Chlipala 2008-2011.
This work is licensed under a
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0
Unported License.
The license text is available at:
\end{center}
\begin{center} \url{http://creativecommons.org/licenses/by-nc-nd/3.0/} \end{center}
\phantomsection
\tableofcontents
\include{Intro.v}
\include{StackMachine.v}
\include{InductiveTypes.v}
\include{Predicates.v}
\include{Coinductive.v}
\include{Subset.v}
\include{MoreDep.v}
\include{DataStruct.v}
\include{Equality.v}
\include{Generic.v}
\include{Universes.v}
\include{Match.v}
\include{Reflection.v}
\include{Large.v}
\include{Firstorder.v}
\include{DeBruijn.v}
\include{Hoas.v}
\include{Interps.v}
\include{Extensional.v}
\include{Intensional.v}
\include{OpSem.v}
\clearpage
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
\bibliography{cpdt}
\clearpage
\addcontentsline{toc}{chapter}{Index}
\printindex
\end{document}
(** %\clearpage
\addcontentsline{toc}{chapter}{Bibliography}
\bibliographystyle{plain}
\bibliography{cpdt}
\clearpage
\addcontentsline{toc}{chapter}{Index}
\printindex% *)
...@@ -7,43 +7,7 @@ ...@@ -7,43 +7,7 @@
* http://creativecommons.org/licenses/by-nc-nd/3.0/ * http://creativecommons.org/licenses/by-nc-nd/3.0/
*) *)
(** %\fi (** %\chapter{Introduction}% *)
\usepackage{makeidx,hyperref}
\title{Certified Programming with Dependent Types}
\author{Adam Chlipala}
\makeindex
\begin{document}
\maketitle
\thispagestyle{empty}
\mbox{}\vfill
\begin{center}% *)
(**
Copyright Adam Chlipala 2008-2011.
This work is licensed under a
Creative Commons Attribution-Noncommercial-No Derivative Works 3.0
Unported License.
The license text is available at:
%\begin{center} \url{http://creativecommons.org/licenses/by-nc-nd/3.0/} \end{center}%
#<a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">http://creativecommons.org/licenses/by-nc-nd/3.0/</a>#
*)
(** %\vfill\mbox{}
\end{center}
\phantomsection
\tableofcontents
\chapter{Introduction}% *)
(** * Whence This Book? *) (** * Whence This Book? *)
...@@ -211,7 +175,7 @@ Coq is a very complex system, with many different commands driven more by pragma ...@@ -211,7 +175,7 @@ Coq is a very complex system, with many different commands driven more by pragma
(** (**
To make it possible to start from fancy proof automation, rather than working up to it, I have included with the book source a library of %\emph{%#<i>#tactics#</i>#%}%, or programs that find proofs, since the built-in Coq tactics do not support a high enough level of automation. I use these tactics even from the first chapter with code examples. To make it possible to start from fancy proof automation, rather than working up to it, I have included with the book source a library of %\emph{%#<i>#tactics#</i>#%}%, or programs that find proofs, since the built-in Coq tactics do not support a high enough level of automation. I use these tactics even from the first chapter with code examples.
Some readers have asked about the pragmatics of using this tactic library in their own developments. My position there is that this tactic library was designed with the specific examples of the book in mind; I do not recommend using it in other settings. Part III should impart the necessary skills to reimplement these tactics and beyond. One generally deals with undecidable problems in interactive theorem proving, so there can be no tactic that solves all goals, though the %\index{Tactics!crush@\texttt{crush}}%[crush] tactic that we will meet soon may sometimes feel like that! There are still very useful tricks found in the implementations of [crush] and its cousins, so it may be useful to examine the commented source file %\texttt{%#<tt>#Tactics.v#</tt>.#%}.~\footnote{It's not actually commented yet. \texttt{;-)}}% I implement a new tactic library for each new project, since each project involves a different mix of undecidable theories where a different set of heuristics turns out to work well; and that is what I recommend others do, too. Some readers have asked about the pragmatics of using this tactic library in their own developments. My position there is that this tactic library was designed with the specific examples of the book in mind; I do not recommend using it in other settings. Part III should impart the necessary skills to reimplement these tactics and beyond. One generally deals with undecidable problems in interactive theorem proving, so there can be no tactic that solves all goals, though the %\index{tactics!crush}%[crush] tactic that we will meet soon may sometimes feel like that! There are still very useful tricks found in the implementations of [crush] and its cousins, so it may be useful to examine the commented source file %\texttt{%#<tt>#Tactics.v#</tt>.#%}.~\footnote{It's not actually commented yet. \texttt{;-)}}% I implement a new tactic library for each new project, since each project involves a different mix of undecidable theories where a different set of heuristics turns out to work well; and that is what I recommend others do, too.
*) *)
(** ** Installation and Emacs Set-Up *) (** ** Installation and Emacs Set-Up *)
......
This diff is collapsed.
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