Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
a710683
JSILSMemory is now monadic
giltho Jul 6, 2026
6151bf1
remove legacy_s_memory
giltho Jul 6, 2026
ab460cc
expose more things
giltho Jul 6, 2026
cf9a025
wisl is now immutable
giltho Jul 8, 2026
46868ea
remove all notions of mutable memory model
giltho Jul 8, 2026
2fb46f7
MonadicSMemory.S is now the entry point
giltho Jul 9, 2026
cd38c6f
setup abstractions in verification so transfer of responsibility can …
giltho Jul 9, 2026
23b32f4
phase 8 prep: abstraction err variant, split_further/sure_is_nonempty…
giltho Jul 9, 2026
a24f68c
phase 8.1: extract the matching machinery into a higher-order walker
giltho Jul 9, 2026
46e7679
phase 8.2: memory-level predicate/wand reasoning in the Abstraction c…
giltho Jul 9, 2026
6a3a489
phase 8.3 (WIP): wire the preds-in-memory seams behind Config.preds_i…
giltho Jul 9, 2026
e2e2951
phase 8.3: full test-suite parity with predicates in the memory
giltho Jul 9, 2026
11c2d39
preds-in-memory: exclusion-set recovery, pc memo, outs hints
giltho Jul 10, 2026
1995f5e
preds-in-memory: let sub-action failures reach the interpreter loop
giltho Jul 10, 2026
0e0c4a4
preds-in-memory: flip Config.preds_in_memory default to true
giltho Jul 10, 2026
e417edb
preds-in-memory: delete the legacy engine-side predicate machinery
giltho Jul 10, 2026
56b0df6
collapse the Pred_state wrapper: matching and PState run on bare states
giltho Jul 10, 2026
5f80293
delete PState: SState absorbs SL commands, spec application, and matc…
giltho Jul 10, 2026
1c3627d
make the state predicate-unaware: pred-action eval/spec-vars/simplify…
giltho Jul 10, 2026
8e42dcd
Add missing reduction
N1ark Sep 10, 2026
245602e
Misses can contain typing information
N1ark Sep 10, 2026
82b57d8
BlockTree: producing a zero-length array is a no-op
N1ark Sep 10, 2026
9a75ff7
PMap: don't reverse-type a literal domainset
N1ark Sep 10, 2026
e579fd7
add `Delayed.matching`
N1ark Sep 11, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions Gillian-C/bin/gillian_c.ml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
open Cgil_lib
module SMemory = Gillian.Monadic.MonadicSMemory.Lift (MonadicSMemory)

module Gil_to_c_lifter
(Verification :
Gillian.Abstraction.Verifier.S
with type annot = CParserAndCompiler.Annot.t) =
struct
include
Gillian.Debugger.Lifter.Gil_lifter.Make (SMemory) (CParserAndCompiler)
Gillian.Debugger.Lifter.Gil_lifter.Make
(MonadicSMemory)
(CParserAndCompiler)
(Verification)

let get_variables =
Expand All @@ -16,7 +17,7 @@ struct
end

