aboutsummaryrefslogtreecommitdiff
path: root/xacml-proofs/compiler/bin
diff options
context:
space:
mode:
Diffstat (limited to 'xacml-proofs/compiler/bin')
-rw-r--r--xacml-proofs/compiler/bin/dune9
-rw-r--r--xacml-proofs/compiler/bin/main.ml2
-rw-r--r--xacml-proofs/compiler/bin/request.ml8
3 files changed, 14 insertions, 5 deletions
diff --git a/xacml-proofs/compiler/bin/dune b/xacml-proofs/compiler/bin/dune
index 3d787bf..6b16152 100644
--- a/xacml-proofs/compiler/bin/dune
+++ b/xacml-proofs/compiler/bin/dune
@@ -1,4 +1,5 @@
-(executable
- (public_name compiler)
- (name main)
- (libraries core compiler))
+(executables
+ (public_names compiler request_compiler)
+ (names main request)
+ (libraries core compiler))
+
diff --git a/xacml-proofs/compiler/bin/main.ml b/xacml-proofs/compiler/bin/main.ml
index 946d65d..80a4844 100644
--- a/xacml-proofs/compiler/bin/main.ml
+++ b/xacml-proofs/compiler/bin/main.ml
@@ -5,4 +5,4 @@ let () =
let argv = Sys.get_argv () in
let file_names = Array.sub argv ~pos:1 ~len:(Array.length argv - 1) |> Array.to_list in
let policy_code = List.map file_names ~f:In_channel.read_all in
- compile' policy_code |> Stdio.print_endline
+ compile_policies policy_code |> Stdio.print_endline
diff --git a/xacml-proofs/compiler/bin/request.ml b/xacml-proofs/compiler/bin/request.ml
new file mode 100644
index 0000000..74b9169
--- /dev/null
+++ b/xacml-proofs/compiler/bin/request.ml
@@ -0,0 +1,8 @@
+open Core
+open Compiler
+
+let () =
+ let argv = Sys.get_argv () in
+ let file_name = Array.get argv 1 in
+ let policy_code = In_channel.read_all file_name in
+ compile_request policy_code |> Stdio.print_endline

© 2015 - 2026 Jakob L. Kreuze