Reworked/Synced Background chapter with SEFM paper
Isabelle_DOF/Isabelle_DOF/master There was a failure building this commit Details

This commit is contained in:
Burkhart Wolff 2019-07-17 14:51:45 +02:00
parent 5ff3217493
commit 67d6caf2ad
6 changed files with 242 additions and 8 deletions

View File

@ -34,7 +34,7 @@ types, terms, proven theorems, code, or established assertions.
Based on a novel adaption of the Isabelle IDE, a document is checked to be
\<^emph>\<open>conform\<close> to a particular ontology---\isadof is designed to give fast user-feedback
\<^emph>\<open>during the capture of content\<close>. This is particularly valuable in case of document
changes, where the \<^emph>\<open>coherence\<close> between the formal and the informal parts of the
evolution, where the \<^emph>\<open>coherence\<close> between the formal and the informal parts of the
content can be mechanically checked.
To avoid any misunderstanding: \isadof is \<^emph>\<open>not a theory in HOL\<close>
@ -46,6 +46,8 @@ itself. \isadof is a plugin into the Isabelle/Isar
framework in the style of~@{cite "wenzel.ea:building:2007"}.
\<close>
(* declaring the forward references used in the subsequent section *)
(*<*)
declare_reference*[bgrnd::text_section]

View File

