File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -235,12 +235,22 @@ object (self)
235235 | POutputParameterUnaltered _ ->
236236 let ictxt = ccontexts#index_context po#get_context in
237237 if H. mem returnsites ictxt then
238- (H. find returnsites ictxt)#record_proof_obligation_result po
238+ begin
239+ (H. find returnsites ictxt)#record_proof_obligation_result po;
240+ self#check_returnsites
241+ end
239242 | POutputParameterNoEscape (_vinfo , e ) ->
240243 if po#is_violation then
241244 self#reject (OpOtherReason (" parameter escapes with argument " ^ (e2s e)))
242245 | _ -> ()
243246
247+ method private check_returnsites =
248+ let returnsites = H. fold (fun _ v a -> v :: a) returnsites [] in
249+ if List. for_all (fun r ->
250+ match r#status with OpUnaltered -> true | _ -> false ) returnsites then
251+ self#reject (OpOtherReason (" parameter is not written by any return site" ))
252+ else
253+ ()
244254
245255 method is_active (_po_s : proof_obligation_int list ) =
246256 match status with
You can’t perform that action at this time.
0 commit comments