Changeset 89
- 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 453 453 \item Detect parallel usage of objects 454 454 \item Use generics to label CFG nodes with variables read/written to 455 (削除) \end (削除ここまで){itemize}456 \begin{lstlisting} 457 type UsedVars = ([String], [String]) -- written, read 458 459 getUsedVars (Assign _ (VarList lhvs) rhs) 460 = (lhvs, map getJustVar (listify isJustVar rhs)) 461 462 getJustVar (JustVar v) = v 463 isJustVar (JustVar _) = True 464 (削除) isJustVar _ = Fals (削除ここまで)e465 \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} 460 getVariable :: Variable -> Bool 461 getVariable _ = True 462 463 getAllVariables :: Expression -> [Variable] 464 (追記) getAllVariables = listify getVariabl (追記ここまで)e 465 \end{lstlisting}(追記) (追記ここまで) 466 \end{frame} 467 468 \(追記) occamsettings (追記ここまで) 469 469 470 470 \begin{frame} … … 472 472 \begin{itemize} 473 473 \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} (追記ここまで) 474 477 \item For now, this problem has been skipped 475 478 \end{itemize} 476 479 \end{frame} 480 (追記) (追記ここまで) 481 (追記) \haskellsettings (追記ここまで) 477 482 478 483 %FIXME: multipass checking
Note:
See TracChangeset
for help on using the changeset viewer.