Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@ -34,7 +34,7 @@ module Make
(Gil :
Gillian.Debugger.Lifter.Gil_fallback_lifter.Gil_lifter_with_state
with type Lifter.memory = SMemory.t)
(Verification : Engine.Verifier.S with type annot = C2_annot.t) =
(Verification : Verify.Verifier.S with type annot = C2_annot.t) =
struct
open Exec_map
module CmdReport = Verification.SAInterpreter.Logging.ConfigReport
Expand Down
20 changes: 20 additions & 0 deletions GillianCore/biabduction/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(library
(name biabduction)
(public_name gillian.biabduction)
(libraries engine monadic combinators utils gil_syntax incrementalAnalysis)
(preprocess
(pps ppx_deriving.std ppx_deriving_yojson))
(instrumentation
(backend landmarks --auto))
(flags
:standard
-open
Utils
-open
Gil_syntax
-open
Utils.Prelude
-open
IncrementalAnalysis
-open
Engine))
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gil_syntax
open Gillian.Monadic
open Monadic

module type ActionAddition = sig
type t
Expand All @@ -17,7 +17,7 @@ module type ActionAddition = sig
val get_fixes : err_t -> string Fix.t list

val get_recovery_tactic :
t -> err_t -> Expr.t Gillian.General.Recovery_tactic.t
t -> err_t -> Expr.t Engine.General.Recovery_tactic.t
end

module Make (A : ActionAddition) (S : MyMonadicSMemory.S with type t = A.t) =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
open Gillian.Utils
open Gillian.Monadic
open Gillian.Symbolic
open Utils
open Monadic
open Engine.Symbolic
open Gil_syntax
module DR = Delayed_result
module Recovery_tactic = Gillian.General.Recovery_tactic
module Recovery_tactic = Engine.General.Recovery_tactic

type t = Expr.t option [@@deriving yojson]
type err_t = MissingState [@@deriving show, yojson]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
open Gillian.Utils
open Gillian.Monadic
open Gillian.Symbolic
open Utils
open Monadic
open Engine.Symbolic
open Gil_syntax
module DR = Delayed_result
module Recovery_tactic = Gillian.General.Recovery_tactic
module Recovery_tactic = Engine.General.Recovery_tactic

type t = Expr.t option [@@deriving show, yojson]
type err_t = MissingState [@@deriving show, yojson]
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
open Gillian.Gil_syntax
open Gil_syntax

type 'cp atom = 'cp * Expr.t list * Expr.t list [@@deriving yojson, show]
type 'cp t = 'cp atom list [@@deriving yojson, show]

