let add_proof pf p hs =
begin
if not (Property.equal (property_of_id p) pf.target)
then Wp_parameters.fatal "Partial proof inconsistency" ;
let pind = get_induction p in
List.iter
(fun h ->
if not (is_requires h) then
let hind = get_induction h in
let ip = property_of_id h in
match pind , hind with
| Some s0 , Some s when s0.sid = s.sid ->
pf.invariants <- PropSet.add ip pf.invariants
| _ ->
pf.dependencies <- PropSet.add ip pf.dependencies
) hs ;
let k = subproof_idx p.p_kind in
match p.p_part with
| None -> pf.proved.(k) <- Complete
| Some(p,n) ->
match pf.proved.(k) with
| Complete -> ()
| Noproof ->
let bv = Bitvector.create n in
Bitvector.set_range bv 0 (p-1) ;
Bitvector.set_range bv (p+1) (n-1) ;
pf.proved.(k) <- Parts bv
| Parts bv ->
Bitvector.clear bv p ;
if Bitvector.is_empty bv
then pf.proved.(k) <- Complete
end