ltsmin: add accessors for variable names and types
* spot/ltsmin/ltsmin.hh, spot/ltsmin/ltsmin.cc: Expose more of the ltsmin interface. * python/spot/ltsmin.i: Add some helper functions on top of this new interface. * tests/python/ltsmin.ipynb: Test them. * NEWS: Mention it.
This commit is contained in:
parent
907b72fbfb
commit
db1e842a67
5 changed files with 127 additions and 20 deletions
|
|
@ -1122,4 +1122,41 @@ namespace spot
|
|||
ltsmin_model::~ltsmin_model()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
int ltsmin_model::state_size() const
|
||||
{
|
||||
return iface->get_state_size();
|
||||
}
|
||||
|
||||
const char* ltsmin_model::state_variable_name(int var) const
|
||||
{
|
||||
return iface->get_state_variable_name(var);
|
||||
}
|
||||
|
||||
int ltsmin_model::state_variable_type(int var) const
|
||||
{
|
||||
return iface->get_state_variable_type(var);
|
||||
}
|
||||
|
||||
int ltsmin_model::type_count() const
|
||||
{
|
||||
return iface->get_type_count();
|
||||
}
|
||||
|
||||
const char* ltsmin_model::type_name(int type) const
|
||||
{
|
||||
return iface->get_type_name(type);
|
||||
}
|
||||
|
||||
int ltsmin_model::type_value_count(int type)
|
||||
{
|
||||
return iface->get_type_value_count(type);
|
||||
}
|
||||
|
||||
const char* ltsmin_model::type_value_name(int type, int val)
|
||||
{
|
||||
return iface->get_type_value_name(type, val);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,6 +70,22 @@ namespace spot
|
|||
bdd_dict_ptr dict,
|
||||
formula dead = formula::tt(),
|
||||
int compress = 0) const;
|
||||
|
||||
/// Number of variables in a state
|
||||
int state_size() const;
|
||||
/// Name of each variable
|
||||
const char* state_variable_name(int var) const;
|
||||
/// Type of each variable
|
||||
int state_variable_type(int var) const;
|
||||
/// Number of different types
|
||||
int type_count() const;
|
||||
/// Name of each type
|
||||
const char* type_name(int type) const;
|
||||
/// Count of enumerated values for a type
|
||||
int type_value_count(int type);
|
||||
/// Name of each enumerated value for a type
|
||||
const char* type_value_name(int type, int val);
|
||||
|
||||
private:
|
||||
ltsmin_model(std::shared_ptr<const spins_interface> iface) : iface(iface)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue