001/* Copyright (C) 2013 TU Dortmund
002 * This file is part of AutomataLib, http://www.automatalib.net/.
003 * 
004 * AutomataLib is free software; you can redistribute it and/or
005 * modify it under the terms of the GNU Lesser General Public
006 * License version 3.0 as published by the Free Software Foundation.
007 * 
008 * AutomataLib is distributed in the hope that it will be useful,
009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
011 * Lesser General Public License for more details.
012 * 
013 * You should have received a copy of the GNU Lesser General Public
014 * License along with AutomataLib; if not, see
015 * http://www.gnu.de/documents/lgpl.en.html.
016 */
017package net.automatalib.automata.transout;
018
019import java.util.List;
020
021import net.automatalib.automata.concepts.SODetOutputAutomaton;
022import net.automatalib.automata.concepts.TransitionOutput;
023import net.automatalib.words.Word;
024
025
026public interface TransitionOutputAutomaton<S, I, T, O>
027                extends SODetOutputAutomaton<S, I, T, Word<O>>, TransitionOutput<T, O> {
028        
029        /**
030         * Retrieves the output for the given input symbol in the given state.
031         * This is roughly equivalent to calling {@link #getTransitionOutput(Object)}
032         * on the transition returned by {@link #getTransition(Object, Object)}, however
033         * it should be noted that this function does not allow distinguishing between
034         * a <code>null</code> output and an undefined transition.
035         * 
036         * @param state the source state
037         * @param input the input symbol
038         * @return the output symbol (or <code>null</code> if the transition is undefined)
039         */
040        public O getOutput(S state, I input);
041        
042        public void trace(Iterable<I> input, List<O> output);
043        public void trace(S state, Iterable<I> input, List<O> output);
044}
045