Browse Source

Code style for formula classes

main
Lanchid 13 years ago
parent
commit
350f1a0990
  1. 8
      src/formula/AP.h
  2. 9
      src/formula/And.h
  3. 11
      src/formula/BoundedUntil.h
  4. 8
      src/formula/Next.h
  5. 8
      src/formula/Not.h
  6. 10
      src/formula/Or.h
  7. 3
      src/formula/PCTLPathFormula.h
  8. 3
      src/formula/PCTLStateFormula.h
  9. 3
      src/formula/PCTLformula.h
  10. 11
      src/formula/ProbabilisticOperator.h
  11. 9
      src/formula/Until.h

8
src/formula/AP.h

@ -25,9 +25,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class AP : public PCTLStateFormula<T> { class AP : public PCTLStateFormula<T> {
private: public:
std::string ap;
public:
/*! /*!
* Constructor * Constructor
* *
@ -93,6 +92,9 @@ class AP : public PCTLStateFormula<T> {
virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkAP(this); return modelChecker->checkAP(this);
} }
private:
std::string ap;
}; };
} //namespace formula } //namespace formula

9
src/formula/And.h

@ -32,10 +32,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class And : public PCTLStateFormula<T> { class And : public PCTLStateFormula<T> {
private: public:
PCTLStateFormula<T>* left;
PCTLStateFormula<T>* right;
public:
/*! /*!
* Empty constructor. * Empty constructor.
* Will create an AND-node without subnotes. Will not represent a complete formula! * Will create an AND-node without subnotes. Will not represent a complete formula!
@ -147,6 +145,9 @@ class And : public PCTLStateFormula<T> {
return modelChecker->checkAnd(this); return modelChecker->checkAnd(this);
} }
private:
PCTLStateFormula<T>* left;
PCTLStateFormula<T>* right;
}; };
} //namespace formula } //namespace formula

11
src/formula/BoundedUntil.h

@ -36,10 +36,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class BoundedUntil : public PCTLPathFormula<T> { class BoundedUntil : public PCTLPathFormula<T> {
PCTLStateFormula<T>* left; public:
PCTLStateFormula<T>* right;
uint_fast64_t bound;
public:
/*! /*!
* Empty constructor * Empty constructor
*/ */
@ -172,6 +170,11 @@ class BoundedUntil : public PCTLPathFormula<T> {
virtual std::vector<T> *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual std::vector<T> *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkBoundedUntil(this); return modelChecker->checkBoundedUntil(this);
} }
private:
PCTLStateFormula<T>* left;
PCTLStateFormula<T>* right;
uint_fast64_t bound;
}; };
} //namespace formula } //namespace formula

8
src/formula/Next.h

@ -32,9 +32,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class Next : public PCTLPathFormula<T> { class Next : public PCTLPathFormula<T> {
private: public:
PCTLStateFormula<T>* child;
public:
/*! /*!
* Empty constructor * Empty constructor
*/ */
@ -116,6 +115,9 @@ class Next : public PCTLPathFormula<T> {
virtual std::vector<T> *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual std::vector<T> *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkNext(this); return modelChecker->checkNext(this);
} }
private:
PCTLStateFormula<T>* child;
}; };
} //namespace formula } //namespace formula

8
src/formula/Not.h

@ -28,9 +28,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class Not : public PCTLStateFormula<T> { class Not : public PCTLStateFormula<T> {
private: public:
PCTLStateFormula<T>* child;
public:
/*! /*!
* Empty constructor * Empty constructor
*/ */
@ -109,6 +108,9 @@ class Not : public PCTLStateFormula<T> {
virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkNot(this); return modelChecker->checkNot(this);
} }
private:
PCTLStateFormula<T>* child;
}; };
} //namespace formula } //namespace formula

10
src/formula/Or.h

@ -31,10 +31,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class Or : public PCTLStateFormula<T> { class Or : public PCTLStateFormula<T> {
private: public:
PCTLStateFormula<T>* left;
PCTLStateFormula<T>* right;
public:
/*! /*!
* Empty constructor. * Empty constructor.
* Will create an AND-node without subnotes. Will not represent a complete formula! * Will create an AND-node without subnotes. Will not represent a complete formula!
@ -145,6 +143,10 @@ class Or : public PCTLStateFormula<T> {
virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkOr(this); return modelChecker->checkOr(this);
} }
private:
PCTLStateFormula<T>* left;
PCTLStateFormula<T>* right;
}; };
} //namespace formula } //namespace formula

3
src/formula/PCTLPathFormula.h

@ -27,7 +27,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class PCTLPathFormula : public PCTLFormula<T> { class PCTLPathFormula : public PCTLFormula<T> {
public: public:
/*! /*!
* empty destructor * empty destructor
*/ */

3
src/formula/PCTLStateFormula.h

@ -27,7 +27,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class PCTLStateFormula : public PCTLFormula<T> { class PCTLStateFormula : public PCTLFormula<T> {
public: public:
/*! /*!
* empty destructor * empty destructor
*/ */

3
src/formula/PCTLformula.h

@ -27,7 +27,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class PCTLFormula { class PCTLFormula {
public: public:
/*! /*!
* virtual destructor * virtual destructor
*/ */

11
src/formula/ProbabilisticOperator.h

@ -34,10 +34,8 @@ namespace formula {
*/ */
template<class T> template<class T>
class ProbabilisticOperator : public PCTLStateFormula<T> { class ProbabilisticOperator : public PCTLStateFormula<T> {
T lower; public:
T upper;
PCTLPathFormula<T>* pathFormula;
public:
/*! /*!
* Empty constructor * Empty constructor
*/ */
@ -156,6 +154,11 @@ class ProbabilisticOperator : public PCTLStateFormula<T> {
virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual mrmc::storage::BitVector *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkProbabilisticOperator(this); return modelChecker->checkProbabilisticOperator(this);
} }
private:
T lower;
T upper;
PCTLPathFormula<T>* pathFormula;
}; };
} //namespace formula } //namespace formula

9
src/formula/Until.h

@ -33,9 +33,8 @@ namespace formula {
*/ */
template <class T> template <class T>
class Until : public PCTLPathFormula<T> { class Until : public PCTLPathFormula<T> {
PCTLStateFormula<T>* left; public:
PCTLStateFormula<T>* right;
public:
/*! /*!
* Empty constructor * Empty constructor
*/ */
@ -144,6 +143,10 @@ class Until : public PCTLPathFormula<T> {
virtual std::vector<T> *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) { virtual std::vector<T> *check(mrmc::modelChecker::DtmcPrctlModelChecker<T>* modelChecker) {
return modelChecker->checkUntil(this); return modelChecker->checkUntil(this);
} }
private:
PCTLStateFormula<T>* left;
PCTLStateFormula<T>* right;
}; };
} //namespace formula } //namespace formula

|||||||
100:0
Loading…
Cancel
Save