// // Created by Jip Spel on 03.09.18. // #ifndef STORM_MONOTONICITYCHECKER_H #define STORM_MONOTONICITYCHECKER_H #include #include "Lattice.h" #include "LatticeExtender.h" #include "AssumptionMaker.h" #include "storm/storage/expressions/BinaryRelationExpression.h" #include "carl/core/Variable.h" #include "storm/models/ModelBase.h" #include "storm/models/sparse/Dtmc.h" #include "storm/models/sparse/Mdp.h" #include "storm/logic/Formula.h" #include "storm/storage/SparseMatrix.h" namespace storm { namespace analysis { template class MonotonicityChecker { public: MonotonicityChecker(std::shared_ptr model, std::vector> formulas, bool validate); /*! * Checks for all lattices in the map if they are monotone increasing or monotone decreasing. * * @param map The map with lattices and the assumptions made to create the lattices. * @param matrix The transition matrix. * @return TODO */ std::map>> checkMonotonicity(std::map>> map, storm::storage::SparseMatrix matrix); /*! * TODO * @return */ std::map>> checkMonotonicity(); /*! * TODO * @param lattice * @param matrix * @return */ bool somewhereMonotonicity(storm::analysis::Lattice* lattice) ; private: //TODO: variabele type std::map> analyseMonotonicity(uint_fast64_t i, storm::analysis::Lattice* lattice, storm::storage::SparseMatrix matrix) ; std::map>> createLattice(); std::map> checkOnSamples(std::shared_ptr> model, uint_fast64_t numberOfSamples); std::map> checkOnSamples(std::shared_ptr> model, uint_fast64_t numberOfSamples); std::pair checkDerivative(ValueType derivative); std::map>> extendLatticeWithAssumptions(storm::analysis::Lattice* lattice, storm::analysis::AssumptionMaker* assumptionMaker, uint_fast64_t val1, uint_fast64_t val2, std::vector> assumptions); std::shared_ptr model; std::vector> formulas; bool validate; std::map> resultCheckOnSamples; storm::analysis::LatticeExtender *extender; std::ofstream outfile; std::string filename = "results.txt"; storm::utility::Stopwatch totalWatch; }; } } #endif //STORM_MONOTONICITYCHECKER_H