Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Giuseppe Castagna
occurrence-typing
Commits
f584c9b5
Commit
f584c9b5
authored
Jul 09, 2019
by
Giuseppe Castagna
Browse files
less space
parent
6b6e6629
Changes
1
Hide whitespace changes
Inline
Side-by-side
code_table.tex
View file @
f584c9b5
\lstset
{
language=[Objective]Caml,columns=fixed,basicstyle=
\linespread
{
0.
55
}
\ttfamily\scriptsize
,aboveskip=-0.5em,belowskip=-1em,xleftmargin=-0.5em
}
\lstset
{
language=[Objective]Caml,columns=fixed,basicstyle=
\linespread
{
0.
43
}
\ttfamily\scriptsize
,aboveskip=-0.5em,belowskip=-1em,xleftmargin=-0.5em
}
\begin{table}
\begin{table}
{
\scriptsize
{
\scriptsize
\begin{tabular}
{
|@
{
\,
}
c@
{
\,
}
|p
{
0.48
\textwidth
}
@
{}
|@
{
\,
}
p
{
0.48
\textwidth
}
@
{
\,
}
|
}
\begin{tabular}
{
|@
{
\,
}
c@
{
\,
}
|p
{
0.48
2
\textwidth
}
@
{}
|@
{
\,
}
p
{
0.48
2
\textwidth
}
@
{
\,
}
|
}
\hline
\hline
&
Code
&
Inferred type
\\
&
Code
&
Inferred type
\\
\hline
\hline
...
@@ -111,8 +111,7 @@ let test_3 = f nil nil
...
@@ -111,8 +111,7 @@ let test_3 = f nil nil
\begin{lstlisting}
\begin{lstlisting}
type Document =
{
nodeType=9 ..
}
type Document =
{
nodeType=9 ..
}
and Element =
{
nodeType=1,
and Element =
{
nodeType=1,
childNodes = NodeList
childNodes = NodeList ..
}
..
}
and Text =
{
nodeType=3,
and Text =
{
nodeType=3,
isElementContentWhiteSpace=Bool
isElementContentWhiteSpace=Bool
..
}
..
}
...
@@ -125,10 +124,10 @@ let is_empty_node = fun (x : Node) ->
...
@@ -125,10 +124,10 @@ let is_empty_node = fun (x : Node) ->
x.isElementContentWhiteSpace
x.isElementContentWhiteSpace
else
else
if x.childNodes is Nil then true else false
if x.childNodes is Nil then true else false
\end{lstlisting}
&
\vspace
{
23
mm
}
\end{lstlisting}
&
\vspace
{
19
mm
}
$
(
\Keyw
{
Document
}
\to\False
)
~
\land
$
\newline
$
(
\Keyw
{
Document
}
\to\False
)
~
\land
$
\newline
$
(
\orecord
{
\texttt
{
nodeType
}
\,
{
=
}
\,
1
,
\texttt
{
childNodes
}
\,
{
=
}
\,\Keyw
{
Nil
}
}
\to\True
)
~
\land
$
\newline
$
(
\orecord
{
\texttt
{
nodeType
}
\,
{
=
}
\,
1
,
\texttt
{
childNodes
}
\,
{
=
}
\,\Keyw
{
Nil
}
}
\to\True
)
~
\land
$
\newline
$
(
\orecord
{
\texttt
{
nodeType
}
\,
{
=
}
\,
1
,
\texttt
{
childNodes
}
\,
{
=
}
\,
(
\Keyw
{
Node
}
,
\Keyw
{
NodeList
}
)
}
\
,
{
\to
}
\,
\False
)
~
\land
$
\newline
$
(
\orecord
{
\texttt
{
nodeType
}
\,
{
=
}
\,
1
,
\texttt
{
childNodes
}
\,
{
=
}
\,
(
\Keyw
{
Node
}
,
\Keyw
{
NodeList
}
)
}
\
to
\False
)
~
\land
$
\newline
$
(
\Keyw
{
Text
}
\to\Bool
)
~
\land
$
\newline
(omitted redundant arrows)
$
(
\Keyw
{
Text
}
\to\Bool
)
~
\land
$
\newline
(omitted redundant arrows)
\\\hline
\\\hline
9
&
\begin{lstlisting}
9
&
\begin{lstlisting}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment