Enea Zaffanella wrote:
Reasoning on the user interface.
I noted that the enumeration Type and the corresponding accessor method type() are declared:
- public in Generator.defs.hh - PPL_INTERNAL (hence, private for the end-user) in Constraint.defs.hh
Also, for the class Constraint we do provide boolean tests is_equality() and is_inequality, while similar tests are not provided for Generator: we only have is_line() is declared as PPL_INTERNAL; we don't have methods is_ray() and is_vertex(). NOTE: the method is_ray_or_vertex() is PPL_INTERNAL, as it should be.
In order to have a more uniform interface, I suggest the following:
- let the enums Type and methods type() be public, so that the user has a uniform way to investigate the type of constraints/generators.
I agree.
- let the boolean tests, including the yet to be written is_ray() and is_vertex(), but excluding is_ray_or_vertex(), be either all public or all PPL_INTERNAL.
I would agree on having them all public (is_line included), even though I believed we agreed on the fact that the name "vertex" is somewhat special.
What do you think ? Should I go on and implement this change ?
Please go ahead. Roberto -- Prof. Roberto Bagnara Computer Science Group Department of Mathematics, University of Parma, Italy http://www.cs.unipr.it/~bagnara/ mailto:bagnara@cs.unipr.it