Newsgroups: comp.sys.transputer
From: kr@isf-n1.isf.rwth-aachen.de (Oliver Kropla)
Subject: Problem with OCCAM Toolset internal Error
Organization: ISF, RWTH-Aachen
Date: 3 Feb 1994 09:23:48 GMT
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Message-ID: <kr.106.0@isf-n1.isf.rwth-aachen.de>

Hi,
I am working on a projekt with the INMOS OCCAM Toolset D7205.
Yesterday I tried to use an int array element as counter in a 
counted array protocol like in the following example:

  PROTOCOL p IS INT::[]<type>:   -- <type> is any type
  CHAN OF p IS c:
  
  [n]INT size:   
  [m]<type> a:      -- <type> is the same type as above

  c ? size[i]::a    -- i is any subscript of size in the range [0,n-1]

The compiler (oc) doesn't agree to my idea. But instead of some 
'normal' error messages I get the following (196 is the source 
line with the channel input):

          <... some make stuff ...>

oc call:  oc r /t8 /h /o r.t8h
error:    internal-error-oc-r.occ(196)- Unknown tag ARRAYSUB in texp_main
          Fatal-oc- Internal error - forcing stack dump for debugging
          ABNORMAL TERMINATION

          ** error 3 ** deleting r.t8h

What now? I can replace the indexed array 'size[i]' with a simple INT. 
But I found no hint in my OCCAM handbooks, that an INT from an array 
is not allowed here. Any hint what might be wrong besides the compiler?

--
Oliver Kropla
kr@isf-n1.isf.rwth-aachen.de

