-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathJavaType.tex
More file actions
135 lines (112 loc) · 4.44 KB
/
JavaType.tex
File metadata and controls
135 lines (112 loc) · 4.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
\documentclass{paper}
\usepackage{amsmath}
\usepackage{amsfonts}
%
\usepackage{paralist}
\usepackage{float}
\usepackage{url}
\usepackage{hyperref}
\usepackage[capitalise]{cleveref}
\usepackage[utf8]{inputenc}
\usepackage[autostyle=false, style=english]{csquotes}
\usepackage{listings}
\usepackage[justification=centering]{caption} % centre-align listings captions
\usepackage{lstlinebgrd}
\usepackage{graphicx}
\usepackage{ucs}
\usepackage{fixltx2e}
\usepackage{subcaption}
\usepackage{fancyvrb}
\usepackage{xspace}
%\usepackage{fullpage}
\usepackage{stmaryrd}
% Force all figures & tables to use bottom captions
%\floatstyle{plain}
%\restylefloat{figure}
%\restylefloat{table}
% Make all figures and tables absolutely-positioned by default
%\floatplacement{figure}{H}
%\floatplacement{table}{H}
% !! Hacky solution !! Reduce the size of verbatim font to prevent overflow
% \fvset{fontsize=\tiny}
%\MakeOuterQuote{"}
\hypersetup{%
colorlinks,
citecolor=black,
filecolor=black,
linkcolor=black,
urlcolor=black
}
\newcommand{\todo}[1]{%
\begin{center}%
\fbox{%
\begin{minipage}{0.95\columnwidth}\small
\textcolor{red}{\textbf{TODO:} #1}
\end{minipage}%
}
\end{center}
}
\newcommand{\keyword}[1]{\mathsf{#1}}
\newcommand{\kwboolean}{\keyword{boolean}}
\newcommand{\kwint}{\keyword{int}}
\newcommand{\kwfloat}{\keyword{float}}
\newcommand{\kwdouble}{\keyword{double}}
\newcommand{\kwpublic}{\keyword{public}}
\newcommand{\kwprivate}{\keyword{private}}
\newcommand{\kwprotected}{\keyword{protected}}
\newcommand{\kwstatic}{\keyword{static}}
\newcommand{\kwfinal}{\keyword{final}}
\newcommand{\kwnull}[0]{\keyword{null}}
\newcommand{\kwnew}[0]{\keyword{new}}
\newcommand{\kwextends}[0]{\keyword{extends}}
\newcommand{\kwclass}[0]{\keyword{class}}
\newcommand{\kwthis}[0]{\keyword{this}}
\newcommand{\kwsuper}[0]{\keyword{super}}
\newcommand{\kwif}[0]{\keyword{if}}
\newcommand{\kwthen}[0]{\keyword{then}}
\newcommand{\kwelse}[0]{\keyword{else}}
\newcommand{\kwskip}[0]{\keyword{skip}}
\newcommand{\kwfielddef}{\keyword{field\mbox{-}def}}
\newcommand{\kwmethoddef}{\keyword{method\mbox{-}def}}
\newcommand{\kwarglist}{\keyword{arg\mbox{-}list}}
\newcommand{\kwloc}[1]{\keyword{loc}(#1)}
\newcommand{\tuple}[1]{\langle #1 \rangle}
\newcommand{\suc}{\texttt{succ}}
\newcommand{\nxt}{\texttt{next}}
\newcommand{\LT}{\longrightarrow}
\newcommand{\set}[1]{\{#1\}}
\newcommand{\sem}[1]{\llbracket #1\rrbracket}
\newcommand{\T}{\mathcal{T}}
%%%%%% NOTE: Page 15-page limit for SAS'18 (excl. bib+app) %%%%%%
%
\begin{document}
\title{A Simple Type-Based Points-to Analysis}
\author{\today}
\maketitle
We take a simplified syntax from the website~\cite{amoeller-web} for the Java Programming language, specified in EBNF.
\begin{figure}[!htbp]\centering
\begin{tabular}[c]{lll}
$prog$&$::=$&$C^*$\\
$C$&$::=$&$\kwclass\ A\ [\kwextends\ B] \ \{\kwfielddef;\ \kwmethoddef\}$\\
$\kwfielddef$&$::=$&$f{=}e\ |\ \kwfielddef; \kwfielddef$\\
$\kwmethoddef$&$::=$&$m(x) \ \{s\}\ |\ \kwmethoddef; \kwmethoddef$\\
$s$&$::=$&$\ \epsilon |\ x {=} e \ |\ x.f{=}x \ |\ x.m(\kwarglist)$ \\
&&$|\ \kwif \ x \ \kwthen \ s \ \kwelse \ s \ |\ s;s$\\
$e$&$::=$&$c \ |\ x \ |\ x.f\ |\ \kwnew \ A(\kwarglist)\ |\ x.m(\kwarglist)$\\
$\kwarglist$&$::=$&$e\ |\ e,\kwarglist$\\
$c$&$::=$&$n$ where $n\in\mathbb{R}$\\
\end{tabular}
\caption{The starting syntax of Java. \label{fig:syntax}}
\end{figure}
For this simplified Java syntax, we omit some of the basic Java syntax, such as basic types (e.g., $\kwboolean$, $\kwint$, $\kwdouble$), constructor and field modifiers (e.g., $\kwpublic$, $\kwprivate$, $\kwstatic$, $\kwfinal$), the interface structure, exception handling, and specialized keywords (e.g., $\kwthis$, $\kwsuper$). We assume the ways of handling such structures can be added straightforwardly on this minimized syntax. Moreover, we assume that a given program has always correct syntax, otherwise it will not pass compilation. We assume values are within ranges of their defined variables, and we ignore the cases of overflows.
%%% objects are location based, points-to algrithm Andersen-styled, filed sensitive and object sensitive (not flow- or context-sensitive)
\begin{thebibliography}{4}
\bibitem{amoeller-web}
A. M$\o$ller.
https://users-cs.au.dk/amoeller/RegAut/JavaBNF.html
\bibitem{andersen-94}
L. O. Andersen.
Program Analysis and Specialization for the C Programming Language.
PhD thesis, University of Copenhagen, DIKU, 1994.
\end{thebibliography}
\end{document}