public void setStutterInformation(StutterSensitivenessInformation stutter_information) { _stutter_information = stutter_information; //new StutterSensitivenessInformation( //new StutterSensitivenessInformation( StutterSensitivenessInformation left_stutter_info = stutter_information; StutterSensitivenessInformation right_stutter_info = stutter_information; if (!stutter_information.isCompletelyInsensitive()) { left_stutter_info.checkLTL(_left); right_stutter_info.checkLTL(_right); } if (!left_stutter_info.isCompletelyInsensitive()) { left_stutter_info.checkPartial(_left_tree.getNBA(), buchiAutomata, _left.negate().toPNF(), _sched.getLTL2DRA());/////////////add buchiautomata } if (!right_stutter_info.isCompletelyInsensitive()) { right_stutter_info.checkPartial(_right_tree.getNBA(), buchiAutomata, _right.negate().toPNF(), _sched.getLTL2DRA());///////add buchiautomata } _left_tree.setStutterInformation(left_stutter_info); _right_tree.setStutterInformation(right_stutter_info); }
/** * Generate a DRA for an LTL formula using scheck * @param ltl the formula * @param scheck_path the path to the scheck executable * @return a shared_ptr to the generated DRA (on failure returns a ptr to 0) */ //template <class DRA> //typename DRA::shared_ptr public DRA ltl2dra(LTLFormula ltl, BuchiAutomata buchiAutomata) { LTLFormula ltl_; LTLFormula ltl_for_scheck = null; bool safe = false; if (ltl.isSafe()) { safe = true; ltl_ = ltl.negate(); ltl_for_scheck = ltl_; } else if (ltl.isCoSafe()) { ltl_for_scheck = ltl; } else { if (_only_syn) { // Not syntactically safe -> abort //typename //DRA::shared_ptr p; //return p; return null; } } // std::cerr<< "Calling scheck with " // <<ltl_for_scheck->toStringPrefix() << " : " << safe << std::endl; //NBA nba = ltl2dba(ltl_for_scheck, buchiAutomata); //, scheck_path, _only_syn NBA nba = LTL2NBA.ltl2nba(ltl_for_scheck, buchiAutomata); //, scheck_path, _only_syn if (nba == null) { //typename //DRA::shared_ptr p; //return p; return null; } // nba->print(std::cerr); // safe -> negate DRA return DBA2DRA.dba2dra(nba, safe); // return dba2dra<DRA>(*nba, safe); // nba is auto-destructed //<NBA_t,DRA> }
/** * Generate a DRA for an LTL formula using scheck * @param ltl the formula * @param scheck_path the path to the scheck executable * @return a shared_ptr to the generated DRA (on failure returns a ptr to 0) */ //template <class DRA> //typename DRA::shared_ptr public DRA ltl2dra(LTLFormula ltl, BuchiAutomata buchiAutomata) { LTLFormula ltl_; LTLFormula ltl_for_scheck = null; bool safe = false; if (ltl.isSafe()) { safe = true; ltl_ = ltl.negate(); ltl_for_scheck = ltl_; } else if (ltl.isCoSafe()) { ltl_for_scheck = ltl; } else { if (_only_syn) { // Not syntactically safe -> abort //typename //DRA::shared_ptr p; //return p; return(null); } } // std::cerr<< "Calling scheck with " // <<ltl_for_scheck->toStringPrefix() << " : " << safe << std::endl; //NBA nba = ltl2dba(ltl_for_scheck, buchiAutomata); //, scheck_path, _only_syn NBA nba = LTL2NBA.ltl2nba(ltl_for_scheck, buchiAutomata); //, scheck_path, _only_syn if (nba == null) { //typename //DRA::shared_ptr p; //return p; return(null); } // nba->print(std::cerr); // safe -> negate DRA return(DBA2DRA.dba2dra(nba, safe)); // return dba2dra<DRA>(*nba, safe); // nba is auto-destructed //<NBA_t,DRA> }
/** Check for partial stutter insensitiveness for a LTL formula. * @param ltl the LTL formula * @param llt2nba the LTL2NBA translator, has to provide function ltl2nba(ltl) */ public void checkPartial(LTLFormula ltl, BuchiAutomata ba, LTL2DRA ltl2nba) { checkNBAs(ltl2nba.ltl2nba(ltl, ba), ltl2nba.ltl2nba(ltl.negate().toPNF(), ba));//true }