spot
2.13.0.dev
Loading...
Searching...
No Matches
spot
misc
minato.hh
1
// -*- coding: utf-8 -*-
2
// Copyright (C) by the Spot authors, see the AUTHORS file for details.
3
//
4
// This file is part of Spot, a model checking library.
5
//
6
// Spot is free software; you can redistribute it and/or modify it
7
// under the terms of the GNU General Public License as published by
8
// the Free Software Foundation; either version 3 of the License, or
9
// (at your option) any later version.
10
//
11
// Spot is distributed in the hope that it will be useful, but WITHOUT
12
// ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
14
// License for more details.
15
//
16
// You should have received a copy of the GNU General Public License
17
// along with this program. If not, see <http://www.gnu.org/licenses/>.
18
19
#pragma once
20
21
#include <spot/misc/common.hh>
22
#include <bddx.h>
23
#include <stack>
24
25
namespace
spot
26
{
33
class
SPOT_API
minato_isop
34
{
35
public
:
38
minato_isop
(bdd input);
42
minato_isop
(bdd input, bdd vars);
49
minato_isop
(bdd input_min, bdd input_max,
bool
);
52
bdd
next
();
53
54
private
:
56
struct
local_vars
57
{
58
// If you are following the paper, f_min and f_max correspond
59
// to the pair of BDD functions used to encode the ternary function f
60
// (see Section 3.4).
61
// Also note that f0, f0', and f0'' all share the same _max function.
62
// Likewise for f1, f1', and f1''.
63
bdd f_min, f_max;
64
// Because we need a non-recursive version of the algorithm,
65
// we had to split it in four steps (each step is separated
66
// from the other by a call to ISOP in the original algorithm).
67
enum
{ FirstStep, SecondStep, ThirdStep, FourthStep } step;
68
// The list of variables to factorize. This is an addition to
69
// the original algorithm.
70
bdd vars;
71
bdd v1;
72
bdd f0_min, f0_max;
73
bdd f1_min, f1_max;
74
bdd g0, g1;
75
local_vars(bdd f_min, bdd f_max, bdd vars) noexcept
76
: f_min(f_min), f_max(f_max), step(FirstStep), vars(vars) {}
77
};
78
std::stack<local_vars> todo_;
79
std::stack<bdd> cube_;
80
bdd ret_;
81
};
82
}
spot::minato_isop
Generate an irredundant sum-of-products (ISOP) form of a BDD function.
Definition
minato.hh:34
spot::minato_isop::minato_isop
minato_isop(bdd input)
Constructor.
spot::minato_isop::minato_isop
minato_isop(bdd input, bdd vars)
Constructor.
spot::minato_isop::minato_isop
minato_isop(bdd input_min, bdd input_max, bool)
Constructor.
spot::minato_isop::next
bdd next()
Compute the next sum term of the ISOP form. Return bddfalse when all terms have been output.
spot
Definition
automata.hh:26
Please direct any
question
,
comment
, or
bug report
to the Spot mailing list at
spot@lrde.epita.fr
.
Generated on Fri Feb 27 2015 10:00:07 for spot by
1.9.8