New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing parameter for internal var_dom causes seg_fault #187

Closed
gablin opened this Issue Nov 23, 2017 · 3 comments

Comments

Projects
None yet
2 participants
@gablin

gablin commented Nov 23, 2017

Running mzn2fzn on the model below causes a segmentation fault.

% Function data.
int: numOperationsInFunction;
int: numDataInFunction;
int: numBlocksInFunction;
array[allBlocksInFunction] of set of int: domSetsOfBlocksInFunction;

% Match data.
int: numMatches;
int: numOperands;
array[allOperands] of set of int: operandAlternatives;
array[allMatches] of set of int: operationsCoveredByMatch;
array[allMatches] of set of int: operandsDefinedByMatch;
array[allMatches] of set of int: operandsUsedByMatch;

% Sets to be used as array ranges.
set of int: allOperationsInFunction = 1..numOperationsInFunction;
set of int: allDataInFunction = 1..numDataInFunction;
set of int: allBlocksInFunction = 1..numBlocksInFunction;
set of int: allMatches = 1..numMatches;
set of int: allOperands = 1..numOperands;

% The 'domRelMatrix' matrix is a 2D matrix with 2 columns:
%    col 1: a block i
%        2: a block j that dominates i
% In other words, domRelMatrix has a row [i, j] if and only if j belongs to
% domSetsOfBlocksInFunction[i].
int: numDomMatrixRows =
  sum (b in allBlocksInFunction)
  ( card(domSetsOfBlocksInFunction[b]) );
array[1..numDomMatrixRows, 1..2] of allBlocksInFunction: domRelMatrix =
  array2d( 1..numDomMatrixRows
         , 1..2
         , [ if k = 1 then i else j endif | i in allBlocksInFunction
                                          , j in domSetsOfBlocksInFunction[i]
                                          , k in 1..2
           ]
         );

% The set of matches that can cover a particular operation.
array[allOperationsInFunction] of set of allMatches: matchsetOfOp =
  [ { m | m in allMatches where op in operationsCoveredByMatch[m] }
  | op in allOperationsInFunction
  ];

array[allDataInFunction] of var allBlocksInFunction: dplace;
array[allOperationsInFunction] of var allBlocksInFunction: oplace;

include "globals.mzn";

constraint
  forall ( o in allOperationsInFunction )
  ( let { set of allMatches: M = matchsetOfOp[o]
        , int: mo = min({ m | m in M
                              where card(operationsCoveredByMatch[m]) = 1
                        })
        , set of allDataInFunction: DD =
            { d | p in operandsDefinedByMatch[mo]
                , d in operandAlternatives[p]
            }
        , set of allDataInFunction: DU = { d | p in operandsUsedByMatch[mo]
                                             , d in operandAlternatives[p]
                                         }
        }
    in forall (dd in DD, du in DU)
       ( if forall (m in M)
            ( exists (p in operandsDefinedByMatch[m])
              ( operandAlternatives[p] = {dd} )
              /\
              exists (p in operandsUsedByMatch[m])
              ( operandAlternatives[p] = {du} )
            )
         then table([dplace[dd], dplace[du]], domRelMatrix) /\
              oplace[o] = dplace[dd]
         else true
         endif
       )
  );

solve satisfy;


domSetsOfBlocksInFunction = array1d(allBlocksInFunction, [{1, 3, 5}, {2, 8, 1, 3, 5}, {3, 5}, {4, 3, 5}, {5}, {6, 5}, {7, 4, 3, 5}, {8, 1, 3, 5}]);

numBlocksInFunction = 8;

numDataInFunction = 202;

numOperationsInFunction = 186;

