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.ts.simple;
018
019import net.automatalib.ts.TransitionSystem;
020
021/**
022 * A simple deterministic transition system. In a deterministic transition system,
023 * there exists in each state at most one successor state for each input symbol.
024 * 
025 * @author Malte Isberner <malte.isberner@gmail.com>
026 *
027 * @param <S> state class
028 * @param <I> input symbol class
029 */
030public interface SimpleDTS<S, I> extends SimpleTS<S, I> {
031        
032        /**
033         * Retrieves the initial state of this transition system.
034         * @return the initial state.
035         * @see TransitionSystem#getInitialStates()
036         */
037        public S getInitialState();
038        
039        /**
040         * Retrieves the successor state reachable by the given input symbol. 
041         * @param state the source state.
042         * @param input the input symbol.
043         * @return the successor state reachable by the given input symbol,
044         * or <code>null</code> if no state is reachable by this symbol.
045         * @see TransitionSystem#getSuccessors(Object, Object)
046         */
047        public S getSuccessor(S state, I input);
048        
049        /**
050         * Retrieves the successor state reachable by the given sequence of
051         * input symbols.
052         * @param state the source state.
053         * @param input the input symbol.
054         * @return the successor state reachable by the given sequence of input
055         * symbols, or <code>null</code> if no state is reachable by this symbol.
056         * @see TransitionSystem#getSuccessors(Object, Iterable)
057         */
058        public S getSuccessor(S state, Iterable<I> input);
059        
060        /**
061         * Retrieves the state reachable by the given sequence of input symbols
062         * from the initial state.
063         * @param input the input word.
064         * @return the state reachable by the given input word, or <code>null</code>
065         * if no state is reachable by this word.
066         * @see TransitionSystem#getStates(Iterable)
067         */
068        public S getState(Iterable<I> input);
069}