Browse Source

can be compiled

master
Julia 3 years ago
parent
commit
a3c1831388
  1. 17
      ocaml/Resolution.ml

17
ocaml/Resolution.ml

@ -206,15 +206,15 @@ let get_star const i =
(* Takes a constellation, a ray and a (ray,ray) list and extracts rays from stars number i (respectively j) that are not ri (respectively rj) when ri (respectively rj) isn't in the prob list *)
let star_filter const ((i, j),(ri,rj)) prob =
let (prob_a, prob_b) = List.split prob in
(if List.mem ri prob_a then
[]
(if List.mem ri prob_a then []
else (List.filter (fun a -> a <> ri) (get_star const i))
)@(
if List.mem rj prob_b then
[]
if List.mem rj prob_b then []
else (List.filter (fun a -> a <> rj) (get_star const j))
)
(* TODO faire un filtre post application, const_filter*)
(* convert the (ray,ray) list part of a link to an equation, converting its rays to terms *)
let link_to_eq prob =
List.map (fun (ra, rb) -> (ray_to_term (inv_pol_ray ra)), ray_to_term rb) prob
@ -251,6 +251,11 @@ let test = [ [Func("c", Neg, [x]); x] ; [Func("c", Pos, [Func("f", Npol, [y])])
print_dgraph (dgraph test);;
exec test ;;
prob :
(* TODO :
faire un filtre post application, const_filter
corriger la substitution qui ne fonctionne pas dans exec
*)
(* prob :
let fgraph = List.flatten graph in
let fgraph = List.flatten graph in *)
Loading…
Cancel
Save