You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each [[Hoare-Triple]] comes with a [[Function Specification Context]] $\Gamma$ .
Included in the program definition $(\gamma, C)$
Validity
$$\Gamma \vdash {P} \ C \ {Q}$$
Command specification ${P} \ C \ {Q}$ is valid in [[Function Specification Context]] $\Gamma$$$(\gamma, \Gamma) \vdash {P} \ f( \ \overrightarrow{x} \ ) \ {Q}$$
The [[Function Specification]] is valid in the [[Function Specification Environment]] $(\gamma, \Gamma)$$$\vdash (\gamma, \Gamma)$$
The [[Function Specification Environment]] is valid.
$$\Gamma \vdash {P} \ {\gamma, \Gamma} \ {Q}$$
The program specification is valid given the [[Function Specification Context]] $\Gamma$
Rules
In addition to the rules from [[Separation Logic Without Functions]] (with the $\Gamma$ added before $\vdash$ for these rules).
Function Call
$$\cfrac{
{P} \ f ( \ \overrightarrow{x} \ ) \ {Q} \in \Gamma
}{
\Gamma \vdash \left{ \overrightarrow{E} \overset{.}{\in} Val \star P\left[ \ \overrightarrow{E} \ / \ \overrightarrow{x} \ \right] \right} \ y := f(\overrightarrow{E}) \ {Q[y/ret]}
} \qquad (fcall)$$
The [[Function Specification Context]] needs to have the correct pre & post conditions for the function.