/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ /* * Main authors: * Guido Tack */ /* This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __MINIZINC_OPTIMIZE_CONSTRAINTS_HH__ #define __MINIZINC_OPTIMIZE_CONSTRAINTS_HH__ #include #include namespace MiniZinc { class OptimizeRegistry { public: enum ConstraintStatus { CS_NONE, CS_OK, CS_FAILED, CS_ENTAILED, CS_REWRITE }; typedef ConstraintStatus (*optimizer)(EnvI& env, Item* i, Call* c, Expression*& rewrite); protected: ASTStringMap::t _m; public: void reg(const ASTString& call, optimizer); ConstraintStatus process(EnvI& env, Item* i, Call* c, Expression*& rewrite); static OptimizeRegistry& registry(void); }; } // namespace MiniZinc #endif