Changes between Version 5 and Version 6 of The MiniMP Intermediate Representation


Ignore:
Timestamp:
01/08/10 17:22:52 (16 years ago)
Author:
zirkel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • The MiniMP Intermediate Representation

    v5 v6  
    1717
    1818  Local variables are local to a specific function in a specific process.  They can only be accessed within the function body.
    19   * !FormalVariable
    20  
    21       Formal variables are the formal parameters to a function.  They are a special type of local variable.
     19    * !FormalVariable
     20  Formal variables are the formal parameters to a function.  They are a special type of local variable.
    2221 * !BoundVariable
    2322
     
    6362Each statement has a single source location and a single destination location.
    6463 * !AllocateStatement
     64
     65  Used to allocate contiguous memory for an array of elements, similar to C's "malloc."  You specify the type of element and the number of elements to allocate an array of that length and element type.  An allocation statement returns a pointer to the first element in the array.
    6566 * !AssertionStatement
     67
     68  Used to input a boolean condition.  The condition will be checked, and an error returned if it cannot be shown to hold.
    6669 * !AssignmentStatement
     70
     71  Statement of the form lhs = rhs;.  Note that rhs is an expression.  Expressions are side-effect free.  In particular, they cannot involve function calls.  There is a special !InvocationStatement for dealing with function calls and assigning the returned value of the function call to a variable.
    6772 * !AssumeStatement
     73
     74  Used to add a boolean statement to the path condition.  A statement added in this was will be assumed to hold for future statements.
    6875 * !DeallocateStatement
     76
     77  A deallocate statement deallocates previously allocated memory, similar to C's "free."
    6978 * !InvocationStatement
     79
     80  Represents a statement of the form lhs = f(a0, a1, ...); or the form f(a0, a1, ...);  In the left hand side is null.
    7081 * !NoopStatement
     82
     83  A statement that does nothing.
    7184 * !ReceiveStatement
     85 
     86  A statement to receive a message.
    7287 * !SendStatement
     88
     89  A statement to send a message.
    7390== Functions ==
    7491A function specifies a number of formal parameters, or "formal variables."  In addition, it specifies a number of "proper local variables."  All of these (formal and proper locals) are referred to as "local variables."  The local variables can only be accessed within the function body.