LearnTA  0.0.1
zone_automaton_state.hh
1 
6 #include <vector>
7 #include <array>
8 #include <utility>
9 
10 #include "timed_automaton.hh"
11 
12 #pragma once
13 namespace learnta {
17  struct ZAState {
19  bool isMatch;
25  std::array<std::vector<std::pair<TATransition, std::weak_ptr<ZAState>>>, CHAR_MAX> next;
27  TAState *taState = nullptr;
30 
31  ZAState() : isMatch(false), next({}) {}
32 
33  ZAState(TAState *taState, Zone zone) : isMatch(taState->isMatch), next({}), taState(taState),
34  zone(std::move(zone)) {}
35 
36  explicit ZAState(bool isMatch) : isMatch(isMatch), next({}) {}
37 
38  ZAState(bool isMatch, std::array<std::vector<std::pair<TATransition, std::weak_ptr<ZAState>>>, CHAR_MAX> next)
39  : isMatch(isMatch), next(std::move(next)) {}
40 
42  bool operator==(const std::pair<TAState *, Zone> &pair) const {
43  return pair.first == taState && pair.second == zone;
44  }
45  };
46 }
Definition: experiment_runner.hh:23
Definition: external_transition_maker.hh:149
A state of timed automata.
Definition: timed_automaton.hh:28
A state of a zone automaton.
Definition: zone_automaton_state.hh:17
Zone zone
The zone of this state.
Definition: zone_automaton_state.hh:29
bool operator==(const std::pair< TAState *, Zone > &pair) const
Check the equivalence of two states only using TAState and Zone.
Definition: zone_automaton_state.hh:42
TAState * taState
The state in the timed automaton represented by this state.
Definition: zone_automaton_state.hh:27
std::array< std::vector< std::pair< TATransition, std::weak_ptr< ZAState > > >, CHAR_MAX > next
The transitions from this state.
Definition: zone_automaton_state.hh:25
bool isMatch
Shows if this state is accepting.
Definition: zone_automaton_state.hh:19
Implementation of a zone with DBM.
Definition: zone.hh:24