Implementation 2 - typecheck - Unit

From: michel@cs.bu.edu
Date: Sun Oct 08 2006 - 20:57:00 EDT


Return-Path: <michel@cs.bu.edu>
X-Spam-HitLevel: 
X-Spam-DCC: INFN-TO: cs3.bu.edu 1233; Body=1 Fuz1=1 Fuz2=1
X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on cs3.bu.edu
X-Spam-Level: 
X-Spam-Status: No, score=-3.4 required=10.0 tests=ALL_TRUSTED,BAYES_00, NO_REAL_NAME autolearn=ham version=3.1.0
X-Spam-Pyzor: 
Received: from csa3.bu.edu (csa3 [128.197.12.5]) by cs3.bu.edu (8.13.6/8.13.6) with ESMTP id k990v0OD016018 for <cs520@cs.bu.edu>; Sun, 8 Oct 2006 20:57:00 -0400
Received: (from apache@localhost) by csa3.bu.edu (8.13.6/8.12.11/Submit) id k990v0bc023562; Sun, 8 Oct 2006 20:57:00 -0400
X-Authentication-Warning: csa3.bu.edu: apache set sender to michel@cs.bu.edu using -f
Received: from 71.232.158.11 (SquirrelMail authenticated user michel) by cs-squirrelmail.bu.edu with HTTP; Sun, 8 Oct 2006 20:57:00 -0400 (EDT)
Message-ID: <2963.71.232.158.11.1160355420.squirrel@cs-squirrelmail.bu.edu>
Date: Sun, 8 Oct 2006 20:57:00 -0400 (EDT)
Subject: Implementation 2 - typecheck - Unit
From: michel@cs.bu.edu
To: "cs520 Course Account" <cs520@cs.bu.edu>
User-Agent: SquirrelMail/1.4.6-4.fc2.1.legacy
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Priority: 3 (Normal)
Importance: Normal
X-Clamav-Status: No
Status: RO
Content-Length: 650
X-UID: 17
X-Keywords: NonJunk                                                                                                    

Hi,

  Can I assume that the typecheck function is called only by the eval
function? I'm renaming all variables to make my code simpler, so, to
avoid do it twice, I intend to do it only in eval.

  If you're going to call typecheck directly to test it, I have one more
question. What's the supposed way of representing unit type: (a) TpBase
"unit", or (b) TpTup []? The parser returns it as (b), but the text
implicitly suggests (a) since the text lists it among int, bool, string,
and so on.

  Handling unit type as (b) produces a clearer code. If typecheck is
called only by eval, one can implement unit type in either ways.

[ ]'s
Michel Machado



This archive was generated by hypermail 2b29 : Thu Dec 14 2006 - 16:31:59 EST