simplifying a constraint system?

Hello All
[Sorry for the very naive & basic question]
I have constructed some constraint system using the C API. I know I'm done constructing it.
Is there some function to "simplify" it or represent it more efficiently? - perhaps onverting it to NNC_Polyhedron and backwards, using ppl_new_NNC_Polyhedron_from_Constraint_System http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#304dd0846a62cb4a9f79806ea82cee5d & ppl_Polyhedron_get_minimuzed_constraints http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#85417db0eb420d402acee4ef0d842efc ? Is there some function to test that it is empty? - perhaps using http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#50d5c68064e215d3f2cf3ee69896e676ppl_new_NNC_Polyhedron_from_Constraint_System http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#304dd0846a62cb4a9f79806ea82cee5d & ppl_Polyhedron_affine_dimension http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#50d5c68064e215d3f2cf3ee69896e676 A concrete case occuring to me is the constraint system of two variables n and y with constraints {n = 10, y = 17, -n >= 0} I need to compute that it is empty.
Is there some function to test that it has integer elements, in the sense that there exist an integer setting of the variables such as the constraint are satisfied? - perhaps using grids?
Sorry for such basic questions!
Regards.
PS I'm only using the C API!

Basile STARYNKEVITCH wrote:
[Sorry for the very naive & basic question]
Hi Basile,
does this mean you did not read the manual? :-)
I have constructed some constraint system using the C API. I know I'm done constructing it.
A "constraint system" is a PPL syntactic object. As such, it is only one possible (very limited) representation for a PPL semantic object, which is what you probably want to work with.
Is there some function to "simplify" it or represent it more efficiently?
- perhaps onverting it to NNC_Polyhedron and backwards, using
ppl_new_NNC_Polyhedron_from_Constraint_System
Why NNC_Polyhedron? Do you have strict constraints? If not you should use C_Polyhedron.
& ppl_Polyhedron_get_minimuzed_constraints ?
Yes, this sequence will give you a minimized constraint system (in the precise sense stated in the documentation).
Is there some function to test that it is empty?
Of course:
int ppl_Polyhedron_is_empty(ppl_const_Polyhedron_t ph)
- perhaps using [...]
No.
A concrete case occuring to me is the constraint system of two variables n and y with constraints {n = 10, y = 17, -n >= 0} I need to compute that it is empty.
See above.
Is there some function to test that it has integer elements, in the sense that there exist an integer setting of the variables such as the constraint are satisfied?
int ppl_Polyhedron_contains_integer_point(ppl_const_Polyhedron_t ph)
Beware though that this operation can be very expensive.
- perhaps using grids?
No.
Sorry for such basic questions!
It's OK. But if you don't read the library documentation I am afraid you will not go very far. Cheers,
Roberto

Basile STARYNKEVITCH wrote:
Hello All
[Sorry for the very naive & basic question]
I have constructed some constraint system using the C API. I know I'm done constructing it.
Is there some function to "simplify" it or represent it more efficiently?
- perhaps onverting it to NNC_Polyhedron and backwards, using
ppl_new_NNC_Polyhedron_from_Constraint_System http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#304dd0846a62cb4a9f79806ea82cee5d & ppl_Polyhedron_get_minimuzed_constraints http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#85417db0eb420d402acee4ef0d842efc ? Is there some function to test that it is empty?
- perhaps using
http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#50d5c68064e215d3f2cf3ee69896e676ppl_new_NNC_Polyhedron_from_Constraint_System http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#304dd0846a62cb4a9f79806ea82cee5d & ppl_Polyhedron_affine_dimension http://www.cs.unipr.it/ppl/Documentation/user/ppl-user-c-interface-0.10-html/interfaceppl__Polyhedron__tag.html#50d5c68064e215d3f2cf3ee69896e676
A concrete case occuring to me is the constraint system of two variables n and y with constraints {n = 10, y = 17, -n >= 0} I need to compute that it is empty.
Is there some function to test that it has integer elements, in the sense that there exist an integer setting of the variables such as the constraint are satisfied?
- perhaps using grids?
Sorry for such basic questions!
Regards.
PS I'm only using the C API!
participants (2)
-
Basile STARYNKEVITCH
-
Roberto Bagnara