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

SCM Repository

[diderot] Diff of /branches/vis15/src/compiler/translate/analyze-simple.sml
ViewVC logotype

Diff of /branches/vis15/src/compiler/translate/analyze-simple.sml

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

revision 4894, Tue Jan 10 17:42:56 2017 UTC revision 4895, Tue Jan 10 17:43:44 2017 UTC
# Line 40  Line 40 
40    
41      datatype context      datatype context
42        = ConstInit | UserFunc | GlobalInit | StateInit        = ConstInit | UserFunc | GlobalInit | StateInit
43        | InitMeth | UpdateMeth | StabilizeMeth        | StartMeth | UpdateMeth | StabilizeMeth
44        | Create | GlobalUpdate        | Create | GlobalUpdate
45    
46    (* for debugging *)    (* for debugging *)
# Line 49  Line 49 
49              | UserFunc => "UserFunc"              | UserFunc => "UserFunc"
50              | GlobalInit => "GlobalInit"              | GlobalInit => "GlobalInit"
51              | StateInit => "StateInit"              | StateInit => "StateInit"
52              | InitMeth => "InitMeth"              | StartMeth => "StartMeth"
53              | UpdateMeth => "UpdateMeth"              | UpdateMeth => "UpdateMeth"
54              | StabilizeMeth => "StabilizeMeth"              | StabilizeMeth => "StabilizeMeth"
55              | Create => "Create"              | Create => "Create"
# Line 116  Line 116 
116      fun markUpdate (cxt, x) = (case (cxt, SV.kindOf x)      fun markUpdate (cxt, x) = (case (cxt, SV.kindOf x)
117             of (ConstInit, SV.ConstVar) => ()             of (ConstInit, SV.ConstVar) => ()
118              | (_, SV.ConstVar) => raise Fail "update of ConstVar"              | (_, SV.ConstVar) => raise Fail "update of ConstVar"
119              | (InitMeth, SV.StrandStateVar) => markVaryingStateVar x  (* QUESTION: is it the case that state variables that are updated during
120              | (InitMeth, SV.StrandOutputVar) => markVaryingStateVar x   * the start method but not later can be treated as invariant?
121     *)
122                | (StartMeth, SV.StrandStateVar) => markVaryingStateVar x
123                | (StartMeth, SV.StrandOutputVar) => markVaryingStateVar x
124              | (UpdateMeth, SV.StrandStateVar) => markVaryingStateVar x              | (UpdateMeth, SV.StrandStateVar) => markVaryingStateVar x
125              | (UpdateMeth, SV.StrandOutputVar) => markVaryingStateVar x              | (UpdateMeth, SV.StrandOutputVar) => markVaryingStateVar x
126              | (StabilizeMeth, SV.StrandStateVar) => markVaryingStateVar x              | (StabilizeMeth, SV.StrandStateVar) => markVaryingStateVar x
# Line 241  Line 244 
244              List.app (fn (S.Func{f, body, ...}) => analyzeBlock UserFunc body) funcs;              List.app (fn (S.Func{f, body, ...}) => analyzeBlock UserFunc body) funcs;
245              analyzeBlock GlobalInit globInit;              analyzeBlock GlobalInit globInit;
246              analyzeBlock StateInit stateInit;              analyzeBlock StateInit stateInit;
247              Option.app (analyzeBlock InitMeth) startM;              Option.app (analyzeBlock StartMeth) startM;
248              analyzeBlock UpdateMeth updateM;              analyzeBlock UpdateMeth updateM;
249              Option.app (analyzeBlock StabilizeMeth) stabilizeM;              Option.app (analyzeBlock StabilizeMeth) stabilizeM;
250              Option.app (analyzeBlock GlobalUpdate) start;              Option.app (analyzeBlock GlobalUpdate) start;

Legend:
Removed from v.4894  
changed lines
  Added in v.4895

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