operationsCoveredByMatch = array1d(allMatches, [{185}, {181}, {146}, {126}, {122}, {120}, {116}, {114}, {107}, {99}, {95}, {92}, {90}, {86}, {84}, {82}, {29}, {28}, {27}, {25}, {24}, {23}, {22}, {13}, {12}, {11}, {64}, {69}, {67}, {186}, {184}, {182}, {180}, {178}, {175}, {174}, {172}, {170}, {169}, {167}, {165}, {164}, {162}, {160}, {159}, {157}, {155}, {154}, {152}, {150}, {149}, {147}, {145}, {144}, {142}, {141}, {140}, {139}, {138}, {137}, {136}, {135}, {134}, {133}, {132}, {131}, {130}, {129}, {128}, {127}, {125}, {124}, {123}, {121}, {119}, {118}, {117}, {115}, {112}, {110}, {109}, {108}, {106}, {105}, {104}, {103}, {102}, {101}, {100}, {98}, {96}, {94}, {93}, {91}, {89}, {88}, {87}, {85}, {83}, {81}, {80}, {79}, {78}, {77}, {76}, {75}, {74}, {73}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {58, 59, 60, 177, 178, 179}, {53, 54, 55, 171, 172, 173}, {49, 50, 51, 166, 167, 168}, {45, 46, 47, 161, 162, 163}, {41, 42, 43, 156, 157, 158}, {37, 38, 39, 151, 152, 153}, {33, 34, 35, 146, 147, 148}, {58, 30, 31, 134, 177, 143}, {53, 30, 31, 134, 171, 143}, {49, 30, 31, 134, 166, 143}, {45, 30, 31, 134, 161, 143}, {41, 30, 31, 134, 156, 143}, {37, 30, 31, 134, 151, 143}, {33, 30, 31, 134, 146, 143}, {19, 14, 15, 109, 116, 111}, {63, 30, 31, 134, 143}, {58, 30, 31, 134, 143}, {53, 30, 31, 134, 143}, {49, 30, 31, 134, 143}, {45, 30, 31, 134, 143}, {41, 30, 31, 134, 143}, {37, 30, 31, 134, 143}, {33, 30, 31, 134, 143}, {19, 14, 15, 109, 111}, {7, 21, 95, 96}, {56, 61, 175}, {52, 56, 170}, {48, 52, 165}, {44, 48, 160}, {40, 44, 155}, {36, 40, 150}, {32, 36, 145}, {7, 21, 96}, {59, 60, 179}, {54, 55, 173}, {50, 51, 168}, {46, 47, 163}, {42, 43, 158}, {38, 39, 153}, {34, 35, 148}, {30, 31, 143}, {14, 15, 111}, {8, 9, 97}, {57, 176}, {17, 113}, {5, 92}, {2, 84}, {63, 183}, {58, 177}, {53, 171}, {49, 166}, {45, 161}, {41, 156}, {37, 151}, {33, 146}, {19, 116}, {7, 95}, {3, 86}, {10, 99}, {61}, {57}, {56}, {52}, {48}, {44}, {40}, {36}, {32}, {17}, {16}, {5}, {2}, {63}, {58}, {53}, {49}, {45}, {41}, {37}, {33}, {21}, {19}, {7}, {3}, {72}, {69}, {67}, {70}, {66}, {65}, {70}, {66}, {65}, {183}, {177}, {171}, {166}, {161}, {156}, {151}, {146}, {116}, {95}, {185}, {181}, {176}, {126}, {122}, {120}, {114}, {113}, {107}, {99}, {92}, {90}, {86}, {84}, {82}, {20}, {10}, {6}, {71}, {68}, {3, 4, 86, 87, 90}, {62, 181}, {18, 114}, {4, 90}, {1, 82}, {26, 126}, {70}, {66}, {65}, {71}, {68}, {26}, {62}, {18}, {4}, {1}]);

