\documentstyle[lslide,a4wide]{harticle}

\title{LINT}
\author{±Ç ¹ü ÁØ}
\organization{SPARCS} 
\date{1993³â 7¿ù 21ÀÏ}

\addtolength{\textheight}{-0.5in}
\verttop
\shadowframe

\newenvironment{example}{\begin{normalsize} \begin{center} \begin{tabular}{|c|} \hline \\ \begin{minipage}{12cm}}{\end{minipage} \\ \\ \hline \end{tabular} \end{center} \end{normalsize}} 

\begin{document}

\titlepage

\begin{slide}
\subsection{{\tt lint} --- a Program Verifier for C}
\begin{itemize}
	\item {\tt lint} vs. {\tt cc} --- Verifier vs. Compiler
	\item Using {\tt lint}
\end{itemize}

\begin{example}
\begin{verbatim}
% lint    file1.c file2.c
% lint -p file1.c file2.c
% lint -h file1.c file2.c
\end{verbatim}
\end{example}
\vspace{5mm}

\begin{itemize}
	\item Philosophy
	\begin{itemize}
		\item {\tt lint}°¡ Ã£À» ¼ö ¾ø´Â Á¤º¸
		\item {\em xxx} might be a bug
	\end{itemize}
	\item Unused Variables and Functions
	\begin{itemize}
		\item Defined but not otherwise mentioned
		\item {\tt extern}À¸·Î Á¤ÀÇµÈ °Íµé
		\item {\tt -x} ¿É¼Ç: unused extern variable °Ë»ö
		\item {\tt -v} ¿É¼Ç: unused argument ¹«½Ã (register?)
		\item {\tt -u} ¿É¼Ç: ¸ðµÎ ¹«½Ã
	\end{itemize}
	\item Set/Used Information
	\begin{itemize}
		\item ÃÊ±â°ª ÁöÁ¤ Àü¿¡ »ç¿ëµÈ °æ¿ì
		\item ÃÊ±â°ª ÁöÁ¤ÈÄ ÀüÇô »ç¿ëµÇÁö ¾ÊÀº °æ¿ì
		\item physical appearance¸¸ check
		\item local º¯¼ö¸¸ check
	\end{itemize}
	\item Flow of Control
	\begin{itemize}
		\item Àý´ë·Î ½ÇÇàµÉ ¼ö ¾ø´Â ºÎºÐ
		\item {\tt goto}, {\tt break}, {\tt continue}, {\tt return}
		\item ¹«ÇÑ ·çÇÁÀÇ ¾Æ·¡ÂÊ
		\item returnÇÏÁö ¾Ê´Â call? --- {\tt exit()}
		\item unreachable {\tt break} --- {\tt -b} ¿É¼Ç
	\end{itemize}
	\item Function Values
	\begin{itemize}
		\item ¾²ÀÌÁö ¾Ê´Â return °ª
		\item ¾µ ¼ö ¾ø´Â function °ª
		\item {\tt return({\em expr});}°ú {\tt return;}
	\end{itemize}
\end{itemize}

\begin{example}
\begin{verbatim}
f ( a ) {
        if ( a )
                return ( 3 );
        g ();
}
\end{verbatim}
\end{example}

\begin{itemize}
	\item Type Checking
	\begin{itemize}
		\item binary operators and implied assignments
		\item structure (union) selection operators
		\item definition and uses of functions
		\item use of enumerations
	\end{itemize}
	\item Type Casts
	\begin{itemize}
		\item ÇÁ·Î±×·¡¸ÓÀÇ ÀÇµµ¸¦ Á¤È®È÷ Ç¥Çö
		\item {\tt -c} ¿É¼Ç: type castingµµ report
	\end{itemize}
\end{itemize}
\end{slide}

\begin{slide}
\begin{itemize}
	\item Nonportable Character Use
\end{itemize}

\begin{example}
\begin{verbatim}
char c;
...
if ( (c = getchar()) > 0 ) ...
\end{verbatim}
\end{example}

\begin{itemize}
	\item Assignments of Longs to Ints
	\begin{itemize}
		\item {\tt -a} ¿É¼ÇÀ¸·Î È°¼ºÈ­
	\end{itemize}
	\item Strange Constructions
	\begin{itemize}
		\item {\tt -h} ¿É¼ÇÀ¸·Î È°¼ºÈ­
		\item null effect
		\item degenerate unsigned comparison
		\item constant in conditional context
		\item operator precedence
		\item variables redeclared in inner blocks
	\end{itemize}
	\item Pointer Alignment
	\begin{itemize}
		\item possible pointer alignment problem
		\item {\tt -p} ¶Ç´Â {\tt -h} ¿É¼Ç
	\end{itemize}
	\item Multiple Uses and Side Effects
	\begin{itemize}
		\item function argumentÀÇ evaluation order
		\item side effects°¡ ÀÖ´Â operator
	\end{itemize}
\end{itemize}
\end{slide}

\begin{slide}
\begin{itemize}
	\item Shutting {\tt lint} Up
	\begin{itemize}
		\item ÇÁ·Î±×·¡¸Ó°¡ ´õ ¶È¶ÈÇÒ ¶§
		\item {\tt /*NOTREACHED*/}
		\item {\tt /*ARGSUSED*/}
		\item {\tt /*VARARGS*/}
		\item {\tt /*VARARGS2*/}
		\item {\tt /*LINTLIBRARY*/}
	\end{itemize}
	\item Library Declaration Files
	\item {\tt lint} Options
\end{itemize}

\begin{center}
\begin{tabular}{|c|l|}
\hline
{\tt a} & Report assignments of {\tt long} to {\tt int} or shorter \\
{\tt b} & Report unreachable {\tt break} statements \\
{\tt c} & Complain about questionable casts \\
{\tt h} & Perform heuristic checks \\
{\tt n} & Do not do library checking \\
{\tt p} & Perform portability checks \\
{\tt s} & Same as {\tt h} (for historical reasons) \\
{\tt u} & Don't report unused or undefined externals \\
{\tt v} & Don't report unused arguments \\
{\tt x} & Report unused external declarations \\
\hline
\end{tabular}
\end{center}
	
\end{slide}
\end{document}