let lvars (fix : 'cp t) =
let open Gillian.Utils.Containers in
let open Utils.Containers in
List.fold_left
(fun acc (_, ins, outs) ->
let acc =
Expand All @@ -14,7 +14,7 @@ let lvars (fix : 'cp t) =
SS.empty fix

let alocs (fix : 'cp t) =
let open Gillian.Utils.Containers in
let open Utils.Containers in
List.fold_left
(fun acc (_, ins, outs) ->
let acc =
Expand All @@ -23,8 +23,8 @@ let alocs (fix : 'cp t) =
List.fold_left (fun acc e -> SS.union acc (Expr.alocs e)) acc outs)
SS.empty fix

let subst (subst : Gillian.Symbolic.Subst.t) (fix : 'a t) : 'a t =
let le_subst = Gillian.Symbolic.Subst.subst_in_expr subst ~partial:true in
let subst (subst : Engine.Symbolic.Subst.t) (fix : 'a t) : 'a t =
let le_subst = Engine.Symbolic.Subst.subst_in_expr subst ~partial:true in
let subst_atom (cp, ins, outs) =
(cp, List.map le_subst ins, List.map le_subst outs)
in
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
open Gillian.Utils
open Gillian.Monadic
open Gillian.Symbolic
open Utils
open Monadic
open Engine.Symbolic
open Gil_syntax
module DR = Delayed_result
module Recovery_tactic = Gillian.General.Recovery_tactic
module Recovery_tactic = Engine.General.Recovery_tactic

type err = MissingState | NotEnoughPermission [@@deriving show, yojson]

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
open Gillian.Utils
open Gillian.Monadic
open Gillian.Symbolic
open Utils
open Monadic
open Engine.Symbolic
module DR = Delayed_result

type 'a freeable = None | Freed | SubState of 'a [@@deriving yojson, show]
Expand Down Expand Up @@ -168,7 +168,7 @@ module Make (S : MyMonadicSMemory.S) :
let get_recovery_tactic s e =
match (s, e) with
| SubState s, SubError e -> S.get_recovery_tactic s e
| _ -> Gillian.General.Recovery_tactic.none (* TODO *)
| _ -> Engine.General.Recovery_tactic.none (* TODO *)

let can_fix = function
| SubError e -> S.can_fix e
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gil_syntax
open Gillian.Monadic
open Monadic
open Delayed.Syntax
open Delayed_result.Syntax

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
open Gillian.Utils
open Gillian.Monadic
open Gillian.Symbolic
open Utils
open Monadic
open Engine.Symbolic
open Gil_syntax
module DR = Delayed_result
module ExpMap = MyUtils.ExpMap
Expand Down Expand Up @@ -222,12 +222,12 @@ module Make (S : MyMonadicSMemory.S) :
let sub_recover =
match ExpMap.find_opt idx (fst st) with
| Some codom -> S.get_recovery_tactic codom e
| None -> Gillian.General.Recovery_tactic.none
| None -> Engine.General.Recovery_tactic.none
in
Gillian.General.Recovery_tactic.merge
(Gillian.General.Recovery_tactic.try_unfold [ idx ])
Engine.General.Recovery_tactic.merge
(Engine.General.Recovery_tactic.try_unfold [ idx ])
sub_recover
| _ -> Gillian.General.Recovery_tactic.none
| _ -> Engine.General.Recovery_tactic.none

let can_fix = function
| SubError (_, e) -> S.can_fix e
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
open Gillian.Monadic
open Gillian.Symbolic
open Monadic
open Engine.Symbolic
open Gil_syntax
module Containers = Gillian.Utils.Containers
module Containers = Utils.Containers
module DR = Delayed_result
module Recovery_tactic = Gillian.General.Recovery_tactic
module Recovery_tactic = Engine.General.Recovery_tactic

module type S = sig
(* Type of states *)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gillian.Utils
open Gillian.Monadic
open Utils
open Monadic
open Gil_syntax

module type IDs = sig
Expand Down Expand Up @@ -153,7 +153,7 @@ let get_loc =
some ~learned:[ e == ALoc loc_name ] loc_name)
| _ -> none ()

module SMap = Gillian.Utils.Prelude.Map.Make (struct
module SMap = Utils.Prelude.Map.Make (struct
include String

let of_yojson = function
Expand Down
23 changes: 11 additions & 12 deletions transformers/lib/states/PMap.ml → GillianCore/combinators/PMap.ml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
open Gil_syntax
open Gillian.Monadic
module Subst = Gillian.Symbolic.Subst
open Monadic
module Subst = Engine.Symbolic.Subst
module DR = Delayed_result
module DO = Delayed_option

Expand Down Expand Up @@ -379,13 +379,13 @@ struct
let sub_recover =
match I.find_opt_unsafe (fst st) idx with
| Some codom -> S.get_recovery_tactic codom e
| None -> Gillian.General.Recovery_tactic.none
| None -> Engine.General.Recovery_tactic.none
in
Gillian.General.Recovery_tactic.merge sub_recover
(Gillian.General.Recovery_tactic.try_unfold [ idx ])
Engine.General.Recovery_tactic.merge sub_recover
(Engine.General.Recovery_tactic.try_unfold [ idx ])
| NotAllocated idx | InvalidIndexValue idx ->
Gillian.General.Recovery_tactic.try_unfold [ idx ]
| _ -> Gillian.General.Recovery_tactic.none
Engine.General.Recovery_tactic.try_unfold [ idx ]
| _ -> Engine.General.Recovery_tactic.none

let can_fix = function
| SubError (_, _, e) -> S.can_fix e
Expand Down Expand Up @@ -545,12 +545,11 @@ struct
let sub_recover =
match I.find_opt_unsafe st idx with
| Some codom -> S.get_recovery_tactic codom e
| None -> Gillian.General.Recovery_tactic.none
| None -> Engine.General.Recovery_tactic.none
in
Gillian.General.Recovery_tactic.merge sub_recover
(Gillian.General.Recovery_tactic.try_unfold [ idx ])
| InvalidIndexValue idx ->
Gillian.General.Recovery_tactic.try_unfold [ idx ]
Engine.General.Recovery_tactic.merge sub_recover
(Engine.General.Recovery_tactic.try_unfold [ idx ])
| InvalidIndexValue idx -> Engine.General.Recovery_tactic.try_unfold [ idx ]

let can_fix = function
| SubError (_, _, e) -> S.can_fix e
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gil_syntax
open Gillian.Monadic
open Monadic

type index_mode = Static | Dynamic

Expand All @@ -19,7 +19,7 @@ module type PMapImpl = sig
val fold : (Expr.t -> Entry.t -> 'a -> 'a) -> t -> 'a -> 'a
val for_all : (Entry.t -> bool) -> t -> bool
val compose : t -> t -> t Delayed.t
val substitution_in_place : Gillian.Symbolic.Subst.t -> t -> t Delayed.t
val substitution_in_place : Engine.Symbolic.Subst.t -> t -> t Delayed.t
end

module type OpenPMapType = sig
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gillian.Monadic
module Containers = Gillian.Utils.Containers
open Monadic
module Containers = Utils.Containers
open MyUtils

module Make (IDs : IDs) (S1 : MyMonadicSMemory.S) (S2 : MyMonadicSMemory.S) :
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
open Gillian.Utils
open Gillian.Monadic
open Utils
open Monadic
open MyUtils
module DR = Delayed_result

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
open Gillian.Monadic
open Monadic
module DR = Delayed_result

type ('a, 'pred) bi_state = { state : 'a; anti_frame : 'pred Fix.t }
Expand Down Expand Up @@ -75,11 +75,11 @@ module Make (Mem : MyMonadicSMemory.S) :
(* Variables *)

let lvars s =
let open Gillian.Utils.Containers in
let open Utils.Containers in
Mem.lvars s.state |> SS.union (Fix.lvars s.anti_frame)

let alocs s =
let open Gillian.Utils.Containers in
let open Utils.Containers in
Mem.alocs s.state |> SS.union (Fix.alocs s.anti_frame)

let substitution_in_place subst s =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
open Gillian.Concrete
module Expr = Gillian.Gil_syntax.Expr
open Engine.Concrete
module Expr = Gil_syntax.Expr

module Make (InitData : Gillian.General.Init_data.S) :
Gillian.Concrete.Memory_S with type init_data = InitData.t = struct
module Make (InitData : Engine.General.Init_data.S) :
Engine.Concrete.Memory_S with type init_data = InitData.t = struct
type vt = Values.t
type st = Subst.t
type err_t = unit [@@deriving yojson, show]
Expand Down
2 changes: 2 additions & 0 deletions GillianCore/combinators/cmemory.mli
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module Make (ID : Engine.General.Init_data.S) :
Engine.Concrete.Memory_S with type init_data = ID.t
14 changes: 14 additions & 0 deletions GillianCore/combinators/dune
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(library
(name combinators)
(public_name gillian.combinators)
(libraries
engine
monadic
utils
gil_syntax
ppx_sat_runtime
ppx_deriving_yojson.runtime)
(preprocess
(pps ppx_deriving.show ppx_deriving_yojson gillian.ppx_sat))
(instrumentation
(backend landmarks --auto)))
6 changes: 6 additions & 0 deletions GillianCore/command_line/dune
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
utils
usage_logs
engine
verify
biabduction
bulk
logging
debugger_lifter
Expand All @@ -27,6 +29,10 @@
-open
Engine
-open
Verify
-open
Biabduction
-open
Bulk
-open
IncrementalAnalysis))
3 changes: 3 additions & 0 deletions GillianCore/debugging/debugger/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
str
fmt.tty
engine
verify
sedap.types
gil_syntax
incrementalAnalysis
Expand All @@ -28,6 +29,8 @@
-open
Engine
-open
Verify
-open
Gil_syntax
-open
IncrementalAnalysis
Expand Down
3 changes: 3 additions & 0 deletions GillianCore/debugging/lifter/dune
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
sedap.types
debugger_log
debugger_utils
verify
parserAndCompiler)
(flags
:standard
Expand All @@ -19,6 +20,8 @@
-open
Engine
-open
Verify
-open
Utils
-open
Utils.Prelude))
Loading