@ -6,8 +6,9 @@ begin
chapter*[bgrnd::text_section,main_author="Some(@{docitem ''adb''}::author)"]
\<open> Background: The Isabelle System \<close>
section*[bgrnd1::introduction]\<open>Document Processing in Isabelle\<close>
text*[background::introduction]\<open>
While Isabelle is widely perceived as an interactive theorem prover
While Isabelle @{cite "nipkow.ea:isabelle:2002"} is widely perceived as an interactive theorem prover
for HOL (Higher-order Logic)~@{cite "nipkow.ea:isabelle:2002"}, we
would like to emphasize the view that Isabelle is far more than that:
it is the \<^emph>\<open>Eclipse of Formal Methods Tools\<close>. This refers to the
@ -43,10 +44,20 @@ resides in the SML structure \texttt{Context}. This structure provides a kind of
for components (plugins) such as \isadof. On top of the latter, the LCF-Kernel, tactics,
automated proof procedures as well as specific support for higher specification constructs
were built. \<close>
text\<open> We would like to detail the documentation generation of the architecture,
text\<open> Of particular interest for \dof is documentation generation of the architecture,
which is based on literate specification commands such as \inlineisar+section+ \ldots,
\inlineisar+subsection+ \ldots, \inlineisar+text+ \ldots, etc.
\inlineisar+subsection+ \ldots, \inlineisar+text+ \ldots, etc. Moreover, we assume that
\<^emph>\<open>inside\<close> text-elements, there are generic and extendible ways to add "semantic", i.e.
machine-checked sub-elements.
In the sequel, we will outline the general assumptions that \dof makes for the underlying
document model, and than explain how Isabelle as a framework fits into this picture.
\<close>
(*
Thus, a user can add a simple text:
\begin{isar}
text\<Open>This is a description.\<Close>
@ -71,8 +82,137 @@ text*[anti]\<open> Thus, antiquotations can refer to formal content, can be type
displayed and can be used for calculations before actually being typeset. When editing,
Isabelle's PIDE offers auto-completion and error-messages while typing the above
\<^emph>\<open>semi-formal\<close> content. \<close>
*)
section*["sec:background"::introduction]\<open>The Document Model\<close>
text\<open>
In this section, we explain the assumed document model underlying
\dof in general; in particular the concepts \<^emph>\<open>integrated document\<close>,
\<^emph>\<open>sub-document\<close> , \<^emph>\<open>text-element\<close> and \<^emph>\<open>semantic macros\<close> occurring
inside text-elements. Furthermore, we assume two different levels of
parsers (for \<^emph>\<open>outer\<close> and \<^emph>\<open>inner syntax\<close>) where the inner-syntax is basically a typed
$\lambda$-calculus and some Higher-order Logic (HOL).\<close>
figure*["fig:dependency"::figure,relative_width="50",src="''figures/document-hierarchy''"]\<open>
A Theory-Graph in the Document Model. \<close>
text\<open>
We assume a hierarchical document model, \ie, an \<^emph>\<open>integrated\<close>
document consist of a hierarchy \<^emph>\<open>sub-documents\<close> (files) that
can depend acyclically on each other. Sub-documents can have different
document types in order to capture documentations consisting of
documentation, models, proofs, code of various forms and other
technical artifacts. We call the main sub-document type, for
historical reasons, \<^emph>\<open>theory\<close>-files. A theory file consists of a
\<^emph>\<open>header\<close>, a \<^emph>\<open>context definition\<close>, and a body consisting of a
sequence of \<^emph>\<open>command\<close>s (@{figure "fig:dependency"}). Even the
header consists of a sequence of commands used for introductory text
elements not depending on any context. The context-definition
contains an \inlineisar{import} and a \inlineisar{keyword} section,
for example:
\begin{isar}
theory Example (* Name of the "theory" *)
imports (* Declaration of "theory" dependencies *)
Main (* Imports a library called "Main" *)
keywords (* Registration of keywords defined locally *)
requirement (* A command for describing requirements *)
\end{isar}
where \inlineisar{Example} is the abstract name of the text-file,
\texttt{Main} refers to an imported theory (recall that the import
relation must be acyclic) and \inlineisar{keywords} are used to
separate commands from each other.\<close>
text\<open>We distinguish fundamentally two different syntactic levels:
\begin{compactenum}
\item the \emph{outer-syntax} (\ie, the syntax for commands) is processed
by a lexer-library and parser combinators built on top, and
\item the \emph{inner-syntax} (\ie, the syntax for $\lambda$-terms in
HOL) with its own parametric polymorphism type checking.
\end{compactenum}
On the semantic level, we assume a validation process for an
integrated document, where the semantics of a command is a
transformation \inlineisar+\<theta> \<rightarrow> \<theta>+ for some
system state \inlineisar+\<theta>+. This document model can be
instantiated with outer-syntax commands for common text elements, \eg,
\inlineisar+section{*...*}+ or \inlineisar+text{*...*}+. Thus, users can add informal text to a
sub-document using a text command:
\begin{isar}
text\<Open>This is a description.\<Close>
\end{isar}
This will type-set the corresponding text in, for example, a PDF document.
However, this translation is not necessarily one-to-one: text
elements can be enriched by formal, \ie, machine-checked content via
\emph{semantic macros}, called antiquotations:
\begin{isar}
text\<Open>According to the reflexivity axiom @{thm refl}, we obtain in \<Gamma>
for @{term "fac 5"} the result @{value "fac 5"}.\<Close>
\end{isar}
which is represented in the final document (\eg, a PDF) by:
\begin{out}
According to the reflexivity axiom $x = x$, we obtain in $\Gamma$ for $\operatorname{fac} 5$ the result $120$.
\end{out}
Semantic macros are partial functions of type %
\inlineisar+\<theta> \<rightarrow> text+; since they can use the
system state, they can perform all sorts of specific checks or
evaluations (type-checks, executions of code-elements, references to
text-elements or proven theorems such as \inlineisar+refl+, which is
the reference to the axiom of reflexivity).
Semantic macros establish \<^emph>\<open>formal content\<close> inside informal content; they can be
type-checked before being displayed and can be used for calculations before being
typeset. They represent the device for linking the formal with the informal. \<close>
subsection*[bgrnd21::introduction]\<open>Implementability of the Assumed Document Model.\<close>
text\<open>
Batch-mode checkers for \dof can be implemented in all systems of the
LCF-style prover family, \ie, systems with a type-checked
\inlinesml{term}, and abstract \inlinesml{thm}-type for
theorems (protected by a kernel). This includes, \eg, ProofPower,
HOL4, HOL-light, Isabelle, as well as Coq and its derivatives. \dof
is, however, designed for fast interaction in an IDE. If a user wants
to benefit from this experience, only Isabelle and Coq have the
necessary infrastructure of asynchronous proof-processing and support
by a PIDE
@{cite "DBLP:conf/itp/Wenzel14" and "DBLP:journals/corr/Wenzel14" and "DBLP:conf/mkm/BarrasGHRTWW13"
and "Faithfull:2018:COQ:3204179.3204223"} which in many features
over-accomplishes the required features of \dof. For example, current Isabelle versions
offer cascade-syntaxes (different syntaxes and even parser-technologies
which can be nested along the \inlineisar+ \<Open> ... \<Close> + barriers, while
\dof actually only requires a 2-level syntax model.\<close>
figure*["fig:dof-ide"::figure,relative_width="80",src="''figures/cicm2018-combined''"]\<open>
The \isadof IDE (left) and the corresponding PDF (right).% , showing the first page
% of~\cite{brucker.ea:isabelle-ontologies:2018}. \<close>
text\<open> We call the present implementation of \dof on the
Isabelle platform \isadof. In
@{docitem "fig:dof-ide"}, a screen-shot of an introductory paper on \isadof
@{cite "brucker.ea:isabelle-ontologies:2018"} is shown;
this paper focusses on a number of application scenarios and user-interface aspects.
In @{docitem "fig:dof-ide"}, the \isadof PIDE can be seen on the left, while
the generated presentation in PDF is shown on the right.
Isabelle provides, beyond the features required for \dof, a lot of
additional benefits. For example, it also allows the asynchronous
evaluation and checking of the document content
@{cite "DBLP:conf/itp/Wenzel14" and "DBLP:journals/corr/Wenzel14" and
"DBLP:conf/mkm/BarrasGHRTWW13"}
and is dynamically extensible. Its PIDE provides a \<^emph>\<open>continuous build, continuous check\<close>
functionality, syntax highlighting, and IntelliSense-like auto-completion.
It also provides infrastructure for
displaying meta-information (\eg, binding and type annotation) as
pop-ups, while hovering over sub-expressions. A fine-grained
dependency analysis allows the processing of individual parts of
theory files asynchronously, allowing Isabelle to interactively
process large (hundreds of theory files) documents. Isabelle can
group sub-documents into sessions, \ie, sub-graphs of the
document-structure that can be ``pre-compiled'' and loaded
instantaneously, \ie, without re-processing. \<close>
(*<*)
end
(*>*)

View File

@ -6,13 +6,14 @@ begin
text*[bib::bibliography]\<open>References\<close>
(*<*)
close_monitor*[this]
text\<open>Resulting trace in doc\_item ''this'': \<close>
ML\<open>@{trace_attribute this}\<close>
(*<*)
end
(*>*)

View File

@ -1,4 +1,4 @@
session "IsaDof_Manual" = "Isabelle_DOF" +
session "IsaDofManual" = "Isabelle_DOF" +
options [document = pdf, document_output = "output", quick_and_dirty = true]
theories
IsaDofManual
@ -21,3 +21,18 @@ session "IsaDof_Manual" = "Isabelle_DOF" +
"figures/srac-as-es-application.png"
"figures/Dogfood-figures.png"
"figures/IsaArchGlobal.png"
"figures/document-hierarchy.svg"
"figures/IsaArchInteract.png"
"figures/document-model.key"
"figures/PIDE-interaction.pdf"
"figures/document-model.pdf"
"figures/cicm2018-combined.png"
"figures/isabelle-architecture.svg"
"figures/Dogfood-figures.png"
"figures/cicm2018-dof.png"
"figures/isadof.png"
"figures/cicm2018-pdf.png"
"figures/IsaArch.odp"
"figures/document-hierarchy.pdf"
"figures/srac-definition.png"

View File

@ -57,3 +57,6 @@
\title{<TITLE>}
\author{<AUTHOR>}
\newcommand{\dof}{DOF\xspace}

View File

@ -138,7 +138,17 @@
timestap = {2008-05-26}
}
@InProceedings{ brucker.ea:isabelle-ontologies:2018,
author = {Brucker, Achim D. and Ait-Sadoune, Idir and Crisafulli, Paolo and Wolff, Burkhart},
title = {Using the {Isabelle} ontology framework: Linking the formal with the informal.},
publisher = pub-springer,
address = pub-springer:adr,
series = s-lncs,
volume = 11006,
year = 2018,
doi = {10.1007/978-3-319-96812-4_3},
booktitle = {Conference on Intelligent Computer Mathematics (CICM)}
}
@InProceedings{ wenzel:asynchronous:2014,
author = {Makarius Wenzel},
@ -279,3 +289,66 @@
year = {2018}
}
@InProceedings{ DBLP:conf/itp/Wenzel14,
author = {Makarius Wenzel},
title = {Asynchronous User Interaction and Tool Integration in
Isabelle/PIDE},
booktitle = {Interactive Theorem Proving (ITP)},
pages = {515--530},
year = 2014,
doi = {10.1007/978-3-319-08970-6_33},
timestamp = {Sun, 21 May 2017 00:18:59 +0200},
biburl = {https://dblp.org/rec/bib/conf/itp/Wenzel14},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@InProceedings{ DBLP:journals/corr/Wenzel14,
author = {Makarius Wenzel},
title = {System description: Isabelle/jEdit in 2014},
booktitle = {Proceedings Eleventh Workshop on User Interfaces for
Theorem Provers, {UITP} 2014, Vienna, Austria, 17th July
2014.},
pages = {84--94},
year = 2014,
doi = {10.4204/EPTCS.167.10},
timestamp = {Wed, 03 May 2017 14:47:58 +0200},
biburl = {https://dblp.org/rec/bib/journals/corr/Wenzel14},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@InProceedings{ DBLP:conf/mkm/BarrasGHRTWW13,
author = {Bruno Barras and Lourdes Del Carmen
Gonz{\'{a}}lez{-}Huesca and Hugo Herbelin and Yann
R{\'{e}}gis{-}Gianas and Enrico Tassi and Makarius Wenzel
and Burkhart Wolff},
title = {Pervasive Parallelism in Highly-Trustable Interactive
Theorem Proving Systems},
booktitle = {Intelligent Computer Mathematics - MKM, Calculemus, DML,
and Systems and Projects},
pages = {359--363},
year = 2013,
doi = {10.1007/978-3-642-39320-4_29},
timestamp = {Sun, 04 Jun 2017 10:10:26 +0200},
biburl = {https://dblp.org/rec/bib/conf/mkm/BarrasGHRTWW13},
bibsource = {dblp computer science bibliography, https://dblp.org}
}
@article{Faithfull:2018:COQ:3204179.3204223,
author = {Faithfull, Alexander and Bengtson, Jesper and Tassi, Enrico and Tankink, Carst},
title = {Coqoon},
journal = {Int. J. Softw. Tools Technol. Transf.},
issue_date = {April 2018},
volume = {20},
number = {2},
month = apr,
year = {2018},
issn = {1433-2779},
pages = {125--137},
numpages = {13},
url = {https://doi.org/10.1007/s10009-017-0457-2},
doi = {10.1007/s10009-017-0457-2},
acmid = {3204223},
publisher = {Springer-Verlag},
address = {Berlin, Heidelberg},
}