56 std::vector<std::pair<std::string,std::string>>
const & defines,
57 Verbosity::Level verbosity = Verbosity::Silent);
66 int parse (std::string
const & f);
69 void error (pparser::location
const & l, std::string
const & m);
71 void error (std::string
const & m);
74 std::string
const & m)
const;
78 std::vector<ast::Label> labels;
79 std::vector<ast::Constant> constants;
80 std::vector<ast::Formula> formulae;
81 std::vector<ast::Module> modules;
82 std::vector<ast::ModuleRenaming> renamings;
83 std::vector<ast::RewardSection> rewards;
84 std::vector<ast::Player> players;
85 std::vector<ast::Variable> globals;
86 Verbosity::Level verbosity;
87 ast::ModelType modelType;
90 std::map<std::string, int> intConstantMap;
92 std::map<std::string, double> doubleConstantMap;
94 std::map<std::string, bool> boolConstantMap;
97 using CommandList = std::vector<std::pair<int,size_t>>;
99 using EnabledMap = std::multimap<Action,std::pair<size_t,size_t>>;
101 using EnabledCommands = std::vector<std::pair<Action,CommandList>>;
103 using ActionMap = std::map<std::string,Action>;
105 using ActionModules = std::map<Action,std::set<int>>;
107 using ActionCounts = std::map<Action,int>;
109 using VarMap = std::map<std::string,size_t>;
111 using FormulaMap = std::map<std::string,size_t>;
113 using Environment = std::vector<int>;
115 using ModuleMap = std::map<std::string,size_t>;
117 using ReplacementMap = std::map<std::string,std::string>;
119 using VarValueStack = std::vector<std::pair<size_t,int>>;
121 using PlayerMap = std::map<std::string,Player>;
123 using ActionPlayer = std::map<std::string,std::string>;
125 using ModulePlayer = std::map<std::string,std::string>;
127 using ActionOwner = std::map<Action,Player>;
142 std::vector<std::pair<std::string,std::string>>
const & defines;
143 std::vector<VarInfo> varInfo;
146 ActionModules actionModules;
147 ActionCounts actionCounts;
149 FormulaMap formulaMap;
152 ActionPlayer actionPlayer;
153 ModulePlayer modulePlayer;
154 ActionOwner actionOwner;
155 size_t nameLengthLowerBound;
161 void getVarLimits(
ast::Variable const & variable,
int modIndex);
164 void setNameLengthBound();
170 void substituteFormulae();
176 void renameModules();
180 ReplacementMap
const & rmap)
const;
183 void foldConstants();
192 void dumpAst()
const;
221 void collectEnabledCommands(Environment
const & env, EnabledCommands & enabled);
224 void buildTransitions(
226 Environment
const & parts,
227 CommandList::const_iterator
const & lb,
228 CommandList::const_iterator
const & ub,
230 std::queue<Node> & q,
231 Node & probnum)
const;
234 void buildTransitionsRecur(
237 Environment
const & parts,
238 CommandList::const_iterator
const & lb,
239 CommandList::const_iterator
const & ub,
242 std::queue<Node> & q,
243 VarValueStack & vstack)
const;
247 VarValueStack & vstack,
248 Environment
const & env)
const;
251 Action getActionNumber(std::string
const & name);
255 Environment
const & env);
258 std::string makeName(Environment
const & parts)
const;
261 Node encode(Environment
const & parts)
const;
264 Environment decode(
Node x)
const;
268 void increment(Environment & p)
const;
272 Environment
const & env = {})
const;
276 Environment
const & env = {})
const;
280 Environment
const & env = {})
const;