LARA

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
sav07_lecture_20 [2007/06/05 19:22]
vkuncak
sav07_lecture_20 [2008/05/22 13:45]
vkuncak
Line 44: Line 44:
   - must follow protocol: ​ (open (read+write)* close)*   - must follow protocol: ​ (open (read+write)* close)*
   - must follow protocol: (startLog stopLog)*   - must follow protocol: (startLog stopLog)*
- 
- 
- 
- 
  
 ==== Semantics for language with procedure calls ==== ==== Semantics for language with procedure calls ====
Line 125: Line 121:
  
 When a procedure call is encountered,​ it is replaced by the statements of the procedure (so the procedure code is inlined with the code of the callee). A problem arises when the procedure being inlined is recursive. One approach to dealing with this situation is to inline the recursive procedure a few times, and then treat the recursive call as a havoc statement (as described above). However, even if this is done, inlining increases the size of the code exponentially. When a procedure call is encountered,​ it is replaced by the statements of the procedure (so the procedure code is inlined with the code of the callee). A problem arises when the procedure being inlined is recursive. One approach to dealing with this situation is to inline the recursive procedure a few times, and then treat the recursive call as a havoc statement (as described above). However, even if this is done, inlining increases the size of the code exponentially.
- 
- 
  
 === Treat procedure calls as goto statements === === Treat procedure calls as goto statements ===