Skip to content

Commit

Permalink
Make symbolic_memory2 functorial on object
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Jan 15, 2024
1 parent 126a39c commit 3d52147
Show file tree
Hide file tree
Showing 10 changed files with 397 additions and 363 deletions.
2 changes: 1 addition & 1 deletion ECMA-SL/dune
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@
symbolic
symbolic_interpreter
symbolic_object
symbolic_object2
symbolic_memory
symbolic_memory2
s_object_branch_get
symbolic_value
value_intf
value_reducer
Expand Down
12 changes: 7 additions & 5 deletions ECMA-SL/functorial/domains/heap_impl/symbolic_memory2.ml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
module V = Symbolic_value.M
module Object = S_object_branch_get
open Syntax.Option

module Make () : Memory_intf.S2 = struct
type value = V.value
type value2 = Encoding.Expr.t
module Make
(Object : Object_intf.S2
with type value = V.value
and type value2 = Encoding.Expr.t) : Memory_intf.S2 = struct
type value = Object.value
type value2 = Object.value2
type object_ = Object.t

type t =
Expand Down Expand Up @@ -71,7 +73,7 @@ module Make () : Memory_intf.S2 = struct
let set_field heap loc ~field ~data solver pc =
let obj = get heap loc in
let res =
Option.bind obj (fun o -> Some (Object.set o field data solver pc))
Option.bind obj (fun o -> Some (Object.set o ~key:field ~data solver pc))
in
match res with
| None -> Log.err "set Return is never none. loc: %s" loc
Expand Down
339 changes: 0 additions & 339 deletions ECMA-SL/functorial/domains/obj_impl/s_object_branch_get.ml

This file was deleted.

Loading

0 comments on commit 3d52147

Please sign in to comment.