<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Proof Assistants and the Dynamic Nature of Formal Theories</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Robert L. Constable</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Cornell University</institution>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2012</year>
      </pub-date>
      <abstract>
        <p>This article shows that theory exploration arises naturally from the need to progressively modify applied formal theories, especially those underpinning deployed systems that change over time or need to be attack-tolerant. Such formal theories require us to explore a problem space with a proof assistant and are naturally dynamic. The examples in this article are from our on-going decade-long e ort to formally synthesize critical components of modern distributed systems. Using the Nuprl proof assistant we created event logic and its protocol theories. I also mention the impact over this period of extensions to the constructive type theory implemented by Nuprl. One of them led to our solution of a long standing open problem in constructive logic. Proof exchange among theorem provers is promising for improving the \super tactics" that provide domain speci c reasoners for our protocol theories. Both theory exploration and proof exchange illustrate the dynamic nature of applied formal theories built using modern proof assistants. These activities dispel the false impression that formal theories are rigid and brittle artifacts that become less relevant over time in a fast moving eld like computer science.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>Introduction</title>
      <p>
        I believe that one of the major scienti c accomplishments of computer science is the creation
of software systems that provide indispensable help in performing complex reasoning tasks
and in automating abstract intellectual processes. Among such systems are proof assistants.
They have helped people solve open mathematical problems, build provably correct hardware
and software, create attack-tolerant distributed systems, and implement foundational theories
of mathematics and computer science. These assistants are also nding a place in advanced
technical education [
        <xref ref-type="bibr" rid="ref53">53</xref>
        ]. This development ts John McCarthy's early de nition of computer
science as the subject concerned with the automation of intellectual processes [
        <xref ref-type="bibr" rid="ref44">44</xref>
        ], and I think it
would have t Turing's, who I regard as the founder of the eld. In recognition of this historical
Turing celebration year, this article will include some bits of history related to Turing's role in
logic and computer science and some bits related to constructive type theory.
      </p>
      <p>
        These accomplishments with proof assistants are well documented in academic journals and
