Source file env.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

(* This file is free software, part of dolmen. See file "LICENSE" for more information *)

(* Type definitions & modules *)
(* ************************************************************************* *)

module V = Map.Make(Dolmen.Std.Expr.Term.Var)
module C = Map.Make(Dolmen.Std.Expr.Term.Const)

type t = {
  model : Model.t;
  builtins : t -> Dolmen.Std.Expr.Term.Const.t -> Value.t;
}


(* Common functions *)
(* ************************************************************************* *)

let mk model ~builtins =
  { model; builtins; }

let builtins t = t.builtins t

let model { model; _ } = model

let update_model t f = { t with model = f t.model; }