We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fffa0b2 commit 334eab5Copy full SHA for 334eab5
1 file changed
rocq-brick-libcpp/proof/shared_ptr/specs.v
@@ -108,6 +108,9 @@ Section specs.
108
; info_type := tCtor ("std::shared_ptr".<<Atype ty>>) [Tptr ty] |} (fun (this:ptr) =>
109
\arg{p:ptr} "ownedPtr" (Vptr p)
110
\pre{p} dynAllocatedR ty p
111
+ (* morally, the caller gives up all the pieces and gets back the 0th piece. The remaining pieces get stored in the invariant.
112
+ Should this object be destructed immediately, the destructor will need all the pieces.
113
+ We frame away the 0th piece in this spec. A derived spec can be proven where that framing away is not done *)
114
\pre{Rpiece: nat -> Rep} [∗ list] ctid ∈ allButFirstPieceId,
115
p |-> Rpiece ctid
116
\pre [|([∗ list] ctid ∈ allPieceIds, Rpiece ctid)
0 commit comments