Apply a modality to a formula.
95 auto epistemicOperator = boost::any_cast<int>(
options.at(
"epistemicOperator"));
98 auto aboutAgentIRI = boost::any_cast<std::string>(
options.at(
"aboutAgentIRI"));
99 auto confidence = boost::any_cast<double>(
options.at(
"confidence"));
100 if (!aboutAgentIRI.empty()) {
101 if (confidence != 1.0) {
102 mFormula = std::make_shared<ModalFormula>(
103 modals::B(aboutAgentIRI, confidence), mFormula);
105 mFormula = std::make_shared<ModalFormula>(
111 auto aboutAgentIRI = boost::any_cast<std::string>(
options.at(
"aboutAgentIRI"));
112 if (!aboutAgentIRI.empty()) {
113 mFormula = std::make_shared<ModalFormula>(
118 auto temporalOperator = boost::any_cast<int>(
options.at(
"temporalOperator"));
121 auto minPastTimestamp = boost::any_cast<double>(
options.at(
"minPastTimestamp"));
122 auto maxPastTimestamp = boost::any_cast<double>(
options.at(
"maxPastTimestamp"));
124 auto minPastTimePoint =
127 auto maxPastTimePoint =
132 if (minPastTimestamp != -1 || maxPastTimestamp != -1) {
133 if (minPastTimestamp == -1) {
134 mFormula = std::make_shared<ModalFormula>(
136 maxPastTimePoint)), mFormula);
137 }
else if (maxPastTimestamp == -1) {
138 mFormula = std::make_shared<ModalFormula>(
140 std::nullopt)), mFormula);
142 mFormula = std::make_shared<ModalFormula>(
144 maxPastTimePoint)), mFormula);
147 mFormula = std::make_shared<ModalFormula>(
151 if (minPastTimestamp != -1 || maxPastTimestamp != -1) {
152 if (minPastTimestamp == -1) {
153 mFormula = std::make_shared<ModalFormula>(
155 maxPastTimePoint)), mFormula);
156 }
else if (maxPastTimestamp == -1) {
157 mFormula = std::make_shared<ModalFormula>(
159 std::nullopt)), mFormula);
161 mFormula = std::make_shared<ModalFormula>(
163 maxPastTimePoint)), mFormula);
166 mFormula = std::make_shared<ModalFormula>(
std::shared_ptr< ModalFormula > K(const FormulaPtr &phi)
std::shared_ptr< ModalFormula > P(const FormulaPtr &phi)
std::shared_ptr< ModalFormula > B(const FormulaPtr &phi)
std::shared_ptr< ModalFormula > H(const FormulaPtr &phi)
TimePoint fromSeconds(double seconds)
std::shared_ptr< Formula > FormulaPtr