| | 73 | == Library Functions == |
| | 74 | |
| | 75 | Special functions that are currently included in the grammar can instead be treated just like any other function and "linked in" at a later stage. This will simplify the grammar and front-end. Functions that can be removed include {{{send}}}, {{{recv}}}, {{{allocate}}}, {{{deallocate}}}. |
| | 76 | |
| | 77 | When {{{ModelIF.complete}}} is invoked, it will look for functions which are called but not defined. It will then look through a standard library for a function of the correct name, and add that function to the process containing the call. |
| | 78 | |
| | 79 | Note: {{{allocate}}} takes a type argument, so we should also add to the grammar a new expression {{{sizeof(type)}}}. The semantics module will associate a special symbolic constant to this expression, corresponding to the type (e.g., {{{SIZEOF_INT}}}). We can then replace our {{{allocate}}} and {{{deallocate}}} with the standard C functions {{{malloc}}} and {{{free}}} |