Skip to content
Snippets Groups Projects
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
AutomataConcatenationEpsilonTransition.h 1.23 KiB
/*
 * AutomataConcatenationEpsilonTransition.h
 *
 *  Created on: 20. 11. 2014
 *	  Author: Tomas Pecka
 */

#ifndef AUTOMATA_CONCATENATION_EPSILON_TRANSITION_H_
#define AUTOMATA_CONCATENATION_EPSILON_TRANSITION_H_

#include <core/multipleDispatch.hpp>
#include <automaton/Automaton.h>
#include <automaton/FSM/EpsilonNFA.h>

namespace automaton {

namespace transform {

/**
 * Concatenates two automata.
 *  - For finite automata A1, A2, we create automaton L accepting L(A1).L(A2)
 */
class AutomataConcatenationEpsilonTransition : public std::PromotingDoubleDispatch<AutomataConcatenationEpsilonTransition, automaton::Automaton, const automaton::AutomatonBase &> {
public:
	static automaton::Automaton concatenation(const automaton::Automaton& first, const automaton::Automaton& second);

	static automaton::EpsilonNFA < > concatenation(const automaton::DFA<>& first, const automaton::DFA<>& second);
	static automaton::EpsilonNFA < > concatenation(const automaton::NFA < > & first, const automaton::NFA < > & second);
	static automaton::EpsilonNFA < > concatenation(const automaton::EpsilonNFA < > & first, const automaton::EpsilonNFA < > & second);
};

} /* namespace transform */

} /* namespace automaton */

#endif /* AUTOMATA_CONCATENATION_EPSILON_H_ */