- Timestamp:
- Dec 5, 2007, 4:03:30 PM (18 years ago)
- Author:
- ats
- Message:
-
Some post-runthrough tweaks.
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
docs/trunk/200711-tock-seminars/200711-B-tock-slides.tex
r98 r99 136 136 \begin{itemize} 137 137 \item Over/underflow on arithmetic operations 138 (追記) \item Data type conversions (e.g. INT32 $\rightarrow$ INT16) (追記ここまで) 138 139 \item Array bounds 139 (削除) \item Data type conversions (e.g. INT32 $\rightarrow$ INT16) (削除ここまで)140 140 \end{itemize} 141 141 \item Can compile out these checks when statically proven safe … … 192 192 \item Pointer for data 193 193 \item Array of sizes (one for each dimension) 194 (追記) \item Multidimensional arrays flattened to one dimension (追記ここまで) 194 195 \item Insert bounds checks into C code that accesses arrays 195 196 \end{itemize} … … 238 239 \frametitle{Mobiles} 239 240 \begin{itemize} 240 \item A \emph{mobile} is a safe (削除) (削除ここまで)reference241 \item A \emph{mobile} is a safe (追記) mutable (追記ここまで)reference 241 242 \item Regular mobiles 242 243 \begin{itemize} … … 411 412 \column{.35\textwidth} 412 413 \begin{itemize} 413 \item Compose ``routes'' as we descend the tree 414 \end{itemize} 415 \begin{lstlisting} 416 type F a = a -> m a 417 append :: 418 (F outer -> F Root) 419 -> (F inner -> F outer) 420 -> (F inner -> F Root) 421 \end{lstlisting} 422 %Old/alternate versions of the above code: 423 %append :: ((outer -> m outer) -> (Root -> m Root)) 424 % -> ((inner -> m inner) -> (outer -> m outer)) 425 % -> ((inner -> m inner) -> (Root -> m Root)) 426 427 428 %type Mod inner outer = (inner -> m inner) -> (outer -> m outer) 429 %append :: Mod outer Root -> Mod inner outer -> Mod inner Root 414 \item Compose ``paths'' as we descend the tree 415 \end{itemize} 430 416 \column{.65\textwidth} 431 417 \only<1>{\includegraphics[height=40mm]{Tock-Navigate-AST-1.png}} 432 \only<2>{\includegraphics[height=40mm]{Tock-Navigate-AST- (削除) 2 (削除ここまで).png}}418 \only<2>{\includegraphics[height=40mm]{Tock-Navigate-AST-(追記) 4 (追記ここまで).png}} 433 419 \only<3>{\includegraphics[height=40mm]{Tock-Navigate-AST-3.png}} 434 \only<4>{\includegraphics[height=40mm]{Tock-Navigate-AST- (削除) 4 (削除ここまで).png}}420 \only<4>{\includegraphics[height=40mm]{Tock-Navigate-AST-(追記) 2 (追記ここまで).png}} 435 421 \end{columns} 436 422 \end{frame} … … 462 448 \begin{lstlisting} 463 449 buildNode (While e s) route 464 = do addNode (label e) ( (削除) rout (削除ここまで)e12 route While)465 buildNode s ( (削除) rout (削除ここまで)e22 route While)450 = do addNode (label e) ((追記) chang (追記ここまで)e12 route While) 451 buildNode s ((追記) chang (追記ここまで)e22 route While) 466 452 ... 467 (削除) route12 route con f = append route (decomp (削除ここまで)2 con f return)468 (削除) route22 route con f = append route (decomp (削除ここまで)2 con return f)469 470 (削除) decomp (削除ここまで)2 :: Monad m =>453 (追記) change12 route con f = append route (modify (追記ここまで)2 con f return) 454 (追記) change22 route con f = append route (modify (追記ここまで)2 con return f) 455 456 (追記) modify (追記ここまで)2 :: Monad m => 471 457 (a0 -> a1 -> a) -> (a0 -> m a0) -> (a1 -> m a1) -> a -> m a 472 458 \end{lstlisting} 473 459 \end{frame} 474 %The types of (削除) route12 and rout (削除ここまで)e22 (TODO might be worth having on a spare slide):475 % (削除) rout (削除ここまで)e12 :: (Monad m, Typeable a0, Typeable a1, Data a) =>460 %The types of (追記) change12 and chang (追記ここまで)e22 (TODO might be worth having on a spare slide): 461 %(追記) chang (追記ここまで)e12 :: (Monad m, Typeable a0, Typeable a1, Data a) => 476 462 % ((a -> m a) -> (Root -> m Root)) -> (a0 -> a1 -> a) -> ((a0 -> m a0) -> (Root -> m root)) 477 % (削除) rout (削除ここまで)e22 :: (Monad m, Typeable a0, Typeable a1, Data a) =>463 %(追記) chang (追記ここまで)e22 :: (Monad m, Typeable a0, Typeable a1, Data a) => 478 464 % ((a -> m a) -> (Root -> m Root)) -> (a0 -> a1 -> a) -> ((a1 -> m a1) -> (Root -> m root)) 479 465 … … 492 478 \item Must be conservative -- if you can't tell it's safe, it 493 479 isn't! 480 (追記) \end{itemize} (追記ここまで) 481 (追記) \end{frame} (追記ここまで) 482 (追記) (追記ここまで) 483 (追記) \begin{frame} (追記ここまで) 484 (追記) \frametitle{Making it go faster} (追記ここまで) 485 (追記) \begin{itemize} (追記ここまで) 494 486 \item Same type of analysis can be used for optimisations 495 \begin{itemize} 496 \item e.g. Rain's automatic demobilisation 497 \end{itemize} 487 \item In occam, mobile types are explicit \\ 488 \lstinline|SOME.TYPE fixed:| \\ 489 \lstinline|MOBILE SOME.TYPE mobile:| 490 \item In Rain, everything appears mobile, and the compiler works 491 out whether objects are ever moved 498 492 \end{itemize} 499 493 \end{frame} … … 502 496 \frametitle{Parallel usage checking} 503 497 \begin{itemize} 504 \item Compiler must detect and disallow (削除) (削除ここまで)parallel usage of objects498 \item Compiler must detect and disallow (追記) unsafe (追記ここまで)parallel usage of objects 505 499 \item Annotate AST/CFG nodes with objects used 506 500 \begin{itemize} … … 612 606 genWhileC ops exp body 613 607 = do tell ["while("] 614 (削除) genExpression ops ops (削除ここまで)exp608 (追記) call ops genExpression (追記ここまで) exp 615 609 tell [")"] 616 (削除) genStatement ops ops (削除ここまで)body610 (追記) call ops genStatement (追記ここまで) body 617 611 \end{lstlisting} 618 612 \end{frame} … … 717 711 \item Use the \lstinline|$| operator to avoid nested brackets 718 712 \begin{itemize} 719 \item \lstinline|liftIO $ putStr $ "quux is " ++ (fmt $ get quux)| 713 \item \lstinline|liftIO $ putStr $ "quux is " ++ (fmt $ get quux)| \\ 714 \lstinline|liftIO (putStr ("quux is " ++ (fmt (get quux))))| 720 715 \item Adam got this from John Meacham's code\ldots 721 716 \end{itemize} … … 733 728 \frametitle{Go Go Gadget Extensions!} 734 729 \begin{itemize} 730 (追記) \item Several modules, obviously\ldots (追記ここまで) 735 731 \item \lstinline|forall| -- functions to apply operators to 736 732 numeric types in evaluator … … 765 761 \item Sometimes GHC can infer the right type, but a human can't~ 766 762 \begin{itemize} 763 (追記) \item We use lots of \lstinline|where| clauses (追記ここまで) 767 764 \item Would be nice to be able to ask GHCI about 768 definitions in (削除) \lstinline|where| clauses (削除ここまで)765 definitions in(追記) side them (追記ここまで) 769 766 \end{itemize} 770 767 \item We often resort to trial and error … … 817 814 \item Support for more occam-pi features 818 815 \item ETC backend, for Transterpreter 819 \item Usage checking on arrays 820 \item All sorts of language experimentation 816 \item Better usage checking 817 \item Language experimentation 818 \begin{itemize} 819 \item Rain 820 \item occam enhancements 821 \end{itemize} 821 822 \end{itemize} 822 823 \end{frame}
Note:
See TracChangeset
for help on using the changeset viewer.