operandsDefinedByMatch = array1d(allMatches, [{828}, {830}, {832}, {834}, {836}, {838}, {840}, {842}, {844}, {846}, {848}, {850}, {852}, {854}, {856}, {858}, {609}, {612}, {615}, {618}, {621}, {624}, {627}, {630}, {633}, {636}, {639}, {}, {}, {670}, {672}, {674}, {676}, {678}, {680}, {682}, {684}, {686}, {688}, {690}, {692}, {694}, {696}, {698}, {700}, {702}, {704}, {706}, {708}, {710}, {712}, {714}, {716}, {718}, {720}, {722}, {724}, {726}, {728}, {730}, {732}, {734}, {736}, {738}, {740}, {742}, {744}, {746}, {748}, {750}, {752}, {754}, {756}, {758}, {760}, {762}, {764}, {766}, {768}, {770}, {772}, {774}, {776}, {778}, {780}, {782}, {784}, {786}, {788}, {790}, {792}, {794}, {796}, {798}, {800}, {802}, {804}, {806}, {808}, {810}, {812}, {814}, {816}, {818}, {820}, {822}, {824}, {826}, {643}, {644}, {645}, {646}, {647}, {648}, {649}, {650}, {651}, {652}, {653}, {654}, {655}, {656}, {657}, {658}, {659}, {660}, {661}, {662}, {663}, {664}, {665}, {666}, {667}, {668}, {243, 245, 246, 247, 248, 249, 250}, {253, 255, 256, 257, 258, 259, 260}, {263, 265, 266, 267, 268, 269, 270}, {273, 275, 276, 277, 278, 279, 280}, {283, 285, 286, 287, 288, 289, 290}, {293, 295, 296, 297, 298, 299, 300}, {303, 305, 306, 307, 308, 309, 310}, {367, 369, 370, 371, 373, 374, 375}, {378, 380, 381, 382, 384, 385, 386}, {389, 391, 392, 393, 395, 396, 397}, {400, 402, 403, 404, 406, 407, 408}, {411, 413, 414, 415, 417, 418, 419}, {422, 424, 425, 426, 428, 429, 430}, {433, 435, 436, 437, 439, 440, 441}, {444, 446, 447, 448, 450, 451, 452}, {455, 457, 458, 459, 461, 462}, {465, 467, 468, 469, 471, 472}, {475, 477, 478, 479, 481, 482}, {485, 487, 488, 489, 491, 492}, {495, 497, 498, 499, 501, 502}, {505, 507, 508, 509, 511, 512}, {515, 517, 518, 519, 521, 522}, {525, 527, 528, 529, 531, 532}, {535, 537, 538, 539, 541, 542}, {4, 5, 6, 7}, {11, 12, 13}, {17, 18, 19}, {23, 24, 25}, {29, 30, 31}, {35, 36, 37}, {41, 42, 43}, {47, 48, 49}, {53, 54, 55}, {313, 314, 315, 316}, {319, 320, 321, 322}, {325, 326, 327, 328}, {331, 332, 333, 334}, {337, 338, 339, 340}, {343, 344, 345, 346}, {349, 350, 351, 352}, {355, 356, 357, 358}, {361, 362, 363, 364}, {606, 607, 608}, {58, 59}, {62, 63}, {66, 67}, {70, 71}, {74, 75}, {78, 79}, {82, 83}, {86, 87}, {90, 91}, {94, 95}, {98, 99}, {102, 103}, {106, 107}, {110, 111}, {194, 195}, {595, 596}, {114}, {117}, {120}, {123}, {126}, {129}, {132}, {135}, {138}, {141}, {144}, {147}, {150}, {153}, {156}, {159}, {162}, {165}, {168}, {171}, {174}, {177}, {180}, {183}, {198}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {544}, {546}, {548}, {550}, {552}, {554}, {556}, {558}, {560}, {562}, {564}, {566}, {568}, {570}, {572}, {574}, {576}, {578}, {580}, {582}, {584}, {586}, {588}, {590}, {592}, {599}, {602}, {604}, {}, {}, {186, 188, 189, 190, 191}, {204, 205}, {208, 209}, {212, 213}, {216, 217}, {232, 233}, {}, {}, {}, {}, {}, {201}, {220}, {223}, {226}, {229}]);

