[SCIP] [zimpl] nested IF statement

Hartmut Henkel hartmut_henkel at gmx.de
Sat Jun 27 10:30:29 CEST 2026


Hello,

On Sun, 7 Jun 2026, Hartmut Henkel wrote:
> it seems that an IF statement in a combined constraint must be first:

seems this restriction can be removed by the following patch with one
more right recursion:

diff --git a/src/zimpl/mmlparse2.y b/src/zimpl/mmlparse2.y
index 81e0999..af9afe4 100644
--- a/src/zimpl/mmlparse2.y
+++ b/src/zimpl/mmlparse2.y
@@ -494,7 +494,7 @@ constraint_list
    : constraint {
         $$ = code_new_inst(i_constraint_list, 2, $1, code_new_inst(i_nop, 0));
      }
-   | constraint_list AND constraint {
+   | constraint_list AND constraint_list {
         $$ = code_new_inst(i_constraint_list, 2, $1, $3);
      }
    | FORALL idxset DO constraint_list {

Does anything speak against this?
For test case please see previous e-mail.

Best Regards
Hartmut


More information about the Scip mailing list