Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51187 - in sandbox/itl: boost/itl boost/validate boost/validate/gentor boost/validate/laws boost/validate/validater libs/validate/example/labat_itl_order libs/validate/example/labat_itv_map_groupig libs/validate/example/labat_itv_map_settic libs/validate/example/labat_itv_set libs/validate/example/labat_single libs/validate/example/labatea libs/validate/src/gentor
From: afojgo_at_[hidden]
Date: 2009-02-10 11:53:09


Author: jofaber
Date: 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
New Revision: 51187
URL: http://svn.boost.org/trac/boost/changeset/51187

Log:
Refactored. Cleaned up LaBatea after refactoring. Removing old test projects.
Stable {msvc-9.0, partly congcc-4.3-a7}

Added:
   sandbox/itl/boost/validate/gentor/gentorprofile.hpp (props changed)
      - copied unchanged from r51180, /sandbox/itl/boost/validate/gentor/gentorprofile.h
   sandbox/itl/boost/validate/gentor/randomgentor.hpp (contents, props changed)
      - copied, changed from r50446, /sandbox/itl/boost/validate/gentor/randomgentor.h
   sandbox/itl/boost/validate/gentor/rangegentor.hpp (props changed)
      - copied unchanged from r51180, /sandbox/itl/boost/validate/gentor/rangegentor.h
   sandbox/itl/boost/validate/laws/pushouts.hpp (contents, props changed)
      - copied, changed from r49760, /sandbox/itl/boost/validate/laws/pushouts.h
Removed:
   sandbox/itl/boost/validate/algebra_validater.hpp
   sandbox/itl/boost/validate/gentor/gentorprofile.h
   sandbox/itl/boost/validate/gentor/randomgentor.h
   sandbox/itl/boost/validate/gentor/rangegentor.h
   sandbox/itl/boost/validate/itl_setbase_validater.hpp
   sandbox/itl/boost/validate/itl_validater.hpp
   sandbox/itl/boost/validate/itv_map_groupig_validater.hpp
   sandbox/itl/boost/validate/itv_map_settic_validater.hpp
   sandbox/itl/boost/validate/itv_set_validater.hpp
   sandbox/itl/boost/validate/law.h
   sandbox/itl/boost/validate/laws/pushouts.h
   sandbox/itl/boost/validate/laws/set_laws.h
   sandbox/itl/boost/validate/lawvalidater.h
   sandbox/itl/boost/validate/lawviolations.h
   sandbox/itl/boost/validate/realmvalidater.h
   sandbox/itl/boost/validate/single_law_validater.hpp
   sandbox/itl/boost/validate/typevalidater.h
