Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51180 - in sandbox/itl: boost/itl boost/itl_xt boost/validate boost/validate/driver boost/validate/gentor boost/validate/laws boost/validate/type boost/validate/validater libs/itl/build/win32 libs/itl/doc libs/itl/test/test_casual libs/itl_xt/test/meta_functors libs/validate/example/labat_collector libs/validate/example/labat_itl_morphic libs/validate/example/labat_itl_order libs/validate/example/labat_itl_set libs/validate/example/labat_itv_map_groupig libs/validate/example/labat_itv_map_settic libs/validate/example/labat_itv_set libs/validate/example/labat_signed_quantifier libs/validate/example/labat_single libs/validate/example/labat_unsigned_quantifier libs/validate/example/labat_val_relations libs/validate/example/labat_val_setbase libs/validate/example/labatea libs/validate/src/gentor
From: afojgo_at_[hidden]
Date: 2009-02-10 09:44:06


Author: jofaber
Date: 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
New Revision: 51180
URL: http://svn.boost.org/trac/boost/changeset/51180

Log:
Refactored. Refactored labatea, added new smaller and faster compiling validation drivers.
Compiles {msvc-9.0}

Added:
   sandbox/itl/boost/validate/driver/
   sandbox/itl/boost/validate/driver/collector_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/itl_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/itl_morphic_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/itl_order_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/itl_set_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/itl_single_law_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/signed_quantifier_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/driver/unsigned_quantifier_driver.hpp (contents, props changed)
   sandbox/itl/boost/validate/laws/inversion_laws.hpp (contents, props changed)
   sandbox/itl/boost/validate/laws/map_laws.hpp (contents, props changed)
   sandbox/itl/boost/validate/laws/monoid.hpp (contents, props changed)
   sandbox/itl/boost/validate/laws/set_laws.hpp (contents, props changed)
   sandbox/itl/boost/validate/laws/symmetric_difference.hpp (contents, props changed)
   sandbox/itl/boost/validate/type/
   sandbox/itl/boost/validate/type/nat.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/algebra_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/collector_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/itl_order_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/itl_set_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/law_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/partial_order_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_collector/
   sandbox/itl/libs/validate/example/labat_collector/labat_collector.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_collector/vc9_labat_collector.vcproj (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itl_morphic/
   sandbox/itl/libs/validate/example/labat_itl_morphic/labat_itl_morphic.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itl_order/
   sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itl_order/vc9_labat_itl_order.vcproj (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itl_set/
   sandbox/itl/libs/validate/example/labat_itl_set/labat_itl_set.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itl_set/vc9_labat_itl_set.vcproj (contents, props changed)
   sandbox/itl/libs/validate/example/labat_signed_quantifier/
   sandbox/itl/libs/validate/example/labat_signed_quantifier/labat_signed_quantifier.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_signed_quantifier/vc9_labat_signed_quantifier.vcproj (contents, props changed)
   sandbox/itl/libs/validate/example/labat_unsigned_quantifier/
   sandbox/itl/libs/validate/example/labat_unsigned_quantifier/labat_unsigned_quantifier.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_unsigned_quantifier/vc9_labat_unsigned_quantifier.vcproj (contents, props changed)
Text files modified:
   sandbox/itl/boost/itl/interval_base_map.hpp | 2
   sandbox/itl/boost/itl/map.hpp | 4
   sandbox/itl/boost/itl/notate.hpp | 2
   sandbox/itl/boost/itl_xt/numbergentor.hpp | 5
   sandbox/itl/boost/validate/algebra_validater.hpp | 14 +
   sandbox/itl/boost/validate/gentor/gentorprofile.h | 1
   sandbox/itl/boost/validate/gentor/rangegentor.h | 1
   sandbox/itl/boost/validate/itl_relations_validater.hpp | 6
   sandbox/itl/boost/validate/itl_setbase_validater.hpp | 6
   sandbox/itl/boost/validate/itl_validater.hpp | 10
   sandbox/itl/boost/validate/itv_map_groupig_validater.hpp | 33 ++--
   sandbox/itl/boost/validate/itv_map_settic_validater.hpp | 6
   sandbox/itl/boost/validate/itv_set_validater.hpp | 6
   sandbox/itl/boost/validate/laws/monoid.h | 1
   sandbox/itl/boost/validate/laws/set_laws.h | 280 ----------------------------------------
   sandbox/itl/boost/validate/lawvalidater.h | 2
   sandbox/itl/boost/validate/realmvalidater.h | 6
   sandbox/itl/boost/validate/single_law_validater.hpp | 8
   sandbox/itl/boost/validate/typevalidater.h | 20 +-
   sandbox/itl/boost/validate/utility.hpp | 7 +
   sandbox/itl/boost/validate/validater/itl_induced_relations.hpp | 7
   sandbox/itl/libs/itl/build/win32/vc9_all.sln | 66 +++++----
   sandbox/itl/libs/itl/doc/semantics.qbk | 140 +++++++++++++------
   sandbox/itl/libs/itl/test/test_casual/test_casual.cpp | 17 +-
   sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp | 1
   sandbox/itl/libs/validate/example/labat_itv_map_groupig/labat_itv_map_groupig.cpp | 4
   sandbox/itl/libs/validate/example/labat_itv_map_groupig/vc9_labat_itv_map_groupig.vcproj | 8
   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 | 12 +
   sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp | 17 --
   sandbox/itl/libs/validate/example/labat_val_setbase/labat_val_setbase.cpp | 15 --
   sandbox/itl/libs/validate/example/labatea/labatea.cpp | 4
   sandbox/itl/libs/validate/src/gentor/gentorprofile.cpp | 28 ++--
   34 files changed, 262 insertions(+), 485 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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -484,7 +484,7 @@
     */
     SubType& subtract(const value_type& x)
     {
- if(Traits::is_total && !is_set<codomain_type>::value)
+ if(Traits::is_total && has_inverse<codomain_type>::value) //CL !is_set<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 09:44:00 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 && !is_set<codomain_type>::value)
+ if(Traits::is_total && has_inverse<codomain_type>::value) //CL !is_set<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 && !is_set<typename ObjectT::codomain_type>::value)
+ if(Traits::is_total && has_inverse<ObjectT::codomain_type>::value) //CL !is_set<typename ObjectT::codomain_type>::value)
             const_FORALL(typename ObjectT, it_, operand)
                                 object.template add<ObjectT::inverse_codomain_combine>(*it_);
         else Set::subtract(object, operand);

Modified: sandbox/itl/boost/itl/notate.hpp
==============================================================================
--- sandbox/itl/boost/itl/notate.hpp (original)
+++ sandbox/itl/boost/itl/notate.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -129,8 +129,6 @@
 //------------------------------------------------------------------------------
 namespace boost{namespace itl
 {
- typedef unsigned int nat;
-
         namespace comparison
         {
                 static const int less = -1;

Modified: sandbox/itl/boost/itl_xt/numbergentor.hpp
==============================================================================
--- sandbox/itl/boost/itl_xt/numbergentor.hpp (original)
+++ sandbox/itl/boost/itl_xt/numbergentor.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -35,6 +35,7 @@
 
 #include <stdlib.h>
 #include <vector>
+#include <boost/validate/type/nat.hpp>
 #include <boost/itl/type_traits/unon.hpp>
 #include <boost/itl_xt/gentorit.hpp>
 
@@ -66,9 +67,9 @@
 }
 
 template <class NumTV>
-inline NumTV rnd_within(NumTV lwb, NumTV exclusive_upb)
+inline NumTV rnd_within(NumTV lwb, NumTV upb)
 {
- NumTV some = (NumTV)RND_WITHIN(lwb,exclusive_upb);
+ NumTV some = (NumTV)RND_WITHIN(lwb,upb);
     return some;
 }
 

Modified: sandbox/itl/boost/validate/algebra_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/algebra_validater.hpp (original)
+++ sandbox/itl/boost/validate/algebra_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -11,7 +11,7 @@
 
 #include <boost/itl/type_traits/is_continuous.hpp>
 #include <boost/itl/functors.hpp>
-#include <boost/validate/lawvalidater.h>
+#include <boost/validate/validater/law_validater.hpp>
 
 namespace boost{namespace itl
 {
@@ -30,7 +30,19 @@
         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
 

Added: sandbox/itl/boost/validate/driver/collector_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/collector_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,142 @@
+/*----------------------------------------------------------------------------+
+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/collector_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class collector_driver : public itl_driver
+ {
+ public:
+ collector_driver() { 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("collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("collector_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("collector_driver::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 collector_validater<itl::map<int,itl::set<int> > >;
+ case NeutronHandlerType::partial_enricher: return new collector_validater<itl::map<int,itl::set<int>,partial_enricher> >;
+ //case NeutronHandlerType::total_absorber : return new collector_validater<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 collector_validater<interval_map<int,itl::set<int> > >;
+ case NeutronHandlerType::partial_enricher: return new collector_validater<interval_map<int,itl::set<int>,partial_enricher> >;
+ //case NeutronHandlerType::total_absorber : return new collector_validater<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 collector_validater<split_interval_map<int,itl::set<int> > >;
+ case NeutronHandlerType::partial_enricher: return new collector_validater<split_interval_map<int,itl::set<int>,partial_enricher> >;
+ //case NeutronHandlerType::total_absorber : return new collector_validater<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
+

Added: sandbox/itl/boost/validate/driver/itl_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/itl_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,190 @@
+/*----------------------------------------------------------------------------+
+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_driver
+ {
+ 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
+

Added: sandbox/itl/boost/validate/driver/itl_morphic_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/itl_morphic_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,141 @@
+/*----------------------------------------------------------------------------+
+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/driver/itl_driver.hpp>
+#include <boost/validate/validater/interval_morphic_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+class itl_morphic_driver : public itl_driver
+{
+public:
+ itl_morphic_driver() { setProfile(); }
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 20;
+ _rootChoice[RootType::separate_interval_set] = 20;
+ _rootChoice[RootType::split_interval_set] = 20;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 20;
+ _rootChoice[RootType::split_interval_map] = 20;
+ 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] = 33;
+ _codomainChoice[CodomainType::Int] = 33;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 34;
+ 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("itl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("itl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("itl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("itl_morphic_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ algebra_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ int neutronizerChoice = _neutronizerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ // Sets
+ //-----------------------------------------------------------------
+ case RootType::interval_set: return new interval_morphic_validater<interval_set<int> >;
+ case RootType::separate_interval_set: return new interval_morphic_validater<separate_interval_set<int> >;
+ case RootType::split_interval_set: return new interval_morphic_validater<split_interval_set<int> >;
+ //-----------------------------------------------------------------
+ // Maps
+ //-----------------------------------------------------------------
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(neutronizerChoice) {
+ NEURONIZER_CASES(interval_morphic_validater, split_interval_map, int, int)
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"),
+ neutronizerChoice, _neutronizerChoice);
+ }
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(neutronizerChoice) {
+ NEURONIZER_CASES(interval_morphic_validater, interval_map, int, int)
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ }
+ default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch(rootChoice)
+
+ return NULL; //just to please the compiler ;)
+ }
+
+};
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/driver/itl_order_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/itl_order_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,221 @@
+/*----------------------------------------------------------------------------+
+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/utility.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
+#include <boost/validate/validater/itl_order_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+ class itl_order_driver : public itl_driver
+ {
+ public:
+ itl_order_driver() { 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::Nat] = 0;
+ _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("itl_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("itl_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("itl_order_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("itl_order_driver::setProfile()") << std::endl;
+ }
+
+ }
+
+ algebra_validater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ int neutronizerChoice = _neutronizerChoice.some();
+
+ switch(rootChoice)
+ {
+ //-----------------------------------------------------------------
+ // Sets
+ //-----------------------------------------------------------------
+ case RootType::itl_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_order_validater<itl::set<int> >;
+ case DomainType::Double: return new itl_order_validater<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 itl_order_validater<interval_set<int> >;
+ case DomainType::Double: return new itl_order_validater<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 itl_order_validater<separate_interval_set<int> >;
+ case DomainType::Double: return new itl_order_validater<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 itl_order_validater<split_interval_set<int> >;
+ case DomainType::Double: return new itl_order_validater<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::Nat: return new itl_order_validater<itl::map<int,nat,total_enricher> >;
+ case CodomainType::Int: return new itl_order_validater<itl::map<int,int,partial_absorber> >;
+ case CodomainType::set_int: return new itl_order_validater<itl::map<int,itl::set<int>,partial_enricher> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::itl_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }//switch codomain
+
+ case DomainType::Double:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new itl_order_validater<itl::map<double,nat,partial_enricher> >;
+ case CodomainType::Int: return new itl_order_validater<itl::map<double,int,total_absorber> >;
+ case CodomainType::set_int: return new itl_order_validater<itl::map<double,itl::set<int>,partial_absorber> >;
+ 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::Nat: return new itl_order_validater<interval_map<int,nat,partial_absorber> >;
+ case CodomainType::Int: return new itl_order_validater<interval_map<int,int,total_enricher> >;
+ case CodomainType::set_int: return new itl_order_validater<interval_map<int,itl::set<int>,total_absorber> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::interval_map: codomainChoice:\n"),
+ codomainChoice, _codomainChoice);
+ }// switch codomain
+ case DomainType::Double:
+ switch(codomainChoice) {
+ case CodomainType::Nat: return new itl_order_validater<interval_map<double,nat,total_absorber> >;
+ case CodomainType::Int: return new itl_order_validater<interval_map<double,int,partial_enricher> >;
+ case CodomainType::set_int: return new itl_order_validater<interval_map<double,itl::set<int>,total_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::Nat: return new itl_order_validater<split_interval_map<int,nat,total_enricher> >;
+ case CodomainType::Int: return new itl_order_validater<split_interval_map<int,int,partial_absorber> >;
+ case CodomainType::set_int: return new itl_order_validater<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::Nat: return new itl_order_validater<split_interval_map<double,nat,partial_enricher> >;
+ case CodomainType::Int: return new itl_order_validater<split_interval_map<double,int,total_absorber> >;
+ case CodomainType::set_int: return new itl_order_validater<split_interval_map<double,itl::set<int>,partial_absorber> >;
+ 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
+

Added: sandbox/itl/boost/validate/driver/itl_set_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/itl_set_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,144 @@
+/*----------------------------------------------------------------------------+
+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/validater/itl_set_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class itl_set_driver : public itl_driver
+ {
+ public:
+ itl_set_driver() { 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("itl_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("itl_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("itl_set_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("itl_set_driver::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 itl_set_validater<itl::set<int> >;
+ case DomainType::Double: return new itl_set_validater<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 itl_set_validater<interval_set<int> >;
+ case DomainType::Double: return new itl_set_validater<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 itl_set_validater<separate_interval_set<int> >;
+ case DomainType::Double: return new itl_set_validater<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 itl_set_validater<split_interval_set<int> >;
+ case DomainType::Double: return new itl_set_validater<split_interval_set<double> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ return NULL; //just to please the compiler ;)
+ }
+
+ };
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/driver/itl_single_law_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/itl_single_law_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,174 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#pragma once
+
+#include <iostream>
+#include <stdio.h>
+#include <time.h>
+#include <boost/validate/typevalidater.h>
+#include <boost/validate/validater/itl_induced_relations.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ template<class Law>
+ class itl_single_law_driver : public itl_driver
+ {
+ public:
+ itl_single_law_driver() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 10;
+ _rootChoice[RootType::separate_interval_set] = 10;
+ _rootChoice[RootType::split_interval_set] = 10;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 35;
+ _rootChoice[RootType::split_interval_map] = 35;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0; //NOTE: induced relations only
+ setDomainTypeNames(); // work for integral DomainType, because
+ _domainChoice.init(); // atomized_type needs to be finite.
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::partial_absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::partial_enricher] = 25;
+ _neutronizerChoice[NeutronHandlerType::total_absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::total_enricher] = 25;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("itl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("itl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("itl_single_law_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("itl_single_law_driver::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::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_induced_relations_validater<interval_set<int> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_induced_relations_validater<separate_interval_set<int> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new itl_induced_relations_validater<split_interval_set<int> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(neutronizerChoice) {
+ case NeutronHandlerType::partial_absorber:
+ return new itl_induced_relations_validater<split_interval_map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher:
+ return new itl_induced_relations_validater<split_interval_map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber:
+ return new itl_induced_relations_validater<split_interval_map<int,int,total_absorber> >;
+ case NeutronHandlerType::total_enricher:
+ return new itl_induced_relations_validater<split_interval_map<int,int,total_enricher> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"),
+ neutronizerChoice, _neutronizerChoice);
+ }
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_map: {
+ switch(domainChoice) {
+ case DomainType::Int:
+ switch(neutronizerChoice) {
+ case NeutronHandlerType::partial_absorber:
+ return new itl_induced_relations_validater<interval_map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher:
+ return new itl_induced_relations_validater<interval_map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber:
+ return new itl_induced_relations_validater<interval_map<int,int,total_absorber> >;
+ case NeutronHandlerType::total_enricher:
+ return new itl_induced_relations_validater<interval_map<int,int,total_enricher> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: neutronizerChoice:\n"),
+ neutronizerChoice, _neutronizerChoice);
+ }
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_map: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ default: return choiceError(ITL_LOCATION("rootChoice:\n"), rootChoice, _rootChoice);
+ } //switch()
+
+ return NULL; //just to please the compiler ;)
+ }
+
+ };
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/driver/signed_quantifier_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/signed_quantifier_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,145 @@
+/*----------------------------------------------------------------------------+
+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/validater/signed_quantifier_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class signed_quantifier_driver : public itl_driver
+ {
+ public:
+ signed_quantifier_driver() { 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] = 0;
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::partial_absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::partial_enricher] = 25;
+ _neutronizerChoice[NeutronHandlerType::total_absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::total_enricher] = 25;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("signed_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("signed_quantifier_driver::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 signed_quantifier_validater<itl::map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher: return new signed_quantifier_validater<itl::map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber: return new signed_quantifier_validater<itl::map<int,int,total_absorber > >;
+ case NeutronHandlerType::total_enricher: return new signed_quantifier_validater<itl::map<int,int,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 signed_quantifier_validater<interval_map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher: return new signed_quantifier_validater<interval_map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber: return new signed_quantifier_validater<interval_map<int,int,total_absorber > >;
+ case NeutronHandlerType::total_enricher: return new signed_quantifier_validater<interval_map<int,int,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 signed_quantifier_validater<split_interval_map<int,int,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher: return new signed_quantifier_validater<split_interval_map<int,int,partial_enricher> >;
+ case NeutronHandlerType::total_absorber: return new signed_quantifier_validater<split_interval_map<int,int,total_absorber > >;
+ case NeutronHandlerType::total_enricher: return new signed_quantifier_validater<split_interval_map<int,int,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
+

Added: sandbox/itl/boost/validate/driver/unsigned_quantifier_driver.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/driver/unsigned_quantifier_driver.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,145 @@
+/*----------------------------------------------------------------------------+
+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/validater/unsigned_quantifier_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class unsigned_quantifier_driver : public itl_driver
+ {
+ public:
+ unsigned_quantifier_driver() { 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("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("unsigned_quantifier_driver::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("unsigned_quantifier_driver::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 unsigned_quantifier_validater<itl::map<int,nat,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher: return new unsigned_quantifier_validater<itl::map<int,nat,partial_enricher> >;
+ case NeutronHandlerType::total_absorber: return new unsigned_quantifier_validater<itl::map<int,nat,total_absorber > >;
+ case NeutronHandlerType::total_enricher: return new unsigned_quantifier_validater<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 unsigned_quantifier_validater<interval_map<int,nat,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher: return new unsigned_quantifier_validater<interval_map<int,nat,partial_enricher> >;
+ case NeutronHandlerType::total_absorber: return new unsigned_quantifier_validater<interval_map<int,nat,total_absorber > >;
+ case NeutronHandlerType::total_enricher: return new unsigned_quantifier_validater<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 unsigned_quantifier_validater<split_interval_map<int,nat,partial_absorber> >;
+ case NeutronHandlerType::partial_enricher: return new unsigned_quantifier_validater<split_interval_map<int,nat,partial_enricher> >;
+ case NeutronHandlerType::total_absorber: return new unsigned_quantifier_validater<split_interval_map<int,nat,total_absorber > >;
+ case NeutronHandlerType::total_enricher: return new unsigned_quantifier_validater<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
+

Modified: sandbox/itl/boost/validate/gentor/gentorprofile.h
==============================================================================
--- sandbox/itl/boost/validate/gentor/gentorprofile.h (original)
+++ sandbox/itl/boost/validate/gentor/gentorprofile.h 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -9,6 +9,7 @@
 +----------------------------------------------------------------------------*/
 #pragma once
 
+#include <boost/validate/type/nat.hpp>
 #include <boost/itl/interval.hpp>
 
 namespace boost{namespace itl

Modified: sandbox/itl/boost/validate/gentor/rangegentor.h
==============================================================================
--- sandbox/itl/boost/validate/gentor/rangegentor.h (original)
+++ sandbox/itl/boost/validate/gentor/rangegentor.h 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -33,6 +33,7 @@
 
 #include <boost/itl/interval.hpp>
 #include <boost/itl_xt/gentorit.hpp>
+#include <boost/itl_xt/numbergentor.hpp>
 
 namespace boost{namespace itl
 {

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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -14,13 +14,13 @@
 #include <time.h>
 #include <boost/validate/typevalidater.h>
 #include <boost/validate/validater/itl_induced_relations.hpp>
-#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
 {
     
- class ItlRelationsValidater : public itl_validater
+ class ItlRelationsValidater : public itl_driver
     {
     public:
         ItlRelationsValidater() { setProfile(); }
@@ -92,7 +92,7 @@
         }
 
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();

Modified: sandbox/itl/boost/validate/itl_setbase_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itl_setbase_validater.hpp (original)
+++ sandbox/itl/boost/validate/itl_setbase_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -13,13 +13,13 @@
 #include <stdio.h>
 #include <time.h>
 #include <boost/validate/typevalidater.h>
-#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
 {
     
- class ItlSetBaseValidater : public itl_validater
+ class ItlSetBaseValidater : public itl_driver
     {
     public:
         ItlSetBaseValidater() { setProfile(); }
@@ -91,7 +91,7 @@
         }
 
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();

Modified: sandbox/itl/boost/validate/itl_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itl_validater.hpp (original)
+++ sandbox/itl/boost/validate/itl_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -12,7 +12,7 @@
 #include <iostream>
 #include <stdio.h>
 #include <time.h>
-#include <boost/validate/typevalidater.h>
+#include <boost/validate/validater/algebra_validater.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
@@ -34,7 +34,7 @@
 
     namespace CodomainType
     {
- enum CodomainTypes { Int, Double, set_int, raw_bitset, CodomainTypes_size };
+ enum CodomainTypes { Nat, Int, Double, set_int, raw_bitset, CodomainTypes_size };
     }
 
     namespace NeutronHandlerType
@@ -49,7 +49,7 @@
         bool hasValidProfile()const { return _isValid; }
 
         virtual void setProfile() = 0;
- virtual AlgebraValidater* chooseValidater() = 0;
+ virtual algebra_validater* chooseValidater() = 0;
 
         void validate()
         {
@@ -164,7 +164,7 @@
             _neutronizerChoice.setTypeNames(type_names);
         }
 
- AlgebraValidater* choiceError(const std::string& location, int value, const ChoiceT& choice)
+ algebra_validater* choiceError(const std::string& location, int value, const ChoiceT& choice)
         {
             reportTypeChoiceError(location, value, choice);
             setValid(false);
@@ -178,7 +178,7 @@
         ChoiceT _neutronizerChoice;
 
     private:
- AlgebraValidater* _validater;
+ algebra_validater* _validater;
         ValidationCounterT _frequencies;
         ViolationCounterT _violationsCount;
         ViolationMapT _violations;

Modified: sandbox/itl/boost/validate/itv_map_groupig_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itv_map_groupig_validater.hpp (original)
+++ sandbox/itl/boost/validate/itv_map_groupig_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -13,13 +13,13 @@
 #include <stdio.h>
 #include <time.h>
 #include <boost/validate/typevalidater.h>
-#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
 {
     
- class ItvMapGroupigValidater : public itl_validater
+ class ItvMapGroupigValidater : public itl_driver
     {
     public:
         ItvMapGroupigValidater() { setProfile(); }
@@ -49,7 +49,8 @@
 
             _codomainChoice.setSize(CodomainType::CodomainTypes_size);
             _codomainChoice.setMaxWeights(100);
- _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Nat] = 100;
+ _codomainChoice[CodomainType::Int] = 0;
             _codomainChoice[CodomainType::Double] = 0;
             _codomainChoice[CodomainType::set_int] = 0;
             setCodomainTypeNames();
@@ -91,7 +92,7 @@
         }
 
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();
@@ -103,30 +104,30 @@
             //-----------------------------------------------------------------
             case RootType::itl_map: {
                 switch(neutronizerChoice) {
- case NeutronHandlerType::partial_absorber: return new InplaceMapValidater<itl::map<int,int> >;
- case NeutronHandlerType::partial_enricher: return new InplaceMapValidater<itl::map<int,int,partial_enricher > >;
- case NeutronHandlerType::total_absorber : return new InplaceMapValidater<itl::map<int,int,total_absorber > >;
- case NeutronHandlerType::total_enricher: return new InplaceMapValidater<itl::map<int,int,total_enricher > >;
+ 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,int> >;
- case NeutronHandlerType::partial_enricher: return new IntervalMapValidater<interval_map<int,int,partial_enricher > >;
- case NeutronHandlerType::total_absorber : return new IntervalMapValidater<interval_map<int,int,total_absorber > >;
- case NeutronHandlerType::total_enricher: return new IntervalMapValidater<interval_map<int,int,total_enricher > >;
+ 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,int> >;
- case NeutronHandlerType::partial_enricher: return new IntervalMapValidater<split_interval_map<int,int,partial_enricher > >;
- case NeutronHandlerType::total_absorber : return new IntervalMapValidater<split_interval_map<int,int,total_absorber > >;
- case NeutronHandlerType::total_enricher: return new IntervalMapValidater<split_interval_map<int,int,total_enricher > >;
+ 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

Modified: sandbox/itl/boost/validate/itv_map_settic_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itv_map_settic_validater.hpp (original)
+++ sandbox/itl/boost/validate/itv_map_settic_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -13,13 +13,13 @@
 #include <stdio.h>
 #include <time.h>
 #include <boost/validate/typevalidater.h>
-#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
 {
     
- class ItvMapSetticValidater : public itl_validater
+ class ItvMapSetticValidater : public itl_driver
     {
     public:
         ItvMapSetticValidater() { setProfile(); }
@@ -91,7 +91,7 @@
         }
 
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();

Modified: sandbox/itl/boost/validate/itv_set_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/itv_set_validater.hpp (original)
+++ sandbox/itl/boost/validate/itv_set_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -13,13 +13,13 @@
 #include <stdio.h>
 #include <time.h>
 #include <boost/validate/typevalidater.h>
-#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
 {
     
- class ItvSetValidater : public itl_validater
+ class ItvSetValidater : public itl_driver
     {
     public:
         ItvSetValidater() { setProfile(); }
@@ -91,7 +91,7 @@
         }
 
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();

Added: sandbox/itl/boost/validate/laws/inversion_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/laws/inversion_laws.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,127 @@
+/*----------------------------------------------------------------------------+
+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_inversion_laws_h_JOFA_071124__
+#define __itl_inversion_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 Combiner = inplace_plus,
+ template<class>class Equality = itl::std_equal>
+ class InplaceNaturalInversion
+ : public Law<InplaceNaturalInversion<Type,Combiner,Equality>,
+ LOKI_TYPELIST_1(Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ //a - a == 0
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
+
+ std::string name()const { return "InplaceNaturalInversion"; }
+ std::string formula()const { return "a -= a; a == 0"; }
+
+ std::string typeString()const
+ {
+ return "NaturalInversion<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ InverseCombinerT()(lhs, this->template getInputValue<operand_a>());
+
+ Type rhs = Combiner<Type>::neutron();
+
+ 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>()); }
+ };
+
+
+ template <typename Type,
+ template<class>class Combiner = inplace_plus,
+ template<class>class Equality = itl::std_equal>
+ class InplaceInverseExistence
+ : public Law<InplaceInverseExistence<Type,Combiner,Equality>,
+ LOKI_TYPELIST_1(Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ //(0 - a) + a == 0
+ //computed using inplace operators +=
+ //Input = (a := inVal1, b := inVal2)
+ //Output = (lhs_result, rhs_result)
+
+ public:
+ typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
+
+ std::string name()const { return "InplaceInverseExistence"; }
+ std::string formula()const { return "(0-a) + a == 0"; }
+
+ std::string typeString()const
+ {
+ return "InverseExistence<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Combiner>::apply()+","
+ +unary_template_to_string<Equality>::apply()
+ +">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ Type lhs = Combiner<Type>::neutron();
+ Type value_a = this->template getInputValue<operand_a>();
+ // lhs = (0 - a)
+ InverseCombinerT()(lhs, value_a);
+ // lhs = (0 - a) + a
+ Combiner<Type>()(lhs, value_a);
+
+ Type rhs = Combiner<Type>::neutron();
+
+ 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>()); }
+ };
+
+}} // namespace itl boost
+
+#endif // __itl_inversion_laws_h_JOFA_071124__
+
+

Added: sandbox/itl/boost/validate/laws/map_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/laws/map_laws.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,171 @@
+/*----------------------------------------------------------------------------+
+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_map_laws_hpp_JOFA_071124__
+#define __itl_map_laws_hpp_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 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_map_laws_hpp_JOFA_071124__
+
+

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

Added: sandbox/itl/boost/validate/laws/monoid.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/laws/monoid.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,383 @@
+/*----------------------------------------------------------------------------+
+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_monoid_hpp_JOFA_070411__
+#define __itl_monoid_hpp_JOFA_070411__
+
+#include <boost/itl/type_traits/value_size.hpp>
+#include <boost/itl/functors.hpp>
+#include <boost/itl/predicates.hpp>
+#include <boost/validate/law.h>
+
+namespace boost{namespace itl
+{
+
+ /* Monoid: (M,+,0) with .+.: M x M -> M has these axioms
+ (1) Associativity
+ (2) Neutral element
+ A commutative monoid or abelian monoid has also
+ (3) Commutativity
+ */
+
+ template <typename Type>
+ class AdditionNeutrality
+ : public Law<AdditionNeutrality<Type>, LOKI_TYPELIST_1(Type), LOKI_TYPELIST_1(Type)>
+ {
+ public:
+ std::string name()const { return "Addition Neutrality"; }
+ std::string formula()const { return "a + 0 == 0"; }
+
+ std::string typeString()const
+ {
+ return "Neutrality<"+type_to_string<Type>::apply()+",+,0>";
+ }
+
+ public:
+ bool holds()
+ {
+ Type inVal = this->template getInputValue<0>();
+ Type outVal = inVal + Type();
+ this->template setOutputValue<0>(outVal);
+ return inVal == outVal;
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const;
+
+ void setValue(const Type& inVal) { this->template setInputValue<0>(inVal); }
+ Type getResult()const { return this->template getOutputValue<0>(); }
+ };
+
+ template <> size_t AdditionNeutrality<int>::size()const
+ { return getInputValue<0>(); }
+
+ template <class Type> size_t AdditionNeutrality<Type>::size()const
+ { return this->template getInputValue<0>().size(); };
+
+ template <typename Type>
+ class AdditionCommutativity
+ : public Law<AdditionCommutativity<Type>, LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a + b == b + a
+ Input = (a := inVal1, b := inVal2)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Addition Commutativity"; }
+ std::string formula()const { return "a + b == b + a"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<Type>::apply()+",+>";
+ }
+
+ public:
+ enum InputVarIndex { operand_a, operand_b };
+ enum OutputVarIndex { lhs_sum, rhs_sum };
+
+ void setOperand_a(const Type& inVal) { this->template setInputValue<operand_a>(inVal); }
+ void setOperand_b(const Type& inVal) { this->template setInputValue<operand_b>(inVal); }
+ void setOperands(const Type& inVal_a, const Type& inVal_b)
+ { this->template setInputValue<operand_b>(inVal_a); this->template setInputValue<operand_b>(inVal_b); }
+
+ Type getLhsSum()const { return this->template getOutputValue<lhs_sum>(); }
+ Type getRhsSum()const { return this->template getOutputValue<rhs_sum>(); }
+
+ bool holds()
+ {
+ this->template setOutputValue<lhs_sum>(this->template getInputValue<operand_a>() + this->template getInputValue<operand_b>());
+ this->template setOutputValue<rhs_sum>(this->template getInputValue<operand_b>() + this->template getInputValue<operand_a>());
+ return this->template getOutputValue<lhs_sum>() == this->template getOutputValue<rhs_sum>();
+ }
+
+ 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>());
+ }
+ };
+
+
+ template <typename TypeA, typename TypeB>
+ class MixedAdditionCommutativity
+ : public Law<MixedAdditionCommutativity<TypeA, TypeB>,
+ LOKI_TYPELIST_2(TypeA,TypeB), LOKI_TYPELIST_2(TypeB,TypeB)>
+ {
+ /** a + b == b + a
+ Input = (a := inVal1, b := inVal2)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Mixed Addition Commutativity"; }
+ std::string formula()const { return "a + b == b + a for A a; B b; +: A x B -> B"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<TypeA>::apply()+","
+ +type_to_string<TypeB>::apply()+",+>";
+ }
+
+ public:
+ enum InputVarIndex { operand_a, operand_b };
+ enum OutputVarIndex { lhs_sum, rhs_sum };
+
+ void setOperand_a(const TypeA& inVal) { this->template setInputValue<operand_a>(inVal); }
+ void setOperand_b(const TypeB& inVal) { this->template setInputValue<operand_b>(inVal); }
+ void setOperands(const TypeA& inVal_a, const TypeB& inVal_b)
+ { this->template setInputValue<operand_b>(inVal_a); this->template setInputValue<operand_b>(inVal_b); }
+
+ TypeB getLhsSum()const { return this->template getOutputValue<lhs_sum>(); }
+ TypeB getRhsSum()const { return this->template getOutputValue<rhs_sum>(); }
+
+ bool holds()
+ {
+ this->template setOutputValue<lhs_sum>(this->template getInputValue<operand_a>() + this->template getInputValue<operand_b>());
+ this->template setOutputValue<rhs_sum>(this->template getInputValue<operand_b>() + this->template getInputValue<operand_a>());
+ return this->template getOutputValue<lhs_sum>() == this->template getOutputValue<rhs_sum>();
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ size_t size()const
+ {
+ return value_size<TypeA>::get(this->template getInputValue<operand_a>())+
+ value_size<TypeB>::get(this->template getInputValue<operand_b>());
+ }
+
+ };
+
+
+ // ---------------------------------------------------------------------------
+ // Inplace variant of laws for operator o=
+ // ---------------------------------------------------------------------------
+ //JODO MEMO USENET: Kein Patternmatching auf templateparameter-level! Beispiel
+ // TypeAsString!
+ //template <typename Type, template<class>class Accumulator = inplace_plus, int aux=0>
+ template <typename Type, template<class>class Accumulator = inplace_plus, template<class>class NeutronT = neutron>
+ class InplaceNeutrality
+ : public Law<InplaceNeutrality<Type,Accumulator,NeutronT>,
+ LOKI_TYPELIST_1(Type), LOKI_TYPELIST_1(Type)>
+ {
+ /** a o 0 == a computed as
+ l=a; l o= 0; => l==a
+ Input = (a := inVal1)
+ Output = (lhs_result)
+ */
+ public:
+ std::string name()const { return "Inplace Op Neutrality"; }
+ std::string formula()const { return "a o 0 == a 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Neutrality<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Accumulator>::apply()+","
+ +unary_template_to_string<NeutronT>::apply()+">";
+ }
+
+ public:
+
+ enum InputVarIndex { operand_a, operand_b };
+ enum OutputVarIndex { lhs_result, rhs_result };
+
+ void setOperand_a(const Type& inVal) { this->template setInputValue<operand_a>(inVal); }
+
+ Type getLhsResult()const { return this->template getOutputValue<lhs_result>(); }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>());
+ }
+
+ bool holds()
+ {
+ Type lhs = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lhs, neutron<Type>()());
+ this->template setOutputValue<lhs_result>(lhs);
+ return lhs == this->template getInputValue<operand_a>();
+ }
+
+ bool debug_holds(){ return holds(); }
+
+ };
+
+
+ template <typename Type,
+ template<class>class Accumulator = inplace_plus,
+ template<class>class Equality = itl::std_equal>
+ class InplaceAssociativity
+ : public Law<InplaceAssociativity<Type,Accumulator,Equality>,
+ LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** (a o b) o c == a o (b o c) 'inplace'
+ Input = (a := inVal1, b := inVal2, c := inVal3)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Inplace Associativity"; }
+ std::string formula()const { return "(a o b) o c == a o (b o c) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Associativity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Accumulator>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ enum InputVarIndex { operand_a, operand_b, operand_c };
+ enum OutputVarIndex { lhs_sum, rhs_sum };
+
+ void setOperand_a(const Type& inVal) { this->template setInputValue<operand_a>(inVal); }
+ void setOperand_b(const Type& inVal) { this->template setInputValue<operand_b>(inVal); }
+ void setOperand_c(const Type& inVal) { this->template setInputValue<operand_c>(inVal); }
+ void setOperands(const Type& inVal_a, const Type& inVal_b, const Type& inVal_c)
+ { this->template setInputValue<operand_b>(inVal_a); this->template setInputValue<operand_b>(inVal_b); this->template setInputValue<operand_b>(inVal_c); }
+
+ Type getLhsSum()const { return this->template getOutputValue<lhs_sum>(); }
+ Type getRhsSum()const { return this->template getOutputValue<rhs_sum>(); }
+
+ 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_b>());
+ }
+
+ bool holds()
+ {
+ Type lsum = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lsum, this->template getInputValue<operand_b>());
+ Accumulator<Type>()(lsum, this->template getInputValue<operand_c>());
+
+ Type rsum = this->template getInputValue<operand_a>();
+ Type b_plus_c = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(b_plus_c, this->template getInputValue<operand_c>());
+ Accumulator<Type>()(rsum, b_plus_c);
+
+ this->template setOutputValue<lhs_sum>(lsum);
+ this->template setOutputValue<rhs_sum>(rsum);
+
+ return Equality<Type>()(lsum, rsum);
+ }
+
+ 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;
+ std::cout << "c: " << this->template getInputValue<operand_c>().as_string() << std::endl;
+
+ Type lsum = this->template getInputValue<operand_a>();
+ Accumulator<Type>()(lsum, this->template getInputValue<operand_b>());
+ std::cout << "a o b: " << lsum.as_string() << std::endl;
+
+ Accumulator<Type>()(lsum, this->template getInputValue<operand_c>());
+ std::cout << "(a o b) o c: " << lsum.as_string() << std::endl;
+
+ Type rsum = this->template getInputValue<operand_a>();
+ Type b_plus_c = this->template getInputValue<operand_b>();
+ Accumulator<Type>()(b_plus_c, this->template getInputValue<operand_c>());
+ std::cout << "b o c: " << b_plus_c.as_string() << std::endl;
+ Accumulator<Type>()(rsum, b_plus_c);
+ std::cout << "a o (b o c): " << rsum.as_string() << std::endl;
+
+ this->template setOutputValue<lhs_sum>(lsum);
+ this->template setOutputValue<rhs_sum>(rsum);
+
+ return Equality<Type>()(lsum, rsum);
+ }
+
+ };
+
+
+ template <typename Type, template<class>class Accumulator = inplace_plus>
+ class InplaceCommutativity
+ : public Law<InplaceCommutativity<Type,Accumulator>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a o b == b o a computed as
+ lsum=a; lsum+=b; rsum=b; rsum+=a => lsum==rsum
+ Input = (a := inVal1, b := inVal2)
+ Output = (sum_lhs, sum_rhs)
+ */
+ public:
+ std::string name()const { return "Inplace Commutativity"; }
+ std::string formula()const { return "a o b == b o a 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Commutativity<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Accumulator>::apply()+">";
+ }
+
+ public:
+
+ enum InputVarIndex { operand_a, operand_b };
+ enum OutputVarIndex { lhs_sum, rhs_sum };
+
+ void setOperand_a(const Type& inVal) { this->template setInputValue<operand_a>(inVal); }
+ void setOperand_b(const Type& inVal) { this->template setInputValue<operand_b>(inVal); }
+ void setOperands(const Type& inVal_a, const Type& inVal_b)
+ { this->template setInputValue<operand_b>(inVal_a); this->template setInputValue<operand_b>(inVal_b); }
+
+ Type getLhsSum()const { return this->template getOutputValue<lhs_sum>(); }
+ Type getRhsSum()const { return this->template getOutputValue<rhs_sum>(); }
+
+ size_t size()const
+ {
+ return value_size<Type>::apply(this->template getInputValue<operand_a>())+
+ value_size<Type>::apply(this->template getInputValue<operand_b>());
+ }
+
+ bool holds()
+ {
+ Type lsum = this->template getInputValue<operand_a>();
+ lsum += this->template getInputValue<operand_b>();
+ Type rsum = this->template getInputValue<operand_b>();
+ rsum += this->template getInputValue<operand_a>();
+
+ this->template setOutputValue<lhs_sum>(lsum);
+ this->template setOutputValue<rhs_sum>(rsum);
+
+ return lsum == rsum;
+ }
+
+ 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;
+
+ Type lsum = this->template getInputValue<operand_a>();
+ lsum += this->template getInputValue<operand_b>();
+ std::cout << "a o b: " << lsum.as_string() << std::endl;
+
+ Type rsum = this->template getInputValue<operand_b>();
+ rsum += this->template getInputValue<operand_a>();
+ std::cout << "b o a: " << rsum.as_string() << std::endl;
+
+ this->template setOutputValue<lhs_sum>(lsum);
+ this->template setOutputValue<rhs_sum>(rsum);
+
+ return lsum == rsum;
+ }
+
+ };
+
+}} // namespace itl boost
+
+#endif // __itl_monoid_hpp_JOFA_070411__
+

Modified: sandbox/itl/boost/validate/laws/set_laws.h
==============================================================================
--- sandbox/itl/boost/validate/laws/set_laws.h (original)
+++ sandbox/itl/boost/validate/laws/set_laws.h 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -17,110 +17,6 @@
 namespace boost{namespace itl
 {
 
- template <typename Type,
- template<class>class Combiner = inplace_plus,
- template<class>class Equality = itl::std_equal>
- class InplaceNaturalInversion
- : public Law<InplaceNaturalInversion<Type,Combiner,Equality>,
- LOKI_TYPELIST_1(Type), LOKI_TYPELIST_2(Type,Type)>
- {
- //a - a == 0
- //computed using inplace operators +=
- //Input = (a := inVal1, b := inVal2)
- //Output = (lhs_result, rhs_result)
-
- public:
- typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
-
- std::string name()const { return "InplaceNaturalInversion"; }
- std::string formula()const { return "a -= a; a == 0"; }
-
- std::string typeString()const
- {
- return "NaturalInversion<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Combiner>::apply()+","
- +unary_template_to_string<Equality>::apply()
- +">";
- }
-
- public:
-
- bool holds()
- {
- Type lhs = this->template getInputValue<operand_a>();
- InverseCombinerT()(lhs, this->template getInputValue<operand_a>());
-
- Type rhs = Combiner<Type>::neutron();
-
- 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>()); }
- };
-
-
- template <typename Type,
- template<class>class Combiner = inplace_plus,
- template<class>class Equality = itl::std_equal>
- class InplaceInverseExistence
- : public Law<InplaceInverseExistence<Type,Combiner,Equality>,
- LOKI_TYPELIST_1(Type), LOKI_TYPELIST_2(Type,Type)>
- {
- //(0 - a) + a == 0
- //computed using inplace operators +=
- //Input = (a := inVal1, b := inVal2)
- //Output = (lhs_result, rhs_result)
-
- public:
- typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
-
- std::string name()const { return "InplaceInverseExistence"; }
- std::string formula()const { return "(0-a) + a == 0"; }
-
- std::string typeString()const
- {
- return "InverseExistence<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Combiner>::apply()+","
- +unary_template_to_string<Equality>::apply()
- +">";
- }
-
- public:
-
- bool holds()
- {
- Type lhs = Combiner<Type>::neutron();
- Type value_a = this->template getInputValue<operand_a>();
- // lhs = (0 - a)
- InverseCombinerT()(lhs, value_a);
- // lhs = (0 - a) + a
- Combiner<Type>()(lhs, value_a);
-
- Type rhs = Combiner<Type>::neutron();
-
- 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>()); }
- };
-
-
     // ---------------------------------------------------------------------------
     template <typename Type, template<class>class Operator1 = inplace_plus,
                              template<class>class Operator2 = inplace_et,
@@ -385,182 +281,6 @@
         }
     };
 
- // ---------------------------------------------------------------------------
- template <typename Type, template<class>class Equality = itl::std_equal>
- class InplaceSymmetricDifference
- : public Law<InplaceSymmetricDifference<Type>,
- LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
- {
- /** (a + b) - (a & b) == (a - b) + (b - a)
- computed using inplace operators +=, -= and &=
- Input = (a := inVal1, b := inVal2)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "Inplace Symmetric Difference"; }
- std::string formula()const { return "(a+b) - (a&b) == (a-b) + (b-a) 'inplace'"; }
-
- std::string typeString()const
- {
- return "SymmetricDifference<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Equality>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // --- left hand side ------------------------
- Type a_plus_b = this->template getInputValue<operand_a>();
- a_plus_b += this->template getInputValue<operand_b>();
-
- Type a_sec_b = this->template getInputValue<operand_a>();
- a_sec_b &= this->template getInputValue<operand_b>();
-
- Type lhs = a_plus_b;
- lhs -= a_sec_b;
-
- // --- right hand side -----------------------
- Type a_minus_b = this->template getInputValue<operand_a>();
- a_minus_b -= this->template getInputValue<operand_b>();
-
- Type b_minus_a = this->template getInputValue<operand_b>();
- b_minus_a -= this->template getInputValue<operand_a>();
-
- Type rhs = a_minus_b;
- rhs += b_minus_a;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(lhs, rhs);
- }
-
-
- bool debug_holds()
- {
- // --- left hand side ------------------------
- Type a_plus_b = this->template getInputValue<operand_a>();
- a_plus_b += this->template getInputValue<operand_b>();
-
- std::cout << "a_plus_b=" << a_plus_b.as_string() << std::endl;
-
- Type a_sec_b = this->template getInputValue<operand_a>();
- a_sec_b &= this->template getInputValue<operand_b>();
-
- std::cout << "a_sec_b=" << a_sec_b.as_string() << std::endl;
-
- Type lhs = a_plus_b;
- lhs -= a_sec_b;
-
- std::cout << "lhs=" << lhs.as_string() << std::endl;
-
- // --- right hand side -----------------------
- Type a_minus_b = this->template getInputValue<operand_a>();
- a_minus_b -= this->template getInputValue<operand_b>();
- std::cout << "a_minus_b=" << a_minus_b.as_string() << std::endl;
-
- Type b_minus_a = this->template getInputValue<operand_b>();
- b_minus_a -= this->template getInputValue<operand_a>();
- std::cout << "b_minus_a=" << b_minus_a.as_string() << std::endl;
-
- Type rhs = a_minus_b;
- rhs += b_minus_a;
- std::cout << "rhs=" << rhs.as_string() << std::endl;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(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>());
- }
- };
-
- // ---------------------------------------------------------------------------
- template <typename Type, template<class>class Equality = itl::std_equal>
- class InplaceFlip
- : public Law<InplaceFlip<Type>,
- LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
- {
- /** a ^ b == (a - b) + (b - a)
- computed using inplace operators +=, -= and &=
- Input = (a := inVal1, b := inVal2)
- Output = (lhs_result, rhs_result)
- */
- public:
- std::string name()const { return "Inplace Flip"; }
- std::string formula()const { return "a ^ b == (a-b) + (b-a) 'inplace'"; }
-
- std::string typeString()const
- {
- return "Flip<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Equality>::apply()+">";
- }
-
- public:
-
- bool holds()
- {
- // --- left hand side ------------------------
- Type lhs = this->template getInputValue<operand_a>();
- lhs ^= this->template getInputValue<operand_b>();
-
- // --- right hand side -----------------------
- Type a_minus_b = this->template getInputValue<operand_a>();
- a_minus_b -= this->template getInputValue<operand_b>();
-
- Type b_minus_a = this->template getInputValue<operand_b>();
- b_minus_a -= this->template getInputValue<operand_a>();
-
- Type rhs = a_minus_b;
- rhs += b_minus_a;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(lhs, rhs);
- }
-
-
- bool debug_holds()
- {
- // --- left hand side ------------------------
- Type lhs = this->template getInputValue<operand_a>();
- lhs ^= this->template getInputValue<operand_b>();
- std::cout << "lhs=" << lhs.as_string() << std::endl;
-
- // --- right hand side -----------------------
- Type a_minus_b = this->template getInputValue<operand_a>();
- a_minus_b -= this->template getInputValue<operand_b>();
- std::cout << "a_minus_b=" << a_minus_b.as_string() << std::endl;
-
- Type b_minus_a = this->template getInputValue<operand_b>();
- b_minus_a -= this->template getInputValue<operand_a>();
- std::cout << "b_minus_a=" << b_minus_a.as_string() << std::endl;
-
- Type rhs = a_minus_b;
- rhs += b_minus_a;
- std::cout << "rhs=" << rhs.as_string() << std::endl;
-
- this->template setOutputValue<lhs_result>(lhs);
- this->template setOutputValue<rhs_result>(rhs);
-
- return Equality<Type>()(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>());
- }
- };
 
     // ---------------------------------------------------------------------------
     template <typename MapT, template<class>class Equality = itl::std_equal>

Added: sandbox/itl/boost/validate/laws/set_laws.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/laws/set_laws.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,288 @@
+/*----------------------------------------------------------------------------+
+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);
+ }
+ };
+
+}} // namespace itl boost
+
+#endif // __itl_set_laws_h_JOFA_071124__
+
+

Added: sandbox/itl/boost/validate/laws/symmetric_difference.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/laws/symmetric_difference.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,201 @@
+/*----------------------------------------------------------------------------+
+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_symmetric_difference_hpp_JOFA_071124__
+#define __itl_symmetric_difference_hpp_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 Equality = itl::std_equal>
+ class InplaceSymmetricDifference
+ : public Law<InplaceSymmetricDifference<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** (a + b) - (a & b) == (a - b) + (b - a)
+ computed using inplace operators +=, -= and &=
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Inplace Symmetric Difference"; }
+ std::string formula()const { return "(a+b) - (a&b) == (a-b) + (b-a) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "SymmetricDifference<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // --- left hand side ------------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ a_plus_b += this->template getInputValue<operand_b>();
+
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+
+ Type lhs = a_plus_b;
+ lhs -= a_sec_b;
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ a_minus_b -= this->template getInputValue<operand_b>();
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ b_minus_a -= this->template getInputValue<operand_a>();
+
+ Type rhs = a_minus_b;
+ rhs += b_minus_a;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+
+ bool debug_holds()
+ {
+ // --- left hand side ------------------------
+ Type a_plus_b = this->template getInputValue<operand_a>();
+ a_plus_b += this->template getInputValue<operand_b>();
+
+ std::cout << "a_plus_b=" << a_plus_b.as_string() << std::endl;
+
+ Type a_sec_b = this->template getInputValue<operand_a>();
+ a_sec_b &= this->template getInputValue<operand_b>();
+
+ std::cout << "a_sec_b=" << a_sec_b.as_string() << std::endl;
+
+ Type lhs = a_plus_b;
+ lhs -= a_sec_b;
+
+ std::cout << "lhs=" << lhs.as_string() << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ a_minus_b -= this->template getInputValue<operand_b>();
+ std::cout << "a_minus_b=" << a_minus_b.as_string() << std::endl;
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ b_minus_a -= this->template getInputValue<operand_a>();
+ std::cout << "b_minus_a=" << b_minus_a.as_string() << std::endl;
+
+ Type rhs = a_minus_b;
+ rhs += b_minus_a;
+ std::cout << "rhs=" << rhs.as_string() << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(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>());
+ }
+ };
+
+ // ---------------------------------------------------------------------------
+ template <typename Type, template<class>class Equality = itl::std_equal>
+ class InplaceFlip
+ : public Law<InplaceFlip<Type>,
+ LOKI_TYPELIST_2(Type,Type), LOKI_TYPELIST_2(Type,Type)>
+ {
+ /** a ^ b == (a - b) + (b - a)
+ computed using inplace operators +=, -= and &=
+ Input = (a := inVal1, b := inVal2)
+ Output = (lhs_result, rhs_result)
+ */
+ public:
+ std::string name()const { return "Inplace Flip"; }
+ std::string formula()const { return "a ^ b == (a-b) + (b-a) 'inplace'"; }
+
+ std::string typeString()const
+ {
+ return "Flip<"+type_to_string<Type>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
+ }
+
+ public:
+
+ bool holds()
+ {
+ // --- left hand side ------------------------
+ Type lhs = this->template getInputValue<operand_a>();
+ lhs ^= this->template getInputValue<operand_b>();
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ a_minus_b -= this->template getInputValue<operand_b>();
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ b_minus_a -= this->template getInputValue<operand_a>();
+
+ Type rhs = a_minus_b;
+ rhs += b_minus_a;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(lhs, rhs);
+ }
+
+
+ bool debug_holds()
+ {
+ // --- left hand side ------------------------
+ Type lhs = this->template getInputValue<operand_a>();
+ lhs ^= this->template getInputValue<operand_b>();
+ std::cout << "lhs=" << lhs.as_string() << std::endl;
+
+ // --- right hand side -----------------------
+ Type a_minus_b = this->template getInputValue<operand_a>();
+ a_minus_b -= this->template getInputValue<operand_b>();
+ std::cout << "a_minus_b=" << a_minus_b.as_string() << std::endl;
+
+ Type b_minus_a = this->template getInputValue<operand_b>();
+ b_minus_a -= this->template getInputValue<operand_a>();
+ std::cout << "b_minus_a=" << b_minus_a.as_string() << std::endl;
+
+ Type rhs = a_minus_b;
+ rhs += b_minus_a;
+ std::cout << "rhs=" << rhs.as_string() << std::endl;
+
+ this->template setOutputValue<lhs_result>(lhs);
+ this->template setOutputValue<rhs_result>(rhs);
+
+ return Equality<Type>()(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>());
+ }
+ };
+
+}} // namespace itl boost
+
+#endif // __itl_symmetric_difference_hpp_JOFA_071124__
+
+

