13 |
structure CL = CLang |
structure CL = CLang |
14 |
structure N = CNames |
structure N = CNames |
15 |
structure ToC = TreeToC |
structure ToC = TreeToC |
16 |
|
structure SU = StrandUtil |
17 |
|
|
18 |
type target_desc = TargetUtil.target_desc |
type target_desc = TargetUtil.target_desc |
19 |
|
|
32 |
|
|
33 |
and program = Prog of { |
and program = Prog of { |
34 |
tgt : target_desc, (* info about target *) |
tgt : target_desc, (* info about target *) |
35 |
|
hasDie : bool, (* true for programs that have "die" *) |
36 |
|
hasNew : bool, (* true for programs that have "new" *) |
37 |
|
hasCom : bool, (* true for programs that have strand communication *) |
38 |
|
hasReduce : bool, (* true for programs that have global reduce *) |
39 |
inputs : GenInputs.input_desc list ref, |
inputs : GenInputs.input_desc list ref, |
40 |
globals : (CL.ty * string) list ref, |
globals : (CL.ty * string) list ref, |
41 |
topDecls : CL.decl list ref, |
topDecls : CL.decl list ref, |
197 |
(* programs *) |
(* programs *) |
198 |
structure Program = |
structure Program = |
199 |
struct |
struct |
200 |
fun new (tgt : target_desc) = ( |
fun new (tgt : target_desc, props : StrandUtil.program_prop list) = ( |
201 |
N.initTargetSpec {double= #double tgt, long=false}; |
N.initTargetSpec {double= #double tgt, long=false}; |
202 |
Prog{ |
Prog{ |
203 |
tgt = tgt, |
tgt = tgt, |
204 |
|
hasDie = SU.hasProp SU.StrandsMayDie props, |
205 |
|
hasNew = SU.hasProp SU.NewStrands props, |
206 |
|
hasCom = SU.hasProp SU.StrandCommunication props, |
207 |
|
hasReduce = SU.hasProp SU.GlobalReduce props, |
208 |
inputs = ref [], |
inputs = ref [], |
209 |
globals = ref [], |
globals = ref [], |
210 |
topDecls = ref [], |
topDecls = ref [], |