operandsUsedByMatch = array1d(allMatches, [{827}, {829}, {831}, {833}, {835}, {837}, {839}, {841}, {843}, {845}, {847}, {849}, {851}, {853}, {855}, {857}, {610, 611}, {613, 614}, {616, 617}, {619, 620}, {622, 623}, {625, 626}, {628, 629}, {631, 632}, {634, 635}, {637, 638}, {640, 641, 642}, {}, {}, {669}, {671}, {673}, {675}, {677}, {679}, {681}, {683}, {685}, {687}, {689}, {691}, {693}, {695}, {697}, {699}, {701}, {703}, {705}, {707}, {709}, {711}, {713}, {715}, {717}, {719}, {721}, {723}, {725}, {727}, {729}, {731}, {733}, {735}, {737}, {739}, {741}, {743}, {745}, {747}, {749}, {751}, {753}, {755}, {757}, {759}, {761}, {763}, {765}, {767}, {769}, {771}, {773}, {775}, {777}, {779}, {781}, {783}, {785}, {787}, {789}, {791}, {793}, {795}, {797}, {799}, {801}, {803}, {805}, {807}, {809}, {811}, {813}, {815}, {817}, {819}, {821}, {823}, {825}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {241, 242, 243, 244, 246, 248, 249, 250}, {251, 252, 253, 254, 256, 258, 259, 260}, {261, 262, 263, 264, 266, 268, 269, 270}, {271, 272, 273, 274, 276, 278, 279, 280}, {281, 282, 283, 284, 286, 288, 289, 290}, {291, 292, 293, 294, 296, 298, 299, 300}, {301, 302, 303, 304, 306, 308, 309, 310}, {365, 366, 368, 370, 372, 373, 374, 375}, {376, 377, 379, 381, 383, 384, 385, 386}, {387, 388, 390, 392, 394, 395, 396, 397}, {398, 399, 401, 403, 405, 406, 407, 408}, {409, 410, 412, 414, 416, 417, 418, 419}, {420, 421, 423, 425, 427, 428, 429, 430}, {431, 432, 434, 436, 438, 439, 440, 441}, {442, 443, 445, 447, 449, 450, 451, 452}, {453, 454, 456, 458, 460, 461, 462}, {463, 464, 466, 468, 470, 471, 472}, {473, 474, 476, 478, 480, 481, 482}, {483, 484, 486, 488, 490, 491, 492}, {493, 494, 496, 498, 500, 501, 502}, {503, 504, 506, 508, 510, 511, 512}, {513, 514, 516, 518, 520, 521, 522}, {523, 524, 526, 528, 530, 531, 532}, {533, 534, 536, 538, 540, 541, 542}, {1, 2, 3, 4, 6, 7}, {8, 9, 10, 11, 13}, {14, 15, 16, 17, 19}, {20, 21, 22, 23, 25}, {26, 27, 28, 29, 31}, {32, 33, 34, 35, 37}, {38, 39, 40, 41, 43}, {44, 45, 46, 47, 49}, {50, 51, 52, 53, 55}, {311, 312, 314, 316}, {317, 318, 320, 322}, {323, 324, 326, 328}, {329, 330, 332, 334}, {335, 336, 338, 340}, {341, 342, 344, 346}, {347, 348, 350, 352}, {353, 354, 356, 358}, {359, 360, 362, 364}, {605, 606, 608}, {56, 57, 59}, {60, 61, 63}, {64, 65, 67}, {68, 69, 71}, {72, 73, 75}, {76, 77, 79}, {80, 81, 83}, {84, 85, 87}, {88, 89, 91}, {92, 93, 95}, {96, 97, 99}, {100, 101, 103}, {104, 105, 107}, {108, 109, 111}, {192, 193, 195}, {593, 594, 596}, {112, 113}, {115, 116}, {118, 119}, {121, 122}, {124, 125}, {127, 128}, {130, 131}, {133, 134}, {136, 137}, {139, 140}, {142, 143}, {145, 146}, {148, 149}, {151, 152}, {154, 155}, {157, 158}, {160, 161}, {163, 164}, {166, 167}, {169, 170}, {172, 173}, {175, 176}, {178, 179}, {181, 182}, {196, 197}, {234}, {}, {}, {235}, {236}, {237}, {238}, {239}, {240}, {543}, {545}, {547}, {549}, {551}, {553}, {555}, {557}, {559}, {561}, {563}, {565}, {567}, {569}, {571}, {573}, {575}, {577}, {579}, {581}, {583}, {585}, {587}, {589}, {591}, {597, 598}, {600, 601}, {603}, {862}, {863}, {184, 185, 186, 187, 189, 190, 191}, {202, 203, 205}, {206, 207, 209}, {210, 211, 213}, {214, 215, 217}, {230, 231, 233}, {859}, {860}, {861}, {864}, {865}, {199, 200}, {218, 219}, {221, 222}, {224, 225}, {227, 228}]);

