--* From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Sun May 23 21:40:39 1993
--* Received: from yktvmv2.watson.ibm.com by radical.watson.ibm.com (AIX 3.2/UCB 5.64/900524)
--*           id AA16735; Sun, 23 May 1993 21:40:39 -0400
--* X-External-Networks: yes
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 8679; Sun, 23 May 93 21:41:14 EDT
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.SANTAS.NOTE.YKTVMV.0867.May.23.21:41:13.-0400>
--*           for asbugs@watson; Sun, 23 May 93 21:41:14 -0400
--* Received: from bernina.ethz.ch by watson.ibm.com (IBM VM SMTP V2R3) with TCP;
--*    Sun, 23 May 93 21:41:12 EDT
--* Received: from neptune by bernina.ethz.ch with SMTP inbound id <10659-0@bernina.ethz.ch>; Mon, 24 May 1993 03:40:28 +0200
--* From: Philip Santas <santas@inf.ethz.ch>
--* Received: from rutishauser.inf.ethz.ch (rutishauser-gw.inf.ethz.ch) by neptune id AA04439; Mon, 24 May 93 03:40:22 +0200
--* Date: Mon, 24 May 93 03:40:20 +0200
--* Message-Id: <9305240140.AA25696@rutishauser.inf.ethz.ch>
--* Received: from ru7.inf.ethz.ch.rutishauser by rutishauser.inf.ethz.ch id AA25696; Mon, 24 May 93 03:40:21 +0200
--* To: asbugs@watson.ibm.com
--* Subject: type inference bug
--* Cc: bronstein

--@ Fixed  by:  SSD   Wed Oct 20 10:34:07 1993 
--@ Tested by:  none 
--@ Summary:    abcheck now catches 0$P as an improper package call 


Grrr... The compiler aborts during the type inference process!
Philip

--------------bug.as----------------------------

#include "aslib.as"

SI ==> SingleInteger

LL(T:with Object): with
     at: (List T, SI) -> T
  == add
      import List T
      at(ll:List T, i:SI):T ==
                i<=0 => first nil
                empty? ll => first nil
                i=1 => first ll
                at(rest ll, i-1)

FO ==> with
     eval: %->(List List SI)->SI

Se: FO
  == add
      Rep ==> (List List SI)->SI
      import Rep
      eval(x:%):(List List SI)->SI == rep x

PA ==> with
     parse: String -> %

Pa(F: FO): PA
   == add
       Rep ==> F
       import Rep

SP ==> with
      dim: SI
      set: (SI,SI,String)->()
      eval: ()->()
      get: (SI,SI)->(String,SI)

Sp(F:FO):SP
   == add
       P ==> Pa F
       Rep ==> Pa F
       import Rep

       List2(T: with Object): with
            init:  (SI,SI,T) -> (List List T)
            update: (List List T,SI,SI,T) -> ()
            at: (List List T, SI,SI)->T
         == add
             import List T
             import List List T
             import LL T
             import LL List T
             init(x:SI,y:SI,elem:T): (List List T) ==
                [[elem for i in 1..y] for i in 1..x]
             update(ll:(List T), y:SI,elem:T):() ==
                y <=0 => ()
                y = 1 => (setFirst!(ll, elem); ())
                update(rest ll, y-1,elem)
             update(ll:(List List T), x:SI,y:SI,elem:T):() ==
                update(at(ll,x),y,elem)
             at(ll:List List T,i:SI,j:SI):T == at(at(ll,i),j)

       import List2 SI
       import List2 String
       import List2 ((List List SI)->SI)

       dim: SI == 10
       local vtable: List List SI == init(dim,dim,0)
       local ftable: List List ((List List SI)->SI) == eval(parse("0"$P))$F
       local stable: List List String == init(dim,dim,"0")

       set(x:SI,y:SI,s:String):() == update(ftable, x,y, eval(parse(s)))

       updateVFtables(x:SI,y:SI):() == update(vtable,x,y,at(ftable,x,y))
       eval():() == (updateVFtables(x,y) for y in 1..dim) for x in 1..dim

       get(x:SI,y:SI):(String,SI) == (at(stable,x,y), at(vtable,x,y))
----------------compiler errors-------------------------
ru7.inf.ethz.ch482  Philip > !a
asharp bug.as
Assertion failed, file "../src/tipasses.c" line 2996: abTag(what) == AB_Id
(Error) Program fault (abort process).

 
