| 1929 | } |
| 1930 | } |
| 1931 | void p_set_in(FlatZincSpace& s, const ConExpr& ce, AST::Node *) { |
| 1932 | if (!ce[1]->isSetVar()) { |
| 1933 | IntSet d = s.arg2intset(ce[1]); |
| 1934 | if (ce[0]->isBoolVar()) { |
| 1935 | IntSetRanges dr(d); |
| 1936 | Iter::Ranges::Singleton sr(0,1); |
| 1937 | Iter::Ranges::Inter<IntSetRanges,Iter::Ranges::Singleton> i(dr,sr); |
| 1938 | IntSet d01(i); |
| 1939 | if (d01.size() == 0) { |
| 1940 | s.fail(); |
| 1941 | } else { |
| 1942 | rel(s, s.arg2BoolVar(ce[0]), IRT_GQ, d01.min()); |
| 1943 | rel(s, s.arg2BoolVar(ce[0]), IRT_LQ, d01.max()); |
| 1944 | } |
| 1945 | } else { |
| 1946 | dom(s, s.arg2IntVar(ce[0]), d); |
| 1947 | } |
| 1948 | } else { |
| 1949 | if (!ce[0]->isIntVar()) { |
| 1950 | dom(s, s.arg2SetVar(ce[1]), SRT_SUP, ce[0]->getInt()); |
| 1951 | } else { |
| 1952 | rel(s, s.arg2SetVar(ce[1]), SRT_SUP, s.arg2IntVar(ce[0])); |
| 1953 | } |
| 1954 | } |
| 1955 | } |
| 1956 | void p_set_rel_reif(FlatZincSpace& s, SetRelType srt, const ConExpr& ce) { |
| 1957 | rel(s, s.arg2SetVar(ce[0]), srt, s.arg2SetVar(ce[1]), |
| 1958 | s.arg2BoolVar(ce[2])); |
nothing calls this directly
no test coverage detected