From 124838fff53c96866fd5b51d19bcb55f61691ca6 Mon Sep 17 00:00:00 2001 From: rlacroix Date: Mon, 21 Nov 2022 16:52:57 +0100 Subject: [PATCH] added todo --- _build/_digests | 26 ++++++++++++++------------ _build/_log | 42 +++++++++++++++++++++++++----------------- _build/ocamlc.where | 2 +- _build/src/ftest.cmi | Bin 498 -> 498 bytes _build/src/ftest.cmo | Bin 1678 -> 1678 bytes _build/src/gfile.cmi | Bin 558 -> 558 bytes _build/src/gfile.cmx | Bin 1115 -> 1115 bytes _build/src/gfile.o | Bin 18168 -> 18200 bytes _build/src/graph.cmi | Bin 2283 -> 2283 bytes _build/src/graph.cmx | Bin 855 -> 855 bytes _build/src/graph.mli | 2 +- _build/src/graph.o | Bin 11536 -> 11544 bytes src/tools.ml | 15 +++++++++------ 13 files changed, 50 insertions(+), 37 deletions(-) diff --git a/_build/_digests b/_build/_digests index 8080847..2a54dc8 100644 --- a/_build/_digests +++ b/_build/_digests @@ -1,27 +1,29 @@ "Rule: ocaml dependencies mli (%=src/gfile )": "7\182\192g\020\238\188\b\211\164{\014\157\135\011\003" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/tools.mli": "9\173\222\177]e\245\229\131\151\020fsu\133@" +"Rule: ocaml: ml & cmi -> cmx & o (%=src/gfile )": "\236O\148Y\157m\028\183\166?\231a\231\187u\132" "Rule: ocaml dependencies ml (%=src/ftest )": "b\201\017\148\224\147!\233\229\244\171s cmx & o (%=src/gfile )": "\182Q)\149\222\216>\226\020\149\246\194]5\249P" -"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ftest.ml": "\007\196\023\203\192\230\143\1569\199\162\136\173\005;S" -"Rule: ocaml: mli -> cmi (%=src/graph )": "ZJ:\176\2527A6\005k\191 cmi (%=src/tools )": "\176h\209/\001\212$k\139(\220\204\150Aq\251" +"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/ftest.ml": "~\190 \235\142\210\r\222\253\136>\194\180\207\183\168" +"Rule: ocaml: mli -> cmi (%=src/graph )": ")2\159\205\136\031\251\145\0263\01878\001\b\134" +"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/graph.mli": "\253S\031\015\162|\210x\252\n \227\001{\133e" +"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.ml": "\021\223v\253\172\1820\185\180f[\180\189P\r)" "Rule: ocaml: cmx* & o* -> native (%=src/ftest )": "\028v\248\005\138\247 \162\160\253\214\194a\167\011\174" +"Rule: ocaml: mli -> cmi (%=src/tools )": "*\130\\\221>3X\156\180\205\"\245\255-\230~" "Rule: ocaml: ml & cmi -> cmx & o (%=src/ftest )": "\237\160\207\006\164Q\152#\240Q\196\136\242\206'\194" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/graph.ml": "\005\175.\2458\176E\202]\255\235=9\015\000\237" "Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/graph.ml": "\005\175.\2458\176E\202]\255\235=9\015\000\237" -"Rule: ocaml: mli -> cmi (%=src/gfile )": "\2028\135\152o,Y9\219\178\241C\150A*\209" +"Rule: ocaml: mli -> cmi (%=src/gfile )": "\015\211&r\030l{}\183\187\236\2266\022\129\191" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/graph.mli": "\031\217\135\022\208\254\154\148\252)\210\130\174\215X\031" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/gfile.mli": "\203\249\163Ct\234\0067d}\142\011m8T`" -"Rule: ocaml dependencies ml (%=src/tools )": "@\146\174l\148\031\206 \152\144\169\127\219\241\171\219" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/tools.ml": "~[\186\208\199\129\006\030\012\196\245\183'\163\211&" +"Rule: ocaml dependencies ml (%=src/tools )": "u\207\140\137\026\138+o\170\142E\195\193\183k9" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/ftest.ml": "~\190 \235\142\210\r\222\253\136>\194\180\207\183\168" -"Rule: ocaml: ml -> cmo & cmi (%=src/ftest )": "\199c\170\173N\127:;\2025\231\252\136+T\184" -"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028" +"Rule: ocaml: ml -> cmo & cmi (%=src/ftest )": ":=\223\176n\222\012\220\136\154\171h\019\1591\176" "Resource: /home/alejeune/Documents/4ir/S1/Ocaml/FordFulkersonLeChameau/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028" -"Rule: ocaml: ml & cmi -> cmx & o (%=src/graph )": "\210F\017y\223{\198]\215\245\217O\191 \169\220" +"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.ml": "\1966\177\141\185,fpl\1987gT\128b\028" +"Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/tools.mli": "9\173\222\177]e\245\229\131\151\020fsu\133@" +"Rule: ocaml: ml & cmi -> cmx & o (%=src/graph )": "\190\tV\232\254i\031+\141\154\168\219\155n\156C" "Rule: ocaml dependencies ml (%=src/graph )": "\137kk#\140\236\011\255?\132T\225M\018\169\224" -"Rule: ocaml dependencies mli (%=src/graph )": "\b\217\022sE\156(F\165M\014)D\182\178e" +"Rule: ocaml dependencies mli (%=src/graph )": "\012\213_n\023=\207kZ+\251(^M\2028" "Resource: /home/chepycou/Documents/cours/4-IR/functionalProgramming/Projet/repoGit/ocaml-maxflow-project/src/gfile.mli": "\203\249\163Ct\234\0067d}\142\011m8T`" -"Rule: ocaml dependencies mli (%=src/tools )": "\22566|\026\\\138\197K\020\155\144/$\219\161" "Rule: ocaml dependencies ml (%=src/gfile )": "U4(<\t=rQ\240c\0278\231N\1949" +"Rule: ocaml dependencies mli (%=src/tools )": "\22566|\026\\\138\197K\020\155\144/$\219\161" diff --git a/_build/_log b/_build/_log index 7be03b8..4142a45 100644 --- a/_build/_log +++ b/_build/_log @@ -1,37 +1,45 @@ ### Starting build. # Target: src/ftest.ml.depends, tags: { extension:ml, file:src/ftest.ml, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/ftest.ml > src/ftest.ml.depends +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/ftest.ml > src/ftest.ml.depends # cached # Target: src/gfile.mli.depends, tags: { extension:mli, file:src/gfile.mli, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/gfile.mli > src/gfile.mli.depends # cached +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/gfile.mli > src/gfile.mli.depends # cached # Target: src/graph.mli.depends, tags: { extension:mli, file:src/graph.mli, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/graph.mli > src/graph.mli.depends # cached +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/graph.mli > src/graph.mli.depends # cached # Target: src/graph.cmi, tags: { byte, compile, extension:mli, file:src/graph.mli, include, interf, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/graph.cmi src/graph.mli # cached +/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/graph.cmi src/graph.mli # cached # Target: src/gfile.cmi, tags: { byte, compile, extension:mli, file:src/gfile.mli, include, interf, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/gfile.cmi src/gfile.mli # cached +/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/gfile.cmi src/gfile.mli # cached # Target: src/tools.mli.depends, tags: { extension:mli, file:src/tools.mli, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/tools.mli > src/tools.mli.depends +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/tools.mli > src/tools.mli.depends # cached # Target: src/tools.cmi, tags: { byte, compile, extension:mli, file:src/tools.mli, include, interf, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/tools.cmi src/tools.mli +/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/tools.cmi src/tools.mli # cached # Target: src/ftest.cmo, tags: { byte, compile, extension:cmo, extension:ml, file:src/ftest.cmo, file:src/ftest.ml, implem, include, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/ftest.cmo src/ftest.ml +/home/chepycou/.opam/4.14.0/bin/ocamlc.opt -c -I src -o src/ftest.cmo src/ftest.ml # cached # Target: src/gfile.ml.depends, tags: { extension:ml, file:src/gfile.ml, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/gfile.ml > src/gfile.ml.depends # cached +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/gfile.ml > src/gfile.ml.depends # cached # Target: src/graph.ml.depends, tags: { extension:ml, file:src/graph.ml, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/graph.ml > src/graph.ml.depends # cached +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/graph.ml > src/graph.ml.depends # cached # Target: src/graph.cmx, tags: { compile, extension:cmx, extension:ml, file:src/graph.cmx, file:src/graph.ml, implem, include, native, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/graph.cmx src/graph.ml # cached +/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/graph.cmx src/graph.ml # cached # Target: src/gfile.cmx, tags: { compile, extension:cmx, extension:ml, file:src/gfile.cmx, file:src/gfile.ml, implem, include, native, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/gfile.cmx src/gfile.ml # cached +/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/gfile.cmx src/gfile.ml # cached # Target: src/tools.ml.depends, tags: { extension:ml, file:src/tools.ml, include, ocaml, ocamldep, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamldep.opt -modules src/tools.ml > src/tools.ml.depends +/home/chepycou/.opam/4.14.0/bin/ocamldep.opt -modules src/tools.ml > src/tools.ml.depends # cached # Target: src/tools.cmx, tags: { compile, extension:cmx, extension:ml, file:src/tools.cmx, file:src/tools.ml, implem, include, native, ocaml, quiet, traverse } -/mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/tools.cmx src/tools.ml -+ /mnt/commetud/GEI/OCaml/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/tools.cmx src/tools.ml +/home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/tools.cmx src/tools.ml ++ /home/chepycou/.opam/4.14.0/bin/ocamlopt.opt -c -I src -o src/tools.cmx src/tools.ml File "src/tools.ml", line 1: Error: The implementation src/tools.ml does not match the interface src/tools.cmi: - The value `add_arc' is required but not provided - File "src/tools.mli", line 5, characters 0-54: Expected declaration + Values do not match: + val gmap : 'a Graph.graph -> ('a -> int) -> int Graph.graph + is not included in + val gmap : 'a Graph.graph -> ('a -> 'b) -> 'b Graph.graph + The type 'a Graph.graph -> ('a -> int) -> int Graph.graph + is not compatible with the type + 'a Graph.graph -> ('a -> 'b) -> 'b Graph.graph + Type int is not compatible with type 'b + File "src/tools.mli", line 4, characters 0-44: Expected declaration + File "src/tools.ml", line 16, characters 4-8: Actual declaration Command exited with code 2. # Compilation unsuccessful. diff --git a/_build/ocamlc.where b/_build/ocamlc.where index 58675aa..8f0bc6b 100644 --- a/_build/ocamlc.where +++ b/_build/ocamlc.where @@ -1 +1 @@ -/mnt/commetud/GEI/OCaml/.opam/4.14.0/lib/ocaml +/home/chepycou/.opam/4.14.0/lib/ocaml diff --git a/_build/src/ftest.cmi b/_build/src/ftest.cmi index c1ab6c454358df2d8ea88ca17db59c5e52d6b7fd..e83d23b83fab7baa8f4bcd28ea43ccdac52dd578 100644 GIT binary patch delta 28 mcmV+%0OSAi1M&l~f&mb+vaXsM@5jEC)LgG2mxKwEk^x}Nz73}U delta 28 kcmeyw{E2x(6Qe+u+HdpYYje!{-u39tDw%s|@+8It0KC5qE&u=k diff --git a/_build/src/ftest.cmo b/_build/src/ftest.cmo index 5f02acf825ee83aaeb70f150f6c997ab51a57749..9e9cd000b2f17da488714cbf8e62e24f32288048 100644 GIT binary patch delta 28 kcmeC(^b delta 28 kcmeC0+%kdI>)&$&UoPQ&N;vPzxUjG-@R`&V@y3Z zo>r)-X3u|X-0&JbJ3ZEH!)&Rum0~|V+vqucuHEDH7#}!i(8FfvI6oVD=2l7_@7#I& zeBRuW|A%Q`q5Rt4tnJlpSbr4@0cD$l9uhQ)b)we20@+zuLdzWbI=*8f+QM6SnJ0|Fa zraby?q>0LL-U@9DGej>6ZIPD(GS=S0GEpCS?t0b<+7HX2c{!$aHYZ!}D4W;L)l6v0 zwI+~olvO0?3mDYP8^_G4@x9Qbus}T)3(XfnV^}9TBxwH@3dnc{9SGDY`wn?-HIsst zpoeI`ptG8CtpmtxqKksYF<+ysgwPsjI-;;zW7*D)u}oCXvs_c|VgOccE`<(t9PJ`wZ*=81L-T98Kp8TZ_Y-$XBw=W34$I)bv0%Gv#KLDOg>%0s!@ z2~B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- a/_build/src/graph.mli +++ b/_build/src/graph.mli @@ -1,4 +1,4 @@ - + (* Type of a directed graph in which arcs have labels of type 'a. *) type 'a graph diff --git a/_build/src/graph.o b/_build/src/graph.o index f21c5aa3997180c9df1f7ec1a23576d70b24c87e..638e1742782f21ae0e201b6ff9d247e93c52a415 100644 GIT binary patch delta 1777 zcmZA2Ur1A76aetuURD_hCiplE{5Qn{9|peJ z%Ro9WKIlXBkOc!{5JU+*#Rw#Nh@N~Dtnk?a#m?vbZk+AFcJDpEo%5Y>zum2luZ^!p z*;>r?KZZ`vhFr}q?QQzD)>ntu2EIJ_8ooQ~a=VmIBIkr6uN9dnFKe6ba^AbFl#P~( zqD;YjD^pg=%7tHbpzuNX-DZ@BxyP+^L$;mqDApaF*zr*I5dC9NK=l&M5sgC$)kk!( zN_SBsL_ZTXLF-^VK=hDkH>6PMRHO2%iK$GOLG2>7D@0?kf!ab8h{jYgBtZ)@eif^o{q()6 zHieob%EXq&5bIrs8B{t=PO81`2C9yqb2`5vwKrg=ruKxW4#%iBN$r)hc!6PeP8f{e z!YilqJ)&utKpiBSmnvqCK+#}Y6VW2fhZs~0m1`vXlGHTAfx+OTp=$3*)&u?!<09cq z@s(&jWU*^UNY(a8wh;XdpIv07uxVqap2M+S`sdV%ND@Xch(7W_1Olt~zg vGdNFGTM!FKv><3 z{$@0T38MTIgo{@$5Ix1T*A$iK+JlWl+5)4eu|xC>)2=XTA`leTSw??VteYp=#%PD! zD4ATh5A#HM&$Ei!r?DIqxEnOg7ff>j+d*M+%>nLEp10kwvQ*PKxlD~*#eN1d$hKFm z^HfpUMH{Ax_LJvmKUQdqMEMRxt*mSBAcqf!DqmGpwtNZuL@$%)RKCHqgGh&j6=(E5 zqen3j5_lOh%taP;qd*!D)2uLh3>&2JhYj-`i#A{X}W{;wVK87`#ZQ0D6qxGf9SF#=Zq^BHnu^h9bA*3mvs+#L8 z8pec*Zn0sx zw_@%ZJWLFu*ieV>iBV6^XDf!wpJh#J#9-%)XCY!od&y28t~j!e=IlcG)=>w GdhriRx6--* diff --git a/src/tools.ml b/src/tools.ml index 7a8836e..1937ab6 100644 --- a/src/tools.ml +++ b/src/tools.ml @@ -4,11 +4,14 @@ open Graph (* assert false is of type ∀α.α, so the type-checker is happy. *) (* returns a new graph having the same nodes than gr, but no arc. *) -let clone_nodes gr = n_fold gr new_node empty_graph; -(* maps all arcs of gr by function f *) -let gmap gr f = e_fold gr (fun acc id1 id2 x -> add_arc id1 id2 (f x)) (clone_nodes gr); - +let clone_nodes gr = n_fold gr new_node empty_graph +(*adds an arc or its value if there is an existing one*) let add_arc g id1 id2 n = match find_arc g id1 id2 with - | None -> new_arc(g id1 id2 n graph) - | Some a -> new_arc(g id1 id2 n+a graph) \ No newline at end of file + | None -> new_arc g id1 id2 n + | Some a -> new_arc g id1 id2 (n + a) + +(* maps all arcs of gr by function f *) +let gmap gr f = e_fold gr (fun acc id1 id2 x -> add_arc acc id1 id2 (f x)) (clone_nodes gr) + (*TODO : ici rajouter un new_arc plutôt qu'un add_arc*) +