aboutsummaryrefslogtreecommitdiffstats
path: root/lib/icl/ast.ml
blob: 1a5b096a3dfb4c5ca94538522f235011c8ac947e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
open Sexplib.Std

type binding_expr = Var of string | Const of Drl.Ast.value  (** reuse DRL value for literals *)
[@@deriving sexp]

type constraint_body =
  | 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}
[@@deriving sexp]

type statement =
  | RegisterConstraint of {constraint_name: string; relation_name: string; body: constraint_body}
[@@deriving sexp]