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 
18 /// Remove all output annotations from \a vd
19 void remove_is_output(VarDecl* vd);
20 
21 /// Copy output item to FlatZinc model
22 void copy_output(EnvI& e);
23 
24 /// Copy all dependent variable declarations
25 void output_vardecls(EnvI& env, Item* ci, Expression* e);
26 
27 /// Create initial output model
28 void create_output(EnvI& e, FlatteningOptions::OutputMode outputMode, bool outputObjective,
29                    bool includeOutputItem, bool hasChecker);
30 
31 void check_output_par_fn(EnvI& e, Call* rhs);
32 
33 /// Finalise output model after flattening is complete
34 void finalise_output(EnvI& e);
35 
36 /// Remove all links to variables in flat model from output model in \a env
37 void cleanup_output(EnvI& env);
38 
39 ArrayLit* create_json_output(EnvI& env, bool outputObjective, bool includeOutputItem,
40                              bool hasChecker);
41 
42 }  // namespace MiniZinc
43