omg_hoa.cpp
Go to the documentation of this file.
1 /** @file omg_hoa.cpp Serialisation in HOA format */
2 
3 /* FAU Discrete Event Systems Library (libFAUDES)
4 
5 Copyright (C) 2025 Thomas Moor
6 Exclusive copyright is granted to Klaus Schmidt
7 
8 This library is free software; you can redistribute it and/or
9 modify it under the terms of the GNU Lesser General Public
10 License as published by the Free Software Foundation; either
11 version 2.1 of the License, or (at your option) any later version.
12 
13 This library is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public
19 License along with this library; if not, write to the Free Software
20 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
21 
22 
23 
24 #include "omg_hoa.h"
25 
26 #if __clang__
27 #define OMG_HOA_GCCMUTE
28 #endif
29 #ifdef OMG_HOA_GCCMUTE
30 
31 #pragma GCC diagnostic push
32 #pragma GCC diagnostic ignored "-Wunused-private-field"
33 #pragma GCC diagnostic ignored "-Winconsistent-missing-override"
34 #endif
35 
36 #include "cpphoafparser/consumer/hoa_intermediate_trace.hh"
37 #include "cpphoafparser/consumer/hoa_intermediate_resolve_aliases.hh"
38 #include "cpphoafparser/parser/hoa_parser.hh"
39 #include "cpphoafparser/parser/hoa_parser_helper.hh"
40 #include "cpphoafparser/parser/hoa_parser_exception.hh"
41 #include "cpphoafparser/util/implicit_edge_helper.hh"
42 #include "cpphoafparser/consumer/hoa_consumer.hh"
43 #include "cpphoafparser/consumer/hoa_consumer_exception.hh"
44 
45 #ifdef OMG_HOA_GCCMUTE
46 #pragma GCC diagnostic pop
47 #endif
48 
49 // local debug
50 //#undef FD_DF
51 //#define FD_DF(m) FD_WARN(m)
52 
53 namespace faudes {
54 
55 // helper function: convert bit vector to HOA boolean expression
56 std::string omg_hoa_bits2expr(uint32_t bits, int apc) {
57  std::string res;
58  for(int i=0;i<apc;i++) {
59  if(bits & (1L << i)) res+=faudes::ToStringInteger(i);
60  else res+= "!"+faudes::ToStringInteger(i);
61  if(i+1<apc) res+=" & ";
62  }
63  FD_DF("hoa_bits2expr: bits " << bits << " expr " << res);
64  return res;
65 }
66 
67 // write in HOA format
68 void omg_export_hoa(std::ostream& rOutStream, const Generator& rAut, SymbolTable* pSymTab){
69  // inspectors
70  EventSet::Iterator eit;
71  EventSet::Iterator eit_end;
72  StateSet::Iterator sit;
73  StateSet::Iterator sit_end;
75  TransSet::Iterator tit_end;
76  // figure type
77  bool buechi=true;
78  bool rabin=false;
79  const RabinAutomaton* pRAut = dynamic_cast<const RabinAutomaton*>(&rAut);
80  if(pRAut!=nullptr) {
81  rabin=true;
82  buechi=false;
83  }
84  // set up HOA style acceptance
85  std::vector<StateSet> accvec;
86  std::string accstr1;
87  std::string accstr2;
88  if(buechi) {
89  accvec.push_back(rAut.MarkedStates());
90  accstr1 = "acc-name: Buchi";
91  accstr2 = "Acceptance: 1 Inf(0)";
92  }
93  if(rabin) {
94  // we use J.Klen style from ltl2dstar: (Fin(0))&Inf(1)) | [...]
95  const RabinAcceptance& acc=pRAut->RabinAcceptance();
96  accstr1 = "acc-name: Rabin " + ToStringInteger(acc.Size());
97  accstr2 = "Acceptance: " + ToStringInteger(2*acc.Size()) + " ";
98  size_t i;
99  for(i=0;i<acc.Size();++i) {
100  if(i>0) accstr2 += "|";
101  accstr2 += "(Fin(" + ToStringInteger(2*i) + ")&Inf("+ ToStringInteger(2*i+1) + "))";
102  StateSet fin=rAut.States();
103  fin.EraseSet(acc.At(i).ISet());
104  accvec.push_back(fin);
105  accvec.push_back(acc.At(i).RSet());
106  }
107  }
108  // figure number of atomic propositions to log_2(#events)
109  uint32_t asz=rAut.Alphabet().Size();
110  int apc=1;
111  for(;asz>2;asz=(asz>>1))
112  apc++;
113  // set up event mapping: faudes-idx -> [ consecutive integer starting from 0 , HOA expression ]
114  std::map<Idx,uint32_t> ev2bits;
115  std::map<Idx,std::string> ev2expr;
116  uint32_t cnt=0;
117  eit=rAut.AlphabetBegin();
118  eit_end=rAut.AlphabetEnd();
119  for(;eit!=eit_end;++eit) {
120  ev2bits[*eit]=cnt;
121  ev2expr[*eit]=omg_hoa_bits2expr(cnt,apc);
122  cnt++;
123  }
124  // set up symbol table: [integer+1] -> [faudes name]
125  if(pSymTab) {
126  pSymTab->Clear();
127  eit=rAut.AlphabetBegin();
128  eit_end=rAut.AlphabetEnd();
129  for(;eit!=eit_end;++eit)
130  pSymTab->InsEntry(ev2bits[*eit]+1,rAut.EventName(*eit));
131  }
132  // write HOA format: intro
133  rOutStream << "HOA: v1" << std::endl;
134  rOutStream << "name: \"" << rAut.Name() << "\""<< std::endl;
135  // write HOA format: atomic propositions
136  rOutStream << "AP: " << apc;
137  for(int i=0; i<apc; ++i)
138  rOutStream << " \"ap"<<i<<"\"";
139  rOutStream << std::endl;
140  // write HOA format: event aliases
141  eit=rAut.AlphabetBegin();
142  eit_end=rAut.AlphabetEnd();
143  for(;eit!=eit_end;++eit)
144  rOutStream << "Alias: @" << rAut.EventName(*eit) << " " << ev2expr[*eit] << std::endl;
145  // write HOA format: initial states
146  rOutStream << "Start:";
147  sit=rAut.InitStatesBegin();
148  sit_end=rAut.InitStatesEnd();
149  for(;sit!=sit_end;++sit)
150  rOutStream << " " << (*sit)-1;
151  rOutStream << std::endl;
152  // write HOA format: number of states
153  rOutStream << "States: " << rAut.States().Size() << std::endl;
154  // write HOA format: acceptance condition
155  rOutStream << accstr1 << std::endl;
156  rOutStream << accstr2 << std::endl;
157  // write HOA format: graph structure
158  rOutStream << "--BODY--" << std::endl;
159  // iterate over all states
160  sit=rAut.StatesBegin();
161  sit_end=rAut.StatesEnd();
162  for(;sit!=sit_end;++sit) {
163  // state section
164  rOutStream << "State: " << (*sit)-1;
165  bool none=true;
166  for(unsigned int i=0; i<accvec.size(); ++i) {
167  if(!accvec[i].Exists(*sit)) continue;
168  if(none)
169  rOutStream << " {" + ToStringInteger(i);
170  else
171  rOutStream << " " + ToStringInteger(i);
172  none=false;
173  }
174  if(!none) rOutStream << "}";
175  rOutStream << std::endl;
176  // iterate over transitions from this state
177  tit=rAut.TransRelBegin(*sit);
178  tit_end=rAut.TransRelEnd(*sit);
179  for(;tit!=tit_end;++tit)
180  rOutStream << "[@" << rAut.EventName(tit->Ev) << "] " << tit->X2-1 << std::endl;
181  }
182  // end of graph
183  rOutStream << "--END--" << std::endl;
184 }
185 
186 // API wrapper
187 void ExportHoa(std::ostream& rOutStream, const Generator& rAut, SymbolTable* pSymTab){
188  // refuse trivial
189  if(rAut.States().Size() <1) {
190  throw Exception("ExportHoa", "refusing to export generator with no states", 80);
191  }
192  if(rAut.Alphabet().Size() <1) {
193  throw Exception("ExportHoa", "refusing to export generator with no events", 80);
194  }
195  // do export and catch ios errors
196  try {
197  omg_export_hoa(rOutStream,rAut,pSymTab);
198  } catch (std::ios::failure&) {
199  throw Exception("ExportHoa", "Exception writing to anonymous stream", 2);
200  }
201 }
202 
203 // API wrapper
204 void ExportHoa(const std::string& rFilename, const Generator& rAut, SymbolTable* pSymTab){
205  // refuse trivial
206  if(rAut.States().Size() <1) {
207  throw Exception("ExportHoa", "refusing to export generator with no states", 80);
208  }
209  if(rAut.Alphabet().Size() <1) {
210  throw Exception("ExportHoa", "refusing to export generator with no events", 80);
211  }
212  // open file
213  std::ofstream fout;
214  fout.exceptions(std::ios::badbit|std::ios::failbit);
215  try{
216  fout.open(rFilename.c_str(), std::ios::out|std::ios::trunc);
217  }
218  catch (std::ios::failure&) {
219  std::stringstream errstr;
220  errstr << "Exception opening file \""<< rFilename << "\"";
221  throw Exception("ExportHoa", errstr.str(), 2);
222  }
223  // do export and catch ios exceptions
224  try {
225  omg_export_hoa(fout,rAut,pSymTab);
226  } catch (std::ios::failure&) {
227  std::stringstream errstr;
228  errstr << "Exception writing to file \""<< rFilename << "\"";
229  throw Exception("ExportHoa", errstr.str(), 2);
230  }
231 }
232 
233 
234 
235 // cpphoaparser comsumer to read to generator
236 using namespace cpphoafparser;
237 class HOAConsumerFaudes : public cpphoafparser::HOAConsumer {
238 public:
239  /** Constructor, holding a reference to the generator to read to */
241  rGen(gen), rSymTab(syms), mImplEdgeHlp(0) {}
242  // indicate to parser that aliases should not be resolved
243  virtual bool parserResolvesAliases() override {
244  return false;
245  }
246  // consume start of header
247  virtual void notifyHeaderStart(const std::string& version) override {
248  // should we the check version?
249  rGen.Clear();
250  pRAut = dynamic_cast<RabinAutomaton*>(&rGen);
251  }
252  // consume "States:"
253  virtual void setNumberOfStates(unsigned int numberOfStates) override {
254  for(unsigned int i=0;i<numberOfStates;++i) rGen.InsState(i+1);
255  }
256  // consume "Start:"
257  virtual void addStartStates(const int_list& stateConjunction) override {
258  for(unsigned int state : stateConjunction)
259  rGen.InsInitState(state+1);
260  }
261  // consume "Alias: @..."
262  virtual void addAlias(const std::string& name, label_expr::ptr labelExpr) override {
263  mAliases[name]=labelExpr;
264  }
265  // consume "AP: ... "
266  virtual void setAPs(const std::vector<std::string>& aps) override {
267  mApCount=aps.size();
268  int i=0;
269  for (const std::string& ap : aps)
270  mApSymbols[i++]=ap;
271  }
272  // consume "ACC: ..."
273  virtual void setAcceptanceCondition(unsigned int numberOfSets, acceptance_expr::ptr accExpr) override {
274  mAccSetCount=numberOfSets;
275  }
276  // consume "acc-name: ..."
277  virtual void provideAcceptanceName(const std::string& name, const std::vector<IntOrString>& extraInfo) override {
278  if(name=="Buchi") {
279  mBuechi=true;
280  return;
281  }
282  if(name=="Rabin") {
283  if(pRAut==nullptr)
284  throw HOAConsumerException("acc-name is Rabin, but only a plain Generator was passed");
285  mRabin=true;
286  return;
287  }
288  }
289  // consume "Name: ..."
290  virtual void setName(const std::string& name) override {
291  rGen.Name(name);
292  }
293  // consume "tool: ..."
294  virtual void setTool(const std::string& name, std::shared_ptr<std::string> version) override {
295  }
296  // consume "properties: ..."
297  virtual void addProperties(const std::vector<std::string>& properties) override {
298  }
299  // consume misc
300  virtual void addMiscHeader(const std::string& name, const std::vector<IntOrString>& content) override {
301  }
302  // start graph data
303  virtual void notifyBodyStart() override {
304  // test acceptance condition
305  if(!(mRabin || mBuechi))
306  throw HOAConsumerException("\"acc-name\" must specify Buchi or Rabin");
307  // sanity test Rabin acceptance
308  if(mRabin) {
309  if(mAccSetCount % 2 != 0)
310  throw HOAConsumerException("Rabin acceptance requires an even number of sets in \"Acceptance:\"");
311  pRAut->RabinAcceptance().Size((mAccSetCount+1)/2);
312  }
313  // sanity test Buechi acceptance
314  if(mBuechi) {
315  if(mAccSetCount!=1)
316  throw HOAConsumerException("Buchi acceptance requires exactly on set in \"Acceptance:\"");
317  }
318  // initialise implicit edge lables
319  mImplEdgeHlp = ImplicitEdgeHelper(mApCount);
320  // set up alphabet: with explicit symbol table
321  if(rSymTab.Size()!=0) {
322  unsigned int evcnt= 1L << mApCount;
323  for(uint32_t i=0;i<evcnt;++i) {
324  if(!rSymTab.Exists(i+1)) continue;
325  std::string evname=rSymTab.Symbol(i+1);
326  mEdgeBitsToEvIdx[i]=rGen.InsEvent(evname);
327  }
328  }
329  // set up alphabet: without explicit symbol table
330  if(rSymTab.Size()==0) {
331  std::map<std::string,label_expr::ptr>::iterator ait;
332  for(ait=mAliases.begin();ait!=mAliases.end();++ait) {
333  int_list bitslist;
334  expr2bits(ait->second,bitslist);
335  if(bitslist.size()!=1) continue;
336  mEdgeBitsToEvIdx[*bitslist.begin()]=rGen.InsEvent(ait->first);
337  }
338  }
339  }
340  // comsume "State: ..."
341  virtual void addState(unsigned int id,
342  std::shared_ptr<std::string> info,
343  label_expr::ptr labelExpr,
344  std::shared_ptr<int_list> accSignature) override {
345  if (labelExpr) {
346  throw HOAConsumerException("state label expression not supported");
347  }
348  // have the state (redundant)
349  rGen.InsState(id+1);
350  // record to acceptance condition
351  if (accSignature && mBuechi) {
352  if(accSignature->size()>0)
353  rGen.InsMarkedState(id+1);
354  }
355  // record to acceptance condition
356  if (accSignature && mRabin) {
357  for (unsigned int acc : *accSignature) {
358  RabinPair& rpair = pRAut->RabinAcceptance().At(acc/2);
359  bool rnoti = acc%2;
360  if(rnoti) rpair.RSet().Insert(id+1);
361  else rpair.ISet().Insert(id+1);
362  }
363  }
364  // reset event index for implicit edges to come
365  mImplEdgeHlp.startOfState(id);
366  }
367  // cosume implicit edge, i.e., conscutive labels
368  virtual void addEdgeImplicit(
369  unsigned int stateId,
370  const int_list& conjSuccessors,
371  std::shared_ptr<int_list> accSignature) override
372  {
373  if(accSignature)
374  throw HOAConsumerException("transition marking not supported");
375  uint32_t edgebits = mImplEdgeHlp.nextImplicitEdge();
376  std::map<uint32_t,Idx>::iterator eit;
377  eit=mEdgeBitsToEvIdx.find(edgebits);
378  Idx evidx;
379  if(eit!=mEdgeBitsToEvIdx.end()) {
380  evidx=eit->second;
381  } else {
382  std::string evname=bits2event(edgebits);
383  evidx=rGen.InsEvent(evname);
384  mEdgeBitsToEvIdx[edgebits]=evidx;
385  }
386  for (unsigned int succ : conjSuccessors)
387  rGen.SetTransition(stateId+1,evidx,succ+1);
388  }
389  // consume expilcit tarnsition
390  virtual void addEdgeWithLabel(unsigned int stateId,
391  label_expr::ptr labelExpr,
392  const int_list& conjSuccessors,
393  std::shared_ptr<int_list> accSignature) override
394  {
395  if(accSignature)
396  throw HOAConsumerException("transition marking not supported");
397  int_list bitslist;
398  expr2bits(labelExpr, bitslist);
399  for (unsigned int edgebits : bitslist) {
400  std::map<uint32_t,Idx>::iterator eit;
401  eit=mEdgeBitsToEvIdx.find(edgebits);
402  Idx evidx;
403  if(eit!=mEdgeBitsToEvIdx.end()) {
404  evidx=eit->second;
405  } else {
406  std::string evname=bits2event(edgebits);
407  evidx=rGen.InsEvent(evname);
408  mEdgeBitsToEvIdx[edgebits]=evidx;
409  }
410  for (unsigned int succ : conjSuccessors)
411  rGen.SetTransition(stateId+1,evidx,succ+1);
412  }
413  }
414  // end of graph data
415  virtual void notifyEndOfState(unsigned int stateId) override {
416  mImplEdgeHlp.endOfState();
417  }
418  // end of body
419  virtual void notifyEnd() override {
420  // invert ISets
421  if(mRabin) {
422  RabinAcceptance::Iterator rit=pRAut->RabinAcceptance().Begin();
423  for(;rit!=pRAut->RabinAcceptance().End();++rit)
424  rit->ISet()=pRAut->States() - rit->ISet();
425  }
426  }
427  // some sort of parser error
428  virtual void notifyAbort() override {
429  rGen.Clear();
430  }
431  // some sort of parser warning
432  virtual void notifyWarning(const std::string& warning) override {
433  rGen.Clear();
434  }
435 
436 private:
437 
438  /** Payload: automaton to parse to */
440  RabinAutomaton* pRAut=nullptr;
442 
443  /** Payload: intermediate parsing results */
444  bool mRabin=false;
445  bool mBuechi=false;
446  unsigned int mAccSetCount=0;
447  int mApCount=0;
448  std::map<int,std::string> mApSymbols;
449  std::map<std::string,label_expr::ptr> mAliases;
450  ImplicitEdgeHelper mImplEdgeHlp;
451  std::map<uint32_t,Idx> mEdgeBitsToEvIdx;
452 
453  /** bit vector to dummy faudes event name */
454  std::string bits2event(uint32_t bits) {
455  std::string res="ev";
456  for(int i=mApCount-1;i>=0;--i) {
457  if(bits & (1L << i)) res+="1";
458  else res+= "0";
459  }
460  return res;
461  }
462 
463  /** evaluate a label expression */
464  bool evalexpr(label_expr::ptr expr, uint32_t bits) {
465  switch (expr->getType()) {
466  case label_expr::EXP_AND:
467  return evalexpr(expr->getLeft(),bits) && evalexpr(expr->getRight(),bits);
468  case label_expr::EXP_OR:
469  return evalexpr(expr->getLeft(),bits) || evalexpr(expr->getRight(),bits);
470  case label_expr::EXP_NOT:
471  return !evalexpr(expr->getLeft(),bits);
472  case label_expr::EXP_TRUE:
473  return true;
474  case label_expr::EXP_FALSE:
475  return false;
476  case label_expr::EXP_ATOM:
477  if(!expr->getAtom().isAlias())
478  return bits & (1UL << expr->getAtom().getAPIndex());
479  std::map<std::string,label_expr::ptr>::iterator ait;
480  ait=mAliases.find(expr->getAtom().getAliasName());
481  if(ait==mAliases.end())
482  throw HOAConsumerException("unreckonizes alias");
483  return evalexpr(ait->second,bits);
484  }
485  throw HOAConsumerException("could not evaluate label expression");
486  }
487 
488 
489  /** label expression to list of bit vectors */
490  /** (we'ld need SAT solver or at least a hash/cache to do this efficiently) */
491  void expr2bits(label_expr::ptr labelExpr, HOAConsumer::int_list& bitslist) {
492  uint32_t bits_sup = 1UL << mApCount;
493  uint32_t bits=0;
494  for(; bits<bits_sup;++bits)
495  if(evalexpr(labelExpr,bits))
496  bitslist.push_back(bits);
497  }
498 
499 };
500 
501 
502 // read from HOA formated tream
503 void ImportHoa(std::istream& rInStream, Generator& rGen, const SymbolTable* pSymTab, bool resolve, bool trace){
504  // symboltable incl fallback
505  static SymbolTable syms;
506  const SymbolTable* psyms=&syms;
507  if(pSymTab)
508  psyms=pSymTab;
509  // configure parser
510  HOAConsumer::ptr consumer(new HOAConsumerFaudes(rGen,*psyms));
511  if(resolve)
512  consumer.reset(new HOAIntermediateResolveAliases(consumer));
513  if(trace)
514  consumer.reset(new HOAIntermediateTrace(consumer));
515  // run parser
516  try {
517  HOAParser::parse(rInStream, consumer, true);
518  } catch (HOAParserException& e) {
519  std::stringstream errstr;
520  errstr << "ImportHOA parser: \""<< e.what() << "\"";
521  throw Exception("ImportHoa", errstr.str(), 3);
522  } catch (HOAConsumerException& e) {
523  std::stringstream errstr;
524  errstr << "ImportHOA consumer: \""<< e.what() << "\"";
525  throw Exception("ImportHoa", errstr.str(), 3);
526  }
527 };
528 
529 // API wrapper
530 void ImportHoa(const std::string& rFilename, Generator& rGen, const SymbolTable* pSymTab, bool resolve, bool trace) {
531  // open file
532  std::ifstream fin;
533  fin.exceptions(std::ios::badbit); // dont throw on failbit because the hoa patrser will provoke that
534  try{
535  fin.open(rFilename.c_str(), std::ios::in | std::ios::binary);
536  }
537  catch (std::ios::failure&) {
538  std::stringstream errstr;
539  errstr << "Exception opening file \""<< rFilename << "\"";
540  throw Exception("ImportHoa", errstr.str(), 2);
541  }
542  // pass on
543  ImportHoa(fin,rGen,pSymTab,resolve,trace);
544 }
545 
546 } // namespace faudes
547 
#define FD_DF(message)
const std::string & Name(void) const
Definition: cfl_types.cpp:422
std::map< std::string, label_expr::ptr > mAliases
Definition: omg_hoa.cpp:449
virtual void addEdgeWithLabel(unsigned int stateId, label_expr::ptr labelExpr, const int_list &conjSuccessors, std::shared_ptr< int_list > accSignature) override
Definition: omg_hoa.cpp:390
virtual void setName(const std::string &name) override
Definition: omg_hoa.cpp:290
virtual void setAcceptanceCondition(unsigned int numberOfSets, acceptance_expr::ptr accExpr) override
Definition: omg_hoa.cpp:273
bool evalexpr(label_expr::ptr expr, uint32_t bits)
Definition: omg_hoa.cpp:464
virtual void setAPs(const std::vector< std::string > &aps) override
Definition: omg_hoa.cpp:266
HOAConsumerFaudes(Generator &gen, const SymbolTable &syms)
Definition: omg_hoa.cpp:240
virtual void notifyEnd() override
Definition: omg_hoa.cpp:419
virtual void setTool(const std::string &name, std::shared_ptr< std::string > version) override
Definition: omg_hoa.cpp:294
void expr2bits(label_expr::ptr labelExpr, HOAConsumer::int_list &bitslist)
Definition: omg_hoa.cpp:491
ImplicitEdgeHelper mImplEdgeHlp
Definition: omg_hoa.cpp:450
virtual void addStartStates(const int_list &stateConjunction) override
Definition: omg_hoa.cpp:257
virtual bool parserResolvesAliases() override
Definition: omg_hoa.cpp:243
virtual void provideAcceptanceName(const std::string &name, const std::vector< IntOrString > &extraInfo) override
Definition: omg_hoa.cpp:277
virtual void notifyEndOfState(unsigned int stateId) override
Definition: omg_hoa.cpp:415
std::string bits2event(uint32_t bits)
Definition: omg_hoa.cpp:454
virtual void addState(unsigned int id, std::shared_ptr< std::string > info, label_expr::ptr labelExpr, std::shared_ptr< int_list > accSignature) override
Definition: omg_hoa.cpp:341
virtual void notifyHeaderStart(const std::string &version) override
Definition: omg_hoa.cpp:247
virtual void addProperties(const std::vector< std::string > &properties) override
Definition: omg_hoa.cpp:297
virtual void addAlias(const std::string &name, label_expr::ptr labelExpr) override
Definition: omg_hoa.cpp:262
virtual void notifyWarning(const std::string &warning) override
Definition: omg_hoa.cpp:432
virtual void notifyBodyStart() override
Definition: omg_hoa.cpp:303
std::map< int, std::string > mApSymbols
Definition: omg_hoa.cpp:448
virtual void notifyAbort() override
Definition: omg_hoa.cpp:428
virtual void setNumberOfStates(unsigned int numberOfStates) override
Definition: omg_hoa.cpp:253
std::map< uint32_t, Idx > mEdgeBitsToEvIdx
Definition: omg_hoa.cpp:451
const SymbolTable & rSymTab
Definition: omg_hoa.cpp:441
virtual void addEdgeImplicit(unsigned int stateId, const int_list &conjSuccessors, std::shared_ptr< int_list > accSignature) override
Definition: omg_hoa.cpp:368
virtual void addMiscHeader(const std::string &name, const std::vector< IntOrString > &content) override
Definition: omg_hoa.cpp:300
StateSet & RSet(void)
Definition: omg_rabinacc.h:68
StateSet & ISet(void)
Definition: omg_rabinacc.h:84
Idx InsEntry(Idx index, const std::string &rName)
virtual const T & At(const Position &pos) const
TBaseSet< Transition, TransSort::X1EvX2 >::Iterator Iterator
Definition: cfl_transset.h:273
void RabinAcceptance(const faudes::RabinAcceptance &rRabAcc)
Definition: omg_rabinaut.h:326
Idx Size(void) const
StateSet::Iterator StatesBegin(void) const
StateSet::Iterator InitStatesBegin(void) const
const StateSet & MarkedStates(void) const
const EventSet & Alphabet(void) const
TransSet::Iterator TransRelBegin(void) const
EventSet::Iterator AlphabetBegin(void) const
StateSet::Iterator StatesEnd(void) const
TransSet::Iterator TransRelEnd(void) const
StateSet::Iterator InitStatesEnd(void) const
std::string EventName(Idx index) const
EventSet::Iterator AlphabetEnd(void) const
const StateSet & States(void) const
virtual void EraseSet(const TBaseSet &rOtherSet)
Definition: cfl_baseset.h:2249
Idx Size(void) const
Definition: cfl_baseset.h:1899
void ExportHoa(std::ostream &rOutStream, const Generator &rAut, SymbolTable *pSymTab)
Definition: omg_hoa.cpp:187
void ImportHoa(std::istream &rInStream, Generator &rGen, const SymbolTable *pSymTab, bool resolve, bool trace)
Definition: omg_hoa.cpp:503
uint32_t Idx
void omg_export_hoa(std::ostream &rOutStream, const Generator &rAut, SymbolTable *pSymTab)
Definition: omg_hoa.cpp:68
std::string omg_hoa_bits2expr(uint32_t bits, int apc)
Definition: omg_hoa.cpp:56
std::string ToStringInteger(Int number)
Definition: cfl_utils.cpp:43

libFAUDES 2.33l --- 2025.09.16 --- c++ api documentaion by doxygen