LydiaSyft
Utils.h
1 #ifndef LYDIASYFT_UTILS_H
2 #define LYDIASYFT_UTILS_H
3 
4 #include "synthesizer/GR1LTLfSynthesizer.h"
5 #include "synthesizer/LTLfMaxSetSynthesizer.h"
6 #include "Synthesizer.h"
7 #include "Stopwatch.h"
8 #include "game/Transducer.h"
9 #include "lydia/parser/ltlf/driver.hpp"
10 #include <CLI/CLI.hpp>
11 #include <string>
12 #include <optional>
13 #include "lydia/types.hpp"
14 #include "Player.h"
15 #include "VarMgr.h"
16 #include "game/InputOutputPartition.h"
17 
18 
19 
20 namespace Syft {
21 
22  static const std::string SYFCO_EXECUTABLE_NAME = "syfco";
23  static const std::string DEFAULT_SYFCO_PATH_ = "./syfco";
24 
25  struct TLSFArgs {
26  const Player starting_player;
27  const Player protagonist_player;
28  const InputOutputPartition partition;
29  const whitemech::lydia::ltlf_ptr formula;
30  };
31 
32  TLSFArgs parse_tlsf(const std::shared_ptr<whitemech::lydia::parsers::ltlf::LTLfDriver> &driver,
33  const std::string &formula_file, const std::optional<std::string> &path_to_syfco_opt = std::nullopt);
34 
35  std::string find_syfco_path(const std::optional<std::string> & syfco_path_opt) ;
36 
37  std::string find_binary_path(const std::optional<std::string> & binary_path_opt, const std::string& executable_name, const std::string& default_value) ;
38 
39  whitemech::lydia::ltlf_ptr parse_formula(const std::shared_ptr<whitemech::lydia::parsers::ltlf::LTLfDriver> &driver,
40  const std::string &formula);
41 
42  std::shared_ptr<Syft::VarMgr> build_var_mgr(const Syft::InputOutputPartition &partition);
43 
45  do_dfa_construction(const whitemech::lydia::LTLfFormula &formula, const std::shared_ptr<Syft::VarMgr> &var_mgr);
46 
47  std::string read_assumption_file_if_file_specified(const std::optional<std::string> &filename);
48 
49 }
50 
51 #endif //LYDIASYFT_UTILS_H
A partition of variables into input and output variables.
Definition: InputOutputPartition.h:12
A DFA with symbolic states and transitions.
Definition: SymbolicStateDfa.h:18
Definition: Utils.h:25