Changes between Version 5 and Version 6 of The MiniMP Intermediate Representation
- Timestamp:
- 01/08/10 17:22:52 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
The MiniMP Intermediate Representation
v5 v6 17 17 18 18 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. 22 21 * !BoundVariable 23 22 … … 63 62 Each statement has a single source location and a single destination location. 64 63 * !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. 65 66 * !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. 66 69 * !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. 67 72 * !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. 68 75 * !DeallocateStatement 76 77 A deallocate statement deallocates previously allocated memory, similar to C's "free." 69 78 * !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. 70 81 * !NoopStatement 82 83 A statement that does nothing. 71 84 * !ReceiveStatement 85 86 A statement to receive a message. 72 87 * !SendStatement 88 89 A statement to send a message. 73 90 == Functions == 74 91 A 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.
