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;
018
019/**
020 * A "universal" transition system, which captures the possibility to assign
021 * properties to states and transitions.
022 * 
023 * Generally speaking, these properties capture characteristics which are in
024 * general observable from the outside, but not captured by the
025 * {@link TransitionSystem} interface. For example, neither is whether a state
026 * is initial or not a state property, nor is a transition's successor a
027 * transition property.
028 *  
029 * A common example are finite state acceptors (FSAs), such as deterministic
030 * finite automata (DFAs). A state can be accepting or non-accepting, thus
031 * the state property would likely be a {@link Boolean} signaling acceptance.
032 * Transitions have are characterized by their successor state only, thus
033 * the transition property would most adequately be realized by the {@link Void}
034 * class.
035 * 
036 * In contrast, in a Mealy Machine do not distinguish between accepting or
037 * rejecting states, but transitions generate output symbols. The state property
038 * would therefore be {@link Void}, but the transition property would be the
039 * output produced by this transition.
040 * 
041 * @author Malte Isberner <malte.isberner@gmail.com>
042 *
043 * @param <S> state class
044 * @param <I> input symbol class
045 * @param <T> transition class
046 * @param <SP> state property class
047 * @param <TP> transition property class
048 */
049public interface UniversalTransitionSystem<S, I, T, SP, TP> extends
050                TransitionSystem<S, I, T> {
051        
052        /**
053         * Retrieves the state property for the given state.
054         * @param state the state.
055         * @return the corresponding property.
056         */
057        public SP getStateProperty(S state);
058        
059        /**
060         * Retrieves the transition property for the given state.
061         * @param transition the transition.
062         * @return the corresponding property.
063         */
064        public TP getTransitionProperty(T transition);
065}