├── README.md
├── asn
├── asn2.pdf
├── asn2.tex
├── asn3.pdf
├── asn3.tex
├── asn4.aux
├── asn4.fdb_latexmk
├── asn4.fls
├── asn4.log
├── asn4.pdf
├── asn4.tex
├── asn5.aux
├── asn5.fdb_latexmk
├── asn5.fls
├── asn5.log
├── asn5.pdf
├── asn5.synctex.gz
└── asn5.tex
├── code
├── fixpoint_combinators.py
└── z3
│ ├── mccarthy91.py
│ ├── miniverif.py
│ └── z3tut.py
├── handwritten_notes
├── Note Apr 12, 2022 12_57_19 PM.pdf
├── Note Apr 14, 2022 1_04_22 PM.pdf
├── Note Apr 19, 2022 12_57_40 PM.pdf
├── Note Apr 21, 2022 12_55_59 PM.pdf
├── Note Apr 5, 2022 12_51_43 PM.pdf
├── Note Apr 7, 2022 1_00_04 PM.pdf
├── Note Feb 1, 2022 1_01_38 PM.pdf
├── Note Feb 10, 2022 12_57_29 PM.pdf
├── Note Feb 15, 2022 12_59_50 PM.pdf
├── Note Feb 22, 2022 12_52_43 PM.pdf
├── Note Feb 24, 2022 12_54_01 PM.pdf
├── Note Feb 8, 2022 11_46_49 AM.pdf
├── Note Jan 25, 2022 12_51_36 PM.pdf
├── Note Mar 1, 2022 12_57_13 PM.pdf
├── Note Mar 10, 2022 1_00_11 PM.pdf
├── Note Mar 22, 2022 12_55_32 PM.pdf
├── Note Mar 29, 2022 12_57_16 PM.pdf
├── Note Mar 3, 2022 12_58_40 PM.pdf
├── Note Mar 31, 2022 12_55_15 PM.pdf
└── Note Mar 8, 2022 12_57_52 PM.pdf
└── notes
├── cs704-lec-01-25-2010.pdf
├── cs704-lec-01-27-2010.pdf
├── cs704-lec-01-29-2010.pdf
├── cs704-lec-02-01-2010.pdf
├── cs704-lec-02-10-2010.pdf
├── cs704-lec-04-19-2010.pdf
├── cs704-lec-1-22-2010.pdf
├── hornClauses.aux
├── hornClauses.fdb_latexmk
├── hornClauses.fls
├── hornClauses.log
├── hornClauses.out
├── hornClauses.pdf
├── hornClauses.tex
├── jan26.pdf
├── preamble.tex
├── prooftree.sty
├── transRelEnc.pdf
└── transRelEnc.tex
/README.md:
--------------------------------------------------------------------------------
1 | # Principles of Programming Languages
2 | ## CS 704 | Spring 2022
3 |
4 | | τ | τ' |
5 | |-|-|
6 | |When | Tu/Th 1-2:15 |
7 | |Where | CS 1263 |
8 | |Who | [Aws Albarghouthi](http://www.cs.wisc.edu/~aws) |
9 | |Office hours | Tue ~Thu~ 215-300 in CS 6363 |
10 |
11 | All notes and assignments wil be posted on this website.
12 |
13 | Submission of assignments and course project deliverables is via Canvas.
14 |
15 | Anonymous feedback can be submitted on this [Google form](https://goo.gl/forms/UsfJOK4TetQU0zYp1)
16 |
17 | ## Course description
18 | This course covers a range of topics in programming languages, including lambda calculus and type theory, functional programming, logics for encoding programs, and automated verification techniques.
19 |
20 | The goal is to expose students to a range of mathematical and practical tools for reasoning about programs.
21 |
22 | ## Lectures
23 | The following will be populated as the course progresses:
24 |
25 | #### Week 1 (Jan 24) Lambda calculus
26 |
27 | * **Tue** Welcome to the course / Intro to the beautiful lambda calculus
28 | * [notes](notes/cs704-lec-1-22-2010.pdf)
29 | * Ch. 5 of TAPL
30 |
31 | * **Thu** Computing with lambda calculus
32 | * [notes](notes/cs704-lec-01-25-2010.pdf)
33 | * Chs. 5 and 6 of TAPL
34 |
35 | *you might also find helpful the notes from Sampson's Cornell class—[this](http://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec02.pdf) and [this](http://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec03.pdf)*
36 |
37 | #### Week 2 (Jan 31) Programming constructs & fixpoints in lambda calculus
38 | * **Tue** Programming constructs in lambda calclus
39 | * [notes](notes/cs704-lec-01-29-2010.pdf)
40 | * Ch. 5 of TAPL
41 |
42 | * **Thu** OCaml tutorial
43 |
44 | [*Asn 1 out*](http://pages.cs.wisc.edu/~aws/courses/cs704-asn/asn1)
45 |
46 | #### Week 3 (Feb 7) Fixpoints and project ideas
47 | * **Tue** Fixpoints in lambda calculus
48 | * [notes](notes/cs704-lec-01-29-2010.pdf) (same as Tue)
49 | * [code from class](code/fixpoint_combinators.py)
50 | * Matt Might's blog: Y combinator in JS
51 | (See Might's other lambda calculus posts too.)
52 | * See [this nice blog post on deriving the Y combinator](https://invenia.github.io/blog/2018/08/20/ycombinator/)
53 |
54 | * **Tue** Introduction to types
55 | * Ch. 8 of TAPL
56 |
57 | #### Week 4 (Feb 14) Types
58 | * **Tue** Simply typed lambda calculus
59 | * Ch. 9 of TAPL
60 |
61 | * **Thu** Project meetings
62 |
63 | *you might also find helpful the notes from Sampson's Cornell class—[this](http://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec19.pdf) and [this](http://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec20.pdf)*
64 |
65 | #### Week 5 (Feb 21) Types continued
66 | * **Tue** Type inference
67 | * Ch. 22 of TAPL
68 |
69 | * **Thu** Types for an imperative language
70 | * Ch. 3 of SPA (Ch. 2 has language definition)
71 |
72 | *you might also find helpful the notes from Sampson's Cornell class—[this](http://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec23.pdf) and [this](http://www.cs.cornell.edu/courses/cs6110/2017sp/lectures/lec24.pdf)*
73 |
74 | #### Week 6 (Feb 28) Semantics
75 | * **Tue** Operational semantics
76 | * The class presentation is based on Nielsen and Nielsen's book [Sem] -- see their comprehensive slides [here](http://www.imm.dtu.dk/~hrni/SWA/SwA_presentations/SwA-2a-natural.pdf)
77 |
78 |
79 | * **Thu** Axiomatic semantics
80 | * The class presentation is based on Nielsen and Nielsen's book [Sem] -- see their comprehensive slides [here](http://www.imm.dtu.dk/~hrni/SWA/SwA_presentations/SwA-9-axiomatic.pdf)
81 |
82 | *you might also find helpful Chs 7 (operational semantics) and 12 (axiomatic semantics) of [Chlipala's FRAP book](http://adam.chlipala.net/frap/), which is freely available*
83 |
84 | #### Week 7 (Mar 7) Logic & SAT/SMT
85 |
86 | * **Tue** Propositional logic and SAT solvers
87 | * The class presentation will follow Dillig's slides: [here](http://www.cs.utexas.edu/~isil/cs389L/lecture1-6up.pdf) and [here](http://www.cs.utexas.edu/~isil/cs389L/lecture2-6up.pdf)
88 |
89 |
90 | * **Thu** First-order logic and SMT solvers
91 | * The class presentation will follow Dillig's slides: [here](http://www.cs.utexas.edu/~isil/cs389L/lecture6-6up.pdf) and [here](http://www.cs.utexas.edu/~isil/cs389L/lecture7-6up.pdf) and [here](http://www.cs.utexas.edu/~isil/cs389L/lecture10-6up.pdf)
92 |
93 | *For more references, consult Bradley and Manna's book [CofC]—see references below*
94 |
95 | #### Week 8 (Mar 21) Transition systems & program encodings
96 | * **Tue** Bounded encodings
97 | * [notes](notes/transRelEnc.pdf)
98 |
99 | #### Week 9 (Mar 28) Automated verification
100 | * **Tue** Bounded encodings and Z3 solver
101 | * [notes](notes/transRelEnc.pdf) (same as last time)
102 | * [colab](https://colab.research.google.com/drive/1ZCzVuJk4nfKYzM0L8lalmXOYdpBk2vCg?usp=sharing)
103 |
104 | * **Thu** Invariant generation with Horn clauses
105 | * [notes](notes/hornClauses.pdf)
106 |
107 | #### Week 10 (Apr 4) Automated verification continued
108 | * **Tue** Invariant generation with predicate abstraction
109 | * [notes](notes/hornClauses.pdf) (same as last time)
110 | * [colab](https://colab.research.google.com/drive/1qHqbHdkZj-hc7GIAAsAOD6Aw9FgKQxVd?usp=sharing)
111 |
112 | * **Thu** Lattice theory
113 | * SPA ch. 4
114 |
115 | #### Week 11 (Apr 11) Applications of abstract interpretation
116 | * **Tue** Lattice theory
117 | * SPA ch. 4
118 |
119 | * **Thu** Abstract interpretation of programs
120 | * SPA ch. 10
121 |
122 | #### Week 12 (Apr 18) Applications of abstract interpretation (continued)
123 | * **Tue** Abstract interpretation of programs
124 | * SPA ch. 10
125 |
126 | * **Thu** Numerical domains
127 | * SPA ch. 6
128 |
129 | #### Week 13 (Apr 25)
130 | * **Tue** Termination
131 | * [Marktoberdorf notes](https://www.cs.tufts.edu/comp/150BUGS/terminator-principles.pdf)
132 |
133 | * **Thue** *project presentations*
134 | #### Week 14 (May 2)
135 | *project presentations*
136 |
137 | ## Assignments
138 | Assignments will be posted here:
139 |
140 | | Assignment | Due date |
141 | | - | - |
142 | | [asn1](http://pages.cs.wisc.edu/~aws/courses/cs704-asn/asn1) | Feb 15 |
143 | | [asn2](asn/asn2.pdf) | Mar 14 |
144 | | [asn3](asn/asn3.pdf) | April 15 |
145 | | [asn4](asn/asn4.pdf) | Apr 30 |
146 |
147 |
148 | ## Evaluation
149 | Performance will be evaluated as follows:
150 |
151 | | Task | X% |
152 | | - | - |
153 | | Research project | 45% |
154 | | Assignments (4) | 40%|
155 | | Project presentation | 10% |
156 | | Class participation | 5% |
157 |
158 |
159 | ## Course Project
160 | For the final project, you can work on a problem of your choice with a partner or by yourself.
161 |
162 | * **Deliverable 1 (Feb 14)** Send me a list of three project ideas.
163 |
164 | * 5%: **Deliverable 2 (Feb 25)** Submit a 2-3 page proposal including the following:
165 | The statement of the problem to be investigated
166 | An explanation of why the problem is interesting
167 | A description of what you propose to do.
168 | Explain the elements that you will have to build.
169 | Explain the elements that you can pick up from open-source sites.
170 | Explain the experiment(s) or performance measurement(s) that you plan to carry out. Two good approaches are
171 | State the hypothesis that you hope to refute.
172 | Complete the following sentence: "The experiments were designed to shed light on the following questions: . . ."
173 | Then explain what you plan to measure; how you will measure it (if it is not obvious); and where you will obtain test cases.
174 | List the tasks, broken down into two or three milestones
175 |
176 | * 5%: **Deliverable 3 (Apr 9)** Submit a description of progress, implementation plan with completed steps checked off, and experimentation plan. Please turn in an updated proposal (with changes marked with changebars, and your new material added as "Appendix B: Progress Report".
177 |
178 | * 10%: **Deliverable 4 (last 2 weeks of class)** 10-15 minute oral presentations (plus 5 minutes for questions/discussion) will be given during class. You will need to e-mail me an abstract (in plaintext) giving the title, project participants, and a two-paragraph to three-paragraph summary of what will be presented.
179 |
180 | * 35%: **Deliverable 5 (May 7)** Final writeup: The final writeup should be modeled after a typical conference paper. There is no length requirement or limit, but I would expect it to be somewhere around 10-15 pages of [Single-colum Latex article](http://homepages.math.uic.edu/~bshipley/sample.short.tex).
181 |
182 | ## Resources
183 | There are no required textbooks for this class. The following is a list of books that should be useful references for different parts of the course.
184 |
185 | This is an excellent reference for our lambda calculus and types material
186 |
187 | * [TAPL] Pierce, Types and Programming Languages. The MIT Press, 2002.
188 |
189 | This is a free and excellent book that covers most material we cover in 704
190 |
191 | * [FRAP] Chlipala Formal Reasoning About Programs
192 |
193 | This is a fantastic (I think it's the best) book on static program analysis
194 |
195 | * [SPA] Møller and Schwartzbach [Static Program Analysis](https://cs.au.dk/~amoeller/spa/)
196 |
197 |
198 | This book talks about decision procedures
199 | and their applications in verification.
200 |
201 | * [CofC] Bradley and Manna, The Calculus of Computation. Spring, 2007.
202 |
203 | This is a short book on
204 | operational, axiomatic, and denotational semantics.
205 |
206 | * [Sem] Nielson and Nielson Semantics with Applications. Springer, 2007.
207 |
208 | The following book covers data-flow analysis
209 | and abstract interpretation.
210 |
211 | * [PA] Nielson et al., Principles of Program Analysis Springer, 1999.
212 |
213 | This is another abstract interpretation resource.
214 |
215 | * [AI] Abramsky and Hankin, An Introduction to Abstract Interpretation.
216 |
217 | There are multiple courses at other universities
218 | that overlap with the material we cover in CS704. Here are some that I found helpful:
219 |
220 | * Fredrikson & Platzer's course at CMU
221 | * Sampson's class at Cornell
222 |
--------------------------------------------------------------------------------
/asn/asn2.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/asn/asn2.pdf
--------------------------------------------------------------------------------
/asn/asn2.tex:
--------------------------------------------------------------------------------
1 | \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
2 | \usepackage{geometry}
3 | \usepackage{enumitem}
4 | % See geometry.pdf to learn the layout options. There are lots.
5 | \geometry{letterpaper} % ... or a4paper or a5paper or ...
6 | %\geometry{landscape} % Activate for for rotated page geometry
7 | %\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
8 | \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
9 | % TeX will automatically convert eps --> pdf in pdflatex
10 | \usepackage{amssymb}
11 |
12 | \usepackage{stmaryrd}
13 |
14 |
15 | \title{CS704: Assignment 2}
16 | \author{}
17 | \date{} % Activate to display a given date or no date
18 |
19 |
20 | \begin{document}
21 | \maketitle
22 | Questions 2 and 3 are adapted from TAPL.
23 |
24 | %\begin{comment}
25 | %\section{Galois connections}
26 | %Consider these two definitions of Galois connections:
27 |
28 | %\paragraph{Definition 1:}
29 | %$(L,\alpha,\gamma,M)$ is a Galois connection
30 | %between the complete lattices $(L,\sqsubseteq)$
31 | %and $(M,\sqsubseteq)$ if and only if
32 | %$\alpha:L \rightarrow M$ and $\gamma:M \rightarrow L$
33 | %are monotone functions that satisfy the following conditions:
34 | %$$\gamma \circ \alpha \sqsupseteq \lambda x. x$$
35 | %$$\alpha \circ \gamma \sqsubseteq \lambda x. x$$
36 | %where $\circ$ is function composition---that is,
37 | %$\alpha \circ \gamma$ is the function that applies
38 | %$\alpha$ \emph{to the result of} $\gamma$.
39 |
40 | %\paragraph{Definition 2:}
41 | %$(L,\alpha,\gamma,M)$ is a Galois connection
42 | %between the complete lattices $(L,\sqsubseteq)$
43 | %and $(M,\sqsubseteq)$ if and only if
44 | %$\alpha:L \rightarrow M$ and $\gamma:M \rightarrow L$
45 | %are total functions such that for all $l\in L, m \in M$,
46 | %$$\alpha(l) \sqsubseteq m \Leftrightarrow l \sqsubseteq \gamma (m)$$
47 |
48 | %~\\
49 | %Prove that the two definitions are equivalent.
50 | %\end{comment}
51 |
52 | \section{Fixed-point combinators}
53 |
54 | \begin{enumerate}[label=\bf\Alph*]
55 | \item The most popular encoding of recursion in $\lambda$-calculus
56 | is using the Y combinator.
57 | Another approach is using the simple U combinator (which is
58 | not a fixed-point combinator):
59 | $$U =_\textrm{df} \lambda x.\ x\ x$$
60 | (We use $=_\textrm{df}$ to denote a definition, as opposed to
61 | semantic equivalence.)
62 | Using the U combinator, we can define the factorial
63 | function as follows:
64 | $$\emph{fact} =_\textrm{df} U(\lambda f.\ \lambda n.\ ~\emph{if}~(n=0)~\emph{then}~1~\emph{else}~n*((f f) (n-1)))$$
65 | (For clarity, we extend pure lambda calculus
66 | with conditionals and arithmetic.)\\
67 | Prove that $\emph{fact}$ satisfies
68 | the following $\lambda$-calculus equation:
69 | $$\emph{fact} = (\lambda n. ~\emph{if}~(n=0)~\emph{then}~1~\emph{else}~n*(\emph{fact} (n-1)))$$
70 |
71 | \item
72 | Consider the following theorem for characterizing
73 | fixed-point combinators themselves as fixed points:
74 | \begin{equation}
75 | \label{Eq:FPTheoremStmt}
76 | \textrm{Let $G = \lambda y . \lambda f . f(yf)$.
77 | Then $M$ is a fixed-point combinator if and only if $M = GM$.}
78 | \end{equation}
79 |
80 | \noindent
81 | (Note: Recall that the following $\lambda$-calculus transformation
82 | is called the $\eta$-reduction rule:
83 | \[
84 | (\lambda x.Mx) \rightarrow_\eta M,
85 | \]
86 | where $x$ does not occur as one of the free variables of $M$.
87 | You are allowed to use $\eta$-reduction in this question.)
88 |
89 | \medskip
90 |
91 | \noindent
92 | {\bf subpart (i)}
93 |
94 | \noindent
95 | Use Theorem \ref{Eq:FPTheoremStmt} to show that
96 | $Y =_\textrm{df} \lambda f . (( \lambda x.f(xx) )( \lambda x.f(xx) ))$
97 | is a fixed-point combinator.
98 |
99 | \medskip
100 |
101 | \noindent
102 | {\bf subpart(ii)}
103 |
104 | \noindent
105 | Use Theorem~\ref{Eq:FPTheoremStmt} to show
106 | that the U combinator ($\lambda x.\ x\ x$)
107 | is a not a fixed-point combinator.
108 |
109 | \noindent
110 | {\bf subpart (iii)}
111 |
112 | \noindent
113 | Prove Theorem \ref{Eq:FPTheoremStmt}.
114 | (Note that the theorem involves an ``if and only if'';
115 | consequently, your proof should have two parts.)
116 |
117 | \noindent
118 | {\bf subpart (iv)}
119 |
120 | The Y combinator
121 | allows us to find a $\lambda$-term $g$
122 | that satisfies a single recursive equation over $\lambda$-terms of the
123 | form $g = \ldots g \ldots g \ldots$
124 |
125 | Suppose that we are presented with a collection of $k$ mutually recursive
126 | equations:
127 | \[
128 | \begin{array}{rcl}
129 | g_1 & = & \ldots g_1 \ldots g_k \ldots \\
130 | & \vdots & \\
131 | g_k & = & \ldots g_1 \ldots g_k \ldots
132 | \end{array}
133 | \]
134 | Explain how to solve for $g_1, \ldots, g_k$.
135 |
136 |
137 | \end{enumerate}
138 |
139 | \section{Church Encodings}
140 | \begin{enumerate}[label=\bf\Alph*]
141 | \item In lecture, we defined Church numerals and Booleans, along with some operations over them.
142 | Define a lambda term that tests equality of two Church numerals,
143 | returning $\lambda t. \lambda f. t$ when they are equal,
144 | and $\lambda t. \lambda f. f$ when they are not equal.
145 |
146 | \item Suppose you are given a combinator $\textsf{pred}$
147 | that computes the predecessor of a Church numeral.
148 | Use $\textsf{pred}$ to define subtraction in lambda calculus.
149 | (Note that, given 0, $\textsf{pred}$ returns 0.)
150 | \end{enumerate}
151 |
152 | \section{Typed Lambda Calculus}
153 | Is there any context $\Gamma$ and type $\tau$
154 | such that $\Gamma \vdash x\ x : \tau$. If so,
155 | provide a $\Gamma$ and $\tau$ and show the typing derivation;
156 | if not, prove that there does not exist
157 | such a $\Gamma$ and $\tau$.
158 | \end{document}
159 |
--------------------------------------------------------------------------------
/asn/asn3.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/asn/asn3.pdf
--------------------------------------------------------------------------------
/asn/asn3.tex:
--------------------------------------------------------------------------------
1 | \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
2 | \usepackage{geometry}
3 | \usepackage{enumitem}
4 | \usepackage{algorithm}
5 | \usepackage[noend]{algpseudocode}
6 | % See geometry.pdf to learn the layout options. There are lots.
7 | \geometry{letterpaper} % ... or a4paper or a5paper or ...
8 | %\geometry{landscape} % Activate for for rotated page geometry
9 | %\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
10 | \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
11 | % TeX will automatically convert eps --> pdf in pdflatex
12 | \usepackage{amssymb}
13 |
14 | \usepackage{stmaryrd}
15 |
16 |
17 | \title{CS704: Assignment 3}
18 | \author{}
19 | \date{} % Activate to display a given date or no date
20 |
21 |
22 | \begin{document}
23 | \maketitle
24 |
25 | The first question is adapted from Nielsen and Nielsen.
26 |
27 | \section{Operational Semantics}
28 | In class, we defined the operational semantics of a simple imperative programming language with while loops. In this question, you will extend the language and its semantics.
29 |
30 | \begin{enumerate}[label=\bf\Alph*]
31 | \item Suppose we extend the language with a \texttt{repeat $P$ until $b$} statement, where $b$ is a Boolean expression
32 | and $P$ is a program.
33 | Provide the rule(s) defining
34 | the big-step (natural) semantics of the
35 | repeat-until statement---i.e., define the $\to$ relation.
36 | Your semantics should model the intuitive
37 | meaning of a repeat-until statement: that $P$ is repeatedly
38 | executed until $b$ is \emph{true}, in which case we exit the
39 | loop.
40 |
41 | \item Prove that for all programs $P$ and Boolean expressions $b$,
42 | the programs
43 |
44 | \texttt{repeat $P$ until $b$}
45 |
46 | and
47 |
48 | \texttt{$P$; if $b$ then skip else (repeat $P$ until $b$)}
49 |
50 | are equivalent.
51 |
52 | Recall that two programs $P_1$, $P_2$ are equivalent
53 | iff for all states $s,s'$,
54 | we have
55 | $$\langle P_1, s \rangle \to s' \emph{ iff } \langle P_2, s \rangle \to s'$$
56 |
57 | \item As above, provide the semantics for
58 | a for-loop construct of the form
59 |
60 | \texttt{for x = $a$ to $a'$ do $P$}
61 |
62 | where $a$ and $a'$ are arithmetic expressions.
63 |
64 | \end{enumerate}
65 | \section{Hoare Logic}
66 |
67 | In this question, all variables hold real-world integers---i.e.,
68 | don't worry about machine arithmetic and overflows.
69 |
70 |
71 | \begin{enumerate}[label=\bf\Alph*]
72 | \item
73 | Using Hoare logic, give a proof of the following Hoare triple:
74 |
75 | $\{x \geq 0 \land y > 0\}$
76 | \begin{verbatim}
77 | r = x;
78 | q = 0;
79 | while (r >= y){
80 | r = r - y;
81 | q = q + 1;
82 | }
83 | \end{verbatim}
84 | $\{x = y * q + r \land 0 \leq r < y\}$
85 |
86 | You need only provide an annotation of the form $\{P\}$
87 | for every location in the program; you do not need
88 | to show a derivation tree.
89 | Accompany your answer with an English description.
90 |
91 | \item Using Hoare logic, give a proof that the following
92 | sequence of statements swaps the values of x and y.
93 |
94 | \begin{verbatim}
95 | x = x + y;
96 | y = x - y;
97 | x = x - y;
98 | \end{verbatim}
99 |
100 | You may use auxiliary variables to denote the
101 | initial/final values of x and y.
102 | Again, you need only supply annotations of the form $\{P\}$
103 | for every location along the program.
104 | Accompany your answer with an English description.
105 |
106 | \item Consider the following Hoare triple.
107 |
108 | $\{true\}$
109 | \begin{verbatim}
110 | x = 10;
111 | y = 10;
112 |
113 | while (x + y > 0)
114 | x = x - 1;
115 | y = y - 1;
116 | z = x + y;
117 | \end{verbatim}
118 | $\{z=0\}$
119 |
120 |
121 | Prove that the Hoare triple is valid
122 | by giving an inductive loop invariant.
123 | Show that your answer is indeed an inductive loop invariant.
124 | \end{enumerate}
125 |
126 | \section{Type Inference}
127 | In class, we used Robinson's unification algorithm to
128 | solve a set of type equations of the form $\{S_i = T_i\}_{i\in 1\ldots n}.$
129 | In cases where no principal unifier exists,
130 | the algorithm returns \emph{fail}.
131 |
132 |
133 |
134 |
135 | For completeness, we supply the unification algorithm below,
136 | in the style of TAPL, as covered in lecture.
137 | The input to the algorithm is a set $C$ of equations
138 | of the form $S=T$.
139 | In the conditionals, we use
140 | $S = X$ to mean that $S$ is a single variable $X$.
141 | Similarly, $S = S_1 \to S_2$ means that $S$ is of the form
142 | $S_1 \to S_2$, where $S_i$ could be variables, types,
143 | or more complex expressions.
144 |
145 | \begin{algorithm}
146 | \caption{Unification Algorithm}\label{alg:unify}
147 | \begin{algorithmic}
148 | \Procedure{unify}{$C$}
149 | \If{$C = \emptyset$} \Return [\ ]
150 | \Else
151 | \State let $\{S = T\} \cup C' = C$
152 | \If {$S = T$} \textsc{unify}(C')
153 | \ElsIf {$S = X$ and $X \not\in FV(T)$}
154 | \State \Return $\textsc{unify}([X \mapsto T]C') \circ [X \mapsto T]$
155 | \ElsIf {$T = X$ and $X \not\in FV(S)$}
156 | \State \Return $\textsc{unify}([X \mapsto S]C') \circ [X \mapsto S]$
157 | \ElsIf {$S = S_1 \to S_2$ and $T = T_1 \to T_2$}
158 | \State \Return $\textsc{unify}(C' \cup \{S_1 = T_1, S_2 = T_2\})$
159 | \Else \State \Return \emph{fail}
160 | \EndIf
161 | \EndIf
162 | \EndProcedure
163 | \end{algorithmic}
164 | \end{algorithm}
165 | \begin{enumerate}[label=\bf\Alph*]
166 |
167 | \item
168 | Provide an example set of equations where the algorithm fails.
169 | Ensure that your equations \emph{do not include}
170 | cases where (1) a variable $X$ appears in both $S_i$ and $T_i$,
171 | or (2) $S_i$ is a function type and $T_i$ is not (or vice versa).
172 | In other words, these cases ensure that you do not give a trivial
173 | answer where the algorithm immediately fails when it considers
174 | such equation.
175 |
176 |
177 | \item Prove that \textsc{unify} always terminates.
178 | \end{enumerate}
179 | \end{document}
180 |
--------------------------------------------------------------------------------
/asn/asn4.aux:
--------------------------------------------------------------------------------
1 | \relax
2 | \@writefile{toc}{\contentsline {section}{\numberline {1}Interpolants}{1}\protected@file@percent }
3 | \@writefile{toc}{\contentsline {subsection}{\numberline {1.1}}{1}\protected@file@percent }
4 | \@writefile{toc}{\contentsline {subsection}{\numberline {1.2}}{2}\protected@file@percent }
5 | \@writefile{toc}{\contentsline {subsection}{\numberline {1.3}}{2}\protected@file@percent }
6 | \@writefile{toc}{\contentsline {section}{\numberline {2}Galois connections}{2}\protected@file@percent }
7 | \@writefile{toc}{\contentsline {paragraph}{Definition 1:}{2}\protected@file@percent }
8 | \@writefile{toc}{\contentsline {paragraph}{Definition 2:}{2}\protected@file@percent }
9 |
--------------------------------------------------------------------------------
/asn/asn4.fdb_latexmk:
--------------------------------------------------------------------------------
1 | # Fdb version 3
2 | ["pdflatex"] 1618931379 "/Users/aws/git/cs704/asn/asn4.tex" "/Users/aws/git/cs704/asn/asn4.pdf" "asn4" 1618931380
3 | "/Users/aws/git/cs704/asn/asn4.aux" 1618931380 655 71b036a2606d23df6c5ac6e8bb1b5a47 ""
4 | "/Users/aws/git/cs704/asn/asn4.tex" 1618931378 8643 8d1fc0b9594041f54653395a6b325af4 ""
5 | "/usr/local/texlive/2019/texmf-dist/fonts/map/fontname/texfonts.map" 1511824771 3332 103109f5612ad95229751940c61aada0 ""
6 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1246382020 1004 54797486969f23fa377b128694d548df ""
7 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm" 1246382020 988 bdf658c3bfc2d96d3c8b02cfc1c94c20 ""
8 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm" 1246382020 916 f87d7c45f9c908e672703b83b72241a3 ""
9 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm" 1246382020 928 2dc8d444221b7a635bb58038579b861a ""
10 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm" 1246382020 908 2921f8a10601f252058503cc6570e581 ""
11 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm" 1246382020 940 228d6584342e91276bf566bcf9716b83 ""
12 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm" 1136768653 1328 c834bbb027764024c09d3d2bf908b5f0 ""
13 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm" 1136768653 1324 c910af8c371558dc20f2d7822f66fe64 ""
14 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmex10.tfm" 1136768653 992 662f679a0b3d2d53c1b94050fdaa3f50 ""
15 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm" 1136768653 1528 abec98dbc43e172678c11b3b9031252a ""
16 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1136768653 1524 4414a8315f39513458b80dfc63bff03a ""
17 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1136768653 1512 f21f83efb36853c0b70002322c1ab3ad ""
18 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1136768653 1520 eccf95517727cb11801f4f1aee3a21b4 ""
19 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr10.tfm" 1136768653 1296 45809c5a464d5f32c8f98ba97c1bb47f ""
20 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1136768653 1288 655e228510b4c2a1abe905c368440826 ""
21 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1136768653 1292 296a67155bdbfc32aa9c636f21e91433 ""
22 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1136768653 1300 b62933e007d01cfd073f79b963c01526 ""
23 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1136768653 1292 21c1c5bfeaebccffdb478fd231a0997d ""
24 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1136768653 1124 6c73e740cf17375f03eec0ee63599741 ""
25 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1136768653 1116 933a60c408fc0a863a92debe84b2d294 ""
26 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1136768653 1120 8b7d695260f3cff42e636090a8002094 ""
27 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmti10.tfm" 1136768653 1480 aa8e34af0eb6a2941b776984cf1dfdc4 ""
28 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm" 1302307949 848 f478e0761563bbc369eca609a1741348 ""
29 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary6.tfm" 1302307949 848 068dd119e13b75777e62821af7d4f2a6 ""
30 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary8.tfm" 1302307949 848 6125cdd3627e68d3db8013b98e587508 ""
31 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb" 1248133631 34811 78b52f49e893bcba91bd7581cdc144c0 ""
32 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1248133631 32080 340ef9bf63678554ee606688e7b5339d ""
33 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1248133631 36299 5f9df58c2139e7edcf37c8fca4bd384d ""
34 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb" 1248133631 35469 70d41d2b9ea31d5d813066df7c99281c ""
35 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1248133631 35752 024fb6c41858982481f6968b5fc26508 ""
36 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1248133631 32722 d7379af29a190c3f453aba36302ff5a9 ""
37 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1248133631 32362 179c33bbf43f19adbb3825bb4e36e57a ""
38 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb" 1248133631 32726 0a1aea6fcd6468ee2cf64d891f5c43c8 ""
39 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1248133631 32569 5e5ddc8df908dea60932f3c484a54c0d ""
40 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb" 1248133631 37944 359e864bd06cde3b1cf57bb20757fb06 ""
41 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb" 1248133631 31764 459c573c03a4949a528c2cc7f557e217 ""
42 | "/usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1461363279 71627 94eb9990bed73c364d7f53f960cc8c5b ""
43 | "/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty" 1284331290 1458 43ab4710dc82f3edeabecd0d099626b2 ""
44 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty" 1463608860 7612 729a8cc22a1ee0029997c7f74717ae05 ""
45 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty" 1463608860 7324 2310d1247db0114eb4726807c8837a0e ""
46 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty" 1536443070 1300 96620a7d94bc0ceb261d968770ce8315 ""
47 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty" 1463608860 6797 90b7f83b0ad46826bc16058b1e3d48df ""
48 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty" 1463608860 8253 473e0e41f9adadb1977e8631b8f72ea6 ""
49 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty" 1463608860 5152 b67a3a964ad9851e095110c854a1d461 ""
50 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty" 1463608860 14040 ac8866aac45982ac84021584b0abb252 ""
51 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty" 1463608860 18425 5b3c0c59d76fac78978b5558e83c1f36 ""
52 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty" 1536701967 20457 0d2e642faacbb41c9d72690f8cc529cd ""
53 | "/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty" 1160617237 26750 ce139c05a983e19ddca355b43e29c395 ""
54 | "/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty" 1160617237 3457 d9077efe6b74c5a094199256af8d7d9a ""
55 | "/usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty" 1251330371 3249 15763257e50278eef5db1952ccde229c ""
56 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty" 1359763108 5949 3f3fd50a8cc94c3d4cbf4fc66cd3df1c ""
57 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty" 1359763108 13829 94730e64147574077f8ecfea9bb69af4 ""
58 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd" 1359763108 961 6518c6525a34feb5e8250ffa91731cff ""
59 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd" 1359763108 961 d02606146ba5601b5645f987c92e6193 ""
60 | "/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls" 1544567569 19933 3097d1b31d3c45dc957096f554529032 ""
61 | "/usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty" 1523050425 5161 c004ea5a189d4bdcf42e86754ad75a58 ""
62 | "/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo" 1544567569 8310 3be7fb8fac17ab8f3f822aa0c9800815 ""
63 | "/usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty" 1137110151 6749 16d2656a1984957e674b149555f1ea1d ""
64 | "/usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty" 1525727744 41645 0653033a985e06c69a2a9cea9a95e31a ""
65 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1465944070 1224 978390e9c2234eab29404bc21b268d1e ""
66 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def" 1515537368 17334 520b9b85ad8a2a48eda3f643e27a5179 ""
67 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty" 1523134385 15272 5a97061616e0c8b2aa79c6615ff769f4 ""
68 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty" 1523134385 9063 d0a305975932762117cd1f06a582f896 ""
69 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty" 1523134385 2591 6404d0c7d28505fb38ce0d86c2e28ae7 ""
70 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty" 1523134385 3977 cb9221976ed8a183afad65b59aa8629a ""
71 | "/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af ""
72 | "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty" 1463608860 12095 5337833c991d80788a43d3ce26bd1c46 ""
73 | "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty" 1463608860 7075 2fe3d848bba95f139de11ded085e74aa ""
74 | "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty" 1463608860 22417 1d9df1eb66848aa31b18a593099cf45c ""
75 | "/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd" 1137110872 1766 216b0f832c406513647608b5bb9bb8ff ""
76 | "/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty" 1302307949 11080 aa7f81da60ce104f0dbb8b827dd14383 ""
77 | "/usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty" 1388531844 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
78 | "/usr/local/texlive/2019/texmf-dist/web2c/texmf.cnf" 1557092114 35484 cb1661360667bf4db662a8895053b554 ""
79 | "/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map" 1557342064 3277517 23507ed665b4dd9046f0f2a94bbef2be ""
80 | "/usr/local/texlive/2019/texmf-var/web2c/pdftex/pdflatex.fmt" 1557342086 4259635 562fc36ec496993777a6c428d8bfb811 ""
81 | "/usr/local/texlive/2019/texmf.cnf" 1557341546 577 d150fef99ac436ad1156e86b0892f6ef ""
82 | "asn4.aux" 1618931380 655 71b036a2606d23df6c5ac6e8bb1b5a47 "pdflatex"
83 | "asn4.tex" 1618931378 8643 8d1fc0b9594041f54653395a6b325af4 ""
84 | (generated)
85 | "asn4.aux"
86 | "/Users/aws/git/cs704/asn/asn4.log"
87 | "asn4.log"
88 | "/Users/aws/git/cs704/asn/asn4.pdf"
89 | "asn4.pdf"
90 |
--------------------------------------------------------------------------------
/asn/asn4.fls:
--------------------------------------------------------------------------------
1 | PWD /Users/aws/git/cs704/asn
2 | INPUT /usr/local/texlive/2019/texmf.cnf
3 | INPUT /usr/local/texlive/2019/texmf-dist/web2c/texmf.cnf
4 | INPUT /usr/local/texlive/2019/texmf-var/web2c/pdftex/pdflatex.fmt
5 | INPUT /Users/aws/git/cs704/asn/asn4.tex
6 | OUTPUT /Users/aws/git/cs704/asn/asn4.log
7 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
8 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
9 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
10 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
11 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/map/fontname/texfonts.map
12 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
13 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty
14 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty
15 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
16 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
17 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty
18 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty
19 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty
20 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty
21 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
22 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
23 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
24 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
25 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
26 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
27 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
28 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
29 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
30 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
31 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
32 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
33 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
34 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
35 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty
36 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty
37 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
38 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
39 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
40 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
41 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty
42 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty
43 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty
44 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty
45 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
46 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
47 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
48 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
49 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
50 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
51 | INPUT /Users/aws/git/cs704/asn/asn4.aux
52 | INPUT /Users/aws/git/cs704/asn/asn4.aux
53 | OUTPUT /Users/aws/git/cs704/asn/asn4.aux
54 | INPUT /usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
55 | INPUT /usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
56 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
57 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
58 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
59 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
60 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
61 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
62 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
63 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
64 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
65 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
66 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
67 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
68 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
69 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
70 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
71 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
72 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
73 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
74 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
75 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
76 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
77 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
78 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm
79 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
80 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr8.tfm
81 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr6.tfm
82 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm
83 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm
84 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm
85 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
86 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm
87 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm
88 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
89 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm
90 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
91 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd
92 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd
93 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
94 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
95 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm
96 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd
97 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd
98 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
99 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
100 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm
101 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd
102 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd
103 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm
104 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary8.tfm
105 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary6.tfm
106 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
107 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
108 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmti10.tfm
109 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm
110 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
111 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
112 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
113 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
114 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm
115 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
116 | OUTPUT /Users/aws/git/cs704/asn/asn4.pdf
117 | INPUT /usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map
118 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm
119 | INPUT /Users/aws/git/cs704/asn/asn4.aux
120 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
121 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb
122 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb
123 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb
124 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
125 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb
126 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb
127 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb
128 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb
129 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb
130 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb
131 |
--------------------------------------------------------------------------------
/asn/asn4.log:
--------------------------------------------------------------------------------
1 | This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.5.8) 20 APR 2021 10:09
2 | entering extended mode
3 | restricted \write18 enabled.
4 | %&-line parsing enabled.
5 | **asn4.tex
6 | (./asn4.tex
7 | LaTeX2e <2018-12-01>
8 | (/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
9 | Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
10 | (/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
11 | File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
12 | )
13 | \c@part=\count80
14 | \c@section=\count81
15 | \c@subsection=\count82
16 | \c@subsubsection=\count83
17 | \c@paragraph=\count84
18 | \c@subparagraph=\count85
19 | \c@figure=\count86
20 | \c@table=\count87
21 | \abovecaptionskip=\skip41
22 | \belowcaptionskip=\skip42
23 | \bibindent=\dimen102
24 | )
25 | (/usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty
26 | Package: geometry 2018/04/16 v5.8 Page Geometry
27 |
28 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
29 | Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
30 | \KV@toks@=\toks14
31 | )
32 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty
33 | Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
34 | )
35 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty
36 | Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
37 | Package ifvtex Info: VTeX not detected.
38 | )
39 | (/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
40 | Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
41 | )
42 | \Gm@cnth=\count88
43 | \Gm@cntv=\count89
44 | \c@Gm@tempcnt=\count90
45 | \Gm@bindingoffset=\dimen103
46 | \Gm@wd@mp=\dimen104
47 | \Gm@odd@mp=\dimen105
48 | \Gm@even@mp=\dimen106
49 | \Gm@layoutwidth=\dimen107
50 | \Gm@layoutheight=\dimen108
51 | \Gm@layouthoffset=\dimen109
52 | \Gm@layoutvoffset=\dimen110
53 | \Gm@dimlist=\toks15
54 | )
55 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
56 | Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
57 |
58 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
59 | Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
60 |
61 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
62 | Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
63 | )
64 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
65 | File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
66 | )
67 | Package graphics Info: Driver file: pdftex.def on input line 99.
68 |
69 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
70 | File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
71 | ))
72 | \Gin@req@height=\dimen111
73 | \Gin@req@width=\dimen112
74 | )
75 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
76 | Package: amssymb 2013/01/14 v3.01 AMS font symbols
77 |
78 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty
79 | Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
80 | \@emptytoks=\toks16
81 | \symAMSa=\mathgroup4
82 | \symAMSb=\mathgroup5
83 | LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
84 | (Font) U/euf/m/n --> U/euf/b/n on input line 106.
85 | ))
86 | (/usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
87 | \Urlmuskip=\muskip10
88 | Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
89 | )
90 | (/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
91 | Package: stmaryrd 1994/03/03 St Mary's Road symbol package
92 | \symstmry=\mathgroup6
93 | LaTeX Font Info: Overwriting symbol font `stmry' in version `bold'
94 | (Font) U/stmry/m/n --> U/stmry/b/n on input line 89.
95 | )
96 | (/usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty
97 | Package: algorithm 2009/08/24 v0.1 Document Style `algorithm' - floating enviro
98 | nment
99 |
100 | (/usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty
101 | Package: float 2001/11/08 v1.3d Float enhancements (AL)
102 | \c@float@type=\count91
103 | \float@exts=\toks17
104 | \float@box=\box27
105 | \@float@everytoks=\toks18
106 | \@floatcapt=\box28
107 | )
108 | (/usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
109 | Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
110 | )
111 | \@float@every@algorithm=\toks19
112 | \c@algorithm=\count92
113 | )
114 | (/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
115 | Package: algpseudocode
116 |
117 | (/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
118 | Package: algorithmicx 2005/04/27 v1.2 Algorithmicx
119 |
120 | Document Style algorithmicx 1.2 - a greatly improved `algorithmic' style
121 | \c@ALG@line=\count93
122 | \c@ALG@rem=\count94
123 | \c@ALG@nested=\count95
124 | \ALG@tlm=\skip43
125 | \ALG@thistlm=\skip44
126 | \c@ALG@Lnr=\count96
127 | \c@ALG@blocknr=\count97
128 | \c@ALG@storecount=\count98
129 | \c@ALG@tmpcounter=\count99
130 | \ALG@tmplength=\skip45
131 | )
132 | Document Style - pseudocode environments for use with the `algorithmicx' style
133 | ) (./asn4.aux)
134 | \openout1 = `asn4.aux'.
135 |
136 | LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 18.
137 | LaTeX Font Info: ... okay on input line 18.
138 | LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 18.
139 | LaTeX Font Info: ... okay on input line 18.
140 | LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 18.
141 | LaTeX Font Info: ... okay on input line 18.
142 | LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 18.
143 | LaTeX Font Info: ... okay on input line 18.
144 | LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 18.
145 | LaTeX Font Info: ... okay on input line 18.
146 | LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 18.
147 | LaTeX Font Info: ... okay on input line 18.
148 |
149 | *geometry* driver: auto-detecting
150 | *geometry* detected driver: pdftex
151 | *geometry* verbose mode - [ preamble ] result:
152 | * driver: pdftex
153 | * paper: letterpaper
154 | * layout:
155 | * layoutoffset:(h,v)=(0.0pt,0.0pt)
156 | * modes:
157 | * h-part:(L,W,R)=(92.14519pt, 430.00462pt, 92.14519pt)
158 | * v-part:(T,H,B)=(95.39737pt, 556.47656pt, 143.09605pt)
159 | * \paperwidth=614.295pt
160 | * \paperheight=794.96999pt
161 | * \textwidth=430.00462pt
162 | * \textheight=556.47656pt
163 | * \oddsidemargin=19.8752pt
164 | * \evensidemargin=19.8752pt
165 | * \topmargin=-13.87262pt
166 | * \headheight=12.0pt
167 | * \headsep=25.0pt
168 | * \topskip=11.0pt
169 | * \footskip=30.0pt
170 | * \marginparwidth=59.0pt
171 | * \marginparsep=10.0pt
172 | * \columnsep=10.0pt
173 | * \skip\footins=10.0pt plus 4.0pt minus 2.0pt
174 | * \hoffset=0.0pt
175 | * \voffset=0.0pt
176 | * \mag=1000
177 | * \@twocolumnfalse
178 | * \@twosidefalse
179 | * \@mparswitchfalse
180 | * \@reversemarginfalse
181 | * (1in=72.27pt=25.4mm, 1cm=28.453pt)
182 |
183 | (/usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
184 | [Loading MPS to PDF converter (version 2006.09.02).]
185 | \scratchcounter=\count100
186 | \scratchdimen=\dimen113
187 | \scratchbox=\box29
188 | \nofMPsegments=\count101
189 | \nofMParguments=\count102
190 | \everyMPshowfont=\toks20
191 | \MPscratchCnt=\count103
192 | \MPscratchDim=\dimen114
193 | \MPnumerator=\count104
194 | \makeMPintoPDFobject=\count105
195 | \everyMPtoPDFconversion=\toks21
196 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
197 | Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
198 |
199 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
200 | Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
201 | )
202 | (/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
203 | Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
204 |
205 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
206 | Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
207 |
208 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
209 | Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
210 | )))
211 | (/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
212 | Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
213 |
214 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
215 | Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
216 |
217 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
218 | Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
219 |
220 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
221 | Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
222 | Package ifluatex Info: LuaTeX not detected.
223 | ))))
224 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
225 | Package: pdftexcmds 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO
226 | )
227 | Package pdftexcmds Info: LuaTeX not detected.
228 | Package pdftexcmds Info: \pdf@primitive is available.
229 | Package pdftexcmds Info: \pdf@ifprimitive is available.
230 | Package pdftexcmds Info: \pdfdraftmode found.
231 | )
232 | Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 4
233 | 38.
234 | Package grfext Info: Graphics extension search list:
235 | (grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPE
236 | G,.JBIG2,.JB2,.eps]
237 | (grfext) \AppendGraphicsExtensions on input line 456.
238 |
239 | (/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
240 | File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Liv
241 | e
242 | ))
243 | LaTeX Font Info: Try loading font information for U+msa on input line 19.
244 |
245 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd
246 | File: umsa.fd 2013/01/14 v3.01 AMS symbols A
247 | )
248 | LaTeX Font Info: Try loading font information for U+msb on input line 19.
249 |
250 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd
251 | File: umsb.fd 2013/01/14 v3.01 AMS symbols B
252 | )
253 | LaTeX Font Info: Try loading font information for U+stmry on input line 19.
254 |
255 | (/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd)
256 |
257 | LaTeX Warning: No \author given.
258 |
259 | [1
260 |
261 | {/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}]
262 | [2] (./asn4.aux) )
263 | Here is how much of TeX's memory you used:
264 | 3043 strings out of 492616
265 | 42633 string characters out of 6129482
266 | 111184 words of memory out of 5000000
267 | 6910 multiletter control sequences out of 15000+600000
268 | 12514 words of font info for 48 fonts, out of 8000000 for 9000
269 | 1141 hyphenation exceptions out of 8191
270 | 41i,6n,27p,271b,199s stack positions out of 5000i,500n,10000p,200000b,80000s
271 |
283 | Output written on asn4.pdf (2 pages, 114766 bytes).
284 | PDF statistics:
285 | 55 PDF objects out of 1000 (max. 8388607)
286 | 39 compressed objects within 1 object stream
287 | 0 named destinations out of 1000 (max. 500000)
288 | 1 words of extra memory for PDF output out of 10000 (max. 10000000)
289 |
290 |
--------------------------------------------------------------------------------
/asn/asn4.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/asn/asn4.pdf
--------------------------------------------------------------------------------
/asn/asn4.tex:
--------------------------------------------------------------------------------
1 | \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
2 | \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
3 | \geometry{letterpaper} % ... or a4paper or a5paper or ...
4 | %\geometry{landscape} % Activate for for rotated page geometry
5 | %\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
6 | \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
7 | % TeX will automatically convert eps --> pdf in pdflatex
8 | \usepackage{amssymb}
9 | \usepackage{url}
10 | \usepackage{stmaryrd}
11 |
12 | \usepackage{algorithm}
13 | \usepackage[noend]{algpseudocode}
14 |
15 | \newcommand{\lang}{\mathcal{L}}
16 | \title{Assignment 4}
17 |
18 | \begin{document}
19 | \maketitle
20 |
21 | \section{Interpolants}
22 |
23 | This question concerns the logical notion
24 | of \emph{Craig interpolants}.
25 | You do not require prior knowledge about interpolation
26 | to answer this question.
27 |
28 | Given two formulas $A$ and $B$ in first-order logic,
29 | such that $A \land B$ is unsatisfiable,
30 | there exists a formula $I$, called an interpolant, such that
31 | \begin{enumerate}
32 | \item $A \Rightarrow I$ is valid (recall that a formula $\phi$ is valid iff all models satisfy it)
33 | \item $I \land B$ is unsatisfiable;
34 | \item $\emph{vars}(I) \subseteq \emph{vars}(A) \cap \emph{vars}(B)$,
35 | where $\emph{vars}(\phi)$ is the set of all variables
36 | that appear in $\phi$.
37 | \end{enumerate}
38 |
39 | As an example, consider the following formulas
40 | in propositional logic (i.e., all variables are Boolean):
41 | %
42 | $$A \triangleq a \land b$$
43 | $$B \triangleq \neg b \land c$$
44 | %
45 | We know that $A \land B$ is unsatisfiable.
46 | An interpolant $I$ here is $b$. Observe that
47 | $A \Rightarrow I$ is valid, $I \land B$ is unsatisfiable,
48 | and $I$ only contains variables that appear in $A$ and $B$.
49 |
50 |
51 | \subsection{}
52 | An alternative definition of an interpolant
53 | is as follows:
54 |
55 | Suppose we have two formulas $A$ and $C$
56 | such that $A \Rightarrow C$ is valid, then
57 | there exists a formula $I$ such that
58 | \begin{enumerate}
59 | \item $A \Rightarrow I$ is valid;
60 | \item $I \Rightarrow C$ is valid;
61 | \item $\emph{vars}(I) \subseteq \emph{vars}(A) \cap \emph{vars}(C)$.
62 | \end{enumerate}
63 |
64 | Prove that the two definitions of an interpolant are equivalent.
65 |
66 | \subsection{}
67 | Give two formulas $A$ and $B$ such that $A\land B$ is unsatisfiable,
68 | does there always exist a unique interpolant (up to logical equivalence)?
69 | If not, provide an example of two formulas $A$ and $B$ and
70 | two interpolants $I_1$ and $I_2$,
71 | such that $I_1 \neq I_2$.
72 |
73 |
74 | \subsection{}
75 | Suppose you are working with formulas
76 | in quantifier-free linear integer arithmetic:
77 | meaning, formulas that are Boolean combinations (conjunctions, disjunctions, negations)
78 | of linear inequalities over integers
79 | of the form: $a_1x_1 + \ldots a_nx_n \leq c$,
80 | where $a_i,c$ are integer constants, and $x_i$ are integer
81 | variables.
82 |
83 | Consider the following two formulas in quantifier-free
84 | linear integer arithmetic:
85 |
86 | $$A \triangleq x = 2y$$
87 | $$B \triangleq x = 2z - 1$$
88 |
89 | Is $A \land B$ satisfiable?
90 | If not, does there exist an interpolant
91 | for $A$ and $B$ that is also in quantifier-free linear integer arithmetic?
92 | If no such interpolant exists, explain why that is the case.
93 |
94 |
95 | % \section{Extending Static Analysis to a Probabilistic Setting}
96 |
97 | % \newcommand{\prog}{\mathcal{L}}
98 | % \newcommand{\pprog}{\mathcal{L}^\sim}
99 |
100 | % \newcommand{\stat}{\mathcal{A}}
101 |
102 | % Let $\prog$ be a very simple programming language
103 | % where a program $P \in \prog$ is comprised of assignment,
104 | % conditional, and while-loop statements.
105 | % Assume also that all variables are either Boolean or real-valued,
106 | % and that all programs of interest are well-typed and exhibit
107 | % no runtime errors (e.g., divisions by zero).
108 |
109 | % For a program $P$, we assume it has a set of input variables $V_i$
110 | % and a set of output variables $V_r$.
111 | % For the rest of this question, imagine that we have at our
112 | % disposal an almighty static analyzer $\stat$ that, given $P \in \prog$,
113 | % returns a set $S$ of all states reachable by executing $P$ from
114 | % any possible input.
115 | % A state $s \in S$ is considered to be a map from every variable
116 | % in $P$ to a value.
117 | % Given variable $x$, we use $s[x]$ to denote the value of $x$
118 | % in $s$.
119 |
120 | % \paragraph{Example 1}
121 | % For illustration, consider the following example:
122 | % %
123 | % \begin{verbatim}
124 | % def p(x)
125 | % y = x + 1
126 | % return y
127 | % \end{verbatim}
128 | % %
129 | % Given the above program, the static analyzer returns
130 | % the set
131 | % $$\{s \mid s[x] = c, s[y] = c + 1, c \in \mathbb{R}\}$$
132 | % In other words, it returns the set of all states $s$ where $y = x + 1$.
133 |
134 | % \paragraph{Example 2}
135 | % We also assume that our language $\lang$ allows non-deterministic
136 | % choice, which is denoted by \texttt{if (*) ... else ...},
137 | % where the program can non-deterministically execute either branch of the
138 | % conditional statement.
139 | % Consider, for example, the following simple program:
140 | % \begin{verbatim}
141 | % def p()
142 | % if (*)
143 | % y = 1
144 | % else
145 | % y = 2
146 | % return y
147 | % \end{verbatim}
148 | % Given the above program, the static analyzer returns the set
149 | % $$\{ s \mid s[y] \in \{1,2\}\}$$
150 |
151 |
152 | % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153 | % \subsection{Using $\stat$ for probabilistic reasoning}
154 | % \label{sec:proba}
155 |
156 | % Suppose that we decide to extend our language
157 | % $\prog$ into a new language $\pprog$ with random assignments of the form
158 | % \begin{verbatim}
159 | % x ~ bern(c)
160 | % \end{verbatim}
161 | % where Boolean variable \texttt{x} is assigned true with probability \texttt{c}
162 | % and false with probability \texttt{1-c}, where $\texttt{c}$ is a constant in $ [0,1]$.
163 | % (\texttt{bern} stands for a Bernoulli distribution.)
164 |
165 | % Given a program $P \in \pprog$, we are typically
166 | % interested in the probability of the program returning
167 | % a specific set of values.
168 | % For example, consider the following probabilistic program:
169 | % \begin{verbatim}
170 | % def p()
171 | % x ~ bern(0.5)
172 | % y ~ bern(0.5)
173 | % z = x && y
174 | % return z
175 | % \end{verbatim}
176 | % The probability that \texttt{p} returns true
177 | % is 0.25, as both \texttt{x} and \texttt{y} have to be true.
178 |
179 | % Your task in this question is as follows:
180 | % Given a program $P \in \pprog$ and the static
181 | % analyzer $\stat$, you are to use $\stat$
182 | % to compute the probability that $P$ returns
183 | % a value in some set $X$.
184 | % Note that $\stat$ only accepts programs in $\prog$,
185 | % so you have to somehow transform $P \in \pprog$ into a new
186 | % program in $\prog$
187 | % in order to be able to use $\stat$.
188 | % Once you have the output set $S$ of $\stat$,
189 | % you may apply any mathematical operation on $S$ to
190 | % extract your desired result.
191 |
192 | % You should assume that $P$ is always terminating,
193 | % has no non-deterministic conditionals,
194 | % has no input variables (like the above example),
195 | % and only manipulates Boolean variables.
196 | % \textbf{Hint:} your transformation of $P$
197 | % may introduce non-determinism, real-valued variables,
198 | % and lists.
199 |
200 | % \subsection{Discovering maximizing inputs}
201 | % In the first part of the question,
202 | % we assumed that $P$ has no input variables.
203 | % In this part, we will assume that $P$ has input variables.
204 | % Our goal is to find a value for the input variables
205 | % that maximizes the probability of returning some output value.
206 | % Consider the following example:
207 | % \begin{verbatim}
208 | % def p(x)
209 | % if (x)
210 | % y ~ bern(0.5)
211 | % else
212 | % y ~ bern(0.9)
213 | % return y
214 | % \end{verbatim}
215 | % Suppose we want to maximize the probability
216 | % that \texttt{p} returns the value true.
217 | % To do so, we have to set the input variable \texttt{x}
218 | % to false in order to force the program down the
219 | % else branch of \texttt{p}, which has a higher
220 | % probability of setting \texttt{y} to true.
221 |
222 | % Describe how you would extend your
223 | % technique from Part~\ref{sec:proba} to this setting.
224 |
225 | \section{Galois connections}
226 | Consider these two definitions of Galois connections:
227 |
228 | \paragraph{Definition 1:}
229 | $(L,\alpha,\gamma,M)$ is a Galois connection
230 | between the complete lattices $(L,\sqsubseteq)$
231 | and $(M,\sqsubseteq)$ if and only if
232 | $\alpha:L \rightarrow M$ and $\gamma:M \rightarrow L$
233 | are monotone functions that satisfy the following conditions:
234 | $$\textrm{forall } l \in L \ldotp \gamma(\alpha(l)) \sqsupseteq l$$
235 | $$\textrm{forall } m \in M \ldotp \alpha(\gamma(m)) \sqsubseteq m$$
236 |
237 |
238 | \paragraph{Definition 2:}
239 | $(L,\alpha,\gamma,M)$ is a Galois connection
240 | between the complete lattices $(L,\sqsubseteq)$
241 | and $(M,\sqsubseteq)$ if and only if
242 | $\alpha:L \rightarrow M$ and $\gamma:M \rightarrow L$
243 | are total functions such that for all $l\in L, m \in M$,
244 | $$\alpha(l) \sqsubseteq m \Leftrightarrow l \sqsubseteq \gamma (m)$$
245 |
246 | ~\\
247 | Prove that the two definitions are equivalent.
248 |
249 | \end{document}
250 |
--------------------------------------------------------------------------------
/asn/asn5.aux:
--------------------------------------------------------------------------------
1 | \relax
2 | \@writefile{toc}{\contentsline {section}{\numberline {1}Interpolants}{1}\protected@file@percent }
3 | \@writefile{toc}{\contentsline {subsection}{\numberline {1.1}}{1}\protected@file@percent }
4 | \@writefile{toc}{\contentsline {subsection}{\numberline {1.2}}{2}\protected@file@percent }
5 | \@writefile{toc}{\contentsline {subsection}{\numberline {1.3}}{2}\protected@file@percent }
6 | \@writefile{toc}{\contentsline {section}{\numberline {2}Galois connections}{2}\protected@file@percent }
7 | \@writefile{toc}{\contentsline {paragraph}{Definition 1:}{2}\protected@file@percent }
8 | \@writefile{toc}{\contentsline {paragraph}{Definition 2:}{2}\protected@file@percent }
9 |
--------------------------------------------------------------------------------
/asn/asn5.fdb_latexmk:
--------------------------------------------------------------------------------
1 | # Fdb version 3
2 | ["pdflatex"] 1618931372 "/Users/aws/git/cs704/asn/asn5.tex" "/Users/aws/git/cs704/asn/asn5.pdf" "asn5" 1618931373
3 | "/Users/aws/git/cs704/asn/asn5.aux" 1618931372 655 71b036a2606d23df6c5ac6e8bb1b5a47 ""
4 | "/Users/aws/git/cs704/asn/asn5.tex" 1618931371 8643 8d1fc0b9594041f54653395a6b325af4 ""
5 | "/usr/local/texlive/2019/texmf-dist/fonts/map/fontname/texfonts.map" 1511824771 3332 103109f5612ad95229751940c61aada0 ""
6 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1246382020 1004 54797486969f23fa377b128694d548df ""
7 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm" 1246382020 988 bdf658c3bfc2d96d3c8b02cfc1c94c20 ""
8 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm" 1246382020 916 f87d7c45f9c908e672703b83b72241a3 ""
9 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm" 1246382020 928 2dc8d444221b7a635bb58038579b861a ""
10 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm" 1246382020 908 2921f8a10601f252058503cc6570e581 ""
11 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm" 1246382020 940 228d6584342e91276bf566bcf9716b83 ""
12 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm" 1136768653 1328 c834bbb027764024c09d3d2bf908b5f0 ""
13 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm" 1136768653 1324 c910af8c371558dc20f2d7822f66fe64 ""
14 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmex10.tfm" 1136768653 992 662f679a0b3d2d53c1b94050fdaa3f50 ""
15 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm" 1136768653 1528 abec98dbc43e172678c11b3b9031252a ""
16 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm" 1136768653 1524 4414a8315f39513458b80dfc63bff03a ""
17 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1136768653 1512 f21f83efb36853c0b70002322c1ab3ad ""
18 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1136768653 1520 eccf95517727cb11801f4f1aee3a21b4 ""
19 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr10.tfm" 1136768653 1296 45809c5a464d5f32c8f98ba97c1bb47f ""
20 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm" 1136768653 1288 655e228510b4c2a1abe905c368440826 ""
21 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm" 1136768653 1292 296a67155bdbfc32aa9c636f21e91433 ""
22 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1136768653 1300 b62933e007d01cfd073f79b963c01526 ""
23 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1136768653 1292 21c1c5bfeaebccffdb478fd231a0997d ""
24 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm" 1136768653 1124 6c73e740cf17375f03eec0ee63599741 ""
25 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1136768653 1116 933a60c408fc0a863a92debe84b2d294 ""
26 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1136768653 1120 8b7d695260f3cff42e636090a8002094 ""
27 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmti10.tfm" 1136768653 1480 aa8e34af0eb6a2941b776984cf1dfdc4 ""
28 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm" 1302307949 848 f478e0761563bbc369eca609a1741348 ""
29 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary6.tfm" 1302307949 848 068dd119e13b75777e62821af7d4f2a6 ""
30 | "/usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary8.tfm" 1302307949 848 6125cdd3627e68d3db8013b98e587508 ""
31 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb" 1248133631 34811 78b52f49e893bcba91bd7581cdc144c0 ""
32 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb" 1248133631 32080 340ef9bf63678554ee606688e7b5339d ""
33 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1248133631 36299 5f9df58c2139e7edcf37c8fca4bd384d ""
34 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb" 1248133631 35469 70d41d2b9ea31d5d813066df7c99281c ""
35 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1248133631 35752 024fb6c41858982481f6968b5fc26508 ""
36 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb" 1248133631 32722 d7379af29a190c3f453aba36302ff5a9 ""
37 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb" 1248133631 32362 179c33bbf43f19adbb3825bb4e36e57a ""
38 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb" 1248133631 32726 0a1aea6fcd6468ee2cf64d891f5c43c8 ""
39 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1248133631 32569 5e5ddc8df908dea60932f3c484a54c0d ""
40 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb" 1248133631 37944 359e864bd06cde3b1cf57bb20757fb06 ""
41 | "/usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb" 1248133631 31764 459c573c03a4949a528c2cc7f557e217 ""
42 | "/usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii" 1461363279 71627 94eb9990bed73c364d7f53f960cc8c5b ""
43 | "/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty" 1284331290 1458 43ab4710dc82f3edeabecd0d099626b2 ""
44 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty" 1463608860 7612 729a8cc22a1ee0029997c7f74717ae05 ""
45 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty" 1463608860 7324 2310d1247db0114eb4726807c8837a0e ""
46 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty" 1536443070 1300 96620a7d94bc0ceb261d968770ce8315 ""
47 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty" 1463608860 6797 90b7f83b0ad46826bc16058b1e3d48df ""
48 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty" 1463608860 8253 473e0e41f9adadb1977e8631b8f72ea6 ""
49 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty" 1463608860 5152 b67a3a964ad9851e095110c854a1d461 ""
50 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty" 1463608860 14040 ac8866aac45982ac84021584b0abb252 ""
51 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty" 1463608860 18425 5b3c0c59d76fac78978b5558e83c1f36 ""
52 | "/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty" 1536701967 20457 0d2e642faacbb41c9d72690f8cc529cd ""
53 | "/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty" 1160617237 26750 ce139c05a983e19ddca355b43e29c395 ""
54 | "/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty" 1160617237 3457 d9077efe6b74c5a094199256af8d7d9a ""
55 | "/usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty" 1251330371 3249 15763257e50278eef5db1952ccde229c ""
56 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty" 1359763108 5949 3f3fd50a8cc94c3d4cbf4fc66cd3df1c ""
57 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty" 1359763108 13829 94730e64147574077f8ecfea9bb69af4 ""
58 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd" 1359763108 961 6518c6525a34feb5e8250ffa91731cff ""
59 | "/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd" 1359763108 961 d02606146ba5601b5645f987c92e6193 ""
60 | "/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls" 1544567569 19933 3097d1b31d3c45dc957096f554529032 ""
61 | "/usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty" 1523050425 5161 c004ea5a189d4bdcf42e86754ad75a58 ""
62 | "/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo" 1544567569 8310 3be7fb8fac17ab8f3f822aa0c9800815 ""
63 | "/usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty" 1137110151 6749 16d2656a1984957e674b149555f1ea1d ""
64 | "/usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty" 1525727744 41645 0653033a985e06c69a2a9cea9a95e31a ""
65 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg" 1465944070 1224 978390e9c2234eab29404bc21b268d1e ""
66 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def" 1515537368 17334 520b9b85ad8a2a48eda3f643e27a5179 ""
67 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty" 1523134385 15272 5a97061616e0c8b2aa79c6615ff769f4 ""
68 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty" 1523134385 9063 d0a305975932762117cd1f06a582f896 ""
69 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty" 1523134385 2591 6404d0c7d28505fb38ce0d86c2e28ae7 ""
70 | "/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty" 1523134385 3977 cb9221976ed8a183afad65b59aa8629a ""
71 | "/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af ""
72 | "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty" 1463608860 12095 5337833c991d80788a43d3ce26bd1c46 ""
73 | "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty" 1463608860 7075 2fe3d848bba95f139de11ded085e74aa ""
74 | "/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty" 1463608860 22417 1d9df1eb66848aa31b18a593099cf45c ""
75 | "/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd" 1137110872 1766 216b0f832c406513647608b5bb9bb8ff ""
76 | "/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty" 1302307949 11080 aa7f81da60ce104f0dbb8b827dd14383 ""
77 | "/usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty" 1388531844 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
78 | "/usr/local/texlive/2019/texmf-dist/web2c/texmf.cnf" 1557092114 35484 cb1661360667bf4db662a8895053b554 ""
79 | "/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map" 1557342064 3277517 23507ed665b4dd9046f0f2a94bbef2be ""
80 | "/usr/local/texlive/2019/texmf-var/web2c/pdftex/pdflatex.fmt" 1557342086 4259635 562fc36ec496993777a6c428d8bfb811 ""
81 | "/usr/local/texlive/2019/texmf.cnf" 1557341546 577 d150fef99ac436ad1156e86b0892f6ef ""
82 | "asn5.aux" 1618931372 655 71b036a2606d23df6c5ac6e8bb1b5a47 "pdflatex"
83 | "asn5.tex" 1618931371 8643 8d1fc0b9594041f54653395a6b325af4 ""
84 | (generated)
85 | "/Users/aws/git/cs704/asn/asn5.log"
86 | "asn5.pdf"
87 | "asn5.aux"
88 | "/Users/aws/git/cs704/asn/asn5.pdf"
89 | "asn5.log"
90 |
--------------------------------------------------------------------------------
/asn/asn5.fls:
--------------------------------------------------------------------------------
1 | PWD /Users/aws/git/cs704/asn
2 | INPUT /usr/local/texlive/2019/texmf.cnf
3 | INPUT /usr/local/texlive/2019/texmf-dist/web2c/texmf.cnf
4 | INPUT /usr/local/texlive/2019/texmf-var/web2c/pdftex/pdflatex.fmt
5 | INPUT /Users/aws/git/cs704/asn/asn5.tex
6 | OUTPUT /Users/aws/git/cs704/asn/asn5.log
7 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
8 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
9 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
10 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
11 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/map/fontname/texfonts.map
12 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr10.tfm
13 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty
14 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty
15 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
16 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
17 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty
18 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty
19 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty
20 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty
21 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
22 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
23 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
24 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
25 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
26 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
27 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
28 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
29 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
30 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
31 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
32 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
33 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
34 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
35 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty
36 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty
37 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
38 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
39 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
40 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
41 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty
42 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty
43 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty
44 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty
45 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
46 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
47 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
48 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
49 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
50 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
51 | INPUT /Users/aws/git/cs704/asn/asn5.aux
52 | INPUT /Users/aws/git/cs704/asn/asn5.aux
53 | OUTPUT /Users/aws/git/cs704/asn/asn5.aux
54 | INPUT /usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
55 | INPUT /usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
56 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
57 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
58 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
59 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
60 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
61 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
62 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
63 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
64 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
65 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
66 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
67 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
68 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
69 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
70 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
71 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
72 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
73 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
74 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
75 | INPUT /usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
76 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
77 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
78 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr17.tfm
79 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
80 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr8.tfm
81 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr6.tfm
82 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi12.tfm
83 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm
84 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm
85 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
86 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm
87 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm
88 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
89 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm
90 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
91 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd
92 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd
93 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
94 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
95 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm
96 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd
97 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd
98 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
99 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
100 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm
101 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd
102 | INPUT /usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd
103 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm
104 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary8.tfm
105 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary6.tfm
106 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmr12.tfm
107 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
108 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmti10.tfm
109 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmmi10.tfm
110 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmsy10.tfm
111 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmex10.tfm
112 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
113 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
114 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm
115 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx12.tfm
116 | OUTPUT /Users/aws/git/cs704/asn/asn5.pdf
117 | INPUT /usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map
118 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm
119 | INPUT /Users/aws/git/cs704/asn/asn5.aux
120 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
121 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx12.pfb
122 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb
123 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi8.pfb
124 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
125 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr12.pfb
126 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr17.pfb
127 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb
128 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb
129 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb
130 | INPUT /usr/local/texlive/2019/texmf-dist/fonts/type1/public/amsfonts/symbols/msam10.pfb
131 |
--------------------------------------------------------------------------------
/asn/asn5.log:
--------------------------------------------------------------------------------
1 | This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019) (preloaded format=pdflatex 2019.5.8) 20 APR 2021 10:09
2 | entering extended mode
3 | restricted \write18 enabled.
4 | file:line:error style messages enabled.
5 | %&-line parsing enabled.
6 | **/Users/aws/git/cs704/asn/asn5.tex
7 | (/Users/aws/git/cs704/asn/asn5.tex
8 | LaTeX2e <2018-12-01>
9 | (/usr/local/texlive/2019/texmf-dist/tex/latex/base/article.cls
10 | Document Class: article 2018/09/03 v1.4i Standard LaTeX document class
11 | (/usr/local/texlive/2019/texmf-dist/tex/latex/base/size11.clo
12 | File: size11.clo 2018/09/03 v1.4i Standard LaTeX file (size option)
13 | )
14 | \c@part=\count80
15 | \c@section=\count81
16 | \c@subsection=\count82
17 | \c@subsubsection=\count83
18 | \c@paragraph=\count84
19 | \c@subparagraph=\count85
20 | \c@figure=\count86
21 | \c@table=\count87
22 | \abovecaptionskip=\skip41
23 | \belowcaptionskip=\skip42
24 | \bibindent=\dimen102
25 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/geometry/geometry.sty
26 | Package: geometry 2018/04/16 v5.8 Page Geometry
27 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/keyval.sty
28 | Package: keyval 2014/10/28 v1.15 key=value parser (DPC)
29 | \KV@toks@=\toks14
30 | ) (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifpdf.sty
31 | Package: ifpdf 2018/09/07 v3.3 Provides the ifpdf switch
32 | ) (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifvtex.sty
33 | Package: ifvtex 2016/05/16 v1.6 Detect VTeX and its facilities (HO)
34 | Package ifvtex Info: VTeX not detected.
35 | ) (/usr/local/texlive/2019/texmf-dist/tex/generic/ifxetex/ifxetex.sty
36 | Package: ifxetex 2010/09/12 v0.6 Provides ifxetex conditional
37 | )
38 | \Gm@cnth=\count88
39 | \Gm@cntv=\count89
40 | \c@Gm@tempcnt=\count90
41 | \Gm@bindingoffset=\dimen103
42 | \Gm@wd@mp=\dimen104
43 | \Gm@odd@mp=\dimen105
44 | \Gm@even@mp=\dimen106
45 | \Gm@layoutwidth=\dimen107
46 | \Gm@layoutheight=\dimen108
47 | \Gm@layouthoffset=\dimen109
48 | \Gm@layoutvoffset=\dimen110
49 | \Gm@dimlist=\toks15
50 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphicx.sty
51 | Package: graphicx 2017/06/01 v1.1a Enhanced LaTeX Graphics (DPC,SPQR)
52 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/graphics.sty
53 | Package: graphics 2017/06/25 v1.2c Standard LaTeX Graphics (DPC,SPQR)
54 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics/trig.sty
55 | Package: trig 2016/01/03 v1.10 sin cos tan (DPC)
56 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-cfg/graphics.cfg
57 | File: graphics.cfg 2016/06/04 v1.11 sample graphics configuration
58 | )
59 | Package graphics Info: Driver file: pdftex.def on input line 99.
60 | (/usr/local/texlive/2019/texmf-dist/tex/latex/graphics-def/pdftex.def
61 | File: pdftex.def 2018/01/08 v1.0l Graphics/color driver for pdftex
62 | ))
63 | \Gin@req@height=\dimen111
64 | \Gin@req@width=\dimen112
65 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amssymb.sty
66 | Package: amssymb 2013/01/14 v3.01 AMS font symbols
67 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/amsfonts.sty
68 | Package: amsfonts 2013/01/14 v3.01 Basic AMSFonts support
69 | \@emptytoks=\toks16
70 | \symAMSa=\mathgroup4
71 | \symAMSb=\mathgroup5
72 | LaTeX Font Info: Overwriting math alphabet `\mathfrak' in version `bold'
73 | (Font) U/euf/m/n --> U/euf/b/n on input line 106.
74 | )) (/usr/local/texlive/2019/texmf-dist/tex/latex/url/url.sty
75 | \Urlmuskip=\muskip10
76 | Package: url 2013/09/16 ver 3.4 Verb mode for urls, etc.
77 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
78 | Package: stmaryrd 1994/03/03 St Mary's Road symbol package
79 | \symstmry=\mathgroup6
80 | LaTeX Font Info: Overwriting symbol font `stmry' in version `bold'
81 | (Font) U/stmry/m/n --> U/stmry/b/n on input line 89.
82 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/algorithms/algorithm.sty
83 | Package: algorithm 2009/08/24 v0.1 Document Style `algorithm' - floating environment
84 | (/usr/local/texlive/2019/texmf-dist/tex/latex/float/float.sty
85 | Package: float 2001/11/08 v1.3d Float enhancements (AL)
86 | \c@float@type=\count91
87 | \float@exts=\toks17
88 | \float@box=\box27
89 | \@float@everytoks=\toks18
90 | \@floatcapt=\box28
91 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/base/ifthen.sty
92 | Package: ifthen 2014/09/29 v1.1c Standard LaTeX ifthen package (DPC)
93 | )
94 | \@float@every@algorithm=\toks19
95 | \c@algorithm=\count92
96 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algpseudocode.sty
97 | Package: algpseudocode
98 | (/usr/local/texlive/2019/texmf-dist/tex/latex/algorithmicx/algorithmicx.sty
99 | Package: algorithmicx 2005/04/27 v1.2 Algorithmicx
100 |
101 | Document Style algorithmicx 1.2 - a greatly improved `algorithmic' style
102 | \c@ALG@line=\count93
103 | \c@ALG@rem=\count94
104 | \c@ALG@nested=\count95
105 | \ALG@tlm=\skip43
106 | \ALG@thistlm=\skip44
107 | \c@ALG@Lnr=\count96
108 | \c@ALG@blocknr=\count97
109 | \c@ALG@storecount=\count98
110 | \c@ALG@tmpcounter=\count99
111 | \ALG@tmplength=\skip45
112 | )
113 | Document Style - pseudocode environments for use with the `algorithmicx' style
114 | ) (/Users/aws/git/cs704/asn/asn5.aux)
115 | \openout1 = `asn5.aux'.
116 |
117 | LaTeX Font Info: Checking defaults for OML/cmm/m/it on input line 18.
118 | LaTeX Font Info: ... okay on input line 18.
119 | LaTeX Font Info: Checking defaults for T1/cmr/m/n on input line 18.
120 | LaTeX Font Info: ... okay on input line 18.
121 | LaTeX Font Info: Checking defaults for OT1/cmr/m/n on input line 18.
122 | LaTeX Font Info: ... okay on input line 18.
123 | LaTeX Font Info: Checking defaults for OMS/cmsy/m/n on input line 18.
124 | LaTeX Font Info: ... okay on input line 18.
125 | LaTeX Font Info: Checking defaults for OMX/cmex/m/n on input line 18.
126 | LaTeX Font Info: ... okay on input line 18.
127 | LaTeX Font Info: Checking defaults for U/cmr/m/n on input line 18.
128 | LaTeX Font Info: ... okay on input line 18.
129 |
130 | *geometry* driver: auto-detecting
131 | *geometry* detected driver: pdftex
132 | *geometry* verbose mode - [ preamble ] result:
133 | * driver: pdftex
134 | * paper: letterpaper
135 | * layout:
136 | * layoutoffset:(h,v)=(0.0pt,0.0pt)
137 | * modes:
138 | * h-part:(L,W,R)=(92.14519pt, 430.00462pt, 92.14519pt)
139 | * v-part:(T,H,B)=(95.39737pt, 556.47656pt, 143.09605pt)
140 | * \paperwidth=614.295pt
141 | * \paperheight=794.96999pt
142 | * \textwidth=430.00462pt
143 | * \textheight=556.47656pt
144 | * \oddsidemargin=19.8752pt
145 | * \evensidemargin=19.8752pt
146 | * \topmargin=-13.87262pt
147 | * \headheight=12.0pt
148 | * \headsep=25.0pt
149 | * \topskip=11.0pt
150 | * \footskip=30.0pt
151 | * \marginparwidth=59.0pt
152 | * \marginparsep=10.0pt
153 | * \columnsep=10.0pt
154 | * \skip\footins=10.0pt plus 4.0pt minus 2.0pt
155 | * \hoffset=0.0pt
156 | * \voffset=0.0pt
157 | * \mag=1000
158 | * \@twocolumnfalse
159 | * \@twosidefalse
160 | * \@mparswitchfalse
161 | * \@reversemarginfalse
162 | * (1in=72.27pt=25.4mm, 1cm=28.453pt)
163 |
164 | (/usr/local/texlive/2019/texmf-dist/tex/context/base/mkii/supp-pdf.mkii
165 | [Loading MPS to PDF converter (version 2006.09.02).]
166 | \scratchcounter=\count100
167 | \scratchdimen=\dimen113
168 | \scratchbox=\box29
169 | \nofMPsegments=\count101
170 | \nofMParguments=\count102
171 | \everyMPshowfont=\toks20
172 | \MPscratchCnt=\count103
173 | \MPscratchDim=\dimen114
174 | \MPnumerator=\count104
175 | \makeMPintoPDFobject=\count105
176 | \everyMPtoPDFconversion=\toks21
177 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
178 | Package: epstopdf-base 2016/05/15 v2.6 Base part for package epstopdf
179 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/infwarerr.sty
180 | Package: infwarerr 2016/05/16 v1.4 Providing info/warning/error messages (HO)
181 | ) (/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/grfext.sty
182 | Package: grfext 2016/05/16 v1.2 Manage graphics extensions (HO)
183 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvdefinekeys.sty
184 | Package: kvdefinekeys 2016/05/16 v1.4 Define keys (HO)
185 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ltxcmds.sty
186 | Package: ltxcmds 2016/05/16 v1.23 LaTeX kernel commands for general use (HO)
187 | ))) (/usr/local/texlive/2019/texmf-dist/tex/latex/oberdiek/kvoptions.sty
188 | Package: kvoptions 2016/05/16 v3.12 Key value format for package options (HO)
189 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/kvsetkeys.sty
190 | Package: kvsetkeys 2016/05/16 v1.17 Key value parser (HO)
191 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/etexcmds.sty
192 | Package: etexcmds 2016/05/16 v1.6 Avoid name clashes with e-TeX commands (HO)
193 | (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/ifluatex.sty
194 | Package: ifluatex 2016/05/16 v1.4 Provides the ifluatex switch (HO)
195 | Package ifluatex Info: LuaTeX not detected.
196 | )))) (/usr/local/texlive/2019/texmf-dist/tex/generic/oberdiek/pdftexcmds.sty
197 | Package: pdftexcmds 2018/09/10 v0.29 Utility functions of pdfTeX for LuaTeX (HO)
198 | Package pdftexcmds Info: LuaTeX not detected.
199 | Package pdftexcmds Info: \pdf@primitive is available.
200 | Package pdftexcmds Info: \pdf@ifprimitive is available.
201 | Package pdftexcmds Info: \pdfdraftmode found.
202 | )
203 | Package epstopdf-base Info: Redefining graphics rule for `.eps' on input line 438.
204 | Package grfext Info: Graphics extension search list:
205 | (grfext) [.pdf,.png,.jpg,.mps,.jpeg,.jbig2,.jb2,.PDF,.PNG,.JPG,.JPEG,.JBIG2,.JB2,.eps]
206 | (grfext) \AppendGraphicsExtensions on input line 456.
207 | (/usr/local/texlive/2019/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
208 | File: epstopdf-sys.cfg 2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live
209 | ))
210 | LaTeX Font Info: Try loading font information for U+msa on input line 19.
211 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsa.fd
212 | File: umsa.fd 2013/01/14 v3.01 AMS symbols A
213 | )
214 | LaTeX Font Info: Try loading font information for U+msb on input line 19.
215 | (/usr/local/texlive/2019/texmf-dist/tex/latex/amsfonts/umsb.fd
216 | File: umsb.fd 2013/01/14 v3.01 AMS symbols B
217 | )
218 | LaTeX Font Info: Try loading font information for U+stmry on input line 19.
219 | (/usr/local/texlive/2019/texmf-dist/tex/latex/stmaryrd/Ustmry.fd)
220 |
221 | LaTeX Warning: No \author given.
222 |
223 | [1
224 |
225 | {/usr/local/texlive/2019/texmf-var/fonts/map/pdftex/updmap/pdftex.map}] [2] (/Users/aws/git/cs704/asn/asn5.aux) )
226 | Here is how much of TeX's memory you used:
227 | 3044 strings out of 492616
228 | 42852 string characters out of 6129482
229 | 111184 words of memory out of 5000000
230 | 6910 multiletter control sequences out of 15000+600000
231 | 12514 words of font info for 48 fonts, out of 8000000 for 9000
232 | 1141 hyphenation exceptions out of 8191
233 | 41i,6n,27p,296b,199s stack positions out of 5000i,500n,10000p,200000b,80000s
234 |
235 | Output written on /Users/aws/git/cs704/asn/asn5.pdf (2 pages, 114766 bytes).
236 | PDF statistics:
237 | 55 PDF objects out of 1000 (max. 8388607)
238 | 39 compressed objects within 1 object stream
239 | 0 named destinations out of 1000 (max. 500000)
240 | 1 words of extra memory for PDF output out of 10000 (max. 10000000)
241 |
242 |
--------------------------------------------------------------------------------
/asn/asn5.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/asn/asn5.pdf
--------------------------------------------------------------------------------
/asn/asn5.synctex.gz:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/asn/asn5.synctex.gz
--------------------------------------------------------------------------------
/asn/asn5.tex:
--------------------------------------------------------------------------------
1 | \documentclass[11pt, oneside]{article} % use "amsart" instead of "article" for AMSLaTeX format
2 | \usepackage{geometry} % See geometry.pdf to learn the layout options. There are lots.
3 | \geometry{letterpaper} % ... or a4paper or a5paper or ...
4 | %\geometry{landscape} % Activate for for rotated page geometry
5 | %\usepackage[parfill]{parskip} % Activate to begin paragraphs with an empty line rather than an indent
6 | \usepackage{graphicx} % Use pdf, png, jpg, or eps§ with pdflatex; use eps in DVI mode
7 | % TeX will automatically convert eps --> pdf in pdflatex
8 | \usepackage{amssymb}
9 | \usepackage{url}
10 | \usepackage{stmaryrd}
11 |
12 | \usepackage{algorithm}
13 | \usepackage[noend]{algpseudocode}
14 |
15 | \newcommand{\lang}{\mathcal{L}}
16 | \title{Assignment 4}
17 |
18 | \begin{document}
19 | \maketitle
20 |
21 | \section{Interpolants}
22 |
23 | This question concerns the logical notion
24 | of \emph{Craig interpolants}.
25 | You do not require prior knowledge about interpolation
26 | to answer this question.
27 |
28 | Given two formulas $A$ and $B$ in first-order logic,
29 | such that $A \land B$ is unsatisfiable,
30 | there exists a formula $I$, called an interpolant, such that
31 | \begin{enumerate}
32 | \item $A \Rightarrow I$ is valid (recall that a formula $\phi$ is valid iff all models satisfy it)
33 | \item $I \land B$ is unsatisfiable;
34 | \item $\emph{vars}(I) \subseteq \emph{vars}(A) \cap \emph{vars}(B)$,
35 | where $\emph{vars}(\phi)$ is the set of all variables
36 | that appear in $\phi$.
37 | \end{enumerate}
38 |
39 | As an example, consider the following formulas
40 | in propositional logic (i.e., all variables are Boolean):
41 | %
42 | $$A \triangleq a \land b$$
43 | $$B \triangleq \neg b \land c$$
44 | %
45 | We know that $A \land B$ is unsatisfiable.
46 | An interpolant $I$ here is $b$. Observe that
47 | $A \Rightarrow I$ is valid, $I \land B$ is unsatisfiable,
48 | and $I$ only contains variables that appear in $A$ and $B$.
49 |
50 |
51 | \subsection{}
52 | An alternative definition of an interpolant
53 | is as follows:
54 |
55 | Suppose we have two formulas $A$ and $C$
56 | such that $A \Rightarrow C$ is valid, then
57 | there exists a formula $I$ such that
58 | \begin{enumerate}
59 | \item $A \Rightarrow I$ is valid;
60 | \item $I \Rightarrow C$ is valid;
61 | \item $\emph{vars}(I) \subseteq \emph{vars}(A) \cap \emph{vars}(C)$.
62 | \end{enumerate}
63 |
64 | Prove that the two definitions of an interpolant are equivalent.
65 |
66 | \subsection{}
67 | Give two formulas $A$ and $B$ such that $A\land B$ is unsatisfiable,
68 | does there always exist a unique interpolant (up to logical equivalence)?
69 | If not, provide an example of two formulas $A$ and $B$ and
70 | two interpolants $I_1$ and $I_2$,
71 | such that $I_1 \neq I_2$.
72 |
73 |
74 | \subsection{}
75 | Suppose you are working with formulas
76 | in quantifier-free linear integer arithmetic:
77 | meaning, formulas that are Boolean combinations (conjunctions, disjunctions, negations)
78 | of linear inequalities over integers
79 | of the form: $a_1x_1 + \ldots a_nx_n \leq c$,
80 | where $a_i,c$ are integer constants, and $x_i$ are integer
81 | variables.
82 |
83 | Consider the following two formulas in quantifier-free
84 | linear integer arithmetic:
85 |
86 | $$A \triangleq x = 2y$$
87 | $$B \triangleq x = 2z - 1$$
88 |
89 | Is $A \land B$ satisfiable?
90 | If not, does there exist an interpolant
91 | for $A$ and $B$ that is also in quantifier-free linear integer arithmetic?
92 | If no such interpolant exists, explain why that is the case.
93 |
94 |
95 | % \section{Extending Static Analysis to a Probabilistic Setting}
96 |
97 | % \newcommand{\prog}{\mathcal{L}}
98 | % \newcommand{\pprog}{\mathcal{L}^\sim}
99 |
100 | % \newcommand{\stat}{\mathcal{A}}
101 |
102 | % Let $\prog$ be a very simple programming language
103 | % where a program $P \in \prog$ is comprised of assignment,
104 | % conditional, and while-loop statements.
105 | % Assume also that all variables are either Boolean or real-valued,
106 | % and that all programs of interest are well-typed and exhibit
107 | % no runtime errors (e.g., divisions by zero).
108 |
109 | % For a program $P$, we assume it has a set of input variables $V_i$
110 | % and a set of output variables $V_r$.
111 | % For the rest of this question, imagine that we have at our
112 | % disposal an almighty static analyzer $\stat$ that, given $P \in \prog$,
113 | % returns a set $S$ of all states reachable by executing $P$ from
114 | % any possible input.
115 | % A state $s \in S$ is considered to be a map from every variable
116 | % in $P$ to a value.
117 | % Given variable $x$, we use $s[x]$ to denote the value of $x$
118 | % in $s$.
119 |
120 | % \paragraph{Example 1}
121 | % For illustration, consider the following example:
122 | % %
123 | % \begin{verbatim}
124 | % def p(x)
125 | % y = x + 1
126 | % return y
127 | % \end{verbatim}
128 | % %
129 | % Given the above program, the static analyzer returns
130 | % the set
131 | % $$\{s \mid s[x] = c, s[y] = c + 1, c \in \mathbb{R}\}$$
132 | % In other words, it returns the set of all states $s$ where $y = x + 1$.
133 |
134 | % \paragraph{Example 2}
135 | % We also assume that our language $\lang$ allows non-deterministic
136 | % choice, which is denoted by \texttt{if (*) ... else ...},
137 | % where the program can non-deterministically execute either branch of the
138 | % conditional statement.
139 | % Consider, for example, the following simple program:
140 | % \begin{verbatim}
141 | % def p()
142 | % if (*)
143 | % y = 1
144 | % else
145 | % y = 2
146 | % return y
147 | % \end{verbatim}
148 | % Given the above program, the static analyzer returns the set
149 | % $$\{ s \mid s[y] \in \{1,2\}\}$$
150 |
151 |
152 | % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
153 | % \subsection{Using $\stat$ for probabilistic reasoning}
154 | % \label{sec:proba}
155 |
156 | % Suppose that we decide to extend our language
157 | % $\prog$ into a new language $\pprog$ with random assignments of the form
158 | % \begin{verbatim}
159 | % x ~ bern(c)
160 | % \end{verbatim}
161 | % where Boolean variable \texttt{x} is assigned true with probability \texttt{c}
162 | % and false with probability \texttt{1-c}, where $\texttt{c}$ is a constant in $ [0,1]$.
163 | % (\texttt{bern} stands for a Bernoulli distribution.)
164 |
165 | % Given a program $P \in \pprog$, we are typically
166 | % interested in the probability of the program returning
167 | % a specific set of values.
168 | % For example, consider the following probabilistic program:
169 | % \begin{verbatim}
170 | % def p()
171 | % x ~ bern(0.5)
172 | % y ~ bern(0.5)
173 | % z = x && y
174 | % return z
175 | % \end{verbatim}
176 | % The probability that \texttt{p} returns true
177 | % is 0.25, as both \texttt{x} and \texttt{y} have to be true.
178 |
179 | % Your task in this question is as follows:
180 | % Given a program $P \in \pprog$ and the static
181 | % analyzer $\stat$, you are to use $\stat$
182 | % to compute the probability that $P$ returns
183 | % a value in some set $X$.
184 | % Note that $\stat$ only accepts programs in $\prog$,
185 | % so you have to somehow transform $P \in \pprog$ into a new
186 | % program in $\prog$
187 | % in order to be able to use $\stat$.
188 | % Once you have the output set $S$ of $\stat$,
189 | % you may apply any mathematical operation on $S$ to
190 | % extract your desired result.
191 |
192 | % You should assume that $P$ is always terminating,
193 | % has no non-deterministic conditionals,
194 | % has no input variables (like the above example),
195 | % and only manipulates Boolean variables.
196 | % \textbf{Hint:} your transformation of $P$
197 | % may introduce non-determinism, real-valued variables,
198 | % and lists.
199 |
200 | % \subsection{Discovering maximizing inputs}
201 | % In the first part of the question,
202 | % we assumed that $P$ has no input variables.
203 | % In this part, we will assume that $P$ has input variables.
204 | % Our goal is to find a value for the input variables
205 | % that maximizes the probability of returning some output value.
206 | % Consider the following example:
207 | % \begin{verbatim}
208 | % def p(x)
209 | % if (x)
210 | % y ~ bern(0.5)
211 | % else
212 | % y ~ bern(0.9)
213 | % return y
214 | % \end{verbatim}
215 | % Suppose we want to maximize the probability
216 | % that \texttt{p} returns the value true.
217 | % To do so, we have to set the input variable \texttt{x}
218 | % to false in order to force the program down the
219 | % else branch of \texttt{p}, which has a higher
220 | % probability of setting \texttt{y} to true.
221 |
222 | % Describe how you would extend your
223 | % technique from Part~\ref{sec:proba} to this setting.
224 |
225 | \section{Galois connections}
226 | Consider these two definitions of Galois connections:
227 |
228 | \paragraph{Definition 1:}
229 | $(L,\alpha,\gamma,M)$ is a Galois connection
230 | between the complete lattices $(L,\sqsubseteq)$
231 | and $(M,\sqsubseteq)$ if and only if
232 | $\alpha:L \rightarrow M$ and $\gamma:M \rightarrow L$
233 | are monotone functions that satisfy the following conditions:
234 | $$\textrm{forall } l \in L \ldotp \gamma(\alpha(l)) \sqsupseteq l$$
235 | $$\textrm{forall } m \in M \ldotp \alpha(\gamma(m)) \sqsubseteq m$$
236 |
237 |
238 | \paragraph{Definition 2:}
239 | $(L,\alpha,\gamma,M)$ is a Galois connection
240 | between the complete lattices $(L,\sqsubseteq)$
241 | and $(M,\sqsubseteq)$ if and only if
242 | $\alpha:L \rightarrow M$ and $\gamma:M \rightarrow L$
243 | are total functions such that for all $l\in L, m \in M$,
244 | $$\alpha(l) \sqsubseteq m \Leftrightarrow l \sqsubseteq \gamma (m)$$
245 |
246 | ~\\
247 | Prove that the two definitions are equivalent.
248 |
249 | \end{document}
250 |
--------------------------------------------------------------------------------
/code/fixpoint_combinators.py:
--------------------------------------------------------------------------------
1 | # mainly from http://matt.might.net/articles/implementation-of-recursive-fixed-point-y-combinator-in-javascript-for-memoization/
2 | # and
3 | # http://matt.might.net/articles/python-church-y-combinator/
4 |
5 | U = lambda x: x(x)
6 | fact = lambda h: lambda x: 1 if x == 0 else x * (h (h))(x-1)
7 | factu = U (fact)
8 |
9 | # doesn't work yet
10 | Y = lambda F: F (Y (F))
11 | # Y(lambda f: lambda n: 1 if n <= 0 else n*f(n-1))
12 |
13 | # now this works, but it's recursive
14 | Y = lambda F: F(lambda x:Y(F)(x))
15 | # Y(lambda f: lambda n: 1 if n <= 0 else n*f(n-1))(5)
16 |
17 | # look, no recursion!
18 | Y = U(lambda h: lambda F: F(lambda x:U(h)(F)(x)))
19 |
20 | Y = ((lambda h: lambda F: F(lambda x:h(h)(F)(x))) (lambda h: lambda F: F(lambda x:h(h)(F)(x))))
21 |
22 | # fibonacci
23 | fib = lambda f: lambda n: n if n==0 or n == 1 else f(n-1) + f(n-2)
24 |
25 | # caching y combinator
26 | def Ymem(F, cache=None):
27 | if cache is None:
28 | cache = {}
29 |
30 | def fun(arg):
31 | if arg in cache:
32 | return cache[arg]
33 |
34 | res = (F(lambda n: (Ymem(F,cache))(n)))(arg)
35 | cache[arg] = res
36 | return res
37 | return fun
38 |
--------------------------------------------------------------------------------
/code/z3/mccarthy91.py:
--------------------------------------------------------------------------------
1 | from z3 import *
2 |
3 | r = Int('r')
4 | p = Int('p')
5 | p1 = Int('p1')
6 | p2 = Int('p2')
7 |
8 | c1 = Implies(And(p > 100, r == p - 10), r >= 91)
9 | c2 = Implies(And(p <= 100, p1 == p + 11, p2 >= 91, r >= 91), r >= 91)
10 | c3 = Implies(r >= 91, r >= 91)
11 |
12 |
13 | s = And(Implies(p <= 101, r == 91), Implies(p <= 111, r <= 101))
14 | s1 = And(Implies(p1 <= 101, p2 == 91), Implies(p1 <= 111, p2 <= 101))
15 | s2 = And(Implies(p2 <= 101, r == 91), Implies(p2 <= 111, r <= 101))
16 |
17 | c1 = Implies(And(p > 100, r == p - 10), s)
18 | c2 = Implies(And(p <= 100, p1 == p + 11, s1, s2), s)
19 | c3 = Implies(s, Implies(p<=101,r==91))
20 |
21 | solve(Not(c1))
22 | solve(Not(c2))
23 | solve(Not(c3))
24 |
--------------------------------------------------------------------------------
/code/z3/miniverif.py:
--------------------------------------------------------------------------------
1 | from z3 import *
2 | from itertools import combinations
3 |
4 | def isValid(phi):
5 | s = Solver()
6 | s.add (Not(phi))
7 | if s.check() == sat:
8 | return False
9 | else:
10 | return True
11 |
12 | def isSAT(phi):
13 | s = Solver()
14 | s.add (phi)
15 | return s.check() == sat
16 |
17 |
18 | ############################
19 | # predicate abstraction
20 |
21 | def abstract(phi, preds):
22 | res = And(True)
23 |
24 | for p in preds:
25 | if isValid(Implies(phi,p)):
26 | res = And(res,p)
27 | if isValid(Implies(phi, Not(p))):
28 | res = And(res, Not(p))
29 |
30 | return simplify(res)
31 |
32 | def booleanAbstract(phi, preds):
33 | res = And(False)
34 | negpreds = map (lambda x: Not(x), preds)
35 |
36 | for ps in combinations(preds+negpreds, len(preds)):
37 | if isSAT(And(phi, *ps)):
38 | res = Or(res, And(*ps))
39 |
40 | return simplify(res)
41 |
42 | def fixpoint(oldInv,inv):
43 | return isValid (Implies(inv,oldInv))
44 |
45 | ###########################
46 | # example
47 |
48 | x = Int('x')
49 | y = Int('y')
50 | z = Int('z')
51 | lock = Int('lock')
52 | old = Int('old')
53 | new = Int('new')
54 |
55 | xp = Int('x\'')
56 | yp = Int('y\'')
57 | zp = Int('z\'')
58 | lockp = Int('lockp')
59 | oldp = Int('oldp')
60 | newp = Int('newp')
61 |
62 | varMap = [(x,xp), (y,yp), (z,zp), (lock,lockp), (old,oldp), (new,newp)]
63 | varMapRev = map(lambda v: (v[1], v[0]), varMap)
64 |
65 |
66 | ###ex1
67 | init = And(x == 0, y == 0)
68 | trans = And(xp == x + 1, yp == y + 1)
69 | post = Implies (y == 10, x == 10)
70 |
71 | preds = [x > 0]
72 | # preds = [x >= 0]
73 | # preds = [x >= y, x <= y]
74 | # preds = [x == 0, y == 0, y == 1, x == 1, x == 2, y == 2]
75 |
76 | ###ex2
77 | init = And(x == 10, y == 10)
78 | trans = And(x + y > 0, xp == x - 1, yp == y - 1, zp == xp + yp)
79 | post = Implies (x + y <= 0, z == 0)
80 |
81 | preds = [x >= 0, x == y]
82 | #preds = [x > 0, x >= 0, x == y, z == x + y]
83 |
84 | ###ex3
85 | init = And(x == y)
86 | trans = And(xp == x + 1, yp == y + 1)
87 | post = Or(And(x % 2 == 0, y % 2 == 0), And(x % 2 != 0, y % 2 != 0))
88 |
89 | preds = [x % 2 == 0, y % 2 == 0]
90 |
91 | ###ex4
92 | init = And(lock == 0, new != old)
93 |
94 | trans = And(new != old, oldp == new,
95 | Or(And(lockp == 0, newp == new + 1),
96 | And(lockp == 1, newp == new)))
97 |
98 | post = Implies(new == old, lock != 0)
99 |
100 | preds = [lock == 0, new == old]
101 |
102 |
103 | #####################################
104 |
105 | predsprime = map(lambda p: substitute(p,*varMap), preds)
106 |
107 | oldInv = False
108 | inv = init
109 |
110 | i = 0
111 | while not fixpoint(oldInv,inv):
112 | print "\nInv at ", i, ": ", inv
113 | i = i + 1
114 |
115 | # existential quantifer??
116 | onestep = booleanAbstract(And(inv, trans), predsprime)
117 | onestep = substitute(onestep, varMapRev)
118 | oldInv = inv
119 | inv = simplify(Or(inv, onestep))
120 |
121 | print "\n"
122 |
123 | if isValid(Implies(inv,post)):
124 | print ">>> SAFE\n\n"
125 | else:
126 | print ">>> MAYBE?!?!\n\n"
127 |
128 |
129 | ###########################
130 | # interpolation
131 |
132 | print sequence_interpolant([And(x == 0,y==0,yp==y+1,xp==x+1), Not(Implies(yp==10,xp==10))])
133 |
--------------------------------------------------------------------------------
/code/z3/z3tut.py:
--------------------------------------------------------------------------------
1 | from z3 import *
2 | ## look at z3.py
3 |
4 | ## Satisfiability
5 | x = Int('x')
6 | y = Int('y')
7 | s = Solver()
8 | s.add(x + y > 0)
9 | print s.check()
10 | print s.model()
11 |
12 | print s.model()[x]
13 | print s.model()[y]
14 |
15 | s.reset()
16 |
17 | # Unsatisfiable example
18 | s.add(And(x + y > x, y < 0))
19 | print s.check()
20 |
21 | ##############################
22 | # Checking implication A => B
23 | # VALIDITY
24 | A = x > 0
25 | B = x > -10
26 |
27 | s.add(A)
28 | s.add(Not(B))
29 |
30 | if s.check() == unsat:
31 | print "VALID"
32 | else:
33 | print "NOT VALID"
34 |
35 | def isValid(phi):
36 | s = Solver()
37 | s.add (Not(phi))
38 | if s.check() == sat:
39 | print s.model()
40 | return False
41 | else:
42 | return True
43 |
44 | #############################
45 | # Bools
46 |
47 | p = Bool('p')
48 | q = Bool('q')
49 | r = Bool('r')
50 |
51 | s = Solver()
52 | s.add(And(Or(p,q), Implies(q,r)))
53 | print s.check()
54 | m = s.model()
55 | print m
56 |
57 | # negate the model
58 | phi = True
59 | s.add(p != m[p])
60 | s.add(q != m[q])
61 | s.add(r != m[r])
62 | print s.check()
63 | m = s.model()
64 | print m
65 |
66 | s.add(p != m[p])
67 | s.add(q != m[q])
68 | s.add(r != m[r])
69 |
70 | print s.check()
71 |
72 | ############################
73 | # checking Hoare triples
74 |
75 | # {x > 0} x <- x + 1 {x > 1}
76 |
77 | x = Int('x')
78 | x1 = Int('x1')
79 |
80 | pre = x > 0
81 | trans = x1 == x + 1
82 | post = x1 > 1
83 |
84 | print isValid(Implies(And(pre, trans), post))
85 |
86 | # {x > 0} x <- x + y {x > 1}
87 |
88 | y = Int('y')
89 | y1 = Int('y1')
90 |
91 | pre = x > 0
92 | trans = And(x1 == x + y, y1 == y)
93 | post = x1 > 1
94 |
95 | print isValid(Implies(And(pre, trans), post))
96 |
97 |
98 | # {LOCK == 0 /\ new != old}
99 | # while (new != old)
100 | # old = new;
101 | # if (*) {
102 | # LOCK = 0;
103 | # new++;
104 | # }else{
105 | # LOCK = 1
106 | #{LOCK != 0}
107 |
108 | lock = Int('lock')
109 | lockp = Int('lockp')
110 |
111 | old = Int('old')
112 | oldp = Int('oldp')
113 |
114 | new = Int('new')
115 | newp = Int('newp')
116 |
117 | pre = lock == 0
118 | post = lock != 0
119 |
120 | trans = And(oldp == new,
121 | Or(And(lockp == 0, newp == new + 1),
122 | And(lock == 1, newp == new)))
123 |
124 | loop = new != old
125 |
126 | inv = (old != new) == (lock == 0)
127 | invp = (oldp != newp) == (lockp == 0)
128 |
129 | print isValid(Implies(And(inv, loop, trans), invp))
130 |
--------------------------------------------------------------------------------
/handwritten_notes/Note Apr 12, 2022 12_57_19 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Apr 12, 2022 12_57_19 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Apr 14, 2022 1_04_22 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Apr 14, 2022 1_04_22 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Apr 19, 2022 12_57_40 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Apr 19, 2022 12_57_40 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Apr 21, 2022 12_55_59 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Apr 21, 2022 12_55_59 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Apr 5, 2022 12_51_43 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Apr 5, 2022 12_51_43 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Apr 7, 2022 1_00_04 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Apr 7, 2022 1_00_04 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Feb 1, 2022 1_01_38 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Feb 1, 2022 1_01_38 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Feb 10, 2022 12_57_29 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Feb 10, 2022 12_57_29 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Feb 15, 2022 12_59_50 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Feb 15, 2022 12_59_50 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Feb 22, 2022 12_52_43 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Feb 22, 2022 12_52_43 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Feb 24, 2022 12_54_01 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Feb 24, 2022 12_54_01 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Feb 8, 2022 11_46_49 AM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Feb 8, 2022 11_46_49 AM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Jan 25, 2022 12_51_36 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Jan 25, 2022 12_51_36 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 1, 2022 12_57_13 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 1, 2022 12_57_13 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 10, 2022 1_00_11 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 10, 2022 1_00_11 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 22, 2022 12_55_32 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 22, 2022 12_55_32 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 29, 2022 12_57_16 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 29, 2022 12_57_16 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 3, 2022 12_58_40 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 3, 2022 12_58_40 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 31, 2022 12_55_15 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 31, 2022 12_55_15 PM.pdf
--------------------------------------------------------------------------------
/handwritten_notes/Note Mar 8, 2022 12_57_52 PM.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/handwritten_notes/Note Mar 8, 2022 12_57_52 PM.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-01-25-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-01-25-2010.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-01-27-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-01-27-2010.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-01-29-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-01-29-2010.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-02-01-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-02-01-2010.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-02-10-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-02-10-2010.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-04-19-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-04-19-2010.pdf
--------------------------------------------------------------------------------
/notes/cs704-lec-1-22-2010.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/cs704-lec-1-22-2010.pdf
--------------------------------------------------------------------------------
/notes/hornClauses.aux:
--------------------------------------------------------------------------------
1 | \relax
2 | \providecommand\hyper@newdestlabel[2]{}
3 | \providecommand\HyperFirstAtBeginDocument{\AtBeginDocument}
4 | \HyperFirstAtBeginDocument{\ifx\hyper@anchor\@undefined
5 | \global\let\oldcontentsline\contentsline
6 | \gdef\contentsline#1#2#3#4{\oldcontentsline{#1}{#2}{#3}}
7 | \global\let\oldnewlabel\newlabel
8 | \gdef\newlabel#1#2{\newlabelxx{#1}#2}
9 | \gdef\newlabelxx#1#2#3#4#5#6{\oldnewlabel{#1}{{#2}{#3}}}
10 | \AtEndDocument{\ifx\hyper@anchor\@undefined
11 | \let\contentsline\oldcontentsline
12 | \let\newlabel\oldnewlabel
13 | \fi}
14 | \fi}
15 | \global\let\hyper@last\relax
16 | \gdef\HyperFirstAtBeginDocument#1{#1}
17 | \providecommand\HyField@AuxAddToFields[1]{}
18 | \providecommand\HyField@AuxAddToCoFields[2]{}
19 | \@writefile{toc}{\contentsline {section}{\tocsection {}{1}{Motivating Example}}{1}{section.1}}
20 | \@writefile{toc}{\contentsline {section}{\tocsection {}{2}{Constrained Horn Clauses}}{2}{section.2}}
21 | \@writefile{toc}{\contentsline {section}{\tocsection {}{3}{Constructing Horn Clauses from Programs}}{3}{section.3}}
22 | \@writefile{toc}{\contentsline {section}{\tocsection {}{4}{Constructing Horn Clauses from Arbitrary Programs}}{4}{section.4}}
23 | \@writefile{toc}{\contentsline {section}{\tocsection {}{5}{Solving Constrained Horn Clauses}}{5}{section.5}}
24 | \newlabel{tocindent-1}{0pt}
25 | \newlabel{tocindent0}{0pt}
26 | \newlabel{tocindent1}{17.77782pt}
27 | \newlabel{tocindent2}{0pt}
28 | \newlabel{tocindent3}{0pt}
29 |
--------------------------------------------------------------------------------
/notes/hornClauses.fdb_latexmk:
--------------------------------------------------------------------------------
1 | # Fdb version 3
2 | ["pdflatex"] 1524243094 "hornClauses.tex" "hornClauses.pdf" "hornClauses" 1524243095
3 | "/usr/local/texlive/2014/texmf-dist/fonts/map/fontname/texfonts.map" 1272929888 3287 e6b82fe08f5336d4d5ebc73fb1152e87 ""
4 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm" 1246382020 1004 54797486969f23fa377b128694d548df ""
5 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm" 1246382020 988 bdf658c3bfc2d96d3c8b02cfc1c94c20 ""
6 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm" 1246382020 916 f87d7c45f9c908e672703b83b72241a3 ""
7 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam5.tfm" 1246382020 924 9904cf1d39e9767e7a3622f2a125a565 ""
8 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm" 1246382020 928 2dc8d444221b7a635bb58038579b861a ""
9 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm" 1246382020 908 2921f8a10601f252058503cc6570e581 ""
10 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm5.tfm" 1246382020 940 75ac932a52f80982a9f8ea75d03a34cf ""
11 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm" 1246382020 940 228d6584342e91276bf566bcf9716b83 ""
12 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm" 1136768653 1328 c834bbb027764024c09d3d2bf908b5f0 ""
13 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm" 1136768653 1300 63a6111ee6274895728663cf4b4e7e81 ""
14 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm" 1136768653 1512 f21f83efb36853c0b70002322c1ab3ad ""
15 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm" 1136768653 1520 eccf95517727cb11801f4f1aee3a21b4 ""
16 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmr6.tfm" 1136768653 1300 b62933e007d01cfd073f79b963c01526 ""
17 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmr8.tfm" 1136768653 1292 21c1c5bfeaebccffdb478fd231a0997d ""
18 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmss10.tfm" 1136768653 1316 b636689f1933f24d1294acdf6041daaa ""
19 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmss8.tfm" 1136768653 1296 d77f431d10d47c8ea2cc18cf45346274 ""
20 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm" 1136768653 1116 933a60c408fc0a863a92debe84b2d294 ""
21 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm" 1136768653 1120 8b7d695260f3cff42e636090a8002094 ""
22 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti10.tfm" 1136768653 1480 aa8e34af0eb6a2941b776984cf1dfdc4 ""
23 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti7.tfm" 1136768653 1492 86331993fe614793f5e7e755835c31c5 ""
24 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti8.tfm" 1136768653 1504 1747189e0441d1c18f3ea56fafc1c480 ""
25 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmtt8.tfm" 1136768653 768 d7b9a2629a0c353102ad947dc9221d49 ""
26 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha10.tfm" 1221438877 1372 84a1ef28ab0d13263326e8d7d854aaa0 ""
27 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha5.tfm" 1221438877 1376 3c8e757aef7f6d15ffd501faa8bb2960 ""
28 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha6.tfm" 1221438877 1380 5f328d9a92ea6dd75eba04691d285ce9 ""
29 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha7.tfm" 1221438877 1380 7431a042b484d9a8b0825b6dc980211d ""
30 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha8.tfm" 1221438877 1380 d3de7fc3f19729dff1005b767ed5d48f ""
31 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb10.tfm" 1221438877 1384 27aa7639e553886bbde4e93a7f0a21a7 ""
32 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb5.tfm" 1221438877 1384 0ace1d884f7138b2ff98691743fb6776 ""
33 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb6.tfm" 1221438877 1384 97970db41190afd861da01a22e4035cf ""
34 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb7.tfm" 1221438877 1384 3d6dfcf16bb0cda8d6c3d32b06223db1 ""
35 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb8.tfm" 1221438877 1384 000e7b0ca0a0b24ccfa273cf5f0bc6ea ""
36 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathx10.tfm" 1221438877 1520 88530e4e46ef1e4a7103f014512c50d2 ""
37 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm" 1302307949 848 f478e0761563bbc369eca609a1741348 ""
38 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary5.tfm" 1302307949 848 e1bc58a31b9ed9c3729ffea165acfaac ""
39 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary6.tfm" 1302307949 848 068dd119e13b75777e62821af7d4f2a6 ""
40 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary7.tfm" 1302307949 848 26631fcb3e4cb6757598b9cda7967b63 ""
41 | "/usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary8.tfm" 1302307949 848 6125cdd3627e68d3db8013b98e587508 ""
42 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb" 1248133631 34811 78b52f49e893bcba91bd7581cdc144c0 ""
43 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc10.pfb" 1248133631 32001 6aeea3afe875097b1eb0da29acd61e28 ""
44 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb" 1248133631 36299 5f9df58c2139e7edcf37c8fca4bd384d ""
45 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.pfb" 1248133631 37912 77d683123f92148345f3fc36a38d9ab1 ""
46 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb" 1248133631 36281 c355509802a035cadc5f15869451dcee ""
47 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb" 1248133631 35752 024fb6c41858982481f6968b5fc26508 ""
48 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb" 1248133631 32762 224316ccc9ad3ca0423a14971cfa7fc1 ""
49 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb" 1248133631 32726 0a1aea6fcd6468ee2cf64d891f5c43c8 ""
50 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb" 1248133631 24457 5cbb7bdf209d5d1ce9892a9b80a307cc ""
51 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb" 1248133631 32569 5e5ddc8df908dea60932f3c484a54c0d ""
52 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb" 1248133631 32716 08e384dc442464e7285e891af9f45947 ""
53 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb" 1248133631 37944 359e864bd06cde3b1cf57bb20757fb06 ""
54 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti7.pfb" 1248133631 36607 d654cb3f2bc54f57509240071db3bffa ""
55 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti8.pfb" 1248133631 35660 fb24af7afbadb71801619f1415838111 ""
56 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb" 1248133631 24287 6b803fa9eb1ddff9112e00519b09dd9e ""
57 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb" 1248133631 34694 ad62b13721ee8eda1dcc8993c8bd7041 ""
58 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/matha10.pfb" 1295482684 90043 a01ee69dbd537ea8a0835a2b4841a64e ""
59 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/matha7.pfb" 1295482684 93088 b44e209f5507ad83293624e701db4de5 ""
60 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/mathb10.pfb" 1295482684 89251 441f72450b980a987c1a89892f305fb3 ""
61 | "/usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/mathx10.pfb" 1295482684 70423 0070bb296823c13808887eb0da9c02b4 ""
62 | "/usr/local/texlive/2014/texmf-dist/tex/context/base/supp-pdf.mkii" 1337017135 71627 94eb9990bed73c364d7f53f960cc8c5b ""
63 | "/usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty" 1284331290 1458 43ab4710dc82f3edeabecd0d099626b2 ""
64 | "/usr/local/texlive/2014/texmf-dist/tex/generic/mathabx/mathabx.dcl" 1221438877 47027 3dbc67397f77c6c4915232a8ff46a778 ""
65 | "/usr/local/texlive/2014/texmf-dist/tex/generic/mathabx/mathabx.sty" 1221438877 2145 5eaa46e7574d24ab999f2bebfa4b00a7 ""
66 | "/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/gettitlestring.sty" 1303254447 8237 52810bdb4db2270e717422560a104aea ""
67 | "/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty" 1338332114 189108 8b3553a56c83ff61acecb36b75d817e2 ""
68 | "/usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty" 1338332114 70752 45fa392800e07da61fa13446ad46b34d ""
69 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex" 1288312291 1006 b103be0bfc8c1682ff1fa9760697a329 ""
70 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex" 1393459310 42678 ea82fd948b4303ce6a2c8e25d5e8f8aa ""
71 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex" 1393459310 19287 b2041c22301def2360f03c004d16068d ""
72 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex" 1393459310 6653 6c617c4a5106d9f40e3d70946ba4e0ac ""
73 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex" 1393459310 7041 a891ad72049e17c4e366c40ca37b0ccb ""
74 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex" 1393459310 4625 40c07e9f6f2f7c674704b3f2055560ce ""
75 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex" 1203877327 2631 7eefa6cdbefd8d4e2bad7262cf1094cd ""
76 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex" 1393459310 43477 81143b33d9ebafdeead07ede13372427 ""
77 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex" 1393459310 17436 8d99d4113be311daf23deff86991ee7d ""
78 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex" 1393459310 20857 256da99fc70ea570aad1d50fdfd51464 ""
79 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex" 1393459310 9641 711f0edc22c180a5caf168b6e8970057 ""
80 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex" 1393459310 34516 658a71478d21df554bce9d9cd436203a ""
81 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex" 1288312291 3052 e5672c657232fd63b0a9853b0746297c ""
82 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex" 1393459310 16849 86fed972a2b3ad61208a6422e104bf26 ""
83 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex" 1393459310 21541 4cd19f8ff7dd74d5aa7d803a6397af84 ""
84 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex" 1393459310 17423 a0f09c822b83b65445bc3ac25542dcc6 ""
85 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex" 1393459310 8943 2e2495b057f8f0035b5568394d489963 ""
86 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex" 1393459310 4272 244fffa48bd048dbb745959f515cb1a8 ""
87 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex" 1393459310 3878 cdaaeab04e2b9759a2ca30e711e07237 ""
88 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex" 1288312291 11599 d694704a88e2f9007c996d3a6a4d629c ""
89 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex" 1393459310 175287 31eb66e838dd5e10589736193a31943c ""
90 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex" 1393459310 58362 484e8d91694457d194854193b6592518 ""
91 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex" 1393459310 32969 dbcfd5a7de6a0f7255c333ef60287d59 ""
92 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex" 1393459310 454 9e9e7c99f4da4f41698be21eaef4938e ""
93 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex" 1393459310 13416 940ea6971d7a65dc440d3479939c66ae ""
94 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex" 1393459310 91879 5b3cc8d94c47a5b742393a410f298724 ""
95 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex" 1393459310 9375 5adc70f722abd29fc250d59e0694b548 ""
96 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex" 1393459310 21406 80daebd1f9f6a174d8dc77c5bc931bf4 ""
97 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex" 1393459310 7820 5140d142921f39003e02ccedd072823a ""
98 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex" 1288312291 3534 c7f28fbac13616513e513efe93b8569b ""
99 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex" 1393459310 3167 7c9394e79aac27db96a92f9b2792b858 ""
100 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex" 1393459310 9165 99b6966558714c44c0b5ee44ae261ffc ""
101 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex" 1288312291 6964 d4b5e82dabddda1c728063bb9c8a22ba ""
102 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex" 1288312291 2688 139c6abc86761a6190c2f4bef5d752be ""
103 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex" 1393459310 91075 1c1d7a7e8f0f737f72aa8becf0b37136 ""
104 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex" 1393459310 33289 b041d55e91f7382603e2dca6f9ad188d ""
105 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex" 1393459310 7099 f44d505bae6c7c2b933cdd63441db4b9 ""
106 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex" 1393459310 20934 2328bd2e04520e1ab077ac4ee13b8935 ""
107 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex" 1393459310 15785 e0b14c447df00370d2023fd5c9813190 ""
108 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex" 1393459310 42336 b13cf09dc317c76a2b165a8501d871cf ""
109 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg" 1288312291 978 15af626ebd3d4d790aac19170dac04f2 ""
110 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def" 1393459310 5437 d91f93ed61ecdc57e119849b2d784a0b ""
111 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def" 1393459310 11969 518d66d5b5e20471ba00709ef9c2b267 ""
112 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex" 1393459310 34488 3bab2022cdd1acab0cd383d8a0ad641b ""
113 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex" 1203877327 1983 b5994ebbcee17f1ba3d29bb1bd696fcf ""
114 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex" 1393459310 7881 d459d6057e13d10ce7a227ae44b7295e ""
115 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex" 1393459310 22211 d696ef78c12269178882d218b2cf191d ""
116 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex" 1393459310 36194 e194ef4e0b396b531a3891feb4b1cc22 ""
117 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex" 1393459310 33377 af391d6ad1bfcbe2278e191f48e43ba8 ""
118 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex" 1393459310 2286 b5c392d27790ca52b8f8e510ef5044e0 ""
119 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex" 1393459310 6833 114eda2cf1d348e0e7e477a1a4dc1941 ""
120 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex" 1393459310 16384 3fa06861c9a3391a75df39466f49655f ""
121 | "/usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def" 1393459310 4500 b148f531c7670d59c695787be06a508b ""
122 | "/usr/local/texlive/2014/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex" 1394323950 21920 b960740915d753423d3c2a794cbc029b ""
123 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amscls/amsart.cls" 1248114418 61068 95063d327b97e96350372631fd99a8c8 ""
124 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amsfonts.sty" 1359763108 5949 3f3fd50a8cc94c3d4cbf4fc66cd3df1c ""
125 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amssymb.sty" 1359763108 13829 94730e64147574077f8ecfea9bb69af4 ""
126 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd" 1359763108 961 6518c6525a34feb5e8250ffa91731cff ""
127 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsb.fd" 1359763108 961 d02606146ba5601b5645f987c92e6193 ""
128 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty" 1362954379 2412 2d98314dc5be38f455f8890deeb2d091 ""
129 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty" 1362954379 4357 ad30ad08920902fc9b38caf35a3b0496 ""
130 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty" 1362954379 79178 b2e326c351e876df0e5e23df2e02441b ""
131 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty" 1362954379 4082 502152465aedb8f6a3c4b0b7c0fa8ae5 ""
132 | "/usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty" 1362954379 2637 846ebe982d3549c7ede7ce135456f54a ""
133 | "/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphics.sty" 1254151804 14183 42a8fc761b806986eef292369afc2988 ""
134 | "/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphicx.sty" 1399675188 7911 bf0a64f89bfb668c239ddf6324bf4afb ""
135 | "/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty" 1399675188 2317 0ace13e225e9d95dd9defe947adc9fbb ""
136 | "/usr/local/texlive/2014/texmf-dist/tex/latex/graphics/trig.sty" 1156702488 3153 c50e6bd54d2dd3933fc52bcf369bec4a ""
137 | "/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hpdftex.def" 1352416072 51837 247bd8424b3835ef78c236dc1e0b4aef ""
138 | "/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hyperref.sty" 1352416072 231792 5fc9dc7dd667e773a766ecc63bba7f4b ""
139 | "/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/nameref.sty" 1351899753 12847 25b617d63258c4f72870c883493a3cf8 ""
140 | "/usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/pd1enc.def" 1352416072 14005 155ac8fad2e5dd7c2cdd130fabd96633 ""
141 | "/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg" 1254097189 802 7b8c8d72c24d795ed7720e4dfd29bff3 ""
142 | "/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg" 1279039959 678 4792914a8f45be57bb98413425e4c7af ""
143 | "/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/graphics.cfg" 1278958963 3563 d35e897cae3b8c6848f6677b73370b54 ""
144 | "/usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/hyperref.cfg" 1254097189 235 6031e5765137be07eed51a510b2b8fb7 ""
145 | "/usr/local/texlive/2014/texmf-dist/tex/latex/lkproof/proof.sty" 1160589855 7239 5298517cd8c2fb2070e3c760cf0b8bf7 ""
146 | "/usr/local/texlive/2014/texmf-dist/tex/latex/ms/everyshi.sty" 1177890616 3878 6aa7c08ff2621006e0603349e40a30a8 ""
147 | "/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/auxhook.sty" 1303254447 3834 707ef09f31d7d2ea47ba89974755dfe0 ""
148 | "/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty" 1303254447 12029 04d7fdf76e0464c23b5aa3a727952d7c ""
149 | "/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/grfext.sty" 1335995445 7075 bd0c34fbf1ae8fd1debd2a554e41b2d5 ""
150 | "/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/kvoptions.sty" 1335995445 22417 c74ff4af6a1aa2b65d1924020edbbe11 ""
151 | "/usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty" 1303254447 9581 1158efc648bc09d5064db5703c882159 ""
152 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pdftex-def/pdftex.def" 1306616590 55368 3c8a0d99822330f2dfabc0dfb09ce897 ""
153 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty" 1393459310 1190 4e20f1d26da9f86ba6a50d7ad16c48d2 ""
154 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty" 1288312291 410 5bf12ea7330e5f12c445332a4fe9a263 ""
155 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty" 1203877327 21115 facf03b7dbe5ea2f5f1dce1ac84b5d05 ""
156 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty" 1203727794 1091 d9163d29def82ee90370c8a63667742c ""
157 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty" 1203877327 339 592cf35cba3d400082b8a9a5d0199d70 ""
158 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/math/pgfmath.sty" 1393459310 306 0796eafca5e159e6ec2167a6d22d81b1 ""
159 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty" 1393459310 443 0b2e781830192df35c0fd357cf13e26e ""
160 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgffor.sty" 1393459310 348 8927fde343487e003b01a4c2ca34073b ""
161 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty" 1203727794 274 4cad6e665cc93ac2ac979039a94fa1e1 ""
162 | "/usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty" 1203877327 325 2bcd023400636339210573e2b3ee298b ""
163 | "/usr/local/texlive/2014/texmf-dist/tex/latex/stmaryrd/Ustmry.fd" 1137110872 1766 216b0f832c406513647608b5bb9bb8ff ""
164 | "/usr/local/texlive/2014/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty" 1302307949 11080 aa7f81da60ce104f0dbb8b827dd14383 ""
165 | "/usr/local/texlive/2014/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty" 1394323950 880 7d50ab1607ddd6bbf6c4d16be23acb49 ""
166 | "/usr/local/texlive/2014/texmf-dist/tex/latex/url/url.sty" 1388531844 12796 8edb7d69a20b857904dd0ea757c14ec9 ""
167 | "/usr/local/texlive/2014/texmf-dist/tex/latex/xcolor/xcolor.sty" 1169481954 55224 a43bab84e0ac5e6efcaf9a98bde73a94 ""
168 | "/usr/local/texlive/2014/texmf-dist/web2c/texmf.cnf" 1398200874 31722 4f52421e59a4b9e910cf18e64c1f2b4a ""
169 | "/usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map" 1401025944 1445653 26a0aacf3d70032b1ec192e8c7792117 ""
170 | "/usr/local/texlive/2014/texmf-var/web2c/pdftex/pdflatex.fmt" 1401025990 3832012 904d82bdcc8abf2b1cd296990b82553b ""
171 | "/usr/local/texlive/2014/texmf.cnf" 1401025936 577 a59edbde8d3a8c549d0eeaab1739e2ff ""
172 | "hornClauses.aux" 1524243095 1352 42e317744f49b98ea4e086146cc38732 ""
173 | "hornClauses.out" 1524243095 352 5208b715e953036406af67345294b00a ""
174 | "hornClauses.tex" 1524243093 16046 62b4137d683700d5edc1a093e1413d0d ""
175 | "preamble.tex" 1524242624 884 564ef05cbdb4eddbb5e864756226bc60 ""
176 | "prooftree.sty" 1520885160 12552 06d423b82274f7fdae154c850287d9ab ""
177 | (generated)
178 | "hornClauses.pdf"
179 | "hornClauses.log"
180 | "hornClauses.out"
181 | "hornClauses.aux"
182 |
--------------------------------------------------------------------------------
/notes/hornClauses.fls:
--------------------------------------------------------------------------------
1 | PWD /Users/aws/git/cs704/notes
2 | INPUT /usr/local/texlive/2014/texmf.cnf
3 | INPUT /usr/local/texlive/2014/texmf-dist/web2c/texmf.cnf
4 | INPUT /usr/local/texlive/2014/texmf-var/web2c/pdftex/pdflatex.fmt
5 | INPUT hornClauses.tex
6 | OUTPUT hornClauses.log
7 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amscls/amsart.cls
8 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amscls/amsart.cls
9 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty
10 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsmath.sty
11 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
12 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amstext.sty
13 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty
14 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsgen.sty
15 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty
16 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsbsy.sty
17 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty
18 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsmath/amsopn.sty
19 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd
20 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd
21 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amsfonts.sty
22 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amsfonts.sty
23 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hyperref.sty
24 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hyperref.sty
25 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
26 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
27 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-hyperref.sty
28 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
29 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/hobsub-generic.sty
30 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty
31 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/keyval.sty
32 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty
33 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/ifxetex/ifxetex.sty
34 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/auxhook.sty
35 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/auxhook.sty
36 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/kvoptions.sty
37 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/kvoptions.sty
38 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/pd1enc.def
39 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/pd1enc.def
40 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/hyperref.cfg
41 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/hyperref.cfg
42 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/url/url.sty
43 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/url/url.sty
44 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hpdftex.def
45 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/hpdftex.def
46 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty
47 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/rerunfilecheck.sty
48 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amssymb.sty
49 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/amssymb.sty
50 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/lkproof/proof.sty
51 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/lkproof/proof.sty
52 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
53 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/stmaryrd/stmaryrd.sty
54 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
55 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/tikz-cd/tikz-cd.sty
56 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
57 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/frontendlayer/tikz.sty
58 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
59 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/basiclayer/pgf.sty
60 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
61 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgfrcs.sty
62 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfutil-common.tex
63 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfutil-common-lists.tex
64 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfutil-latex.def
65 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/ms/everyshi.sty
66 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/ms/everyshi.sty
67 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
68 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfrcs.code.tex
69 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
70 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/basiclayer/pgfcore.sty
71 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphicx.sty
72 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphicx.sty
73 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphics.sty
74 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/graphics.sty
75 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/trig.sty
76 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/graphics/trig.sty
77 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/graphics.cfg
78 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/graphics.cfg
79 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pdftex-def/pdftex.def
80 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pdftex-def/pdftex.def
81 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
82 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/systemlayer/pgfsys.sty
83 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
84 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys.code.tex
85 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
86 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfkeysfiltered.code.tex
87 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgf.cfg
88 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
89 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-pdftex.def
90 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsys-common-pdf.def
91 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
92 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsyssoftpath.code.tex
93 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
94 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/systemlayer/pgfsysprotocol.code.tex
95 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/xcolor/xcolor.sty
96 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/xcolor/xcolor.sty
97 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg
98 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/color.cfg
99 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
100 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcore.code.tex
101 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
102 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathcalc.code.tex
103 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathutil.code.tex
104 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathparser.code.tex
105 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.code.tex
106 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.basic.code.tex
107 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.trigonometric.code.tex
108 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.random.code.tex
109 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.comparison.code.tex
110 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.base.code.tex
111 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.round.code.tex
112 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.misc.code.tex
113 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfunctions.integerarithmetics.code.tex
114 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmathfloat.code.tex
115 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepoints.code.tex
116 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathconstruct.code.tex
117 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathusage.code.tex
118 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorescopes.code.tex
119 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoregraphicstate.code.tex
120 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransformations.code.tex
121 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorequick.code.tex
122 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreobjects.code.tex
123 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepathprocessing.code.tex
124 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorearrows.code.tex
125 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreshade.code.tex
126 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreimage.code.tex
127 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoreexternal.code.tex
128 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorelayers.code.tex
129 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcoretransparency.code.tex
130 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/basiclayer/pgfcorepatterns.code.tex
131 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmoduleshapes.code.tex
132 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmoduleplot.code.tex
133 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
134 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-0-65.sty
135 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
136 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/compatibility/pgfcomp-version-1-18.sty
137 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
138 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgffor.sty
139 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
140 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/utilities/pgfkeys.sty
141 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
142 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgfkeys.code.tex
143 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/math/pgfmath.sty
144 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/pgf/math/pgfmath.sty
145 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
146 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
147 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
148 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/utilities/pgffor.code.tex
149 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/math/pgfmath.code.tex
150 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
151 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/tikz.code.tex
152 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
153 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryplothandlers.code.tex
154 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/modules/pgfmodulematrix.code.tex
155 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
156 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarytopaths.code.tex
157 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex
158 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/tikz-cd/tikzlibrarycd.code.tex
159 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
160 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibrarymatrix.code.tex
161 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex
162 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/frontendlayer/tikz/libraries/tikzlibraryquotes.code.tex
163 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
164 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
165 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/pgf/libraries/pgflibraryarrows.meta.code.tex
166 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/mathabx/mathabx.sty
167 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/mathabx/mathabx.sty
168 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/mathabx/mathabx.dcl
169 | INPUT prooftree.sty
170 | INPUT prooftree.sty
171 | INPUT preamble.tex
172 | INPUT preamble.tex
173 | INPUT hornClauses.aux
174 | INPUT hornClauses.aux
175 | OUTPUT hornClauses.aux
176 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/map/fontname/texfonts.map
177 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/map/fontname/texfonts.map
178 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmr8.tfm
179 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmr6.tfm
180 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmmi8.tfm
181 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmmi6.tfm
182 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmsy8.tfm
183 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmsy6.tfm
184 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex8.tfm
185 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
186 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
187 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd
188 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsa.fd
189 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
190 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm
191 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam5.tfm
192 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsb.fd
193 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/amsfonts/umsb.fd
194 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
195 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm
196 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm5.tfm
197 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/stmaryrd/Ustmry.fd
198 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/stmaryrd/Ustmry.fd
199 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary8.tfm
200 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary6.tfm
201 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary5.tfm
202 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha8.tfm
203 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha6.tfm
204 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha5.tfm
205 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb8.tfm
206 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb6.tfm
207 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb5.tfm
208 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathx10.tfm
209 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathx10.tfm
210 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathx10.tfm
211 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/nameref.sty
212 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/hyperref/nameref.sty
213 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
214 | INPUT /usr/local/texlive/2014/texmf-dist/tex/generic/oberdiek/gettitlestring.sty
215 | INPUT hornClauses.out
216 | INPUT hornClauses.out
217 | INPUT hornClauses.out
218 | INPUT hornClauses.out
219 | OUTPUT hornClauses.pdf
220 | INPUT ./hornClauses.out
221 | INPUT ./hornClauses.out
222 | OUTPUT hornClauses.out
223 | INPUT /usr/local/texlive/2014/texmf-dist/tex/context/base/supp-pdf.mkii
224 | INPUT /usr/local/texlive/2014/texmf-dist/tex/context/base/supp-pdf.mkii
225 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
226 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/epstopdf-base.sty
227 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/grfext.sty
228 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/oberdiek/grfext.sty
229 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
230 | INPUT /usr/local/texlive/2014/texmf-dist/tex/latex/latexconfig/epstopdf-sys.cfg
231 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmbx10.tfm
232 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm
233 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti8.tfm
234 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm
235 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/cmextra/cmex7.tfm
236 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam10.tfm
237 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msam7.tfm
238 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm10.tfm
239 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/amsfonts/symbols/msbm7.tfm
240 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary10.tfm
241 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/stmaryrd/stmary7.tfm
242 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha10.tfm
243 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/matha7.tfm
244 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb10.tfm
245 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathb7.tfm
246 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathx10.tfm
247 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/mathabx/mathx10.tfm
248 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm
249 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmcsc10.tfm
250 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmss10.tfm
251 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmss8.tfm
252 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmss8.tfm
253 | INPUT /usr/local/texlive/2014/texmf-var/fonts/map/pdftex/updmap/pdftex.map
254 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti10.tfm
255 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti7.tfm
256 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmti7.tfm
257 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/tfm/public/cm/cmtt8.tfm
258 | INPUT hornClauses.aux
259 | INPUT ./hornClauses.out
260 | INPUT ./hornClauses.out
261 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmbx10.pfb
262 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmcsc10.pfb
263 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi10.pfb
264 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi5.pfb
265 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmmi7.pfb
266 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr10.pfb
267 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr7.pfb
268 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmr8.pfb
269 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmss10.pfb
270 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy10.pfb
271 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.pfb
272 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb
273 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti7.pfb
274 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmti8.pfb
275 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt8.pfb
276 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/matha10.pfb
277 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/matha7.pfb
278 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/mathb10.pfb
279 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/mathabx-type1/mathx10.pfb
280 | INPUT /usr/local/texlive/2014/texmf-dist/fonts/type1/public/amsfonts/symbols/msbm10.pfb
281 |
--------------------------------------------------------------------------------
/notes/hornClauses.out:
--------------------------------------------------------------------------------
1 | \BOOKMARK [1][-]{section.1}{1. Motivating Example}{}% 1
2 | \BOOKMARK [1][-]{section.2}{2. Constrained Horn Clauses}{}% 2
3 | \BOOKMARK [1][-]{section.3}{3. Constructing Horn Clauses from Programs}{}% 3
4 | \BOOKMARK [1][-]{section.4}{4. Constructing Horn Clauses from Arbitrary Programs}{}% 4
5 | \BOOKMARK [1][-]{section.5}{5. Solving Constrained Horn Clauses}{}% 5
6 |
--------------------------------------------------------------------------------
/notes/hornClauses.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/hornClauses.pdf
--------------------------------------------------------------------------------
/notes/hornClauses.tex:
--------------------------------------------------------------------------------
1 | \documentclass{amsart}
2 |
3 | \usepackage{hyperref,url,amsmath,amssymb,proof,stmaryrd,tikz-cd,mathabx,prooftree}
4 |
5 | \newtheorem{theorem}{Theorem}[section]
6 | \newtheorem{lemma}[theorem]{Lemma}
7 |
8 | \theoremstyle{definition}
9 | \newtheorem{definition}[theorem]{Definition}
10 | \newtheorem{example}[theorem]{Example}
11 | \newtheorem{xca}[theorem]{Exercise}
12 |
13 | \theoremstyle{remark}
14 | \newtheorem{remark}[theorem]{Remark}
15 |
16 | \numberwithin{equation}{section}
17 |
18 | \input{preamble}
19 |
20 | \begin{document}
21 |
22 |
23 | \title{Unbounded Verification with Horn Clauses}
24 |
25 | \author{Aws Albarghouthi}
26 | \address{University of Wisconsin--Madison}
27 | \email{aws@cs.wisc.edu}
28 |
29 | \maketitle
30 |
31 | \begin{abstract}
32 | These notes describe the process
33 | of encoding program executions as a formula
34 | over \emph{constrained Horn clauses},
35 | a class of first-order logic formulas.
36 | Horn clauses allow us to encode the search
37 | for a Hoare-logic annotation of the program
38 | that proves its correctness.
39 | \end{abstract}
40 |
41 | \section{Motivating Example}
42 | We begin with an example illustrating constrained Horn
43 | clauses and how they can encode Hoare-logic proofs.
44 |
45 | \paragraph{A Hoare-style Proof}
46 | Consider the following program and the associated
47 | Hoare triple:
48 | \begin{align*}
49 | & \{x > 0\}\\
50 | & y \gets x;\\
51 | &z \gets x + y\\
52 | & \{z > 0\}
53 | \end{align*}
54 |
55 | To prove that the above Hoare triple is valid,
56 | we follow the composition rule of Hoare-logic:
57 |
58 | \begin{figure}[h]
59 | \centering
60 | \prooftree
61 | \{\phi\} P_1 \{\psi\} \quad\quad
62 | \{\psi\} P_2 \{\chi\}
63 | \justifies
64 | \{\phi\} P_1; P_2 \{\chi\}
65 | \using \textsc{Composition}
66 | \endprooftree
67 | \end{figure}
68 |
69 | Reading the rule upwards,
70 | to prove the above Hoare triple,
71 | we need to construct two valid Hoare triples
72 | of the following form:
73 | $$\{x> 0\} ~ y \gets x ~ \{r(x,y,z)\}$$
74 | $$\{r(x,y,z)\} ~ z \gets x + y ~ \{z > 0\}$$
75 | where $r(x,y,z)$ is some formula over $x,y,z$
76 | that we need to discover.
77 | One solution for
78 | $r(x,y,z)$ is $x > 0 \land y > 0$.
79 | This gives us the following two valid Hoare triples:
80 | $$\{x> 0\} ~ y \gets x ~ \{x > 0 \land y > 0 \}$$
81 | $$\{x > 0 \land y > 0\} ~ z \gets x + y ~ \{z > 0\}$$
82 | which following the composition rule,
83 | imply that our original Hoare triple is valid.
84 |
85 | \paragraph{Encoding}
86 | Above, we showed how to pose the search for a Hoare-logic
87 | annotation
88 | as a search for a relation $r(x,y,z)$ over program variables.
89 | We can view $r(x,y,z)$ as a relation in first-order
90 | logic, and generate a set of constraints whose
91 | models give solutions of $r$.
92 |
93 | Consider the following formulas, $C_1$ and $C_2$,
94 | which encode the two Hoare triples above:
95 |
96 | \begin{align*}
97 | C_1 \triangleq&
98 | \forall V,V' \ldotp (x > 0 \land \enc(y = x)) \Longrightarrow r(x',y',z')\\
99 | %
100 | C_2 \triangleq&
101 | \forall V,V' \ldotp \left(r(x,y,z) \land
102 | \enc(z = x + y)\right) \Longrightarrow r(x',y',z')
103 | \end{align*}
104 | Both of these formulas
105 | are over the theory of linear integer arithmetic (LIA),
106 | where we also have a relation symbol $r$,
107 | a ternary relation over integers, i.e., in $\mathbb{Z}^3$.
108 | Since there are no free variables in $C_1,C_2$,
109 | a model for $m \models C_1 \land C_2$
110 | will only give an interpretation for $r(x,y,z)$.
111 |
112 | The two formulas $C_1$ and $C_2$
113 | look very much like our encodings for checking Hoare triples
114 | from the previous lecture.
115 | By construction, any model $m$ of $C_1$
116 | must be such that for any initial state where $x > 0$,
117 | if we execute $y = x$, we end in a state in $r(x',y',z')$;
118 | note that we apply the relation $r$ to the final-state variables.
119 | So any interpretation of $r$ must result in a valid Hoare triple
120 | $\{x> 0\} ~ y \gets x ~ \{r(x,y,z)\}$.
121 |
122 | Recall that a model $m$ maps $r$ to a susbet of $\mathbb{Z}^3$,
123 | we will only consider subsets of $\mathbb{Z}^3$
124 | that we can write as formulas in LIA;
125 | therefore, we cannot have a model, for instance,
126 | that contains only prime numbers, a relation that is not representable in our simple theory of LIA.
127 |
128 | One possible $m$ is the one that sets $r(x,y,z)$
129 | to the formula $x > 0 \land y > 0$.
130 | If we plug in this formula for occurrences of
131 | $r$ in $C_1, C_2$, we get the following formulas:
132 |
133 | \begin{align*}
134 | m(C_1) \triangleq&
135 | \forall V,V' \ldotp (x > 0 \land \enc(y = x)) \Longrightarrow x' > 0 \land y' > 0\\
136 | %
137 | m(C_2) \triangleq&
138 | \forall V,V' \ldotp \left(x > 0 \land y > 0 \land
139 | \enc(z = x + y)\right) \Longrightarrow x' > 0 \land y' > 0
140 | \end{align*}
141 | Both formulas are valid.
142 |
143 | \section{Constrained Horn Clauses}
144 | A \emph{constrained Horn clause} $\cls$, or Horn clause for
145 | short, is a first-order logic formula of the form
146 | \[
147 | \rel_1(\vec{v}_1) \land \rel_2(\vec{v}_2) \land \ldots \land \rel_{n-1}(\vec{v}_{n-1})
148 | \land \varphi \Longrightarrow \head_\cls
149 | \]
150 | where:
151 | \begin{itemize}
152 | \item each relation $\rel_i \in \rels$ is of arity equal to the length of the
153 | vector of variables $\vec{v}_i$;
154 | \item $\varphi$ is a conjunction of atoms over the first-order theory, which contain non relation symbols outside those interpreted by the theory (e.g., $\phi$ could be $x > 0 \land y > 0$);
155 | \item the left-hand side of the implication ($\Longrightarrow$) is called the
156 | \emph{body} of $\cls$; and
157 | \item $H_\cls$, the \emph{head} of $\cls$, is either a relation application
158 | $\rel_n(\vec{v}_n)$ or an interpreted formula $\varphi'$.
159 | \item All free variables
160 | are assumed to be universally quantified, e.g., $x+y > 0
161 | \Longrightarrow \rel(x,y)$ means $\forall x,y \ldotp x + y > 0
162 | \Longrightarrow \rel(x,y)$.
163 | \end{itemize}
164 |
165 | %
166 | %\jh{In the interpretation, yes? So with $\Longrightarrow$?}
167 | %
168 |
169 |
170 | \paragraph{Semantics.}
171 | We will write $\clss$ for a set of clauses $\{\cls_1,\ldots,\cls_n\}$.
172 | Let $G$ be a graph over relation symbols such that
173 | there is an edge $(r_1,r_2)$ iff $r_1$ appears in the body of
174 | some clause $\cls_i$ and $r_2$ appears in its head.
175 | We say that $\clss$ is \emph{recursive} iff $G$ has a cycle.
176 | The set $\clss$ is \emph{satisfiable} if
177 | there exists an interpretation $\interp$ of relation symbols $\rel_i$ such that every clause
178 | $\cls \in \clss$ is valid.
179 | We say that $\interp$ satisfies $\clss$ (denoted $\interp\models \bigwedge_{\cls_i \in \clss} \cls_i$)
180 | iff for all
181 | $\cls \in \clss$, $\interp \cls$ is valid (i.e., equivalent to $\emph{true}$),
182 | where $\interp \cls$ is $\cls$ with every relation application $\rel(\vec{v})$
183 | replaced by its interepretation in $m$, which we denote as $\interp(\rel(\vec{v}))$.
184 |
185 |
186 | \section{Constructing Horn Clauses from Programs}
187 | We now consider programs $P$
188 | of the form:
189 | $$P_\pre; \whilest~ b ~\dost~ P_\body$$
190 | We would like to show that a Hoare triple
191 | $\{\phi\} P \{\psi\}$ is valid.
192 | To do so, we will generate a number of Horn clauses
193 | whose solution is an inductive loop invariant:
194 |
195 | \begin{align*}
196 | C_1 \triangleq&
197 | (\phi \land \enc(P_\pre)) \Longrightarrow \inv(V') & \text{initiation}\\
198 | %
199 | C_2 \triangleq&
200 | \left(\inv(V) \land b \land
201 | \enc(P_\body)\right) \Longrightarrow \inv(V') & \text{consecution}\\
202 | %
203 | C_3 \triangleq&
204 | \inv(V) \land \neg b \Longrightarrow \psi & \text{safety}
205 | \end{align*}
206 |
207 | A model $m \models C_1\land C_2 \land C_3$
208 | gives an interpretation of $\inv$ that is an inductive loop invariant.
209 |
210 | The encoding for our program model is sound and complete.
211 |
212 | \begin{theorem}[Soundness]
213 | Let $m \models C_1 \land C_2 \land C_3$.
214 | The predicate $m(\inv)$ is an inductive loop invariant.
215 | \end{theorem}
216 |
217 | \begin{theorem}[Completeness]
218 | If $C_1 \land C_2 \land C_3$ is unsatisfiable,
219 | then $\{\phi\} ~ P ~ \{\psi\}$ is not a valid Hoare triple.
220 | \end{theorem}
221 |
222 | While the above theorems assure that our encoding
223 | is correct; in practice, checking satisfiability of
224 | constrained Horn clauses in LIA is undecidable.
225 |
226 | \begin{example}
227 | Consider the following program from your assignment:
228 | \begin{align*}
229 | &\{x \geq 0 \land y > 0\}\\
230 | & r \gets x;\\
231 | & q \gets 0;\\
232 | & \whilest \ r \geq y \ \dost\\
233 | & \ \ \ \ r \gets r - y;\\
234 | & \ \ \ \ q \gets q + 1;\\
235 | &\{x = y * q + r \land 0 \leq r < y\}
236 | \end{align*}
237 |
238 | We show the encoding below:
239 | \begin{align*}
240 | C_1 \triangleq&
241 | x \geq 0 \land y > 0 \land \enc(P_\pre) \Longrightarrow \inv(x',y',r',q') & \text{initiation}\\
242 | %
243 | C_2 \triangleq&
244 | \inv(x,y,r,q) \land r\geq y \land
245 | \enc(P_\body) \Longrightarrow \inv(x',y',r',q') & \text{consecution}\\
246 | %
247 | C_3 \triangleq&
248 | \inv(x,y,r,q) \land r < y \Longrightarrow x = y * q + r \land 0 \leq r < y
249 | & \text{safety}
250 | \end{align*}
251 | where $\enc(P_\pre)$ and $\enc(P_\body)$ are as described in the previous
252 | lectures.
253 | \end{example}
254 |
255 | \section{Constructing Horn Clauses from Arbitrary Programs}
256 | \paragraph{Loops}
257 | In the previous section, we saw how to encode the verification
258 | problem for programs with a single loop. We now consider programs
259 | with an arbitrary number of loops.
260 |
261 | To do so, we assume each statement $P$ in the program has a unique
262 | line number, denoted by $\ell(P)$, and a child or two, $\ell_1(P)$
263 | and $\ell_2(P)$, denoting the true and false branches of a while loop
264 | or if statement.
265 | The following definition of $\enchorn$ demonstrates
266 | how to take a program statement and encode it as a set of Horn clauses.
267 | Note that if and while statements require two Horn clauses,
268 | one for each possible branch taken.
269 | %
270 | \begin{align*}
271 | \enchorn(x \gets a) \triangleq& \inv_i(V) \land \enc(x \gets a) \Longrightarrow \inv_j(V')\\
272 | \enchorn(\ifst \ b \ \thenst \ P_1 \ \elsest \ P_2) \triangleq&
273 | \{\inv_i(V) \land b \Longrightarrow \inv_j(V), \\
274 | & \inv_i(V) \land \neg b \Longrightarrow \inv_k(V)\}\\
275 | \enchorn(\whilest \ b \ \dost \ P_1) \triangleq&
276 | \{\inv_i(V) \land b \Longrightarrow \inv_j(V), \\
277 | & \inv_i(V) \land \neg b \Longrightarrow \inv_k(V)\}
278 | \end{align*}
279 | where above $\ell(P) = i$, $\ell_1(P) = j$, and $\ell_2(P) = k$,
280 | for every case of $P$ considered.
281 |
282 | Now, given a program $P$, we apply $\enchorn$ to every statement
283 | in $P$, i.e., to every while statement, if statement, and assignment
284 | statement, and collect all Horn clauses in a set.
285 | Let $\clss$ be the set of Horn clauses collected for $P$.
286 | Assume that $P$'s first statement is labeled $\init$ (entry) and last statement
287 | is labeled $\ret$ (exit).
288 | Then, to prove a Hoare triple $\{\phi\} \ P \ \{\psi\}$,
289 | we solve the following Horn clauses:
290 | %
291 | $$ \clss \cup \{\phi \Longrightarrow \inv_\init(V), \ \inv_\ret(V) \Longrightarrow \psi\}$$
292 | %
293 | The two additional Horn clauses signify that the set of initial states
294 | must be in the invariant at statement $\init$, and the
295 | invariant at the exit statement must be in $\psi$.
296 |
297 | \paragraph{Recursion} We now consider the problem of
298 | encoding programs with procedures.
299 | Given a procedure $f$ that takes one input and returns
300 | one output, we encode the procedure as a transition
301 | relation $f(x,y)$, where $x$ denotes the input to
302 | the function and the $y$ the output. This transition relation
303 | is called a \emph{function summary}, as it captures the effect
304 | of the input--output behavior of a function while hiding the internal
305 | computation.
306 |
307 | For simplicity, we show how to perform the encoding for a single
308 | recursive function, $f$, by redefining the encoding function
309 | $\enc(f)$ as follows:
310 |
311 | \begin{align*}
312 | \enc(x \gets a) \triangleq&~ x' = a \land \bigwedge_{y \neq x, y \in V} y' = y\\
313 | \enc(\ifst~ b ~ \thenst~ P_1 ~\elsest~ P_2) \triangleq&~
314 | (b \Longrightarrow \enc(P_1)) \land (\neg b \Longrightarrow \enc(P_2))\\
315 | \enc(P_1; P_2) \triangleq&~ \exists V'' \ldotp \trans_1(V,V'') \land \trans_2(V'',V')\\
316 | & \text{where } \trans_1(V,V') \equiv \enc(P_1)\\
317 | & \hspace{3em} \trans_2(V,V') \equiv \enc(P_2)\\
318 | \enc(y \gets f(x)) \triangleq&~ f(x,y') \land \bigwedge_{z \neq y, z \in V} z' = z\\
319 | \end{align*}
320 |
321 | The following Horn clause encodes the transition relation $f(x,y)$:
322 |
323 | Now, suppose we want to show the that following
324 | Hoare triple is valid:
325 |
326 | $$ \{ \phi \} \ y \gets f(x) \ \{ \psi \}$$
327 |
328 | We encode the following Horn clauses:
329 | \begin{align*}
330 | \enc(f) \Longrightarrow f(x,y) \\
331 | \phi \land f(x,y) \Longrightarrow \psi
332 | \end{align*}
333 | The first Horn clause encodes the relation $f(x,y)$;
334 | the second encodes the Hoare triple, using the transition relation for
335 | $f$.
336 |
337 | \begin{example}
338 | Consider the following popular recursive function, called McCarthy 91:
339 | \begin{align*}
340 | & mc(p):\\
341 | & \ifst\ p > 100\\
342 | & \ \ \ r \gets p - 10\\
343 | & \elsest\\
344 | & \ \ \ p1 \gets p + 11\\
345 | & \ \ \ p2 \gets mc(p1)\\
346 | & \ \ \ r \gets mc(p2)
347 | \end{align*}
348 | where $r$ is the return value.
349 |
350 | We want to show the following Hoare triple:
351 | $$\{\emph{true}\} \ r \gets mc(p) \ \{r \geq 91\}$$
352 |
353 | Using the above encoding, we get:
354 |
355 | \begin{align*}
356 | p > 100 \land r = p - 10 \Longrightarrow& mc(p,r)\\
357 | p \leq 100 \land p1 \gets p + 11 \land mc(p1,p2) \land mc(p2,r) \Longrightarrow& mc(p,r)\\
358 | \emph{true} \land mc(p,r) \Longrightarrow& r \geq 91
359 | \end{align*}
360 |
361 | One solution for the above is the interpretation that
362 | sets $mc(p,r)$ to the following relation:
363 | $$ mc(p,r) \equiv r \geq 91$$
364 | In other words, in order to prove that that return value of
365 | $mc$ is always greater than or equal to 91, all we have to do
366 | is to assume the summary that it always returns a value greater than
367 | or equal to 91, regardless of the output.
368 |
369 | \end{example}
370 |
371 | \section{Solving Constrained Horn Clauses}
372 | We now discuss how to solve a set of Horn clauses $\clss$.
373 | First, we begin by showing how to compute the \emph{least fixpoint}---i.e., the smallest possible solution for the predicate symbols.
374 | This process may not terminate, and therefore we will then apply some approximation.
375 |
376 | \begin{enumerate}
377 | \item
378 | Initially, the solution for any predicate $r$ is set to $\false$;
379 | we denote this by $\sol(r) = \false$.
380 |
381 | \item Pick any clause in $\clss$ of the following form
382 | $$\rel_1(\vec{v}_1) \land \rel_2(\vec{v}_2) \land \ldots \land \rel_{n-1}(\vec{v}_{n-1})
383 | \land \varphi \Longrightarrow \rel_n(\vec{v}_n)$$
384 | that is, the head of the clause is a predicate application.
385 | Then, set $$\sol(r_n) = \sol(r_n) \lor
386 | \exists V \ldotp \sol(\rel_1(\vec{v}_1)) \land \sol(\rel_2(\vec{v}_2)) \land \ldots \land \sol(\rel_{n-1}(\vec{v}_{n-1}))
387 | \land \varphi$$
388 | where $V$ is the set of all variables that are not in $\vec{v}_n$.
389 |
390 | \item Repeat 2 until $\sol(r_i)$ reach a fixpoint.
391 | \end{enumerate}
392 |
393 |
394 | Once we've computed solutions for all $r_i$,
395 | we can check if the solution validates clauses whose head is an interpreted formula. If that's the case, then the clauses $\clss$ are satisfiable;
396 | otherwise, they are not.
397 |
398 | \paragraph{Predicate abstraction}
399 | The above process terminates assuming we're working with propositional logic;
400 | however, in general it may not terminate.
401 | The reason is that there may be infinitely many logically incomparable
402 | formulas added to the solution, never arriving at a fixpoint.
403 | To work around this, we can over-approximate the least fixpoint
404 | by fixing a finite language of possible solutions.
405 | We do this with predicate abstraction.
406 |
407 | We assume we are given a finite set of predicates $\preds$---atomic formulas of the form, e.g., $x > 0$.
408 | Given any formula $\varphi$, we can compute the strongest
409 | formula over $\preds$ that subsumes $\varphi$.
410 | There are two possibilities:
411 |
412 | \begin{itemize}
413 | \item \textbf{Cartesian Abstraction}
414 | computes the strongest formula without disjunctions.
415 | It is defined as follows:
416 | $$\cabs(\varphi) \triangleq \bigwedge \{p \mid \varphi \Rightarrow p, p \in \preds}\} \land \bigwedge \{\neg p \mid \varphi \Rightarrow \neg p, p \in \preds}\}$$
417 |
418 | \item \textbf{Boolean Abstraction}
419 | computes the strongest formula.
420 | Let $X$ be the set of all formulas
421 | of the form $(\neg) p_1 \land \ldots \land (\neg) p_n$,
422 | where $\preds = \{p_1,\ldots,p_n\}$.
423 | $$\babs(\varphi) \triangleq \bigvee \{\phi \mid \varphi \land \phi \text{ is SAT}\}$$
424 | \end{itemize}
425 | Both forms of predicate abstraction can result in finitely many formulas.
426 | Now we can replace step (2) in the fixpoint algorithm with the following:
427 |
428 | $$\sol(r_n) = \sol(r_n) \lor
429 | \babs(\exists V \ldotp \sol(\rel_1(\vec{v}_1)) \land \sol(\rel_2(\vec{v}_2)) \land \ldots \land \sol(\rel_{n-1}(\vec{v}_{n-1}))
430 | \land \varphi)$$
431 |
432 | This ensures that we reach a fixpoint in finitely many steps,
433 | as in every step we weaken $\sol(r_i)$ using one of finitely many formulas.
434 | However, if we find a solution that does not satisfy the clauses,
435 | that does not mean that the clauses are unsatisfiable.
436 |
437 |
438 |
439 | \end{document}
440 |
--------------------------------------------------------------------------------
/notes/jan26.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/jan26.pdf
--------------------------------------------------------------------------------
/notes/preamble.tex:
--------------------------------------------------------------------------------
1 | \newcommand{\ifst}{\mathsf{if}}
2 | \newcommand{\thenst}{\mathsf{then}}
3 | \newcommand{\elsest}{\mathsf{else}}
4 | \newcommand{\whilest}{\mathsf{while}}
5 | \newcommand{\dost}{\mathsf{do}}
6 |
7 | \newcommand{\pre}{\emph{pre}}
8 | \newcommand{\body}{\emph{body}}
9 |
10 | \newcommand{\opsem}[2]{\langle #1 \rangle \to #2}
11 | \newcommand{\trans}{\mathit{trans}}
12 | \newcommand{\inv}{\mathit{inv}}
13 | \newcommand{\enc}{\mathsf{enc}}
14 | \newcommand{\enchorn}{\mathsf{encHorn}}
15 |
16 | \newcommand{\cls}{C}
17 | \newcommand{\clss}{\mathcal{C}}
18 | \newcommand{\rel}{r}
19 | \newcommand{\head}{H}
20 | \newcommand{\rels}{R}
21 | \newcommand{\sol}{\emph{sol}}
22 | \newcommand{\interp}{m}
23 | \newcommand{\false}{\emph{false}}
24 | \newcommand{\cabs}{\alpha_C}
25 | \newcommand{\babs}{\alpha_B}
26 |
27 | \newcommand{\preds}{\emph{Preds}}
28 |
29 | \newcommand{\init}{\emph{en}}
30 | \newcommand{\ret}{\emph{ex}}
31 |
32 | \newcommand{\fv}{\emph{fv}}
33 | \renewcommand{\paragraph}[1]{\vspace{.08in}\noindent\textbf{#1}~~}
34 |
--------------------------------------------------------------------------------
/notes/prooftree.sty:
--------------------------------------------------------------------------------
1 | \message{}
2 | %% Build proof tree for Natural Deduction, Sequent Calculus, etc.
3 | %% WITH SHORTENING OF PROOF RULES!
4 | %% Paul Taylor, begun 10 Oct 1989
5 | %% *** THIS IS ONLY A PRELIMINARY VERSION AND THINGS MAY CHANGE! ***
6 | %%
7 | %% 2 Aug 1996: fixed \mscount and \proofdotnumber
8 | %%
9 | %% \prooftree
10 | %% hyp1 produces:
11 | %% hyp2
12 | %% hyp3 hyp1 hyp2 hyp3
13 | %% \justifies -------------------- rulename
14 | %% concl concl
15 | %% \thickness=0.08em
16 | %% \shiftright 2em
17 | %% \using
18 | %% rulename
19 | %% \endprooftree
20 | %%
21 | %% where the hypotheses may be similar structures or just formulae.
22 | %%
23 | %% To get a vertical string of dots instead of the proof rule, do
24 | %%
25 | %% \prooftree which produces:
26 | %% [hyp]
27 | %% \using [hyp]
28 | %% name .
29 | %% \proofdotseparation=1.2ex .name
30 | %% \proofdotnumber=4 .
31 | %% \leadsto .
32 | %% concl concl
33 | %% \endprooftree
34 | %%
35 | %% Within a prooftree, \[ and \] may be used instead of \prooftree and
36 | %% \endprooftree; this is not permitted at the outer level because it
37 | %% conflicts with LaTeX. Also,
38 | %% \Justifies
39 | %% produces a double line. In LaTeX you can use \begin{prooftree} and
40 | %% \end{prootree} at the outer level (however this will not work for the inner
41 | %% levels, but in any case why would you want to be so verbose?).
42 | %%
43 | %% All of of the keywords except \prooftree and \endprooftree are optional
44 | %% and may appear in any order. They may also be combined in \newcommand's
45 | %% eg "\def\Cut{\using\sf cut\thickness.08em\justifies}" with the abbreviation
46 | %% "\prooftree hyp1 hyp2 \Cut \concl \endprooftree". This is recommended and
47 | %% some standard abbreviations will be found at the end of this file.
48 | %%
49 | %% \thickness specifies the breadth of the rule in any units, although
50 | %% font-relative units such as "ex" or "em" are preferable.
51 | %% It may optionally be followed by "=".
52 | %% \proofrulebreadth=.08em or \setlength\proofrulebreadth{.08em} may also be
53 | %% used either in place of \thickness or globally; the default is 0.04em.
54 | %% \proofdotseparation and \proofdotnumber control the size of the
55 | %% string of dots
56 | %%
57 | %% If proof trees and formulae are mixed, some explicit spacing is needed,
58 | %% but don't put anything to the left of the left-most (or the right of
59 | %% the right-most) hypothesis, or put it in braces, because this will cause
60 | %% the indentation to be lost.
61 | %%
62 | %% By default the conclusion is centered wrt the left-most and right-most
63 | %% immediate hypotheses (not their proofs); \shiftright or \shiftleft moves
64 | %% it relative to this position. (Not sure about this specification or how
65 | %% it should affect spreading of proof tree.)
66 | %
67 | % global assignments to dimensions seem to have the effect of stretching
68 | % diagrams horizontally.
69 | %
70 | %%==========================================================================
71 |
72 | \def\introrule{{\cal I}}\def\elimrule{{\cal E}}%%
73 | \def\andintro{\using{\land}\introrule\justifies}%%
74 | \def\impelim{\using{\Rightarrow}\elimrule\justifies}%%
75 | \def\allintro{\using{\forall}\introrule\justifies}%%
76 | \def\allelim{\using{\forall}\elimrule\justifies}%%
77 | \def\falseelim{\using{\bot}\elimrule\justifies}%%
78 | \def\existsintro{\using{\exists}\introrule\justifies}%%
79 |
80 | %% #1 is meant to be 1 or 2 for the first or second formula
81 | \def\andelim#1{\using{\land}#1\elimrule\justifies}%%
82 | \def\orintro#1{\using{\lor}#1\introrule\justifies}%%
83 |
84 | %% #1 is meant to be a label corresponding to the discharged hypothesis/es
85 | \def\impintro#1{\using{\Rightarrow}\introrule_{#1}\justifies}%%
86 | \def\orelim#1{\using{\lor}\elimrule_{#1}\justifies}%%
87 | \def\existselim#1{\using{\exists}\elimrule_{#1}\justifies}
88 |
89 | %%==========================================================================
90 |
91 | \newdimen\proofrulebreadth \proofrulebreadth=.05em
92 | \newdimen\proofdotseparation \proofdotseparation=1.25ex
93 | \newdimen\proofrulebaseline \proofrulebaseline=2ex
94 | \newcount\proofdotnumber \proofdotnumber=3
95 | \let\then\relax
96 | \def\hfi{\hskip0pt plus.0001fil}
97 | \mathchardef\squigto="3A3B
98 | %
99 | % flag where we are
100 | \newif\ifinsideprooftree\insideprooftreefalse
101 | \newif\ifonleftofproofrule\onleftofproofrulefalse
102 | \newif\ifproofdots\proofdotsfalse
103 | \newif\ifdoubleproof\doubleprooffalse
104 | \let\wereinproofbit\relax
105 | %
106 | % dimensions and boxes of bits
107 | \newdimen\shortenproofleft
108 | \newdimen\shortenproofright
109 | \newdimen\proofbelowshift
110 | \newbox\proofabove
111 | \newbox\proofbelow
112 | \newbox\proofrulename
113 | %
114 | % miscellaneous commands for setting values
115 | \def\shiftproofbelow{\let\next\relax\afterassignment\setshiftproofbelow\dimen0 }
116 | \def\shiftproofbelowneg{\def\next{\multiply\dimen0 by-1 }%
117 | \afterassignment\setshiftproofbelow\dimen0 }
118 | \def\setshiftproofbelow{\next\proofbelowshift=\dimen0 }
119 | \def\setproofrulebreadth{\proofrulebreadth}
120 |
121 | %=============================================================================
122 | \def\prooftree{% NESTED ZERO (\ifonleftofproofrule)
123 | %
124 | % first find out whether we're at the left-hand end of a proof rule
125 | \ifnum \lastpenalty=1
126 | \then \unpenalty
127 | \else \onleftofproofrulefalse
128 | \fi
129 | %
130 | % some space on left (except if we're on left, and no infinity for outermost)
131 | \ifonleftofproofrule
132 | \else \ifinsideprooftree
133 | \then \hskip.5em plus1fil
134 | \fi
135 | \fi
136 | %
137 | % begin our proof tree environment
138 | \bgroup% NESTED ONE (\proofbelow, \proofrulename, \proofabove,
139 | % \shortenproofleft, \shortenproofright, \proofrulebreadth)
140 | \setbox\proofbelow=\hbox{}\setbox\proofrulename=\hbox{}%
141 | \let\justifies\proofover\let\leadsto\proofoverdots\let\Justifies\proofoverdbl
142 | \let\using\proofusing\let\[\prooftree
143 | \ifinsideprooftree\let\]\endprooftree\fi
144 | \proofdotsfalse\doubleprooffalse
145 | \let\thickness\setproofrulebreadth
146 | \let\shiftright\shiftproofbelow \let\shift\shiftproofbelow
147 | \let\shiftleft\shiftproofbelowneg
148 | \let\ifwasinsideprooftree\ifinsideprooftree
149 | \insideprooftreetrue
150 | %
151 | % now begin to set the top of the rule (definitions local to it)
152 | \setbox\proofabove=\hbox\bgroup$\displaystyle % NESTED TWO
153 | \let\wereinproofbit\prooftree
154 | %
155 | % these local variables will be copied out:
156 | \shortenproofleft=0pt \shortenproofright=0pt \proofbelowshift=0pt
157 | %
158 | % flags to enable inner proof tree to detect if on left:
159 | \onleftofproofruletrue\penalty1
160 | }
161 |
162 | %=============================================================================
163 | % end whatever box and copy crucial values out of it
164 | \def\eproofbit{% NESTED TWO
165 | %
166 | % various hacks applicable to hypothesis list
167 | \ifx \wereinproofbit\prooftree
168 | \then \ifcase \lastpenalty
169 | \then \shortenproofright=0pt % 0: some other object, no indentation
170 | \or \unpenalty\hfil % 1: empty hypotheses, just glue
171 | \or \unpenalty\unskip % 2: just had a tree, remove glue
172 | \else \shortenproofright=0pt % eh?
173 | \fi
174 | \fi
175 | %
176 | % pass out crucial values from scope
177 | \global\dimen0=\shortenproofleft
178 | \global\dimen1=\shortenproofright
179 | \global\dimen2=\proofrulebreadth
180 | \global\dimen3=\proofbelowshift
181 | \global\dimen4=\proofdotseparation
182 | \global\count255=\proofdotnumber
183 | %
184 | % end the box
185 | $\egroup % NESTED ONE
186 | %
187 | % restore the values
188 | \shortenproofleft=\dimen0
189 | \shortenproofright=\dimen1
190 | \proofrulebreadth=\dimen2
191 | \proofbelowshift=\dimen3
192 | \proofdotseparation=\dimen4
193 | \proofdotnumber=\count255
194 | }
195 |
196 | %=============================================================================
197 | \def\proofover{% NESTED TWO
198 | \eproofbit % NESTED ONE
199 | \setbox\proofbelow=\hbox\bgroup % NESTED TWO
200 | \let\wereinproofbit\proofover
201 | $\displaystyle
202 | }%
203 | %
204 | %=============================================================================
205 | \def\proofoverdbl{% NESTED TWO
206 | \eproofbit % NESTED ONE
207 | \doubleprooftrue
208 | \setbox\proofbelow=\hbox\bgroup % NESTED TWO
209 | \let\wereinproofbit\proofoverdbl
210 | $\displaystyle
211 | }%
212 | %
213 | %=============================================================================
214 | \def\proofoverdots{% NESTED TWO
215 | \eproofbit % NESTED ONE
216 | \proofdotstrue
217 | \setbox\proofbelow=\hbox\bgroup % NESTED TWO
218 | \let\wereinproofbit\proofoverdots
219 | $\displaystyle
220 | }%
221 | %
222 | %=============================================================================
223 | \def\proofusing{% NESTED TWO
224 | \eproofbit % NESTED ONE
225 | \setbox\proofrulename=\hbox\bgroup % NESTED TWO
226 | \let\wereinproofbit\proofusing
227 | \kern0.3em$
228 | }
229 |
230 | %=============================================================================
231 | \def\endprooftree{% NESTED TWO
232 | \eproofbit % NESTED ONE
233 | % \dimen0 = length of proof rule
234 | % \dimen1 = indentation of conclusion wrt rule
235 | % \dimen2 = new \shortenproofleft, ie indentation of conclusion
236 | % \dimen3 = new \shortenproofright, ie
237 | % space on right of conclusion to end of tree
238 | % \dimen4 = space on right of conclusion below rule
239 | \dimen5 =0pt% spread of hypotheses
240 | % \dimen6, \dimen7 = height & depth of rule
241 | %
242 | % length of rule needed by proof above
243 | \dimen0=\wd\proofabove \advance\dimen0-\shortenproofleft
244 | \advance\dimen0-\shortenproofright
245 | %
246 | % amount of spare space below
247 | \dimen1=.5\dimen0 \advance\dimen1-.5\wd\proofbelow
248 | \dimen4=\dimen1
249 | \advance\dimen1\proofbelowshift \advance\dimen4-\proofbelowshift
250 | %
251 | % conclusion sticks out to left of immediate hypotheses
252 | \ifdim \dimen1<0pt
253 | \then \advance\shortenproofleft\dimen1
254 | \advance\dimen0-\dimen1
255 | \dimen1=0pt
256 | % now it sticks out to left of tree!
257 | \ifdim \shortenproofleft<0pt
258 | \then \setbox\proofabove=\hbox{%
259 | \kern-\shortenproofleft\unhbox\proofabove}%
260 | \shortenproofleft=0pt
261 | \fi
262 | \fi
263 | %
264 | % and to the right
265 | \ifdim \dimen4<0pt
266 | \then \advance\shortenproofright\dimen4
267 | \advance\dimen0-\dimen4
268 | \dimen4=0pt
269 | \fi
270 | %
271 | % make sure enough space for label
272 | \ifdim \shortenproofright<\wd\proofrulename
273 | \then \shortenproofright=\wd\proofrulename
274 | \fi
275 | %
276 | % calculate new indentations
277 | \dimen2=\shortenproofleft \advance\dimen2 by\dimen1
278 | \dimen3=\shortenproofright\advance\dimen3 by\dimen4
279 | %
280 | % make the rule or dots, with name attached
281 | \ifproofdots
282 | \then
283 | \dimen6=\shortenproofleft \advance\dimen6 .5\dimen0
284 | \setbox1=\vbox to\proofdotseparation{\vss\hbox{$\cdot$}\vss}%
285 | \setbox0=\hbox{%
286 | \advance\dimen6-.5\wd1
287 | \kern\dimen6
288 | $\vcenter to\proofdotnumber\proofdotseparation
289 | {\leaders\box1\vfill}$%
290 | \unhbox\proofrulename}%
291 | \else \dimen6=\fontdimen22\the\textfont2 % height of maths axis
292 | \dimen7=\dimen6
293 | \advance\dimen6by.5\proofrulebreadth
294 | \advance\dimen7by-.5\proofrulebreadth
295 | \setbox0=\hbox{%
296 | \kern\shortenproofleft
297 | \ifdoubleproof
298 | \then \hbox to\dimen0{%
299 | $\mathsurround0pt\mathord=\mkern-6mu%
300 | \cleaders\hbox{$\mkern-2mu=\mkern-2mu$}\hfill
301 | \mkern-6mu\mathord=$}%
302 | \else \vrule height\dimen6 depth-\dimen7 width\dimen0
303 | \fi
304 | \unhbox\proofrulename}%
305 | \ht0=\dimen6 \dp0=-\dimen7
306 | \fi
307 | %
308 | % set up to centre outermost tree only
309 | \let\doll\relax
310 | \ifwasinsideprooftree
311 | \then \let\VBOX\vbox
312 | \else \ifmmode\else$\let\doll=$\fi
313 | \let\VBOX\vcenter
314 | \fi
315 | % this \vbox or \vcenter is the actual output:
316 | \VBOX {\baselineskip\proofrulebaseline \lineskip.2ex
317 | \expandafter\lineskiplimit\ifproofdots0ex\else-0.6ex\fi
318 | \hbox spread\dimen5 {\hfi\unhbox\proofabove\hfi}%
319 | \hbox{\box0}%
320 | \hbox {\kern\dimen2 \box\proofbelow}}\doll%
321 | %
322 | % pass new indentations out of scope
323 | \global\dimen2=\dimen2
324 | \global\dimen3=\dimen3
325 | \egroup % NESTED ZERO
326 | \ifonleftofproofrule
327 | \then \shortenproofleft=\dimen2
328 | \fi
329 | \shortenproofright=\dimen3
330 | %
331 | % some space on right and flag we've just made a tree
332 | \onleftofproofrulefalse
333 | \ifinsideprooftree
334 | \then \hskip.5em plus 1fil \penalty2
335 | \fi
336 | }
337 |
338 | %==========================================================================
339 | % IDEAS
340 | % 1. Specification of \shiftright and how to spread trees.
341 | % 2. Spacing command \m which causes 1em+1fil spacing, over-riding
342 | % exisiting space on sides of trees and not affecting the
343 | % detection of being on the left or right.
344 | % 3. Hack using \@currenvir to detect LaTeX environment; have to
345 | % use \aftergroup to pass \shortenproofleft/right out.
346 | % 4. (Pie in the sky) detect how much trees can be "tucked in"
347 | % 5. Discharged hypotheses (diagonal lines).
348 |
--------------------------------------------------------------------------------
/notes/transRelEnc.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/barghouthi/cs704/7342eaf4dac9506ef4d80bb2a4fa1d1a31714a48/notes/transRelEnc.pdf
--------------------------------------------------------------------------------
/notes/transRelEnc.tex:
--------------------------------------------------------------------------------
1 | \documentclass{amsart}
2 |
3 | \usepackage{hyperref,url,amsmath,amssymb,proof,stmaryrd,tikz-cd,mathabx}
4 |
5 | \newtheorem{theorem}{Theorem}[section]
6 | \newtheorem{lemma}[theorem]{Lemma}
7 |
8 | \theoremstyle{definition}
9 | \newtheorem{definition}[theorem]{Definition}
10 | \newtheorem{example}[theorem]{Example}
11 | \newtheorem{xca}[theorem]{Exercise}
12 |
13 | \theoremstyle{remark}
14 | \newtheorem{remark}[theorem]{Remark}
15 |
16 | \numberwithin{equation}{section}
17 |
18 | \input{preamble}
19 |
20 | \begin{document}
21 |
22 |
23 | \title{Logical Encoding of Programs}
24 |
25 | \author{Aws Albarghouthi}
26 | \address{University of Wisconsin--Madison}
27 | \email{aws@cs.wisc.edu}
28 |
29 | \maketitle
30 |
31 | \begin{abstract}
32 | These notes describe the process
33 | of encoding program executions as a formula
34 | in first-order logic.
35 | This allows us to apply various forms of
36 | automated verification by checking satisfiability
37 | of the encodings.
38 | \end{abstract}
39 |
40 | \section{Language}
41 | Recall the simple imperative language we used
42 | to present operational semantics in class.
43 | For now, we will use a subset of that language
44 | that does not involve while loops.
45 |
46 | \begin{definition}[Language Syntax]
47 | A program $P$ is defined as follows:
48 | \begin{align*}
49 | P ::= &~ x \gets a & \text{assignment}\\
50 | & \mid \ifst~ b ~ \thenst~ P_1 ~\elsest~ P_2 & \text{conditional}\\
51 | & \mid P_1; P_2 & \text{sequential composition}
52 | \end{align*}
53 | where $a$ is an arithmetic (integer) expression over program variables,
54 | and $b$ is a Boolean expression over program variables.
55 | We shall use $V$ to denote the set of all program variables.
56 | All variables $v \in V$ are assumed to be integer-typed $(\mathbb{Z})$.
57 | \end{definition}
58 |
59 | \begin{definition}[Language Semantics]
60 | Recall that a \emph{state} $s: V \to \mathbb{Z}$
61 | of a program $P$ is a map from variables $V$ to integer values.
62 | Given a program $P$, the operational semantics
63 | define a relation $\to$ describing the execution of $P$ beginning at some state $s$ and ending in state $s'$, denoted as follows:
64 | $$ \opsem{P,s}{s'} $$
65 | \end{definition}
66 |
67 | \section{Transition Relations}
68 | We now define \emph{transition relations},
69 | which are relations defining the operational semantics
70 | of a program. We will later show how to define
71 | transition relations in first-order logic.
72 | Given a program $P$, we will define its transition
73 | relation $\trans(V,V')$ over two sets of variables,
74 | the program variables $V$ and a copy of program variables
75 | $V'$. The idea is that the variables $V$ hold the initial
76 | state $s$ of the program, and $V'$ hold the final state $s'$
77 | after the program has completed execution.
78 | This is best seen through an example:
79 |
80 | \begin{example}
81 | Consider the simple program $P$ defined as a single
82 | statement:
83 | $$x \gets x + 1$$
84 | The set of variables $V$ of $P$ is the singleton set $\{x\}$.
85 | The set $V'$ is $\{x'\}$.
86 | Therefore the transition relation $\trans(x,x')$
87 | is over two variables, $x$ and $x'$.
88 | Concretely, $\trans$ is defined as follows:
89 | $$\trans = \{(n,n+1) \mid n \in \mathbb{Z}\}$$
90 | That is, for any number $n$, the pair $(n,n+1)$
91 | is in the transition relation,
92 | denoting that if we start executing the program
93 | with $x = n$, we end up with $x' = n+1$.
94 |
95 | Observe how there is a one-to-one
96 | correspondence between elements of the transition
97 | relation and pairs of states $s,s'$ such that
98 | $\opsem{P,s}{s'}$.
99 | \end{example}
100 |
101 | \section{First-Order Theory}
102 | Recall the first-order theories we discussed in class.
103 | To encode the relation $\trans$, we will use
104 | the theory of \emph{linear integer arithmetic} (LIA).
105 | LIA allows formulas to contain
106 | integer-valued variables, equality, ineqality, addition, and
107 | \emph{no multiplication} (multiplication will only be to replace addition, i.e., $x + x$ will be written as $2x$).
108 | Checking satisfiability of formulas in LIA
109 | is decidable.
110 |
111 | \begin{definition}[Linear Integer Arithmetic]
112 | Formally, an LIA formula $\varphi$ is of the following form:
113 | \begin{align*}
114 | \varphi ::= &~ a_1 = a_2\\
115 | & \mid a_1 \leq a_2 \\
116 | & \mid a_1 < a_2 \\
117 | & \mid \varphi \land \varphi \\
118 | & \mid \varphi \lor \varphi \\
119 | & \mid \neg \varphi\\
120 | & \mid \exists x \ldotp \varphi\\
121 | & \mid \forall x \ldotp \varphi
122 | \end{align*}
123 | where $a_1,a_2$ are arithmetic expressions of the form
124 | $c_1x_1 + \ldots + c_nx_n$, where $c_i \in \mathbb{Z}$
125 | and $x_i$ are first-order variables. For instance, $2x + 3y$.
126 | Note that $\Rightarrow$ and $\iff$ can be written using $\land,\neg$.
127 | \end{definition}
128 |
129 | A model $m$ for a formula $\varphi$, denoted $m \models \varphi$,
130 | is a mapping from the free variables of $\varphi$,
131 | denoted $\fv(\varphi)$, to integers, that satisfies the
132 | formula.
133 | For example, consider $x + y > 0$.
134 | Let $m = \{x \mapsto 1, y \mapsto 0\}$.
135 | We have $m \models x + y > 0$
136 |
137 | \section{Encoding Transition Relations}
138 | \paragraph{Single assignments}
139 | Let us now consider how we would encode a transition
140 | relation of a single assignment.
141 | Let the assignment be of the form
142 | $$x \gets a$$
143 | We simply transform this into a formula $\varphi$ defined
144 | as follows:
145 | $$\varphi \equiv x' = a \land \bigwedge_{y \neq x, y \in V} y' = y$$
146 | Notice that the variable $x$ on the lhs of the assignment
147 | is encoded as $x'$, denoting the final value of $x$ after
148 | the assignment is performed.
149 | Notice also that the final state of every variable $y$ other than $x$
150 | is the same as its initial value, since it is not modified by the assignment statement.
151 |
152 |
153 | \begin{example}
154 | Consider the assignment
155 | $$x \gets x + y$$
156 | This is encoded as the transition relation
157 | $$\trans(x,y,x',y') \equiv x' = x + y \land y' = y$$
158 | assuming $V = \{x,y\}$
159 | \end{example}
160 |
161 | \paragraph{Loop-free Programs}
162 | Now that we have discussed how to construct $\trans$
163 | for a simple program comprised of a single assignment,
164 | we can define the rules for full (loop-free) programs.
165 |
166 | \begin{definition}[Transition-Relation Encoding]
167 | \begin{align*}
168 | \enc(x \gets a) \triangleq&~ x' = a \land \bigwedge_{y \neq x, y \in V} y' = y\\
169 | \enc(\ifst~ b ~ \thenst~ P_1 ~\elsest~ P_2) \triangleq&~
170 | (b \Rightarrow \enc(P_1)) \land (\neg b \Rightarrow \enc(P_2))\\
171 | \enc(P_1; P_2) \triangleq&~ \exists V'' \ldotp \trans_1(V,V'') \land \trans_2(V'',V')\\
172 | ~\\
173 | & \text{where } \trans_1(V,V') \equiv \enc(P_1)\\
174 | & \hspace{3em} \trans_2(V,V') \equiv \enc(P_2)
175 | \end{align*}
176 | \end{definition}
177 |
178 | To illustrate the encoding, let us consider some examples:
179 |
180 | \begin{example}
181 | Consider the following program $P$
182 | $$\ifst~ x > 0 ~ \thenst~ x \gets x + 1 ~\elsest~ x \gets y$$
183 | The encoding $\enc(P)$ is a formula over $V$ and $V'$
184 | defined as follows:
185 | $$(x > 0 \Rightarrow x' = x + 1 \land y' = y)
186 | \land (x \leq 0 \Rightarrow x' = y \land y' = y)$$
187 | The left conjunct defines the transition relation
188 | of the \emph{then} branch;
189 | the right conjunct defines the \emph{else} branch.
190 | \end{example}
191 |
192 | \begin{example}
193 | Now consider the following program $P$:
194 | $$x \gets x + 1; y \gets y + 1$$
195 | The function $\enc$ encodes this program
196 | one instruction at a time, and combines the results.
197 | First, we encode $x \gets x + 1$ as follows:
198 | $$\trans_1(x,y,x',y') \equiv
199 | \enc(x \gets x + 1) \equiv
200 | x' = x + 1 \land y' = y$$
201 | Then, we encode $y \gets y + 1$:
202 | $$\trans_2(x,y,x',y') \equiv
203 | \enc(y \gets y + 1) \equiv
204 | y' = y + 1 \land x' = x$$
205 |
206 | We now simply conjoin the two transition relations;
207 | however, we have to be careful about the variable
208 | names: the output variables of $\trans_1$ need be the same as
209 | the input variables of $\trans_2$.
210 | Therefore we conjoin them as follows:
211 | $$\trans_1(x,y,x'',y'') \land \trans_2(x'',y'',x',y')$$
212 | Notice that we have renamed the outputs of $\trans_1$
213 | and inputs of $\trans_2$ so that they actually match;
214 | these variables are $V'' = \{x'',y''\}$.
215 | Intuitively, $V''$ defines the state of the program
216 | after executing the first instruction;
217 | but since we only care about the final state,
218 | we \emph{quantify the variables $V''$ away}.
219 | Finally, we arrive at the following encoding
220 |
221 | $$\exists x'',y'' \ldotp
222 | (x'' = x + 1 \land y'' = y) \land
223 | (y' = y'' + 1 \land x' = x'')$$
224 | The first conjunct is $\trans_1(x,y,x'',y'')$,
225 | and the second is
226 | $\trans_2(x'',y'',x',y')$.
227 | Notice that the free variables of this formula
228 | are $x,y$ and $x',y'$, defining the initial states
229 | and final states, respectively.
230 | \end{example}
231 |
232 |
233 | \section{Soundness and Completeness}
234 | We need to show that our encoding
235 | is sound and complete.
236 | Soundness ensures that
237 | the transition relation does not over-approximate
238 | the operational semantics relation $\to$.
239 | Completeness, on the other hand,
240 | ensures that every element of $\to$ is also in
241 | the encoding.
242 |
243 | \begin{theorem}[Soundness]
244 | Fix a program $P$ with variables $V$.
245 | Let $m \models \enc(P)$.
246 | Let $$s = \{v \mapsto m(v) \mid v \in V\}$$
247 | $$s' = \{v \mapsto m(v') \mid v' \in V'\}$$
248 | Then, $\opsem{P,s}{s'}$.
249 | \end{theorem}
250 |
251 | \begin{theorem}[Completeness]
252 | Fix a program $P$ with variables $V$.
253 | Let $s,s'$ be such that
254 | $\opsem{P,s}{s'}$.
255 | Let
256 | $$m = \{v\mapsto s(v) \mid v \in V\} \cup \{v'\mapsto s'(v) \mid v \in V\}$$
257 | Then, $m \models \enc(P)$.
258 | \end{theorem}
259 |
260 | \begin{proof}
261 | Both proofs proceed by structural induction
262 | on the program.
263 | \end{proof}
264 |
265 | \section{Verification}
266 | Now that we have defined the encoding,
267 | we can use it to check if a Hoare triple
268 | holds.
269 | Suppose we are given a Hoare triple
270 | $\{\phi\} P \{\psi\}$,
271 | where $\phi$ and $\psi$ are LIA formulas
272 | over program variables.
273 | We would like to check if the Hoare triple is valid;
274 | informally, for any state $s$ satisfying $\phi$,
275 | for any state $s'$ such that $\opsem{P,s}{s'}$,
276 | we want to make sure that $s'$ satisfies $\psi$.
277 |
278 | To automatically check if the Hoare triple
279 | is valid, we encode \emph{all} executions starting at
280 | $\phi$ and check whether they end up in $\psi$.
281 | Formally, we check validity of the following formula:
282 | $$ (\phi \land \enc(P)) \Rightarrow \psi' \text{ is VALID}$$
283 | $$\emph{iff}$$
284 | $$\{\phi\} P \{\psi\} \text{ is VALID}$$
285 | Intuitively, $\phi \land \enc(P)$ defines
286 | the set executions of $P$ constrained to the ones
287 | starting at $\phi$. The implication ensures
288 | that all final states are contained in $\psi'$.
289 | Notice that we use a primed version of $\psi$,
290 | since final states in the encoding are over primed variables.
291 |
292 | \begin{example}
293 | Let us consider a simple example.
294 | To check validity of
295 | $$\{x > 0\} x \gets x + 1 \{x > 1\}$$
296 | we check validity of the following formula:
297 | $$(x > 0 \land x' = x + 1) \Rightarrow x' > 1$$
298 | which is valid.
299 | \end{example}
300 |
301 | \begin{example}
302 | Here is another example, but this time the Hoare triple
303 | is invalid:
304 | $$\{x > 0\} x \gets x + y \{x > 1\}$$
305 | The formula $\Psi$
306 | $$\Psi \equiv (x > 0 \land x' = x + y \land y'=y) \Rightarrow x' > 1$$
307 | is not valid.
308 | Here is a counterexample; i.e., a model $m$ for the negation
309 | of the formula, $\neg\Psi$:
310 | $$m = \{x \mapsto 0, y \mapsto 0, x' \mapsto 0, y' \mapsto 0\}$$
311 | In other words, $m$ says that if $x = y = 0$
312 | in the initial state, the final state will be such that
313 | $x = 0$, therefore invalidating the postcondition,
314 | which specifies the $x > 1$ when the program terminates.
315 | \end{example}
316 |
317 | \section{Bounded Verification}
318 | We will now enrich our programming language to include while loops.
319 | For simplicity, we shall assume a program $P$ contains
320 | a single while loop; that is, $P$ is of the form:
321 | $$P_\pre; \whilest~ b ~\dost~ P_\body$$
322 | where $P_\pre$ and $P_\body$ are loop-free programs.
323 |
324 | Suppose we want to check validity of a
325 | Hoare triple $\{\phi\} P \{\psi\}$
326 | where $P$ contains a while loop.
327 | We will now show how to check that the Hoare triple
328 | is valid assuming $P$ can only take a bounded number
329 | of loop iterations, e.g., 3 loop iterations.
330 | In the literature, this process is known as \emph{bounded verification},
331 | \emph{bounded model checking}, or \emph{symbolic execution}.
332 |
333 | The first step is to encode executions that take $n$
334 | loop steps in $P$.
335 | We define this using the function
336 | $\enc_n(P)$ as follows, where $n \in [0,\infty)$.
337 | %
338 | \begin{align*}
339 | \enc_n(P) \triangleq
340 | \trans_\pre(V,V^1) \land
341 | \left(\bigwedge_{i = 1}^{n}
342 | b^i \land \trans_\body(V^i, V^{i+1})\right)
343 | \land \neg b^{n+1}
344 | \end{align*}
345 | %
346 | where $\trans_\pre \equiv \enc(P_\pre)$
347 | and $\trans_\body \equiv \enc(P_\body)$.
348 | Notice how we rename the variables such that
349 | we have $n$ copies of the transition relation
350 | of the loop body,
351 | where iteration $i$ starts with variables $V^i$
352 | and ends with variables $V^{i+1}$.
353 | Also, note that at the end we ensure that the loop-exit condition is true: $\neg b^{n+1}$.
354 |
355 | Now that we know how to encode $n$
356 | loop iterations, we can check if a Hoare triple
357 | is valid for loop $\leq n$ loop iterations by
358 | checking validity of the following formula:
359 | \begin{align*}
360 | \bigwedge_{i=1}^n \left(\phi \land \enc_i(P) \Rightarrow \psi^{i+1}\right)
361 | \end{align*}
362 | Note that each conjunct $i$ ensures
363 | that executions that start in $\phi$
364 | and run for $i$ loop iterations end in a state satisfying
365 | $\psi$.
366 |
367 | \section{Induction using Bounded Verification}
368 | We have thus far discussed how to check correctness
369 | of a program up to an unrolling bound $n$.
370 | We will now show how to use bounded verification
371 | to construct an inductive argument that proves
372 | correctness of a program \emph{for all} $n$.
373 |
374 | \paragraph{Induction Principle}
375 | Suppose we have some predicate $\emph{prop}(i)$
376 | that is parameterized by some number $i \in \mathbb{N}$,
377 | and we want to show that $\emph{prop}(i)$ is true
378 | for all $i \in \mathbb{N}$.
379 | A proof by induction proceeds in two steps:
380 | \begin{enumerate}
381 | \item \textbf{Base case:}
382 | Show that $\emph{prop}(0)$ is true.
383 |
384 | \item \textbf{Inductive step:}
385 | Show that for any $i$,
386 | if $\emph{prop}(i)$ is true, then $\emph{prop}(i+1)$
387 | is also true.
388 | \end{enumerate}
389 | These two conditions, as we all know from kindergarten,
390 | imply that $\forall i \in \mathbb{N} \ldotp \emph{prop}(i) \text{ is true}$.
391 |
392 | \paragraph{Hoare proofs via induction}
393 | We can try to apply induction to the proof
394 | of validity of a Hoare triple of the form:
395 | $$\{\phi\}\ \whilest\ b\ \dost\ P_\body\ \{\psi\}$$
396 | as follows:
397 | \begin{enumerate}
398 | \item \textbf{Base case:}
399 | Show that
400 | $$\phi \Rightarrow \psi$$
401 | is valid.
402 | In other words, show that the program satisfies
403 | the Hoare triple if it takes 0 loop iterations.
404 |
405 | \item \textbf{Inductive step:}
406 | Show that
407 | $$(\psi \land b \land \trans_\body(V,V')) \Longrightarrow \psi'$$
408 | is valid.
409 | In other words, assuming the program starts
410 | in a state satisfying the postcondition if the loop has terminated,
411 | then executing the loop once should maintain
412 | that the program still satisfies the postcondition.
413 | \end{enumerate}
414 | Together, these conditions imply that
415 | the Hoare triple $\{\phi\} P \{\psi\}$
416 | is valid.
417 |
418 | \begin{example}
419 | Consider the following Hoare triple:
420 | \begin{align*}
421 | &\{x \geq 0\} \\
422 | &\whilest ~ x > 0 ~ \dost\\
423 | &\ \ \ x \gets x - 1\\
424 | &\{x \geq 0\}
425 | \end{align*}
426 | \end{example}
427 |
428 | \begin{enumerate}
429 | \item \textbf{Base case:}
430 | We get the following
431 | formula:
432 | $$x \geq 0 \Rightarrow x \geq 0$$
433 | This formula is trivially true.
434 |
435 | \item \textbf{Inductive step:}
436 | For the inductive step, we check that,
437 | assuming the program starts at the loop head
438 | in a state satisfying the postcondition,
439 | then executes one loop iteration,
440 | it ends in a state in the postcondition (assuming the loop terminates).
441 | This is encoded as follows:
442 | $$(x \geq 0 \land x > 0 \land x' = x - 1) \Rightarrow x' \geq 0$$
443 | This formula is valid.
444 | \emph{Checking validity of this formula, effectively, checks that
445 | the postcondition is an inductive loop invariant.}
446 | \end{enumerate}
447 |
448 | \paragraph{$k$-induction}
449 | %
450 | Induction, in its simple form above, will generally
451 | not work.
452 | The problem is that the postcondition may be too weak
453 | for an inductive loop invariant, and we instead
454 | require a stronger argument.
455 |
456 | We can instead use $k$-induction, where consider
457 | $k$ base cases and $k$ steps of iteration.
458 | $k$-induction is a generalization of $1-$induction
459 | above:
460 |
461 | \begin{enumerate}
462 | \item \textbf{Base case:}
463 | Show that $\emph{prop}(0),\ldots,\emph{prop}(k-1)$ is true.
464 |
465 | \item \textbf{Inductive step:}
466 | Show that if $\emph{prop}(n),\ldots,\emph{prop}(n+k-1)$
467 | are true, then $\emph{prop}(n+k)$ is true.
468 | \end{enumerate}
469 | These two conditions together imply that
470 | $\emph{prop}(i)$ is true for all $i \in \mathbb{N}$.
471 |
472 | We can apply this idea to the proof of programs:
473 |
474 | \begin{enumerate}
475 | \item \textbf{Base case:}
476 | Show that the following formulas are valid:
477 | \begin{align*}
478 | \phi &\Rightarrow \psi\\
479 | \phi \land b \land \trans(V,V^1) &\Rightarrow \psi^1\\
480 | \ldots\\
481 | <<<<<<< HEAD
482 | \phi \land b \land \trans(V,V^1) \land \ldots \land b^{k-2} \land \trans(V^{k-2}, V^{k-1}) \land \neg b^{k-1} &\Rightarrow \psi^{k-1}
483 | =======
484 | \phi \land b \land \trans(V,V^1) \land \ldots \land b^{k-2} \land \trans(V^{k-2}, V^{k-1}) &\Rightarrow \psi^{k-1}
485 | >>>>>>> origin/s19
486 | \end{align*}
487 | This shows that the program is correct for $0,\ldots,k$
488 | loop iterations.
489 |
490 | \item \textbf{Inductive step:}
491 | Then, we show that the following formula is valid:
492 | \begin{align*}
493 | \left[\bigwedge_{i=0}^{k-1}(
494 | \psi^{i} \land b^i \land \trans_\body(V^i,V^{i+1}))
495 | \right] \Longrightarrow \psi^k
496 | \end{align*}
497 | \end{enumerate}
498 | Together these two cases ensure that the program
499 | is correct for any number of loop iterations.
500 | \end{document}
501 |
--------------------------------------------------------------------------------