ProductAutomatonConstructor - RobinBalzer/approximateQueries GitHub Wiki
This class is our main data generator.
How its construct() method is structured: basically it's split in two substeps with a total of three nested loops.
At first we loop over every QueryEdge and TransducerEdge. Here we find so called fittingTransducerEdges. These are edges of the transducer that match the following criteria.
- the queryEdge label match the transducerEdge incomingLabel. (including outgoing epsilon edges).
- if the query is in its final state AND the transducerEdges incomingLabel is empty (incoming epsilon edge).
NOTE: Due to the restrictions of the input format we also add any negated labels if they fit. (we do not need further case checking)
We store fittingEdges in the HashSet "fittingTransducerEdges".
We then loop over every databaseEdge. Here we can finally check for one of the (currently) six different cases. According to the specific case we call the helper function constructAutomatonNode and add the concrete productAutomatonEdge to the automaton.
After calling construct() we can start the concrete computations.