Skip to content

Commit

Permalink
comment out for #46
Browse files Browse the repository at this point in the history
  • Loading branch information
hiroshi-cl committed Oct 8, 2024
1 parent 3b52686 commit fab3eb9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions examples/dl2u_error.dl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source a('A':int, 'B':int).
source b('B':int, 'C':int).
view v('A':int, 'B':int, 'C':int).
-a(A, B) :- a(A, B) , tmp(A, B, C).
tmp(A, B, C) :- a(A, G) , b(G, C) , B = 60 , G = 30.
8 changes: 4 additions & 4 deletions src/ast2sql.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2327,8 +2327,8 @@ let update_table_env (head : rterm) (body : term list) (table_env : table_enviro
match arg with
| NamedVar x -> return (x :: colmns, arg_map |> ArgMap.add x None)
| _ -> err @@ InvalidArgInHead { var = arg; error_detail = InRule (head, body) }
) ([], ArgMap.empty) >>= fun (colmns, arg_map) ->
body |> foldM (fun arg_map term ->
) ([], ArgMap.empty) >>= fun (columns, arg_map) ->
(* body |> foldM (fun arg_map term ->
match term with
| Rel (Pred (target, args))
| Rel (Deltainsert (target, args))
Expand All @@ -2354,12 +2354,12 @@ let update_table_env (head : rterm) (body : term list) (table_env : table_enviro
| _ -> return arg_map
) arg_map >>= fun arg_map ->
colmns |> List.rev |> foldM (fun columns col ->
columns |> List.rev |> foldM (fun columns col ->
match arg_map |> ArgMap.find_opt col with
| None -> err @@ HeadVariableDoesNotOccurInBody col
| Some None -> err @@ HeadVariableDoesNotOccurInBody col
| Some Some col -> return (col :: columns)
) [] >>= fun columns ->
) [] >>= fun columns -> *)
return @@ TableEnv.add table columns table_env


Expand Down

0 comments on commit fab3eb9

Please sign in to comment.