// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6), // département Systèmes Répartis Coopératifs (SRC), Université Pierre // et Marie Curie. // // This file is part of Spot, a model checking library. // // Spot is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // Spot is distributed in the hope that it will be useful, but WITHOUT // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY // or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public // License for more details. // // You should have received a copy of the GNU General Public License // along with Spot; see the file COPYING. If not, write to the Free // Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. #include "statebdd.hh" #include #include namespace spot { int state_bdd::compare(const state* other) const { // This method should not be called to compare states from different // automata, and all states from the same automaton will use the same // state class. const state_bdd* o = dynamic_cast(other); assert(o); return o->as_bdd().id() - state_.id(); } size_t state_bdd::hash() const { return state_.id(); } /// Duplicate a state. state_bdd* state_bdd::clone() const { return new state_bdd(*this); } }