Replace generic hash table by functorial in WeakTopological#99
Merged
backtracking merged 1 commit intobacktracking:masterfrom Mar 30, 2020
Merged
Conversation
Contributor
|
The fix looks perfect. Do you think your example should be added to tests/test_wto.ml ? |
Owner
|
Good catch. Many thanks for the fix. |
Contributor
Author
I don't think this can be reintroduced again so adding the test is not necessary. |
backtracking
added a commit
to backtracking/opam-repository
that referenced
this pull request
Oct 2, 2020
CHANGES:
- port to dune and opam 2.0
- ❗ opam package now split into two packages: ocamlgraph and ocamlgraph_gtk
- [WeakTopological] fixed incorrect use of generic hash tables
(backtracking/ocamlgraph#99, Tomáš Dacík)
- [Oper] fixed transitive_reduction (backtracking/ocamlgraph#91)
- fix incorrect uses of polymorphic equality (Steffen Smolka, Boris Yakobowski)
- [Coloring] fixed generation of OCamlDoc documentation
(contributed by Earnestly)
- ❗ [Coloring] functions now fail if the graph is directed
- ❗ [Coloring] now uses a single, global exception [NoColoring]
- [Coloring] new function two_color to 2-color a graph (or fail)
- ❗ [Fixpoint] Take initial labeling of nodes into account (Johannes Kloos)
mseri
pushed a commit
to ocaml/opam-repository
that referenced
this pull request
Oct 8, 2020
* [new release] ocamlgraph_gtk and ocamlgraph (2.0.0)
CHANGES:
- port to dune and opam 2.0
- ❗ opam package now split into two packages: ocamlgraph and ocamlgraph_gtk
- [WeakTopological] fixed incorrect use of generic hash tables
(backtracking/ocamlgraph#99, Tomáš Dacík)
- [Oper] fixed transitive_reduction (backtracking/ocamlgraph#91)
- fix incorrect uses of polymorphic equality (Steffen Smolka, Boris Yakobowski)
- [Coloring] fixed generation of OCamlDoc documentation
(contributed by Earnestly)
- ❗ [Coloring] functions now fail if the graph is directed
- ❗ [Coloring] now uses a single, global exception [NoColoring]
- [Coloring] new function two_color to 2-color a graph (or fail)
- ❗ [Fixpoint] Take initial labeling of nodes into account (Johannes Kloos)
* ocamlgraph.2.0.0: added depends graphics with-test
* ocamlgraph_gtk.2.0.0: added depends graphics with-test
* ocamlgraph 2.0.0 requires OCaml >= 4.03.0
* added a constraint 'ocamlgraph <= 1.8.8'
* better constraints (suggested by David Allsopp)
fdopen
added a commit
to fdopen/opam-repository-mingw
that referenced
this pull request
Oct 8, 2020
* [new release] ocamlgraph_gtk and ocamlgraph (2.0.0)
CHANGES:
- port to dune and opam 2.0
- ❗ opam package now split into two packages: ocamlgraph and ocamlgraph_gtk
- [WeakTopological] fixed incorrect use of generic hash tables
(backtracking/ocamlgraph#99, Tomáš Dacík)
- [Oper] fixed transitive_reduction (backtracking/ocamlgraph#91)
- fix incorrect uses of polymorphic equality (Steffen Smolka, Boris Yakobowski)
- [Coloring] fixed generation of OCamlDoc documentation
(contributed by Earnestly)
- ❗ [Coloring] functions now fail if the graph is directed
- ❗ [Coloring] now uses a single, global exception [NoColoring]
- [Coloring] new function two_color to 2-color a graph (or fail)
- ❗ [Fixpoint] Take initial labeling of nodes into account (Johannes Kloos)
* ocamlgraph.2.0.0: added depends graphics with-test
* ocamlgraph_gtk.2.0.0: added depends graphics with-test
* ocamlgraph 2.0.0 requires OCaml >= 4.03.0
* added a constraint 'ocamlgraph <= 1.8.8'
* better constraints (suggested by David Allsopp)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In WeakTopological module, a generic hash table is used to store vertices. This could result in the error when a custom compare function is used. A trivial example is:
During iterating on successors of the vertex (3,0) at WeakTopological:L65, due to use of Pervasives.compare function by the generic hash table, search of the vertex (4,1) raises Not_found exception, because only the vertex (4,0) is present.
I believe this could be fixed by using a functorial hash table.