numMatches = 273;

numOperands = 865;

operandAlternatives = array1d(allOperands, [{85, 86, 87}, {106}, {201}, {9}, {25}, {107}, {108}, {192}, {182}, {186}, {75}, {31}, {187}, {186}, {177}, {181}, {69}, {75}, {182}, {181}, {172}, {176}, {63}, {69}, {177}, {176}, {167}, {171}, {57}, {63}, {172}, {171}, {162}, {166}, {51}, {57}, {167}, {166}, {157}, {161}, {45}, {51}, {162}, {161}, {142}, {156}, {40}, {45}, {157}, {85, 86, 87}, {106}, {107, 128, 158}, {9}, {25}, {108}, {145}, {76}, {33}, {188}, {115}, {201}, {13}, {125}, {99, 100, 101}, {202}, {7}, {104}, {88, 89, 90, 91, 92, 93}, {202}, {4}, {96}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {82}, {83}, {195}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {200}, {77}, {189}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {70}, {71}, {183}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {64}, {65}, {178}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {58}, {59}, {173}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {52}, {53}, {168}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {46}, {47}, {163}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {201}, {41}, {158}, {121, 122}, {201}, {23}, {128}, {106}, {201}, {9}, {107}, {187}, {192}, {31}, {145}, {188}, {33}, {182}, {186}, {75}, {177}, {181}, {69}, {172}, {176}, {63}, {167}, {171}, {57}, {162}, {166}, {51}, {157}, {161}, {45}, {142}, {156}, {40}, {115}, {125}, {13}, {120}, {124}, {15}, {99, 100, 101}, {96, 104}, {7}, {88, 89, 90, 91, 92, 93}, {96, 104}, {4}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {195}, {83}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {189}, {77}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {183}, {71}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {178}, {65}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {173}, {59}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {168}, {53}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {163}, {47}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {107, 128, 158}, {41}, {85, 86, 87}, {108}, {25}, {121, 122}, {107, 128, 158}, {23}, {106}, {107, 128, 158}, {9}, {200}, {88, 89, 90, 91, 92, 93}, {5}, {199}, {6}, {98}, {99}, {102}, {88, 89, 90, 91, 92, 93}, {200}, {5}, {98}, {88, 89, 90, 91, 92, 93}, {98, 138}, {5}, {98, 138}, {97}, {30}, {199}, {143, 144}, {81}, {193}, {199}, {113, 114}, {22}, {126}, {199}, {99, 100, 101}, {6}, {102}, {199}, {88, 89, 90, 91, 92, 93}, {3}, {94}, {143, 144}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {81}, {113, 114}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {22}, {99, 100, 101}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {6}, {88, 89, 90, 91, 92, 93}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {3}, {200}, {97}, {30}, {138}, {198}, {139}, {103}, {95}, {139}, {103}, {95}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {200}, {77}, {72}, {78}, {79}, {80}, {189}, {190}, {191}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {70}, {71}, {66}, {72}, {73}, {74}, {183}, {184}, {185}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {64}, {65}, {60}, {66}, {67}, {68}, {178}, {179}, {180}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {58}, {59}, {54}, {60}, {61}, {62}, {173}, {174}, {175}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {52}, {53}, {48}, {54}, {55}, {56}, {168}, {169}, {170}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {46}, {47}, {42}, {48}, {49}, {50}, {163}, {164}, {165}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {201}, {41}, {37}, {42}, {43}, {44}, {158}, {159}, {160}, {190}, {72}, {78}, {79}, {80}, {191}, {184}, {66}, {72}, {73}, {74}, {185}, {179}, {60}, {66}, {67}, {68}, {180}, {174}, {54}, {60}, {61}, {62}, {175}, {169}, {48}, {54}, {55}, {56}, {170}, {164}, {42}, {48}, {49}, {50}, {165}, {159}, {37}, {42}, {43}, {44}, {160}, {146, 147, 148, 149, 150, 151, 152, 153, 154}, {36}, {37}, {38}, {39}, {155}, {121, 122}, {18}, {19}, {20}, {21}, {123}, {35}, {200}, {77}, {36}, {37}, {38}, {39}, {153}, {146}, {189}, {155}, {35}, {70}, {71}, {36}, {37}, {38}, {39}, {152}, {146}, {183}, {155}, {35}, {64}, {65}, {36}, {37}, {38}, {39}, {151}, {146}, {178}, {155}, {35}, {58}, {59}, {36}, {37}, {38}, {39}, {150}, {146}, {173}, {155}, {35}, {52}, {53}, {36}, {37}, {38}, {39}, {149}, {146}, {168}, {155}, {35}, {46}, {47}, {36}, {37}, {38}, {39}, {148}, {146}, {163}, {155}, {35}, {201}, {41}, {36}, {37}, {38}, {39}, {147}, {146}, {158}, {155}, {17}, {201}, {23}, {18}, {19}, {20}, {21}, {122}, {121}, {128}, {123}, {35}, {195}, {83}, {36}, {37}, {38}, {39}, {154}, {146}, {155}, {35}, {189}, {77}, {36}, {37}, {38}, {39}, {153}, {146}, {155}, {35}, {183}, {71}, {36}, {37}, {38}, {39}, {152}, {146}, {155}, {35}, {178}, {65}, {36}, {37}, {38}, {39}, {151}, {146}, {155}, {35}, {173}, {59}, {36}, {37}, {38}, {39}, {150}, {146}, {155}, {35}, {168}, {53}, {36}, {37}, {38}, {39}, {149}, {146}, {155}, {35}, {163}, {47}, {36}, {37}, {38}, {39}, {148}, {146}, {155}, {35}, {107, 128, 158}, {41}, {36}, {37}, {38}, {39}, {147}, {146}, {155}, {17}, {107, 128, 158}, {23}, {18}, {19}, {20}, {21}, {122}, {121}, {123}, {82}, {195}, {200}, {189}, {70}, {183}, {64}, {178}, {58}, {173}, {52}, {168}, {46}, {163}, {201}, {158}, {201}, {128}, {201}, {107}, {199}, {197}, {199}, {193}, {76}, {188}, {200}, {138}, {199}, {134}, {199}, {132}, {199}, {126}, {201}, {125}, {199}, {119}, {199}, {111}, {202}, {104}, {199}, {102}, {200}, {98}, {202}, {96}, {199}, {94}, {199}, {110}, {12}, {111}, {88, 89, 90, 91, 92, 93}, {99, 100, 101}, {24}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {110}, {12}, {105}, {8}, {88, 89, 90, 91, 92, 93}, {10}, {11}, {109}, {35}, {137}, {196}, {34}, {136}, {143, 144}, {32}, {135}, {140, 141}, {29}, {85, 86, 87}, {131}, {28}, {88, 89, 90, 91, 92, 93}, {130}, {27}, {116, 117, 118}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {26}, {116, 117, 118}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {17}, {85, 86, 87}, {129}, {16}, {116, 117, 118}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {14}, {112}, {113, 114}, {84}, {133}, {140, 141}, {94, 102, 111, 119, 126, 132, 134, 193, 197}, {35}, {34}, {32}, {17}, {16}, {14}, {29}, {28}, {27}, {26}, {84}, {202}, {201}, {200}, {199}, {82}, {76}, {70}, {64}, {58}, {52}, {46}, {2}, {1}, {36}, {18}, {84}, {198}, {83}, {196}, {81}, {194}, {80}, {192}, {77}, {190}, {75}, {187}, {74}, {186}, {71}, {184}, {69}, {182}, {68}, {181}, {65}, {179}, {63}, {177}, {62}, {176}, {59}, {174}, {57}, {172}, {56}, {171}, {53}, {169}, {51}, {167}, {50}, {166}, {47}, {164}, {45}, {162}, {44}, {161}, {41}, {159}, {40}, {157}, {39}, {156}, {35}, {154}, {35}, {153}, {35}, {152}, {35}, {151}, {35}, {150}, {35}, {149}, {35}, {148}, {35}, {147}, {35}, {146}, {34}, {145}, {33}, {144}, {33}, {143}, {32}, {142}, {31}, {141}, {31}, {140}, {30}, {139}, {29}, {137}, {28}, {136}, {27}, {135}, {26}, {133}, {25}, {131}, {24}, {130}, {23}, {129}, {22}, {127}, {21}, {124}, {17}, {122}, {17}, {121}, {16}, {120}, {15}, {118}, {15}, {117}, {15}, {116}, {14}, {115}, {13}, {114}, {13}, {113}, {12}, {112}, {11}, {110}, {9}, {108}, {8}, {106}, {7}, {105}, {6}, {103}, {5}, {101}, {5}, {100}, {5}, {99}, {4}, {97}, {3}, {95}, {2}, {93}, {2}, {92}, {2}, {91}, {2}, {90}, {2}, {89}, {2}, {88}, {1}, {87}, {1}, {86}, {1}, {85}, {199}, {197}, {199}, {193}, {201}, {158}, {200}, {138}, {199}, {134}, {199}, {132}, {201}, {128}, {199}, {126}, {199}, {119}, {199}, {111}, {201}, {107}, {202}, {104}, {199}, {102}, {200}, {98}, {202}, {96}, {199}, {94}, {139}, {103}, {95}, {194}, {127}, {194}, {127}]);
@Dekker1

