Overview of Verified DPE in Pulse
masterdice-star. It includes implementations for the DICE Engine and Layer 0.repository·master·Indexed 25 days ago
https://github.com/fstarlang/fstarF* is a proof-oriented programming language designed for formal verification, allowing developers to write code mathematically proven to satisfy specific properties. It supports extraction into executable languages such as OCaml, F#, C, and Rust. The ecosystem includes Pulse, a DSL for concurrent and imperative programming, and the 'Proof-oriented Programming in F*' educational resource.
dice-star. It includes implementations for the DICE Engine and Layer 0.Pulse is a domain-specific language (DSL) embedded in F*. It inherits F*'s higher-order features and dependent types while providing built-in support for programming with mutable state and concurrency. Pulse uses specifications and proofs based on Concurrent Separation Logic (CSL).
Key characteristics:
par combinator).PulseCore, a logic formalized within F* that is inspired by the Iris separation logic.F* is a dependently typed programming language designed for several roles:
Key design elements include a core language of total functions with full dependent types, a system of user-defined indexed effects, built-in encoding of logic for SMT solvers, and a reflection system for metaprogramming (Meta-F*).
F* is a dependently typed programming language and proof assistant designed for proof-oriented programming. This paradigm involves co-designing programs and proofs to provide mathematical guarantees regarding:
While F* is a functional language at its core, it supports multiple programming paradigms including:
ulibfs library is a runtime library required when F* code has been exported to F#. If you are consuming F* logic within an F# environment via exported code, ensure this runtime library is available to handle the necessary execution context.https://www.fstar-lang.org/papers/indexedeffects.Type u#i : Type u#(i + 1)). Breaking this stratification—for example, by introducing an axiom that allows a type to be 'lowered' into a smaller universe and then 'projected' back—can lead to unsoundness where one can prove False.F* supports first-class functions, allowing for higher-order patterns:
map: Takes a function f and a list l, applying f to every element to produce a new list.find: Takes a predicate function f and a list l, returning Some x for the first element where f x is true, or None if no such element exists.fold_left: Reduces a list using a function f and an accumulator a from left to right.In F*, logical connectives exist in two flavors:
pair for conjunction, sum for disjunction)., /, ==>`, etc. These are typically used in proofs where the SMT solver handles the heavy lifting. Their meaning is determined by SMT encoding rather than explicit constructors.
All basic types and connectives are defined in the Prims module, which is the first module in all F* programs.
F* uses an effect system to model behaviors beyond pure mathematical functions. While users can define custom effects, F* provides several primitive effects to manage specific computational behaviors:
Pulse supports three kinds of mutable references for explicit memory management:
drop or free.The basic type for mutable references is Pulse.Lib.Reference.ref t. Most operations are agnostic to whether the reference is on the stack or the heap.
The tutorial defines a small imperative language used to demonstrate Floyd-Hoare logic. The language includes:
EAssign x e): Assigns the result of expression e to global variable x.Seq): Composes programs sequentially.If): Composes programs conditionally.Repeat n p): A primitive recursion construct that repeats program p, n times (where n is a non-negative integer).Operational semantics are implemented via an interpreter using a state type and a state monad st a. The interpreter is a total, recursive function run of type st unit.