Changeset f6f0d06f for doc/papers


Ignore:
Timestamp:
Jun 7, 2018, 11:12:28 AM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
arm-eh, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr
Children:
b4e1876
Parents:
214e8da
Message:

Pass 1 up to 3.1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/papers/concurrency/Paper.tex

    r214e8da rf6f0d06f  
    217217\lstMakeShortInline@%
    218218
     219\newcommand{\commenttd}[1]{{\color{red}{Thierry : #1}}}
     220
    219221\let\OLDthebibliography\thebibliography
    220222\renewcommand\thebibliography[1]{
     
    308310`&`r3 = &y; `&&`r3 = &`&`r4;             // change r1, r2: cancel implicit dereferences (&*)**r3, (&(&*)*)*r3, &(&*)r4
    309311\end{cfa}
    310 A reference is a handle to an object, like a pointer, but is automatically dereferenced the specified number of levels.
     312A reference is a handle to an object, like a pointer, but is automatically dereferenced by the specified number of levels.
    311313Referencing (address-of @&@) a reference variable cancels one of the implicit dereferences, until there are no more implicit references, after which normal expression behaviour applies.
    312314
     
    478480
    479481The signature feature of \CFA is parametric-polymorphic routines~\cite{} with routines generalized using a @forall@ clause (giving the language its name), which allow separately compiled routines to support generic usage over multiple types.
    480 For example, the following sum routine works for any type that supports construction from 0 and addition:
     482For example, the following sum routine works for any type that supports construction from 0 and addition \commenttd{constructors have not been introduced yet.}:
    481483\begin{cfa}
    482484forall( otype T | { void `?{}`( T *, zero_t ); T `?+?`( T, T ); } ) // constraint type, 0 and +
     
    530532{
    531533        VLA  x,            y = { 20, 0x01 },     z = y; $\C{// z points to y}$
    532         //    x{};         y{ 20, 0x01 };          z{ z, y }; 
     534        //    x{};         y{ 20, 0x01 };          z{ z, y };
    533535        ^x{};                                                                   $\C{// deallocate x}$
    534536        x{};                                                                    $\C{// reallocate x}$
     
    567569The resulting execution system now follows a cooperative threading-model, called \newterm{non-preemptive scheduling}.
    568570
    569 Because the scheduler is special, it can either be a stackless or stackfull coroutine.
     571Because the scheduler is special, it can either be a stackless or stackfull coroutine. \commenttd{I dislike this sentence, it seems imply 1-step vs 2-step but also seems to say that some kind of coroutine is required, which is not the case.}
    570572For stackless, the scheduler performs scheduling on the stack of the current coroutine and switches directly to the next coroutine, so there is one context switch.
    571573For stackfull, the current coroutine switches to the scheduler, which performs scheduling, and it then switches to the next coroutine, so there are two context switches.
    572 A stackfull scheduler is often used for simplicity and security, even through there is a slightly higher runtime-cost.
     574A stackfull scheduler is often used for simplicity and security, even through there is a slightly higher runtime-cost. \commenttd{I'm not a fan of the fact that we don't quantify this but yet imply it is negligeable.}
    573575
    574576Regardless of the approach used, a subset of concurrency related challenges start to appear.
     
    775777};
    776778void main( Format & fmt ) with( fmt ) {
    777         for ( ;; ) {   
     779        for ( ;; ) {
    778780                for ( g = 0; g < 5; g += 1 ) {      // group
    779781                        for ( b = 0; b < 4; b += 1 ) { // block
Note: See TracChangeset for help on using the changeset viewer.