#pragma once #include #include #include "MinigridGrammar.h" #include "PrismPrinter.h" #include "ConfigYaml.h" std::string oneOffToString(const int &offset); std::string vectorToDisjunction(const std::vector &formulae); std::string cellToConjunction(const AgentName &agentName, const cell &c); std::string cellToConjunctionWithOffset(const AgentName &agentName, const cell &c, const std::string &xOffset, const std::string &yOffset); std::string coordinatesToConjunction(const AgentName &agentName, const coordinates &c, const ViewDirection viewDirection); std::string objectPositionToConjunction(const AgentName &agentName, const std::string &identifier, const std::pair &relativePosition); std::string objectPositionToConjunction(const AgentName &agentName, const std::string &identifier, const std::pair &relativePosition, const ViewDirection viewDirection); std::map getAdjacentCells(const cell &c); std::map> getRelativeAdjacentCells(); std::map> getRelativeSurroundingCells(); namespace prism { class PrismFormulaPrinter { public: PrismFormulaPrinter(std::ostream &os, const std::map &restrictions, const cells &walls, const cells &boxes, const cells &balls, const cells &lockedDoors, const cells &unlockedDoors, const cells &keys, const std::map &slipperyTiles, const cells &lava, const cells &goals); void print(const AgentName &agentName); void printRestrictionFormula(const AgentName &agentName, const std::string &direction, const cells &grid_cells); void printIsOnFormula(const AgentName &agentName, const std::string &type, const cells &grid_cells, const std::string &direction = ""); void printIsNextToFormula(const AgentName &agentName, const std::string &type, const std::map &coordinates); void printRestrictionFormulaWithCondition(const AgentName &agentName, const std::string &reason, const std::map &coordinates, const std::string &condition); void printRelativeRestrictionFormulaWithCondition(const AgentName &agentName, const std::string &reason, const std::string &condition); void printSlipRestrictionFormula(const AgentName &agentName, const std::string &direction); private: std::string buildFormula(const std::string &formulaName, const std::string &formula, const bool semicolon = true); std::string buildLabel(const std::string &labelName, const std::string &label); std::string buildDisjunction(const AgentName &agentName, const std::map &cells); std::string buildDisjunction(const AgentName &agentName, const cells &cells); std::string buildDisjunction(const AgentName &agentName, const std::string &reason); std::string buildDisjunction(const AgentName &agentName, const cells &cells, const std::pair &offset); bool slipperyBehaviour() const; bool anyPortableObject() const; std::ostream &os; std::map restrictions; cells walls; cells boxes; cells balls; cells lockedDoors; cells unlockedDoors; cells keys; std::map slipperyTiles; cells lava; cells goals; std::vector conditionalMovementRestrictions; std::vector portableObjects; }; }