Browse Source

moved capitalize util to PrismPrinter

pull/1/head
sp 12 months ago
parent
commit
6f541c1bc2
  1. 1
      util/CMakeLists.txt
  2. 5
      util/PrismFormulaPrinter.cpp
  3. 1
      util/PrismFormulaPrinter.h
  4. 8
      util/PrismPrinter.cpp
  5. 3
      util/PrismPrinter.h

1
util/CMakeLists.txt

@ -2,6 +2,7 @@ list(APPEND SRCS
${CMAKE_CURRENT_LIST_DIR}/cell.cpp
${CMAKE_CURRENT_LIST_DIR}/MinigridGrammar.h
${CMAKE_CURRENT_LIST_DIR}/Grid.cpp
${CMAKE_CURRENT_LIST_DIR}/PrismPrinter.cpp
${CMAKE_CURRENT_LIST_DIR}/PrismModulesPrinter.cpp
${CMAKE_CURRENT_LIST_DIR}/PrismFormulaPrinter.cpp
${CMAKE_CURRENT_LIST_DIR}/popl.hpp

5
util/PrismFormulaPrinter.cpp

@ -4,11 +4,6 @@
#include <string>
#include <algorithm>
std::string capitalize(std::string string) {
string[0] = std::toupper(string[0]);
return string;
}
std::string vectorToDisjunction(const std::vector<std::string> &formulae) {
bool first = true;
std::string disjunction = "";

1
util/PrismFormulaPrinter.h

@ -7,7 +7,6 @@
#include "ConfigYaml.h"
std::string capitalize(std::string string);
std::string vectorToDisjunction(const std::vector<std::string> &formulae);
std::string cellToConjunction(const AgentName &agentName, const cell &c);
std::string coordinatesToConjunction(const AgentName &agentName, const coordinates &c, const ViewDirection viewDirection);

8
util/PrismPrinter.cpp

@ -0,0 +1,8 @@
#include "PrismPrinter.h"
#include <algorithm>
std::string capitalize(std::string string) {
string[0] = std::toupper(string[0]);
return string;
}

3
util/PrismPrinter.h

@ -1,6 +1,7 @@
#pragma once
#include <string>
#include <map>
#include "cell.h"
@ -12,6 +13,8 @@ typedef std::map<AgentNameAndPosition::first_type, AgentNameAndPosition::second_
typedef std::map<KeyNameAndPosition::first_type, KeyNameAndPosition::second_type> KeyNameAndPositionMap;
typedef std::pair<cell, std::string> CellAndCondition;
std::string capitalize(std::string string);
namespace prism {
enum class ModelType {
MDP, SMG

Loading…
Cancel
Save