con rmed by industrial uptake. Nevertheless, many otherwise well-informed and in uential
scientists believe that proof assistants are very di cult to use in these ways and that their
solutions are expensive, rigid, and in exible [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. I claim that in many cases the formal solutions
provided by proof assistants are exible and easily modi ed. In some cases that I will discuss,
as in creating attack-tolerant networked systems, it is imperative that we automatically modify
the supporting formal theories.
      </p>
      <p>The fact that we can easily modify, reuse, and replay formal theories might be the main
driving force spreading their widening use, just as it is a driving force in the universal spread
of text editors, compilers, programming environments, and other commonly used \tools for
precise thought". I predict that we will see in the near future dynamic formal theories that
are developed and maintained by a community of researchers using proof assistants to support
applied formal theories that in turn support deployed software systems \on the y". We already
see communal activity in joint e orts to build mathematical theories or settle open problems,
and that is a rst step.
1.1</p>
      <sec id="sec-1-1">
        <title>Overview</title>
        <p>
          I explain these claims by referring to proof assistants that implement constructive type theories
{ because these are the proof assistants I know best and because they also connect directly to
programming practice. Indeed, they support what has come to be called correct-by-construction
programming and formal system evolution [
          <xref ref-type="bibr" rid="ref36 ref38 ref39">39, 36, 38</xref>
          ]. This is because critical elements of the
executing code in deployed systems built this way are synthesized from proofs. To reliably
change that code, one must change the proofs and extract new code. Such applied formal
theories commonly evolve with the application. Moreover, we see another interesting phenomenon,
namely the underlying foundational type theories also continue to evolve, perhaps faster than
foundational theories that mainly support established mathematics. Those deep theory
extensions can be brought to bear on improving the applied theories embedded in them. I will
illustrate this and claim that type theories will continue to evolve for quite some time.
        </p>
        <p>
          I mention brie y just one example of the gradual extension of Constructive Type Theory
(CTT), the theory implemented by Nuprl. This example led my colleague Mark Bickford and
me to solve an open problem in logic by nding a completeness theorem for intuitionistic
rstorder logic [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. We systematically, but gradually over a few years, expanded the use of the
intersection type over a family of propositions { at times treating it as a polymorphic universal
quanti er because it made program extraction simpler; this led us to the idea of uniform validity
which became the key to solving the open problem in logic.
        </p>
        <p>Additions to the underlying foundational type theory can be indexed by the years in which
they were made, up to the one we used to solve the problem, say from CTT00 to CTT10. The
base theory is CTT84, and we are now using CTT12.1 By and large each theory is an extension
of the previous one, although there was a major improvement from CTT02 onwards along with
a corresponding change in the proof assistant from Nuprl4 to Nuprl5.</p>
        <p>
          In the special case of proof assistants based on the LCF tactic mechanism [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ], there is an
interesting way to create domain speci c reasoners. This is simple to describe and remarkably
e ective in the case of proof assistants with distributed computing capabilities as is the case
with Nuprl in support of Constructive Type Theory circa 2012 (CTT12). We turn brie y to
that example later.
        </p>
        <p>These scienti c contributions are enabled by a powerful and ubiquitious information
technology that integrates programming languages, interactive provers, automatic provers, model
checkers, and databases of formal knowledge. I believe that this integrated technology is rapidly
moving toward a point at which it will provide tools for thought able to accelerate scienti c
research and enrich education in ways computer scientists have only imagined before. The
practical integration of computing and logic seen for the rst time in this research area has
made us aware in detail that there is a computational reality to logic which Turning glimpsed
in general outline in 1936.</p>
        <p>
          1In contrast, I believe that the formalized Tarski-Grothendieck set theory used by the Mizar system [
          <xref ref-type="bibr" rid="ref43">43</xref>
          ] to
support the Journal of Formalized Mathematics has been stable from 1989 until now.
1.2
        </p>
      </sec>
      <sec id="sec-1-2">
        <title>Historical Background</title>
        <p>
          According to Andrew Hodges [
          <xref ref-type="bibr" rid="ref34">34</xref>
          ], one of Alan Turing's deepest insights about computing was
that his universal machines would compute with logical formulas as well as numbers. Hodges
says: \It put logic, not arithmetic, in the driving seat." Turing believed that this extension
would allow computers to participate in the whole range of rational human thought. Turing
also understood that we would reason precisely about programs.
        </p>
        <p>Turing also made the notion of a computable function a central concept in science. This in
turn made the notion of data types fundamental and linked them to Russell's conception of a
type. Now we see types in the curriculum from the school level through university education.
Sets are taught in mathematics, types in programming. In modern type theory, we see sets (in
their in nite variety) as a special data type that appeals to mathematicians. So we take a brief
historical look at types to explain their use in proof assistants.2
1.3</p>
      </sec>
      <sec id="sec-1-3">
        <title>Types in programming and logic</title>
        <p>
          The notion of type is a central organizing concept in the design of programming languages,
both to de ne the data types and also to determine the range of signi cance of procedures
and functions.3 Types feature critically in reasoning about programs as Hoare noted in his
fundamental paper on data types [
          <xref ref-type="bibr" rid="ref33">33</xref>
          ]. The role of types in programming languages is evident
in Algol 60 [
          <xref ref-type="bibr" rid="ref59">59</xref>
          ] and its successors such as Pascal and Algol 68 (where types were called modes).
One of the most notable modern examples is the language ML, standing for MetaLanguage,
designed by Milner as an integral part of the Edinburgh LCF mechanized Logic for Computable
Functions [
          <xref ref-type="bibr" rid="ref29">29</xref>
          ]. This ML programming language with its remarkably e ective type inference
algorithm and its recursive data types is widely taught in computer science and is central to a
large class of proof assistants.
        </p>
        <p>
          Type theory serves as the logical language of several interactive theorem provers including
Agda [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ], Coq [
          <xref ref-type="bibr" rid="ref19 ref4">19, 4</xref>
          ], HOL [
          <xref ref-type="bibr" rid="ref28">28</xref>
          ], Isabelle [
          <xref ref-type="bibr" rid="ref48">48</xref>
          ], MetaPRL [
          <xref ref-type="bibr" rid="ref32">32</xref>
          ], Minlog [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ], Nuprl [
          <xref ref-type="bibr" rid="ref1 ref3">3, 1</xref>
          ], PVS
[
          <xref ref-type="bibr" rid="ref51">51</xref>
          ], and Twelf [
          <xref ref-type="bibr" rid="ref52">52</xref>
          ]. Among these provers, the constructive ones build correct by construction
software. All of them formalize mathematical theories whose logical correctness is assured to
the highest standards of certainty ever achieved. Interactive provers have also been used to
solve open mathematical problems, e.g. de nitively proving the Four Color Theorem [
          <xref ref-type="bibr" rid="ref27">27</xref>
          ]. The
accumulation of large libraries of formalized mathematical knowledge using proof assistants
has led to the eld of mathematical knowledge management. Constructive type theories for
constructive and intuitionistic mathematics serve as practical programming languages, a role
imagined forty years ago [
          <xref ref-type="bibr" rid="ref15 ref30 ref47">47, 30, 15</xref>
          ] yet only recently made practical in several settings. The
programming language ML also provides the metalanguage for several of the interactive proof
assistants in service today, including Agda, Coq, HOL, Isabelle, MetaPRL, Nuprl among others.
2
        </p>
      </sec>
    </sec>
    <sec id="sec-2">
      <title>Automated Reasoning in Constructive Type Theories</title>
      <p>The gap between data types in programming languages and those in foundational type theory
and from there to constructive type theory are large. That rst gap can be traced to the in uence
of Principia Mathematica and the second to the in uence of the mathematician L.E.J. Brouwer
2I wrote a longer unpublished paper in 2010 for the 100 year anniversary of Principia Mathematica entitled
\The Triumph of Types: Principia Mathematica's Impact on Computer Science". It describes the in uence
of type theory on computer science and is available at the celebration web page. These notes rephrase a few
examples used there.</p>
      <p>3This use matches Russell's de nition of a type as the range of signi cance of a propositional function.
and his intuitionistic program for mathematics. We look very brie y at these historical gaps to
establish the context for the work of modern proof assistants supporting applied formal theories
and correct-by-construction programming.
2.1</p>
      <sec id="sec-2-1">
        <title>Comprehensive Mathematical Theories</title>
        <p>
          Near the turn of the last century, Frege [
          <xref ref-type="bibr" rid="ref22 ref24">24, 22</xref>
          ], Russell [
          <xref ref-type="bibr" rid="ref55">55</xref>
          ] and Whitehead [
          <xref ref-type="bibr" rid="ref58">58</xref>
          ] strove to design
of a logical foundation for mathematics free from the known paradoxes and able to support an
extremely precise comprehensive treatment of mathematics in an axiomatic logical language.
Principia Mathematica (PM) was created with those goals in mind, intended to be safe enough
to avoid paradox and rich enough to express all of the concepts of modern pure mathematics
of its time in a language its authors regarded as pure logic.
        </p>
        <p>
          For Russell and Whitehead, type theory was not introduced because it was interesting on
its own, but because it served as a tool to make logic and mathematics safe. According to
PM page 37: Type theory \only recommended itself to us in the rst instance by its ability
to solve certain contradictions. ... it has also a certain consonance with common sense which
makes it inherently credible". This common sense idea was captured in Russell's de nition of
a type in his Principles of Mathematics, Appendix B The Doctrine of Types [
          <xref ref-type="bibr" rid="ref56">56</xref>
          ] where he says
\Every propositional function (x) { so it is contended { has, in addition to its range of truth,
a range of signi cance, i.e. a range within which x must lie if (x) is to be a proposition at
all,...." It is interesting that later in computer science, types are used precisely in this sense:
to de ne the range of signi cance of functions in programming languages. It is also interesting
that Frege devised a judgment form: A to indicate that the syntactic term A made sense or
was a proposition. The notation ` A is the judgment that proposition A is provable. Both
of these judgment forms were used in ITT82 and then adopted in CTT84. These forms have
proved to be extremely important in practice. In CTT84 they are used to exploit the Turing
completeness of the computation system and thus produce e cient extracted code, suitable for
practical use.
        </p>
        <p>According to PM, statements of pure mathematics are inferences of pure logic. All
commitments to \reality" (Platonic or physical) such as claims about in nite totalities, the
interpretation of implication as a relation, the existence of Euclidean space, etc. were taken as
hypotheses. At the time of PM it appeared that there would emerge settled agreement about
the nature of pure inferences and their axiomatization. That was not to be. Even the notion
of pure logic would change.
2.2</p>
      </sec>
      <sec id="sec-2-2">
        <title>Computation in logic and mathematics</title>
        <p>
          While Russell was working on his theory of types [
          <xref ref-type="bibr" rid="ref55">55</xref>
          ], circa 1907-1908, another conception of
logic arose in the writings of L.E.J. Brouwer [
          <xref ref-type="bibr" rid="ref31 ref57">31, 57</xref>
          ] circa 1907, a conception that would depart
radically from the vision of Frege and Russell, as they departed from Aristotle. By the early
1930's a mature expression of a new semantics of the logical operators emerged from the work
of Brouwer, Heyting, and Kolmogorov; it is now called the BHK semantics for intuitionistic
versions of formalisms originally developed based on truth-functional semantics. BKH semantics
is also called the propositions-as-types principle. By 1945 Kleene captured this semantics for
rst-order logic and Peano arithmetic in his notion of recursive realizability based on general
recursive functions [
          <xref ref-type="bibr" rid="ref35">35</xref>
          ]. By 1968, a formal version of a comprehensive theory of types based
on the propositions as types principle was implemented in the Automath theories of de Bruijn
and his colleagues [
          <xref ref-type="bibr" rid="ref20">20</xref>
          ]. Unlike Kleene's work, these theories did not take advantage of the
computational interpretation of the logical primitives made possible by BHK, instead treating
them formally as rules in the style of PM.
        </p>
        <p>
          This line of research eventually led to two extensional type theories, Intuitionistic Type
Theory (ITT82, ITT84) [
          <xref ref-type="bibr" rid="ref41 ref42">41, 42</xref>
          ] and Constructive Type Theory (CTT84) [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ] related to ITT82.
Subsequently the type theory of the Calculus of Constructions (CoC) [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ] was designed based
on Girard's logic [
          <xref ref-type="bibr" rid="ref25 ref26">25, 26</xref>
          ]. Over the next few years, CoC moved closer to the ITT82 conception
and also built on the CTT82 recursive types [
          <xref ref-type="bibr" rid="ref17 ref45 ref46">45, 46, 17</xref>
          ] to produce the widely used (intensional)
type theory Calculus of Inductive Constructions (CIC) [
          <xref ref-type="bibr" rid="ref19">19</xref>
          ] implemented in the Coq prover [
          <xref ref-type="bibr" rid="ref4">4</xref>
          ].
Then an intensional version of ITT82 was de ned [
          <xref ref-type="bibr" rid="ref49">49</xref>
          ], say ITT90, and implemented much
later in the Alf and Agda provers [
          <xref ref-type="bibr" rid="ref12">12</xref>
          ]. All three of these e orts, but especially CTT84 and
ITT82, were strongly in uenced by Principia and the work of Bishop [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] presented in his book
Foundations of Constructive Analysis [
          <xref ref-type="bibr" rid="ref11">11</xref>
          ] who set about doing real analysis in the constructive
tradition.
        </p>
        <p>
          Computational content is present in the provable assertions of the constructive type theories,
and one of the features of CIC, CTT, and ITT is that implementing the proof machinery makes it
possible to extract this content and execute it. This discovery has led to a new proof technology
for extracting computational content from assertions. That technology has proven to be very
e ective in practice, where it is called correct-by-construction programming. There is a growing
literature on this subject with references in survey articles such as [
          <xref ref-type="bibr" rid="ref1">1</xref>
          ].
2.3
        </p>
      </sec>
      <sec id="sec-2-3">
        <title>E ectively Computable, Turing Computable, and Subrecursive</title>
      </sec>
      <sec id="sec-2-4">
        <title>Computation Systems</title>
        <p>Brouwer's notion of computability was not formal and not axiomatic. It was intuitive and
corresponds to what is called e ective computability. The Church/Turing Thesis claims that
all e ectively computable functions are computable by Turing machines (or any equivalent
formalism, e.g. the untyped -calculus). There is no corresponding formalism for Brouwer
Computable. However, I believe that this notion can be captured in intuitionistic logics by
leaving a Turing complete computation system for the logic open-ended in the sense that new
primitive terms and rules of reduction are possible. This method of capturing e ective
computability may be unique to CTT in the sense that the computation system of CTT is open to
being \Brouwer incomplete" as a logic. We have recently added a primitive notion of general
process to formalize distributed systems whose potentially nonterminating computations are
not entirely e ective because they depend on asynchronous message passing over a network
which can only be modeled faithfully by allowing unpredictable choices by the environment,
e.g. the internet.
3</p>
      </sec>
    </sec>
    <sec id="sec-3">
      <title>A Case Study in</title>
    </sec>
    <sec id="sec-4">
      <title>Events</title>
    </sec>
    <sec id="sec-5">
      <title>Theory</title>
    </sec>
    <sec id="sec-6">
      <title>Exploration: the Logic of</title>
      <p>
        The PRL group's most practical results in formal methods might be the optimization of protocol
stacks [
        <xref ref-type="bibr" rid="ref36 ref39">39, 36</xref>
        ]. The optimization system was adopted by Nortel as a product because it could
signi cantly improve the performance of a distributed system by using automatic compression
techniques that we proved were safe. That is, the optimized protocols produced identical results
to the original but over ve times faster.
      </p>
      <p>Based on our work in this area, we came to see that writing correct distributed protocols was
an extremely di cult business. Basically no one can write these protocols completely correctly
\by hand", so they are all gradually debugged in the eld. This became an excellent target on
which to deploy formal methods, in particular correct-by-construction programming. To start
this we needed a speci cation language for distributed system behavior. We noticed that our
collaborators used message sequence diagrams as their main informal method of description and
reasoning. They did not use temporal logic in any form, they did not use any process algebra,
they did not use a logic of actions. So we decided to create a logic that matched their way of
thinking as closely as possible. As we spoke it with them, it gradually evolved. The tools of the
Nuprl proof assistant and its Logical Programming Environment greatly aided that evolution
in ways that I will explain as an example of theory exploration in action.
3.1</p>
      <sec id="sec-6-1">
        <title>A sequence of theories</title>
        <p>
          The interested reader could track the evolution of the logic of events from the rst publications
in 2003 to the latest publications in 2012, [
          <xref ref-type="bibr" rid="ref10 ref13 ref5 ref6 ref7 ref8 ref9">8, 13, 10, 9, 5, 6, 7</xref>
          ]4 All stages of this evolution
were formalized and applied. They illustrate theory exploration in detail. I will summarize the
nature of the changes brie y here. In the lecture associated with this article, I will tell some of
the stories about why the changes were made and the formal tools used to manage them.
3.2
        </p>
      </sec>
      <sec id="sec-6-2">
        <title>Summarizing an example of theory exploration and evolution</title>
        <p>
          In A Logic of Events [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ] circa 2003, we de ned together a logic and a computing model. The
computing model was based closely on the IO Automata from the book of Nancy Lynch,
Distributed Algorithms [
          <xref ref-type="bibr" rid="ref40">40</xref>
          ]. We called our machines Message Automata (MA) because they
di ered from IOA in the way they composed; we added frame conditions to the automata to
facilitate reasoning about composition. We also provide addresses which identi ed the machines
and explicit communication channels. We intermixed axioms about events with axioms about
the machines, and proved that these axioms were validated by the standard model of computing
for the automata. This model was close to that presented by Lynch and also the model used
in other textbooks [
          <xref ref-type="bibr" rid="ref2">2</xref>
          ]. We used axioms about sending and receiving messages, about state
change, and ordering of events, about kinds of events, about how processes represented as
Message Automata were composed, and how their computations validated the axioms. Later
in A Causal Logic of Events [
          <xref ref-type="bibr" rid="ref10">10</xref>
          ] circa 2005, we classi ed the event logic axioms more nely
in a progression, starting with axioms for event ordering, then events with values, then events
relative to states, and so on.
        </p>
        <p>
          We learned that the key axiom for many proofs was that causal ordering [
          <xref ref-type="bibr" rid="ref37">37</xref>
          ] of events is well
founded. We could justify this property based on the computation model, and we made that
an explicit axiom. We used it to formally prove many important theorems and derive several
simple protocols. As we began to specify and prove properties about complex consensus
protocols, we discovered that small changes in the protocol would cause disproportionate expansion
of our proofs which had to be redone by hand. So we modi ed the theory to raise the level
of abstraction and increase the amount of automation connecting layers of abstraction. The
discovery of the notion of an event class by 2008 [
          <xref ref-type="bibr" rid="ref5">5</xref>
          ] allowed us to postpone reasoning about
speci c automata until we had the abstract argument nished at this much higher level. The event
classes eventually led us to a more abstract programming notation called event combinators
that we have now implemented directly [
          <xref ref-type="bibr" rid="ref7">7</xref>
          ].
        </p>
        <p>
          By 2010 we could automatically generate proofs from the higher level event classes to the
lowest level process code, now implemented in our new programming interface to Nuprl built
4This style has the unintended consequence of citing a very large number of our own papers.
by Vincent Rahli called EventML [
          <xref ref-type="bibr" rid="ref54">54</xref>
          ]. We were able to create domain speci c tactics that
would automate in a matter of a day or two the work that previously took us a month or two
of hand proofs. By exploiting the distributed implementation of Nuprl, we can now run these
domain speci c proof tactics in a matter of a few hours by using a cluster of many multi-core
processors.
        </p>
        <p>During the period from 2005 to 2009 we learned to modify and extend the entire theory step
by step and replay all the proofs. Mark Bickford and Richard Eaton developed mechanisms
to replay the proofs, nd the broken steps, and modify the tactics and then replay the entire
event theory library.</p>
        <p>
          I can only cover one point of this long and rich technical story in this short article. We turn
to that one point next. In due course we will publish more \chapters" of the story now that
we have deployed our synthesized consensus protocols in a working system called ShadowDB
and have started collecting data about its performance [
          <xref ref-type="bibr" rid="ref50">50</xref>
          ]. We will also be studying how this
system adapts to attack by exploiting synthetic code diversity, discussed brie y later in this
article.
3.3
        </p>
      </sec>
      <sec id="sec-6-3">
        <title>Evolving understanding { causal order</title>
        <p>We now look brie y at how our understanding of causal order changed as the theories evolved.
The same kind of story could be told about minimizing the role of state, about the need for
event combinators, and about the need for sub-processes that live only for short periods. All
of this would take a monograph. So I will focus on only one such aspect.</p>
        <p>
          Lamport discovered in 1978 that causal order was the right notion of time in distributed
systems [
          <xref ref-type="bibr" rid="ref37">37</xref>
          ]. Intuitively, an event e comes before e0 if e can in uence e0. We give the de nition
below.
        </p>
        <p>To show that causal order is well-founded, we notice that in any execution of a distributed
system given by reduction rules, we can conduct a \tour of the events" and number them so
that events caused by other events have a higher number. Thus causal order is well founded
and if equality of events is decidable, then so is causal order. We show this below.
3.3.1</p>
        <sec id="sec-6-3-1">
          <title>Signature of EOrder</title>
          <p>The signature of these events requires two types, and two partial functions. The types are
discrete, which means that their de ning equalities are decidable. We assume the types are
disjoint. We de ne D as fT : T ype j 8x; y : T: x = y in T _ : (x = y in T )g, the large type of
discrete types.</p>
        </sec>
        <sec id="sec-6-3-2">
          <title>Events with order (EOrder)</title>
          <p>E: D
Loc:D
pred?: E ! E + Loc
sender?: E ! E + U nit</p>
          <p>The function pred? nds the predecessor event of e if e is not the rst event at a locus or
it returns the location if e is the rst event. The sender?(e) value is the event that sent e if e
is a receive, otherwise it is a unit. We can de ne the location of an event by tracing back the
predecessors until the value of pred belongs to Loc. This is a kind of partial function on E.
From pred? and sender? we can de ne these Boolean valued functions:</p>
          <p>f irst(e) = if is left (pred?(e)) then true else false
rcv?(e) = if is left (sender?(e)) then true else false
The relation is left applies to any disjoint union type A + B and decides whether an element is
in the left or right disjunct. We can \squeeze" considerable information out of the two functions
pred? and sender?. In addition to rst and rcv?, we can de ne the order relation
pred!(e; e0) == (: f irst(e0) ) e = pred?(e0)) _ e = sender(e0):</p>
          <p>The transitive closure of pred! is Lamport's causal order relation denoted e &lt; e0: We can
prove that it is well-founded and decidable; rst we de ne it.</p>
          <p>The nth power of relation R on type T , is de ned as
xRoy i x = y in T
xRny i 9z : T: xRz &amp; zRn 1y
The transitive closure of R is de ned as xR y i 9n : N+:(xRny):</p>
          <p>Causal order is x pred! y; abbreviated x &lt; y.
3.3.2</p>
        </sec>
        <sec id="sec-6-3-3">
          <title>Axioms for event structures with order (EOrder)</title>
          <p>There are only three axioms that constrain event systems with order beyond the typing
constraints.</p>
          <p>Axiom 1. If event e emits a signal, then there is an event e0 such that for any event e00 which
receives this signal, e00 = e0 or e00 &lt; e0.</p>
          <p>8e : E:9e0 : E: 8e00 : E: (rcv?(e00) &amp; sender?(e00) = e) ) (e00 = e0 _ e00 &lt; e)
Axiom 2. The pred? function is injective.</p>
          <p>8e; e0 : E: loc(e) = loc(e0) ) pred?(e) = pred?(e0) ) e = e0
Axiom 3. The pred! relation is strongly well founded.</p>
          <p>9f : E ! N: 8e; e0 : E:pred!(e; e0) ) f (e) &lt; f (e0)</p>
          <p>To justify f in Axiom 3 we arrange a linear \tour" of the event space in any computation.
We imagine that space as a subset of N N where N numbers the locations and discrete time.
Events happen as we examine them on this tour, so a receive can't happen until we activate the
send. Local actions are linearly ordered at each location. Note, we need not make any further
assumptions.</p>
          <p>We can de ne the nite list of events before a given event at a location, namely
before(e) == if rst(e) then[]
else pred?(e) append before (pred? (e))
prior(e) == if rst(e) then[]
else if rcv?(e)
then &lt; e; prior(sender?(e)); prior(pred?(e)) &gt;
else &lt; e; prior(pred?(e)) &gt;</p>
          <p>Similarly, we can de ne the nite tree of all events causally before e, namely</p>
        </sec>
        <sec id="sec-6-3-4">
          <title>Properties of events with order</title>
          <p>We can prove many interesting facts about events with order. The basis for many of the proofs
is induction over causal order. We prove this by rst demonstrating that causal order is strongly
well founded.</p>
          <p>Theorem 3.1. 9f : E ! N: 8e; e0 : E: e &lt; e0 ) f (e) &lt; f (e0)</p>
          <p>The argument is simple. Let x y denote pred!(x; y) and let x n y denote pred!n(x; y):
Recall that x n+1 y i 9z : E: x z &amp; z n y: From Axiom 3 there is function fo : E ! N
such that x y implies fo(x) &lt; fo(z): By induction on N we know that fo(z) &lt; fo(y): From
this we have fo(x) &lt; fo(y): So the function fo satis es the theorem. The simple picture of the
argument is
x
z1
z2
: : : zn</p>
          <p>y
fo(x) &lt; fo(z1) &lt; : : : &lt; fo(zn) &lt; fo(y):</p>
          <p>We leave the proof of the following induction principle to the reader.</p>
          <p>Theorem 3.2. 8P : E ! P rop: 8e0 : E: ((8e : E: e &lt; e0: P (e)) ) P (e0)) ) 8e : E: P (e)</p>
          <p>Using induction we can prove that causal order is decidable.</p>
          <p>Theorem 3.3. 8e; e0 : E: e &lt; e0 _ : (e &lt; e0)</p>
          <p>We need the lemma.</p>
          <p>Theorem 3.4. 8e; e0 : E: (e
e0 _ : (e</p>
          <p>e0))</p>
          <p>This is trivial from the fact that pred!(x; y) is de ned using a decidable disjunction of
decidable relations, recall
x</p>
          <p>y is pred!(x; z)
so
and</p>
          <p>pred!(x; y) = : f irst(y) ) x = pred?(y) _ x = sender?(y):
The local order given by pred? is a total order. De ne x &lt;loc y is x = pred?(y):
Theorem 3.5. 8x; y : E: (x &lt;loc y _ x = y _ y &lt;loc x)</p>
          <p>The environment as well as the processes are players in the execution, determining whether
protocols converge or not and whether they converge su ciently fast. However, unlike the
processes, the environment is not a Turing computable player. It's behavior was not lawlike.
This means that the reduction rule semantics should not be taken as the whole story, and the
justi cation of causal order based on the computations is not the fundamental explanation,
only a suggestive approximation. The best explanation are the axioms that de ne what the
environment can contribute, and the induction principle on causal order.
3.4</p>
        </sec>
      </sec>
      <sec id="sec-6-4">
        <title>The formal distributed computing model - circa 2012</title>
        <p>
          Here is a brief overview of our General Process Model circa 2010 [
          <xref ref-type="bibr" rid="ref6">6</xref>
          ]. From it we can generate
structures we call event orderings. We mention key concepts for reasoning about event orderings
from these computations. A system consists of a set of components. Each component has a
location, an internal part, and an external part. Locations are just abstract identi ers. There
may be more than one component with the same location.
        </p>
        <p>The internal part of a component is a process|its program and internal (possibly hidden)
state. The external part of a component is its interface with the rest of the system. In this
account, the interface will be a list of messages, containing either data or processes, labeled
with the location of the recipient. The \higher order" ability to send a message containing a
process allows a system to grow by \forking" or \bootstrapping" new components.</p>
        <p>A system executes as follows. At each step, the environment may choose and remove a
message from the external component. If the chosen message is addressed to a location that
is not yet in the system, then a new component is created at that location, using a given
boot-process, and an empty external part. Each component at the recipient location receives
the message as input and computes a pair that contains a process and an external part. The
process becomes the next internal part of the component, and the external part is appended to
the current external part of the component.</p>
        <p>
          A potentially in nite sequence of steps, starting from a given system and using a given
boot-process, is a run of that system. From a run of a system we derive an abstraction of its
behavior by focusing on the events in the run. The events are the pairs, hx; ni, of a location and
a step at which location x gets an input message at step n, i.e. information is transferred. Every
event has a location, and there is a natural causal-ordering on the set of events, the ordering
rst considered by Lamport [
          <xref ref-type="bibr" rid="ref37">37</xref>
          ]. This allows us to de ne an event-ordering, a structure,
hE; loc; &lt;; infoi, in which the causal ordering &lt; is transitive relation on E that is
wellfounded, and locally- nite (each event has only nitely many predecessors). Also, the events
at a given location are totally ordered by &lt;. The information, info(e), associated with event e
is the message input to loc(e) when the event occurred.
        </p>
        <p>We have found that requirements for distributed systems can be expressed as (higher-order)
logical propositions about event-orderings. To illustrate this and motivate the results in the
rest of the paper we present a simple example of consensus in a group of processes.
Example 1. A simple consensus protocol: TwoThirds</p>
        <p>Each participating component will be a member of some groups and each group has a name,
G. A message hG; ii from the environment to component i informs it that it is in group G.
The groups have n = 3f + 1 members, and they are designed to tolerate f failures. When any
component in a group G receives a message h[start ]; Gi it starts the consensus protocol whose
goal is to decide on values received by the members from clients. We assume that once the
protocol starts, each process has received a value vi or has a default non-value.</p>
        <p>The simple TwoThirds consensus protocol is this: A process Pi that has a value vi of type
T starts an election to choose a value of type T (with a decidable equality) from among those
received by members of the group from clients. The elections are identi ed by natural
numbers, eli initially 0, and incremented by 1, and a Boolean variable decidei is initially f alse. The
function from lists of values, Msg i to a value is a parameter of the protocol. If the type T of
values is Boolean, we can take f to be the majority function.</p>
        <sec id="sec-6-4-1">
          <title>Begin</title>
          <p>Until decidei do:
1. Increment eli; 2. Broadcast vote heli; vii to G;
3. Collect in list Msg i 2f + 1 votes of election eli;
4. Choose vi := f (Msg i);
5. If Msg i is unanimous then decidei := true
End</p>
          <p>We describe protocols like this by classifying the events occurring during execution. In this
algorithm there are Input, Vote, Collect, and Decide events. The components can recognize
events in each of these event classes (in this example they could all have distinctive headers),
and they can associate information with each event (e.g. hei; vii with Vote, Msg i with Collect,
and f (Msg i) with Decide). Events in some classes cause events with related information content
in other classes, e.g. Collect causes a Vote event with value f (Msg i).</p>
          <p>In general, an event class X is function on events in an event ordering that e ectively
partitions events into two sets, E(X) and E E(X), and assigns a value X(e) to events
e 2 E(X).</p>
          <p>Example 2. Consensus speci cation</p>
          <p>Let P and D be the classes of events with headers propose and decide, respectively. Then the
safety speci cation of a consensus protocol is the conjunction of two propositions on (extended)
event-orderings, called agreement (all decision events have the same value) and responsiveness
(the value decided on must be one of the values proposed):
8e1; e2 : E(D): D(e1) = D(e2)
8e : E(D): 9e0 : E(P ): e0 &lt; e ^ D(e) = P (e0)</p>
          <p>It is easy to prove about TwoThirds the safety property that if there are two decide
events, say Decide(e) and Decide(e0), then Decide(e) = Decide(e0). We can also show that if
Decide(e1) = v, then there is a prior input event, e0 such that Input(e0) = Decide(e1).</p>
          <p>We can prove safety and the following liveness property about TwoThirds. We say that
activity in the protocol contracts to a subset S of exactly 2f + 1 processes if these processes all
vote in election n say at vt(n)1; :::; vt(n)k for k = 2f +1 and collect these votes at c(n)1; :::; c(n)k,
and all vote again in election n+1 at vt(n+1)1; :::; vt(n+1)k, and collect at c(n+1)1; :::; c(n+1)k.
In this case, these processes in S all decide in round n + 1 for the value given by f applied to
the collected votes. This is a liveness property.</p>
          <p>If exactly f processes fail, then the activity of the group G contracts to some S and decides.
Likewise if the message tra c is such that f processes are delayed for an election, then the
protocol contracts to S and decides. This fact shows that the TwoThirds protocol is
nonblocking, i.e. from any state of the protocol, there is a path to a decision. We can construct the
path to a decision given a set of f processes that we delay.</p>
          <p>We also proved safety and liveness of a variant of this protocol that may converge to
consensus faster. In this variant, if Pi receives a vote he; vi from a higher election, e &gt; eli, then Pi
joins that election by setting eli := e; vi := v; and then going to step 2.
3.5</p>
        </sec>
      </sec>
      <sec id="sec-6-5">
        <title>Attack Tolerant Distributed Systems</title>
        <p>Networked systems will be attacked. One way to protect them is to enable them to adapt to
attacks. One way to adapt is to change the protocol, but this is dangerous, especially for the
most critical protocols. The responsible system administrators don't ever want to modify the
most critical protocols such as consensus. One alternative is to switch to another provably
equivalent protocol, a task familiar to us from the stack optimization work. So we proposed
to formally generate a large number of logically equivalent variants, store them in an attack
response library, and switch to one of these variants when an attack is detected or even
proactively. Each variant uses distinctly di erent code which a system under attack can install
on-the- y to replace compromised components. Each variant is known to be equivalent and
correct.</p>
        <p>
          We express threatening features of the environment formally and discriminate among the
di erent types. We can do this in our new GPM model because the environment is an explicit
component about which we can reason. This capability allows us to study in depth how diversity
works to defend systems. We can implement attack scenarios as part of our experimental
platform. It is interesting that we can implement a constructive version [
          <xref ref-type="bibr" rid="ref16">16</xref>
          ] of the famous
FLP result [
          <xref ref-type="bibr" rid="ref23">23</xref>
          ] that shows how an attacker can keep any deterministic fault-tolerant consensus
protocol from achieving consensus.
        </p>
        <p>Synthetic Code Diversity We introduce diversity at all levels of the formal code
development (synthesis) process starting at a very high level of abstraction. For example, in the
TwoThirds protocol, we can use di erent functions f , alter the means of collecting Msg i,
synthesize variants of the protocol, alter the data types, etc. We are able to create multiple provably
correct versions of protocols at each level of development, e.g. compiling TwoThirds into Java,
Erlang, and F #. The higher the starting point for introducing diversity, the more options we
can create.</p>
        <p>Acknowledgement The ideas reported here are based on the work of the PRL research
group, in particular our research on the logic of events by Mark Bickford, Richard Eaton, and
Vincent Rahli, and by our collaboration with David Guaspari of ATC-NY corporation. Our
formal work was strongly in uenced by a long term collaboration with Robbert van Renesse
and Ken Birman of the Cornell systems group and the recent work of Nicolas Schiper.</p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>S.</given-names>
            <surname>Allen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Eaton</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Kreitz</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L.</given-names>
            <surname>Lorigo</surname>
          </string-name>
          , and
          <string-name>
            <surname>E. Moran.</surname>
          </string-name>
          <article-title>Innovations in computational type theory using Nuprl</article-title>
          .
          <source>Journal of Applied Logic</source>
          ,
          <volume>4</volume>
          (
          <issue>4</issue>
          ):
          <volume>428</volume>
          {
          <fpage>469</fpage>
          ,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>H.</given-names>
            <surname>Attiya</surname>
          </string-name>
          and
          <string-name>
            <given-names>J.</given-names>
            <surname>Welch</surname>
          </string-name>
          . Distributed Computing: Fundamentals, Simulations, and
          <string-name>
            <given-names>Advanced</given-names>
            <surname>Topics</surname>
          </string-name>
          . Wiley Interscience, New York, 2nd edition,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>H.</given-names>
            <surname>Benl</surname>
          </string-name>
          , U. Berger,
          <string-name>
            <given-names>H.</given-names>
            <surname>Schwichtenberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Seisenberger</surname>
          </string-name>
          and
          <string-name>
            <surname>W. Zuber</surname>
          </string-name>
          <article-title>Proof theory at work: Program development in the Minlog system</article-title>
          . In W. Bibel and P. G. Schmitt, editors,
          <source>Automated Deduction</source>
          , volume II. Kluwer,
          <year>1998</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>Y.</given-names>
            <surname>Bertot</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Casteran</surname>
          </string-name>
          .
          <source>Interactive Theorem Proving and Program Development; Coq'Art: The Calculus of Inductive Constructions. Texts in Theoretical Computer Science</source>
          . Springer-Verlag,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          [5]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          .
          <article-title>Component speci cation using event classes</article-title>
          .
          <source>In Lecture Notes in Computer Science</source>
          <volume>5582</volume>
          , pages
          <fpage>140</fpage>
          {
          <fpage>155</fpage>
          . Springer,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          [6]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          , and
          <string-name>
            <given-names>D.</given-names>
            <surname>Guaspari</surname>
          </string-name>
          .
          <article-title>Constructing event structures over a general process model</article-title>
          .
          <source>Department of Computer Science TR1813-23562</source>
          , Cornell University, Ithaca, NY,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          [7]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          , and
          <string-name>
            <given-names>V.</given-names>
            <surname>Rahli</surname>
          </string-name>
          .
          <article-title>The logic of events, a framework to reason about distributed systems</article-title>
          .
          <source>Technical report.</source>
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          [8]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>A logic of events</article-title>
          .
          <source>Technical Report TR2003-1893</source>
          , Cornell University,
          <year>2003</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          [9]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>Formal foundations of computer security</article-title>
          .
          <source>In Formal Logical Methods for System Security and Correctness</source>
          , volume
          <volume>14</volume>
          , pages
          <fpage>29</fpage>
          {
          <fpage>52</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          [10]
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          and
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>A causal logic of events in formalized computational type theory</article-title>
          .
          <source>In Logical Aspects of Secure Computer Systems, Proceedings of International Summer School Marktoberdorf</source>
          <year>2005</year>
          , to Appear 2006. Earlier version available as Cornell University
          <source>Technical Report TR2005-2010</source>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          [11]
          <string-name>
            <given-names>E.</given-names>
            <surname>Bishop</surname>
          </string-name>
          .
          <article-title>Foundations of Constructive Analysis</article-title>
          .
          <source>McGraw Hill</source>
          , NY,
          <year>1967</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          [12]
          <string-name>
            <given-names>A.</given-names>
            <surname>Bove</surname>
          </string-name>
          ,
          <string-name>
            <given-names>P.</given-names>
            <surname>Dybjer</surname>
          </string-name>
          , and
          <string-name>
            <given-names>U.</given-names>
            <surname>Norell</surname>
          </string-name>
          .
          <article-title>A brief overview of Agda { a functional language with dependent types</article-title>
          . In C. Urban M. Wenzel S. Berghofer,
          <string-name>
            <given-names>T. Nipkow</given-names>
            , (eds.), LNCS 5674,
            <surname>Theorem</surname>
          </string-name>
          <string-name>
            <surname>Proving</surname>
          </string-name>
          <source>in Higher Order Logics</source>
          , pages
          <volume>73</volume>
          {
          <fpage>78</fpage>
          . Springer,
          <year>2009</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          [13]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>Information-intensive proof technology</article-title>
          . In H.
          <article-title>Schwichtenberg and</article-title>
          K. Spies, editors,
          <source>Proof Technology and Computation</source>
          . Kluwer, Amsterdam,
          <year>2005</year>
          . 42 pages to appear.
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          [14]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          and
          <string-name>
            <given-names>M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          .
          <article-title>Intuitionistic Completeness of First-Order Logic</article-title>
          .
          <source>Technical Report arXiv:1110.1614v3, Computing and Information Science Technical Reports</source>
          , Cornell University,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          [15]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>Constructive mathematics and automatic program writers</article-title>
          .
          <source>In Proceedings of the IFIP Congress</source>
          , pages
          <volume>229</volume>
          {
          <fpage>233</fpage>
          . North-Holland,
          <year>1971</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          [16]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>E ectively nonblocking consensus procedures can execute forever: a constructive version of p</article-title>
          .
          <source>Technical Report Tech Report 11512</source>
          , Cornell University,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          [17]
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          ,
          <string-name>
            <given-names>S. F.</given-names>
            <surname>Allen</surname>
          </string-name>
          ,
          <string-name>
            <given-names>H. M.</given-names>
            <surname>Bromley</surname>
          </string-name>
          ,
          <string-name>
            <given-names>W. R.</given-names>
            <surname>Cleaveland</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. F.</given-names>
            <surname>Cremer</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R. W.</given-names>
            <surname>Harper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>Douglas J.</given-names>
            <surname>Howe</surname>
          </string-name>
          , T. B.
          <string-name>
            <surname>Knoblock</surname>
            ,
            <given-names>N. P.</given-names>
          </string-name>
          <string-name>
            <surname>Mendler</surname>
            ,
            <given-names>P.</given-names>
          </string-name>
          <string-name>
            <surname>Panangaden</surname>
            ,
            <given-names>J. T.</given-names>
          </string-name>
          <string-name>
            <surname>Sasaki</surname>
            , and
            <given-names>S. F.</given-names>
          </string-name>
          <string-name>
            <surname>Smith.</surname>
          </string-name>
          <article-title>Implementing Mathematics with the Nuprl Proof Development System</article-title>
          . Prentice-Hall, NJ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          [18]
          <string-name>
            <given-names>T.</given-names>
            <surname>Coquand</surname>
          </string-name>
          and
          <string-name>
            <surname>G. Huet.</surname>
          </string-name>
          <article-title>The calculus of constructions</article-title>
          .
          <source>Information and Computation</source>
          ,
          <volume>76</volume>
          :
          <fpage>95</fpage>
          {
          <fpage>120</fpage>
          ,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          [19]
          <string-name>
            <given-names>T.</given-names>
            <surname>Coquand</surname>
          </string-name>
          and
          <string-name>
            <given-names>C.</given-names>
            <surname>Paulin-Mohring</surname>
          </string-name>
          .
          <article-title>Inductively de ned types, preliminary version</article-title>
          .
          <source>In COLOG '88</source>
          , International Conference on Computer Logic, volume
          <volume>417</volume>
          <source>of LNCS</source>
          , pages
          <volume>50</volume>
          {
          <fpage>66</fpage>
          . Springer,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          [20]
          <string-name>
            <surname>N. G. de Bruijn</surname>
          </string-name>
          .
          <article-title>The mathematical language Automath: its usage and some of its extensions</article-title>
          . In J. P. Seldin and
          <string-name>
            <surname>J. R</surname>
          </string-name>
          . Hindley, editors,
          <source>Symposium on Automatic Demonstration</source>
          , volume
          <volume>125</volume>
          of Lecture Notes in Mathematics, pages
          <volume>29</volume>
          {
          <fpage>61</fpage>
          . Springer-Verlag,
          <year>1970</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          [21]
          <string-name>
            <surname>R. A. De Millo</surname>
            ,
            <given-names>R. J.</given-names>
          </string-name>
          <string-name>
            <surname>Lipton</surname>
          </string-name>
          ,
          <article-title>and</article-title>
          <string-name>
            <given-names>A. J.</given-names>
            <surname>Perlis</surname>
          </string-name>
          .
          <article-title>Social processes and proofs of theorems and programs</article-title>
          .
          <source>Communications of the Association of Computing Machinery</source>
          ,
          <volume>22</volume>
          :
          <fpage>271</fpage>
          {
          <fpage>280</fpage>
          ,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          [22]
          <string-name>
            <given-names>M.</given-names>
            <surname>Dummett</surname>
          </string-name>
          . Frege Philosophy of Mathematics. Harvard University Press, Cambridge, MA,
          <year>1991</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          [23]
          <string-name>
            <surname>M. J. Fischer</surname>
            ,
            <given-names>N. A.</given-names>
          </string-name>
          <string-name>
            <surname>Lynch</surname>
            , and
            <given-names>M. S.</given-names>
          </string-name>
          <string-name>
            <surname>Paterson</surname>
          </string-name>
          .
          <article-title>Impossibility of distributed consensus with one faculty process</article-title>
          .
          <source>JACM</source>
          ,
          <volume>32</volume>
          :
          <fpage>374</fpage>
          {
          <fpage>382</fpage>
          ,
          <year>1985</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          [24]
          <string-name>
            <given-names>G.</given-names>
            <surname>Frege</surname>
          </string-name>
          .
          <article-title>Begri sschrift, a formula language, modeled upon that for arithmetic for pure thought</article-title>
          .
          <source>In J. van Heijenoort</source>
          , (ed), From Frege to Godel:
          <source>A Source Book in Mathematical Logic</source>
          ,
          <year>1879</year>
          {
          <year>1931</year>
          , pages
          <fpage>1</fpage>
          {
          <fpage>82</fpage>
          . Harvard University Press, Cambridge, MA,
          <year>1967</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          [25]
          <string-name>
            <surname>J-Y. Girard</surname>
          </string-name>
          . Une extension de l'interpretation de Go
          <article-title>del a l'analyse, et son application a l'elimination des coupures dans l'analyse et la theorie des types</article-title>
          .
          <source>In 2nd Scandinavian Logic Symposium</source>
          , pages
          <volume>63</volume>
          {
          <fpage>69</fpage>
          . Springer-Verlag, NY,
          <year>1971</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref26">
        <mixed-citation>
          [26]
          <string-name>
            <surname>J-Y. Girard</surname>
          </string-name>
          .
          <article-title>The system F of variable types: Fifteen years later</article-title>
          .
          <source>Journal of Theoretical Computer Science</source>
          ,
          <volume>45</volume>
          :
          <fpage>159</fpage>
          {
          <fpage>192</fpage>
          ,
          <year>1986</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref27">
        <mixed-citation>
          [27]
          <string-name>
            <given-names>G.</given-names>
            <surname>Gonthier</surname>
          </string-name>
          .
          <article-title>Formal proof { the four color theorem</article-title>
          .
          <source>Notices of the American Math Society</source>
          ,
          <volume>55</volume>
          :
          <fpage>1382</fpage>
          {
          <fpage>1392</fpage>
          ,
          <year>2008</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref28">
        <mixed-citation>
          [28]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gordon</surname>
          </string-name>
          and
          <string-name>
            <given-names>T.</given-names>
            <surname>Melham</surname>
          </string-name>
          .
          <article-title>Introduction to HOL: A Theorem Proving Environment for HigherOrder Logic</article-title>
          . Cambridge University Press, Cambridge,
          <year>1993</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref29">
        <mixed-citation>
          [29]
          <string-name>
            <given-names>M.</given-names>
            <surname>Gordon</surname>
          </string-name>
          ,
          <string-name>
            <given-names>R.</given-names>
            <surname>Milner</surname>
          </string-name>
          , and
          <string-name>
            <given-names>C.</given-names>
            <surname>Wadsworth</surname>
          </string-name>
          .
          <article-title>Edinburgh LCF: a mechanized logic of computation</article-title>
          , volume
          <volume>78</volume>
          of Lecture Notes in Computer Science. Springer-Verlag, NY,
          <year>1979</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref30">
        <mixed-citation>
          [30]
          <string-name>
            <given-names>C. C.</given-names>
            <surname>Green</surname>
          </string-name>
          .
          <article-title>An application of theorem proving to problem solving</article-title>
          .
          <source>In IJCAI-69|Proceedings of the 1st International Joint Conference on Arti cial Intelligence</source>
          , pages
          <fpage>219</fpage>
          {
          <fpage>239</fpage>
          , Washington, DC, May
          <year>1969</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref31">
        <mixed-citation>
          [31]
          <string-name>
            <given-names>A.</given-names>
            <surname>Heyting (ed) L. E. J. Brouwer</surname>
          </string-name>
          .
          <source>Collected Works</source>
          , volume
          <volume>1</volume>
          . North-Holland, Amsterdam,
          <year>1975</year>
          .
          <article-title>(see On the foundations of mathematics 11-98</article-title>
          .).
        </mixed-citation>
      </ref>
      <ref id="ref32">
        <mixed-citation>
          [32]
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Hickey</surname>
          </string-name>
          .
          <article-title>The MetaPRL Logical Programming Environment</article-title>
          .
          <source>PhD thesis</source>
          , Cornell University, Ithaca,
          <string-name>
            <surname>NY</surname>
          </string-name>
          ,
          <year>January 2001</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref33">
        <mixed-citation>
          [33]
          <string-name>
            <given-names>C. A. R.</given-names>
            <surname>Hoare</surname>
          </string-name>
          .
          <article-title>Notes on data structuring</article-title>
          .
          <source>In Structured Programming</source>
          . Academic Press, New York,
          <year>1972</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref34">
        <mixed-citation>
          [34]
          <string-name>
            <given-names>A.</given-names>
            <surname>Hodges</surname>
          </string-name>
          .
          <source>Beyond Turing's Machines. Science</source>
          ,
          <volume>336</volume>
          ,
          <year>April 2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref35">
        <mixed-citation>
          [35]
          <string-name>
            <given-names>S. C.</given-names>
            <surname>Kleene</surname>
          </string-name>
          .
          <article-title>On the interpretation of intuitionistic number theory</article-title>
          .
          <source>J. of Symbolic Logic</source>
          ,
          <volume>10</volume>
          :
          <fpage>109</fpage>
          {
          <fpage>124</fpage>
          ,
          <year>1945</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref36">
        <mixed-citation>
          [36]
          <string-name>
            <given-names>C.</given-names>
            <surname>Kreitz</surname>
          </string-name>
          .
          <article-title>Building reliable, high-performance networks with the Nuprl proof development system</article-title>
          .
          <source>JFP</source>
          ,
          <volume>14</volume>
          (
          <issue>1</issue>
          ):
          <volume>21</volume>
          {
          <fpage>68</fpage>
          ,
          <year>2004</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref37">
        <mixed-citation>
          [37]
          <string-name>
            <given-names>L.</given-names>
            <surname>Lamport</surname>
          </string-name>
          . Time, clocks, and
          <article-title>the ordering of events in a distributed system</article-title>
          .
          <source>Communications of the ACM</source>
          ,
          <volume>21</volume>
          (
          <issue>7</issue>
          ):
          <volume>558</volume>
          {
          <fpage>65</fpage>
          ,
          <year>1978</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref38">
        <mixed-citation>
          [38]
          <string-name>
            <given-names>X.</given-names>
            <surname>Leroy</surname>
          </string-name>
          .
          <article-title>Formal certi cation of a compiler back-end or: programming a compiler with a proof assistant</article-title>
          .
          <source>In Proceedings of the 33d ACM SIGPLAN-SIGACT symposium on Principles of programming languages</source>
          , pages
          <volume>42</volume>
          {
          <fpage>54</fpage>
          . ACM Press,
          <year>2006</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref39">
        <mixed-citation>
          [39]
          <string-name>
            <given-names>X.</given-names>
            <surname>Liu</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Kreitz</surname>
          </string-name>
          , R. van Renesse,
          <string-name>
            <given-names>J. J.</given-names>
            <surname>Hickey</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Hayden</surname>
          </string-name>
          ,
          <string-name>
            <given-names>K.</given-names>
            <surname>Birman</surname>
          </string-name>
          , and
          <string-name>
            <given-names>R. L.</given-names>
            <surname>Constable</surname>
          </string-name>
          .
          <article-title>Building reliable, high-performance communication systems from components</article-title>
          . In D. Kotz and J. Wilkes (eds),
          <source>17th ACM Symposium on Operating Systems Principles (SOSP'99)</source>
          , volume
          <volume>33</volume>
          (
          <article-title>5) of Operating Systems Review</article-title>
          , pages
          <volume>80</volume>
          {
          <fpage>92</fpage>
          . ACM Press,
          <year>December 1999</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref40">
        <mixed-citation>
          [40]
          <string-name>
            <given-names>N. A. Lynch. Distributed</given-names>
            <surname>Algorithms</surname>
          </string-name>
          . Morgan Kaufmann Publishers, San Mateo, CA,
          <year>1996</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref41">
        <mixed-citation>
          [41]
          <string-name>
            <given-names>P.</given-names>
            <surname>Martin-Lo</surname>
          </string-name>
          
          <article-title>f. Constructive mathematics and computer programming</article-title>
          .
          <source>In Proceedings of the Sixth International Congress for Logic, Methodology, and Philosophy of Science</source>
          , pages
          <volume>153</volume>
          {
          <fpage>175</fpage>
          , Amsterdam,
          <year>1982</year>
          . North Holland.
        </mixed-citation>
      </ref>
      <ref id="ref42">
        <mixed-citation>
          [42]
          <string-name>
            <given-names>P.</given-names>
            <surname>Martin-L</surname>
          </string-name>
          
          <article-title>of</article-title>
          .
          <source>Intuitionistic Type Theory. Number 1 in Studies in Proof Theory, Lecture Notes. Bibliopolis, Napoli</source>
          ,
          <year>1984</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref43">
        <mixed-citation>
          [43]
          <string-name>
            <given-names>R.</given-names>
            <surname>Matuszewski</surname>
          </string-name>
          and
          <string-name>
            <given-names>P.</given-names>
            <surname>Rudnicki</surname>
          </string-name>
          .
          <article-title>Mizar: the rst 30 years</article-title>
          .
          <source>Mechanized Mathematics and its Applications</source>
          ,
          <volume>4</volume>
          :8{
          <fpage>14</fpage>
          ,
          <year>2005</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref44">
        <mixed-citation>
          [44]
          <string-name>
            <given-names>J.</given-names>
            <surname>McCarthy</surname>
          </string-name>
          .
          <article-title>A basis for a mathematical theory of computation</article-title>
          . In P. Bra ort and D. Hirschberg, editors,
          <source>Computer Programming and Formal Systems</source>
          , pages
          <fpage>33</fpage>
          {
          <fpage>70</fpage>
          . North-Holland, Amsterdam,
          <year>1963</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref45">
        <mixed-citation>
          [45]
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Mendler</surname>
          </string-name>
          .
          <article-title>Recursive types and type constraints in second-order lambda calculus</article-title>
          . In D. Gries, editor,
          <source>Proceedings of the 2nd IEEE Symposium on Logic in Computer Science</source>
          , pages
          <volume>30</volume>
          {
          <fpage>36</fpage>
          . IEEE Computer Society Press,
          <year>June 1987</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref46">
        <mixed-citation>
          [46]
          <string-name>
            <given-names>P. F.</given-names>
            <surname>Mendler</surname>
          </string-name>
          . Inductive De nition in Type Theory.
          <source>PhD thesis</source>
          , Cornell University, Ithaca, NY,
          <year>1988</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref47">
        <mixed-citation>
          [47]
          <string-name>
            <given-names>D.</given-names>
            <surname>Michie</surname>
          </string-name>
          .
          <source>Machine Intelligence</source>
          <volume>3</volume>
          .
          <string-name>
            <given-names>American</given-names>
            <surname>Elsivier</surname>
          </string-name>
          , New York,
          <year>1968</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref48">
        <mixed-citation>
          [48]
          <string-name>
            <given-names>T.</given-names>
            <surname>Nipkow</surname>
          </string-name>
          ,
          <string-name>
            <given-names>L. C.</given-names>
            <surname>Paulson</surname>
          </string-name>
          , and M. Wenzel. Isabelle/HOL |
          <article-title>A Proof Assistant for Higher-Order Logic</article-title>
          , volume
          <volume>2283</volume>
          of Lecture Notes in Computer Science. Springer,
          <year>2002</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref49">
        <mixed-citation>
          [49]
          <string-name>
            <given-names>B.</given-names>
            <surname>Nordstro</surname>
          </string-name>
          <article-title>m, K. Petersson, and</article-title>
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Smith.</surname>
          </string-name>
          <article-title>Programming in Martin-Lof 's Type Theory</article-title>
          .
          <source>Oxford Sciences Publication, Oxford</source>
          ,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref50">
        <mixed-citation>
          [50]
          <string-name>
            <given-names>N.</given-names>
            <surname>Schiper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Rahli</surname>
          </string-name>
          , R. van Renesse,
          <article-title>and</article-title>
          <string-name>
            <given-names>R. L. Constable M.</given-names>
            <surname>Bickford</surname>
          </string-name>
          .
          <article-title>Shadowdb: A replicated database on a synthesized consensus core</article-title>
          .
          <source>Technical report</source>
          , Computer Science Department, Cornell University, Ithaca, NY,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref51">
        <mixed-citation>
          [51]
          <string-name>
            <given-names>S.</given-names>
            <surname>Owre</surname>
          </string-name>
          ,
          <string-name>
            <given-names>J. M.</given-names>
            <surname>Rushby</surname>
          </string-name>
          , and
          <string-name>
            <given-names>N.</given-names>
            <surname>Shankar</surname>
          </string-name>
          . PVS:
          <article-title>A prototype veri cation system</article-title>
          . In Deepak Kapur, editor,
          <source>Proceedings of the 11th International Conference on Automated Deduction, volume 607 of Lecture Notes in Arti cial Intelligence</source>
          , pages
          <fpage>748</fpage>
          {
          <fpage>752</fpage>
          ,
          <string-name>
            <surname>Saratoga</surname>
            ,
            <given-names>NY</given-names>
          </string-name>
          ,
          <year>June 1992</year>
          . Springer-Verlag.
        </mixed-citation>
      </ref>
      <ref id="ref52">
        <mixed-citation>
          [52]
          <string-name>
            <given-names>F.</given-names>
            <surname>Pfenning</surname>
          </string-name>
          and
          <string-name>
            <surname>C.</surname>
          </string-name>
          <article-title>Schurmann. Twelf | a meta-logical framework for deductive systems</article-title>
          . In H. Ganzinger, editor,
          <source>Proceedings of the 16th International Conference on Automated Deduction</source>
          , volume
          <volume>1632</volume>
          , pages
          <fpage>202</fpage>
          {
          <fpage>206</fpage>
          .
          <string-name>
            <surname>Trento</surname>
          </string-name>
          , Italy,
          <source>July</source>
          <volume>7</volume>
          {
          <fpage>10</fpage>
          1999.
        </mixed-citation>
      </ref>
      <ref id="ref53">
        <mixed-citation>
          [53]
          <string-name>
            <given-names>B. C.</given-names>
            <surname>Pierce</surname>
          </string-name>
          ,
          <string-name>
            <given-names>C.</given-names>
            <surname>Casinghino</surname>
          </string-name>
          ,
          <string-name>
            <given-names>M.</given-names>
            <surname>Greenberg</surname>
          </string-name>
          ,
          <string-name>
            <given-names>V.</given-names>
            <surname>Sjberg</surname>
          </string-name>
          , and
          <string-name>
            <given-names>B.</given-names>
            <surname>Yorgey</surname>
          </string-name>
          .
          <source>Software Foundations. Electronic</source>
          ,
          <year>2011</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref54">
        <mixed-citation>
          [54]
          <string-name>
            <given-names>V.</given-names>
            <surname>Rahli</surname>
          </string-name>
          .
          <article-title>New tools for domain speci c veri ed programming</article-title>
          .
          <source>Technical Report 1000, Cornell Computing and Information Science</source>
          ,
          <year>2012</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref55">
        <mixed-citation>
          [55]
          <string-name>
            <given-names>B.</given-names>
            <surname>Russell</surname>
          </string-name>
          .
          <article-title>Mathematical logic as based on a theory of types</article-title>
          .
          <source>Am. J. Math.</source>
          ,
          <volume>30</volume>
          :
          <fpage>222</fpage>
          {
          <fpage>62</fpage>
          ,
          <year>1908</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref56">
        <mixed-citation>
          [56]
          <string-name>
            <given-names>B.</given-names>
            <surname>Russell</surname>
          </string-name>
          .
          <source>The Principles of Mathematics</source>
          . Cambridge University Press, Cambridge,
          <year>1908</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref57">
        <mixed-citation>
          [57]
          <string-name>
            <surname>Wa</surname>
          </string-name>
          . P. van Stigt.
          <source>Brouwer's Intuitionism</source>
          . North-Holland, Amsterdam,
          <year>1990</year>
          .
        </mixed-citation>
      </ref>
      <ref id="ref58">
        <mixed-citation>
          [58]
          <string-name>
            <given-names>A. N.</given-names>
            <surname>Whitehead</surname>
          </string-name>
          and
          <string-name>
            <given-names>B.</given-names>
            <surname>Russell</surname>
          </string-name>
          .
          <source>Principia Mathematica</source>
          , volume
          <volume>1</volume>
          ,
          <issue>2</issue>
          ,
          <fpage>3</fpage>
          . Cambridge University Press, 2nd edition,
          <year>1925</year>
          {
          <fpage>27</fpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref59">
        <mixed-citation>
          [59]
          <string-name>
            <given-names>N.</given-names>
            <surname>Wirth</surname>
          </string-name>
          and
          <string-name>
            <given-names>C. A. R.</given-names>
            <surname>Hoare</surname>
          </string-name>
          .
          <article-title>A contribution to the development of ALGOL</article-title>
          .
          <source>Communications of the ACM</source>
          ,
          <volume>9</volume>
          :
          <fpage>413</fpage>
          {
          <fpage>432</fpage>
          ,
          <year>1966</year>
          .
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>