aboutsummaryrefslogtreecommitdiffstats
path: root/lib/world.ml
diff options
context:
space:
mode:
Diffstat (limited to 'lib/world.ml')
-rw-r--r--lib/world.ml10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/world.ml b/lib/world.ml
index a053c2c..94fa0a9 100644
--- a/lib/world.ml
+++ b/lib/world.ml
@@ -22,10 +22,15 @@ type def =
| Table of { schema : (Label.t * domain) list; facts : Term.t Label.Map.t list }
| Rules of rule list
+type transition_result = T_state of Term.t | T_fail | T_stuck
+
module type WORLD = sig
type t
- val find : t -> string -> def option
+ val find : t -> ?at:Term.t -> string -> def option
+
+ val transition :
+ t -> string -> Pattern.t Label.Map.t -> transition_result option
end
type error =
@@ -227,7 +232,8 @@ module String_map = Map.Make (String)
module Standalone = struct
type t = def String_map.t
- let find world name = String_map.find_opt name world
+ let find world ?at:_ name = String_map.find_opt name world
+ let transition _ _ _ = None
let schema_of_node ~relation = function
| Ast.Seq (entries, None) ->