Several people have asked for a way to check whether a word is accepted by an automaton, including at least Jonah Romero and Scott Buckley. So it's time we have it. * spot/twa/twa.hh, spot/twa/twa.cc, spot/twaalgos/word.hh (intersects): Add the new variant. * spot/twa/fwd.hh: Forward declare twa_word, so that we can use it in twa.hh. * spot/twaalgos/forq_contains.cc: Use the new intersection check. * tests/python/word.ipynb, NEWS: Mention it. * THANKS: Add Scott Buckley.
43 lines
1.4 KiB
C++
43 lines
1.4 KiB
C++
// -*- coding: utf-8 -*-
|
|
// Copyright (C) by the Spot authors, see the AUTHORS file for details.
|
|
//
|
|
// 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 3 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 this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#pragma once
|
|
|
|
#include <memory>
|
|
|
|
namespace spot
|
|
{
|
|
class bdd_dict;
|
|
typedef std::shared_ptr<bdd_dict> bdd_dict_ptr;
|
|
|
|
class twa;
|
|
typedef std::shared_ptr<twa> twa_ptr;
|
|
typedef std::shared_ptr<const twa> const_twa_ptr;
|
|
|
|
class twa_graph;
|
|
typedef std::shared_ptr<const twa_graph> const_twa_graph_ptr;
|
|
typedef std::shared_ptr<twa_graph> twa_graph_ptr;
|
|
|
|
class twa_product;
|
|
typedef std::shared_ptr<const twa_product> const_twa_product_ptr;
|
|
typedef std::shared_ptr<twa_product> twa_product_ptr;
|
|
|
|
struct twa_word;
|
|
typedef std::shared_ptr<const twa_word> const_twa_word_ptr;
|
|
typedef std::shared_ptr<twa_word> twa_word_ptr;
|
|
}
|