@@ -12,7 +12,7 @@ public static List<Declaration> TransformImplementations(
1212 CivlTypeChecker civlTypeChecker ,
1313 int layerNum ,
1414 AbsyMap absyMap ,
15- bool forRefinementCheck )
15+ bool doRefinementCheck )
1616 {
1717 var linearPermissionInstrumentation =
1818 new LinearPermissionInstrumentation ( civlTypeChecker , layerNum , absyMap ) ;
@@ -21,7 +21,7 @@ public static List<Declaration> TransformImplementations(
2121 linearPermissionInstrumentation ,
2222 layerNum ,
2323 absyMap ,
24- forRefinementCheck ) ;
24+ doRefinementCheck ) ;
2525 yieldingProcInstrumentation . AddNoninterferenceCheckers ( ) ;
2626 var implToPreconditions = yieldingProcInstrumentation . CreatePreconditions ( linearPermissionInstrumentation ) ;
2727 yieldingProcInstrumentation
@@ -75,7 +75,7 @@ public static List<Declaration> TransformImplementations(
7575 private RefinementInstrumentation refinementInstrumentation ;
7676 private LinearPermissionInstrumentation linearPermissionInstrumentation ;
7777
78- private bool forRefinementCheck ;
78+ private bool doRefinementCheck ;
7979
8080 private Dictionary < LinearDomain , Variable > localPermissionCollectors ;
8181 private Dictionary < Variable , Variable > oldGlobalMap ;
@@ -86,13 +86,13 @@ private YieldingProcInstrumentation(
8686 LinearPermissionInstrumentation linearPermissionInstrumentation ,
8787 int layerNum ,
8888 AbsyMap absyMap ,
89- bool forRefinementCheck )
89+ bool doRefinementCheck )
9090 {
9191 this . civlTypeChecker = civlTypeChecker ;
9292 this . layerNum = layerNum ;
9393 this . absyMap = absyMap ;
9494 this . linearPermissionInstrumentation = linearPermissionInstrumentation ;
95- this . forRefinementCheck = forRefinementCheck ;
95+ this . doRefinementCheck = doRefinementCheck ;
9696 parallelCallAggregators = new Dictionary < string , Procedure > ( ) ;
9797 noninterferenceCheckerProcs = new Dictionary < YieldInvariantDecl , Procedure > ( ) ;
9898 noninterferenceCheckerImpls = new Dictionary < YieldInvariantDecl , Implementation > ( ) ;
@@ -121,7 +121,7 @@ private YieldingProcInstrumentation(
121121 }
122122
123123 var wrapperYieldToYieldNoninterferenceCheckerProcName =
124- forRefinementCheck
124+ doRefinementCheck
125125 ? $ "Wrapper_YieldToYield_NoninterferenceChecker_Refine_{ layerNum } "
126126 : $ "Wrapper_YieldToYield_NoninterferenceChecker_{ layerNum } ";
127127 wrapperYieldToYieldNoninterferenceCheckerProc = DeclHelper . Procedure (
@@ -130,7 +130,7 @@ private YieldingProcInstrumentation(
130130 CivlUtil . AddInlineAttribute ( wrapperYieldToYieldNoninterferenceCheckerProc ) ;
131131
132132 var wrapperGlobalNoninterferenceCheckerProcName =
133- forRefinementCheck
133+ doRefinementCheck
134134 ? $ "Wrapper_Global_NoninterferenceChecker_Refine_{ layerNum } "
135135 : $ "Wrapper_Global_NoninterferenceChecker_{ layerNum } ";
136136 wrapperGlobalNoninterferenceCheckerProc = DeclHelper . Procedure (
@@ -235,7 +235,7 @@ private Formal OldGlobalFormal(Variable v)
235235
236236 private void AddNoninterferenceCheckers ( )
237237 {
238- if ( civlTypeChecker . Options . TrustNoninterference || forRefinementCheck )
238+ if ( civlTypeChecker . Options . TrustNoninterference || doRefinementCheck )
239239 {
240240 return ;
241241 }
@@ -280,7 +280,7 @@ private List<Cmd> InlineYieldLoopInvariants(List<CallCmd> yieldInvariants)
280280 foreach ( Requires req in yieldInvariant . Preserves )
281281 {
282282 var newExpr = Substituter . Apply ( subst , req . Condition ) ;
283- if ( req . Free || forRefinementCheck )
283+ if ( req . Free || doRefinementCheck )
284284 {
285285 inlinedYieldInvariants . Add ( new AssumeCmd ( req . tok , newExpr , req . Attributes ) ) ;
286286 }
@@ -369,7 +369,7 @@ private void InlineYieldRequiresAndEnsures()
369369 Substitution subst = Substituter . SubstitutionFromDictionary ( map ) ;
370370 foreach ( Requires req in yieldInvariant . Preserves )
371371 {
372- impl . Proc . Ensures . Add ( new Ensures ( req . tok , req . Free || forRefinementCheck , Substituter . Apply ( subst , req . Condition ) ,
372+ impl . Proc . Ensures . Add ( new Ensures ( req . tok , req . Free || doRefinementCheck , Substituter . Apply ( subst , req . Condition ) ,
373373 null ,
374374 req . Attributes ) ) ;
375375 }
@@ -405,7 +405,7 @@ private void TransformImpl(Implementation impl, List<Cmd> preconditions)
405405 {
406406 // initialize refinementInstrumentation
407407 var yieldingProc = GetYieldingProc ( impl ) ;
408- if ( forRefinementCheck )
408+ if ( doRefinementCheck )
409409 {
410410 Debug . Assert ( yieldingProc . Layer == layerNum ) ;
411411 refinementInstrumentation = new ActionRefinementInstrumentation (
@@ -663,7 +663,7 @@ private void DesugarParCallCmdInBlock(Block block, bool isBlockInYieldingLoop)
663663 ins . AddRange ( callCmd . Ins ) ;
664664 outs . AddRange ( callCmd . Outs ) ;
665665 }
666- if ( forRefinementCheck )
666+ if ( doRefinementCheck )
667667 {
668668 procName = procName + "_Refine" ;
669669 }
@@ -719,7 +719,7 @@ private void DesugarParCallCmdInBlock(Block block, bool isBlockInYieldingLoop)
719719 }
720720
721721 parallelCallAggregators [ procName ] = DeclHelper . Procedure (
722- procName , inParams , outParams , forRefinementCheck ? new List < Requires > ( ) : requiresSeq , new List < Requires > ( ) ,
722+ procName , inParams , outParams , doRefinementCheck ? new List < Requires > ( ) : requiresSeq , new List < Requires > ( ) ,
723723 civlTypeChecker . GlobalVariables . Select ( v => Expr . Ident ( v ) ) . ToList ( ) , ensuresSeq ) ;
724724 }
725725
@@ -767,7 +767,7 @@ private void SplitCmds(List<Cmd> cmds, out List<Cmd> firstCmds, out List<Cmd> se
767767
768768 private IEnumerable < Declaration > ActionNoninterferenceCheckers ( IEnumerable < Action > actions , bool isGlobal )
769769 {
770- if ( civlTypeChecker . Options . TrustNoninterference || forRefinementCheck )
770+ if ( civlTypeChecker . Options . TrustNoninterference || doRefinementCheck )
771771 {
772772 yield break ;
773773 }
0 commit comments