Text files modified:
   sandbox/itl/boost/itl/interval_base_map.hpp | 2 +-
   sandbox/itl/boost/itl/map.hpp | 4 ++--
   sandbox/itl/boost/validate/gentor/randomgentor.hpp | 3 +--
   sandbox/itl/boost/validate/itl_relations_validater.hpp | 1 -
   sandbox/itl/boost/validate/laws/element_order.hpp | 2 +-
   sandbox/itl/boost/validate/laws/induced_relation.hpp | 2 +-
   sandbox/itl/boost/validate/laws/inversion_laws.hpp | 2 +-
   sandbox/itl/boost/validate/laws/map_laws.hpp | 2 +-
   sandbox/itl/boost/validate/laws/monoid.hpp | 2 +-
   sandbox/itl/boost/validate/laws/order.hpp | 2 +-
   sandbox/itl/boost/validate/laws/pushouts.hpp | 2 +-
   sandbox/itl/boost/validate/laws/set_laws.hpp | 2 +-
   sandbox/itl/boost/validate/laws/subset_order.hpp | 2 +-
   sandbox/itl/boost/validate/laws/symmetric_difference.hpp | 2 +-
   sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp | 2 +-
   sandbox/itl/boost/validate/validater/law_validater.hpp | 4 ++--
   sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp | 4 ++--
   sandbox/itl/libs/validate/example/labat_itv_map_groupig/labat_itv_map_groupig.cpp | 4 ++--
   sandbox/itl/libs/validate/example/labat_itv_map_settic/labat_itv_map_settic.cpp | 4 ++--
   sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp | 4 ++--
   sandbox/itl/libs/validate/example/labat_single/labat_single.cpp | 14 +++-----------
   sandbox/itl/libs/validate/example/labatea/labatea.cpp | 4 ++--
   sandbox/itl/libs/validate/src/gentor/gentorprofile.cpp | 2 +-
   23 files changed, 31 insertions(+), 41 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-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -484,7 +484,7 @@
     */
     SubType& subtract(const value_type& x)
     {
- if(Traits::is_total && has_inverse<codomain_type>::value) //CL !is_set<codomain_type>::value)
+ if(Traits::is_total && has_inverse<codomain_type>::value)
                         that()->template add_<inverse_codomain_combine>(x);
         else
                         that()->template subtract_<inverse_codomain_combine>(x);

Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -230,7 +230,7 @@
             subtraced from the data value stored in the map. */
         map& subtract(const value_type& value_pair)
                 {
- if(Traits::is_total && has_inverse<codomain_type>::value) //CL !is_set<codomain_type>::value)
+ if(Traits::is_total && has_inverse<codomain_type>::value)
                                 this->template add<inverse_codomain_combine>(value_pair);
                         else
                                 this->template subtract<inverse_codomain_combine>(value_pair);
@@ -592,7 +592,7 @@
                      const itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc>& operand)
     {
                 typedef itl::map<DomainT,CodomainT,Traits,Compare,Combine,Section,Alloc> ObjectT;
- if(Traits::is_total && has_inverse<ObjectT::codomain_type>::value) //CL !is_set<typename ObjectT::codomain_type>::value)
+ if(Traits::is_total && has_inverse<typename ObjectT::codomain_type>::value)
             const_FORALL(typename ObjectT, it_, operand)
                                 object.template add<ObjectT::inverse_codomain_combine>(*it_);
         else Set::subtract(object, operand);

Deleted: sandbox/itl/boost/validate/algebra_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/algebra_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,48 +0,0 @@
-/*----------------------------------------------------------------------------+
-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 <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 AlgebraValidater
- {
- public:
- virtual ~AlgebraValidater(){}
- // 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 AlgebraValidater::share(int total, int& index, int& rest_shares)
- {
- BOOST_ASSERT(index_ == index);
- int count = total - index;
- int share = rest_shares / count;
- rest_shares -= share;
- ++index;
- return share;
- }
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/gentor/gentorprofile.h
==============================================================================
--- sandbox/itl/boost/validate/gentor/gentorprofile.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,132 +0,0 @@
-/*----------------------------------------------------------------------------+
-Interval Template Library
-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 <boost/validate/type/nat.hpp>
-#include <boost/itl/interval.hpp>
-
-namespace boost{namespace itl
-{
-
- class GentorProfile
- {
- public:
- GentorProfile();
-
- void set_range_int(int lwb, int upb)
- { _range_int = interval<int>::rightopen(lwb, upb); }
- void set_range_nat(nat lwb, nat upb)
- { _range_nat = interval<nat>::rightopen(lwb, upb); }
- void set_range_double(double lwb, double upb)
- { _range_double = interval<double>::rightopen(lwb, upb); }
- void set_range_ContainerSize(int lwb, int upb)
- { _range_ContainerSize = interval<int>::rightopen(lwb, upb); }
- void set_range_interval_int(int lwb, int upb)
- { _range_interval_int = interval<int>::rightopen(lwb, upb); }
- void set_range_interval_double(double lwb, double upb)
- { _range_interval_double = interval<double>::rightopen(lwb, upb); }
- void set_maxIntervalLength(int val)
- { _maxIntervalLength = val; }
- void set_range_element_ContainerSize(int lwb, int upb)
- { _range_element_ContainerSize = interval<int>::rightopen(lwb, upb); }
-
- interval<int> range_int() { return _range_int; }
- interval<nat> range_nat() { return _range_nat; }
- interval<double> range_double() { return _range_double; }
- interval<int> range_ContainerSize() { return _range_ContainerSize; }
- interval<int> range_interval_int() { return _range_interval_int; }
- interval<double> range_interval_double() { return _range_interval_double; }
- int maxIntervalLength() { return _maxIntervalLength; }
- interval<int> range_element_ContainerSize()
- { return _range_element_ContainerSize; }
-
- private:
- interval<int> _range_int;
- interval<nat> _range_nat;
- interval<double> _range_double;
- interval<int> _range_ContainerSize;
-
- interval<int> _range_interval_int;
- interval<double> _range_interval_double;
- int _maxIntervalLength;
-
- interval<int> _range_element_ContainerSize;
- };
-
- class GentorProfileSgl // SINGLETON PATTERN
- {
- // Singleton pattern part -----------------------------------------------------
- public:
- static GentorProfileSgl* it(); // function to call the unique instance
-
- protected:
- GentorProfileSgl(); // default constructor is not callable from outside
- // preventing illegal instances
-
- // specific interface ---------------------------------------------------------
- public:
- void set_range_int(int lwb, int upb) { m_profile.set_range_int(lwb, upb); }
- void set_range_nat(nat lwb, nat upb) { m_profile.set_range_nat(lwb, upb); }
- void set_range_double(double lwb, double upb) { m_profile.set_range_double(lwb, upb); }
- void set_range_ContainerSize(int lwb, int upb) { m_profile.set_range_ContainerSize(lwb, upb); }
- void set_range_interval_int(int lwb, int upb) { m_profile.set_range_interval_int(lwb, upb); }
- void set_range_interval_double(double lwb, double upb){ m_profile.set_range_interval_double(lwb, upb); }
- void set_maxIntervalLength(int val) { m_profile.set_maxIntervalLength(val); }
- void set_range_element_ContainerSize(int lwb, int upb)
- { m_profile.set_range_element_ContainerSize(lwb, upb); }
-
- interval<int> range_int() { return m_profile.range_int(); }
- interval<nat> range_nat() { return m_profile.range_nat(); }
- interval<double> range_double() { return m_profile.range_double(); }
- interval<int> range_ContainerSize() { return m_profile.range_ContainerSize(); }
- interval<int> range_interval_int() { return m_profile.range_interval_int(); }
- interval<double> range_interval_double() { return m_profile.range_interval_double();}
- int maxIntervalLength() { return m_profile.maxIntervalLength(); }
- interval<int> range_element_ContainerSize(){ return m_profile.range_element_ContainerSize(); }
-
-
- private:
- // Singleton pattern part -------------------------------------------------
- static GentorProfileSgl* s_instance; // pointer to the unique instance
-
- // specific members -------------------------------------------------------
-
- // TODO add specifc members as needed
- GentorProfile m_profile;
- };
-
- template<typename NumberT>
- struct GentorProfileSgl_numeric_range
- {
- static interval<NumberT> get();
- };
-
- template<>
- struct GentorProfileSgl_numeric_range<int>
- {
- static interval<int> get()
- { return GentorProfileSgl::it()->range_int(); }
- };
-
- template<>
- struct GentorProfileSgl_numeric_range<nat>
- {
- static interval<nat> get()
- { return GentorProfileSgl::it()->range_nat(); }
- };
-
- template<>
- struct GentorProfileSgl_numeric_range<double>
- {
- static interval<double> get()
- { return GentorProfileSgl::it()->range_double(); }
- };
-
-}} // namespace itl boost

Deleted: sandbox/itl/boost/validate/gentor/randomgentor.h
==============================================================================
--- sandbox/itl/boost/validate/gentor/randomgentor.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,433 +0,0 @@
-/*----------------------------------------------------------------------------+
-Interval Template Library
-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 <boost/itl/notate.hpp>
-#include <boost/itl_xt/numbergentor.hpp>
-#include <boost/itl_xt/setgentor.hpp>
-#include <boost/itl_xt/mapgentor.hpp>
-#include <boost/itl_xt/itvgentor.hpp>
-#include <boost/itl/interval_set.hpp>
-#include <boost/itl/separate_interval_set.hpp>
-#include <boost/itl/split_interval_set.hpp>
-#include <boost/itl/interval_map.hpp>
-#include <boost/itl/split_interval_map.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-
-
-namespace boost{namespace itl
-{
-
- // ----------------------------------------------------------
- template <class ValueT> class RandomGentor;
- template <> class RandomGentor<int> : public NumberGentorT<int> {};
- template <> class RandomGentor<nat> : public NumberGentorT<nat> {};
- template <> class RandomGentor<double> : public NumberGentorT<double> {};
-
- // ----- sets ----------------------------------------------------------------
- //template <class DomainT, template<class>class Set>
- //class RandomGentor<Set<DomainT> > :
- // public SetGentorT<Set<DomainT> > {};
-
- template <class DomainT>
- class RandomGentor<itl::set<DomainT> > :
- public SetGentorT<itl::set<DomainT> > {};
-
- template <class DomainT>
- class RandomGentor<itl::interval_set<DomainT> > :
- public SetGentorT<itl::interval_set<DomainT> > {};
-
- template <class DomainT>
- class RandomGentor<itl::separate_interval_set<DomainT> > :
- public SetGentorT<itl::separate_interval_set<DomainT> > {};
-
- template <class DomainT>
- class RandomGentor<itl::split_interval_set<DomainT> > :
- public SetGentorT<itl::split_interval_set<DomainT> > {};
-
- // ----- maps -------------------------------------------------------------
- template <class DomainT, class Neutronizer>
- class RandomGentor<itl::map<DomainT,itl::set<int>,Neutronizer> > :
- public MapGentorT<itl::map<DomainT,itl::set<int>,Neutronizer> > {};
-
- template <class DomainT, class CodomainT, class Neutronizer>
- class RandomGentor<itl::map<DomainT,CodomainT,Neutronizer> > :
- public MapGentorT<itl::map<DomainT,CodomainT,Neutronizer> > {};
-
-
- // ----- interval_map<D,C,N> ----------------------------------------
- template <class DomainT, class Neutronizer>
- class RandomGentor<interval_map<DomainT,itl::set<int>,Neutronizer> > :
- public MapGentorT<interval_map<DomainT,itl::set<int>,Neutronizer> > {};
-
- template <class DomainT, class CodomainT, class Neutronizer>
- class RandomGentor<interval_map<DomainT,CodomainT,Neutronizer> > :
- public MapGentorT<interval_map<DomainT,CodomainT,Neutronizer> > {};
-
- // ----- split_interval_map<D,C,N> ----------------------------------------
- template <class DomainT, class Neutronizer>
- class RandomGentor<split_interval_map<DomainT,itl::set<int>,Neutronizer> > :
- public MapGentorT<split_interval_map<DomainT,itl::set<int>,Neutronizer> > {};
-
- template <class DomainT, class CodomainT, class Neutronizer>
- class RandomGentor<split_interval_map<DomainT,CodomainT,Neutronizer> > :
- public MapGentorT<split_interval_map<DomainT,CodomainT,Neutronizer> > {};
-
-
- // ------------------------------------------------------------------------
- // class template SomeValue:
- // TargetT is a value tuple that fits to the value generator gentor
- // of type GentorT<TargetT>. The special kind of generator can be
- // passed by the user. The only requirement is that the generator
- // implements a function 'some' which is called to generate a tuple
- // of type TargetT
- template <class TargetT, template<class>class GentorT> struct SomeValue
- {
- static void apply(TargetT& value, GentorT<TargetT>& gentor);
- };
-
- template <class TargetT>
- struct SomeValue<TargetT, RandomGentor>
- {
- static void apply(TargetT& value, RandomGentor<TargetT>& gentor)
- {
- gentor.some(value);
- }
- };
- // ------------------------------------------------------------------------
-
-
- // ------------------------------------------------------------------------
- // ------------------------------------------------------------------------
- template <class TargetT, template<class>class GentorT> struct Calibrater
- {
- static void apply(GentorT<TargetT>& gentor);
- };
-
- template <>
- struct Calibrater<int, RandomGentor>
- {
- static void apply(RandomGentor<int>& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- gentor.setRange(GentorProfileSgl::it()->range_int());
- }
- };
-
- template <>
- struct Calibrater<nat, RandomGentor>
- {
- static void apply(RandomGentor<nat>& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- gentor.setRange(GentorProfileSgl::it()->range_nat());
- }
- };
-
- template <>
- struct Calibrater<double, RandomGentor>
- {
- static void apply(RandomGentor<double>& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- gentor.setRange(GentorProfileSgl::it()->range_double());
- }
- };
-
-
- template <>
- struct Calibrater<itl::set<int>, RandomGentor>
- {
- static void apply(RandomGentor<itl::set<int> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
- NumberGentorT<int>* intGentor = new NumberGentorT<int>;
- intGentor->setRange(GentorProfileSgl::it()->range_int());
- gentor.setDomainGentor(intGentor);
- }
- };
-
- template <>
- struct Calibrater<itl::set<double>, RandomGentor>
- {
- static void apply(RandomGentor<itl::set<double> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
- NumberGentorT<double>* elemGentor = new NumberGentorT<double>;
- elemGentor->setRange(GentorProfileSgl::it()->range_double());
- gentor.setDomainGentor(elemGentor);
- }
- };
-
-
- template <>
- struct Calibrater<interval_set<int>, RandomGentor>
- {
- static void apply(RandomGentor<interval_set<int> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
- ItvGentorT<int>* itvGentor = new ItvGentorT<int>;
- interval<int> valRange = GentorProfileSgl::it()->range_interval_int();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
- gentor.setDomainGentor(itvGentor);
- }
- };
-
- template <>
- struct Calibrater<interval_set<double>, RandomGentor>
- {
- static void apply(RandomGentor<interval_set<double> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
- ItvGentorT<double>* itvGentor = new ItvGentorT<double>;
- interval<double> valRange = GentorProfileSgl::it()->range_interval_double();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
- gentor.setDomainGentor(itvGentor);
- }
- };
-
- template <>
- struct Calibrater<separate_interval_set<int>, RandomGentor>
- {
- static void apply(RandomGentor<separate_interval_set<int> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
- ItvGentorT<int>* itvGentor = new ItvGentorT<int>;
- interval<int> valRange = GentorProfileSgl::it()->range_interval_int();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
- gentor.setDomainGentor(itvGentor);
- }
- };
-
- template <>
- struct Calibrater<separate_interval_set<double>, RandomGentor>
- {
- static void apply(RandomGentor<separate_interval_set<double> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<double>* itvGentor = new ItvGentorT<double>;
- interval<double> valRange = GentorProfileSgl::it()->range_interval_double();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
- gentor.setDomainGentor(itvGentor);
- }
- };
-
- template <>
- struct Calibrater<split_interval_set<int>, RandomGentor>
- {
- static void apply(RandomGentor<split_interval_set<int> >& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- // interval<int> range = rightOpenInterval<int>(0,10); //JODO: From SysCalibrater
- //JODO gentor.calibrate(profile);
-
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<int>* itvGentor = new ItvGentorT<int>;
- interval<int> valRange = GentorProfileSgl::it()->range_interval_int();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
- gentor.setDomainGentor(itvGentor);
- }
- };
-
- template <>
- struct Calibrater<split_interval_set<double>, RandomGentor>
- {
- static void apply(RandomGentor<split_interval_set<double> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<double>* itvGentor = new ItvGentorT<double>;
- interval<double> valRange = GentorProfileSgl::it()->range_interval_double();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
- gentor.setDomainGentor(itvGentor);
- }
- };
-
- //----------------------------------------------------------------------------
- // itl::map<DomainT,CodomainT,Neutronizer>
- //----------------------------------------------------------------------------
- template <typename NumericDomainT, class Neutronizer>
- struct Calibrater<itl::map<NumericDomainT,itl::set<int>,Neutronizer>, RandomGentor>
- {
- static void apply(RandomGentor<itl::map<NumericDomainT,itl::set<int>,Neutronizer> >& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- // interval<int> range = rightOpenInterval<int>(0,10); //JODO: From SysCalibrater
- //JODO gentor.calibrate(profile);
-
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
- domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
-
- SetGentorT<itl::set<int> >* codomainGentor = new SetGentorT<itl::set<int> >;
- NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
- elementGentor->setRange(GentorProfileSgl_numeric_range<int>::get());
-
- codomainGentor->setDomainGentor(elementGentor);
- codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- gentor.setDomainGentor(domainGentor);
- gentor.setCodomainGentor(codomainGentor);
- }
- };
-
- template <typename NumericDomainT, typename NumericCodomainT, class Neutronizer>
- struct Calibrater<itl::map<NumericDomainT,NumericCodomainT,Neutronizer>, RandomGentor>
- {
- static void apply(RandomGentor<itl::map<NumericDomainT,NumericCodomainT,Neutronizer> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- NumberGentorT<NumericDomainT>* domainGentor = new NumberGentorT<NumericDomainT>;
- NumberGentorT<NumericCodomainT>* codomainGentor = new NumberGentorT<NumericCodomainT>;
- domainGentor->setRange(GentorProfileSgl_numeric_range<NumericDomainT>::get());
- codomainGentor->setRange(GentorProfileSgl_numeric_range<NumericCodomainT>::get());
- gentor.setDomainGentor(domainGentor);
- gentor.setCodomainGentor(codomainGentor);
- }
- };
-
-
- //----------------------------------------------------------------------------
- // itl::interval_map<DomainT,CodomainT,Neutronizer>
- //----------------------------------------------------------------------------
- template <class NumericDomainT, class Neutronizer>
- struct Calibrater<interval_map<NumericDomainT,itl::set<int>,Neutronizer>, RandomGentor>
- {
- static void apply(RandomGentor<interval_map<NumericDomainT,itl::set<int>,Neutronizer> >& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- // interval<int> range = rightOpenInterval<int>(0,10); //JODO: From SysCalibrater
- //JODO gentor.calibrate(profile);
-
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<NumericDomainT>* itvGentor = new ItvGentorT<NumericDomainT>;
- interval<NumericDomainT> valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
-
- SetGentorT<itl::set<int> >* codomainGentor = new SetGentorT<itl::set<int> >;
- NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
- elementGentor->setRange(GentorProfileSgl::it()->range_int());
-
- codomainGentor->setDomainGentor(elementGentor);
- codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_element_ContainerSize());
-
- gentor.setDomainGentor(itvGentor);
- gentor.setCodomainGentor(codomainGentor);
- }
- };
-
- template <typename NumericDomainT, typename NumericCodomainT, class Neutronizer>
- struct Calibrater<interval_map<NumericDomainT,NumericCodomainT,Neutronizer>, RandomGentor>
- {
- static void apply(RandomGentor<interval_map<NumericDomainT,NumericCodomainT,Neutronizer> >& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- // interval<int> range = rightOpenInterval<int>(0,10); //JODO: From SysCalibrater
- //JODO gentor.calibrate(profile);
-
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<NumericDomainT>* itvGentor = new ItvGentorT<NumericDomainT>;
- interval<NumericDomainT> valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
-
- NumberGentorT<NumericCodomainT>* codomainGentor = new NumberGentorT<NumericCodomainT>;
- codomainGentor->setRange(GentorProfileSgl_numeric_range<NumericCodomainT>::get());
-
- gentor.setDomainGentor(itvGentor);
- gentor.setCodomainGentor(codomainGentor);
- }
- };
-
- //----------------------------------------------------------------------------
- // itl::split_interval_map<DomainT,CodomainT,Neutronizer>
- //----------------------------------------------------------------------------
- template <class NumericDomainT, class Neutronizer>
- struct Calibrater<split_interval_map<NumericDomainT,itl::set<int>,Neutronizer>, RandomGentor>
- {
- static void apply(RandomGentor<split_interval_map<NumericDomainT,itl::set<int>,Neutronizer> >& gentor)
- {
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<NumericDomainT>* itvGentor = new ItvGentorT<NumericDomainT>;
- interval<NumericDomainT> valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength());
-
- SetGentorT<itl::set<int> >* codomainGentor = new SetGentorT<itl::set<int> >;
- NumberGentorT<int>* elementGentor = new NumberGentorT<int>;
- elementGentor->setRange(GentorProfileSgl::it()->range_int());
-
- codomainGentor->setDomainGentor(elementGentor);
- codomainGentor->setRangeOfSampleSize(GentorProfileSgl::it()->range_element_ContainerSize());
-
- gentor.setDomainGentor(itvGentor);
- gentor.setCodomainGentor(codomainGentor);
- }
- };
-
- template <typename NumericDomainT, typename NumericCodomainT, class Neutronizer>
- struct Calibrater<split_interval_map<NumericDomainT,NumericCodomainT,Neutronizer>, RandomGentor>
- {
- static void apply(RandomGentor<split_interval_map<NumericDomainT,NumericCodomainT,Neutronizer> >& gentor)
- {
- // Set the range within which the sizes of the generated object varies.
- // interval<int> range = rightOpenInterval<int>(0,10); //JODO: From SysCalibrater
- //JODO gentor.calibrate(profile);
-
- gentor.setRangeOfSampleSize(GentorProfileSgl::it()->range_ContainerSize());
-
- // If it is a container: (Create and) Pass the generator(s) for their contents
- // NumberGentorT<int> intGentor;
- ItvGentorT<NumericDomainT>* itvGentor = new ItvGentorT<NumericDomainT>;
- interval<NumericDomainT> valRange = GentorProfileSgl_numeric_range<NumericDomainT>::get();
- itvGentor->setValueRange(valRange.lower(), valRange.upper());
- itvGentor->setMaxIntervalLength(GentorProfileSgl::it()->maxIntervalLength()); //JODO
-
- NumberGentorT<NumericCodomainT>* codomainGentor = new NumberGentorT<NumericCodomainT>;
- codomainGentor->setRange(GentorProfileSgl_numeric_range<NumericCodomainT>::get());
-
- gentor.setDomainGentor(itvGentor);
- gentor.setCodomainGentor(codomainGentor);
- }
- };
- // ---------------------------------------------------------------------------
-
-}} // namespace itl boost

Copied: sandbox/itl/boost/validate/gentor/randomgentor.hpp (from r50446, /sandbox/itl/boost/validate/gentor/randomgentor.h)
==============================================================================
--- /sandbox/itl/boost/validate/gentor/randomgentor.h (original)
+++ sandbox/itl/boost/validate/gentor/randomgentor.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -20,7 +20,7 @@
 #include <boost/itl/split_interval_set.hpp>
 #include <boost/itl/interval_map.hpp>
 #include <boost/itl/split_interval_map.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
 
 
 namespace boost{namespace itl

Deleted: sandbox/itl/boost/validate/gentor/rangegentor.h
==============================================================================
--- sandbox/itl/boost/validate/gentor/rangegentor.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,85 +0,0 @@
-/*----------------------------------------------------------------------------+
-Copyright (c) 2007-2008: Joachim Faulhaber
-+-----------------------------------------------------------------------------+
-Boost Software License - Version 1.0 - August 17th, 2003
-
-Permission is hereby granted, free of charge, to any person or organization
-obtaining a copy of the software and accompanying documentation covered by
-this license (the "Software") to use, reproduce, display, distribute,
-execute, and transmit the Software, and to prepare derivative works of the
-Software, and to permit third-parties to whom the Software is furnished to
-do so, all subject to the following:
-
-The copyright notices in the Software and this entire statement, including
-the above license grant, this restriction and the following disclaimer,
-must be included in all copies of the Software, in whole or in part, and
-all derivative works of the Software, unless such copies or derivative
-works are solely in the form of machine-executable object code generated by
-a source language processor.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
-SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
-FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
-ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
-DEALINGS IN THE SOFTWARE.
-+----------------------------------------------------------------------------*/
-/* ------------------------------------------------------------------
-class IntevalGentor
- A random generator for Sets.
---------------------------------------------------------------------*/
-#pragma once
-
-#include <boost/itl/interval.hpp>
-#include <boost/itl_xt/gentorit.hpp>
-#include <boost/itl_xt/numbergentor.hpp>
-
-namespace boost{namespace itl
-{
- //JODO: RangeGentor is similat to ItvGentorT. RangeGentor might be replaced by ItvGentorT
- // with some modifications applied to ItvGentorT.
-
- template <class Type>
- class RangeGentor: public RandomGentorAT<interval<Type> >
- {
- public:
- virtual void some(interval<Type>& x);
- interval<Type> last()const;
-
- void setLowerBoundRange(int lwb, int upb)
- { setLowerBoundRange(rightopen_interval(lwb,upb)); }
- void setLowerBoundRange(const interval<int>& range)
- { BOOST_ASSERT(range.is_rightopen()||range.is_closed()); _lwbGentor.setRange(range); }
-
- void setUpperBoundRange(int lwb, int upb)
- { setUpperBoundRange(rightopen_interval(lwb,upb)); }
- void setUpperBoundRange(const interval<int>& range)
- { BOOST_ASSERT(range.is_rightopen()||range.is_closed()); _upbGentor.setRange(range); }
-
- private:
- NumberGentorT<Type> _lwbGentor;
- NumberGentorT<Type> _upbGentor;
- interval<Type> _last;
- };
-
- template <class Type>
- void RangeGentor<Type>::some(interval<Type>& x)
- {
- Type lwb, upb;
- _lwbGentor.some(lwb);
- _upbGentor.some(upb);
- _last = rightopen_interval(lwb, upb);
- x = _last;
- }
-
- template <class Type>
- interval<Type> RangeGentor<Type>::last()const
- {
- return _last;
- }
-
-}} // namespace itl boost
-
-
-

Modified: sandbox/itl/boost/validate/itl_relations_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itl_relations_validater.hpp (original)
+++ sandbox/itl/boost/validate/itl_relations_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -12,7 +12,6 @@
 #include <iostream>
 #include <stdio.h>
 #include <time.h>
-#include <boost/validate/typevalidater.h>
 #include <boost/validate/validater/itl_induced_relations.hpp>
 #include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>

Deleted: sandbox/itl/boost/validate/itl_setbase_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itl_setbase_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,153 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/driver/itl_driver.hpp>
-#include <boost/validate/utility.hpp>
-
-namespace boost{namespace itl
-{
-
- class ItlSetBaseValidater : public itl_driver
- {
- 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;
- }
-
- }
-
-
- algebra_validater* 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
-

Deleted: sandbox/itl/boost/validate/itl_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itl_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,190 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/validater/algebra_validater.hpp>
-#include <boost/validate/utility.hpp>
-
-namespace boost{namespace itl
-{
- namespace RootType
- {
- enum RootTypes
- {
- itl_set, interval_set, separate_interval_set, split_interval_set,
- itl_map, interval_map, split_interval_map,
- Types_size
- };
- }
-
- namespace DomainType
- {
- enum DomainTypes { Int, Double, DomainTypes_size };
- }
-
- namespace CodomainType
- {
- enum CodomainTypes { Nat, Int, Double, set_int, raw_bitset, CodomainTypes_size };
- }
-
- namespace NeutronHandlerType
- {
- enum NeutronHandlerTypes { partial_absorber, partial_enricher, total_absorber, total_enricher, NeutronHandlerTypes_size };
- }
-
-
- class itl_validater
- {
- public:
- bool hasValidProfile()const { return _isValid; }
-
- virtual void setProfile() = 0;
- virtual algebra_validater* chooseValidater() = 0;
-
- 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(idx>0 && idx % 100 == 0)
- reportFrequencies();
- validateType();
- }
- }
-
- void validateType()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->validate();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void reportFrequencies()
- {
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- int valid_count = 1;
- FORALL(ValidationCounterT, it, _frequencies)
- {
- printf("%3d %-66s%8d\n", valid_count, it->KEY_VALUE.c_str(), it->CONT_VALUE);
- valid_count++;
- }
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- int violation_count = 1;
- FORALL(ViolationMapT, it, _violations)
- {
- printf("%3d %-66s%8d\n", violation_count, it->KEY_VALUE.c_str(), it->CONT_VALUE.getViolationsCount());
- violation_count++;
- }
- if(!_violations.empty())
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- FORALL(ViolationMapT, it, _violations)
- {
- PolyLawViolations violas = it->CONT_VALUE;
- violas.reportFirst();
- }
- if(!_violations.empty())
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- }
-
- void reportFrequencies(const std::string& filename)
- {
- FILE* fp = fopen(filename.c_str(), "w");
- int valid_count = 1;
- FORALL(ValidationCounterT, it, _frequencies)
- {
- fprintf(fp, "%3d %-66s\n", valid_count, it->KEY_VALUE.c_str());
- valid_count++;
- }
- }
-
- void reportTypeChoiceError(const std::string& location, int rootChoice, const ChoiceT& chooser)const
- {
- std::cout << location
- << "Type choice: " << rootChoice << " is out of range or unselectable in switch clause.\n"
- << "Expected types and their weights are:\n"
- << chooser.asString();
- }
-
- protected:
- void setValid(bool truth) { _isValid = truth; }
-
- void setRootTypeNames()
- {
- std::vector<std::string> type_names(RootType::Types_size);
- type_names[RootType::itl_set] = "itl_set";
- type_names[RootType::interval_set] = "interval_set";
- type_names[RootType::separate_interval_set] = "separate_interval_set";
- type_names[RootType::split_interval_set] = "split_interval_set";
- type_names[RootType::itl_map] = "itl_map";
- type_names[RootType::interval_map] = "interval_map";
- type_names[RootType::split_interval_map] = "split_interval_map";
- _rootChoice.setTypeNames(type_names);
- }
- void setDomainTypeNames()
- {
- std::vector<std::string> type_names(CodomainType::CodomainTypes_size);
- type_names[CodomainType::Int] = "Int";
- type_names[CodomainType::Double] = "Double";
- _domainChoice.setTypeNames(type_names);
- }
- void setCodomainTypeNames()
- {
- std::vector<std::string> type_names(CodomainType::CodomainTypes_size);
- type_names[CodomainType::Int] = "Int";
- type_names[CodomainType::Double] = "Double";
- type_names[CodomainType::set_int] = "set_int";
- type_names[CodomainType::raw_bitset] = "raw_bitset";
- _codomainChoice.setTypeNames(type_names);
- }
- void setNeutronHandlerTypeNames()
- {
- std::vector<std::string> type_names(NeutronHandlerType::NeutronHandlerTypes_size);
- type_names[NeutronHandlerType::partial_absorber] = "partial_absorber";
- type_names[NeutronHandlerType::partial_enricher] = "partial_enricher";
- type_names[NeutronHandlerType::total_absorber] = "total_absorber";
- type_names[NeutronHandlerType::total_enricher] = "total_enricher";
- _neutronizerChoice.setTypeNames(type_names);
- }
-
- algebra_validater* choiceError(const std::string& location, int value, const ChoiceT& choice)
- {
- reportTypeChoiceError(location, value, choice);
- setValid(false);
- return NULL;
- }
-
- protected:
- ChoiceT _rootChoice;
- ChoiceT _domainChoice;
- ChoiceT _codomainChoice;
- ChoiceT _neutronizerChoice;
-
- private:
- algebra_validater* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
- bool _isValid;
- };
-
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/itv_map_groupig_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itv_map_groupig_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,146 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/driver/itl_driver.hpp>
-#include <boost/validate/utility.hpp>
-
-namespace boost{namespace itl
-{
-
- class ItvMapGroupigValidater : public itl_driver
- {
- public:
- ItvMapGroupigValidater() { 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] = 33;
- _rootChoice[RootType::interval_map] = 33;
- _rootChoice[RootType::split_interval_map] = 34;
- 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::Nat] = 100;
- _codomainChoice[CodomainType::Int] = 0;
- _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("ItvMapGroupigValidater::setProfile()") << std::endl;
- }
-
- if(!_domainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _domainChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
- }
-
- if(!_codomainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _codomainChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
- }
-
- if(!_neutronizerChoice.is_consistent())
- {
- setValid(false);
- std::cout << _neutronizerChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
- }
-
- }
-
-
- algebra_validater* chooseValidater()
- {
- int rootChoice = _rootChoice.some();
- int domainChoice = _domainChoice.some();
- int codomainChoice = _codomainChoice.some();
- int neutronizerChoice = _neutronizerChoice.some();
-
- switch(rootChoice)
- {
- //-----------------------------------------------------------------
- case RootType::itl_map: {
- switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new InplaceMapValidater<itl::map<int,nat> >;
- case NeutronHandlerType::partial_enricher: return new InplaceMapValidater<itl::map<int,nat,partial_enricher > >;
- case NeutronHandlerType::total_absorber : return new InplaceMapValidater<itl::map<int,nat,total_absorber > >;
- case NeutronHandlerType::total_enricher: return new InplaceMapValidater<itl::map<int,nat,total_enricher > >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: neutronizerChoice:\n"), neutronizerChoice, _neutronizerChoice);
- }//switch neutronizerChoice
- }//case itl_map
- //-----------------------------------------------------------------
- case RootType::interval_map: {
- switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new IntervalMapValidater<interval_map<int,nat> >;
- case NeutronHandlerType::partial_enricher: return new IntervalMapValidater<interval_map<int,nat,partial_enricher > >;
- case NeutronHandlerType::total_absorber : return new IntervalMapValidater<interval_map<int,nat,total_absorber > >;
- case NeutronHandlerType::total_enricher: return new IntervalMapValidater<interval_map<int,nat,total_enricher > >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: neutronizerChoice:\n"), neutronizerChoice, _neutronizerChoice);
- }//switch neutronizerChoice
- }//case interval_map
- //-----------------------------------------------------------------
- case RootType::split_interval_map: {
- switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new IntervalMapValidater<split_interval_map<int,nat> >;
- case NeutronHandlerType::partial_enricher: return new IntervalMapValidater<split_interval_map<int,nat,partial_enricher > >;
- case NeutronHandlerType::total_absorber : return new IntervalMapValidater<split_interval_map<int,nat,total_absorber > >;
- case NeutronHandlerType::total_enricher: return new IntervalMapValidater<split_interval_map<int,nat,total_enricher > >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"), neutronizerChoice, _neutronizerChoice);
- }//switch neutronizerChoice
- }//case split_interval_map
- //-----------------------------------------------------------------
-
- default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
- } //switch()
-
- return NULL; //just to please the compiler ;)
- }
-
- };
-
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/itv_map_settic_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itv_map_settic_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,142 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/driver/itl_driver.hpp>
-#include <boost/validate/utility.hpp>
-
-namespace boost{namespace itl
-{
-
- class ItvMapSetticValidater : public itl_driver
- {
- public:
- ItvMapSetticValidater() { 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] = 33;
- _rootChoice[RootType::interval_map] = 33;
- _rootChoice[RootType::split_interval_map] = 34;
- 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] = 0;
- _codomainChoice[CodomainType::Double] = 0;
- _codomainChoice[CodomainType::set_int] = 100;
- setCodomainTypeNames();
- _codomainChoice.init();
-
- _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
- _neutronizerChoice.setMaxWeights(100);
- _neutronizerChoice[NeutronHandlerType::partial_absorber] = 50;
- _neutronizerChoice[NeutronHandlerType::partial_enricher] = 50;
- _neutronizerChoice[NeutronHandlerType::total_absorber] = 0;
- _neutronizerChoice[NeutronHandlerType::total_enricher] = 0;
- setNeutronHandlerTypeNames();
- _neutronizerChoice.init();
-
- if(!_rootChoice.is_consistent())
- {
- setValid(false);
- std::cout << _rootChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
- }
-
- if(!_domainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _domainChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
- }
-
- if(!_codomainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _codomainChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
- }
-
- if(!_neutronizerChoice.is_consistent())
- {
- setValid(false);
- std::cout << _neutronizerChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
- }
-
- }
-
-
- algebra_validater* chooseValidater()
- {
- int rootChoice = _rootChoice.some();
- int domainChoice = _domainChoice.some();
- int codomainChoice = _codomainChoice.some();
- int neutronizerChoice = _neutronizerChoice.some();
-
- switch(rootChoice)
- {
- //-----------------------------------------------------------------
- case RootType::itl_map: {
- switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new InplaceMapValidater<itl::map<int,itl::set<int> > >;
- case NeutronHandlerType::partial_enricher: return new InplaceMapValidater<itl::map<int,itl::set<int>,partial_enricher> >;
- //case NeutronHandlerType::total_absorber : return new InplaceMapValidater<itl::map<int,itl::set<int>,total_absorber > >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: neutronizerChoice:\n"), neutronizerChoice, _neutronizerChoice);
- }//switch neutronizerChoice
- }//case itl_map
- //-----------------------------------------------------------------
- case RootType::interval_map: {
- switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new IntervalMapValidater<interval_map<int,itl::set<int> > >;
- case NeutronHandlerType::partial_enricher: return new IntervalMapValidater<interval_map<int,itl::set<int>,partial_enricher> >;
- //case NeutronHandlerType::total_absorber : return new IntervalMapValidater<interval_map<int,itl::set<int>,total_absorber > >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: neutronizerChoice:\n"), neutronizerChoice, _neutronizerChoice);
- }//switch neutronizerChoice
- }//case interval_map
- //-----------------------------------------------------------------
- case RootType::split_interval_map: {
- switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new IntervalMapValidater<split_interval_map<int,itl::set<int> > >;
- case NeutronHandlerType::partial_enricher: return new IntervalMapValidater<split_interval_map<int,itl::set<int>,partial_enricher> >;
- //case NeutronHandlerType::total_absorber : return new IntervalMapValidater<split_interval_map<int,itl::set<int>,total_absorber > >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"), neutronizerChoice, _neutronizerChoice);
- }//switch neutronizerChoice
- }//case split_interval_map
- //-----------------------------------------------------------------
-
- default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
- } //switch()
-
- return NULL; //just to please the compiler ;)
- }
-
- };
-
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/itv_set_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itv_set_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,145 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/driver/itl_driver.hpp>
-#include <boost/validate/utility.hpp>
-
-namespace boost{namespace itl
-{
-
- class ItvSetValidater : public itl_driver
- {
- public:
- ItvSetValidater() { setProfile(); }
-
-
- void setProfile()
- {
- setValid(true);
- _rootChoice.setSize(RootType::Types_size);
- _rootChoice.setMaxWeights(100);
- _rootChoice[RootType::itl_set] = 25;
- _rootChoice[RootType::interval_set] = 25;
- _rootChoice[RootType::separate_interval_set] = 25;
- _rootChoice[RootType::split_interval_set] = 25;
- _rootChoice[RootType::itl_map] = 0;
- _rootChoice[RootType::interval_map] = 0;
- _rootChoice[RootType::split_interval_map] = 0;
- setRootTypeNames();
- _rootChoice.init();
-
- _domainChoice.setSize(DomainType::DomainTypes_size);
- _domainChoice.setMaxWeights(100);
- _domainChoice[DomainType::Int] = 50;
- _domainChoice[DomainType::Double] = 50;
- 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("ItvSetValidater::setProfile()") << std::endl;
- }
-
- if(!_domainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _domainChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
- }
-
- if(!_codomainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _codomainChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
- }
-
- if(!_neutronizerChoice.is_consistent())
- {
- setValid(false);
- std::cout << _neutronizerChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
- }
-
- }
-
-
- algebra_validater* 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);
- }
- }
- default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
- } //switch()
-
- return NULL; //just to please the compiler ;)
- }
-
- };
-
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/law.h
==============================================================================
--- sandbox/itl/boost/validate/law.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,102 +0,0 @@
-/*----------------------------------------------------------------------------+
-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_Law_h_JOFA_070411__
-#define __itl_Law_h_JOFA_070411__
-
-#include <string>
-#include <set>
-#include <boost/validate/loki_xt/Tuple.h>
-
-namespace boost{namespace itl
-{
-
- /** abstract template class Law:
- A Law can hold for a given set of variables.
- A Law together with the set of input variables is an instance of the law.
- The evaluation of the law results in a set of output variables.
- Output variables hold interim and final results of the evaluation of the law.
- */
- template
- <
- class SubType,
- typename InputTypes, typename OutputTypes
- >
- class Law
- {
- public:
- typedef SubType sub_type;
- typedef InputTypes input_types;
- typedef OutputTypes output_types;
- typedef typename Loki::tuple<InputTypes> input_tuple;
- typedef typename Loki::tuple<OutputTypes> output_tuple;
-
- public:
- bool holds(){ return that()->holds(); }
- bool debug_holds(){ return that()->debug_holds(); }
-
- void setInstance(const input_tuple& inVars)
- { _inputTuple = inVars; }
-
- void getInstance(input_tuple& inVars, output_tuple& outVars)const
- { inVars = _inputTuple; outVars = _outputTuple; }
-
- void getInputInstance(input_tuple& inVars)const
- { inVars = _inputTuple; }
-
- void getOutputInstance(output_tuple& outVars)const
- { outVars = _outputTuple; }
-
- size_t size()const{ return that()->size(); }
-
- bool operator == (const Law& rhs)const
- { return size() == rhs.size(); }
-
- bool operator < (const Law& rhs)const
- { return size() < rhs.size(); }
-
- std::string name()const { return that()->name(); }
- std::string formula()const { return that()->formula(); }
- std::string typeString()const { return that()->typeString(); }
-
- template<unsigned int index>
- typename Loki::TL::TypeAt<InputTypes, index>::Result
- setInputValue(const typename Loki::TL::TypeAt<InputTypes, index>::Result& value)
- { return Loki::tup::refer<index>(_inputTuple)=value; }
-
- template<unsigned int index>
- typename Loki::TL::TypeAt<InputTypes, index>::Result getInputValue()const
- { return Loki::tup::get<index>(_inputTuple); }
-
- template<unsigned int index>
- typename Loki::TL::TypeAt<OutputTypes, index>::Result
- setOutputValue(const typename Loki::TL::TypeAt<OutputTypes, index>::Result& value)
- { return Loki::tup::refer<index>(_outputTuple)=value; }
-
- template<unsigned int index>
- typename Loki::TL::TypeAt<OutputTypes, index>::Result getOutputValue()const
- { return Loki::tup::get<index>(_outputTuple); }
-
- protected:
- sub_type* that() { return static_cast <sub_type*>(this); }
- const sub_type* that()const { return static_cast<const sub_type*>(this); }
-
- private:
- input_tuple _inputTuple;
- output_tuple _outputTuple;
- };
-
-
- enum InputVarIndex { operand_a, operand_b, operand_c, operand_d, operand_e };
- enum OutputVarIndex { lhs_result, rhs_result };
-
-}} // namespace itl boost
-
-#endif //__itl_Law_h_JOFA_070411__
-

