Commit 2b46cb4b authored by Alexandre Duret-Lutz's avatar Alexandre Duret-Lutz
Browse files

Add interface for and test the bdd_setxor() function added to Buddy.

* wrap/python/buddy.i (bdd_setxor): New function.
* wrap/python/tests/setxor.py: New file.
* wrap/python/tests/Makefile.am (TESTS): Add setxor.py.
parent 4034b7f8
2010-11-07 Alexandre Duret-Lutz <adl@lrde.epita.fr>
Add interface for and test the bdd_setxor() function added to Buddy.
* wrap/python/buddy.i (bdd_setxor): New function.
* wrap/python/tests/setxor.py: New file.
* wrap/python/tests/Makefile.am (TESTS): Add setxor.py.
2010-11-06 Alexandre Duret-Lutz <adl@lrde.epita.fr>
* src/Makefile.am (libspot_la_LIBADD): Rename libneverclaimparse.la
as libneverparse.la.
* src/neverparse/Makefile.am: Install files in
* src/neverparse/Makefile.am: Install files in
$(pkgincludedir)/neverparse, not $(pkgincludedir)/neverclaimparse.
2010-11-06 Alexandre Duret-Lutz <adl@lrde.epita.fr>
......
// Copyright (C) 2010 Laboratoire de Recherche et Dveloppement de l'EPITA.
// Copyright (C) 2003, 2004 Laboratoire d'Informatique de Paris 6 (LIP6),
// dpartement Systmes Rpartis Coopratifs (SRC), Universit Pierre
// et Marie Curie.
......@@ -155,6 +156,7 @@ bdd bdd_or(const bdd &l, const bdd &r);
bdd bdd_xor(const bdd &l, const bdd &r);
bdd bdd_imp(const bdd &l, const bdd &r);
bdd bdd_biimp(const bdd &l, const bdd &r);
bdd bdd_setxor(const bdd &l, const bdd &r);
bdd bdd_ite(const bdd &f, const bdd &g, const bdd &h);
bdd bdd_exist(const bdd &r, const bdd &var);
bdd bdd_existcomp(const bdd &r, const bdd &var);
......
## Copyright (C) 2010 Labortatoire de Recherche et Développement de
## l'EPITA.
## Copyright (C) 2003, 2004, 2005 Laboratoire d'Informatique de Paris 6 (LIP6),
## département Systèmes Répartis Coopératifs (SRC), Université Pierre
## et Marie Curie.
......@@ -35,4 +37,5 @@ TESTS = \
interdep.py \
minato.py \
modgray.py \
optionmap.py
optionmap.py \
setxor.py
# -*- mode: python; coding: iso-8859-1 -*-
# Copyright (C) 2010 Laboratoire de Recherche et Dveloppement de l'EPITA.
#
# 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.
import ltihooks
import sys
from buddy import *
bdd_init(10000, 10000)
bdd_setvarnum(5)
V = [bdd_ithvar(i) for i in range(5)]
a = V[0] & -V[1] & V[2] & -V[3]
b = V[0] & V[1] & V[2] & -V[3]
c = -V[0] & V[1] & -V[2] & -V[3]
assert(c == bdd_setxor(a,b))
assert(c == bdd_setxor(b,a))
assert(a == bdd_setxor(b,c))
assert(a == bdd_setxor(c,b))
assert(b == bdd_setxor(a,c))
assert(b == bdd_setxor(c,a))
d = V[1] & V[2] & -V[3] & V[4]
e = V[0] & V[1] & -V[2] & -V[3] & V[4]
assert(e == bdd_setxor(a,d))
assert(e == bdd_setxor(d,a))
bdd_done()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment