Commit c04fa3b2 authored by Dennis Müller's avatar Dennis Müller

report/paper stuff

parent a614ceeb
@online{wikipedia:matroid,
label = {MWP},
title = {Matroid --- Wikipedia{,} The Free Encyclopedia},
......@@ -264,3 +263,7 @@
publisher = {ACM},
keywords = {conference},
address = {New York, NY, USA}}
@online{MueRabKoh:viewfinder-report18,
author = {Dennis M{\"u}ller and Florian Rabe and Michael Kohlhase},
title = {Automatically Finding Theory Morphisms for Knowledge Management},
url = {http://kwarc.info/kohlhase/submit/viewfinder-report.pdf}}
......@@ -10,6 +10,7 @@ To increase efficiency, we plan to explore term indexing techniques~\cite{Graf:t
The latter will be important for the library refactoring and merging applications which look for all possible (partial and total) views in one or between two libraries.
As such library-scale operations will have to be run together with theory flattening to a fixed point and re-run upon every addition to the library, it will be important to integrate them with the \MMT build system and change management processes~\cite{am:doceng10,iancu:msc}.
\ifshort
\paragraph{Enabled Applications}
Our work enables a number of advanced applications.
Maybe surprisingly, a major bottleneck here concerns less the algorithm or software design
......@@ -28,6 +29,7 @@ Note that we would need to keep book on our transformations during preprocessing
A useful interface might specifically prioritize views into theories on top of which there are many theorems and definitions that have been discovered.
\end{compactitem}
Note that even though the algorithm is in principle symmetric, some aspects often depend on the direction --- e.g. how we preprocess the theories, which constants we use as starting points or how we aggregate and evaluate the resulting (partial) views (see Sections \ref{sec:algparams}, \ref{sec:normalizeintra} and \ref{sec:normalizeinter}).
\else\fi
\paragraph{Acknowledgments}
The authors gratefully acknowledge financial support from the OpenDreamKit Horizon 2020
......
......@@ -91,6 +91,8 @@ Section~\ref{sec:viewfinder} presents the view finding algorithm restricted to t
In Section~\ref{sec:across}, we extend the algorithm to inter-library view finding discuss results of applying it to the PVS/NASA library.
Section~\ref{sec:concl} concludes the paper and discusses additional applications.
\ifshort A more extensive version of this paper with additional details can be found at~\cite{MueRabKoh:viewfinder-report18}.\else\fi
%%% Local Variables:
%%% mode: latex
%%% eval: (set-fill-column 5000)
......
......@@ -55,8 +55,6 @@ Complex expressions are of the form $\ombind{o}{x_1:t_1,\ldots,x_m:t_m}{a_1,\ldo
The bound variable context may be empty, and we write $\oma{o}{\vec{a}}$ instead of $\ombind{o}{\cdot}{\vec{a}}$.
For example, the axiom $\forall x:\cn{set},y:\cn{set}.\; \cn{beautiful}(x) \wedge y
\subseteq x \Rightarrow \cn{beautiful}(y)$ would instead be written as \[\ombind{\forall}{x:\cn{set},y:\cn{set}}{\oma{\Rightarrow}{\oma{\wedge}{\oma{\cn{beautiful}}{x},\oma{\subseteq}{y,x}},\oma{\cn{beautiful}}{y}}}\]
%For example, the second axiom ``Every subset of a beautiful set is beautiful'' (i.e. the term $\forall s,t : \cn{set\ }X.\;\cn{beautiful}(s)\wedge t \subseteq s \Rightarrow \cn{beautiful}(t)$) would be written as
%\[ \ombind{\forall}{s : \oma{\cn{set}}{X},t : \oma{\cn{set}}{X}}{\oma{\Rightarrow}{\oma{\wedge}{\oma{\cn{beautiful}}{s},\oma{\subseteq}{t,s}},\oma{\cn{beautiful}}{t}}} \]
Finally, we remark on a few additional features of the MMT language that are important for large-scale case studies but not critical to understand the basic intuitions of results.
MMT provides a module system that allows theories to instantiate and import each other. The module system is conservative: every theory can be \emph{elaborated} into one that only declares constants.
......@@ -85,7 +83,7 @@ Defined constants can be eliminated by definition expansion.
%\hline
%\end{tabular}
%\end{center}
%\end{example
%\end{example}
%\begin{oldpart}{FR: replaced with the above}
%For the purposes of this paper, we will work with the (only slightly simplified) grammar given in Figure \ref{fig:mmtgrammar}.
......@@ -131,61 +129,61 @@ Defined constants can be eliminated by definition expansion.
%
%\end{oldpart}
%\subsection{Proof Assistant Libraries in MMT}\label{sec:oaf}
%
%As part of the OAF project~\cite{OAFproject:on}, we have imported several proof assistant libraries into the MMT system. To motivate some of the design choices made in this paper, we will outline the general procedure behind these imports.
%
%\paragraph{} First, we formalize the core logical foundation of the system. We do so by using the logical framework LF~\cite{lf} (at its core a dependently-typed lambda calculus) and various extensions thereof, which are implemented in and supported by the MMT system. In LF, we can formalize the foundational primitives using the usual judgments-as-types and higher-order abstract syntax encodings -- hence theorems and axioms are represented as constants with a type $\vdash P$ for some proposition $P$, and primitive constructs like lambdas are formalized as LF-functions taking LF-lambda-expressions -- which serve as a general encoding of any variable binders -- as arguments.
%
%The resulting formalizations are then used as meta-theory for imports of the libraries of the system under consideration. This results in a theory graph as in Figure \ref{fig:oaf}.
%
%\begin{figure}[ht]\centering
% \begin{tikzpicture}
% \node (MMT) at (2,2.5) {MMT};
%
% \draw[fill=orange!40] (2,1) ellipse (1.5cm and .6cm);
% \node[color=orange] at (-3.3,1) {Logical Frameworks};
% \node (L) at (1,1) {LF};
% \node (Lx) at (3,1) {LF+X};
% \draw[arrow](MMT) -- (L);
% \draw[arrow](MMT) -- (Lx);
% \draw[arrow](L) -- (Lx);
%
% \draw[fill=red!40] (2,-.5) ellipse (3.2cm and .6cm);
% \node[color=red] at (-3.3,-.5) {Foundations};
% \node at (2,-.7) {\ldots};
%
% \draw[fill=blue!40] (0,-2.25) ellipse (1.9cm and .8cm);
%
% \node (H) at (0,-.5) {HOL Light};
% \node[color=blue!80] at (-3.5,-2) {HOL Light library};
% \node (B) at (-1,-2) {Bool};
% \node (A) at (1,-2) {Arith};
% \node (E) at (0,-2.5) {\ldots};
% \draw[arrow](L) -- (H);
% \draw[arrow](H) -- (B);
% \draw[arrow](H) -- (A);
% \draw[arrow](B) -- (A);
%
% \draw[fill=olive!40] (4,-2.25) ellipse (1.9cm and .8cm);
%
% \node (M) at (4,-.5) {PVS};
% \node[color=olive] at (-3.3,-2.5) {PVS library};
% \node (B') at (3,-2) {Booleans};
% \node (A') at (5,-2) {Reals};
% \node (E') at (4,-2.5) {\ldots};
%
% \node (A) at (1,-2) {Arith};
% \node (E) at (0,-2.5) {\ldots};
% \draw[arrow](Lx) -- (M);
% \draw[arrow](M) -- (B');
% \draw[arrow](M) -- (A');
% \draw[arrow](B') -- (A');
% \end{tikzpicture}
% \caption{A (Simplified) Theory Graph for the OAF Project}\label{fig:oaf}
%\end{figure}
\ifshort\else
\subsection{Proof Assistant Libraries in MMT}\label{sec:oaf}
As part of the OAF project~\cite{OAFproject:on}, we have imported several proof assistant libraries into the MMT system. To motivate some of the design choices made in this paper, we will outline the general procedure behind these imports.
\paragraph{} First, we formalize the core logical foundation of the system. We do so by using the logical framework LF~\cite{lf} (at its core a dependently-typed lambda calculus) and various extensions thereof, which are implemented in and supported by the MMT system. In LF, we can formalize the foundational primitives using the usual judgments-as-types and higher-order abstract syntax encodings -- hence theorems and axioms are represented as constants with a type $\vdash P$ for some proposition $P$, and primitive constructs like lambdas are formalized as LF-functions taking LF-lambda-expressions -- which serve as a general encoding of any variable binders -- as arguments.
The resulting formalizations are then used as meta-theory for imports of the libraries of the system under consideration. This results in a theory graph as in Figure \ref{fig:oaf}.
\begin{figure}[ht]\centering
\begin{tikzpicture}
\node (MMT) at (2,2.5) {MMT};
\draw[fill=orange!40] (2,1) ellipse (1.5cm and .6cm);
\node[color=orange] at (-3.3,1) {Logical Frameworks};
\node (L) at (1,1) {LF};
\node (Lx) at (3,1) {LF+X};
\draw[arrow](MMT) -- (L);
\draw[arrow](MMT) -- (Lx);
\draw[arrow](L) -- (Lx);
\draw[fill=red!40] (2,-.5) ellipse (3.2cm and .6cm);
\node[color=red] at (-3.3,-.5) {Foundations};
\node at (2,-.7) {\ldots};
\draw[fill=blue!40] (0,-2.25) ellipse (1.9cm and .8cm);
\node (H) at (0,-.5) {HOL Light};
\node[color=blue!80] at (-3.5,-2) {HOL Light library};
\node (B) at (-1,-2) {Bool};
\node (A) at (1,-2) {Arith};
\node (E) at (0,-2.5) {\ldots};
\draw[arrow](L) -- (H);
\draw[arrow](H) -- (B);
\draw[arrow](H) -- (A);
\draw[arrow](B) -- (A);
\draw[fill=olive!40] (4,-2.25) ellipse (1.9cm and .8cm);
\node (M) at (4,-.5) {PVS};
\node[color=olive] at (-3.3,-2.5) {PVS library};
\node (B') at (3,-2) {Booleans};
\node (A') at (5,-2) {Reals};
\node (E') at (4,-2.5) {\ldots};
\node (A) at (1,-2) {Arith};
\node (E) at (0,-2.5) {\ldots};
\draw[arrow](Lx) -- (M);
\draw[arrow](M) -- (B');
\draw[arrow](M) -- (A');
\draw[arrow](B') -- (A');
\end{tikzpicture}
\caption{A (Simplified) Theory Graph for the OAF Project}\label{fig:oaf}
\end{figure}
\fi
......
......@@ -57,7 +57,7 @@
\def\defemph{\textbf}
\def\MMT{\textsf{MMT}\xspace}
\usepackage[show]{ed}
\newif\ifshort\shorttrue
\newif\ifshort\shortfalse
\pagestyle{plain} % remove for final version
......@@ -102,10 +102,10 @@
\section{Inter-Library View Finding}\label{sec:across}
\input{usecase}
%\section{Low-Hanging Fruit: Other Applications}\label{sec:appl}
%\input{applications}
\ifshort\else
\section{Low-Hanging Fruit: Other Applications}\label{sec:appl}
\input{applications}
\fi
\section{Conclusion}\label{sec:concl}
\input{conclusion}
......
......@@ -12,16 +12,6 @@ PVS~\cite{pvs} is a proof assistant under active development based on a higher-o
In addition to the \emph{Prelude} library, which contains the most common domains of mathematical discourse and is shipped with PVS itself, there is a large library of formal mathematics developed and maintained by NASA~\cite{PVSlibraries:on}.
In \cite{KMOR:pvs:17}, we represent PVS as a meta-theory in MMT and implemented a translator that transforms both libraries into MMT format. We use a meta-view that embeds MitM's higher-order logic into PVS's higher-order logic and make sure that we normalize PVS-formulas in the same way as MitM-formulas.
%\begin{oldpart}{MK: this sounds like a left-over from the time we had a PVS->HOL-Light use case. I think this can just be eft out. or reduce to the last sentence and leave out the paragrpah}
%\paragraph{Formula Normalization}
%Naturally advanced features of the PVS type system such as predicate subtyping, record types, inductive types will not be part of views from MitM, which does not have corresponding features.
%Therefore, our view finder can mostly ignore them.
%
%Instead, we only have to normalize PVS formulas to the extent that they use logical features that correspond to those of MitM.
%This is particular the basic higher-order logic.
%Thus, we use a meta-view that embeds MitM's higher-order logic into PVS's higher-order logic and make sure that we normalize PVS-formulas in the same way as MitM-formulas.
%\end{oldpart}
\paragraph{Theory Structure Normalization}
PVS's complex and prevalently used parametric theories critically affect view finding because they affect the structure of theories.
For example, the theory of groups \cn{group\_def} in the NASA library has three theory parameters $(\cn T,\ast,\cn{one})$ for the signature of groups, and includes the theory \cn{monoid\_def} with the same parameters, and then declares the axioms for a group in terms of these parameters.
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment