|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61735 - in sandbox/itl: boost/itl_xt boost/validate/laws boost/validate/loki_xt boost/validate/validater libs/validate/doc/boostcon2010 libs/validate/example libs/validate/example/boostcon_abelian_monoids_ libs/validate/example/boostcon_law_validater_ libs/validate/example/labat_single_
From: afojgo_at_[hidden]
Date: 2010-05-02 09:28:56
Author: jofaber
Date: 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
New Revision: 61735
URL: http://svn.boost.org/trac/boost/changeset/61735
Log:
Refactored concept_validaters: Moved replicated code to base class. Added alabaster examples for boostcon2010.
Added:
sandbox/itl/boost/validate/validater/abelian_monoid_validater.hpp (contents, props changed)
sandbox/itl/boost/validate/validater/monoid_validater.hpp (contents, props changed)
sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/
sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/boostcon_abelian_monoids.cpp (contents, props changed)
sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/vc9_boostcon_abelian_monoids.vcproj (contents, props changed)
sandbox/itl/libs/validate/example/boostcon_law_validater_/
sandbox/itl/libs/validate/example/boostcon_law_validater_/Jamfile.v2 (contents, props changed)
sandbox/itl/libs/validate/example/boostcon_law_validater_/boostcon_law_validater.cpp (contents, props changed)
sandbox/itl/libs/validate/example/boostcon_law_validater_/vc9_boostcon_law_validater.vcproj (contents, props changed)
Removed:
sandbox/itl/boost/validate/validater/algebra_validater.hpp
Binary files modified:
sandbox/itl/libs/validate/doc/boostcon2010/BoostAlabaster.pptx
Text files modified:
sandbox/itl/boost/itl_xt/list.hpp | 7 ++
sandbox/itl/boost/validate/laws/monoid.hpp | 102 ++++++++++++++++++++--------------------
sandbox/itl/boost/validate/laws/set_laws.hpp | 1
sandbox/itl/boost/validate/loki_xt/Tuple.h | 2
sandbox/itl/boost/validate/validater/bit_collector_validater.hpp | 26 ----------
sandbox/itl/boost/validate/validater/collector_validater.hpp | 26 ----------
sandbox/itl/boost/validate/validater/concept_validater.hpp | 37 ++++++++++++--
sandbox/itl/boost/validate/validater/function_equality_validater.hpp | 25 ---------
sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp | 24 ---------
sandbox/itl/boost/validate/validater/itl_induced_relations.hpp | 31 +----------
sandbox/itl/boost/validate/validater/itl_order_validater.hpp | 41 ++-------------
sandbox/itl/boost/validate/validater/itl_set_validater.hpp | 25 ---------
sandbox/itl/boost/validate/validater/partial_order_validater.hpp | 26 ---------
sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp | 26 ----------
sandbox/itl/boost/validate/validater/sorted_associative_back_validater.hpp | 28 ----------
sandbox/itl/boost/validate/validater/sorted_associative_validater.hpp | 28 ----------
sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp | 27 ----------
sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp | 26 ----------
sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp | 2
sandbox/itl/libs/validate/example/vc9_validate_examples.sln | 12 ++++
20 files changed, 118 insertions(+), 404 deletions(-)
Modified: sandbox/itl/boost/itl_xt/list.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/list.hpp (original)
+++ sandbox/itl/boost/itl_xt/list.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -123,7 +123,12 @@
//JODO concept InplaceAddable
/// Add a list \c tail to this list.
- list& operator += (const list& tail) { splice(end(), list(tail)); return *this; }
+ list& operator += (const list& tail)
+ {
+ list rear(tail);
+ splice(end(), rear);
+ return *this;
+ }
/** yields true if any of the elements in \c *this has the property \c prop */
bool any(const property<DataT>& prop)const;
Modified: sandbox/itl/boost/validate/laws/monoid.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/monoid.hpp (original)
+++ sandbox/itl/boost/validate/laws/monoid.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -229,47 +229,47 @@
bool holds()
{
- Type lsum = this->template getInputValue<operand_a>();
- Accumulator<Type>()(lsum, this->template getInputValue<operand_b>());
- Accumulator<Type>()(lsum, this->template getInputValue<operand_c>());
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_c>());
- Type rsum = this->template getInputValue<operand_a>();
+ Type rhs = this->template getInputValue<operand_a>();
Type b_plus_c = this->template getInputValue<operand_b>();
Accumulator<Type>()(b_plus_c, this->template getInputValue<operand_c>());
- Accumulator<Type>()(rsum, b_plus_c);
+ Accumulator<Type>()(rhs, b_plus_c);
- this->template setOutputValue<lhs_result>(lsum);
- this->template setOutputValue<rhs_result>(rsum);
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
- return Equality<Type>()(lsum, rsum);
+ return Equality<Type>()(lhs, rhs);
}
bool debug_holds()
{
- std::cout << typeString() << std::endl;
- std::cout << formula() << std::endl;
- std::cout << "a: " << this->template getInputValue<operand_a>() << std::endl;
- std::cout << "b: " << this->template getInputValue<operand_b>() << std::endl;
- std::cout << "c: " << this->template getInputValue<operand_c>() << std::endl;
-
- Type lsum = this->template getInputValue<operand_a>();
- Accumulator<Type>()(lsum, this->template getInputValue<operand_b>());
- std::cout << "a o b: " << lsum << std::endl;
+ std::cout << "--- function debug_holds -----------------------------\n";
+ std::cout << " a = " << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << " b = " << this->template getInputValue<operand_b>() << std::endl;
+ std::cout << " c = " << this->template getInputValue<operand_c>() << std::endl;
+
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ std::cout << " a o b = " << lhs << std::endl;
- Accumulator<Type>()(lsum, this->template getInputValue<operand_c>());
- std::cout << "(a o b) o c: " << lsum << std::endl;
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_c>());
+ std::cout << "(a o b) o c = " << lhs << std::endl;
- Type rsum = this->template getInputValue<operand_a>();
+ Type rhs = this->template getInputValue<operand_a>();
Type b_plus_c = this->template getInputValue<operand_b>();
Accumulator<Type>()(b_plus_c, this->template getInputValue<operand_c>());
- std::cout << "b o c: " << b_plus_c << std::endl;
- Accumulator<Type>()(rsum, b_plus_c);
- std::cout << "a o (b o c): " << rsum << std::endl;
+ std::cout << " b o c = " << b_plus_c << std::endl;
+ Accumulator<Type>()(rhs, b_plus_c);
+ std::cout << "a o (b o c) = " << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+ std::cout << "------------------------------------------------------\n";
- this->template setOutputValue<lhs_result>(lsum);
- this->template setOutputValue<rhs_result>(rsum);
-
- return Equality<Type>()(lsum, rsum);
+ return Equality<Type>()(lhs, rhs);
}
};
@@ -281,7 +281,7 @@
LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
{
/** a o b == b o a computed as
- lsum=a; lsum+=b; rsum=b; rsum+=a => lsum==rsum
+ lhs=a; lhs+=b; rhs=b; rhs+=a => lhs==rhs
Input = (a := inVal1, b := inVal2)
Output = (sum_lhs, sum_rhs)
*/
@@ -305,36 +305,36 @@
bool holds()
{
- Type lsum = this->template getInputValue<operand_a>();
- lsum += this->template getInputValue<operand_b>();
- Type rsum = this->template getInputValue<operand_b>();
- rsum += this->template getInputValue<operand_a>();
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ Type rhs = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(rhs, this->template getInputValue<operand_a>());
- this->template setOutputValue<lhs_result>(lsum);
- this->template setOutputValue<rhs_result>(rsum);
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
- return lsum == rsum;
+ return lhs == rhs;
}
bool debug_holds()
{
- std::cout << typeString() << std::endl;
- std::cout << formula() << std::endl;
- std::cout << "a: " << this->template getInputValue<operand_a>() << std::endl;
- std::cout << "b: " << this->template getInputValue<operand_b>() << std::endl;
-
- Type lsum = this->template getInputValue<operand_a>();
- lsum += this->template getInputValue<operand_b>();
- std::cout << "a o b: " << lsum << std::endl;
-
- Type rsum = this->template getInputValue<operand_b>();
- rsum += this->template getInputValue<operand_a>();
- std::cout << "b o a: " << rsum << std::endl;
-
- this->template setOutputValue<lhs_result>(lsum);
- this->template setOutputValue<rhs_result>(rsum);
+ std::cout << "--- function debug_holds -----------------------------\n";
+ std::cout << " a = " << this->template getInputValue<operand_a>() << std::endl;
+ std::cout << " b = " << this->template getInputValue<operand_b>() << std::endl;
+
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, this->template getInputValue<operand_b>());
+ std::cout << "a o b = " << lhs << std::endl;
+
+ Type rhs = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(rhs, this->template getInputValue<operand_a>());
+ std::cout << "b o a = " << rhs << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+ std::cout << "------------------------------------------------------\n";
- return lsum == rsum;
+ return lhs == rhs;
}
};
Modified: sandbox/itl/boost/validate/laws/set_laws.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/set_laws.hpp (original)
+++ sandbox/itl/boost/validate/laws/set_laws.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -11,6 +11,7 @@
#define BOOST_ITL_SET_LAWS_HPP_JOFA_071124
#include <boost/itl/type_traits/value_size.hpp>
+#include <boost/itl/predicates.hpp>
#include <boost/validate/laws/law.hpp>
#include <boost/itl/functors.hpp>
Modified: sandbox/itl/boost/validate/loki_xt/Tuple.h
==============================================================================
--- sandbox/itl/boost/validate/loki_xt/Tuple.h (original)
+++ sandbox/itl/boost/validate/loki_xt/Tuple.h 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -517,7 +517,7 @@
tup::RefMapper<Fun, TrgTupleT, SelfType>::Do(target, *this);
}
- // Need example here to reduce abstraction pain
+ // Using an example to clarify the template parameters:
// A value generator template A generator-function-type: value generating function value-tuple-type
// GentorT e.g. SomeValue to be generated
template <template<class>class UnaryTpl, template<class TrgTupleT,template<class>class>class Fun, class TrgTupleT>
Added: sandbox/itl/boost/validate/validater/abelian_monoid_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/abelian_monoid_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,60 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ITL_VALIDATE_VALIDATER_ABELIAN_MONOID_VALIDATER_HPP_JOFA_100501
+#define BOOST_ITL_VALIDATE_VALIDATER_ABELIAN_MONOID_VALIDATER_HPP_JOFA_100501
+
+#include <boost/itl/functors.hpp>
+//#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+#include <boost/validate/validater/monoid_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+typedef WeightedNumberGentor<int> ChoiceT;
+
+template <typename Type>
+class abelian_monoid_validater : public concept_validater
+{
+public:
+
+ enum Laws {monoid_laws, commutativity, Laws_size};
+
+ abelian_monoid_validater(){ setProfile(); }
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _lawChoice[monoid_laws] = 66;
+ _lawChoice[commutativity] = 34;
+ _lawChoice.init();
+ }
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case monoid_laws: return _monoid_validater.chooseValidater();
+ case commutativity: return new LawValidater<InplaceCommutativity<Type> >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+ monoid_validater<Type> _monoid_validater;
+};
+
+
+}} // namespace itl boost
+
+#endif // BOOST_ITL_VALIDATE_VALIDATER_ABELIAN_MONOID_VALIDATER_HPP_JOFA_100501
+
Deleted: sandbox/itl/boost/validate/validater/algebra_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/algebra_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
+++ (empty file)
@@ -1,47 +0,0 @@
-/*-----------------------------------------------------------------------------+
-A Law Based Test Automaton 'LaBatea'
-Author: Joachim Faulhaber
-Copyright (c) 2007-2009: Joachim Faulhaber
-+------------------------------------------------------------------------------+
- Distributed under the Boost Software License, Version 1.0.
- (See accompanying file LICENCE.txt or copy at
- http://www.boost.org/LICENSE_1_0.txt)
-+-----------------------------------------------------------------------------*/
-#pragma once
-
-#include <boost/itl/type_traits/is_continuous.hpp>
-#include <boost/itl/functors.hpp>
-#include <boost/validate/validater/law_validater.hpp>
-
-namespace boost{namespace itl
-{
- typedef WeightedNumberGentor<int> ChoiceT;
-
- class algebra_validater
- {
- public:
- virtual ~algebra_validater(){}
- // the choice probability, and also the availability of laws is individual to each type
- // Somehow it has to be defined in conjunction to every type. So it is an aspect of
- // type traits.
- virtual void setProfile()=0;
- virtual void validate()=0;
- virtual void addFrequencies(ValidationCounterT&)=0;
- virtual void addViolations(ViolationCounterT&, ViolationMapT&)=0;
-
- virtual bool hasValidProfile()const{ return true; }
-
- static int share(int total, int& index, int& rest_shares);
- };
-
- inline int algebra_validater::share(int total, int& index, int& rest_shares)
- {
- int count = total - index;
- int share = rest_shares / count;
- rest_shares -= share;
- ++index;
- return share;
- }
-
-}} // namespace itl boost
-
Modified: sandbox/itl/boost/validate/validater/bit_collector_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/bit_collector_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/bit_collector_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -21,8 +21,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class collector_validater : public concept_validater
{
@@ -105,32 +103,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
};
Modified: sandbox/itl/boost/validate/validater/collector_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/collector_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/collector_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -27,8 +27,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class collector_validater : public concept_validater
{
@@ -110,32 +108,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
};
Modified: sandbox/itl/boost/validate/validater/concept_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/concept_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/concept_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -7,7 +7,8 @@
(See accompanying file LICENCE.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------------------------------------*/
-#pragma once
+#ifndef BOOST_ITL_VALIDATE_CONCEPT_VALIDATER_HPP_JOFA_080203
+#define BOOST_ITL_VALIDATE_CONCEPT_VALIDATER_HPP_JOFA_080203
#include <boost/itl/type_traits/is_continuous.hpp>
#include <boost/itl/functors.hpp>
@@ -24,14 +25,37 @@
// the choice probability, and also the availability of laws is individual to each type
// Somehow it has to be defined in conjunction to every type. So it is an aspect of
// type traits.
- virtual void setProfile()=0;
- virtual void validate()=0;
- virtual void addFrequencies(ValidationCounterT&)=0;
- virtual void addViolations(ViolationCounterT&, ViolationMapT&)=0;
-
+ //CL virtual void setProfile()=0;
+ virtual LawValidaterI* chooseValidater()=0;
virtual bool hasValidProfile()const{ return true; }
+ void validate()
+ {
+ _validater = chooseValidater();
+ if(_validater)
+ {
+ _validater->run();
+ _validater->addFrequencies(_frequencies);
+ _validater->addViolations(_violationsCount, _violations);
+ delete _validater;
+ }
+ }
+
+ void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
+
+ void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
+ {
+ summary += _violationsCount;
+ collector += _violations;
+ }
+
static int share(int total, int& index, int& rest_shares);
+
+ private:
+ LawValidaterI* _validater;
+ ValidationCounterT _frequencies;
+ ViolationCounterT _violationsCount;
+ ViolationMapT _violations;
};
inline int concept_validater::share(int total, int& index, int& rest_shares)
@@ -45,3 +69,4 @@
}} // namespace itl boost
+#endif // BOOST_ITL_VALIDATE_CONCEPT_VALIDATER_HPP_JOFA_080203
Modified: sandbox/itl/boost/validate/validater/function_equality_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/function_equality_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/function_equality_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -16,8 +16,6 @@
namespace boost{namespace itl
{
- typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename SourceT, typename TargetT>
class function_equality_validater : public concept_validater
@@ -59,31 +57,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
}; //class function_equality_validater
Modified: sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -23,7 +23,6 @@
namespace boost{namespace itl
{
- typedef WeightedNumberGentor<int> ChoiceT;
template <typename Type>
class interval_morphic_validater : public concept_validater
@@ -96,31 +95,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
};
}} // namespace itl boost
Modified: sandbox/itl/boost/validate/validater/itl_induced_relations.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/itl_induced_relations.hpp (original)
+++ sandbox/itl/boost/validate/validater/itl_induced_relations.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -7,7 +7,8 @@
(See accompanying file LICENCE.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
+-----------------------------------------------------------------------------*/
-#pragma once
+#ifndef BOOST_ITL_VALIDATE_VALIDATER_ITL_INDUCED_RELATIONS_HPP_JOFA_090304
+#define BOOST_ITL_VALIDATE_VALIDATER_ITL_INDUCED_RELATIONS_HPP_JOFA_090304
#include <boost/itl/functors.hpp>
#include <boost/itl/detail/interval_morphism.hpp>
@@ -17,8 +18,6 @@
namespace boost{namespace itl
{
- typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class itl_induced_relations_validater : public concept_validater
@@ -57,34 +56,12 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
}; //class itl_induced_relations_validater
-
}} // namespace itl boost
+#endif BOOST_ITL_VALIDATE_VALIDATER_ITL_INDUCED_RELATIONS_HPP_JOFA_090304
+
Modified: sandbox/itl/boost/validate/validater/itl_order_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/itl_order_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/itl_order_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -19,8 +19,6 @@
namespace boost{namespace itl
{
- typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class itl_order_validater : public concept_validater
@@ -45,9 +43,9 @@
const int sum_of_weights = 100;
_lawChoice.setSize(sum_of_weights);
_lawChoice.setMaxWeights(sum_of_weights);
- _lawChoice[strictWeakStdOrder] = 33;
- _lawChoice[partialStdOrder] = 33;
- _lawChoice[containedInOrder] = 34;
+ _lawChoice[strictWeakStdOrder] = 33;
+ _lawChoice[partialStdOrder] = 33;
+ _lawChoice[containedInOrder] = 34;
_lawChoice.init();
}
@@ -56,40 +54,15 @@
{
switch(_lawChoice.some())
{
- case strictWeakStdOrder: return _lessValidater.chooseValidater();
- case partialStdOrder: return _lessEqualValidater.chooseValidater();
- case containedInOrder: return _containedInValidater.chooseValidater();
+ case strictWeakStdOrder: return _lessValidater.chooseValidater();
+ case partialStdOrder: return _lessEqualValidater.chooseValidater();
+ case containedInOrder: return _containedInValidater.chooseValidater();
default: return NULL;
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
-
+ ChoiceT _lawChoice;
LessValidaterT _lessValidater;
LessEqualValidaterT _lessEqualValidater;
ContainedInValidaterT _containedInValidater;
Modified: sandbox/itl/boost/validate/validater/itl_set_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/itl_set_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/itl_set_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -26,8 +26,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class itl_set_validater : public concept_validater
{
@@ -112,31 +110,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
};
Added: sandbox/itl/boost/validate/validater/monoid_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/monoid_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,56 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#ifndef BOOST_ITL_VALIDATE_VALIDATER_MONOID_VALIDATER_HPP_JOFA_100501
+#define BOOST_ITL_VALIDATE_VALIDATER_MONOID_VALIDATER_HPP_JOFA_100501
+
+#include <boost/itl/functors.hpp>
+#include <boost/validate/validater/concept_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
+
+namespace boost{namespace itl
+{
+
+template <typename Type>
+class monoid_validater : public concept_validater
+{
+public:
+
+ enum Laws {associativity, neutrality, Laws_size};
+
+ monoid_validater(){ setProfile(); }
+
+ void setProfile()
+ {
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(100);
+ _lawChoice[associativity] = 50;
+ _lawChoice[neutrality] = 50;
+ _lawChoice.init();
+ }
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case associativity: return new LawValidater<InplaceAssociativity<Type> >;
+ case neutrality: return new LawValidater<InplaceNeutrality <Type> >;
+ default: return NULL;
+ }
+ }
+
+private:
+ ChoiceT _lawChoice;
+};
+
+
+}} // namespace itl boost
+
+#endif // BOOST_ITL_VALIDATE_VALIDATER_MONOID_VALIDATER_HPP_JOFA_100501
+
Modified: sandbox/itl/boost/validate/validater/partial_order_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/partial_order_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/partial_order_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -20,7 +20,6 @@
namespace boost{namespace itl
{
- typedef WeightedNumberGentor<int> ChoiceT;
template <typename Type, template<class>class Relation, template<class>class Equality = itl::std_equal>
class partial_order_validater : public concept_validater
@@ -58,32 +57,9 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
private:
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
+ ChoiceT _lawChoice;
};
}} // namespace itl boost
Modified: sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -29,8 +29,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class signed_quantifier_validater : public concept_validater
{
@@ -121,32 +119,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
};
Modified: sandbox/itl/boost/validate/validater/sorted_associative_back_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/sorted_associative_back_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/sorted_associative_back_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -22,8 +22,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type, typename TargetT = itl::list<typename Type::value_type> >
class sorted_associative_back_validater : public concept_validater
{
@@ -106,32 +104,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
+ ChoiceT _lawChoice;
};
Modified: sandbox/itl/boost/validate/validater/sorted_associative_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/sorted_associative_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/sorted_associative_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -24,8 +24,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type, typename TargetT = itl::list<typename Type::value_type> >
class sorted_associative_validater : public concept_validater
{
@@ -108,32 +106,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
+ ChoiceT _lawChoice;
};
Modified: sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -20,7 +20,6 @@
namespace boost{namespace itl
{
- typedef WeightedNumberGentor<int> ChoiceT;
template <typename Type, template<class>class Relation>
class strict_weak_order_validater : public concept_validater
@@ -58,32 +57,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
+ ChoiceT _lawChoice;
}; //class concept_validater
Modified: sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -27,8 +27,6 @@
namespace boost{namespace itl
{
-typedef WeightedNumberGentor<int> ChoiceT;
-
template <typename Type>
class unsigned_quantifier_validater : public concept_validater
{
@@ -88,32 +86,8 @@
}
}
- void validate()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->run();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += _violationsCount;
- collector += _violations;
- }
-
-
private:
ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
};
Modified: sandbox/itl/libs/validate/doc/boostcon2010/BoostAlabaster.pptx
==============================================================================
Binary files. No diff available.
Added: sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/boostcon_abelian_monoids.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/boostcon_abelian_monoids.cpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,38 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/abelian_monoid_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+
+void test_abelian_monoid_driver()
+{
+ abelian_monoid_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ GentorProfileSgl::it()->set_std_profile(16,1);
+ GentorProfileSgl::it()->report_profile();
+ validater.validate();
+};
+
+
+int main()
+{
+ test_abelian_monoid_driver();
+ return 0;
+}
Added: sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/vc9_boostcon_abelian_monoids.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/boostcon_abelian_monoids_/vc9_boostcon_abelian_monoids.vcproj 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,252 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_boostcon_abelian_monoids"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4733}"
+ RootNamespace="vc9_boostcon_abelian_monoids"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ AdditionalOptions="/bigobj"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boostcon_abelian_monoids_\boostcon_abelian_monoids.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\driver\itl_set_driver.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Added: sandbox/itl/libs/validate/example/boostcon_law_validater_/Jamfile.v2
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/boostcon_law_validater_/Jamfile.v2 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,15 @@
+# (C) Copyright 2010: Joachim Faulhaber
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
+
+obj gentorprofile.obj : ../../src/gentor/gentorprofile.cpp ;
+
+exe boostcon_law_validater
+ :
+ boostcon_law_validater.cpp
+ gentorprofile.obj
+ /boost/date_time//boost_date_time
+ :
+ <include>../../..
+ <include>$(BOOST_ROOT)
+ ;
Added: sandbox/itl/libs/validate/example/boostcon_law_validater_/boostcon_law_validater.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/boostcon_law_validater_/boostcon_law_validater.cpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,53 @@
+/*-----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2009: Joachim Faulhaber
++------------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++-----------------------------------------------------------------------------*/
+#include <boost/itl/ptime.hpp>
+#include <boost/itl/interval_set.hpp>
+#include <boost/itl_xt/list.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+using namespace boost::posix_time;
+
+void test_LawValidater()
+{
+ typedef InplaceCommutativity<itl::set<int> > TestLawT;
+ LawValidater<TestLawT> validater;
+
+ //-----------------------------------------------------------------------------
+ int test_count = 10000;
+ ptime start, stop;
+
+ GentorProfileSgl::it()->set_std_profile(8,1);
+ validater.set_trials_count(test_count);
+
+ TestLawT law;
+ cout << "Testing " << law.typeString() << endl
+ << "trials_count = " << test_count << endl
+ << "Start ...\n";
+ start = ptime(microsec_clock::local_time());
+ validater.run();
+ stop = ptime(microsec_clock::local_time());
+ cout << "Stop. Time elapsed: " << stop - start << endl;
+
+ if(validater.violation_count() == 0)
+ cout << "Law successfully validated\n";
+}
+
+
+
+int main()
+{
+ test_LawValidater();
+ return 0;
+}
Added: sandbox/itl/libs/validate/example/boostcon_law_validater_/vc9_boostcon_law_validater.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/boostcon_law_validater_/vc9_boostcon_law_validater.vcproj 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_boostcon_law_validater"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F473C}"
+ RootNamespace="vc9_boostcon_law_validater"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="4"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Source Files"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\boostcon_law_validater_\boostcon_law_validater.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Header Files"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Resource Files"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>
Modified: sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_single_/labat_single.cpp 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -70,7 +70,7 @@
// <interval_map<int,int,partial_enricher>, itl::inplace_plus, itl::inplace_minus> TestLawT;
//LawValidater<TestLawT, RandomGentor> test_law;
- typedef InplaceCommutativity<itl::list<double> > TestLawT;
+ typedef InplaceCommutativity<itl::set<double> > TestLawT;
LawValidater<TestLawT> test_law;
Modified: sandbox/itl/libs/validate/example/vc9_validate_examples.sln
==============================================================================
--- sandbox/itl/libs/validate/example/vc9_validate_examples.sln (original)
+++ sandbox/itl/libs/validate/example/vc9_validate_examples.sln 2010-05-02 09:28:53 EDT (Sun, 02 May 2010)
@@ -41,6 +41,10 @@
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_collector", "labat_collector_\vc9_labat_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569E8}"
EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boostcon_law_validater", "boostcon_law_validater_\vc9_boostcon_law_validater.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F473C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_boostcon_abelian_monoids", "boostcon_abelian_monoids_\vc9_boostcon_abelian_monoids.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4733}"
+EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@@ -127,6 +131,14 @@
{9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.Build.0 = Debug|Win32
{9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.ActiveCfg = Release|Win32
{9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F473C}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4733}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk