git-subtree-dir: software/mza git-subtree-split: f970a59b177c13ca3dd8aaef8cc6681d83b7e813
38 lines
988 B
C++
38 lines
988 B
C++
/* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */
|
|
|
|
/*
|
|
* Main authors:
|
|
* Guido Tack <guido.tack@monash.edu>
|
|
*/
|
|
|
|
/* 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 <minizinc/flatten_internal.hh>
|
|
#include <minizinc/hash.hh>
|
|
|
|
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<optimizer>::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
|