This comment has been minimized.

Member

Dekker1 commented Nov 23, 2017

Thank you for reporting the problem. The following are some notes of on initial trace of the problem:

The error appears to be caused when trying to match function call var_dom(,allDataInFunction) to it's declaration. It appears the first parameter of the call is missing, causing the error.

The call is made while flattening the variable declaration
set of allDataInFunction: DD = {d | p in operandsDefinedByMatch[mo], d in operandAlternatives[p], }

in expression

let {
  set of allMatches: M = 177..177,
  int: mo = infinity, set of allDataInFunction: DD = {d | p in operandsDefinedByMatch[mo], d in operandAlternatives[p], },
  set of allDataInFunction: DU = {d | p in operandsUsedByMatch[mo],d in operandAlternatives[p], }
} in (
   forall([if forall([exists([operandAlternatives[p]=={dd} | p in operandsDefinedByMatch[m], ]) /\ exists([operandAlternatives[p]=={du} | p in operandsUsedByMatch[m], ]) | m in M, ]) then table([dplace[dd],dplace[du]],domRelMatrix) /\ oplace[o]==dplace[dd] else true endif | dd in DD, du in DU, ])
)

@Dekker1 Dekker1 changed the title from mzn2fzn seg faults to Missing parameter for internal var_dom causes seg_fault Nov 23, 2017

@Dekker1 Dekker1 added the bug label Nov 23, 2017

guidotack added a commit that referenced this issue Nov 23, 2017

Create dummy return values for functions that have an undefined resul…
…t (previously flattening would crash on NULL return values). Fixes #187.
@Dekker1

This comment has been minimized.

Member

Dekker1 commented Nov 24, 2017

@gablin The issue has been fixed on the current development branch

@gablin

This comment has been minimized.

gablin commented Nov 24, 2017

Pulling the latest changes from the develop branch indeed fixes this issue.
The model still fails, however, but that's due to a bug in my model that I managed to discover this fix.

@gablin gablin closed this Nov 24, 2017

guidotack added a commit that referenced this issue Jan 10, 2018

Create dummy return values for functions that have an undefined resul…
…t (previously flattening would crash on NULL return values). Fixes #187.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment