Home My Page Projects Code Snippets Project Openings SML/NJ
Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

SCM Repository

[smlnj] Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/kernel/lty.sig
ViewVC logotype

Diff of /sml/branches/primop-branch-2/src/compiler/FLINT/kernel/lty.sig

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2020, Thu Aug 17 19:54:34 2006 UTC revision 2021, Thu Aug 17 20:36:49 2006 UTC
# Line 37  Line 37 
37   *)   *)
38  type tycEnv  type tycEnv
39    
40  (* tycEnvElem: the tyc list is the set of arguments bound at an application,  (* tycEnvs are represented by an encoding as tycs. The abstract representation
41   * if the tycEnv element was the result of a lazy beta-reduction (SOME case),   * of tycEnvs would be given by:
42   * or NONE if the tycEnv element is the result of pushing a suspended subst   *
43   * through a lambda abstraction. The int is the original lambda depth of the   *   datatype teBinder
44   * arguments (SOME case) or of the lambda abstraction.   *     = Beta of int * tyc list * tkind list
45     *     | Lamb of int * tkind list
46     *
47     *   type tycEnv = teBinder list
48     *
49     * Invariant: a tycEnv cannot terminate with a Lamb, i.e. the last binder
50     *   in a tycEnv must be a Beta. tycEnvs are created when a closure is created
51     *   when reducing a beta-redex (rule r1), and they are always initially of
52     *   of the form Beta(0,args,ks)::nil.
53   *)   *)
54  type tycEnvElem = (tyc list option * int)  
55    datatype teBinder
56      = Beta of int * tyc list * tkind list
57          (* Beta(j,args,ks):
58             created when reducing a beta redex (r1);
59             j: the embedding level of the original redex -- 0 if the redex was
60                created by r1, or the nesting level of the new closure if by r12;
61             args: the tycs bound by the n-ary beta reduction, i.e. the arguments;
62             ks: the operator domain kinds *)
63      | Lamb of int * tkind list
64          (* Lamb(j,ks):
65             created when pushing a closure (Env) through a lambda (r10);
66             j: the nesting level of the closure just before r10 is applied,
67                i.e. the nesteing level of the abstraction relative to the
68                point where the closure was originally created;
69             ks: the kinds of the abstraction parameters *)
70    
71    
72  (* token: a hook to add new tyc *)  (* token: a hook to add new tyc *)
73  type token  type token
# Line 113  Line 137 
137  val lt_key   : lty -> int  val lt_key   : lty -> int
138    
139  (** utility functions on tycEnv *)  (** utility functions on tycEnv *)
140  (* values returned by lookupTycEnv *)  
141  datatype tycEnvElem  val teEmpty : tycEnv
142    = B of tkind list * tyc list  val teLookup : tycEnv * int -> teBinder option
143    | L of tkind list * int  val teCons : teBinder * tycEnv -> tycEnv
144    val teDest : tycEnv -> (teBinder * tycEnv) option
 (* components of a tycEnv *)  
 datatype tycEnvComp  
   = TEempty  
   | TEbind of tkind list * tyc list  
   | TElam of tkind list * int * tycEnv  
   
 exception UnboundTycEnv  
 val emptyTycEnv : tycEnv  
 val lookupTycEnv : tycEnv * int -> tycEnvElem  
 val bindTycEnv : tkind list * tyc list -> tycEnv  
 val lamTycEnv : tkind list * int * tycEnv -> tycEnv  
 val splitTycEnv : tycEnv -> tycEnvComp  
145    
146  (** utility functions on tkindEnv *)  (** utility functions on tkindEnv *)
147  type tkindEnv  type tkindEnv

Legend:
Removed from v.2020  
changed lines
  Added in v.2021

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0