Exemple #1
0
	void FlatZincSpace::setOutputElem(AST::Node* ai) const {
		if (ai->isIntVar()) {
			output_var(iv[ai->getIntVar()]);
		} else if (ai->isBoolVar()) {
			output_var(new BoolView(bv[ai->getBoolVar()]));
		}
	}
Variable_ID Rel_Body::get_local(const Variable_ID v)
    {
    Global_Var_ID g;
    if (v->kind() == Global_Var) {
	     	g = v->get_global_var();
	     	if (g->arity()) return get_local(g,v->function_of());
		return get_local(g);
		}
    if (is_set()) return set_var(v->get_position());
    if (v->kind() == Input_Var) return input_var(v->get_position());
    if (v->kind() == Output_Var) return output_var(v->get_position());
    assert(0 && "Can only get local for variable with global scope");
    exit(1);
    return 0;
    }