Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51048 - in sandbox/itl: boost/itl boost/itl/type_traits boost/validate boost/validate/laws boost/validate/validater libs/itl/build/win32 libs/itl/test libs/validate/example/labat_single libs/validate/example/labat_val_relations libs/validate/example/labat_val_setbase libs/validate/src/gentor
From: afojgo_at_[hidden]
Date: 2009-02-06 05:04:28


Author: jofaber
Date: 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
New Revision: 51048
URL: http://svn.boost.org/trac/boost/changeset/51048

Log:
Added law based tests, bugfixes. Added tests for optimized subset superset relation.
Adapted law based tests for violation of associativity for partial absorbing Quantifiers.
Stable {msvc-9.0, partly congcc-4.3-a7}

Added:
   sandbox/itl/boost/itl/type_traits/has_inverse.hpp (contents, props changed)
   sandbox/itl/boost/validate/itl_relations_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/itl_setbase_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/laws/induced_relation.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/
   sandbox/itl/boost/validate/validater/itl_induced_relations.hpp (contents, props changed)
   sandbox/itl/libs/itl/test/test_interval_set_laws_shared.hpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_val_relations/
   sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_val_relations/vc9_labat_val_relations.vcproj (contents, props changed)
   sandbox/itl/libs/validate/example/labat_val_setbase/
   sandbox/itl/libs/validate/example/labat_val_setbase/labat_val_setbase.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_val_setbase/vc9_labat_val_setbase.vcproj (contents, props changed)
Text files modified:
   sandbox/itl/boost/itl/interval_base_map.hpp | 21 ++++++-
   sandbox/itl/boost/itl/interval_base_set.hpp | 8 ++
   sandbox/itl/boost/itl/interval_map.hpp | 8 ++
   sandbox/itl/boost/itl/map.hpp | 8 ++
   sandbox/itl/boost/itl/predicates.hpp | 8 ++
   sandbox/itl/boost/itl/split_interval_map.hpp | 7 ++
   sandbox/itl/boost/validate/laws/order.h | 15 ++--
   sandbox/itl/boost/validate/realmvalidater.h | 99 +++++++++++++---------------------
   sandbox/itl/boost/validate/typevalidater.h | 114 +++++++++++++++++++++++----------------
   sandbox/itl/libs/itl/build/win32/vc9_all.sln | 12 ++++
   sandbox/itl/libs/validate/example/labat_single/labat_single.cpp | 70 +++++++++++++++---------
   sandbox/itl/libs/validate/src/gentor/gentorprofile.cpp | 4
   12 files changed, 225 insertions(+), 149 deletions(-)

Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -306,7 +306,10 @@
     { return sub.contained_in(*this); }
 
     /// <tt>*this</tt> is subset of <tt>super</tt>
- bool contained_in(const interval_base_map& super)const;
+ bool contained_in(const interval_base_map& super)const
+ {
+ return Interval_Set::is_contained_in(*this, super);
+ }
 //@}
 
 
@@ -931,7 +934,7 @@
 
 
 
-
+/*CL
 template
 <
     class SubType,
@@ -945,7 +948,7 @@
             return false;
     return true;
 }
-
+*/
 
 template
 <
@@ -1530,6 +1533,18 @@
     return stream << "}";
 }
 
+
+template < //JODO class KeyT, class DataT, class Traits>
+ class SubType,
+ class DomainT, class CodomainT, class Traits>
+struct is_map<itl::interval_base_map<SubType,DomainT,CodomainT,Traits> >
+{
+ typedef is_map<itl::interval_base_map<SubType,DomainT,CodomainT,Traits> > type;
+ static const bool value = true;
+};
+
+
+
 }} // namespace itl boost
 
 #endif

Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -241,7 +241,10 @@
                          template<class DomT2,ITL_COMPARE>class Interv, ITL_ALLOC Allc>
         class IntervalSet
>
- bool contained_in(const IntervalSet<DomainT,Compare,Interval,Alloc>& super)const;
+ bool contained_in(const IntervalSet<DomainT,Compare,Interval,Alloc>& super)const
+ {
+ return Interval_Set::is_contained_in(*this, super);
+ }
 
 /** @name E: Bounds and other selectors
     */
@@ -541,6 +544,7 @@
 }
 
 
+/*CL
 template<class SubType,
          class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>
     template
@@ -570,7 +574,7 @@
         return true;
     }
 }
-
+*/
 
 template<class SubType,
          class DomainT, ITL_COMPARE Compare, template<class,ITL_COMPARE>class Interval, ITL_ALLOC Alloc>

Modified: sandbox/itl/boost/itl/interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_map.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -1021,6 +1021,14 @@
 };
 
 template <class KeyT, class DataT, class Traits>
+struct has_inverse<itl::interval_map<KeyT,DataT,Traits> >
+{
+ typedef has_inverse<itl::interval_map<KeyT,DataT,Traits> > type;
+ static const bool value = has_inverse<DataT>::value;
+};
+
+
+template <class KeyT, class DataT, class Traits>
 struct is_interval_container<itl::interval_map<KeyT,DataT,Traits> >
 {
         typedef is_interval_container<itl::interval_map<KeyT,DataT,Traits> > type;

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -36,6 +36,7 @@
 #include <string>
 #include <boost/itl/notate.hpp>
 #include <boost/itl/type_traits/is_map.hpp>
+#include <boost/itl/type_traits/has_inverse.hpp>
 #include <boost/itl/type_traits/to_string.hpp>
 #include <boost/itl/functors.hpp>
 #include <boost/itl/predicates.hpp>
@@ -703,6 +704,13 @@
                 static const bool value = true;
         };
 
+ template <class KeyT, class DataT, class Traits>
+ struct has_inverse<itl::map<KeyT,DataT,Traits> >
+ {
+ typedef has_inverse<itl::map<KeyT,DataT,Traits> > type;
+ static const bool value = has_inverse<DataT>::value;
+ };
+
     template <class DomainT, class CodomainT, class Traits>
     struct is_interval_container<itl::map<DomainT,CodomainT,Traits> >
     {

Modified: sandbox/itl/boost/itl/predicates.hpp
==============================================================================
--- sandbox/itl/boost/itl/predicates.hpp (original)
+++ sandbox/itl/boost/itl/predicates.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -139,6 +139,10 @@
         }
     };
 
+ template<>
+ inline std::string unary_template_to_string<itl::sub_super_set>::apply()
+ { return "C="; }
+
     /// Functor class template <b>contains</b> implements the superset relation.
     template<class Type>
     struct super_sub_set : public relation<Type,Type>
@@ -152,6 +156,10 @@
         }
     };
 
+ template<>
+ inline std::string unary_template_to_string<itl::super_sub_set>::apply()
+ { return "D="; }
+
 }} // namespace itl boost
 
 #endif

Modified: sandbox/itl/boost/itl/split_interval_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/split_interval_map.hpp (original)
+++ sandbox/itl/boost/itl/split_interval_map.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -791,6 +791,13 @@
 };
 
 template <class KeyT, class DataT, class Traits>
+struct has_inverse<itl::split_interval_map<KeyT,DataT,Traits> >
+{
+ typedef has_inverse<itl::split_interval_map<KeyT,DataT,Traits> > type;
+ static const bool value = has_inverse<DataT>::value;
+};
+
+template <class KeyT, class DataT, class Traits>
 struct is_interval_container<itl::split_interval_map<KeyT,DataT,Traits> >
 {
         typedef is_interval_container<itl::split_interval_map<KeyT,DataT,Traits> > type;

Added: sandbox/itl/boost/itl/type_traits/has_inverse.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/type_traits/has_inverse.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,26 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: 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 __itl_type_traits_has_inverse_JOFA_090205_H__
+#define __itl_type_traits_has_inverse_JOFA_090205_H__
+
+#include <boost/type_traits/is_signed.hpp>
+
+namespace boost{ namespace itl
+{
+
+ template <class Type> struct has_inverse
+ {
+ typedef has_inverse<Type> type;
+ static const bool value = is_signed<Type>::value;
+ };
+
+}} // namespace boost itl
+
+#endif // __itl_type_traits_has_inverse_JOFA_090205_H__
+
+

Added: sandbox/itl/boost/validate/itl_relations_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/itl_relations_validater.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,173 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: 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 <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/typevalidater.h>
+#include <boost/validate/validater/itl_induced_relations.hpp>
+#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class ItlRelationsValidater : public itl_validater
+ {
+ public:
+ ItlRelationsValidater() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 10;
+ _rootChoice[RootType::separate_interval_set] = 10;
+ _rootChoice[RootType::split_interval_set] = 10;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 35;
+ _rootChoice[RootType::split_interval_map] = 35;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0; //NOTE: induced relations only
+ setDomainTypeNames(); // work for integral DomainType, because
+ _domainChoice.init(); // atomized_type needs to be finite.
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::partial_absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::partial_enricher] = 25;
+ _neutronizerChoice[NeutronHandlerType::total_absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::total_enricher] = 25;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("ItlRelationsValidater::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("ItlRelationsValidater::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("ItlRelationsValidater::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("ItlRelationsValidater::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ AlgebraValidater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ int neutronizerChoice = _neutronizerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_induced_relations_validater<interval_set<int> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_induced_relations_validater<separate_interval_set<int> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_induced_relations_validater<split_interval_set<int> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(neutronizerChoice) {
+ case NeutronHandlerType::partial_absorber:
+ return new itl_induced_relations_validater<split_interval_map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher:
+ return new itl_induced_relations_validater<split_interval_map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber:
+ return new itl_induced_relations_validater<split_interval_map<int,int,total_absorber> >;
+ case NeutronHandlerType::total_enricher:
+ return new itl_induced_relations_validater<split_interval_map<int,int,total_enricher> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"),
+ neutronizerChoice, _neutronizerChoice);
+ }
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(neutronizerChoice) {
+ case NeutronHandlerType::partial_absorber:
+ return new itl_induced_relations_validater<interval_map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher:
+ return new itl_induced_relations_validater<interval_map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber:
+ return new itl_induced_relations_validater<interval_map<int,int,total_absorber> >;
+ case NeutronHandlerType::total_enricher:
+ return new itl_induced_relations_validater<interval_map<int,int,total_enricher> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"),
+ neutronizerChoice, _neutronizerChoice);
+ }
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ return NULL; //just to please the compiler ;)
+ }
+
+ };
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/itl_setbase_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/itl_setbase_validater.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,153 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: 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 <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/typevalidater.h>
+#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class ItlSetBaseValidater : public itl_validater
+ {
+ public:
+ ItlSetBaseValidater() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 0;
+ _rootChoice[RootType::split_interval_map] = 100;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::partial_absorber] = 100;
+ _neutronizerChoice[NeutronHandlerType::partial_enricher] = 0;
+ _neutronizerChoice[NeutronHandlerType::total_absorber] = 0;
+ _neutronizerChoice[NeutronHandlerType::total_enricher] = 0;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("ItlSetBaseValidater::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("ItlSetBaseValidater::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("ItlSetBaseValidater::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("ItlSetBaseValidater::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ AlgebraValidater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ int neutronizerChoice = _neutronizerChoice.some();
+
+ switch(rootChoice)
+ {
+ //case RootType::itl_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new InplaceSetValidater<itl::set<int> >;
+ // case DomainType::Double: return new InplaceSetValidater<itl::set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ //case RootType::interval_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new IntervalSetValidater<interval_set<int> >;
+ // case DomainType::Double: return new InplaceSetValidater<interval_set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ //case RootType::separate_interval_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new IntervalSetValidater<separate_interval_set<int> >;
+ // case DomainType::Double: return new IntervalSetValidater<separate_interval_set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ //case RootType::split_interval_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new IntervalSetValidater<split_interval_set<int> >;
+ // case DomainType::Double: return new IntervalSetValidater<split_interval_set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int: return new InplaceSetBaseValidater<split_interval_map<int,int,total_enricher> >;
+ //case DomainType::Double: return new IntervalSetValidater<split_interval_set<double> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ return NULL; //just to please the compiler ;)
+ }
+
+ };
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/laws/induced_relation.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/laws/induced_relation.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,92 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: 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 __itl_induced_relation_hpp_JOFA_090204__
+#define __itl_induced_relation_hpp_JOFA_090204__
+
+#include <boost/itl/type_traits/value_size.hpp>
+#include <boost/validate/law.h>
+
+namespace boost{namespace itl
+{
+ // An InducedRelation can be represented as a triangular commuting diagram
+ // where f is a unary function and R a binary predicate or relation
+ // ---------------------------------------------------------------------------
+ // (a,b)--f-->(a',b')
+ // \ /
+ // R \ == / R
+ // \ /
+ // V V
+ // {true,false}
+ // ---------------------------------------------------------------------------
+ template <typename SourceT, typename TargetT,
+ template<class,class>class FunctionT, // morphic function f
+ template<typename>class RelationT> // binary predicate like ==
+ class InducedRelation :
+ public Law<InducedRelation<SourceT,TargetT,FunctionT,RelationT>,
+ LOKI_TYPELIST_2(SourceT, SourceT), LOKI_TYPELIST_2(bool,bool)>
+ {
+ /** a rel b == f(a) rel f(b)
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "InducedRelation"; }
+ std::string formula()const { return "cont a, cont b: a rel b == f(a) rel f(b)"; }
+
+ std::string typeString()const
+ {
+ return
+ "InducedRelation<"+type_to_string<SourceT>::apply()+","
+ +type_to_string<TargetT>::apply()+","
+ +binary_template_to_string<FunctionT>::apply()+","
+ +unary_template_to_string<RelationT>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // a rel b == f(a) rel f(b)
+ // --- left hand side ------------------------
+ // lhs := a rel b
+ SourceT a = this->template getInputValue<operand_a>();
+ SourceT b = this->template getInputValue<operand_b>();
+ bool lhs = RelationT<SourceT>()(a,b);
+ // --- right hand side -----------------------
+ TargetT f_a, f_b;
+ FunctionT<TargetT,SourceT>()(f_a, a);
+ FunctionT<TargetT,SourceT>()(f_b, b);
+ bool rhs = RelationT<TargetT>()(f_a, f_b);
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return lhs == rhs;
+ }
+
+ size_t size()const
+ {
+ return
+ value_size<SourceT>::apply(this->template getInputValue<operand_a>())+
+ value_size<SourceT>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool debug_holds()
+ {
+ return holds();
+ }
+
+ }; //class InducedRelation
+
+
+}} // namespace itl boost
+
+#endif // __itl_induced_relation_hpp_JOFA_090204__
+

Modified: sandbox/itl/boost/validate/laws/order.h
==============================================================================
--- sandbox/itl/boost/validate/laws/order.h (original)
+++ sandbox/itl/boost/validate/laws/order.h 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -51,8 +51,6 @@
     std::string unary_template_to_string<std::less_equal>::apply() { return "<="; }
     template<>
     std::string unary_template_to_string<std::less>::apply() { return "<"; }
- template<>
- std::string unary_template_to_string<itl::sub_super_set>::apply(){ return "C="; }
 
     // ---------------------------------------------------------------------------
     template <typename Type, template<class>class Relation>
@@ -84,10 +82,12 @@
     };
 
     // ---------------------------------------------------------------------------
- template <typename Type, template<class>class Relation>
+ template <typename Type,
+ template<class>class Relation,
+ template<class>class Equality = itl::std_equal>
     class Antisymmetry
- : public Law<Antisymmetry<Type,Relation>,
- LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_1(Type)>
+ : public Law<Antisymmetry<Type,Relation,Equality>,
+ LOKI_TYPELIST_2(Type,Type), Loki::NullType>
     {
         /** a <= b && b <= a => a == b
         Input = (a := inVal1, b := inVal2)
@@ -100,7 +100,8 @@
         std::string typeString()const
         {
             return "Antisymmetry<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Relation>::apply()+">";
+ +unary_template_to_string<Relation>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
         }
 
     public:
@@ -110,7 +111,7 @@
             Type a = this->template getInputValue<operand_a>();
             Type b = this->template getInputValue<operand_b>();
 
- return !(Relation<Type>()(a,b) && Relation<Type>()(b,a)) || a == b;
+ return !(Relation<Type>()(a,b) && Relation<Type>()(b,a)) || Equality<Type>()(a,b);
         }
 
         bool debug_holds(){ return holds(); }

Modified: sandbox/itl/boost/validate/realmvalidater.h
==============================================================================
--- sandbox/itl/boost/validate/realmvalidater.h (original)
+++ sandbox/itl/boost/validate/realmvalidater.h 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -29,13 +29,13 @@
             setValid(true);
             _rootChoice.setSize(RootType::Types_size);
             _rootChoice.setMaxWeights(100);
- _rootChoice[RootType::itl_set] = 14;
- _rootChoice[RootType::interval_set] = 14;
- _rootChoice[RootType::separate_interval_set] = 14;
- _rootChoice[RootType::split_interval_set] = 14;
- _rootChoice[RootType::itl_map] = 14;
- _rootChoice[RootType::interval_map] = 15;
- _rootChoice[RootType::split_interval_map] = 15;
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
             setRootTypeNames();
             _rootChoice.init();
 
@@ -89,27 +89,6 @@
 
         }
 
- /*CL
- void validate()
- {
- //srand(static_cast<unsigned>(time(NULL))); //Different numbers each run
- srand(static_cast<unsigned>(1)); //Same numbers each run (std)
- //srand(static_cast<unsigned>(4711)); //Same numbers each run (varying)
-
- for(int idx=0; hasValidProfile(); idx++)
- {
- if(_frequencies.size() == 402)
- {
- reportFrequencies("freq402.txt");
- break;
- }
- if(idx>0 && idx % 100 == 0)
- reportFrequencies();
- validateType();
- }
- }
- */
-
         AlgebraValidater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
@@ -119,38 +98,38 @@
 
             switch(rootChoice)
             {
- case RootType::itl_set: {
- switch(domainChoice) {
- case DomainType::Int: return new InplaceSetValidater<itl::set<int> >;
- case DomainType::Double: return new InplaceSetValidater<itl::set<double> >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
- domainChoice, _domainChoice);
- }
- }
- case RootType::interval_set: {
- switch(domainChoice) {
- case DomainType::Int: return new IntervalSetValidater<interval_set<int> >;
- case DomainType::Double: return new InplaceSetValidater<interval_set<double> >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
- domainChoice, _domainChoice);
- }
- }
- case RootType::separate_interval_set: {
- switch(domainChoice) {
- case DomainType::Int: return new IntervalSetValidater<separate_interval_set<int> >;
- case DomainType::Double: return new IntervalSetValidater<separate_interval_set<double> >;
- default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
- domainChoice, _domainChoice);
- }
- }
- case RootType::split_interval_set: {
- switch(domainChoice) {
- case DomainType::Int: return new IntervalSetValidater<split_interval_set<int> >;
- case DomainType::Double: return new IntervalSetValidater<split_interval_set<double> >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
- domainChoice, _domainChoice);
- }
- }
+ //case RootType::itl_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new InplaceSetValidater<itl::set<int> >;
+ // case DomainType::Double: return new InplaceSetValidater<itl::set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ //case RootType::interval_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new IntervalSetValidater<interval_set<int> >;
+ // case DomainType::Double: return new InplaceSetValidater<interval_set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ //case RootType::separate_interval_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new IntervalSetValidater<separate_interval_set<int> >;
+ // case DomainType::Double: return new IntervalSetValidater<separate_interval_set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
+ //case RootType::split_interval_set: {
+ // switch(domainChoice) {
+ // case DomainType::Int: return new IntervalSetValidater<split_interval_set<int> >;
+ // case DomainType::Double: return new IntervalSetValidater<split_interval_set<double> >;
+ // default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ // domainChoice, _domainChoice);
+ // }
+ // }
             //-----------------------------------------------------------------
             // Maps
             //-----------------------------------------------------------------

Modified: sandbox/itl/boost/validate/typevalidater.h
==============================================================================
--- sandbox/itl/boost/validate/typevalidater.h (original)
+++ sandbox/itl/boost/validate/typevalidater.h 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -12,6 +12,7 @@
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/itl/type_traits/is_continuous.hpp>
+#include <boost/itl/type_traits/has_inverse.hpp>
 #include <boost/itl/functors.hpp>
 #include <boost/itl/interval_morphism.hpp>
 #include <boost/validate/laws/set_laws.h>
@@ -95,7 +96,7 @@
 
     // ------------------------------------------------------------------------
 
- template <typename Type, template<class>class Relation>
+ template <typename Type, template<class>class Relation, template<class>class Equality = itl::std_equal>
     class PartialOrderValidater : public AlgebraValidater
     {
     public:
@@ -229,7 +230,7 @@
     public:
         typedef StrictWeakOrderValidater<Type, std::less> LessValidaterT;
         typedef PartialOrderValidater<Type, std::less_equal> LessEqualValidaterT;
- typedef PartialOrderValidater<Type, itl::sub_super_set> ContainedInValidaterT;
+ typedef PartialOrderValidater<Type, itl::sub_super_set, itl::element_equal> ContainedInValidaterT;
 
         enum Laws
         {
@@ -239,8 +240,8 @@
             inplacePlusAssociativity,
             inplacePlusNeutrality,
             inplacePlusCommutativity,
- inplaceStarAssociativity,
- inplaceStarCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
             Laws_size
         };
 
@@ -248,22 +249,36 @@
 
         void setProfile()
         {
+ const int sum_of_shares = 100;
+ const int prior_share_count = 11;
+ const int prior_share = sum_of_shares / prior_share_count;
+
+ int assoc_share = prior_share;
+
+ if( is_map<Type>::value
+ && has_inverse<typename Type::codomain_type>::value
+ && absorbs_neutrons<Type>::value && !is_total<Type>::value)
+ // NOTE ASSOC: if codomain_type has an inverse
+ // all absorber maps loose associativity on intersection
+ assoc_share = 0;
+
+ int rest_shares = sum_of_shares - assoc_share;
+ int single_share = rest_shares / 10;
+ int single_shares = single_share * 4;
+ int order_rest = rest_shares - single_shares;
+ int order_share = order_rest / 3;
+ int first_share = order_rest - 2*order_share;
+
             _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- _lawChoice[strictWeakStdOrder] = 19;
- _lawChoice[partialStdOrder] = 18;
- _lawChoice[containedInOrder] = 18;
- _lawChoice[inplacePlusAssociativity] = 9;
- _lawChoice[inplacePlusNeutrality] = 9;
- _lawChoice[inplacePlusCommutativity] = 9;
- _lawChoice[inplaceStarAssociativity] = 9;
- _lawChoice[inplaceStarCommutativity] = 9;
- //JODO _lawChoice[inplaceSymmetricDifference] = 10; // only (map|cop)<set> NOT (map|cop)<group>
- //JODO _lawChoice[inplacePlusDistributivity] = 100; // only (map|cop)<set> NOT (map|cop)<group>
- //JODO _lawChoice[inplaceStarDistributivity] = 100; // only (map|cop)<set> NOT (map|cop)<group>
- //JODO _lawChoice[inplacePlusDeMorgan] = 100; // only (map|cop)<set> NOT (map|cop)<group>
- //JODO _lawChoice[inplaceStarDeMorgan] = 100; // only (map|cop)<set> NOT (map|cop)<group>
- //JODO _lawChoice[inplaceNaturalInversion] = 25; // only cop NOT map
+ _lawChoice.setMaxWeights(sum_of_shares);
+ _lawChoice[strictWeakStdOrder] = first_share;
+ _lawChoice[partialStdOrder] = order_share;
+ _lawChoice[containedInOrder] = order_share;
+ _lawChoice[inplacePlusAssociativity] = single_share;
+ _lawChoice[inplacePlusNeutrality] = single_share;
+ _lawChoice[inplacePlusCommutativity] = single_share;
+ _lawChoice[inplaceEtAssociativity] = assoc_share;
+ _lawChoice[inplaceEtCommutativity] = single_share;
             _lawChoice.init();
         }
 
@@ -275,11 +290,25 @@
             case strictWeakStdOrder: return _lessValidater.chooseValidater();
             case partialStdOrder: return _lessEqualValidater.chooseValidater();
             case containedInOrder: return _containedInValidater.chooseValidater();
- case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type>, RandomGentor>;
+ case inplacePlusAssociativity:
+ if( is_interval_container<Type>::value
+ && is_map<Type>::value
+ && has_inverse<typename Type::codomain_type>::value
+ && is_interval_splitter<Type>::value )
+ return new LawValidater<InplaceAssociativity<Type, inplace_plus, element_equal>, RandomGentor>;
+ else
+ return new LawValidater<InplaceAssociativity<Type, inplace_plus>, RandomGentor>;
             case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality<Type>, RandomGentor>;
             case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type>, RandomGentor>;
- case inplaceStarAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_et>, RandomGentor>;
- case inplaceStarCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et>, RandomGentor>;
+ case inplaceEtAssociativity:
+ if( is_interval_container<Type>::value
+ && is_map<Type>::value
+ && has_inverse<typename Type::codomain_type>::value
+ && is_total<Type>::value && is_interval_splitter<Type>::value )
+ return new LawValidater<InplaceAssociativity<Type, inplace_et, element_equal>, RandomGentor>;
+ else
+ return new LawValidater<InplaceAssociativity<Type, inplace_et>, RandomGentor>;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et>, RandomGentor>;
             default: return NULL;
             }
         }
@@ -328,11 +357,11 @@
             inplaceFlip,
             inplaceNaturalInversion,
             inplacePlusDistributivity,
- inplaceStarDistributivity,
+ inplaceEtDistributivity,
             inplacePlusDashRightDistrib,
- inplaceStarDashRightDistrib,
+ inplaceEtDashRightDistrib,
             inplacePlusDeMorgan,
- inplaceStarDeMorgan,
+ inplaceEtDeMorgan,
             Laws_size
         };
 
@@ -350,11 +379,11 @@
             _lawChoice[inplaceFlip] = weight;
             _lawChoice[inplaceNaturalInversion] = weight;
             _lawChoice[inplacePlusDistributivity] = weight;
- _lawChoice[inplaceStarDistributivity] = weight;
+ _lawChoice[inplaceEtDistributivity] = weight;
             _lawChoice[inplacePlusDashRightDistrib] = weight;
- _lawChoice[inplaceStarDashRightDistrib] = weight;
+ _lawChoice[inplaceEtDashRightDistrib] = weight;
             _lawChoice[inplacePlusDeMorgan] = weight;
- _lawChoice[inplaceStarDeMorgan] = weight;
+ _lawChoice[inplaceEtDeMorgan] = weight;
             _lawChoice.init();
         }
 
@@ -392,7 +421,7 @@
                                 else
                                         return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
- case inplaceStarDistributivity:
+ case inplaceEtDistributivity:
                 if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value
                     && absorbs_neutrons<Type>::value && !is_total<Type>::value)
                                         return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, element_equal>, RandomGentor>;
@@ -406,13 +435,13 @@
                                 else
                                         return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal>, RandomGentor>;
 
- case inplaceStarDashRightDistrib:
+ case inplaceEtDashRightDistrib:
                                 return new LawValidater<InplaceRightDistributivity<Type, inplace_et, inplace_minus>, RandomGentor>;
 
             case inplacePlusDeMorgan:
                                 return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
- case inplaceStarDeMorgan:
+ case inplaceEtDeMorgan:
                 if( itl::is_interval_container<Type>::value
                                         && (itl::is_interval_splitter<Type>::value || itl::is_interval_separator<Type>::value))
                                         return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::element_equal>, RandomGentor>;
@@ -439,7 +468,7 @@
                                 else
                                         return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
- case inplaceStarDistributivity:
+ case inplaceEtDistributivity:
                 if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
                                         return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, element_equal>, RandomGentor>;
                                 else
@@ -451,13 +480,13 @@
                                 else
                                         return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal>, RandomGentor>;
 
- case inplaceStarDashRightDistrib:
+ case inplaceEtDashRightDistrib:
                                 return new LawValidater<InplaceRightDistributivity<Type, inplace_et, inplace_minus>, RandomGentor>;
 
             case inplacePlusDeMorgan:
                                 return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
 
- case inplaceStarDeMorgan:
+ case inplaceEtDeMorgan:
                 if( itl::is_interval_container<Type>::value
                                         && (itl::is_interval_splitter<Type>::value || itl::is_interval_separator<Type>::value))
                                         return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::element_equal>, RandomGentor>;
@@ -682,23 +711,12 @@
         {
             switch(_lawChoice.some())
             {
- case atomize_plus:
- return new LawValidater
- <
- BinaryPushout
- <
- Type,
- typename Type::atomized_type,
- Interval::Atomize,
- inplace_plus
- >,
- RandomGentor
- >();
+ case atomize_plus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_plus>, RandomGentor>();
             case atomize_minus: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_minus>, RandomGentor>();
- case atomize_star: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_et>, RandomGentor>();
+ case atomize_star: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inplace_et>, RandomGentor>();
             case cluster_plus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_plus>, RandomGentor>();
             case cluster_minus: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_minus>, RandomGentor>();
- case cluster_star: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_et>, RandomGentor>();
+ case cluster_star: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inplace_et>, RandomGentor>();
             case atomize_insert: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, inserter>, RandomGentor>();
             case atomize_erase: return new LawValidater<BinaryPushout<Type, typename Type::atomized_type, Interval::Atomize, eraser>, RandomGentor>();
             case cluster_insert: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, inserter>, RandomGentor>();

Added: sandbox/itl/boost/validate/validater/itl_induced_relations.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/itl_induced_relations.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,98 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: 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
+
+//CL
+//#include <boost/mpl/bool.hpp>
+//#include <boost/mpl/if.hpp>
+//#include <boost/itl/type_traits/is_continuous.hpp>
+//#include <boost/itl/type_traits/has_inverse.hpp>
+#include <boost/itl/functors.hpp>
+//#include <boost/itl/interval_morphism.hpp>
+//#include <boost/validate/laws/set_laws.h>
+//#include <boost/validate/laws/order.h>
+//#include <boost/validate/laws/pushouts.h>
+#include <boost/validate/laws/induced_relation.hpp>
+#include <boost/validate/lawvalidater.h>
+#include <boost/validate/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+ typedef WeightedNumberGentor<int> ChoiceT;
+
+
+ template <typename Type>
+ class itl_induced_relations_validater : public AlgebraValidater
+ {
+ public:
+ enum Laws
+ {
+ atomize_subset,
+ atomize_superset,
+ atomize_element_equal,
+ Laws_size
+ };
+
+ itl_induced_relations_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int volume = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(volume);
+ _lawChoice[atomize_subset] = 33;
+ _lawChoice[atomize_superset] = 33;
+ _lawChoice[atomize_element_equal] = 34;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case atomize_subset: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, Interval::Atomize, sub_super_set>, RandomGentor>();
+ case atomize_superset: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, Interval::Atomize, super_sub_set>, RandomGentor>();
+ case atomize_element_equal: return new LawValidater<InducedRelation<Type, typename Type::atomized_type, Interval::Atomize, element_equal>, RandomGentor>();
+ 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;
+ }; //class itl_induced_relations_validater
+
+
+
+}} // namespace itl boost
+

Modified: sandbox/itl/libs/itl/build/win32/vc9_all.sln
==============================================================================
--- sandbox/itl/libs/itl/build/win32/vc9_all.sln (original)
+++ sandbox/itl/libs/itl/build/win32/vc9_all.sln 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -61,6 +61,10 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_casual", "..\..\test\test_casual\vc9_test_casual.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_val_setbase", "..\..\..\validate\example\labat_val_setbase\vc9_labat_val_setbase.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471E}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_val_relations", "..\..\..\validate\example\labat_val_relations\vc9_labat_val_relations.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471F}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -187,6 +191,14 @@
                 {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Debug|Win32.Build.0 = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.ActiveCfg = Release|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Added: sandbox/itl/libs/itl/test/test_interval_set_laws_shared.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/test/test_interval_set_laws_shared.hpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,226 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: 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 __test_itl_interval_set_laws_shared_h_JOFA_090201__
+#define __test_itl_interval_set_laws_shared_h_JOFA_090201__
+
+
+//------------------------------------------------------------------------------
+// Monoid EAN
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, segm, elem);
+ CHECK_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, segm, elem);
+}
+
+//------------------------------------------------------------------------------
+// Abelian monoid EANC
+//------------------------------------------------------------------------------
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_monoid_et_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(et) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(caret)(set_a, set_b, set_c, segm, elem);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_partial_invertive_monoid_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+//------------------------------------------------------------------------------
+// Abelian partial invertive monoid with protonic equality for inversion
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_partial_invertive_monoid_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus)(set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe)(set_a, set_b, set_c, segm, elem);
+
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(plus)(is_protonic_equal, set_a, set_b, set_c, segm, elem);
+ CHECK_PARTIAL_INVERTIVE_MONOID_INSTANCE_WRT_EQUAL(pipe)(is_protonic_equal, set_a, set_b, set_c, segm, elem);
+}
+
+
+//------------------------------------------------------------------------------
+// Abelian group EANIC
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_group_plus_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+}
+
+//------------------------------------------------------------------------------
+// (0 - x) + x =p= 0 |
+//------------------------------------------------------------------------------
+template <class T,
+ template<class T,
+ ITL_COMPARE Compare = ITL_COMPARE_INSTANCE(std::less, U),
+ template<class,ITL_COMPARE>class Interval = interval,
+ ITL_ALLOC Alloc = std::allocator
+ >class IntervalSet
+ >
+void interval_set_check_abelian_group_plus_prot_inv_4_bicremental_types()
+{
+ typedef IntervalSet<T> IntervalSetT;
+
+ IntervalSetT set_a, set_b, set_c;
+ set_a.add(I_D(3,6)).add(I_I(5,7));
+ set_b.add(C_D(1,3)).add(I_D(8,9));
+ set_c.add(I_D(0,9)).add(I_I(3,6)).add(I_D(5,7));
+
+ typename IntervalSetT::segment_type segm = I_D(6,9);
+ T elem = make<T>(5);
+
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(plus) (set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_MONOID_INSTANCE_WRT(pipe) (set_a, set_b, set_c, segm, elem);
+
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(plus) (is_protonic_equal, set_a, set_b, set_c, segm, elem);
+ CHECK_ABELIAN_GROUP_INSTANCE_WRT_EQUAL(pipe) (is_protonic_equal, set_a, set_b, set_c, segm, elem);
+}
+
+#endif // __test_itl_interval_set_laws_shared_h_JOFA_090201__
+

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 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -91,7 +91,6 @@
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(10000);
 
- ptime start, stop;
 
         //-----------------------------------------------------------------------------
         /*
@@ -131,40 +130,57 @@
 
         //-----------------------------------------------------------------------------
         int test_count = 10000;
+ ptime start, stop;
 
- typedef InclusionEqualDefined
- <split_interval_map<int,int> > TestLaw4T;
- LawValidater<TestLaw4T, RandomGentor> test_law4;
- test_law4.setTrialsCount(test_count);
+ //typedef InclusionEqualDefined
+ // <split_interval_map<int,int> > TestLaw4T;
+ //LawValidater<TestLaw4T, RandomGentor> test_law4;
+ //test_law4.setTrialsCount(test_count);
+
+ //std::cout << "4Start\n";
+ //start = ptime(microsec_clock::local_time());
+ //test_law4.run();
+ //stop = ptime(microsec_clock::local_time());
+ //std::cout << "Stop. Time elapsed: " << stop - start << endl;
+
+ //typedef SubsetDefined
+ // <split_interval_map<int,int> > TestLaw5T;
+ //LawValidater<TestLaw5T, RandomGentor> test_law5;
+ //test_law5.setTrialsCount(test_count);
+
+ //std::cout << "5Start\n";
+ //start = ptime(microsec_clock::local_time());
+ //test_law5.run();
+ //stop = ptime(microsec_clock::local_time());
+ //std::cout << "Stop. Time elapsed: " << stop - start << endl;
+
+ //typedef SupersetDefined
+ // <split_interval_map<int,int> > TestLaw6T;
+ //LawValidater<TestLaw6T, RandomGentor> test_law6;
+ //test_law6.setTrialsCount(test_count);
+
+ //std::cout << "6Start\n";
+ //start = ptime(microsec_clock::local_time());
+ //test_law6.run();
+ //stop = ptime(microsec_clock::local_time());
+ //std::cout << "Stop. Time elapsed: " << stop - start << endl;
 
- std::cout << "4Start\n";
- start = ptime(microsec_clock::local_time());
- test_law4.run();
- stop = ptime(microsec_clock::local_time());
- std::cout << "Stop. Time elapsed: " << stop - start << endl;
-
- typedef SubsetDefined
- <split_interval_map<int,int> > TestLaw5T;
- LawValidater<TestLaw5T, RandomGentor> test_law5;
- test_law5.setTrialsCount(test_count);
+ //typedef InplaceAssociativity
+ // <split_interval_map<int, int, total_absorber>, inplace_et, itl::element_equal> TestLawT;
+ //LawValidater<TestLawT, RandomGentor> test_law;
+ //test_law.setTrialsCount(10000);
 
- std::cout << "5Start\n";
- start = ptime(microsec_clock::local_time());
- test_law5.run();
- stop = ptime(microsec_clock::local_time());
- std::cout << "Stop. Time elapsed: " << stop - start << endl;
+ typedef Antisymmetry
+ <split_interval_map<int, int, total_enricher >, sub_super_set, element_equal > TestLawT;
+ LawValidater<TestLawT, RandomGentor> test_law;
+ test_law.setTrialsCount(1000);
 
- typedef SupersetDefined
- <split_interval_map<int,int> > TestLaw6T;
- LawValidater<TestLaw6T, RandomGentor> test_law6;
- test_law6.setTrialsCount(test_count);
 
- std::cout << "6Start\n";
+ std::cout << "Start\n";
         start = ptime(microsec_clock::local_time());
- test_law6.run();
+ test_law.run();
         stop = ptime(microsec_clock::local_time());
         std::cout << "Stop. Time elapsed: " << stop - start << endl;
-
 }
 
 

Added: sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,52 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: 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/itl/ptime.hpp> //CL (4 a quick test only)
+
+#include <boost/validate/loki_xt/Tuple.h>
+#include <boost/itl/set.hpp>
+#include <boost/itl/map.hpp>
+#include <boost/validate/lawvalidater.h>
+#include <boost/validate/laws/monoid.h>
+#include <boost/validate/gentor/gentorprofile.h>
+#include <boost/validate/gentor/rangegentor.h>
+
+#include <boost/validate/itl_relations_validater.hpp>
+#include <boost/itl/interval_set.hpp>
+#include <boost/itl_xt/numbergentor.hpp>
+#include <boost/itl_xt/setgentor.hpp>
+#include <boost/itl/functors.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::itl;
+using namespace boost::posix_time;
+
+void test_Validater()
+{
+ ItlRelationsValidater 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";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_Validater();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_val_relations/vc9_labat_val_relations.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_val_relations/vc9_labat_val_relations.vcproj 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_val_relations"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F471F}"
+ RootNamespace="vc9_labat_val_relations"
+ 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="3"
+ 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="Quelldateien"
+ 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="..\labat_val_relations\labat_val_relations.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ 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="Ressourcendateien"
+ 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/labat_val_setbase/labat_val_setbase.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_val_setbase/labat_val_setbase.cpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,52 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: 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/itl/ptime.hpp> //CL (4 a quick test only)
+
+#include <boost/validate/loki_xt/Tuple.h>
+#include <boost/itl/set.hpp>
+#include <boost/itl/map.hpp>
+#include <boost/validate/lawvalidater.h>
+#include <boost/validate/laws/monoid.h>
+#include <boost/validate/gentor/gentorprofile.h>
+#include <boost/validate/gentor/rangegentor.h>
+
+#include <boost/validate/itl_setbase_validater.hpp>
+#include <boost/itl/interval_set.hpp>
+#include <boost/itl_xt/numbergentor.hpp>
+#include <boost/itl_xt/setgentor.hpp>
+#include <boost/itl/functors.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::itl;
+using namespace boost::posix_time;
+
+void test_Validater()
+{
+ ItlSetBaseValidater 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";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_Validater();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_val_setbase/vc9_labat_val_setbase.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_val_setbase/vc9_labat_val_setbase.vcproj 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_val_setbase"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F471E}"
+ RootNamespace="vc9_labat_val_setbase"
+ 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="3"
+ 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="Quelldateien"
+ 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="..\labat_val_setbase\labat_val_setbase.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ 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="Ressourcendateien"
+ 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/src/gentor/gentorprofile.cpp
==============================================================================
--- sandbox/itl/libs/validate/src/gentor/gentorprofile.cpp (original)
+++ sandbox/itl/libs/validate/src/gentor/gentorprofile.cpp 2009-02-06 05:04:26 EST (Fri, 06 Feb 2009)
@@ -41,12 +41,12 @@
 
     //---------------------------------
     //small values
- //set_range_int(0, 10);
+ //set_range_int(-5, 5);
     //set_range_nat(0, 16);
     //set_range_double(0.0, 1.0);
     //set_range_ContainerSize(0,4);
 
- //set_range_interval_int(0, 10);
+ //set_range_interval_int(-5, 5);
     //set_maxIntervalLength(5);
     //set_range_element_ContainerSize(0,4);
 


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