#include "formulae.h" #include "src/common.h" #include "src/logic/Formulas.h" void define_formulae(py::module& m) { py::enum_(m, "ComparisonType") .value("LESS", storm::logic::ComparisonType::Less) .value("LEQ", storm::logic::ComparisonType::LessEqual) .value("GREATER", storm::logic::ComparisonType::Greater) .value("GEQ", storm::logic::ComparisonType::GreaterEqual) ; /*py::class_>, void, void>("FormulaVec", "Vector of formulas") .def(vector_indexing_suite>, true>()) ;*/ py::class_>(m, "Formula", "Generic Storm Formula") .def("__str__", &storm::logic::Formula::toString) ; // Path Formulae py::class_>(m, "PathFormula", "Formula about the probability of a set of paths in an automaton", py::base()); py::class_>(m, "UnaryPathFormula", "Path formula with one operand", py::base()); py::class_>(m, "EventuallyFormula", "Formula for eventually", py::base()); py::class_>(m, "GloballyFormula", "Formula for globally", py::base()); py::class_>(m, "BinaryPathFormula", "Path formula with two operands", py::base()); py::class_>(m, "BoundedUntilFormula", "Until Formula with either a step or a time bound.", py::base()); py::class_>(m, "ConditionalFormula", "Formula with the right hand side being a condition.", py::base()); py::class_>(m, "UntilFormula", "Path Formula for unbounded until", py::base()); // Reward Path Formulae //py::class_(m, "RewardPathFormula", "Formula about the rewards of a set of paths in an automaton", py::base()); py::class_>(m, "CumulativeRewardFormula", "Summed rewards over a the paths", py::base()); py::class_>(m ,"InstantaneousRewardFormula", "Instantaneous reward", py::base()); py::class_>(m, "LongRunAverageRewardFormula", "Long run average reward", py::base()); //py::class_>(m, "ReachabilityRewardFormula", "Reachability reward", py::base()); // State Formulae py::class_>(m, "StateFormula", "Formula about a state of an automaton", py::base()); py::class_>(m, "AtomicExpressionFormula", "Formula with an atomic expression", py::base()); py::class_>(m, "AtomicLabelFormula", "Formula with an atomic label", py::base()); py::class_>(m, "BooleanLiteralFormula", "Formula with a boolean literal", py::base()); py::class_>(m, "UnaryStateFormula", "State formula with one operand", py::base()); py::class_>(m, "UnaryBooleanStateFormula", "Unary boolean state formula", py::base()); py::class_>(m, "OperatorFormula", "Operator formula", py::base()) .def("has_bound", &storm::logic::OperatorFormula::hasBound, "Check if formula is bounded") .def_property("threshold", &storm::logic::OperatorFormula::getThreshold, &storm::logic::OperatorFormula::setThreshold, "Threshold of bound") .def_property("comparison_type", &storm::logic::OperatorFormula::getComparisonType, &storm::logic::OperatorFormula::setComparisonType, "Comparison type of bound") ; py::class_>(m, "TimeOperator", "The time operator", py::base()); py::class_>(m, "LongRunAvarageOperator", "Long run average operator", py::base()); py::class_>(m, "ProbabilityOperator", "Probability operator", py::base()); py::class_>(m, "RewardOperator", "Reward operator", py::base()); py::class_>(m, "BinaryStateFormula", "State formula with two operands", py::base()); py::class_>(m, "BooleanBinaryStateFormula", "Boolean binary state formula", py::base()); }