Context Navigation


Changeset 89 for docs


Ignore:
Timestamp:
Dec 4, 2007, 11:41:28 PM (18 years ago)
Author:
neil.c.c.brown
Message:

Tidied up the usage checking section; simplified the Haskell code and added an extra piece of explanation to the second usage checking slide.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/trunk/200711-tock-seminars/200711-B-tock-slides.tex

    r88 r89
    453453 \item Detect parallel usage of objects
    454454 \item Use generics to label CFG nodes with variables read/written to
    455(削除) \end (削除ここまで){itemize}
    456\begin{lstlisting}
    457type UsedVars = ([String], [String]) -- written, read
    458
    459getUsedVars (Assign _ (VarList lhvs) rhs)
    460 = (lhvs, map getJustVar (listify isJustVar rhs))
    461
    462getJustVar (JustVar v) = v
    463isJustVar (JustVar _) = True
    464(削除) isJustVar _ = Fals (削除ここまで)e
    465\end{lstlisting}(削除) (削除ここまで)
    466%FIXME: "The code snippet is short, but I worry that it is not very
    467%understandable"
    468\(削除) end{frame} (削除ここまで)
    455(追記) \begin (追記ここまで){itemize}
    456 \item For example, getting all variables read in an expression
    457 \end{itemize}
    458\end{itemize}
    459\begin{lstlisting}
    460getVariable :: Variable -> Bool
    461getVariable _ = True
    462
    463getAllVariables :: Expression -> [Variable]
    464(追記) getAllVariables = listify getVariabl (追記ここまで)e
    465\end{lstlisting}(追記) (追記ここまで)
    466\end{frame}
    467
    468\(追記) occamsettings (追記ここまで)
    469469
    470470\begin{frame}
    472472\begin{itemize}
    473473 \item As in other occam compilers, array indexing makes usage checking hard
    474(追記) \begin{itemize} (追記ここまで)
    475(追記) \item E.g. can we be sure \lstinline|xs[y]| is distinct from \lstinline|xs[z]| at compile-time? (追記ここまで)
    476(追記) \end{itemize} (追記ここまで)
    474477 \item For now, this problem has been skipped
    475478\end{itemize}
    476479\end{frame}
    480(追記) (追記ここまで)
    481(追記) \haskellsettings (追記ここまで)
    477482
    478483%FIXME: multipass checking
Note: See TracChangeset for help on using the changeset viewer.

AltStyle によって変換されたページ (->オリジナル) /