Papers
Topics
Authors
Recent
Search
2000 character limit reached

ViperCore: Core IVL for Separation Logic

Updated 2 June 2026
  • ViperCore is a core intermediate verification language that provides a formal foundation for reasoning about resource management and heap-manipulating assertions in separation logic.
  • It employs two equivalent semantic interpretations—operational and axiomatic—to model non-deterministic behaviors and rigorously capture verification obligations.
  • The framework underpins Viper’s toolchain by enabling modular verification, supporting both front-end translations and back-end verifiers with formal, verified semantics.

ViperCore is a core intermediate verification language (IVL) designed to serve as a precise semantic foundation for verification frameworks targeting variations of separation logic, most notably the Viper verification infrastructure. By capturing the essence of resource management and heap-manipulating assertions in a minimal, algebraic setting, ViperCore enables rigorous reasoning about the soundness of both front-end translations and back-end verifiers for complex, resource-aware program logics. The framework includes two provably equivalent semantic interpretations—operational and axiomatic—providing a formally verified substrate for automated verification tools (Dardinier et al., 2024).

1. Syntax and Structural Elements

ViperCore is defined over a semantic state space Σ\Sigma constructed atop an IDF algebra, encoding both the program store and permission-aware heap states. The language manipulates:

  • Variables x,yVarx, y \in Var
  • Values vValv \in Val
  • Field names fFieldNamef \in FieldName
  • Assertions AΣA\subseteq\Sigma, interpreted as sets of states
  • Commands CC generated by the grammar:

C::=inhale A  exhale A  havoc x  x:=e  skip  C;C  if b then C1 else C2  custom CC ::= inhale~A~|~exhale~A~|~havoc~x~|~x := e~|~skip~|~C;C~|~if~b~then~C_1~else~C_2~|~custom~C'

Here, \textit{inhale} and \textit{exhale} manipulate resources (heap and permissions), \textit{havoc} non-deterministically assigns a variable, \textit{assign} performs deterministic state updates, and \textit{custom} permits extensibility with user-supplied primitives (such as field updates).

Assertions and expressions (e,be, b) are semantic: they range over partial functions ΣVal\Sigma \to Val (for computations and predicates) and subsets of Σ\Sigma (for state properties), respectively.

2. Operational Semantics: Angelic and Demonic Choice

The operational semantics of ViperCore, given by the relation x,yVarx, y \in Var0, models both angelic and demonic forms of non-determinism:

  • Angelic choice occurs in \textit{exhale}, allowing arbitrary selection of witness resources to consume, thus favoring success of the verification obligation.
  • Demonic choice is present in \textit{inhale}, where all possible ways of producing resources are considered, possibly leading to branching or failure.

The heap-permission algebra is formalized by a partial, commutative, associative operator x,yVarx, y \in Var1. States must satisfy x,yVarx, y \in Var2—the heap value map and heap permission map agree on domains.

Operational rules include:

  • Inhale: x,yVarx, y \in Var3
  • Exhale: x,yVarx, y \in Var4
  • Assignment: x,yVarx, y \in Var5 if x,yVarx, y \in Var6
  • Havoc: x,yVarx, y \in Var7

Sequential composition and conditionals propagate both forms of non-determinism, reflecting their interaction with heap and permission state.

3. Axiomatic Semantics: Hoare-Separation Logic

Axiomatic semantics are captured by triples x,yVarx, y \in Var8 for assertions x,yVarx, y \in Var9. The semantics is strengthened by self-framing: assertions must be closed under resource erasure for irrelevant heap locations, ensuring modular reasoning à la separation logic.

The principal rules include:

  • Skip/Sequence: Standard, subject to self-framing
  • Inhale: vValv \in Val0, where vValv \in Val1 holds
  • Exhale: vValv \in Val2 if vValv \in Val3, again requiring self-framing
  • Assign/Havoc: Capture standard update and existential quantification over possible values
  • Conditionals: Respect framing and propagate logical conjunction/disjunction on state predicates
  • Frame Rule: Supports modular extension by unrelated resources

These rules abstract away operational branching by summarizing all executions that remain within the resource boundaries prescribed by the assertions.

4. Semantic Equivalence and Correctness

The formal relationship between operational and axiomatic semantics underpins the foundation for tool soundness:

  • Soundness: If vValv \in Val4 is operationally correct in all vValv \in Val5, there exists vValv \in Val6 such that vValv \in Val7 holds.
  • Completeness: If vValv \in Val8 and vValv \in Val9, then fFieldNamef \in FieldName0 with fFieldNamef \in FieldName1.

The equivalence is established by inductively relating the set of reachable states (operational) to the satisfaction of assertion triples (axiomatic), accounting for both angelic and demonic choices. This enables meta-theoretic reasoning about both front-end translation correctness and back-end prover reliability (Dardinier et al., 2024).

5. Instantiation for Viper: The ViperCore Model

ViperCore specializes fFieldNamef \in FieldName2 to model Viper’s heap and permission structures. The IDF (Indivisible, Discardable, Fractional) algebra is realized as:

  • fFieldNamef \in FieldName3
  • Heaps are merged pointwise, summing permissions up to 1, and heap values at locations with zero permission are erased.
  • fFieldNamef \in FieldName4 iff fFieldNamef \in FieldName5.

States are extended to tuples with a Store component, with “agreement” ensuring that inhale/exhale affect only heap and permissions, not local variables. A custom command fFieldNamef \in FieldName6 models field updates, operationally requiring full permission.

Translation from Viper’s AST involves mapping each program statement to ViperCore’s primitive commands, rendering the semantics of high-level verification logic directly in terms of ViperCore (Dardinier et al., 2024).

6. Connections to Verification Back-Ends

ViperCore serves as the semantic pivot between front-end verifiers (e.g., concurrent separation logic) and back-ends for automated program proof:

  • Symbolic Execution Back-End: An Isabelle/HOL function fFieldNamef \in FieldName7 implements Viper’s symbolic execution over symbolic states (store, permission chunks), using produce/consume to model inhale/exhale and CPS for control. Angelic choice in exhale matches the operational semantics: to exhale a wildcard permission, some positive quantity is removed. The following is shown: fFieldNamef \in FieldName8 fFieldNamef \in FieldName9 is operationally correct in all concrete states conforming to the symbolic state.
  • Verification Condition Generation (VCG) Back-End: A big-step semantics AΣA\subseteq\Sigma0 for Viper’s Boogie-style VCG employs a total heap, modeling demonic selection for resource removal. Each ViperCore execution AΣA\subseteq\Sigma1 corresponds to a family of AΣA\subseteq\Sigma2 executions, making precise the translation between concrete execution and VCG-style proof obligations (Dardinier et al., 2024).

7. Formalization and Applications

All technical results for ViperCore, covering the semantic models, operational and axiomatic equivalence, instantiations for Viper’s heap and permission system, and the correctness of two disparate back-ends, are formalized in Isabelle/HOL. The framework provides a uniform, verified foundation for reasoning about translational separation logic verifiers, enabling systematic proofs of soundness for toolchains that integrate different verification back-ends or accommodate front-end logics such as concurrent separation logic (Dardinier et al., 2024). A plausible implication is that ViperCore facilitates modular extension and reliable meta-theoretic analysis of diverse program verification workflows involving heap, permission, and resource-based invariants.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (1)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to ViperCore.