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

SCM Repository

[smlnj] Annotation of /sml/trunk/src/MLRISC/aliasing/pointsTo.sig
ViewVC logotype

Annotation of /sml/trunk/src/MLRISC/aliasing/pointsTo.sig

Parent Directory Parent Directory | Revision Log Revision Log


Revision 409 - (view) (download) (as text)

1 : monnier 409 (*
2 :     * This module can be used to perform points-to analysis for
3 :     * a typed language. It is inspired by Nevin's stuff, but for compile
4 :     * time-efficiency reasons we are using a unification based scheme.
5 :     * Closure based schemes seem to be too expensive to be practical.
6 :     *
7 :     * -- Allen
8 :     *)
9 :     signature POINTS_TO =
10 :     sig
11 :    
12 :     datatype kind = PI (* projection *)
13 :     | DOM (* domain *)
14 :     | RAN (* co-domain (note: doesn't apply in CPS) *)
15 :    
16 :     datatype cell =
17 :     LINK of loc (* union/find up link *)
18 :     | REF of int * (kind * int * loc) list ref (* reference node *)
19 :     | TOP of int (* a collapsed node *)
20 :     | NAMED of string * loc
21 :    
22 :     withtype loc = cell ref
23 :    
24 :     val reset : (unit -> int) -> unit
25 :    
26 :     val newRef : 'a -> loc (* generate a new reference *)
27 :     val newTop : 'a -> loc (* generate a new collapsed node *)
28 :    
29 :     (*
30 :     * The following are methods for constructing the storage shape graph.
31 :     *)
32 :     val pi : loc * int -> loc (* the ith projection *)
33 :     val dom : loc * int -> loc (* the ith domain *)
34 :     val ran : loc * int -> loc (* the ith range *)
35 :     val offset : loc * int -> loc (* the ith offset *)
36 :    
37 :     val unify : loc * loc -> unit (* unify two locations *)
38 :    
39 :     (*
40 :     * More complex methods
41 :     *)
42 :     val record : loc list -> loc (* allocate a record *)
43 :     val mkref : loc -> loc (* allocate a reference *)
44 :     val app : loc * loc list -> unit (* apply a function *)
45 :     val ret : loc * loc list -> unit (* binds the return values *)
46 :    
47 :     (*
48 :     * Pretty printing
49 :     *)
50 :     val toString : loc -> string
51 :    
52 :     end

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