PCG
PCG copied to clipboard
In new graph representation add validation module
In the new graph representation add a function validate :: Graph f c e n t -> Bool
which checks that the graph we have is indeed a valid phylogenetic network in the sense in which we define it.
Using this function, define a function in the test suite which will take an arbitrary graph transformation (for instance one of the graph moves) and create a property test stating that this preserves validation. This can be used to property test graph manipulations as well as code to add e.g. add network edges.