Modified: sandbox/itl/boost/validate/lawvalidater.h
==============================================================================
--- sandbox/itl/boost/validate/lawvalidater.h (original)
+++ sandbox/itl/boost/validate/lawvalidater.h 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -16,7 +16,7 @@
 #include <boost/itl/map.hpp>
 #include <boost/validate/gentor/randomgentor.h>
 
-#include <boost/validate/laws/monoid.h>
+#include <boost/validate/laws/monoid.hpp>
 #include <boost/validate/lawviolations.h>
 
 namespace boost{namespace itl

Modified: sandbox/itl/boost/validate/realmvalidater.h
==============================================================================
--- sandbox/itl/boost/validate/realmvalidater.h (original)
+++ sandbox/itl/boost/validate/realmvalidater.h 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -13,13 +13,13 @@
 #include <stdio.h>
 #include <time.h>
 #include <boost/validate/typevalidater.h>
-#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/driver/itl_driver.hpp>
 #include <boost/validate/utility.hpp>
 
 namespace boost{namespace itl
 {
     
- class RealmValidater : public itl_validater
+ class RealmValidater : public itl_driver
     {
     public:
         RealmValidater() { setProfile(); }
@@ -89,7 +89,7 @@
 
         }
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();

Modified: sandbox/itl/boost/validate/single_law_validater.hpp
==============================================================================
--- sandbox/itl/boost/validate/single_law_validater.hpp (original)
+++ sandbox/itl/boost/validate/single_law_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -12,7 +12,7 @@
 #include <iostream>
 #include <stdio.h>
 #include <time.h>
-#include <boost/validate/typevalidater.h>
+#include <boost/validate/validater/algebra_validater.hpp>
 #include <boost/validate/utility.hpp>
 
 
@@ -76,7 +76,7 @@
 
         void setInvalid() { _isValid = false; }
 
- AlgebraValidater* choiceError(const std::string& location, int value, const ChoiceT& choice)
+ algebra_validater* choiceError(const std::string& location, int value, const ChoiceT& choice)
         {
             reportTypeChoiceError(location, value, choice);
             setInvalid();
@@ -150,7 +150,7 @@
             }
         }
 
- AlgebraValidater* chooseValidater()
+ algebra_validater* chooseValidater()
         {
             int rootChoice = _rootChoice.some();
             int domainChoice = _domainChoice.some();
@@ -334,7 +334,7 @@
         ChoiceT _rootChoice;
         ChoiceT _domainChoice;
         ChoiceT _codomainChoice;
- AlgebraValidater* _validater;
+ algebra_validater* _validater;
         ValidationCounterT _frequencies;
         ViolationCounterT _violationsCount;
         ViolationMapT _violations;

Added: sandbox/itl/boost/validate/type/nat.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/type/nat.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,81 @@
+/*----------------------------------------------------------------------------+
+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/itl/type_traits/to_string.hpp>
+#include <boost/itl/type_traits/type_to_string.hpp>
+
+#define ITL_LOCATION(message) location(__FILE__,__LINE__,message)
+
+namespace boost{namespace itl
+{
+
+class nat
+{
+public:
+ nat(): _value(0) {}
+ nat(int val): _value(val<0 ? 0 : val){}
+ nat(const nat& val): _value(val._value){}
+
+ int value()const { return _value; }
+
+ nat& operator++(){ ++_value; return *this; }
+ const nat operator++(int){ nat that = *this; ++_value; return that; }
+
+ nat& operator--(){ if(_value > 0)--_value; return *this; }
+ const nat operator--(int){ nat that = *this; --_value; return that; }
+
+ nat& operator += (const nat& right){ _value += right._value; return *this; }
+
+ nat& operator -= (const nat& right)
+ {
+ _value = right._value > _value ? 0 : (_value - right._value);
+ return *this;
+ }
+
+ nat& operator ^= (const nat& right) //JODO should not be required
+ {
+ _value ^= right._value;
+ return *this;
+ }
+ nat& operator &= (const nat& right) //JODO should not be required
+ {
+ _value &= right._value;
+ return *this;
+ }
+
+ //CL
+ operator int()const{ return (_value); }
+
+ std::string as_string()const { return to_string<int>::apply(_value); }
+
+private:
+ int _value;
+};
+
+//inline nat operator + (const nat& left, const nat& right){return nat(left)+=right;}
+//inline nat operator - (const nat& left, const nat& right){return nat(left)-=right;}
+
+inline bool operator == (const boost::itl::nat& left, const boost::itl::nat& right){ return left.value() == right.value(); }
+inline bool operator < (const boost::itl::nat& left, const boost::itl::nat& right){ return left.value() < right.value(); }
+
+template<>inline std::string type_to_string<nat>::apply() { return "nat"; }
+
+template<class CharType, class CharTraits>
+std::basic_ostream<CharType, CharTraits> &operator<<
+(std::basic_ostream<CharType, CharTraits> &stream, itl::nat const& right)
+{
+ return stream << right.value();
+}
+
+}} // namespace itl boost
+

Modified: sandbox/itl/boost/validate/typevalidater.h
==============================================================================
--- sandbox/itl/boost/validate/typevalidater.h (original)
+++ sandbox/itl/boost/validate/typevalidater.h 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -9,6 +9,8 @@
 +----------------------------------------------------------------------------*/
 #pragma once
 
+#ifdef __DOOMED
+
 #include <boost/mpl/bool.hpp>
 #include <boost/mpl/if.hpp>
 #include <boost/itl/type_traits/is_continuous.hpp>
@@ -18,8 +20,8 @@
 #include <boost/validate/laws/set_laws.h>
 #include <boost/validate/laws/order.h>
 #include <boost/validate/laws/pushouts.h>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/algebra_validater.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
 
 namespace boost{namespace itl
 {
@@ -30,7 +32,7 @@
     // ------------------------------------------------------------------------
 
     template <typename Type, template<class>class Relation>
- class StrictWeakOrderValidater : public AlgebraValidater
+ class StrictWeakOrderValidater : public algebra_validater
     {
     public:
         enum Laws
@@ -91,13 +93,13 @@
         ValidationCounterT _frequencies;
         ViolationCounterT _violationsCount;
         ViolationMapT _violations;
- }; //class AlgebraValidater
+ }; //class algebra_validater
 
 
     // ------------------------------------------------------------------------
 
         template <typename Type, template<class>class Relation, template<class>class Equality = itl::std_equal>
- class PartialOrderValidater : public AlgebraValidater
+ class PartialOrderValidater : public algebra_validater
     {
     public:
         enum Laws
@@ -166,7 +168,7 @@
     // ------------------------------------------------------------------------
     /*JODO currently not used, incomplete.
     template <typename Type>
- class InplaceCommutativeMonoidValidater : public AlgebraValidater
+ class InplaceCommutativeMonoidValidater : public algebra_validater
     {
     public:
         enum Laws
@@ -225,7 +227,7 @@
 
 
     template <typename Type>
- class InplaceSetBaseValidater : public AlgebraValidater
+ class InplaceSetBaseValidater : public algebra_validater
     {
     public:
         typedef StrictWeakOrderValidater<Type, std::less> LessValidaterT;
@@ -665,7 +667,7 @@
 
 
     template <typename Type>
- class IntervalMorphicValidater : public AlgebraValidater
+ class IntervalMorphicValidater : public algebra_validater
     {
     public:
         enum Laws
@@ -892,3 +894,5 @@
 
 }} // namespace itl boost
 
+#endif //__DOOMED
+

Modified: sandbox/itl/boost/validate/utility.hpp
==============================================================================
--- sandbox/itl/boost/validate/utility.hpp (original)
+++ sandbox/itl/boost/validate/utility.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -14,6 +14,13 @@
 
 #define ITL_LOCATION(message) location(__FILE__,__LINE__,message)
 
+#define NEURONIZER_CASES(validater_Template, itl_Map, domain_Type, codomain_Type) \
+case NeutronHandlerType::partial_absorber: return new validater_Template<itl_Map<domain_Type,codomain_Type,partial_absorber> >; \
+case NeutronHandlerType::partial_enricher: return new validater_Template<itl_Map<domain_Type,codomain_Type,partial_enricher> >; \
+case NeutronHandlerType::total_absorber: return new validater_Template<itl_Map<domain_Type,codomain_Type,total_absorber> >; \
+case NeutronHandlerType::total_enricher: return new validater_Template<itl_Map<domain_Type,codomain_Type,total_enricher> >;
+
+
 namespace boost{namespace itl
 {
     std::string location(const std::string& file, int line, const std::string& message)

Added: sandbox/itl/boost/validate/validater/algebra_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/algebra_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,48 @@
+/*----------------------------------------------------------------------------+
+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 algebra_validater
+ {
+ public:
+ virtual ~algebra_validater(){}
+ // the choice probability, and also the availability of laws is individual to each type
+ // Somehow it has to be defined in conjunction to every type. So it is an aspect of
+ // type traits.
+ virtual void setProfile()=0;
+ virtual void validate()=0;
+ virtual void addFrequencies(ValidationCounterT&)=0;
+ virtual void addViolations(ViolationCounterT&, ViolationMapT&)=0;
+
+ virtual bool hasValidProfile()const{ return true; }
+
+ static int share(int total, int& index, int& rest_shares);
+ };
+
+ inline int algebra_validater::share(int total, int& index, int& rest_shares)
+ {
+ BOOST_ASSERT(index_ == index);
+ int count = total - index;
+ int share = rest_shares / count;
+ rest_shares -= share;
+ ++index;
+ return share;
+ }
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/collector_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/collector_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,136 @@
+/*----------------------------------------------------------------------------+
+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/functors.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+typedef WeightedNumberGentor<int> ChoiceT;
+
+template <typename Type>
+class collector_validater : public algebra_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ inplacePlusDistributivity,
+ inplaceEtDistributivity,
+ inplacePlusDashRightDistrib,
+ inplaceEtDashRightDistrib,
+ inplacePlusDeMorgan,
+ inplaceEtDeMorgan,
+ Laws_size
+ };
+
+ collector_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDashRightDistrib]= share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDashRightDistrib] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: 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: return new LawValidater<InplaceAssociativity<Type, inplace_et>, RandomGentor>;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et>, RandomGentor>;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type>, RandomGentor>;
+ case inplaceEtDistributivity:
+ if(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_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_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;
+};
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/interval_morphic_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,121 @@
+/*----------------------------------------------------------------------------+
+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/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.hpp>
+#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;
+
+ template <typename Type>
+ class interval_morphic_validater : 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
+ };
+
+ interval_morphic_validater() {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;
+ };
+
+}} // namespace itl boost
+

Modified: sandbox/itl/boost/validate/validater/itl_induced_relations.hpp
==============================================================================
--- sandbox/itl/boost/validate/validater/itl_induced_relations.hpp (original)
+++ sandbox/itl/boost/validate/validater/itl_induced_relations.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -10,9 +10,10 @@
 #pragma once
 
 #include <boost/itl/functors.hpp>
+#include <boost/itl/interval_morphism.hpp>
 #include <boost/validate/laws/induced_relation.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/algebra_validater.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
 
 namespace boost{namespace itl
 {
@@ -20,7 +21,7 @@
 
 
     template <typename Type>
- class itl_induced_relations_validater : public AlgebraValidater
+ class itl_induced_relations_validater : public algebra_validater
     {
     public:
         enum Laws

Added: sandbox/itl/boost/validate/validater/itl_order_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/itl_order_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,99 @@
+/*----------------------------------------------------------------------------+
+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/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/validate/validater/strict_weak_order_validater.hpp>
+#include <boost/validate/validater/partial_order_validater.hpp>
+
+namespace boost{namespace itl
+{
+ typedef WeightedNumberGentor<int> ChoiceT;
+
+
+ template <typename Type>
+ class itl_order_validater : public algebra_validater
+ {
+ public:
+ typedef strict_weak_order_validater<Type, std::less> LessValidaterT;
+ typedef partial_order_validater<Type, std::less_equal> LessEqualValidaterT;
+ typedef partial_order_validater<Type, itl::sub_super_set, itl::element_equal> ContainedInValidaterT;
+
+ enum Laws
+ {
+ strictWeakStdOrder,
+ partialStdOrder,
+ containedInOrder,
+ Laws_size
+ };
+
+ itl_order_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_weights = 100;
+ _lawChoice.setSize(sum_of_weights);
+ _lawChoice.setMaxWeights(sum_of_weights);
+ _lawChoice[strictWeakStdOrder] = 33;
+ _lawChoice[partialStdOrder] = 33;
+ _lawChoice[containedInOrder] = 34;
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case strictWeakStdOrder: return _lessValidater.chooseValidater();
+ case partialStdOrder: return _lessEqualValidater.chooseValidater();
+ case containedInOrder: return _containedInValidater.chooseValidater();
+ default: return NULL;
+ }
+ }
+
+ void validate()
+ {
+ _validater = chooseValidater();
+ if(_validater)
+ {
+ _validater->run();
+ _validater->addFrequencies(_frequencies);
+ _validater->addViolations(_violationsCount, _violations);
+ delete _validater;
+ }
+ }
+
+ void addFrequencies(ValidationCounterT& summary) { summary += _frequencies; }
+ void addViolations(ViolationCounterT& summary, ViolationMapT& collector)
+ {
+ summary += _violationsCount;
+ collector += _violations;
+ }
+
+
+ private:
+ ChoiceT _lawChoice;
+ LawValidaterI* _validater;
+ ValidationCounterT _frequencies;
+ ViolationCounterT _violationsCount;
+ ViolationMapT _violations;
+
+ LessValidaterT _lessValidater;
+ LessEqualValidaterT _lessEqualValidater;
+ ContainedInValidaterT _containedInValidater;
+ };
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/itl_set_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/itl_set_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,136 @@
+/*----------------------------------------------------------------------------+
+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/functors.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/set_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+typedef WeightedNumberGentor<int> ChoiceT;
+
+template <typename Type>
+class itl_set_validater : public algebra_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ inplacePlusDistributivity,
+ inplaceEtDistributivity,
+ inplacePlusDashRightDistrib,
+ inplaceEtDashRightDistrib,
+ inplacePlusDeMorgan,
+ inplaceEtDeMorgan,
+ Laws_size
+ };
+
+ itl_set_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDistributivity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDashRightDistrib]= share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDashRightDistrib] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtDeMorgan] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: 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: return new LawValidater<InplaceAssociativity<Type, inplace_et>, RandomGentor>;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et>, RandomGentor>;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type>, RandomGentor>;
+ case inplaceEtDistributivity:
+ if(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_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_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;
+};
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/law_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/law_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,182 @@
+/*----------------------------------------------------------------------------+
+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
+
+// ----------------------------------------------------------------------------
+

Added: sandbox/itl/boost/validate/validater/partial_order_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/partial_order_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,90 @@
+/*----------------------------------------------------------------------------+
+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/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/validate/laws/order.h>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+ typedef WeightedNumberGentor<int> ChoiceT;
+
+ template <typename Type, template<class>class Relation, template<class>class Equality = itl::std_equal>
+ class partial_order_validater : public algebra_validater
+ {
+ public:
+ enum Laws
+ {
+ transitivity,
+ antisymmetry,
+ reflexivity,
+ Laws_size
+ };
+
+ partial_order_validater() {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;
+ };
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/signed_quantifier_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,148 @@
+/*----------------------------------------------------------------------------+
+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/functors.hpp>
+#include <boost/itl/type_traits/is_interval_splitter.hpp>
+#include <boost/itl/type_traits/absorbs_neutrons.hpp>
+#include <boost/itl/type_traits/is_total.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/laws/symmetric_difference.hpp>
+#include <boost/validate/laws/map_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+typedef WeightedNumberGentor<int> ChoiceT;
+
+template <typename Type>
+class signed_quantifier_validater : public algebra_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ inplaceSymmetricDifference,
+ inplaceFlip,
+ sectionAbsorbtion,
+ inplaceInverseExistence,
+ Laws_size
+ };
+
+ signed_quantifier_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ const int law_share = sum_of_shares / Laws_size;
+ int et_assoc_share = law_share;
+ int inv_ex_share = law_share;
+
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ //NOTE: Associativity is not valid for partial_absorber signed quantifier maps
+ if(!is_total<Type>::value && absorbs_neutrons<Type>::value)
+ et_assoc_share = 0;
+ //NOTE: An Inverse exists only for a total signed quantifier
+ if(!is_total<Type>::value)
+ inv_ex_share = 0;
+
+ int rest_shares = sum_of_shares, item_index = 0;
+
+ _lawChoice[inplaceEtAssociativity] = et_assoc_share; rest_shares -= et_assoc_share;
+ _lawChoice[inplaceInverseExistence] = inv_ex_share; rest_shares -= inv_ex_share;
+
+ item_index = 2;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceSymmetricDifference] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[sectionAbsorbtion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceFlip] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity:
+ if(is_interval_splitter<Type>::value)
+ return new LawValidater<InplaceAssociativity<Type, inplace_plus, element_equal>, RandomGentor>;
+ else return new LawValidater<InplaceAssociativity<Type, inplace_plus, std_equal>, RandomGentor>;
+ case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality <Type>, RandomGentor>;
+ case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type>, RandomGentor>;
+ case inplaceEtAssociativity:
+ if(absorbs_neutrons<Type>::value && is_total<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>;
+ case inplaceNaturalInversion:
+ if(absorbs_neutrons<Type>::value)
+ return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal>, RandomGentor>;
+ else return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, protonic_equal>, RandomGentor>;
+ case inplaceSymmetricDifference:return new LawValidater<InplaceSymmetricDifference<Type>, RandomGentor>;
+ case inplaceFlip: return new LawValidater<InplaceFlip<Type>, RandomGentor>;
+ case sectionAbsorbtion:
+ if(absorbs_neutrons<Type>::value)
+ return new LawValidater<SectionAbsorbtion<Type,std_equal>, RandomGentor>;
+ else return new LawValidater<SectionAbsorbtion<Type,protonic_equal>, RandomGentor>;
+ case inplaceInverseExistence:
+ if(absorbs_neutrons<Type>::value)
+ return new LawValidater<InplaceInverseExistence<Type, inplace_plus, std_equal>, RandomGentor>;
+ else return new LawValidater<InplaceInverseExistence<Type, inplace_plus, protonic_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;
+};
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/strict_weak_order_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,92 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#pragma once
+
+#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/validate/laws/order.h>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+ typedef WeightedNumberGentor<int> ChoiceT;
+
+ template <typename Type, template<class>class Relation>
+ class strict_weak_order_validater : public algebra_validater
+ {
+ public:
+ enum Laws
+ {
+ transitivity,
+ asymmetry,
+ irreflexivity,
+ Laws_size
+ };
+
+ strict_weak_order_validater() {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
+
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/validater/unsigned_quantifier_validater.hpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,116 @@
+/*----------------------------------------------------------------------------+
+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/functors.hpp>
+#include <boost/itl/type_traits/absorbs_neutrons.hpp>
+#include <boost/itl/type_traits/is_total.hpp>
+#include <boost/validate/laws/monoid.hpp>
+#include <boost/validate/laws/map_laws.hpp>
+#include <boost/validate/laws/inversion_laws.hpp>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/validater/algebra_validater.hpp>
+
+namespace boost{namespace itl
+{
+
+typedef WeightedNumberGentor<int> ChoiceT;
+
+template <typename Type>
+class unsigned_quantifier_validater : public algebra_validater
+{
+public:
+
+ enum Laws
+ {
+ inplacePlusAssociativity,
+ inplacePlusNeutrality,
+ inplacePlusCommutativity,
+ inplaceEtAssociativity,
+ inplaceEtCommutativity,
+ inplaceNaturalInversion,
+ sectionAbsorbtion,
+ Laws_size
+ };
+
+ unsigned_quantifier_validater() {setProfile();}
+
+ void setProfile()
+ {
+ const int sum_of_shares = 100;
+ const int law_share = sum_of_shares / Laws_size;
+
+ _lawChoice.setSize(Laws_size);
+ _lawChoice.setMaxWeights(sum_of_shares);
+
+ int rest_shares = sum_of_shares, item_index = 0;
+ _lawChoice[inplacePlusAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusNeutrality] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplacePlusCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtAssociativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceEtCommutativity] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[inplaceNaturalInversion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice[sectionAbsorbtion] = share(Laws_size, item_index, rest_shares);
+ _lawChoice.init();
+ }
+
+
+ LawValidaterI* chooseValidater()
+ {
+ switch(_lawChoice.some())
+ {
+ case inplacePlusAssociativity: 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: return new LawValidater<InplaceAssociativity<Type, inplace_et>, RandomGentor>;
+ case inplaceEtCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_et>, RandomGentor>;
+ case inplaceNaturalInversion:
+ if(absorbs_neutrons<Type>::value)
+ return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, std_equal>, RandomGentor>;
+ else return new LawValidater<InplaceNaturalInversion<Type, inplace_plus, protonic_equal>, RandomGentor>;
+ case sectionAbsorbtion:
+ if(absorbs_neutrons<Type>::value)
+ return new LawValidater<SectionAbsorbtion<Type,std_equal>, RandomGentor>;
+ else return new LawValidater<SectionAbsorbtion<Type,protonic_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;
+};
+
+
+}} // namespace itl boost
+

Modified: sandbox/itl/libs/itl/build/win32/vc9_all.sln
==============================================================================
--- sandbox/itl/libs/itl/build/win32/vc9_all.sln (original)
+++ sandbox/itl/libs/itl/build/win32/vc9_all.sln 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -25,8 +25,6 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_amount_cube", "..\..\..\itl_xt\example\amount_cube\vc9_amount_cube.vcproj", "{5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labatea", "..\..\..\validate\example\labatea\vc9_labatea.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4719}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_itl_interval", "..\..\test\test_itl_interval\vc9_test_itl_interval.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set", "..\..\test\test_interval_set\vc9_test_interval_set.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9C}"
@@ -47,24 +45,28 @@
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_meta_functors", "..\..\..\itl_xt\test\meta_functors\vc9_meta_functors.vcproj", "{EF64A2C7-DE78-46C2-953F-C4685A5D2A98}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itv_map_settic", "..\..\..\validate\example\labat_itv_map_settic\vc9_labat_itv_map_settic.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471A}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itv_map_groupig", "..\..\..\validate\example\labat_itv_map_groupig\vc9_labat_itv_map_groupig.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471B}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_single", "..\..\..\validate\example\labat_single\vc9_labat_single.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471C}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itv_set", "..\..\..\validate\example\labat_itv_set\vc9_labat_itv_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471D}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_quantifier_map", "..\..\test\test_quantifier_map\vc9_test_quantifier_map.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9F}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_interval_set_laws", "..\..\test\test_interval_set_laws\vc9_test_interval_set_laws.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B7D2A9FA0}"
 EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_test_casual", "..\..\test\test_casual\vc9_test_casual.vcproj", "{EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}"
 EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_val_setbase", "..\..\..\validate\example\labat_val_setbase\vc9_labat_val_setbase.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471E}"
-EndProject
 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_val_relations", "..\..\..\validate\example\labat_val_relations\vc9_labat_val_relations.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F471F}"
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_unsigned_quantifier", "..\..\..\validate\example\labat_unsigned_quantifier\vc9_labat_unsigned_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4720}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_signed_quantifier", "..\..\..\validate\example\labat_signed_quantifier\vc9_labat_signed_quantifier.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4721}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itl_order", "..\..\..\validate\example\labat_itl_order\vc9_labat_itl_order.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4722}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_collector", "..\..\..\validate\example\labat_collector\vc9_labat_collector.vcproj", "{9EF72937-0585-487D-B887-5359BFA569E8}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itl_set", "..\..\..\validate\example\labat_itl_set\vc9_labat_itl_set.vcproj", "{BF42574F-66E2-42DD-90D9-3A8FCE6F4723}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vc9_labat_itl_morphic", "..\..\..\validate\example\labat_itl_morphic\vc9_labat_itl_morphic.vcproj", "{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}"
+EndProject
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -119,10 +121,6 @@
                 {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Debug|Win32.Build.0 = Debug|Win32
                 {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Release|Win32.ActiveCfg = Release|Win32
                 {5B6AE5B3-FAF3-4D98-A6F9-C8889C62A0E5}.Release|Win32.Build.0 = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F4719}.Debug|Win32.ActiveCfg = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F4719}.Debug|Win32.Build.0 = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F4719}.Release|Win32.ActiveCfg = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F4719}.Release|Win32.Build.0 = Release|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Debug|Win32.ActiveCfg = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Debug|Win32.Build.0 = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F8C}.Release|Win32.ActiveCfg = Release|Win32
@@ -163,22 +161,10 @@
                 {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Debug|Win32.Build.0 = Debug|Win32
                 {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Release|Win32.ActiveCfg = Release|Win32
                 {EF64A2C7-DE78-46C2-953F-C4685A5D2A98}.Release|Win32.Build.0 = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471A}.Debug|Win32.ActiveCfg = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471A}.Debug|Win32.Build.0 = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471A}.Release|Win32.ActiveCfg = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471A}.Release|Win32.Build.0 = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471B}.Debug|Win32.ActiveCfg = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471B}.Debug|Win32.Build.0 = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471B}.Release|Win32.ActiveCfg = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471B}.Release|Win32.Build.0 = Release|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Debug|Win32.ActiveCfg = Debug|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Debug|Win32.Build.0 = Debug|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Release|Win32.ActiveCfg = Release|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471C}.Release|Win32.Build.0 = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471D}.Debug|Win32.ActiveCfg = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471D}.Debug|Win32.Build.0 = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471D}.Release|Win32.ActiveCfg = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471D}.Release|Win32.Build.0 = Release|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9F}.Debug|Win32.ActiveCfg = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9F}.Debug|Win32.Build.0 = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B7D2A9F9F}.Release|Win32.ActiveCfg = Release|Win32
@@ -191,14 +177,34 @@
                 {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Debug|Win32.Build.0 = Debug|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.ActiveCfg = Release|Win32
                 {EE61B7EF-EC45-4165-8B49-FD5B8D3A9FA0}.Release|Win32.Build.0 = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Debug|Win32.ActiveCfg = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Debug|Win32.Build.0 = Debug|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Release|Win32.ActiveCfg = Release|Win32
- {BF42574F-66E2-42DD-90D9-3A8FCE6F471E}.Release|Win32.Build.0 = Release|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.ActiveCfg = Debug|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Debug|Win32.Build.0 = Debug|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.ActiveCfg = Release|Win32
                 {BF42574F-66E2-42DD-90D9-3A8FCE6F471F}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4720}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4721}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4722}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4722}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4722}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4722}.Release|Win32.Build.0 = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Debug|Win32.Build.0 = Debug|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.ActiveCfg = Release|Win32
+ {9EF72937-0585-487D-B887-5359BFA569E8}.Release|Win32.Build.0 = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Debug|Win32.ActiveCfg = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Debug|Win32.Build.0 = Debug|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Release|Win32.ActiveCfg = Release|Win32
+ {BF42574F-66E2-42DD-90D9-3A8FCE6F4723}.Release|Win32.Build.0 = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Debug|Win32.ActiveCfg = Debug|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Debug|Win32.Build.0 = Debug|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Release|Win32.ActiveCfg = Release|Win32
+ {612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}.Release|Win32.Build.0 = Release|Win32
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: sandbox/itl/libs/itl/doc/semantics.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/semantics.qbk (original)
+++ sandbox/itl/libs/itl/doc/semantics.qbk 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -432,8 +432,8 @@
 Neutrality<C,+,== > : C a; a+C() == a
 Commutativity<C,+,== >: C a,b; a+b == b+a
 
-Associativity<C,*,== >: C a,b,c; a&(b&c) ==(a&b)&c
-Commutativity<C,*,== >: C a,b; a&b == b&a
+Associativity<C,&,== >: C a,b,c; a&(b&c) ==(a&b)&c
+Commutativity<C,&,== >: C a,b; a&b == b&a
 
 RightNeutrality<C,-,== >: C a; a-C() == a
 Inversion<C,-,=v= > : C a; a - a =v= C()
@@ -447,7 +447,7 @@
 ``
                              + & -
 Associativity == ==
-Neutrality == == ==
+Neutrality == ==
 Commutativity == ==
 Inversion partial_absorber ==
           partial_enricher =p=
@@ -521,7 +521,7 @@
 q -= (2->1);
 ``
 If type `some_number` is `unsigned` a /set difference/ kind of
-still subtraction make sense
+subtraction make sense
 ``
 itl::map<int,some_number> q = {(1->1)};
 q -= (2->1); // key 2 is not not in the map so
@@ -535,8 +535,8 @@
 q == {(1->1), (2-> -1)}; // adding the inverse element
 ``
 As commented in the example, subtraction of a key value
-pair (k,v) can obviously defined as adding the ['*inverse element*]
-for that key (k,-v), if the key is not yet stored in the map.
+pair `(k,v)` can obviously defined as adding the ['*inverse element*]
+for that key `(k,-v)`, if the key is not yet stored in the map.
 
 [h4 Partial and Total Quantifiers and Infinite Vectors]
 
@@ -544,8 +544,8 @@
 every `key_value` is initially quantified `0`-times, where `0` stands
 for the neutral element of the numeric `CodomainT` type.
 Such a `Quantifier` would be totally defined on all values of
-it's `DomainT` type.
-Such a `Quantifier` can be conceived as an `InfiniteVector`.
+it's `DomainT` type and can be
+conceived as an `InfiniteVector`.
 
 To create an infinite vector
 that is totally defined on it's domain we can set
@@ -560,14 +560,6 @@
 [@http://en.wikipedia.org/wiki/Vector_space vector space]
 do provide.
 
-We will use the terms `TotalQuantifier` and
-`PartialQuantifier` for those objects.
-
-[table
-[[Trait] [CodomainT as number] [CodomainT more abstract] [Concept for Quanifier Map]]
-[[is_total] [signed number] [commutative group] [InfiniteVector]]
-[[!is_total] [unsigned number] [commutative monoid] [hybrid type]]
-]
 
 [h5 Intersection on Quantifiers]
 
@@ -582,26 +574,27 @@
 intersection.
 
 For `CodomainT` types that are not models of `Sets`
-`operator &` is defined as aggregation on the intersection
-of the domains.
+`operator & ` is defined as ['aggregation on the intersection
+of the domains]. Instead of the `codomain_intersect` functor
+`codomain_combine` is used as aggregation operation:
 ``
-//Pseudocode example:
+//Pseudocode example for partial Quantifiers p, q:
 interval_map<int,int> p, q;
-p = {[1 3)->1 };
-q = { ([2 4)->1};
-p*q =={ [2 3)->2 };
+p = {[1 3)->1 };
+q = { ([2 4)->1};
+p & q =={ [2 3)->2 };
 ``
 So an addition or aggregation of associated values is
 done like for `operator +` but value pairs that have
 no common keys are not added to the result.
 
-For `Quantifier` that is a model of an `InfiniteVector`
+For a `Quantifier` that is a model of an `InfiniteVector`
 and which is therefore defined for every key value of
 the `DomainT` type, this definition of `operator &`
 degenerates to the same sematics that `operaotor +`
 implements:
 ``
-//Pseudocode example:
+//Pseudocode example for total Quantifiers p, q:
 interval_map<int,int> p, q;
 p = {[min 1)[1 3)[3 max]};
           ->0 ->1 ->0
@@ -611,30 +604,34 @@
           ->0 ->1 ->2 ->1 ->0
 ``
 
+[h4 Laws for Quantifiers of unsigned Numbers]
 
+The semantics of itl Maps of Numbers is different
+for unsigned or signed numbers. So the sets of
+laws that are valid for Quantifiers will be different
+depending on the instantiation of an unsigned or
+a signed number type as CodomainT parameter.
 
-[h5 Laws on set union, set intersection and set difference]
-
-Again, we are pacing the parade of laws, this time for
+Again, we are presenting the investigated sets of laws, this time for
 `Quantifier` types `Q` which are
 __itl_map__`<D,N,T>`, __itv_map__`<D,N,T>` and __spl_itv_map__`<D,N,T>`
 where `CodomainT` type `N` is a `Number` and `Trait` type `T` is one of
 the itl's map traits.
 
-
 ``
 Associativity<Q,+,== >: Q a,b,c; a+(b+c) == (a+b)+c
 Neutrality<Q,+,== > : Q a; a+Q() == a
 Commutativity<Q,+,== >: Q a,b; a+b == b+a
 
-Associativity<Q,*,== >: Q a,b,c; a&(b&c) ==(a&b)&c
-Commutativity<Q,*,== >: Q a,b; a&b == b&a
+Associativity<Q,&,== >: Q a,b,c; a&(b&c) ==(a&b)&c
+Commutativity<Q,&,== >: Q a,b; a&b == b&a
 
-RightNeutrality<Q,-,== > : Q a; a-Q() == a
-Inversion<Q,-,=v= >: Q a; a - a =v= Q()
+RightNeutrality<Q,-,== >: Q a; a-Q() == a
+Inversion<Q,-,=v= > : Q a; a - a =v= Q()
 ``
 
-For a `Quantifier` the same basic laws apply that are
+For an `unsigned Quantifier`, an itl Map of `unsigned numbers`,
+the same basic laws apply that are
 valid for `Collectors`:
 
 ``
@@ -646,30 +643,85 @@
           enriches_neutrons =p=
 ``
 
-In addition also symmetrical difference is valid for
-`Quantifiers` and the
-modified `operator &`.
+The subset of laws, that relates to `operator +` and the neutral
+element `Q()` is that of a commutative monoid. This is the same
+concept, that applies for the `CodomainT` type. This gives
+rise to the assumption that an itl `Map` over a `CommutativeModoid`
+is again a `CommutativeModoid`.
+
+Other laws that were valid for `Collectors` are not valid
+for an `unsigned Quantifier`.
+
+
+[h4 Laws for Quantifiers of signed Numbers]
+
+For `Quantifiers` of signed numbers, or
+`signed Quantifiers`, the pattern of valid
+laws is somewhat different:
+``
+ + & -
+Associativity =v= =v=
+Neutrality == ==
+Commutativity == ==
+Inversion absorbs_neutrons ==
+ enriches_neutrons =p=
+``
+
+The differences are tagged as `=v=` indicating, that
+the associativity law is not uniquely valid for a single
+equality relation `==` as this was the case for
+`Collector` and `unsigned Quntifier` maps.
+
+The differences are these:
+``
+ +
+Associativity itl::map ==
+ interval_map ==
+ split_interval_map =e=
+``
+For `operator +` the associativity on __spl_itv_maps__ is only valid
+with element equality `=e=`, which is not a big constrained, because
+only element equality is required.
+
+For `operator &` the associativity is broken for all maps
+that are partial absorbers. For total absorbers associativity
+is valid for element equality. All maps having the neutron enricher
+Trait are associative wrt. lexicigraphical equality `==`.
+``
+Associativity &
+ absorbs_neutrons && !is_total false
+ absorbs_neutrons && is_total =e=
+ enriches_neutrons ==
+``
+
+Note, that all laws that establish a commutative
+monoid for `operator +` and neutron `Q()` are valid
+for `signed Quantifiers`.
+In addition symmetric difference that does not
+hold for `unsigned Qunatifiers` is valid
+for `signed Qunatifiers`.
+
 ``
 SymmetricDifference<Q,== > : Q a,b,c; (a + b) - (a & b) == (a - b) + (b - a)
 ``
-For a `TotalQuantifier` `Qt` symmetrical difference degenerates to
+For a `signed TotalQuantifier` `Qt` symmetrical difference degenerates to
 a trivial form since `operator &` and `operator +` become identical
 ``
-SymmetricDifference<Qt,== > : Qt a,b,c; (a + b) - (a + b) == (a - b) + (b - a) == 0
+SymmetricDifference<Qt,== > : Qt a,b,c; (a + b) - (a + b) == (a - b) + (b - a) == Qt()
 ``
 
 [h5 Existence of an Inverse]
 
-By now Quantifiers `Q` are
+By now `signed Quantifiers` `Q` are
 commutative monoids
 with respect to the
-operation `+` and the neutral element Q().
+`operator +` and the neutral element `Q()`.
 If the Quantifiers `CodomainT` type has an /inverse element/
-like e.g. signed numbers do,
+like e.g. `signed numbers` do,
 the `CodomainT` type is a
-commutative or abelian group.
-In this case a `TotalQuantifier` also has an
-inverse and the following law holds:
+['*commutative*] or ['*abelian group*].
+In this case a `signed Quantifier` that is also ['*total*]
+has an ['*inverse*] and the following law holds:
 
 ``
 InverseElement<Qt,== > : Qt a; (0 - a) + a == 0

Modified: sandbox/itl/libs/itl/test/test_casual/test_casual.cpp
==============================================================================
--- sandbox/itl/libs/itl/test/test_casual/test_casual.cpp (original)
+++ sandbox/itl/libs/itl/test/test_casual/test_casual.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -20,6 +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/type/nat.hpp>
 
 using namespace std;
 using namespace boost;
@@ -58,16 +59,14 @@
 
 BOOST_AUTO_TEST_CASE(casual_test)
 {
- typedef interval_map<int,int> IntervalMapT;
- typedef split_interval_map<int,int> SplitIntervalMapT;
+ typedef interval_map<int,nat> IntervalMapT;
+ typedef split_interval_map<int,nat> SplitIntervalMapT;
         
         SplitIntervalMapT left, right;
- left.add(IDv(-7,-1,1)).add(IIv(8,16,9));
- right.add(CDv(-8,-4,1)).add(IIv(8,8,9));
-
- IntervalMapT join_left;
- join_left.add(CDv(-8,-4,1));
- join_left = left;
+ //[1 2]->2
+ // [2 3]->2
+ left.add(IIv(1,2,2));
+ left.flip(IIv(2,3,3));
 
- BOOST_CHECK_EQUAL(contains(join_left,right), true);
+ BOOST_CHECK_EQUAL(left, right);
 }

Modified: sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp
==============================================================================
--- sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp (original)
+++ sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -35,6 +35,7 @@
 
 #include <boost/itl/interval_map.hpp>
 #include <boost/itl/split_interval_map.hpp>
+#include <boost/validate/type/nat.hpp>
 
 using namespace std;
 using namespace boost;

Added: sandbox/itl/libs/validate/example/labat_collector/labat_collector.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_collector/labat_collector.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,35 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+#include <boost/validate/driver/collector_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+
+void test_collector_driver()
+{
+ collector_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_collector_driver();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_collector/vc9_labat_collector.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_collector/vc9_labat_collector.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_collector"
+ ProjectGUID="{9EF72937-0585-487D-B887-5359BFA569E8}"
+ RootNamespace="vc9_labat_collector"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_collector\labat_collector.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/itl/libs/validate/example/labat_itl_morphic/labat_itl_morphic.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itl_morphic/labat_itl_morphic.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,36 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/itl_morphic_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+
+void test_itl_morphic_driver()
+{
+ itl_morphic_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_itl_morphic_driver();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itl_morphic/vc9_labat_itl_morphic.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_itl_morphic"
+ ProjectGUID="{612A0CA2-9206-4D24-8C34-D1E48D5FEC6E}"
+ RootNamespace="vc9_labat_itl_morphic"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_itl_morphic\labat_itl_morphic.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itl_order/labat_itl_order.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,47 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/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/itl/interval_set.hpp>
+#include <boost/itl_xt/numbergentor.hpp>
+#include <boost/itl_xt/setgentor.hpp>
+#include <boost/itl/functors.hpp>
+#include <boost/validate/driver/itl_order_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::itl;
+
+void test_itl_order_driver()
+{
+ itl_order_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_itl_order_driver();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_itl_order/vc9_labat_itl_order.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itl_order/vc9_labat_itl_order.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_itl_order"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4722}"
+ RootNamespace="vc9_labat_itl_order"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_itl_order\labat_itl_order.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Added: sandbox/itl/libs/validate/example/labat_itl_set/labat_itl_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itl_set/labat_itl_set.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,36 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/itl_set_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+
+void test_itl_set_driver()
+{
+ itl_set_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_itl_set_driver();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_itl_set/vc9_labat_itl_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itl_set/vc9_labat_itl_set.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_itl_set"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4723}"
+ RootNamespace="vc9_labat_itl_set"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_itl_set\labat_itl_set.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: sandbox/itl/libs/validate/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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -15,8 +15,8 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
 #include <boost/validate/gentor/gentorprofile.h>
 #include <boost/validate/gentor/rangegentor.h>
 

Modified: sandbox/itl/libs/validate/example/labat_itv_map_groupig/vc9_labat_itv_map_groupig.vcproj
==============================================================================
--- sandbox/itl/libs/validate/example/labat_itv_map_groupig/vc9_labat_itv_map_groupig.vcproj (original)
+++ sandbox/itl/libs/validate/example/labat_itv_map_groupig/vc9_labat_itv_map_groupig.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -195,6 +195,10 @@
                         UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
                         <File
+ RelativePath="..\..\..\..\boost\validate\itv_map_groupig_validater.hpp"
+ >
+ </File>
+ <File
                                 RelativePath="..\..\..\..\boost\validate\law.h"
>
                         </File>
@@ -219,10 +223,6 @@
>
                         </File>
                         <File
- RelativePath="..\..\..\..\boost\validate\realmvalidater.h"
- >
- </File>
- <File
                                 RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
>
                         </File>

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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -15,8 +15,8 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
 #include <boost/validate/gentor/gentorprofile.h>
 #include <boost/validate/gentor/rangegentor.h>
 

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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -15,8 +15,8 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
 #include <boost/validate/gentor/gentorprofile.h>
 #include <boost/validate/gentor/rangegentor.h>
 

Added: sandbox/itl/libs/validate/example/labat_signed_quantifier/labat_signed_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_signed_quantifier/labat_signed_quantifier.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,36 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/signed_quantifier_driver.hpp>
+
+using namespace std;
+using namespace boost;
+using namespace boost::itl;
+
+void test_signed_quantifier_driver()
+{
+ signed_quantifier_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_signed_quantifier_driver();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_signed_quantifier/vc9_labat_signed_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_signed_quantifier/vc9_labat_signed_quantifier.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,231 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_signed_quantifier"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4721}"
+ RootNamespace="vc9_labat_signed_quantifier"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_signed_quantifier\labat_signed_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\validater\signed_quantifier_validater.hpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: sandbox/itl/libs/validate/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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -15,8 +15,8 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
+#include <boost/validate/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>
@@ -49,8 +49,12 @@
     //map_cluster_star_pushout.setTrialsCount(1000);
     //map_cluster_star_pushout.run();
 
- typedef InplaceFlip
- <interval_map<int, int, total_enricher > > TestLawT;
+ //typedef InplaceFlip
+ // <interval_map<int, nat> > TestLawT;
+ //LawValidater<TestLawT, RandomGentor> test_law;
+
+ typedef InplaceAssociativity
+ <itl::interval_map<int, int, partial_absorber>, inplace_et> TestLawT;
         LawValidater<TestLawT, RandomGentor> test_law;
 
         //-----------------------------------------------------------------------------

Added: sandbox/itl/libs/validate/example/labat_unsigned_quantifier/labat_unsigned_quantifier.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_unsigned_quantifier/labat_unsigned_quantifier.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,37 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/validate/driver/unsigned_quantifier_driver.hpp>
+
+using namespace std;
+using namespace Loki;
+using namespace boost;
+using namespace boost::itl;
+
+void test_unsigned_quantifier_driver()
+{
+ unsigned_quantifier_driver validater;
+ cout <<
+ ">> ------------------------------------------------------ <<\n"
+ ">> -------- Law based test automaton 'LaBatea' ---------- <<\n"
+ ">> Output will be generated in a few seconds\n"
+ ">> terminate by typing <CTRL>C\n"
+ ">> ------------------------------------------------------ <<\n";
+ validater.validate();
+};
+
+
+int main()
+{
+ test_unsigned_quantifier_driver();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_unsigned_quantifier/vc9_labat_unsigned_quantifier.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_unsigned_quantifier/vc9_labat_unsigned_quantifier.vcproj 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_unsigned_quantifier"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F4720}"
+ RootNamespace="vc9_labat_unsigned_quantifier"
+ Keyword="Win32Proj"
+ TargetFrameworkVersion="131072"
+ >
+ <Platforms>
+ <Platform
+ Name="Win32"
+ />
+ </Platforms>
+ <ToolFiles>
+ </ToolFiles>
+ <Configurations>
+ <Configuration
+ Name="Debug|Win32"
+ OutputDirectory="../../../../bin/debug"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/debug"
+ ConfigurationType="1"
+ CharacterSet="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
+ MinimalRebuild="true"
+ BasicRuntimeChecks="3"
+ RuntimeLibrary="3"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="4"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="2"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ <Configuration
+ Name="Release|Win32"
+ OutputDirectory="../../../../bin/release"
+ IntermediateDirectory="../../../../bin/obj/$(ProjectName)/release"
+ ConfigurationType="1"
+ CharacterSet="1"
+ WholeProgramOptimization="1"
+ >
+ <Tool
+ Name="VCPreBuildEventTool"
+ />
+ <Tool
+ Name="VCCustomBuildTool"
+ />
+ <Tool
+ Name="VCXMLDataGeneratorTool"
+ />
+ <Tool
+ Name="VCWebServiceProxyGeneratorTool"
+ />
+ <Tool
+ Name="VCMIDLTool"
+ />
+ <Tool
+ Name="VCCLCompilerTool"
+ WholeProgramOptimization="true"
+ AdditionalIncludeDirectories="../../../../; ../../../../boost_1_35_0"
+ PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
+ ExceptionHandling="1"
+ RuntimeLibrary="2"
+ UsePrecompiledHeader="0"
+ WarningLevel="3"
+ Detect64BitPortabilityProblems="false"
+ DebugInformationFormat="3"
+ />
+ <Tool
+ Name="VCManagedResourceCompilerTool"
+ />
+ <Tool
+ Name="VCResourceCompilerTool"
+ />
+ <Tool
+ Name="VCPreLinkEventTool"
+ />
+ <Tool
+ Name="VCLinkerTool"
+ LinkIncremental="1"
+ AdditionalLibraryDirectories="../../../../lib; ../../../../stage/lib"
+ GenerateDebugInformation="true"
+ SubSystem="1"
+ OptimizeReferences="2"
+ EnableCOMDATFolding="2"
+ LinkTimeCodeGeneration="1"
+ RandomizedBaseAddress="1"
+ DataExecutionPrevention="0"
+ TargetMachine="1"
+ />
+ <Tool
+ Name="VCALinkTool"
+ />
+ <Tool
+ Name="VCManifestTool"
+ />
+ <Tool
+ Name="VCXDCMakeTool"
+ />
+ <Tool
+ Name="VCBscMakeTool"
+ />
+ <Tool
+ Name="VCFxCopTool"
+ />
+ <Tool
+ Name="VCAppVerifierTool"
+ />
+ <Tool
+ Name="VCPostBuildEventTool"
+ />
+ </Configuration>
+ </Configurations>
+ <References>
+ </References>
+ <Files>
+ <Filter
+ Name="Quelldateien"
+ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+ UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+ >
+ <File
+ RelativePath="..\..\src\gentor\gentorprofile.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\labat_unsigned_quantifier\labat_unsigned_quantifier.cpp"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Headerdateien"
+ Filter="h;hpp;hxx;hm;inl;inc;xsd"
+ UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+ >
+ <File
+ RelativePath="..\..\..\..\boost\validate\unsigned_quantifier_validater.hpp"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\law.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawvalidater.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\lawviolations.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\monoid.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\order.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\pushouts.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\laws\set_laws.h"
+ >
+ </File>
+ <File
+ RelativePath="..\..\..\..\boost\validate\typevalidater.h"
+ >
+ </File>
+ </Filter>
+ <Filter
+ Name="Ressourcendateien"
+ Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+ UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+ >
+ </Filter>
+ <File
+ RelativePath=".\ReadMe.txt"
+ >
+ </File>
+ </Files>
+ <Globals>
+ </Globals>
+</VisualStudioProject>

Modified: sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_val_relations/labat_val_relations.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -9,28 +9,11 @@
 +----------------------------------------------------------------------------*/
 #include <iostream>
 #include <stdio.h>
-
-#include <boost/itl/ptime.hpp> //CL (4 a quick test only)
-
-#include <boost/validate/loki_xt/Tuple.h>
-#include <boost/itl/set.hpp>
-#include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
-
 #include <boost/validate/itl_relations_validater.hpp>
-#include <boost/itl/interval_set.hpp>
-#include <boost/itl_xt/numbergentor.hpp>
-#include <boost/itl_xt/setgentor.hpp>
-#include <boost/itl/functors.hpp>
 
 using namespace std;
-using namespace Loki;
 using namespace boost;
 using namespace boost::itl;
-using namespace boost::posix_time;
 
 void test_Validater()
 {

Modified: sandbox/itl/libs/validate/example/labat_val_setbase/labat_val_setbase.cpp
==============================================================================
--- sandbox/itl/libs/validate/example/labat_val_setbase/labat_val_setbase.cpp (original)
+++ sandbox/itl/libs/validate/example/labat_val_setbase/labat_val_setbase.cpp 2009-02-10 09:44:00 EST (Tue, 10 Feb 2009)
@@ -9,22 +9,7 @@
 +----------------------------------------------------------------------------*/
 #include <iostream>
 #include <stdio.h>
-
-#include <boost/itl/ptime.hpp> //CL (4 a quick test only)
-
-#include <boost/validate/loki_xt/Tuple.h>
-#include <boost/itl/set.hpp>
-#include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
-#include <boost/validate/gentor/gentorprofile.h>
-#include <boost/validate/gentor/rangegentor.h>
-
 #include <boost/validate/itl_setbase_validater.hpp>
-#include <boost/itl/interval_set.hpp>
-#include <boost/itl_xt/numbergentor.hpp>
-#include <boost/itl_xt/setgentor.hpp>
-#include <boost/itl/functors.hpp>
 
 using namespace std;
 using namespace Loki;

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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -15,8 +15,8 @@
 #include <boost/validate/loki_xt/Tuple.h>
 #include <boost/itl/set.hpp>
 #include <boost/itl/map.hpp>
-#include <boost/validate/lawvalidater.h>
-#include <boost/validate/laws/monoid.h>
+#include <boost/validate/validater/law_validater.hpp>
+#include <boost/validate/laws/monoid.hpp>
 #include <boost/validate/gentor/gentorprofile.h>
 #include <boost/validate/gentor/rangegentor.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 09:44:00 EST (Tue, 10 Feb 2009)
@@ -29,26 +29,26 @@
 {
     //---------------------------------
     //standard values
- set_range_int(-10, 10);
- set_range_nat(0, 64);
- set_range_double(0.0, 1.0);
- set_range_ContainerSize(0,10);
+ //set_range_int(-10, 10);
+ //set_range_nat(0, 20);
+ //set_range_double(0.0, 1.0);
+ //set_range_ContainerSize(0,10);
 
- set_range_interval_int(-10, 10);
- set_maxIntervalLength(8);
+ //set_range_interval_int(-10, 10);
+ //set_maxIntervalLength(8);
 
- set_range_element_ContainerSize(0,5);
+ //set_range_element_ContainerSize(0,5);
 
     //---------------------------------
     //small values
- //set_range_int(-5, 5);
- //set_range_nat(0, 16);
- //set_range_double(0.0, 1.0);
- //set_range_ContainerSize(0,4);
+ set_range_int(-5, 5);
+ set_range_nat(0, 16);
+ set_range_double(0.0, 1.0);
+ set_range_ContainerSize(0,4);
 
- //set_range_interval_int(-5, 5);
- //set_maxIntervalLength(5);
- //set_range_element_ContainerSize(0,4);
+ set_range_interval_int(-5, 5);
+ set_maxIntervalLength(5);
+ set_range_element_ContainerSize(0,4);
 
     //---------------------------------
     //current values


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