1 /* -*- mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*- */ 2 3 /* 4 * Main authors: 5 * Guido Tack <guido.tack@monash.edu> 6 */ 7 8 /* This Source Code Form is subject to the terms of the Mozilla Public 9 * License, v. 2.0. If a copy of the MPL was not distributed with this 10 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 11 12 #pragma once 13 14 #include <minizinc/flatten_internal.hh> 15 16 namespace MiniZinc { 17 void add_path_annotation(EnvI& env, Expression* e); 18 void add_ctx_ann(VarDecl* vd, BCtx& c); 19 bool istrue(EnvI& env, Expression* e); 20 bool isfalse(EnvI& env, Expression* e); 21 Expression* create_dummy_value(EnvI& env, const Type& t); 22 TypeInst* eval_typeinst(EnvI& env, const Ctx& ctx, VarDecl* vd); 23 24 KeepAlive bind(EnvI& env, Ctx ctx, VarDecl* vd, Expression* e); 25 KeepAlive conj(EnvI& env, VarDecl* b, const Ctx& ctx, const std::vector<EE>& e); 26 27 VarDecl* new_vardecl(EnvI& env, const Ctx& ctx, TypeInst* ti, Id* origId, VarDecl* origVd, 28 Expression* rhs); 29 30 KeepAlive flat_cv_exp(EnvI& env, Ctx ctx, Expression* e); 31 32 void make_defined_var(VarDecl* vd, Call* c); 33 void check_index_sets(EnvI& env, VarDecl* vd, Expression* e); 34 35 class CallArgItem { 36 public: 37 EnvI& env; 38 CallArgItem(EnvI& env0); 39 ~CallArgItem(); 40 }; 41 42 } // namespace MiniZinc 43