All Downloads are FREE. Search and download functionalities are using the official Maven repository.

rationals.Rational Maven / Gradle / Ivy

Go to download

HermiT is reasoner for ontologies written using the Web Ontology Language (OWL). Given an OWL file, HermiT can determine whether or not the ontology is consistent, identify subsumption relationships between classes, and much more. This is the maven build of HermiT and is designed for people who wish to use HermiT from within the OWL API. It is now versioned in the main HermiT version repository, although not officially supported by the HermiT developers. The version number of this package is a composite of the HermiT version and an value representing releases of this packaged version. So, 1.3.7.1 is the first release of the mavenized version of HermiT based on the 1.3.7 release of HermiT. This package includes the Jautomata library (http://jautomata.sourceforge.net/), and builds with it directly. This library appears to be no longer under active development, and so a "fork" seems appropriate. No development is intended or anticipated on this code base.

There is a newer version: 1.3.8.4
Show newest version
/*
 * ______________________________________________________________________________
 * 
 * Copyright 2005 Arnaud Bailly - NORSYS/LIFL
 * 
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 * 
 * (1) Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * 
 * (2) Redistributions in binary form must reproduce the above copyright notice,
 * this list of conditions and the following disclaimer in the documentation
 * and/or other materials provided with the distribution.
 * 
 * (3) The name of the author may not be used to endorse or promote products
 * derived from this software without specific prior written permission.
 * 
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 * Created on 18 mars 2005
 * 
 */
package rationals;

import java.util.Set;

/**
 * @author nono
 * @version $Id: Rational.java 10 2007-05-30 17:25:00Z oqube $
 */
public interface Rational {
  /**
   * Returns a new instance of state which will be initial and terminal or not
   * depending of parameters.
   * 
   * @param initial
   *          if true, the new state will be initial; otherwise this state will
   *          be non initial.
   * @param terminal
   *          if true, the new state will be terminal; otherwise this state will
   *          be non terminal.
   * @return a new state, associated with this automaton. This new state should
   *         be used only with this automaton in order to create a new
   *         transition for this automaton.
   * @see Transition
   */
  State addState(boolean initial, boolean terminal);

  /**
   * Returns the alphabet X associated with this automaton.
   * 
   * @return the alphabet X associated with this automaton.
   */
  Set alphabet();

  /**
   * Returns the set of states Q associated with this automaton.
   * 
   * @return the set of states Q associated with this automaton.
   *         Objects which are contained in this set are instances of class
   *         State.
   * @see State
   */
  Set states();

  /**
   * Returns the set of initial states I associated with this
   * automaton.
   * 
   * @return the set of initial states I associated with this
   *         automaton. Objects which are contained in this set are instances of
   *         class State.
   * @see State
   */
  Set initials();

  /**
   * Returns the set of terminal states T associated with this
   * automaton.
   * 
   * @return set of terminal states T associated with this automaton.
   *         Objects which are contained in this set are instances of class
   *         State.
   * @see State
   */
  Set terminals();

  /**
   * Returns the set of all accessible states in this automaton.
   * 
   * @return the set of all accessible states in this automaton. A state
   *         s is accessible if there exists a path from an initial
   *         state to s. Objects which are contained in this set are
   *         instances of class State.
   * @see State
   */
  Set accessibleStates();

  /**
   * Returns the set of states that can be accessed in this automaton starting
   * from given set of states
   * 
   * @param states
   *          a non null set of starting states
   * @return a - possibly empty - set of accessible states
   */
  Set accessibleStates(Set states);

  /**
   * Returns the set of co-accesible states for a given set of states, that is
   * the set of states from this automaton from which there exists a path to a
   * state in states.
   * 
   * @param states
   *          a non null set of ending states
   * @return a - possibly empty - set of coaccessible states
   */
  Set coAccessibleStates(Set states);

  /**
   * Returns the set of all co-accessible states in this automaton.
   * 
   * @return the set of all co-accessible states in this automaton. A state
   *         s is co-accessible if there exists a path from this
   *         state s to a terminal state. Objects which are contained
   *         in this set are instances of class State.
   * @see State
   */
  Set coAccessibleStates();

  /**
   * Returns the set of all states which are co-accessible and accessible in
   * this automaton.
   * 
   * @return the set of all states which are co-accessible and accessible in
   *         this automaton. A state s is accessible if there exists
   *         a path from an initial state to s. A state s
   *         is co-accessible if there exists a path from this state s
   *         to a terminal state. Objects which are contained in this set are
   *         instances of class State.
   * @see State
   */
  Set accessibleAndCoAccessibleStates();

  /**
   * Returns the set of all transitions of this automaton
   * 
   * @return the set of all transitions of this automaton Objects which are
   *         contained in this set are instances of class Transition.
   * @see Transition
   */
  Set delta();

  /**
   * Returns the set of all transitions of this automaton starting from a given
   * state and labelled b a given label.
   * 
   * @param state
   *          a state of this automaton.
   * @param label
   *          a label used in this automaton.
   * @return the set of all transitions of this automaton starting from state
   *         state and labelled by label. Objects which
   *         are contained in this set are instances of class
   *         Transition.
   * @see Transition
   */
  Set delta(State state, Object label);

  /**
   * Return all transitions from a State
   * 
   * @param state
   *          start state
   * @return a new Set of transitions (maybe empty)
   */
  Set delta(State state);

  Set deltaFrom(State from, State to);

  /**
   * Returns the set of all transitions of the reverse of this automaton
   * 
   * @return the set of all transitions of the reverse of this automaton. A
   *         reverse of an automaton A = (X , Q , I , T , D) is the
   *         automaton A' = (X , Q , T , I , D') where D'
   *         is the set { (q , l , q') | (q' , l , q) in D}. Objects
   *         which are contained in this set are instances of class
   *         Transition.
   * @see Transition
   */
  Set deltaMinusOne(State state, Object label);

  /**
   * Adds a new transition in this automaton if it is a new transition for this
   * automaton. The parameter is considered as a new transition if there is no
   * transition in this automaton which is equal to the parameter in the sense
   * of method equals of class Transition.
   * 
   * @param transition
   *          the transition to add.
   * @throws NoSuchStateException
   *           if transition is null
   * or if transition = (q , l , q') and q or
   * q' does not belong to Q the set of the states
   * of this automaton.
   */
  void addTransition(Transition transition) throws NoSuchStateException;

  /**
   * @param st
   * @return
   */
  Set deltaMinusOne(State st);

  /**
   * @param st
   * @return
   */
  Set accessibleStates(State st);
}