         Edinburgh IMP77 Compiler - Version 8.4

    1  %begin
    2  
    3    %integerfn use pointer(%integername n)
    4      %result = n
    5    %end
    6    
    7    %integerfn use scalar(%integer n)
    8      %result = n
    9    %end
   10    
   11    %integermap map scalar(%integer n)
   12      %owninteger local
   13      local = n;
   14      %result == local
   15    %end
   16  
   17    %routine increment(%integername var)
   18      var = var + 1
   19    %end
   20    
   21    %integername ptr
   22  
   23    %integer i
   24  
   25    i = ptr
   26  
   27    i = ptr+ptr
   28  
   29    i = use scalar(ptr)
   30  
   31    i = use scalar(ptr+ptr)
   32  
   33    i = use scalar(ptr)+use scalar(ptr)
   34  
   35    ptr = i
   36  
   37    ptr = i+ptr
   38  
   39    ptr = use scalar(i)
   40  
   41    ptr = use scalar(ptr)
   42  
   43    ptr = use scalar(ptr+ptr)
   44  
   45    ptr = -ptr
   46    
   47    i = use pointer(ptr)
   48  
   49    i = use pointer(ptr)+use pointer(ptr)
   50  
   51    ptr = use pointer(i)
   52  
   53    ptr = use pointer(ptr)
   54  
   55    ->done %if ptr < ptr
   56  
   57    ->done %if ptr < i
   58  
   59    ->done %if ptr < use scalar(i)
   60  
   61    ->done %if ptr < use scalar(ptr)
   62  
   63    ->done %if ptr < use pointer(ptr)
   64  
   65    ->done %if i + ptr < i + use scalar(i)
   66  
   67    ->done %if i + ptr < i + use scalar(ptr)
   68  
   69    ->done %if i + ptr < i + use pointer(ptr)
   70  
   71    ->done %if use scalar(i) < use scalar(i)
   72  
   73    ->done %if use scalar(i) < use pointer(i)
   74  
   75    ->done %if use pointer(i) < use pointer(i)
   76  
   77    ->done %if i + use scalar(i) < use scalar(i)
   78  
   79    ->done %if i + use scalar(i) < use pointer(i)
   80  
   81    ->done %if i + use pointer(i) < use pointer(i)
   82  
   83    ->done %if ptr + use scalar(i) < use scalar(i)
   84  
   85    ->done %if ptr + use scalar(i) < use pointer(i)
   86  
   87    ->done %if ptr + use pointer(i) < use pointer(i)
   88  
   89    ->done %if i + ptr < i + map scalar(i)
   90  
   91    ->done %if i + ptr < i + map scalar(ptr)
   92  
   93    map scalar(4) = i
   94  
   95    map scalar(i) = i
   96  
   97    map scalar(ptr) = i
   98  
   99    map scalar(i + ptr) = i
  100  
  101    increment(i)
  102  
  103    increment(ptr)
  104  
  105    increment(map scalar(0))
  106    
  107    increment(map scalar(i))
  108    
  109    increment(map scalar(ptr))
  110    
  111    increment(map scalar(map scalar(0)))
  112    
  113  done:
  114  %endofprogram

   62 Statements compiled
