Implement star-normal-form rewriting.
* src/ltlvisit/snf.cc, src/ltlvisit/snf.hh: New files. * src/ltlvisit/Makefile.am: Distribute them. * src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh: Call snf(f) for all f[*]. * src/ltltest/reduccmp.test: Test it. * doc/tl/tl.tex, doc/tl/tl.bib: Document it.
This commit is contained in:
parent
e7cf7b422d
commit
6eb830c8ae
8 changed files with 327 additions and 10 deletions
60
src/ltlvisit/snf.hh
Normal file
60
src/ltlvisit/snf.hh
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
// -*- coding: utf-8 -*-
|
||||
// Copyright (C) 2012 Laboratoire de Recherche et Developpement
|
||||
// de l'Epita (LRDE).
|
||||
//
|
||||
// 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 Spot; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
|
||||
// 02111-1307, USA.
|
||||
|
||||
#ifndef SPOT_LTLVISIT_SNF_HH
|
||||
#define SPOT_LTLVISIT_SNF_HH
|
||||
|
||||
#include "ltlast/formula.hh"
|
||||
#include "misc/hash.hh"
|
||||
|
||||
namespace spot
|
||||
{
|
||||
namespace ltl
|
||||
{
|
||||
|
||||
typedef Sgi::hash_map<const formula*, const formula*,
|
||||
ptr_hash<formula> > snf_cache;
|
||||
|
||||
/// Helper to rewrite a sere in Star Normal Form.
|
||||
///
|
||||
/// This should only be called on children of a Star operator. It
|
||||
/// corresponds to the E° operation defined in the following
|
||||
/// paper.
|
||||
///
|
||||
/// \verbatim
|
||||
/// @Article{ bruggeman.96.tcs,
|
||||
/// author = {Anne Br{\"u}ggemann-Klein},
|
||||
/// title = {Regular Expressions into Finite Automata},
|
||||
/// journal = {Theoretical Computer Science},
|
||||
/// year = {1996},
|
||||
/// volume = {120},
|
||||
/// pages = {87--98}
|
||||
/// }
|
||||
/// \endverbatim
|
||||
///
|
||||
/// \param sere the SERE to rewrite
|
||||
/// \param cache an optional cache
|
||||
formula* star_normal_form(const formula* sere,
|
||||
snf_cache* cache = 0);
|
||||
}
|
||||
}
|
||||
|
||||
#endif // SPOT_LTLVISIT_SNF_HH
|
||||
Loading…
Add table
Add a link
Reference in a new issue