diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-07-12 10:11:38 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-07-12 17:56:10 -0300 |
| commit | f52efd20120cf5ceeae28da2c04d57acc6e46f14 (patch) | |
| tree | 90eeaa87042d4aced61feac01b31cf78fcfeba55 /lib/world.ml | |
| parent | e56efc19f71898d798c44b5955fe74451ee0fc6f (diff) | |
| download | SOL-f52efd20120cf5ceeae28da2c04d57acc6e46f14.tar.gz SOL-f52efd20120cf5ceeae28da2c04d57acc6e46f14.zip | |
branch world: state scoped reads, insert transitions, tip commit
Diffstat (limited to 'lib/world.ml')
| -rw-r--r-- | lib/world.ml | 10 |
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) -> |