Modified: sandbox/itl/boost/validate/laws/element_order.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/element_order.hpp (original)
+++ sandbox/itl/boost/validate/laws/element_order.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -12,7 +12,7 @@
 
 #include <boost/itl/type_traits/value_size.hpp>
 #include <boost/itl/interval_morphism.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 
 namespace boost{namespace itl
 {

Modified: sandbox/itl/boost/validate/laws/induced_relation.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/induced_relation.hpp (original)
+++ sandbox/itl/boost/validate/laws/induced_relation.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_induced_relation_hpp_JOFA_090204__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 
 namespace boost{namespace itl
 {

Modified: sandbox/itl/boost/validate/laws/inversion_laws.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/inversion_laws.hpp (original)
+++ sandbox/itl/boost/validate/laws/inversion_laws.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_inversion_laws_h_JOFA_071124__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 #include <boost/itl/functors.hpp>
 
 namespace boost{namespace itl

Modified: sandbox/itl/boost/validate/laws/map_laws.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/map_laws.hpp (original)
+++ sandbox/itl/boost/validate/laws/map_laws.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_map_laws_hpp_JOFA_071124__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 #include <boost/itl/functors.hpp>
 
 namespace boost{namespace itl

Modified: sandbox/itl/boost/validate/laws/monoid.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/monoid.hpp (original)
+++ sandbox/itl/boost/validate/laws/monoid.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -13,7 +13,7 @@
 #include <boost/itl/type_traits/value_size.hpp>
 #include <boost/itl/functors.hpp>
 #include <boost/itl/predicates.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 
 namespace boost{namespace itl
 {

Modified: sandbox/itl/boost/validate/laws/order.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/order.hpp (original)
+++ sandbox/itl/boost/validate/laws/order.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_order_h_JOFA_071129__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 
 namespace boost{namespace itl
 {

Deleted: sandbox/itl/boost/validate/laws/pushouts.h
==============================================================================
--- sandbox/itl/boost/validate/laws/pushouts.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,130 +0,0 @@
-/*----------------------------------------------------------------------------+
-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_pushouts_h_JOFA_071124__
-#define __itl_pushouts_h_JOFA_071124__
-
-#include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
-
-namespace boost{namespace itl
-{
-
- // ---------------------------------------------------------------------------
- // (a,b) ---o---> c
- // | |
- // |f |f
- // V V
- // (a',b')---o---> c'
- // ---------------------------------------------------------------------------
- template <typename SourceT, typename TargetT,
- template<class,class>class FunctionT, // morphic function f
- template<typename>class OperatorT> // operator like +=
- class BinaryPushout :
- public Law<BinaryPushout<SourceT,TargetT,FunctionT,OperatorT>,
- LOKI_TYPELIST_2(SourceT, SourceT), LOKI_TYPELIST_2(TargetT,TargetT)>
- {
- /** f(a o b) == f(a) o f(b)
- computed using inplace operators o=
- Input = (a := inVal1, b := inVal2)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "Pushout"; }
- std::string formula()const { return "cont a, cont b: f(a o b) == f(a) o f(b) 'inplace'"; }
-
- std::string typeString()const
- {
- return
- "Pushout<"+type_to_string<SourceT>::apply()+","
- +type_to_string<TargetT>::apply()+","
- +binary_template_to_string<FunctionT>::apply()+","
- +unary_template_to_string<OperatorT>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // f(a o b) == f(a) o f(b)
- // --- left hand side ------------------------
- // lhs := f(a o b)
- SourceT a_o_b = this->template getInputValue<operand_a>();
- // a_o_b *= this->template getInputValue<operand_b>();
- OperatorT<SourceT>()(a_o_b, this->template getInputValue<operand_b>());
-
- TargetT lhs;
- FunctionT<TargetT,SourceT>()(lhs, a_o_b);
-
- // --- right hand side -----------------------
- // rhs := atomize(a) * atomize(b)
- TargetT atomic_a;
- FunctionT<TargetT,SourceT>()(atomic_a, this->template getInputValue<operand_a>());
- TargetT atomic_b;
- FunctionT<TargetT,SourceT>()(atomic_b, this->template getInputValue<operand_b>());
- TargetT rhs = atomic_a;
- OperatorT<TargetT>()(rhs, atomic_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()
- {
- std::cout << typeString() << std::endl;
- std::cout << formula() << std::endl;
- std::cout << "a: " << this->template getInputValue<operand_a>().as_string() << std::endl;
- std::cout << "b: " << this->template getInputValue<operand_b>().as_string() << std::endl;
-
- // f(a o b) == f(a) o f(b)
- // --- left hand side ------------------------
- // lhs := f(a o b)
- SourceT a_o_b = this->template getInputValue<operand_a>();
- // a_o_b o= this->template getInputValue<operand_b>();
- OperatorT<SourceT>()(a_o_b, this->template getInputValue<operand_b>());
- std::cout << "a o b:" << a_o_b.as_string() << std::endl;
-
- TargetT lhs;
- FunctionT<TargetT,SourceT>()(lhs, a_o_b);
- std::cout << "f(a o b):" << lhs.as_string() << std::endl;
-
- // --- right hand side -----------------------
- // rhs := atomize(a) * atomize(b)
- TargetT atomic_a;
- FunctionT<TargetT,SourceT>()(atomic_a, this->template getInputValue<operand_a>());
- std::cout << "f(a):" << atomic_a.as_string() << std::endl;
- TargetT atomic_b;
- FunctionT<TargetT,SourceT>()(atomic_b, this->template getInputValue<operand_b>());
- std::cout << "f(b):" << atomic_b.as_string() << std::endl;
- TargetT rhs = atomic_a;
- OperatorT<TargetT>()(rhs, atomic_b);
- std::cout << "f(a) o f(b):" << rhs.as_string() << std::endl;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return lhs == rhs;
- }
-
- }; //class BinaryPushout
-
-
-}} // namespace itl boost
-
-#endif // __itl_pushouts_h_JOFA_071124__
-

Copied: sandbox/itl/boost/validate/laws/pushouts.hpp (from r49760, /sandbox/itl/boost/validate/laws/pushouts.h)
==============================================================================
--- /sandbox/itl/boost/validate/laws/pushouts.h (original)
+++ sandbox/itl/boost/validate/laws/pushouts.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_pushouts_h_JOFA_071124__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 
 namespace boost{namespace itl
 {

Deleted: sandbox/itl/boost/validate/laws/set_laws.h
==============================================================================
--- sandbox/itl/boost/validate/laws/set_laws.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,436 +0,0 @@
-/*----------------------------------------------------------------------------+
-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_set_laws_h_JOFA_071124__
-#define __itl_set_laws_h_JOFA_071124__
-
-#include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
-#include <boost/itl/functors.hpp>
-
-namespace boost{namespace itl
-{
-
- // ---------------------------------------------------------------------------
- template <typename Type, template<class>class Operator1 = inplace_plus,
- template<class>class Operator2 = inplace_et,
- template<class>class Equality = itl::std_equal>
- class InplaceDistributivity
- : public Law<InplaceDistributivity<Type,Operator1,Operator2,Equality>,
- LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
- {
- /** a + (b * c) == (a + b) * (a + c)
- a(1)(b(2)c) == (a(1)b)(2)(a(1)c)
- computed using inplace operators +=, += and &=
- Input = (a := inVal1, b := inVal2, c := inVal3)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "InplaceDistributivity"; }
- std::string formula()const { return "a + (b * c) == (a + b) * (a + c) 'inplace'"; }
-
- std::string typeString()const
- {
- return "Distributivity<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Operator1>::apply()+","
- +unary_template_to_string<Operator2>::apply()+","
- +unary_template_to_string<Equality>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // a + (b * c) == (a + b) * (a + c)
- // --- left hand side ------------------------
- Type b_star_c = this->template getInputValue<operand_b>();
- Operator2<Type>()(b_star_c, this->template getInputValue<operand_c>());
-
- // lhs := a + (b * c)
- Type lhs = this->template getInputValue<operand_a>();
- Operator1<Type>()(lhs, b_star_c);
-
- // --- right hand side -----------------------
- Type a_plus_b = this->template getInputValue<operand_a>();
- Operator1<Type>()(a_plus_b, this->template getInputValue<operand_b>());
-
- Type a_plus_c = this->template getInputValue<operand_a>();
- Operator1<Type>()(a_plus_c, this->template getInputValue<operand_c>());
-
- // rhs := (a + b) * (a + c)
- Type rhs = a_plus_b;
- Operator2<Type>()(rhs, a_plus_c);
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(lhs, rhs);
- }
-
- bool debug_holds()
- {
- // a + (b * c) == (a + b) * (a + c)
- std::cout << "a:" << this->template getInputValue<operand_a>().as_string() << std::endl;
- std::cout << "b:" << this->template getInputValue<operand_b>().as_string() << std::endl;
- std::cout << "c:" << this->template getInputValue<operand_c>().as_string() << std::endl;
- // --- left hand side ------------------------
- Type b_star_c = this->template getInputValue<operand_b>();
- Operator2<Type>()(b_star_c, this->template getInputValue<operand_c>());
- std::cout << "b*c:" << b_star_c.as_string() << std::endl;
-
- // lhs := a + (b * c)
- Type lhs = this->template getInputValue<operand_a>();
- Operator1<Type>()(lhs, b_star_c);
- std::cout << "l=a+(b*c):" << lhs.as_string() << std::endl;
-
- // --- right hand side -----------------------
- Type a_plus_b = this->template getInputValue<operand_a>();
- Operator1<Type>()(a_plus_b, this->template getInputValue<operand_b>());
- std::cout << "a+b:" << a_plus_b.as_string() << std::endl;
-
- Type a_plus_c = this->template getInputValue<operand_a>();
- Operator1<Type>()(a_plus_c, this->template getInputValue<operand_c>());
- std::cout << "a+c:" << a_plus_c.as_string() << std::endl;
-
- // rhs := (a + b) * (a + c)
- Type rhs = a_plus_b;
- Operator2<Type>()(rhs, a_plus_c);
- std::cout << "r=(a+b)*(a+c):" << rhs.as_string() << std::endl;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return lhs == rhs;
- }
-
- size_t size()const
- {
- return value_size<Type>::apply(this->template getInputValue<operand_a>())+
- value_size<Type>::apply(this->template getInputValue<operand_b>())+
- value_size<Type>::apply(this->template getInputValue<operand_c>());
- }
- };
-
- // ---------------------------------------------------------------------------
- template <typename Type, template<class>class Operator1 = inplace_plus,
- template<class>class Operator2 = inplace_et,
- template<class>class Equality = itl::std_equal>
- class InplaceDeMorgan
- : public Law<InplaceDeMorgan<Type,Operator1,Operator2,Equality>,
- LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
- {
- /** a - (b + c) == (a - b) & (a - c)
- a - (b(1)c) == (a - b)(2)(a - c)
- computed using inplace operators +=, += and &=
- Input = (a := inVal1, b := inVal2, c := inVal3)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "InplacePlusDeMorgan"; }
- std::string formula()const { return "a - (b + c) == (a - b) & (a - c) 'inplace'"; }
-
- std::string typeString()const
- {
- return "DeMorgan<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Operator1>::apply()+","
- +unary_template_to_string<Operator2>::apply()+","
- +unary_template_to_string<Equality>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // a - (b + c) == (a - b) & (a - c)
- // --- left hand side ------------------------
- Type b_plus_c = this->template getInputValue<operand_b>();
- Operator1<Type>()(b_plus_c, this->template getInputValue<operand_c>());
-
- // lhs := a - (b + c)
- Type lhs = this->template getInputValue<operand_a>();
- lhs -= b_plus_c;
-
- // --- right hand side -----------------------
- Type a_minus_b = this->template getInputValue<operand_a>();
- a_minus_b -= this->template getInputValue<operand_b>();
-
- Type a_minus_c = this->template getInputValue<operand_a>();
- a_minus_c -= this->template getInputValue<operand_c>();
-
- // rhs := (a - b) & (a - c)
- Type rhs = a_minus_b;
- Operator2<Type>()(rhs, a_minus_c);
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(lhs, rhs);
- }
-
- bool debug_holds(){ return holds(); }
-
- size_t size()const
- {
- return
- value_size<Type>::apply(this->template getInputValue<operand_a>())+
- value_size<Type>::apply(this->template getInputValue<operand_b>())+
- value_size<Type>::apply(this->template getInputValue<operand_c>());
- }
- };
-
- // ---------------------------------------------------------------------------
- template <typename Type,
- template<class>class Operator1 = inplace_plus,
- template<class>class Operator2 = inplace_minus,
- template<class>class Equality = itl::std_equal>
- class InplaceRightDistributivity
- : public Law<InplaceRightDistributivity<Type,Operator1,Operator2>,
- LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
- {
- /** (a + b) - c == (a - c) + (b - c)
- computed using inplace operators +=, -= and &=
- Input = (a := inVal1, b := inVal2, c := inVal3)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "InplaceRightDistributivity"; }
- std::string formula()const { return "(a + b) - c == (a - c) + (b - c) 'inplace'"; }
-
- std::string typeString()const
- {
- return "RightDistributivity<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Operator1>::apply()+","
- +unary_template_to_string<Operator2>::apply()+","
- +unary_template_to_string<Equality>::apply() +">";
- }
-
- public:
-
- size_t size()const
- {
- return
- value_size<Type>::apply(this->template getInputValue<operand_a>())+
- value_size<Type>::apply(this->template getInputValue<operand_b>())+
- value_size<Type>::apply(this->template getInputValue<operand_c>());
- }
-
- bool holds()
- {
- // (a + b) - c == (a - c) + (b - c)
- // --- left hand side ------------------------
- // lhs := (a + b) - c
- Type lhs = this->template getInputValue<operand_a>();
- Operator1<Type>()(lhs, this->template getInputValue<operand_b>());
- Operator2<Type>()(lhs, this->template getInputValue<operand_c>());
-
- // --- right hand side -----------------------
- Type a_minus_c = this->template getInputValue<operand_a>();
- Operator2<Type>()(a_minus_c, this->template getInputValue<operand_c>());
-
- Type b_minus_c = this->template getInputValue<operand_b>();
- Operator2<Type>()(b_minus_c, this->template getInputValue<operand_c>());
-
- // rhs := (a - c) + (b - c)
- Type rhs = a_minus_c;
- Operator1<Type>()(rhs, b_minus_c);
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(lhs, rhs);
- }
-
- bool debug_holds()
- {
- // (a + b) - c == (a - c) + (b - c)
- std::cout << "a:" << this->template getInputValue<operand_a>().as_string() << std::endl;
- std::cout << "b:" << this->template getInputValue<operand_b>().as_string() << std::endl;
- std::cout << "c:" << this->template getInputValue<operand_c>().as_string() << std::endl;
- // --- left hand side ------------------------
- // lhs := (a + b) - c
- Type lhs = this->template getInputValue<operand_a>();
- Operator1<Type>()(lhs, this->template getInputValue<operand_b>());
- std::cout << "a+b:" << lhs.as_string() << std::endl;
- Operator2<Type>()(lhs, this->template getInputValue<operand_c>());
- std::cout << "l=(a+b)-c:" << lhs.as_string() << std::endl;
-
- // --- right hand side -----------------------
- Type a_minus_c = this->template getInputValue<operand_a>();
- Operator2<Type>()(a_minus_c, this->template getInputValue<operand_c>());
- std::cout << "a-c:" << a_minus_c.as_string() << std::endl;
-
- Type b_minus_c = this->template getInputValue<operand_b>();
- Operator2<Type>()(b_minus_c, this->template getInputValue<operand_c>());
- std::cout << "b-c:" << b_minus_c.as_string() << std::endl;
-
- // rhs := (a - c) + (b - c)
- Type rhs = a_minus_c;
- Operator1<Type>()(rhs, b_minus_c);
- std::cout << "r=(a-c)+(b-c):" << b_minus_c.as_string() << std::endl;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(lhs, rhs);
- }
- };
-
-
- // ---------------------------------------------------------------------------
- template <typename MapT, template<class>class Equality = itl::std_equal>
- class SectionAbsorbtion
- : public Law<SectionAbsorbtion<MapT>,
- LOKI_TYPELIST_2(MapT, typename MapT::set_type), LOKI_TYPELIST_2(MapT,MapT)>
- {
- /** a - (a & b) == a - b
- computed using inplace operators -= and &=
- Input = (a := inVal1, b := inVal2)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "SectionAbsorbtion"; }
- std::string formula()const { return "map a, set b: a - (a & b) == a - b 'inplace'"; }
-
- std::string typeString()const
- {
- return "SectionAbsorbtion<"+type_to_string<MapT>::apply()+","
- +unary_template_to_string<Equality>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // a - (a & b) == a - b
- // --- left hand side ------------------------
- // lhs := a - (a & b)
- MapT a_sec_b = this->template getInputValue<operand_a>();
- a_sec_b &= this->template getInputValue<operand_b>();
- MapT lhs = this->template getInputValue<operand_a>();
- lhs -= a_sec_b;
-
- // --- right hand side -----------------------
- // rhs := a - b
- MapT rhs = this->template getInputValue<operand_a>();
- rhs -= this->template getInputValue<operand_b>();
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<MapT>()(lhs, rhs);
- }
-
- bool debug_holds(){ return holds(); }
-
- size_t size()const
- {
- return
- value_size<MapT>::apply(this->template getInputValue<operand_a>())+
- value_size<typename MapT::set_type>::apply(this->template getInputValue<operand_b>());
- }
- };
-
- // ---------------------------------------------------------------------------
- template <typename MapT>
- class ProtonicEquality
- : public Law<ProtonicEquality<MapT>,
- LOKI_TYPELIST_2(MapT,MapT), LOKI_TYPELIST_2(bool,bool)>
- {
- /** (a.absorb_neutrons() == b.absorb_neutrons()) == is_protonic_equal(a, b)
- Input = (a := inVal1, b := inVal2)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "ProtonicEquality"; }
- std::string formula()const { return "(a.absorb_neutrons() == b.absorb_neutrons()) == is_protonic_equal(a, b)"; }
-
- std::string typeString()const
- {
- return "ProtonicEquality<"+type_to_string<MapT>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // (a.absorb_neutrons() == b.absorb_neutrons()) == is_protonic_equal(a, b)
- // --- left hand side ------------------------
- // lhs := (a.absorb_neutrons() == b.absorb_neutrons())
- MapT a = this->template getInputValue<operand_a>();
- MapT a_protonic = a;
- a_protonic.absorb_neutrons();
- MapT b = this->template getInputValue<operand_b>();
- MapT b_protonic = b;
- b_protonic.absorb_neutrons();
-
- bool lhs = a_protonic == b_protonic;
-
- // --- right hand side -----------------------
- // rhs := is_protonic_equal(a, b)
- bool rhs = is_protonic_equal(a, b);
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return lhs == rhs;
- }
-
- bool debug_holds()
- {
- // (a.absorb_neutrons() == b.absorb_neutrons()) == is_protonic_equal(a, b)
- // --- left hand side ------------------------
- // lhs := (a.absorb_neutrons() == b.absorb_neutrons())
-
- cout << name() << "::debug_holds():" << endl;
- cout << "Instance: " << typeString() << endl;
- cout << "Formula: " << formula() << endl;
-
- MapT a = this->template getInputValue<operand_a>();
- MapT b = this->template getInputValue<operand_b>();
-
- cout << "a: " << a.as_string() << endl;
- cout << "b: " << b.as_string() << endl;
-
- MapT a_protonic = a;
- a_protonic.absorb_neutrons();
- MapT b_protonic = b;
- b_protonic.absorb_neutrons();
-
- cout << "a.absorb_neutrons(): " << a_protonic.as_string() << endl;
- cout << "b.absorb_neutrons(): " << b_protonic.as_string() << endl;
-
- bool lhs = a_protonic == b_protonic;
-
- cout << "lhs := (a.absorb_neutrons() == b.absorb_neutrons()): " << lhs << endl;
-
- // --- right hand side -----------------------
- // rhs := is_protonic_equal(a, b)
- bool rhs = is_protonic_equal(a, b);
-
- cout << "rhs := is_protonic_equal(a, b): " << rhs << endl;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return lhs == rhs;
- }
-
- size_t size()const
- {
- return
- value_size<MapT>::apply(this->template getInputValue<operand_a>())+
- value_size<MapT>::apply(this->template getInputValue<operand_b>());
- }
- };
-
-}} // namespace itl boost
-
-#endif // __itl_set_laws_h_JOFA_071124__
-
-

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 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_set_laws_h_JOFA_071124__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 #include <boost/itl/functors.hpp>
 
 namespace boost{namespace itl

Modified: sandbox/itl/boost/validate/laws/subset_order.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/subset_order.hpp (original)
+++ sandbox/itl/boost/validate/laws/subset_order.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -12,7 +12,7 @@
 
 #include <boost/itl/type_traits/value_size.hpp>
 #include <boost/itl/interval_morphism.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 
 namespace boost{namespace itl
 {

Modified: sandbox/itl/boost/validate/laws/symmetric_difference.hpp
==============================================================================
--- sandbox/itl/boost/validate/laws/symmetric_difference.hpp (original)
+++ sandbox/itl/boost/validate/laws/symmetric_difference.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 #define __itl_symmetric_difference_hpp_JOFA_071124__
 
 #include <boost/itl/type_traits/value_size.hpp>
-#include <boost/validate/law.h>
+#include <boost/validate/laws/law.hpp>
 #include <boost/itl/functors.hpp>
 
 namespace boost{namespace itl

Deleted: sandbox/itl/boost/validate/lawvalidater.h
==============================================================================
--- sandbox/itl/boost/validate/lawvalidater.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,182 +0,0 @@
-/*----------------------------------------------------------------------------+
-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 <boost/validate/loki_xt/Tuple.h>
-#include <boost/itl/set.hpp>
-#include <boost/itl/map.hpp>
-#include <boost/validate/gentor/randomgentor.h>
-
-#include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/lawviolations.h>
-
-namespace boost{namespace itl
-{
- typedef itl::map<std::string, int> ValidationCounterT;
- typedef itl::map<std::string, int> ViolationCounterT;
- typedef itl::map<std::string, PolyLawViolations> ViolationMapT;
-
- class LawValidaterI
- {
- public:
- virtual ~LawValidaterI(){}
- virtual void init()=0;
- virtual void run()=0;
- virtual void addFrequencies(ValidationCounterT&)=0;
- virtual void addViolations(ViolationCounterT&, ViolationMapT&)=0;
- };
-
-
- template <class LawT, template<typename>class GentorT>
- class LawValidater : public LawValidaterI
- {
- public:
- typedef typename LawT::input_types input_types;
- typedef typename LawT::output_types output_types;
- typedef typename LawT::input_tuple input_tuple;
- typedef typename LawT::output_tuple output_tuple;
-
- typedef typename Loki::TL::MapType<GentorT, input_types>::Result gentor_types;
- typedef typename Loki::tuple<gentor_types> input_gentor;
-
- public:
- LawValidater(){ setTrialsCount(250); } //1000(std)//JODO config at only ONE location
-
- void setTrialsCount(int trials)
- {
- _trialsCount = trials;
- _silentTrialsCount = std::max(1, _trialsCount / 10);
- }
-
- void setSilentTrialsCount(int trials) { _trialsCount = trials; }
-
- void init();
- void run();
- void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
-
- void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
- {
- summary += ViolationCounterT::value_type(lawType(), static_cast<int>(_lawViolations.size()));
- if(!_lawViolations.empty())
- collector += ViolationMapT::value_type(lawType(), PolyLawViolations(new LawViolationsT(_lawViolations)));
- }
-
- std::string lawType()const{ return _law.typeString(); }
-
- void reportLawInfo()const;
- void reportProgress()const;
- void reportViolations()const;
- void reportSuccess()const;
-
- private:
- typedef LawViolations<LawT> LawViolationsT;
-
- private:
- input_gentor _gentor;
- LawT _law;
-
- int _trialsCount;
- int _silentTrialsCount;
-
- LawViolationsT _lawViolations;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
- }; //class LawValitater
-
-
- template <class LawT, template<typename>class GentorT>
- void LawValidater<LawT, GentorT>::init()
- {
- _frequencies.clear();
- _lawViolations.clear();
- _violations.clear();
- }
-
- template <class LawT, template<typename>class GentorT>
- void LawValidater<LawT, GentorT>::run()
- {
- // apply Calibrater.apply to each element of the generator-tuple _gentor
- // This is just an initialisation of the generators according to system
- // defaults for convenience purposes.
- _gentor.template apply<GentorT, Calibrater, input_tuple>();
-
- // Input values that are to be generated on every iteration
- input_tuple values;
-
- for(int idx=0; idx<_trialsCount; idx++)
- {
- // Apply the function SomeVale to each component of the input tuple
- _gentor.template map_template<GentorT, SomeValue>(values);
- _law.setInstance(values);
-
- if(!_law.holds())
- _lawViolations.insert(_law);
- }
-
- if(!_lawViolations.empty())
- {
- reportViolations();
- LawT violation = *(_lawViolations.begin());
-
- input_tuple inVars;
- output_tuple outVars;
- violation.getInstance(inVars, outVars);
- std::cout << "Violation of: " << _law.typeString() << std::endl;
- std::cout << _law.formula() << std::endl;
- std::cout << inVars.as_string() << std::endl;
- std::cout << outVars.as_string() << std::endl;
-
- violation.debug_holds();
- }
- else
- {
- //reportSuccess();
- _frequencies.insert(ValidationCounterT::value_type(lawType(), 1));
- }
-
- }
-
- template <class LawT, template<typename>class GentorT>
- void LawValidater<LawT, GentorT>::reportLawInfo()const
- {
- std::cout << "----------------------------------------------------------" << std::endl;
- std::cout << "Validation of law: " << std::endl;
- std::cout << _law.name() << std::endl;
- std::cout << _law.formula() << std::endl;
- }
-
- template <class LawT, template<typename>class GentorT>
- void LawValidater<LawT, GentorT>::reportProgress()const
- {
- typename LawT::input_tuple input_values;
- _law.getInputInstance(input_values);
- //JODO think about more general mechanics of progress reporting here
- std::cout << "SomeValues " << input_values.as_string() << std::endl;
- }
-
- template <class LawT, template<typename>class GentorT>
- void LawValidater<LawT, GentorT>::reportViolations()const
- {
- std::cout << static_cast<int>(_lawViolations.getViolationsCount()) << " violations" << std::endl;
- }
-
- template <class LawT, template<typename>class GentorT>
- void LawValidater<LawT, GentorT>::reportSuccess()const
- {
- std::cout << "Law successfully validated for " << _trialsCount << " cases" << std::endl;
- }
-
-}} // namespace itl boost
-
-// ----------------------------------------------------------------------------
-

Deleted: sandbox/itl/boost/validate/lawviolations.h
==============================================================================
--- sandbox/itl/boost/validate/lawviolations.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,176 +0,0 @@
-/*----------------------------------------------------------------------------+
-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_LawViolations_h_JOFA_070411__
-#define __itl_LawViolations_h_JOFA_070411__
-
-#include <string>
-#include <boost/itl/set.hpp>
-#include <boost/validate/loki_xt/Tuple.h>
-
-namespace boost{namespace itl
-{
-
- class LawViolationsI
- {
- public:
- virtual ~LawViolationsI(){}
-
- virtual size_t size()const=0;
- virtual size_t getViolationsCount()const=0;
- virtual LawViolationsI& operator += (const LawViolationsI& rhs)=0;
-
- virtual const LawViolationsI* getLawViolations()const=0;
-
- virtual bool operator == (const LawViolationsI& rhs)const=0;
- virtual bool operator < (const LawViolationsI& rhs)const=0;
-
- virtual void reportFirst()const=0;
-
- };
-
- class PolyLawViolations
- {
- public:
- PolyLawViolations(): p_violations(NULL){}
- PolyLawViolations(LawViolationsI* vios): p_violations(vios) {}
- ~PolyLawViolations() {} //JODO delete p_violations; }
-
- void destroy() { delete p_violations; p_violations = NULL; }
-
- size_t size()const { return p_violations ? p_violations->size() : 0; }
- size_t getViolationsCount()const { return p_violations ? p_violations->getViolationsCount() : 0; }
-
- PolyLawViolations& operator += (const PolyLawViolations& rhs)
- {
- if(p_violations == NULL)
- p_violations = rhs.p_violations;
- else if(rhs.p_violations != NULL)
- (*p_violations) += *(rhs.p_violations);
-
- return *this;
- }
-
- bool operator == (const PolyLawViolations& rhs)const
- {
- return (p_violations == NULL && rhs.p_violations == NULL)
- || (
- ( p_violations != NULL && rhs.p_violations != NULL)
- &&( p_violations == rhs.p_violations
- || *p_violations == (*rhs.p_violations))
- );
- }
-
- bool operator < (const PolyLawViolations& rhs)const
- {
- return (p_violations != NULL && rhs.p_violations != NULL)
- && (*p_violations < (*rhs.p_violations));
- }
-
- void reportFirst()const
- {
- if(p_violations == NULL)
- std::cout << "Empty law violation." << std::endl;
- else
- p_violations->reportFirst();
- }
-
- private:
- LawViolationsI* p_violations;
- };
-
-
- /** class LawViolations.
- LawViolations is a set of instances of a law that are violated sorted by operator <.
- Operator < will usually be implemented via the size of the laws instance.
- We are always only interested in small instances of law violations for efficient
- debugging. */
- template <class LawT>
- class LawViolations : public LawViolationsI
- {
- public:
- typedef LawT LawType;
- typedef typename itl::set<LawType> ViolationSet;
- typedef typename ViolationSet::size_type size_type;
-
- typedef typename ViolationSet::iterator iterator;
- typedef typename ViolationSet::const_iterator const_iterator;
-
- enum { MaxSize = 20 };
-
- LawViolations():_maxSize(MaxSize), _violationsCount(0){}
-
- const LawViolationsI* getLawViolations()const { return this; }
-
- size_t getViolationsCount()const { return _violationsCount; }
-
- LawViolationsI& operator += (const LawViolationsI& rhs)
- {
- const_FORALL(typename ViolationSet, vio_,
- dynamic_cast<const LawViolations<LawT>*>(rhs.getLawViolations())->_violations)
- insert(*vio_);
-
- return *this;
- }
-
- bool operator == (const LawViolationsI& rhs)const
- {
- return _violations == dynamic_cast<const LawViolations<LawT>*>(rhs.getLawViolations())->_violations;
- }
-
- bool operator < (const LawViolationsI& rhs)const
- {
- return _violations < dynamic_cast<const LawViolations<LawT>*>(rhs.getLawViolations())->_violations;
- }
-
- void insert(const LawType& lawInstance)
- {
- _violations.insert(lawInstance);
- _violationsCount++;
- if(0 < _violations.size() && _maxSize < static_cast<int>(_violations.size()))
- {
- typename ViolationSet::iterator doomed_ = _violations.end();
- doomed_--;
- _violations.erase(doomed_);
- }
- }
-
- iterator begin() { return _violations.begin(); }
- const_iterator begin()const { return _violations.begin(); }
- iterator end() { return _violations.end(); }
- const_iterator end()const { return _violations.begin(); }
-
- void clear() { _violations.clear(); }
- bool empty()const { return _violations.empty(); }
- size_type size()const { return _violations.size(); }
-
- void reportFirst()const
- {
- typename ViolationSet::const_iterator fst = _violations.begin();
- LawT violation = *(_violations.begin());
-
- typename LawT::input_tuple inVars;
- typename LawT::output_tuple outVars;
- violation.getInstance(inVars, outVars);
- std::cout << "Violation of: " << violation.typeString() << std::endl;
- std::cout << inVars.as_string() << std::endl;
- std::cout << outVars.as_string() << std::endl;
- }
-
-
- private:
- ViolationSet _violations;
- int _maxSize;
- size_t _violationsCount;
- };
-
-}} // namespace itl boost
-
-#endif //__itl_LawViolations_h_JOFA_070411__
-

Deleted: sandbox/itl/boost/validate/realmvalidater.h
==============================================================================
--- sandbox/itl/boost/validate/realmvalidater.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,212 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/driver/itl_driver.hpp>
-#include <boost/validate/utility.hpp>
-
-namespace boost{namespace itl
-{
-
- class RealmValidater : public itl_driver
- {
- public:
- RealmValidater() { 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] = 33;
- _rootChoice[RootType::interval_map] = 33;
- _rootChoice[RootType::split_interval_map] = 34;
- setRootTypeNames();
- _rootChoice.init();
-
- _domainChoice.setSize(DomainType::DomainTypes_size);
- _domainChoice.setMaxWeights(100);
- _domainChoice[DomainType::Int] = 50;
- _domainChoice[DomainType::Double] = 50;
- setDomainTypeNames();
- _domainChoice.init();
-
- _codomainChoice.setSize(CodomainType::CodomainTypes_size);
- _codomainChoice.setMaxWeights(100);
- _codomainChoice[CodomainType::Int] = 50;
- _codomainChoice[CodomainType::Double] = 0;
- _codomainChoice[CodomainType::set_int] = 50;
- setCodomainTypeNames();
- _codomainChoice.init();
-
- _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
- _neutronizerChoice.setMaxWeights(100);
- _neutronizerChoice[NeutronHandlerType::partial_absorber] = 50;
- _neutronizerChoice[NeutronHandlerType::partial_enricher] = 50;
- _neutronizerChoice[NeutronHandlerType::total_absorber] = 0;
- _neutronizerChoice[NeutronHandlerType::total_enricher] = 0;
- setNeutronHandlerTypeNames();
- _neutronizerChoice.init();
-
- if(!_rootChoice.is_consistent())
- {
- setValid(false);
- std::cout << _rootChoice.inconsitencyMessage("RealmValidater::setProfile()") << std::endl;
- }
-
- if(!_domainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _domainChoice.inconsitencyMessage("RealmValidater::setProfile()") << std::endl;
- }
-
- if(!_codomainChoice.is_consistent())
- {
- setValid(false);
- std::cout << _codomainChoice.inconsitencyMessage("RealmValidater::setProfile()") << std::endl;
- }
-
- if(!_neutronizerChoice.is_consistent())
- {
- setValid(false);
- std::cout << _neutronizerChoice.inconsitencyMessage("RealmValidater::setProfile()") << std::endl;
- }
-
- }
-
- algebra_validater* 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);
- // }
- // }
- //-----------------------------------------------------------------
- // Maps
- //-----------------------------------------------------------------
- case RootType::itl_map: {
- switch(domainChoice) {
- case DomainType::Int:
- switch(codomainChoice) {
- case CodomainType::Int: return new InplaceMapValidater<itl::map<int,int> >;
- case CodomainType::set_int: return new InplaceMapValidater<itl::map<int,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }//switch codomain
-
- case DomainType::Double:
- switch(codomainChoice) {
- case CodomainType::Int: return new InplaceMapValidater<itl::map<double,int,partial_enricher> >;
- case CodomainType::set_int: return new InplaceSetValidater<itl::map<double,itl::set<int>,partial_enricher > >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }//switch codomain
-
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: domainChoice:\n"),
- domainChoice, _domainChoice);
- }//switch domain
- }//case itl_map
- //-----------------------------------------------------------------
- case RootType::interval_map: {
- switch(domainChoice) {
- case DomainType::Int:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<interval_map<int,int,total_absorber> >;
- case CodomainType::set_int: return new IntervalMapValidater<interval_map<int,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }// switch codomain
- case DomainType::Double:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<interval_map<double,int,total_enricher> >;
- case CodomainType::set_int: return new IntervalMapValidater<interval_map<double,itl::set<int>,partial_enricher > >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }// switch codomain
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: domainChoice:\n"),
- domainChoice, _domainChoice);
- }//switch domain
- }//case interval_map
- //-----------------------------------------------------------------
- case RootType::split_interval_map: {
- switch(domainChoice) {
- case DomainType::Int:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<split_interval_map<int,int,partial_enricher> >;
- case CodomainType::set_int: return new IntervalMapValidater<split_interval_map<int,itl::set<int>,partial_enricher> >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }
- case DomainType::Double:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<split_interval_map<double,int,total_absorber> >;
- case CodomainType::set_int: return new IntervalSetValidater<split_interval_map<double,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
- domainChoice, _domainChoice);
- }//switch domain
- }//case split_interval_map
- //-----------------------------------------------------------------
-
- default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
- } //switch()
-
- return NULL; //just to please the compiler ;)
- }
-
- };
-
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/single_law_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/single_law_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,346 +0,0 @@
-/*----------------------------------------------------------------------------+
-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/validater/algebra_validater.hpp>
-#include <boost/validate/utility.hpp>
-
-
-namespace boost{namespace itl
-{
-
- namespace RootType
- {
- enum RootTypes
- {
- itl_set, interval_set, separate_interval_set, split_interval_set,
- itl_map, interval_map, split_interval_map,
- Types_size
- };
- }
-
- namespace DomainType
- {
- enum DomainTypes { Int, Double, DomainTypes_size };
- }
-
- namespace CodomainType
- {
- enum CodomainTypes { Int, Double, set_int, CodomainTypes_size };
- }
-
- template<class LawT>
- class single_law_validater
- {
- public:
- single_law_validater() { setProfile(); }
-
- private:
- void setRootTypeNames()
- {
- std::vector<std::string> type_names(RootType::Types_size);
- type_names[RootType::itl_set] = "itl_set";
- type_names[RootType::interval_set] = "interval_set";
- type_names[RootType::separate_interval_set] = "separate_interval_set";
- type_names[RootType::split_interval_set] = "split_interval_set";
- type_names[RootType::itl_map] = "itl_map";
- type_names[RootType::interval_map] = "interval_map";
- type_names[RootType::split_interval_map] = "split_interval_map";
- _rootChoice.setTypeNames(type_names);
- }
- void setDomainTypeNames()
- {
- std::vector<std::string> type_names(CodomainType::CodomainTypes_size);
- type_names[CodomainType::Int] = "Int";
- type_names[CodomainType::Double] = "Double";
- _domainChoice.setTypeNames(type_names);
- }
- void setCodomainTypeNames()
- {
- std::vector<std::string> type_names(CodomainType::CodomainTypes_size);
- type_names[CodomainType::Int] = "Int";
- type_names[CodomainType::Double] = "Double";
- type_names[CodomainType::set_int] = "set_int";
- _codomainChoice.setTypeNames(type_names);
- }
-
- void setInvalid() { _isValid = false; }
-
- algebra_validater* choiceError(const std::string& location, int value, const ChoiceT& choice)
- {
- reportTypeChoiceError(location, value, choice);
- setInvalid();
- return NULL;
- }
-
- public:
- bool hasValidProfile()const { return _isValid; }
-
- void setProfile()
- {
- _isValid = 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;
- setRootTypeNames();
- _rootChoice.init();
-
- _domainChoice.setSize(DomainType::DomainTypes_size);
- _domainChoice.setMaxWeights(100);
- _domainChoice[DomainType::Int] = 50;
- _domainChoice[DomainType::Double] = 50;
- setDomainTypeNames();
- _domainChoice.init();
-
- _codomainChoice.setSize(CodomainType::CodomainTypes_size);
- _codomainChoice.setMaxWeights(100);
- _codomainChoice[CodomainType::Int] = 50;
- _codomainChoice[CodomainType::Double] = 0;
- _codomainChoice[CodomainType::set_int] = 50;
- setCodomainTypeNames();
- _codomainChoice.init();
-
- if(!_rootChoice.is_consistent())
- {
- setInvalid();
- std::cout << _rootChoice.inconsitencyMessage("single_law_validater::setProfile()") << std::endl;
- }
-
- if(!_domainChoice.is_consistent())
- {
- setInvalid();
- std::cout << _domainChoice.inconsitencyMessage("single_law_validater::setProfile()") << std::endl;
- }
-
- if(!_codomainChoice.is_consistent())
- {
- setInvalid();
- std::cout << _codomainChoice.inconsitencyMessage("single_law_validater::setProfile()") << std::endl;
- }
-
- }
-
- 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(idx>0 && idx % 100 == 0)
- reportFrequencies();
- validateType();
- }
- }
-
- algebra_validater* chooseValidater()
- {
- int rootChoice = _rootChoice.some();
- int domainChoice = _domainChoice.some();
- int codomainChoice = _codomainChoice.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<split_interval_set<int> >;
- case DomainType::Double: return new IntervalSetValidater<split_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_map: {
- switch(domainChoice) {
- case DomainType::Int:
- switch(codomainChoice) {
- // than enricher maps have.
- case CodomainType::Int: return new InplaceMapValidater<itl::map<int,int,neutron_enricher> >;
- //case CodomainType::Double: return new InplaceMapValidater<itl::map<int,double,neutron_enricher> >;
- case CodomainType::set_int: return new InplaceMapValidater<itl::map<int,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }//switch codomain
-
- case DomainType::Double:
- switch(codomainChoice) {
- case CodomainType::Int: return new InplaceMapValidater<itl::map<double,int,neutron_enricher> >;
- //case CodomainType::Double: return new InplaceMapValidater<itl::map<double,double,neutron_enricher> >;
- case CodomainType::set_int: return new InplaceMapValidater<itl::map<double,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }//switch codomain
-
- default: return choiceError(ITL_LOCATION("\nRootType::itl_map: domainChoice:\n"),
- domainChoice, _domainChoice);
- }//switch domain
- }//case itl_map
- //-----------------------------------------------------------------
- case RootType::interval_map: {
- switch(domainChoice) {
- case DomainType::Int:
- switch(codomainChoice) {
- //JODO SectionAbsorbtion has to be tested for all absorber maps
- case CodomainType::Int: return new IntervalMapValidater<interval_map<int,int,neutron_enricher> >;
- //case CodomainType::Double: return new IntervalMapValidater<interval_map<int,double,neutron_enricher> >;
- case CodomainType::set_int: return new IntervalMapValidater<interval_map<int,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }// switch codomain
- case DomainType::Double:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<interval_map<double,int,neutron_enricher> >;
- //case CodomainType::Double: return new IntervalMapValidater<interval_map<double,double,neutron_enricher> >;
- case CodomainType::set_int: return new IntervalMapValidater<interval_map<double,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }// switch codomain
- default: return choiceError(ITL_LOCATION("\nRootType::interval_map: domainChoice:\n"),
- domainChoice, _domainChoice);
- }//switch domain
- }//case interval_map
- //-----------------------------------------------------------------
- case RootType::split_interval_map: {
- switch(domainChoice) {
- case DomainType::Int:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<split_interval_map<int,int,neutron_enricher> >;
- //case CodomainType::Double: return new IntervalMapValidater<split_interval_map<int,double,neutron_enricher> >;
- case CodomainType::set_int: return new IntervalMapValidater<split_interval_map<int,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }
- case DomainType::Double:
- switch(codomainChoice) {
- case CodomainType::Int: return new IntervalMapValidater<split_interval_map<double,int,neutron_enricher> >;
- //case CodomainType::Double: return new IntervalMapValidater<split_interval_map<double,double,neutron_enricher> >;
- case CodomainType::set_int: return new IntervalMapValidater<split_interval_map<double,itl::set<int> > >;
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: codomainChoice:\n"),
- codomainChoice, _codomainChoice);
- }
- default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
- domainChoice, _domainChoice);
- }//switch domain
- }//case split_interval_map
- //-----------------------------------------------------------------
-
- default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
- } //switch()
-
- return NULL; //just to please the compiler ;)
- }
-
-
- void validateType()
- {
- _validater = chooseValidater();
- if(_validater)
- {
- _validater->validate();
- _validater->addFrequencies(_frequencies);
- _validater->addViolations(_violationsCount, _violations);
- delete _validater;
- }
- }
-
- void reportFrequencies()
- {
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- int valid_count = 1;
- FORALL(ValidationCounterT, it, _frequencies)
- {
- printf("%3d %-66s%8d\n", valid_count, it->KEY_VALUE.c_str(), it->CONT_VALUE);
- valid_count++;
- }
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- int violation_count = 1;
- FORALL(ViolationMapT, it, _violations)
- {
- printf("%3d %-66s%8d\n", violation_count, it->KEY_VALUE.c_str(), it->CONT_VALUE.getViolationsCount());
- violation_count++;
- }
- if(!_violations.empty())
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- FORALL(ViolationMapT, it, _violations)
- {
- PolyLawViolations violas = it->CONT_VALUE;
- violas.reportFirst();
- }
- if(!_violations.empty())
- std::cout << "------------------------------------------------------------------------------" << std::endl;
- }
-
- void reportFrequencies(const std::string& filename)
- {
- FILE* fp = fopen(filename.c_str(), "w");
- int valid_count = 1;
- FORALL(ValidationCounterT, it, _frequencies)
- {
- fprintf(fp, "%3d %-66s\n", valid_count, it->KEY_VALUE.c_str());
- valid_count++;
- }
- }
-
- void reportTypeChoiceError(const std::string& location, int rootChoice, const ChoiceT& chooser)const
- {
- std::cout << location
- << "Type choice: " << rootChoice << " is out of range or unselectable in switch clause.\n"
- << "Expected types and their weights are:\n"
- << chooser.asString();
- }
-
- private:
- ChoiceT _rootChoice;
- ChoiceT _domainChoice;
- ChoiceT _codomainChoice;
- algebra_validater* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
- bool _isValid;
- };
-
-
-}} // namespace itl boost
-

Deleted: sandbox/itl/boost/validate/typevalidater.h
==============================================================================
--- sandbox/itl/boost/validate/typevalidater.h 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
+++ (empty file)
@@ -1,898 +0,0 @@
-/*----------------------------------------------------------------------------+
-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
-
-#ifdef __DOOMED
-
-#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/validater/law_validater.hpp>
-#include <boost/validate/validater/algebra_validater.hpp>
-
-namespace boost{namespace itl
-{
- typedef WeightedNumberGentor<int> ChoiceT;
-
- // ------------------------------------------------------------------------
- // Orderings
- // ------------------------------------------------------------------------
-
- template <typename Type, template<class>class Relation>
- class StrictWeakOrderValidater : public algebra_validater
- {
- public:
- enum Laws
- {
- transitivity,
- asymmetry,
- irreflexivity,
- Laws_size
- };
-
- StrictWeakOrderValidater() {setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- _lawChoice[transitivity] = 33;
- _lawChoice[asymmetry] = 33;
- _lawChoice[irreflexivity] = 34;
- _lawChoice.init();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case transitivity: return new LawValidater<Transitivity <Type, Relation >, RandomGentor >;
- case asymmetry: return new LawValidater<Asymmetry<Type, Relation >, RandomGentor >;
- case irreflexivity: return new LawValidater<Irreflexivity<Type, Relation >, 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 algebra_validater
-
-
- // ------------------------------------------------------------------------
-
- template <typename Type, template<class>class Relation, template<class>class Equality = itl::std_equal>
- class PartialOrderValidater : public algebra_validater
- {
- public:
- enum Laws
- {
- transitivity,
- antisymmetry,
- reflexivity,
- Laws_size
- };
-
- PartialOrderValidater() {setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- _lawChoice[transitivity] = 33;
- _lawChoice[antisymmetry] = 33;
- _lawChoice[reflexivity] = 34;
- _lawChoice.init();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case transitivity: return new LawValidater<Transitivity<Type, Relation>, RandomGentor>;
- case antisymmetry: return new LawValidater<Antisymmetry<Type, Relation, Equality>, RandomGentor>;
- case reflexivity: return new LawValidater<Reflexivity <Type, Relation>, 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;
- };
-
-
- // ------------------------------------------------------------------------
- // Monoids
- // ------------------------------------------------------------------------
- /*JODO currently not used, incomplete.
- template <typename Type>
- class InplaceCommutativeMonoidValidater : public algebra_validater
- {
- public:
- enum Laws
- {
- inplacePlusAssociativity, // EA semigroup
- inplacePlusNeutrality, // EAN monoid
- inplacePlusCommutativity, // EANC commutative monoid
- Laws_size
- };
-
- InplaceCommutativeMonoidValidater(){setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- _lawChoice[inplacePlusAssociativity] = 33;
- _lawChoice[inplacePlusNeutrality] = 33;
- _lawChoice[inplacePlusCommutativity] = 34;
- _lawChoice.init();
- }
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality<Type>, RandomGentor>;
- case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type>, RandomGentor>;
- case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type>, RandomGentor>;
- default: return NULL;
- }
- }
-
- void validate()
- {
- _validater = chooseValidater();
- _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;
- };
- */
-
-
- template <typename Type>
- class InplaceSetBaseValidater : public algebra_validater
- {
- public:
- typedef StrictWeakOrderValidater<Type, std::less> LessValidaterT;
- typedef PartialOrderValidater<Type, std::less_equal> LessEqualValidaterT;
- typedef PartialOrderValidater<Type, itl::sub_super_set, itl::element_equal> ContainedInValidaterT;
-
- enum Laws
- {
- strictWeakStdOrder,
- partialStdOrder,
- containedInOrder,
- inplacePlusAssociativity,
- inplacePlusNeutrality,
- inplacePlusCommutativity,
- inplaceEtAssociativity,
- inplaceEtCommutativity,
- Laws_size
- };
-
- InplaceSetBaseValidater() {setProfile();}
-
- 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(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();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case strictWeakStdOrder: return _lessValidater.chooseValidater();
- case partialStdOrder: return _lessEqualValidater.chooseValidater();
- case containedInOrder: return _containedInValidater.chooseValidater();
- 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 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;
- }
- }
-
- 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;
-
- LessValidaterT _lessValidater;
- LessEqualValidaterT _lessEqualValidater;
- ContainedInValidaterT _containedInValidater;
- };
-
-
- template <typename Type>
- class InplaceSetValidater : public InplaceSetBaseValidater<Type>
- {
- public:
- enum Laws
- {
- inplaceSetBaseLaws,
- inplaceSymmetricDifference,
- inplaceFlip,
- inplaceNaturalInversion,
- inplacePlusDistributivity,
- inplaceEtDistributivity,
- inplacePlusDashRightDistrib,
- inplaceEtDashRightDistrib,
- inplacePlusDeMorgan,
- inplaceEtDeMorgan,
- Laws_size
- };
-
- InplaceSetValidater() {setProfile();}
-
- void setProfile()
- {
- const int weight = 6;
- const int law_count = 9;
- const int base_weight = 100 - weight*law_count;
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- _lawChoice[inplaceSetBaseLaws] = base_weight;
- _lawChoice[inplaceSymmetricDifference] = weight;
- _lawChoice[inplaceFlip] = weight;
- _lawChoice[inplaceNaturalInversion] = weight;
- _lawChoice[inplacePlusDistributivity] = weight;
- _lawChoice[inplaceEtDistributivity] = weight;
- _lawChoice[inplacePlusDashRightDistrib] = weight;
- _lawChoice[inplaceEtDashRightDistrib] = weight;
- _lawChoice[inplacePlusDeMorgan] = weight;
- _lawChoice[inplaceEtDeMorgan] = weight;
- _lawChoice.init();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- int lawChoice = _lawChoice.some();
- if(itl::is_map<Type>::value)
- return chooseMapValidater(lawChoice);
- else
- return chooseSetValidater(lawChoice);
- }
-
- LawValidaterI* chooseMapValidater(int lawChoice)
- {
- switch(lawChoice)
- {
- case inplaceSetBaseLaws: return InplaceSetBaseValidater<Type>::chooseValidater();
- case inplaceSymmetricDifference: return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
- case inplaceFlip: return new LawValidater<InplaceFlip<Type>, RandomGentor>;
-
- case inplaceNaturalInversion:
- if( itl::is_map<Type>::value && itl::is_set<typename Type::codomain_type>::value
- && !absorbs_neutrons<Type>::value && !is_total<Type>::value)
- return new
- mpl::if_<mpl::bool_<is_map<Type>::value>,
- LawValidater<InplaceNaturalInversion<Type, inplace_plus, protonic_equal>, RandomGentor>,
- LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal>, RandomGentor> >::type;
- else
- return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal>, RandomGentor>;
-
- case inplacePlusDistributivity:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
- return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::element_equal>, RandomGentor>;
- else
- return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
-
- 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>;
- else
- return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, std_equal>, RandomGentor>;
-
- case inplacePlusDashRightDistrib:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value
- && absorbs_neutrons<Type>::value && !is_total<Type>::value)
- return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, element_equal>, RandomGentor>;
- else
- return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal>, RandomGentor>;
-
- 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 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>;
- else
- return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::std_equal>, RandomGentor>;
-
- default: return NULL;
- }
- }
-
-
- LawValidaterI* chooseSetValidater(int lawChoice)
- {
- switch(lawChoice)
- {
- case inplaceSetBaseLaws: return InplaceSetBaseValidater<Type>::chooseValidater();
- case inplaceSymmetricDifference: return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
- case inplaceFlip: return new LawValidater<InplaceFlip<Type>, RandomGentor>;
- case inplaceNaturalInversion: return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal>, RandomGentor>;
-
- case inplacePlusDistributivity:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
- return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::element_equal>, RandomGentor>;
- else
- return new LawValidater<InplaceDistributivity<Type, inplace_plus, inplace_et, itl::std_equal>, RandomGentor>;
-
- 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
- return new LawValidater<InplaceDistributivity<Type, inplace_et, inplace_plus, std_equal>, RandomGentor>;
-
- case inplacePlusDashRightDistrib:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
- return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, element_equal>, RandomGentor>;
- else
- return new LawValidater<InplaceRightDistributivity<Type, inplace_plus, inplace_minus, std_equal>, RandomGentor>;
-
- 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 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>;
- else
- return new LawValidater<InplaceDeMorgan<Type, inplace_et, inplace_plus, itl::std_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;
- };
-
-
-
- template <typename Type>
- class InplaceMapValidater :
- public
- mpl::if_
- <
- mpl::bool_<itl::is_set<typename Type::codomain_type>::value>,
- InplaceSetValidater<Type>,
- InplaceSetBaseValidater<Type>
- >
- ::type
- {
- public:
- typedef
- typename mpl::if_
- <
- mpl::bool_<itl::is_set<typename Type::codomain_type>::value>,
- InplaceSetValidater<Type>,
- InplaceSetBaseValidater<Type>
- >
- ::type
- SetValidaterT;
- public:
- enum Laws
- {
- inplaceSetBaseLaws,
- inplaceSymmetricDifference,
- inplaceFlip,
- inplaceNaturalInversion,
- inplaceInverseExistence,
- sectionAbsorbtion,
- Laws_size
- };
-
- InplaceMapValidater() {setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
-
- if(is_set<typename Type::codomain_type>::value)
- {
- _lawChoice[inplaceSetBaseLaws] = 95;
- _lawChoice[inplaceSymmetricDifference] = 0; // Is validated in base class
- _lawChoice[inplaceFlip] = 0; // Is validated in base class
- _lawChoice[inplaceNaturalInversion] = 0; // Is validated in base class
- _lawChoice[inplaceInverseExistence] = 0; // Is not valid for sets
- _lawChoice[sectionAbsorbtion] = 5;
- }
- else if(!is_total<Type>::value)
- {
- //JODO A map of group values that does not emit neutrons always has a symmetric difference
- BOOST_ASSERT(Type::has_symmetric_difference());
- _lawChoice[inplaceSetBaseLaws] = 80;
- _lawChoice[inplaceSymmetricDifference] = 5;
- _lawChoice[inplaceFlip] = 5;
- _lawChoice[inplaceNaturalInversion] = 5;
- _lawChoice[inplaceInverseExistence] = 0;
- _lawChoice[sectionAbsorbtion] = 5;
- }
- else // !is_set && is_total //JODO && is_abelian_group<Type::value>
- {
- _lawChoice[inplaceSetBaseLaws] = 80;
- _lawChoice[inplaceSymmetricDifference] = 4;
- _lawChoice[inplaceFlip] = 4;
- _lawChoice[inplaceNaturalInversion] = 4;
- _lawChoice[inplaceInverseExistence] = 4;
- _lawChoice[sectionAbsorbtion] = 4;
- }
- _lawChoice.init();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case inplaceSetBaseLaws:
- return SetValidaterT::chooseValidater();
- case inplaceSymmetricDifference:
- return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
- case inplaceFlip:
- return new LawValidater<InplaceFlip<Type>, RandomGentor>;
-
- case inplaceNaturalInversion:
- if(is_map<Type>::value && !absorbs_neutrons<Type>::value)
- return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, protonic_equal>, RandomGentor >;
- else
- return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal>, RandomGentor >;
-
- case inplaceInverseExistence:
- if(is_map<Type>::value && !absorbs_neutrons<Type>::value)
- return new LawValidater<InplaceInverseExistence<Type, inplace_plus, protonic_equal>, RandomGentor >;
- else
- return new LawValidater<InplaceInverseExistence<Type, inplace_plus, std_equal>, RandomGentor >;
-
- case sectionAbsorbtion:
- if(is_map<Type>::value && !absorbs_neutrons<Type>::value)
- return new LawValidater<SectionAbsorbtion<Type,protonic_equal>, RandomGentor>;
- else
- return new LawValidater<SectionAbsorbtion<Type,std_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;
- };
-
-
-
- template <typename Type>
- class IntervalMorphicValidater : public algebra_validater
- {
- public:
- enum Laws
- {
- atomize_plus,
- atomize_minus,
- atomize_star,
- cluster_plus,
- cluster_minus,
- cluster_star,
- atomize_insert,
- atomize_erase,
- cluster_insert,
- cluster_erase,
- join_plus,
- absorb_plus,
- Laws_size
- };
-
- IntervalMorphicValidater() {setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- _lawChoice[atomize_plus] = 10;
- _lawChoice[atomize_minus] = 5;
- _lawChoice[atomize_star] = 5;
- _lawChoice[cluster_plus] = 10;
- _lawChoice[cluster_minus] = 5;
- _lawChoice[cluster_star] = 5;
- _lawChoice[atomize_insert] = 10;
- _lawChoice[atomize_erase] = 10;
- _lawChoice[cluster_insert] = 10;
- _lawChoice[cluster_erase] = 20;
- _lawChoice[join_plus] = 10;
- _lawChoice[absorb_plus] = 0;
- _lawChoice.init();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- 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 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 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>();
- case cluster_erase: return new LawValidater<BinaryPushout<typename Type::atomized_type, Type, Interval::Cluster, eraser>, RandomGentor>();
- case join_plus: return new LawValidater<BinaryPushout<Type, typename Type::joint_type, Interval::Join, inplace_plus>, RandomGentor>();
- //JODO absorb_plus holds for interval_map. For split_interval_map element_equal has to be used as equality-relation.
- //case absorb_plus: return new LawValidater<BinaryPushout<Type, typename Type::partial_absorber_type, Interval::AbsorbNeutrons, inplace_plus>, RandomGentor>();
- //JODO doc: violated: inverse required: case absorb_minus: return new LawValidater<BinaryPushout<Type, typename Type::partial_absorber_type, Interval::AbsorbNeutrons, inplace_minus>, 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;
- };
-
-
- template <typename Type>
- class IntervalSetValidater : public InplaceSetValidater<Type>
- {
- public:
- enum Laws
- {
- inplaceSetLaws,
- homomorphismLaws,
- Laws_size
- };
-
- IntervalSetValidater() {setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- const bool morphism_exists = !is_continuous<typename Type::domain_type>::value;
- const int morphism_share = 15;
- _lawChoice[inplaceSetLaws] = morphism_exists ? 100 - morphism_share : 100;
- _lawChoice[homomorphismLaws] = 100 - _lawChoice[inplaceSetLaws];
- _lawChoice.init();
- }
-
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case inplaceSetLaws: return InplaceSetValidater<Type>::chooseValidater();
- case homomorphismLaws: return _morphicValidater.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:
- IntervalMorphicValidater<Type> _morphicValidater;
-
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
- };
-
-
- template <typename Type>
- class IntervalMapValidater : public InplaceMapValidater<Type>
- {
- public:
- enum Laws
- {
- inplaceMapLaws,
- homomorphismLaws,
- Laws_size
- };
-
- IntervalMapValidater() {setProfile();}
-
- void setProfile()
- {
- _lawChoice.setSize(Laws_size);
- _lawChoice.setMaxWeights(100);
- const bool morphism_exists = !is_continuous<typename Type::domain_type>::value;
- const int morphism_share = 30;
- _lawChoice[inplaceMapLaws]= morphism_exists ? 100 - morphism_share : 100;
- _lawChoice[homomorphismLaws] = 100 - _lawChoice[inplaceMapLaws];
- _lawChoice.init();
- }
-
- bool hasValidProfile()
- {
- }
-
- LawValidaterI* chooseValidater()
- {
- switch(_lawChoice.some())
- {
- case inplaceMapLaws: return InplaceMapValidater<Type>::chooseValidater();
- case homomorphismLaws: return _morphicValidater.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:
- IntervalMorphicValidater<Type> _morphicValidater;
-
- ChoiceT _lawChoice;
- LawValidaterI* _validater;
- ValidationCounterT _frequencies;
- ViolationCounterT _violationsCount;
- ViolationMapT _violations;
- };
-
-
-}} // namespace itl boost
-
-#endif //__DOOMED
-

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 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -17,7 +17,7 @@
 #include <boost/itl/interval_morphism.hpp>
 #include <boost/validate/laws/set_laws.hpp>
 #include <boost/validate/laws/order.hpp>
-#include <boost/validate/laws/pushouts.h>
+#include <boost/validate/laws/pushouts.hpp>
 #include <boost/validate/validater/law_validater.hpp>
 #include <boost/validate/validater/algebra_validater.hpp>
 

Modified: sandbox/itl/boost/validate/validater/law_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/law_validater.hpp (original)
+++ sandbox/itl/boost/validate/validater/law_validater.hpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -14,10 +14,10 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/gentor/randomgentor.h>
+#include <boost/validate/gentor/randomgentor.hpp>
 
 #include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/lawviolations.h>
+#include <boost/validate/laws/law_violations.hpp>
 
 namespace boost{namespace itl
 {

Modified: sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -13,8 +13,8 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
 
 #include <boost/itl/interval_set.hpp>
 #include <boost/itl_xt/numbergentor.hpp>

Modified: sandbox/itl/libs/validate/example/labat_itv_map_groupig/labat_itv_map_groupig.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_itv_map_groupig/labat_itv_map_groupig.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_itv_map_groupig/labat_itv_map_groupig.cpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -17,8 +17,8 @@
 #include <boost/itl/map.hpp>
 #include <boost/validate/validater/law_validater.hpp>
 #include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
 
 #include <boost/validate/itv_map_groupig_validater.hpp>
 #include <boost/itl/interval_set.hpp>

Modified: sandbox/itl/libs/validate/example/labat_itv_map_settic/labat_itv_map_settic.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_itv_map_settic/labat_itv_map_settic.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_itv_map_settic/labat_itv_map_settic.cpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -17,8 +17,8 @@
 #include <boost/itl/map.hpp>
 #include <boost/validate/validater/law_validater.hpp>
 #include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
 
 #include <boost/validate/itv_map_settic_validater.hpp>
 #include <boost/itl/interval_set.hpp>

Modified: sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -17,8 +17,8 @@
 #include <boost/itl/map.hpp>
 #include <boost/validate/validater/law_validater.hpp>
 #include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
 
 #include <boost/validate/itv_set_validater.hpp>
 #include <boost/itl/interval_set.hpp>

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-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -10,22 +10,14 @@
 #include <iostream>
 #include <stdio.h>
 
-#include <boost/itl/ptime.hpp> //CL (4 a quick test only)
+#include <boost/itl/ptime.hpp>
 
-#include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
 #include <boost/validate/validater/law_validater.hpp>
-#include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/laws/element_order.hpp>
-#include <boost/validate/laws/subset_order.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
-
-#include <boost/validate/single_law_validater.hpp>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.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;

Modified: sandbox/itl/libs/validate/example/labatea/labatea.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labatea/labatea.cpp (original)
+++ sandbox/itl/libs/validate/example/labatea/labatea.cpp 2009-02-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -17,8 +17,8 @@
 #include <boost/itl/map.hpp>
 #include <boost/validate/validater/law_validater.hpp>
 #include <boost/validate/laws/monoid.hpp>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
+#include <boost/validate/gentor/rangegentor.hpp>
 
 //#include <boost/validate/typevalidater.h>
 #include <boost/validate/realmvalidater.h>

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-10 11:53:03 EST (Tue, 10 Feb 2009)
@@ -7,7 +7,7 @@
       (See accompanying file LICENCE.txt or copy at
            http://www.boost.org/LICENSE_1_0.txt)
 +----------------------------------------------------------------------------*/
-#include <boost/validate/gentor/gentorprofile.h>
+#include <boost/validate/gentor/gentorprofile.hpp>
 
 using namespace boost::itl;
 


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