LydiaSyft
Synthesizer.h
1 #ifndef SYNTHESIZER_H
2 #define SYNTHESIZER_H
3 
4 #include <memory>
5 
6 #include "game/Transducer.h"
7 #include <tuple>
8 #include <optional>
9 
10 
11 namespace Syft {
12 
13  static const std::string REALIZABLE_STR = "REALIZABLE";
14  static const std::string UNREALIZABLE_STR = "UNREALIZABLE";
15 
16  struct SynthesisResult {
17  bool realizability;
18  CUDD::BDD winning_states;
19  CUDD::BDD winning_moves;
20  std::unique_ptr<Transducer> transducer;
21  CUDD::BDD safe_states;
22  };
23 
25  bool realizability;
26  CUDD::BDD deferring_strategy;
27  CUDD::BDD nondeferring_strategy;
28  };
29 
31  std::optional<bool> realizability = std::nullopt;
32  CUDD::BDD winning_move;
33  };
34 
40  template<class Spec>
41  class Synthesizer {
42  protected:
46  Spec spec_;
47 
48  public:
49 
50  Synthesizer(Spec spec)
51  : spec_(std::move(spec)) {}
52 
53 
54  virtual ~Synthesizer() {}
55 
64  virtual SynthesisResult run() const = 0;
65  };
66 
67 }
68 
69 #endif // SYNTHESIZER_H
Abstract class for synthesizers.
Definition: Synthesizer.h:41
virtual SynthesisResult run() const =0
Solves the synthesis problem of the specification.
Spec spec_
The game arena.
Definition: Synthesizer.h:46
Definition: Synthesizer.h:24
Definition: Synthesizer.h:30
Definition: Synthesizer.h:16