module CLI =
Gillian.Command_line.Make (Global_env) (CMemory) (SMemory)
Gillian.Command_line.Make (Global_env) (CMemory) (MonadicSMemory)
(CParserAndCompiler)
(External.M)
(struct
Expand Down
6 changes: 1 addition & 5 deletions Gillian-C/lib/MonadicSMemory.ml
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ let sure_is_nonempty state =

let get_init_data { genv; _ } = genv
let clear { genv; _ } = { genv; mem = just_functions genv }
let copy h = h

let pp_params fmt params =
let rec aux fmtp = function
Expand Down Expand Up @@ -777,17 +776,14 @@ let execute_action ~action_name heap params =
(* LActions static *)

(* Serialization and operations *)
let substitution_in_place subst heap =
let substitution subst heap =
let open Delayed.Syntax in
let { mem; genv } = heap in
let+ mem = Mem.substitution subst mem in
match mem with
| Ok mem -> { mem; genv }
| Error e -> Fmt.failwith "Error in substitution: %a" SHeapTree.pp_err e

let clean_up ?(keep = Expr.Set.empty) _ : Expr.Set.t * Expr.Set.t =
(Expr.Set.empty, keep)

let lvars heap = Mem.lvars heap.mem
let alocs heap = Mem.alocs heap.mem

Expand Down
2 changes: 1 addition & 1 deletion Gillian-C/lib/sRunner.ml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gillian
module SMemory = Monadic.MonadicSMemory.Lift (MonadicSMemory)
module SMemory = MonadicSMemory

module Outcome =
Bulk.Outcome.Make_Symbolic (SMemory) (CParserAndCompiler)
Expand Down
4 changes: 2 additions & 2 deletions Gillian-C2/bin/gillian_c2.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ module Init_data = Gillian.General.Init_data.Dummy

module Gillian_C2_lifter =
Gillian.Debugger.Lifter.Gil_fallback_lifter.Make
(SMemory)
(MonadicSMemory)
(C2ParserAndCompiler)
(Lifter.C2_lifter.Make)

module CLI =
Gillian.Command_line.Make (Init_data) (CMemory) (SMemory)
Gillian.Command_line.Make (Init_data) (CMemory) (MonadicSMemory)
(C2ParserAndCompiler)
(External.M)
(struct
Expand Down
2 changes: 1 addition & 1 deletion Gillian-C2/lib/lifter/c2_lifter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Gil_branch_case = Gillian.Gil_syntax.Branch_case
module DL = Gillian.Debugger.Logging
module Exec_map = Gillian.Debugger.Utils.Exec_map
module Annot = C2_annot
module SMemory = Memory_model.SMemory
module SMemory = Memory_model.MonadicSMemory
open Annot
open Branch_case

Expand Down
8 changes: 1 addition & 7 deletions Gillian-C2/lib/memory_model/MonadicSMemory.ml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ module Mem = struct
let to_yojson map = SMap.to_yojson SHeapTree.to_yojson map
let map_lift_err loc res = DR.map_error res (lift_sheaptree_err loc)
let empty = SMap.empty
let copy x = x

let get_tree_res map loc_name =
DR.of_option ~none:(MissingLocResource loc_name)
Expand Down Expand Up @@ -430,7 +429,6 @@ let make_branch ~heap ?(rets = []) () = (heap, rets)

let init () = { genv = GEnv.empty; mem = Mem.empty }
let clear h = { h with mem = Mem.empty }
let copy h = h

let sure_is_nonempty _ =
(* TODO: Implementing this would require filtering functions
Expand Down Expand Up @@ -911,7 +909,7 @@ let execute_action ~action_name heap params =
(* Interface static *)

(* Serialization and operations *)
let substitution_in_place subst heap =
let substitution subst heap =
let open Delayed.Syntax in
let { mem; genv } = heap in
let genv = GEnv.substitution subst genv in
Expand All @@ -926,10 +924,6 @@ let substitution_in_place subst heap =
heap := { mem = nmem; genv = ngenv } *)

let fresh_val _ = Expr.LVar (LVar.alloc ())

let clean_up ?(keep = Expr.Set.empty) _ : Expr.Set.t * Expr.Set.t =
(Expr.Set.empty, keep)

let lvars heap = Mem.lvars heap.mem
let alocs heap = Mem.alocs heap.mem

Expand Down
1 change: 0 additions & 1 deletion Gillian-C2/lib/memory_model/SMemory.ml

This file was deleted.

6 changes: 4 additions & 2 deletions Gillian-JS/lib/Debugging/JSLifter.ml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ struct
node

let add_memory_vars smemory get_new_scope_id (variables : Variable.ts) =
let sorted_locs_with_vals = Legacy_symbolic.sorted_locs_with_vals smemory in
let sorted_locs_with_vals =
Semantics.Symbolic.sorted_locs_with_vals smemory
in
let value_nodes (loc, ((properties, domain), metadata)) : Variable.t =
let () = ignore properties in
let properties =
Expand Down Expand Up @@ -263,7 +265,7 @@ struct
scopes
else
let sorted_locs_with_vals =
Legacy_symbolic.sorted_locs_with_vals memory
Semantics.Symbolic.sorted_locs_with_vals memory
in
let loc_to_scope_id = Hashtbl.create 0 in
let () =
Expand Down
Loading