kripkecube: modernize is_a_kripkecube_ptr

* spot/kripke/kripke.hh,
spot/ltsmin/spins_kripke.hh,
spot/mc/bloemen.hh,
spot/mc/bloemen_ec.hh,
spot/mc/cndfs.hh,
spot/mc/deadlock.hh,
spot/mc/intersect.hh,
spot/mc/reachability.hh,
tests/ltsmin/modelcheck.cc: Here.
This commit is contained in:
Etienne Renault 2019-06-11 14:06:43 +02:00
parent b52e941b04
commit f8448fad89
9 changed files with 76 additions and 44 deletions

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2015, 2016, 2017, 2018 Laboratoire de Recherche et
// Copyright (C) 2015, 2016, 2017, 2018, 2019 Laboratoire de Recherche et
// Developpement de l'Epita
//
// This file is part of Spot, a model checking library.
@ -432,7 +432,9 @@ namespace spot
sys_(sys), uf_(uf), tid_(tid),
nb_th_(std::thread::hardware_concurrency())
{
SPOT_ASSERT(is_a_kripkecube(sys));
static_assert(spot::is_a_kripkecube_ptr<decltype(&sys),
State, SuccIterator>::value,
"error: does not match the kripkecube requirements");
}
using uf = iterable_uf<State, StateHash, StateEqual>;

View file

@ -475,7 +475,9 @@ namespace spot
nb_th_(std::thread::hardware_concurrency()),
stop_(stop)
{
SPOT_ASSERT(is_a_kripkecube(sys));
static_assert(spot::is_a_kripkecube_ptr<decltype(&sys),
State, SuccIterator>::value,
"error: does not match the kripkecube requirements");
}
using uf = iterable_uf_ec<State, StateHash, StateEqual>;

View file

@ -117,7 +117,9 @@ namespace spot
sizeof(local_colors)*(std::thread::hardware_concurrency() - 1)),
stop_(stop)
{
SPOT_ASSERT(is_a_kripkecube(sys));
static_assert(spot::is_a_kripkecube_ptr<decltype(&sys),
State, SuccIterator>::value,
"error: does not match the kripkecube requirements");
}
virtual ~swarmed_cndfs()

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2015, 2016, 2017, 2018 Laboratoire de Recherche et
// Copyright (C) 2015, 2016, 2017, 2018, 2019 Laboratoire de Recherche et
// Developpement de l'Epita
//
// This file is part of Spot, a model checking library.
@ -103,7 +103,9 @@ namespace spot
p_pair_(sizeof(deadlock_pair)),
stop_(stop)
{
SPOT_ASSERT(is_a_kripkecube(sys));
static_assert(spot::is_a_kripkecube_ptr<decltype(&sys),
State, SuccIterator>::value,
"error: does not match the kripkecube requirements");
}
virtual ~swarmed_deadlock()

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2015, 2016, 2018 Laboratoire de Recherche et
// Copyright (C) 2015, 2016, 2018, 2019 Laboratoire de Recherche et
// Developpement de l'Epita
//
// This file is part of Spot, a model checking library.
@ -66,7 +66,9 @@ namespace spot
twacube_ptr twa, unsigned tid, bool& stop):
sys_(sys), twa_(twa), tid_(tid), stop_(stop)
{
SPOT_ASSERT(is_a_kripkecube(sys));
static_assert(spot::is_a_kripkecube_ptr<decltype(&sys),
State, SuccIterator>::value,
"error: does not match the kripkecube requirements");
map.reserve(2000000);
todo.reserve(100000);
}

View file

@ -1,5 +1,5 @@
// -*- coding: utf-8 -*-
// Copyright (C) 2015, 2016 Laboratoire de Recherche et
// Copyright (C) 2015, 2016, 2019 Laboratoire de Recherche et
// Developpement de l'Epita
//
// This file is part of Spot, a model checking library.
@ -34,8 +34,10 @@ namespace spot
public:
seq_reach_kripke(kripkecube<State, SuccIterator>& sys, unsigned tid):
sys_(sys), tid_(tid)
{
SPOT_ASSERT(is_a_kripkecube(sys));
{
static_assert(spot::is_a_kripkecube_ptr<decltype(&sys),
State, SuccIterator>::value,
"error: does not match the kripkecube requirements");
visited.reserve(2000000);
todo.reserve(100000);
}