diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-04-03 16:17:38 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-04-03 16:17:38 -0300 |
| commit | 63ae3c930de89af6f85229a467caa3f53cb844a2 (patch) | |
| tree | cda4d513672f9fefa09c3a1dff69d8443890e224 /lib/icl | |
| parent | c5bc3a4992b4968780c286a084ad7c02b2b58f1e (diff) | |
| download | Sakura-63ae3c930de89af6f85229a467caa3f53cb844a2.tar.gz Sakura-63ae3c930de89af6f85229a467caa3f53cb844a2.zip | |
format
Diffstat (limited to '')
| -rw-r--r-- | lib/icl/ast.ml | 14 | ||||
| -rw-r--r-- | lib/icl/parser.ml | 7 | ||||
| -rw-r--r-- | lib/icl/sublanguage.ml | 8 |
3 files changed, 14 insertions, 15 deletions
diff --git a/lib/icl/ast.ml b/lib/icl/ast.ml index 95e0271..30b0fa7 100644 --- a/lib/icl/ast.ml +++ b/lib/icl/ast.ml @@ -6,18 +6,18 @@ type binding_expr = [@@deriving sexp] type constraint_body = - | MemberOf of { target: string; binding: (string * binding_expr) list } - | Not of { body: constraint_body; universe: string } + | MemberOf of { target : string; binding : (string * binding_expr) list } + | Not of { body : constraint_body; universe : string } | And of constraint_body list | Or of constraint_body list - | Exists of { variable: string; quantifier: string; body: constraint_body } - | Forall of { variable: string; quantifier: string; body: constraint_body } + | Exists of { variable : string; quantifier : string; body : constraint_body } + | Forall of { variable : string; quantifier : string; body : constraint_body } [@@deriving sexp] type statement = | RegisterConstraint of { - constraint_name: string; - relation_name: string; - body: constraint_body; + constraint_name : string; + relation_name : string; + body : constraint_body; } [@@deriving sexp] diff --git a/lib/icl/parser.ml b/lib/icl/parser.ml index 28f8b6c..5678b47 100644 --- a/lib/icl/parser.ml +++ b/lib/icl/parser.ml @@ -2,13 +2,12 @@ type error = ParseError of string let of_sexp sexp = match Ast.statement_of_sexp sexp with - | stmt -> Ok stmt + | stmt -> Ok stmt | exception exn -> Error (ParseError (Printexc.to_string exn)) let of_string s = match Sexplib.Sexp.of_string s |> Ast.statement_of_sexp with - | stmt -> Ok stmt + | stmt -> Ok stmt | exception exn -> Error (ParseError (Printexc.to_string exn)) -let to_string stmt = - Ast.sexp_of_statement stmt |> Sexplib.Sexp.to_string_hum +let to_string stmt = Ast.sexp_of_statement stmt |> Sexplib.Sexp.to_string_hum diff --git a/lib/icl/sublanguage.ml b/lib/icl/sublanguage.ml index 4e74082..56f3e4b 100644 --- a/lib/icl/sublanguage.ml +++ b/lib/icl/sublanguage.ml @@ -1,9 +1,9 @@ module Make (Storage : Management.Physical.S) = struct - module Exec = Executor.Make(Storage) + module Exec = Executor.Make (Storage) type storage = Storage.t - type ast = Ast.statement - type error = Exec.error + type ast = Ast.statement + type error = Exec.error let name = "icl" @@ -20,4 +20,4 @@ module Make (Storage : Management.Physical.S) = struct let sexp_of_error = Exec.sexp_of_error end -module Memory = Make(Management.Physical.Memory) +module Memory = Make (Management.Physical.Memory) |
