Changes between Version 2 and Version 3 of Challenge


Ignore:
Timestamp:
03/11/19 15:59:37 (7 years ago)
Author:
siegel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Challenge

    v2 v3  
    88Be sure to include the appropriate headers.
    99
    10 Boolean type: `_Bool`.  Values: 0 and 1.
    11   (Same as C11).
     10
    1211
    1312Semaphore operations:
     
    1716(`#define` ...)
    1817
     18
     19 `_Bool`::  The Boolean type.  Values: 0 and 1.  This is the same as C11.
     20
    1921 `$proc`::
    2022  the process type.  A value of this type refers to a process.
    2123
    2224 `$spawn stmt`::
    23   creates a new process executing the statement.  Returns a value of type `$proc`
    24 referencing the new process.
     25 creates a new process executing the statement.  Returns a value of type `$proc`
     26 referencing the new process.
    2527
    2628 `$wait($proc p)`::
    27   blocks until process p terminates
     29 blocks until process p terminates
    2830
    2931 `$parfor (int i:a..b) stmt`::
    3032  spawns threads, one for each i in the range a..b, each executing `stmt`.
    31 Waits for them to terminate.
     33 Waits for them to terminate.
    3234
    3335 `$assert(expr)`::
    34 An assertion.  This is treated exactly the same as C's `assert`, except with
    35 the latter you must include `assert.h`.    CIVL-C has a richer assertion
    36 language that C---e.g., you can use quantifiers.
     36 An assertion.  This is treated exactly the same as C's `assert`, except with
     37 the latter you must include `assert.h`.    CIVL-C has a richer assertion
     38 language that C---e.g., you can use quantifiers.
    3739
    38 `$forall` and `$exists`::
    39 Mean what you think.   Here are some examples to show the syntax:
     40 `$forall` and `$exists`::
     41 Mean what you think.   Here are some examples to show the syntax:
    4042 * `$forall (double x | x>1) x>0` -- for all doubles x that are greater than 1, x is greater than 0
    4143 * `$forall (int i | a<=i && i<=b) p(i)` -- for all i between a and b (inclusive), p(i) holds
     
    9496concurrently in separate threads.  Used to avoid deadlocks that could
    9597result if all processes do MPI_Send; MPI_Recv.
    96