Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Annotation of /trunk/src/compiler/common/strand-util.sml
ViewVC logotype

Annotation of /trunk/src/compiler/common/strand-util.sml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1671 - (view) (download)

1 : jhr 1640 (* strand-util.sml
2 :     *
3 :     * COPYRIGHT (c) 2011 The Diderot Project (http://diderot-language.cs.uchicago.edu)
4 :     * All rights reserved.
5 :     *
6 :     * Utility definitions for strands.
7 :     *)
8 :    
9 :     structure StrandUtil =
10 :     struct
11 :    
12 :     (* method names *)
13 :     datatype method_name
14 :     = Update
15 :     | Stabilize
16 :    
17 :     fun nameToString Update = "Update"
18 :     | nameToString Stabilize = "Stabilize"
19 :    
20 :     (* program properties *)
21 :     datatype program_prop
22 :     = StrandsMayDie (* present if strands may die *)
23 :     | NewStrands (* present if new strands may be created dynamically *)
24 :     | StrandCommunication (* present is strands read the state of other strands *)
25 :    
26 :     fun propToString StrandsMayDie = "StrandsMayDie"
27 :     | propToString NewStrands = "NewStrands"
28 :     | propToString StrandCommunication = "StrandCommunication"
29 :    
30 : jhr 1671 fun hasProp (prop : program_prop) = List.exists (fn p => prop = p)
31 :    
32 : jhr 1640 end

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