File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -694,14 +694,14 @@ struct
694694  let  finalize  ()  =  () 
695695
696696  let  invariant_global  (ask : Q.ask ) (getg : V.t -> G.t ): V.t -> Invariant.t  =  function 
697-     |  `Left  m'  as   m   -> (*  mutex *) 
697+     |  `Left  m'  -> (*  mutex *) 
698698      let  atomic =  LockDomain.Addr. equal m' (LockDomain.Addr. of_var LibraryFunctions. verifier_atomic_var) in 
699699      if  atomic ||  ask.f (GhostVarAvailable  (Locked  m')) then  (
700700        (*  filters like query_invariant *) 
701701        let  one_var =  GobConfig. get_bool " ana.relation.invariant.one-var" in 
702702        let  exact =  GobConfig. get_bool " witness.invariant.exact" in 
703703
704-         let  rel =  keep_only_protected_globals ask m' (getg m) in 
704+         let  rel =  keep_only_protected_globals ask m' (get_m_with_mutex_inits ask  getg m' ) in   (*  TODO: disjunct with mutex_inits instead of join?  *) 
705705        let  inv = 
706706          RD. invariant rel
707707          |>  List. enum
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ struct
250250
251251  let  invariant_global  ask  getg  =  function 
252252    |  `Right  g'  -> (*  global *) 
253-       ValueDomain. invariant_global (read_unprotected_global getg) g'
253+       ValueDomain. invariant_global (read_unprotected_global getg) g'  (*  TODO: disjunct with mutex_inits instead of join?  *) 
254254    |  _  -> (*  mutex *) 
255255      Invariant. none
256256
@@ -332,10 +332,10 @@ struct
332332  include  PerMutexPrivBase 
333333
334334  let  invariant_global  (ask : Q.ask ) getg  =  function 
335-     |  `Left  m'  as   m   -> (*  mutex *) 
335+     |  `Left  m'  -> (*  mutex *) 
336336      let  atomic =  LockDomain.Addr. equal m' (LockDomain.Addr. of_var LibraryFunctions. verifier_atomic_var) in 
337337      if  atomic ||  ask.f (GhostVarAvailable  (Locked  m')) then  (
338-         let  cpa =  getg m in 
338+         let  cpa =  get_m_with_mutex_inits ask  getg m'  in   (*  TODO: disjunct with mutex_inits instead of join?  *) 
339339        let  inv =  CPA. fold (fun  v  _  acc  ->
340340            if  ask.f (MustBeProtectedBy  {mutex =  m'; global =  v; write =  true ; protection =  Strong }) then 
341341              let  inv =  ValueDomain. invariant_global (fun  g  -> CPA. find g cpa) v in 
@@ -688,7 +688,7 @@ struct
688688
689689  let  invariant_global  ask  getg  =  function 
690690    |  `Middle   g  -> (*  global *) 
691-       ValueDomain. invariant_global (read_unprotected_global getg) g
691+       ValueDomain. invariant_global (read_unprotected_global getg) g  (*  TODO: disjunct with mutex_inits instead of join?  *) 
692692    |  `Left  _
693693    |  `Right  _  -> (*  mutex or thread *) 
694694      Invariant. none
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments