Use 'const formula*' instead of 'formula*' everywhere.

The distinction makes no sense since Spot 0.5, where we switched from
mutable furmulae to immutable formulae.  The difference between
const_visitor and visitor made no sense either.  They have been merged
into one: visitor.

* iface/dve2/dve2check.cc, iface/gspn/ltlgspn.cc,
src/eltlparse/eltlparse.yy, src/eltlparse/public.hh,
src/evtgbatest/ltl2evtgba.cc, src/kripkeparse/kripkeparse.yy,
src/ltlast/atomic_prop.cc, src/ltlast/atomic_prop.hh,
src/ltlast/automatop.cc, src/ltlast/automatop.hh, src/ltlast/binop.cc,
src/ltlast/binop.hh, src/ltlast/bunop.cc, src/ltlast/bunop.hh,
src/ltlast/constant.cc, src/ltlast/constant.hh, src/ltlast/formula.cc,
src/ltlast/formula.hh, src/ltlast/formula_tree.cc,
src/ltlast/formula_tree.hh, src/ltlast/multop.cc,
src/ltlast/multop.hh, src/ltlast/predecl.hh, src/ltlast/refformula.cc,
src/ltlast/refformula.hh, src/ltlast/unop.cc, src/ltlast/unop.hh,
src/ltlast/visitor.hh, src/ltlenv/declenv.cc, src/ltlenv/declenv.hh,
src/ltlenv/defaultenv.cc, src/ltlenv/defaultenv.hh,
src/ltlenv/environment.hh, src/ltlparse/ltlfile.cc,
src/ltlparse/ltlfile.hh, src/ltlparse/ltlparse.yy,
src/ltlparse/public.hh, src/ltltest/consterm.cc,
src/ltltest/equals.cc, src/ltltest/genltl.cc, src/ltltest/kind.cc,
src/ltltest/length.cc, src/ltltest/randltl.cc, src/ltltest/readltl.cc,
src/ltltest/reduc.cc, src/ltltest/syntimpl.cc,
src/ltltest/tostring.cc, src/ltlvisit/apcollect.cc,
src/ltlvisit/apcollect.hh, src/ltlvisit/clone.cc,
src/ltlvisit/clone.hh, src/ltlvisit/contain.cc,
src/ltlvisit/contain.hh, src/ltlvisit/dotty.cc,
src/ltlvisit/length.cc, src/ltlvisit/lunabbrev.cc,
src/ltlvisit/lunabbrev.hh, src/ltlvisit/mark.cc, src/ltlvisit/mark.hh,
src/ltlvisit/nenoform.cc, src/ltlvisit/nenoform.hh,
src/ltlvisit/postfix.cc, src/ltlvisit/postfix.hh,
src/ltlvisit/randomltl.cc, src/ltlvisit/randomltl.hh,
src/ltlvisit/reduce.cc, src/ltlvisit/reduce.hh,
src/ltlvisit/simpfg.cc, src/ltlvisit/simpfg.hh,
src/ltlvisit/simplify.cc, src/ltlvisit/simplify.hh,
src/ltlvisit/snf.cc, src/ltlvisit/snf.hh, src/ltlvisit/tostring.cc,
src/ltlvisit/tunabbrev.cc, src/ltlvisit/tunabbrev.hh,
src/ltlvisit/wmunabbrev.cc, src/ltlvisit/wmunabbrev.hh,
src/neverparse/neverclaimparse.yy, src/sabatest/sabacomplementtgba.cc,
src/tgba/bdddict.cc, src/tgba/formula2bdd.cc, src/tgba/taatgba.cc,
src/tgba/taatgba.hh, src/tgbaalgos/eltl2tgba_lacim.cc,
src/tgbaalgos/ltl2taa.cc, src/tgbaalgos/ltl2tgba_fm.cc,
src/tgbaalgos/ltl2tgba_lacim.cc, src/tgbaalgos/minimize.cc,
src/tgbaalgos/randomgraph.cc, src/tgbaparse/tgbaparse.yy,
src/tgbatest/complementation.cc, src/tgbatest/ltl2tgba.cc,
src/tgbatest/ltlprod.cc, src/tgbatest/mixprod.cc,
src/tgbatest/randtgba.cc: Massive adjustment!
* src/tgbatest/reductgba.cc: Delete.
This commit is contained in:
Alexandre Duret-Lutz 2012-05-01 23:38:55 +02:00
parent 0f0ada825a
commit bf62d439c9
98 changed files with 1318 additions and 1535 deletions

View file

@ -1,5 +1,6 @@
// Copyright (C) 2010, 2011 Laboratoire de Recherche et Developement
// de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et
// Dévelopement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -38,7 +39,7 @@ main(int argc, char **argv)
syntax(argv[0]);
spot::ltl::parse_error_list p1;
spot::ltl::formula* f1 = spot::ltl::parse_sere(argv[1], p1);
const spot::ltl::formula* f1 = spot::ltl::parse_sere(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;

View file

@ -1,8 +1,9 @@
// Copyright (C) 2008, 2009, 2010, 2011 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2010, 2011, 2012 Laboratoire de Recherche
// et Développement de l'Epita (LRDE).
// Copyright (C) 2003, 2004, 2006 Laboratoire d'Informatique de
// Paris 6 (LIP6), département Systèmes Répartis Coopératifs (SRC),
// Université Pierre et Marie Curie.
// 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.
//
@ -57,13 +58,13 @@ main(int argc, char** argv)
syntax(argv[0]);
spot::ltl::parse_error_list p1;
spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
if (check_first && spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;
spot::ltl::parse_error_list p2;
spot::ltl::formula* f2 = spot::ltl::parse(argv[2], p2);
const spot::ltl::formula* f2 = spot::ltl::parse(argv[2], p2);
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p2))
return 2;
@ -72,7 +73,7 @@ main(int argc, char** argv)
{
#if (defined LUNABBREV) || (defined TUNABBREV) || (defined NENOFORM)
spot::ltl::formula* tmp;
const spot::ltl::formula* tmp;
#endif
#ifdef LUNABBREV
tmp = f1;
@ -99,7 +100,7 @@ main(int argc, char** argv)
spot::ltl::ltl_simplifier_options opt(true, true, true, false, false);
spot::ltl::ltl_simplifier simp(opt);
{
spot::ltl::formula* tmp;
const spot::ltl::formula* tmp;
tmp = f1;
f1 = simp.simplify(f1);
tmp->destroy();
@ -111,7 +112,7 @@ main(int argc, char** argv)
spot::ltl::ltl_simplifier_options opt(false, false, false, true, false);
spot::ltl::ltl_simplifier simp(opt);
{
spot::ltl::formula* tmp;
const spot::ltl::formula* tmp;
tmp = f1;
f1 = simp.simplify(f1);
tmp->destroy();
@ -123,7 +124,7 @@ main(int argc, char** argv)
spot::ltl::ltl_simplifier_options opt(false, false, false, true, true);
spot::ltl::ltl_simplifier simp(opt);
{
spot::ltl::formula* tmp;
const spot::ltl::formula* tmp;
tmp = f1;
f1 = simp.simplify(f1);
tmp->destroy();

View file

@ -1,5 +1,6 @@
// Copyright (C) 2010, 2011 Laboratoire de Recherche et Développement de
// l'Epita (LRDE).
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2011, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
//
@ -155,18 +156,18 @@ to_int(const char* s)
// F(p_1 & F(p_2 & F(p_3 & ... F(p_n))))
formula* E_n(std::string name, int n)
const formula* E_n(std::string name, int n)
{
if (n <= 0)
return constant::true_instance();
formula* result = 0;
const formula* result = 0;
for (; n > 0; --n)
{
std::ostringstream p;
p << name << n;
formula* f = env.require(p.str());
const formula* f = env.require(p.str());
if (result)
result = And_(f, result);
else
@ -177,13 +178,13 @@ formula* E_n(std::string name, int n)
}
// p & X(p & X(p & ... X(p)))
formula* phi_n(std::string name, int n)
const formula* phi_n(std::string name, int n)
{
if (n <= 0)
return constant::true_instance();
formula* result = 0;
formula* p = env.require(name);
const formula* result = 0;
const formula* p = env.require(name);
for (; n > 0; --n)
{
if (result)
@ -194,19 +195,19 @@ formula* phi_n(std::string name, int n)
return result;
}
formula* N_n(std::string name, int n)
const formula* N_n(std::string name, int n)
{
return unop::instance(unop::F, phi_n(name, n));
}
// p & X(p) & XX(p) & XXX(p) & ... X^n(p)
formula* phi_prime_n(std::string name, int n)
const formula* phi_prime_n(std::string name, int n)
{
if (n <= 0)
return constant::true_instance();
formula* result = 0;
formula* p = env.require(name);
const formula* result = 0;
const formula* p = env.require(name);
for (; n > 0; --n)
{
if (result)
@ -222,7 +223,7 @@ formula* phi_prime_n(std::string name, int n)
return result;
}
formula* N_prime_n(std::string name, int n)
const formula* N_prime_n(std::string name, int n)
{
return F_(phi_prime_n(name, n));
}
@ -230,12 +231,12 @@ formula* N_prime_n(std::string name, int n)
// GF(p_1) & GF(p_2) & ... & GF(p_n) if conj == true
// GF(p_1) | GF(p_2) | ... | GF(p_n) if conj == false
formula* GF_n(std::string name, int n, bool conj = true)
const formula* GF_n(std::string name, int n, bool conj = true)
{
if (n <= 0)
return conj ? constant::true_instance() : constant::false_instance();
formula* result = 0;
const formula* result = 0;
multop::type op = conj ? multop::And : multop::Or;
@ -243,7 +244,7 @@ formula* GF_n(std::string name, int n, bool conj = true)
{
std::ostringstream p;
p << name << i;
formula* f = G_(F_(env.require(p.str())));
const formula* f = G_(F_(env.require(p.str())));
if (result)
result = multop::instance(op, f, result);
@ -255,12 +256,12 @@ formula* GF_n(std::string name, int n, bool conj = true)
// FG(p_1) | FG(p_2) | ... | FG(p_n) if conj == false
// FG(p_1) & FG(p_2) & ... & FG(p_n) if conj == true
formula* FG_n(std::string name, int n, bool conj = false)
const formula* FG_n(std::string name, int n, bool conj = false)
{
if (n <= 0)
return conj ? constant::true_instance() : constant::false_instance();
formula* result = 0;
const formula* result = 0;
multop::type op = conj ? multop::And : multop::Or;
@ -268,7 +269,7 @@ formula* FG_n(std::string name, int n, bool conj = false)
{
std::ostringstream p;
p << name << i;
formula* f = F_(G_(env.require(p.str())));
const formula* f = F_(G_(env.require(p.str())));
if (result)
result = multop::instance(op, f, result);
@ -280,8 +281,9 @@ formula* FG_n(std::string name, int n, bool conj = false)
// (((p1 OP p2) OP p3)...OP pn) if right_assoc == false
// (p1 OP (p2 OP (p3 OP (... pn) if right_assoc == true
formula* bin_n(std::string name, int n,
binop::type op, bool right_assoc = false)
const formula*
bin_n(std::string name, int n,
binop::type op, bool right_assoc = false)
{
if (n <= 0)
{
@ -289,13 +291,13 @@ formula* bin_n(std::string name, int n,
exit(1);
}
formula* result = 0;
const formula* result = 0;
for (int i = 1; i <= n; ++i)
{
std::ostringstream p;
p << name << (right_assoc ? (n + 1 - i) : i);
formula* f = env.require(p.str());
const formula* f = env.require(p.str());
if (!result)
result = f;
else if (right_assoc)
@ -307,12 +309,12 @@ formula* bin_n(std::string name, int n,
}
// (GF(p1)|FG(p2))&(GF(p2)|FG(p3))&...&(GF(pn)|FG(p{n+1}))"
formula* R_n(std::string name, int n)
const formula* R_n(std::string name, int n)
{
if (n <= 0)
return constant::true_instance();
formula* pi;
const formula* pi;
{
std::ostringstream p;
@ -320,18 +322,18 @@ formula* R_n(std::string name, int n)
pi = env.require(p.str());
}
formula* result = 0;
const formula* result = 0;
for (int i = 1; i <= n; ++i)
{
formula* gf = G_(F_(pi));
const formula* gf = G_(F_(pi));
std::ostringstream p;
p << name << i + 1;
pi = env.require(p.str());
formula* fg = G_(F_(pi->clone()));
const formula* fg = G_(F_(pi->clone()));
formula* f = Or_(gf, fg);
const formula* f = Or_(gf, fg);
if (result)
result = And_(f, result);
@ -343,12 +345,12 @@ formula* R_n(std::string name, int n)
}
// (F(p1)|G(p2))&(F(p2)|G(p3))&...&(F(pn)|G(p{n+1}))"
formula* Q_n(std::string name, int n)
const formula* Q_n(std::string name, int n)
{
if (n <= 0)
return constant::true_instance();
formula* pi;
const formula* pi;
{
std::ostringstream p;
@ -356,17 +358,17 @@ formula* Q_n(std::string name, int n)
pi = env.require(p.str());
}
formula* result = 0;
const formula* result = 0;
for (int i = 1; i <= n; ++i)
{
formula* f = F_(pi);
const formula* f = F_(pi);
std::ostringstream p;
p << name << i + 1;
pi = env.require(p.str());
formula* g = G_(pi->clone());
const formula* g = G_(pi->clone());
f = Or_(f, g);
@ -381,13 +383,13 @@ formula* Q_n(std::string name, int n)
// OP(p1) | OP(p2) | ... | OP(Pn) if conj == false
// OP(p1) & OP(p2) & ... & OP(Pn) if conj == true
formula* combunop_n(std::string name, int n,
unop::type op, bool conj = false)
const formula* combunop_n(std::string name, int n,
unop::type op, bool conj = false)
{
if (n <= 0)
return conj ? constant::true_instance() : constant::false_instance();
formula* result = 0;
const formula* result = 0;
multop::type cop = conj ? multop::And : multop::Or;
@ -395,7 +397,7 @@ formula* combunop_n(std::string name, int n,
{
std::ostringstream p;
p << name << i;
formula* f = unop::instance(op, env.require(p.str()));
const formula* f = unop::instance(op, env.require(p.str()));
if (result)
result = multop::instance(cop, f, result);
@ -406,20 +408,21 @@ formula* combunop_n(std::string name, int n,
}
// !((GF(p1)&GF(p2)&...&GF(pn))->G(q -> F(r)))
// From "Fast LTL to Büchi Automata Translation" [gastin.01.cav]
formula* fair_response(std::string p, std::string q, std::string r, int n)
// From "Fast LTL to Büchi Automata Translation" [gastin.01.cav]
const formula*
fair_response(std::string p, std::string q, std::string r, int n)
{
formula* fair = GF_n(p, n);
formula* resp = G_(Implies_(env.require(q), F_(env.require(r))));
const formula* fair = GF_n(p, n);
const formula* resp = G_(Implies_(env.require(q), F_(env.require(r))));
return Not_(Implies_(fair, resp));
}
// Builds X(X(...X(p))) with n occurrences of X.
formula* X_n(formula* p, int n)
const formula* X_n(const formula* p, int n)
{
assert(n >= 0);
formula* res = p;
const formula* res = p;
while (n--)
res = X_(res);
return res;
@ -427,13 +430,13 @@ formula* X_n(formula* p, int n)
// Based on LTLcounter.pl from Kristin Rozier.
// http://shemesh.larc.nasa.gov/people/kyr/benchmarking_scripts/
formula* ltl_counter(std::string bit, std::string marker, int n, bool linear)
const formula*
ltl_counter(std::string bit, std::string marker, int n, bool linear)
{
formula* b = env.require(bit);
formula* neg_b = Not_(b);
formula* m = env.require(marker);
formula* neg_m = Not_(m); // to destroy
const formula* b = env.require(bit);
const formula* neg_b = Not_(b);
const formula* m = env.require(marker);
const formula* neg_m = Not_(m); // to destroy
multop::vec* res = new multop::vec(4);
@ -453,7 +456,7 @@ formula* ltl_counter(std::string bit, std::string marker, int n, bool linear)
else
{
// G(m -> X(!m & X(!m X(m)))) [if n = 3]
formula* p = m->clone();
const formula* p = m->clone();
for (int i = n - 1; i > 0; --i)
p = And_(neg_m->clone(), X_(p));
(*res)[0] = And_(m->clone(),
@ -472,7 +475,7 @@ formula* ltl_counter(std::string bit, std::string marker, int n, bool linear)
else
{
// !b & X(!b & X(!b)) [if n = 3]
formula* p = neg_b->clone();
const formula* p = neg_b->clone();
for (int i = n - 1; i > 0; --i)
p = And_(neg_b->clone(), X_(p));
(*res)[1] = p;
@ -482,8 +485,8 @@ formula* ltl_counter(std::string bit, std::string marker, int n, bool linear)
// If the least significant bit is 0, it will be 1 at the next time,
// and other bits stay the same.
formula* Xnm1_b = X_n(b->clone(), n - 1);
formula* Xn_b = X_(Xnm1_b); // to destroy
const formula* Xnm1_b = X_n(b->clone(), n - 1);
const formula* Xn_b = X_(Xnm1_b); // to destroy
(*res)[2] =
G_(Implies_(And_(m->clone(), neg_b->clone()),
AndX_(Xnm1_b->clone(), U_(And_(Not_(m->clone()),
@ -493,8 +496,8 @@ formula* ltl_counter(std::string bit, std::string marker, int n, bool linear)
// From the least significant bit to the first 0, all the bits
// are flipped on the next value. Remaining bits are identical.
formula* Xnm1_negb = X_n(neg_b, n - 1);
formula* Xn_negb = X_(Xnm1_negb); // to destroy
const formula* Xnm1_negb = X_n(neg_b, n - 1);
const formula* Xn_negb = X_(Xnm1_negb); // to destroy
(*res)[3] =
G_(Implies_(And_(m->clone(), b->clone()),
AndX_(Xnm1_negb->clone(),
@ -515,15 +518,15 @@ formula* ltl_counter(std::string bit, std::string marker, int n, bool linear)
return multop::instance(multop::And, res);
}
formula* ltl_counter_carry(std::string bit, std::string marker,
std::string carry, int n, bool linear)
const formula* ltl_counter_carry(std::string bit, std::string marker,
std::string carry, int n, bool linear)
{
formula* b = env.require(bit);
formula* neg_b = Not_(b);
formula* m = env.require(marker);
formula* neg_m = Not_(m); // to destroy
formula* c = env.require(carry);
formula* neg_c = Not_(c); // to destroy
const formula* b = env.require(bit);
const formula* neg_b = Not_(b);
const formula* m = env.require(marker);
const formula* neg_m = Not_(m); // to destroy
const formula* c = env.require(carry);
const formula* neg_c = Not_(c); // to destroy
multop::vec* res = new multop::vec(6);
@ -543,7 +546,7 @@ formula* ltl_counter_carry(std::string bit, std::string marker,
else
{
// G(m -> X(!m & X(!m X(m)))) [if n = 3]
formula* p = m->clone();
const formula* p = m->clone();
for (int i = n - 1; i > 0; --i)
p = And_(neg_m->clone(), X_(p));
(*res)[0] = And_(m->clone(),
@ -562,14 +565,14 @@ formula* ltl_counter_carry(std::string bit, std::string marker,
else
{
// !b & X(!b & X(!b)) [if n = 3]
formula* p = neg_b->clone();
const formula* p = neg_b->clone();
for (int i = n - 1; i > 0; --i)
p = And_(neg_b->clone(), X_(p));
(*res)[1] = p;
}
formula* Xn_b = X_n(b->clone(), n); // to destroy
formula* Xn_negb = X_n(neg_b, n); // to destroy
const formula* Xn_b = X_n(b->clone(), n); // to destroy
const formula* Xn_negb = X_n(neg_b, n); // to destroy
// If m is 1 and b is 0 then c is 0 and n steps later b is 1.
(*res)[2] = G_(Implies_(And_(m->clone(), neg_b->clone()),
@ -642,7 +645,7 @@ main(int argc, char** argv)
int f = to_int(argv[1]);
int n = to_int(argv[2]);
formula* res = 0;
const formula* res = 0;
switch (f)
{

View file

@ -1,4 +1,5 @@
// Copyright (C) 2010 Laboratoire de Recherche et Developement de
// -*- coding: utf-8 -*-
// Copyright (C) 2010, 2012 Laboratoire de Recherche et Developement de
// l'Epita (LRDE).
//
// This file is part of Spot, a model checking library.
@ -38,7 +39,7 @@ main(int argc, char **argv)
syntax(argv[0]);
spot::ltl::parse_error_list p1;
spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;

View file

@ -1,3 +1,4 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2012 Laboratoire de Recherche et Developement de
// l'Epita (LRDE).
//
@ -47,7 +48,7 @@ main(int argc, char **argv)
}
spot::ltl::parse_error_list p1;
spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;

View file

@ -185,7 +185,7 @@ main(int argc, char** argv)
}
else
{
ap->insert(static_cast<spot::ltl::atomic_prop*>
ap->insert(static_cast<const spot::ltl::atomic_prop*>
(env.require(argv[argn])));
}
}
@ -310,14 +310,14 @@ main(int argc, char** argv)
while (max_tries_u--)
{
spot::srand(opt_s++);
spot::ltl::formula* f = 0;
const spot::ltl::formula* f = 0;
int max_tries_r = 1000;
while (max_tries_r--)
{
f = rf->generate(opt_f);
if (opt_r)
{
spot::ltl::formula* g = simp.simplify(f);
const spot::ltl::formula* g = simp.simplify(f);
f->destroy();
if (spot::ltl::length(g) < opt_r)
{

View file

@ -1,7 +1,8 @@
// Copyright (C) 2008, 2009 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
// (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.
@ -76,8 +77,8 @@ main(int argc, char** argv)
spot::ltl::environment& env(spot::ltl::default_environment::instance());
spot::ltl::parse_error_list pel;
spot::ltl::formula* f = spot::ltl::parse(argv[formula_index],
pel, env, debug);
const spot::ltl::formula* f = spot::ltl::parse(argv[formula_index],
pel, env, debug);
exit_code =
spot::ltl::format_parse_errors(std::cerr, argv[formula_index], pel);

View file

@ -144,8 +144,8 @@ main(int argc, char** argv)
o.reduce_size_strictly = true;
spot::ltl::ltl_simplifier* simp_size = new spot::ltl::ltl_simplifier(o);
spot::ltl::formula* f1 = 0;
spot::ltl::formula* f2 = 0;
const spot::ltl::formula* f1 = 0;
const spot::ltl::formula* f2 = 0;
std::ifstream* fin = 0;
@ -201,7 +201,7 @@ main(int argc, char** argv)
}
{
spot::ltl::formula* ftmp1;
const spot::ltl::formula* ftmp1;
ftmp1 = f1;
f1 = simp_size->negative_normal_form(f1, false);
@ -211,7 +211,7 @@ main(int argc, char** argv)
std::string f1s_before = spot::ltl::to_string(f1);
std::string f1l;
spot::ltl::formula* input_f = f1;
const spot::ltl::formula* input_f = f1;
f1 = simp_size->simplify(input_f);
if (!simp_size->are_equivalent(input_f, f1))
{
@ -222,7 +222,7 @@ main(int argc, char** argv)
}
else
{
spot::ltl::formula* maybe_larger = simp->simplify(input_f);
const spot::ltl::formula* maybe_larger = simp->simplify(input_f);
f1l = spot::ltl::to_string(maybe_larger);
if (!simp->are_equivalent(input_f, maybe_larger))
{

View file

@ -1,7 +1,8 @@
// Copyright (C) 2008, 2009, 2010, 2011 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2010, 2011, 2012 Laboratoire de Recherche
// et Développement de l'Epita (LRDE).
// Copyright (C) 2004 Laboratoire d'Informatique de Paris 6
// (LIP6), département Systèmes Répartis Coopératifs (SRC), Université
// (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.
@ -49,19 +50,19 @@ main(int argc, char** argv)
int opt = atoi(argv[1]);
spot::ltl::parse_error_list p1;
spot::ltl::formula* ftmp1 = spot::ltl::parse(argv[2], p1);
const spot::ltl::formula* ftmp1 = spot::ltl::parse(argv[2], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[2], p1))
return 2;
spot::ltl::parse_error_list p2;
spot::ltl::formula* ftmp2 = spot::ltl::parse(argv[3], p2);
const spot::ltl::formula* ftmp2 = spot::ltl::parse(argv[3], p2);
if (spot::ltl::format_parse_errors(std::cerr, argv[3], p2))
return 2;
spot::ltl::formula* f1 = spot::ltl::negative_normal_form(ftmp1);
spot::ltl::formula* f2 = spot::ltl::negative_normal_form(ftmp2);
const spot::ltl::formula* f1 = spot::ltl::negative_normal_form(ftmp1);
const spot::ltl::formula* f2 = spot::ltl::negative_normal_form(ftmp2);
std::string f1s = spot::ltl::to_string(f1);
std::string f2s = spot::ltl::to_string(f2);

View file

@ -1,7 +1,8 @@
// Copyright (C) 2008, 2009 Laboratoire de Recherche et Développement
// de l'Epita (LRDE).
// -*- coding: utf-8 -*-
// Copyright (C) 2008, 2009, 2012 Laboratoire de Recherche et
// Développement de l'Epita (LRDE).
// Copyright (C) 2003 Laboratoire d'Informatique de Paris 6 (LIP6),
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// département Systèmes Répartis Coopératifs (SRC), Université Pierre
// et Marie Curie.
//
// This file is part of Spot, a model checking library.
@ -42,7 +43,7 @@ main(int argc, char **argv)
syntax(argv[0]);
spot::ltl::parse_error_list p1;
spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
const spot::ltl::formula* f1 = spot::ltl::parse(argv[1], p1);
if (spot::ltl::format_parse_errors(std::cerr, argv[1], p1))
return 2;
@ -53,7 +54,7 @@ main(int argc, char **argv)
std::string f1s = spot::ltl::to_string(f1);
std::cout << f1s << std::endl;
spot::ltl::formula* f2 = spot::ltl::parse(f1s, p1);
const spot::ltl::formula* f2 = spot::ltl::parse(f1s, p1);
if (spot::ltl::format_parse_errors(std::cerr, f1s, p1))
return 2;