Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r50525 - in sandbox/itl: boost/itl boost/itl/type_traits boost/validate boost/validate/laws libs/itl/build/win32 libs/itl/doc libs/itl_xt/test/meta_functors libs/validate/example/labat_itv_set libs/validate/example/labat_single
From: afojgo_at_[hidden]
Date: 2009-01-09 08:46:18


Author: jofaber
Date: 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
New Revision: 50525
URL: http://svn.boost.org/trac/boost/changeset/50525

Log:
Added documentation. Section Semantics, added find.
Fallback version before modifying intersection semantics for Quantifiers.
Stable {msvc-9.0, partly congcc-4.3-a7}

Added:
   sandbox/itl/boost/itl/type_traits/is_interval_separator.hpp (contents, props changed)
   sandbox/itl/boost/validate/algebra_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/itl_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/itv_map_groupig_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/itv_map_settic_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/itv_set_validater.hpp (contents, props changed)
   sandbox/itl/boost/validate/single_law_validater.hpp (contents, props changed)
   sandbox/itl/libs/itl/doc/semantics.qbk (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itv_set/
   sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp (contents, props changed)
   sandbox/itl/libs/validate/example/labat_itv_set/vc9_labat_itv_set.vcproj (contents, props changed)
Text files modified:
   sandbox/itl/boost/itl/interval_base_map.hpp | 26 ++++++++++++++++++++++++--
   sandbox/itl/boost/itl/interval_base_set.hpp | 7 +++++++
   sandbox/itl/boost/itl/interval_set.hpp | 2 +-
   sandbox/itl/boost/itl/separate_interval_set.hpp | 6 +++++-
   sandbox/itl/boost/itl/set.hpp | 1 +
   sandbox/itl/boost/validate/laws/monoid.h | 5 +++--
   sandbox/itl/boost/validate/laws/set_laws.h | 6 ++++--
   sandbox/itl/boost/validate/realmvalidater.h | 4 ++--
   sandbox/itl/boost/validate/typevalidater.h | 20 ++++++--------------
   sandbox/itl/libs/itl/build/win32/vc9_all.sln | 6 ++++++
   sandbox/itl/libs/itl/doc/concepts.qbk | 36 +++++++++++++++++++++++++++++-------
   sandbox/itl/libs/itl/doc/itl.qbk | 2 ++
   sandbox/itl/libs/itl_xt/test/meta_functors/meta_functors.cpp | 14 ++++++++++++--
   sandbox/itl/libs/validate/example/labat_single/labat_single.cpp | 25 +++++++++++++++----------
   14 files changed, 117 insertions(+), 43 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-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -268,6 +268,14 @@
     /// is the map empty?
     bool empty()const { return _map.empty(); }
 
+ //--- find --------------------------------------------------------------------
+ /// Find the interval value pair, that contains element \c x
+ const_iterator find(const DomainT& x)const
+ {
+ typename ImplMapT::const_iterator it = _map.find(interval_type(x));
+ return it;
+ }
+
     //--- contains: set view ------------------------------------------------------
     /// Does the map contain the key element \c x
     bool contains(const DomainT& x)const
@@ -507,6 +515,21 @@
     SubType& insert(const value_type& x)
         { that()->insert_(x); return *that(); }
 
+
+ SubType& set(const mapping_pair_type& x)
+ {
+ that()->set(value_type(interval_type(x.key), x.data));
+ return *that();
+ }
+
+ SubType& set(const value_type& x)
+ {
+ that()->erase_(x.KEY_VALUE);
+ that()->insert_(x);
+ return *that();
+ }
+
+
     /// Erase a base value pair from the map
     /** Erase a base value pair <tt>x=(k,y)</tt>.
         This does erase a base value pair <tt>x=(k,y)</tt> form the map, if
@@ -665,7 +688,6 @@
     )const;
 
 //@}
-
         
     iterator lower_bound(const key_type& interval)
     { return _map.lower_bound(interval); }
@@ -966,7 +988,7 @@
         {
             section.that()->add( value_type(common_interval, (*it).CONT_VALUE) );
             if(is_set<CodomainT>::value)
- section.that()->template add<inplace_star<CodomainT> >(value_type(common_interval, sectant.CONT_VALUE));
+ section.that()->template add<codomain_intersect>(value_type(common_interval, sectant.CONT_VALUE));
             else
                 section.that()->template add<codomain_combine>(value_type(common_interval, sectant.CONT_VALUE));
         }

Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -202,6 +202,13 @@
     /// is the container empty
     bool empty()const { return _set.empty(); }
 
+ /// Find the interval value pair, that contains element \c x
+ const_iterator find(const DomainT& x)const
+ {
+ typename ImplSetT::const_iterator it = this->_map.find(interval_type(x));
+ return it;
+ }
+
     /// Does the container contain the element \c x
     bool contains(const DomainT& x)const
         { return that()->contains_(interval_type(x)); }

Modified: sandbox/itl/boost/itl/interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_set.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -401,7 +401,7 @@
 struct type_to_string<itl::interval_set<Type> >
 {
     static std::string apply()
- { return "interval_set<"+ type_to_string<Type>::apply() +">"; }
+ { return "itv_set<"+ type_to_string<Type>::apply() +">"; }
 };
 
 }} // namespace itl boost

Modified: sandbox/itl/boost/itl/separate_interval_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/separate_interval_set.hpp (original)
+++ sandbox/itl/boost/itl/separate_interval_set.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -266,6 +266,10 @@
 { enum{value = true}; };
 
 template <class Type>
+struct is_interval_separator<itl::separate_interval_set<Type> >
+{ enum{value = true}; };
+
+template <class Type>
 struct is_interval_splitter<itl::separate_interval_set<Type> >
 { enum{value = false}; };
 
@@ -281,7 +285,7 @@
 struct type_to_string<itl::separate_interval_set<Type> >
 {
     static std::string apply()
- { return "separate_interval_set<"+ type_to_string<Type>::apply() +">"; }
+ { return "se_itv_set<"+ type_to_string<Type>::apply() +">"; }
 };
 
 }} // namespace itl boost

Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -41,6 +41,7 @@
 #include <boost/itl/type_traits/is_set.hpp>
 #include <boost/itl/type_traits/is_interval_container.hpp>
 #include <boost/itl/type_traits/is_interval_splitter.hpp>
+#include <boost/itl/type_traits/is_interval_separator.hpp>
 #include <boost/itl/type_traits/absorbs_neutrons.hpp>
 #include <boost/itl/type_traits/emits_neutrons.hpp>
 #include <boost/itl/set_algo.hpp>

Added: sandbox/itl/boost/itl/type_traits/is_interval_separator.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/itl/type_traits/is_interval_separator.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -0,0 +1,21 @@
+/*----------------------------------------------------------------------------+
+Copyright (c) 2008-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#ifndef __itl_type_traits_is_interval_separator_JOFA_081004_H__
+#define __itl_type_traits_is_interval_separator_JOFA_081004_H__
+
+namespace boost{ namespace itl
+{
+ template <class Type> struct is_interval_separator;
+
+ template <class Type> struct is_interval_separator{ enum {value = false}; };
+
+}} // namespace boost itl
+
+#endif
+
+

Added: sandbox/itl/boost/validate/algebra_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/algebra_validater.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 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)
++----------------------------------------------------------------------------*/
+#pragma once
+
+#include <boost/itl/type_traits/is_continuous.hpp>
+#include <boost/itl/functors.hpp>
+#include <boost/validate/lawvalidater.h>
+
+namespace boost{namespace itl
+{
+ typedef WeightedNumberGentor<int> ChoiceT;
+
+ class AlgebraValidater
+ {
+ public:
+ virtual ~AlgebraValidater(){}
+ // the choice probability, and also the availability of laws is individual to each type
+ // Somehow it has to be defined in conjunction to every type. So it is an aspect of
+ // type traits.
+ virtual void setProfile()=0;
+ virtual void validate()=0;
+ virtual void addFrequencies(ValidationCounterT&)=0;
+ virtual void addViolations(ViolationCounterT&, ViolationMapT&)=0;
+
+ virtual bool hasValidProfile()const{ return true; }
+ };
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/itl_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/itl_validater.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 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/typevalidater.h>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+ namespace RootType
+ {
+ enum RootTypes
+ {
+ itl_set, interval_set, separate_interval_set, split_interval_set,
+ itl_map, interval_map, split_interval_map,
+ Types_size
+ };
+ }
+
+ namespace DomainType
+ {
+ enum DomainTypes { Int, Double, DomainTypes_size };
+ }
+
+ namespace CodomainType
+ {
+ enum CodomainTypes { Int, Double, set_int, raw_bitset, CodomainTypes_size };
+ }
+
+ namespace NeutronHandlerType
+ {
+ enum NeutronHandlerTypes { absorber, enricher, emitter, polluter, NeutronHandlerTypes_size };
+ }
+
+
+ class itl_validater
+ {
+ public:
+ bool hasValidProfile()const { return _isValid; }
+
+ virtual void setProfile() = 0;
+ virtual AlgebraValidater* 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::absorber] = "absorber";
+ type_names[NeutronHandlerType::enricher] = "enricher";
+ type_names[NeutronHandlerType::emitter] = "emitter";
+ type_names[NeutronHandlerType::polluter] = "polluter";
+ _neutronizerChoice.setTypeNames(type_names);
+ }
+
+ AlgebraValidater* 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:
+ AlgebraValidater* _validater;
+ ValidationCounterT _frequencies;
+ ViolationCounterT _violationsCount;
+ ViolationMapT _violations;
+ bool _isValid;
+ };
+
+
+}} // namespace itl boost
+

Added: sandbox/itl/boost/validate/itv_map_groupig_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/itv_map_groupig_validater.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 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 <time.h>
+#include <boost/validate/typevalidater.h>
+#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class ItvMapGroupigValidater : public itl_validater
+ {
+ public:
+ ItvMapGroupigValidater() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::absorber] = 25;
+ _neutronizerChoice[NeutronHandlerType::enricher] = 25;
+ _neutronizerChoice[NeutronHandlerType::emitter] = 25;
+ _neutronizerChoice[NeutronHandlerType::polluter] = 25;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("ItvMapGroupigValidater::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ AlgebraValidater* 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::absorber: return new InplaceMapValidater<itl::map<int,int> >;
+ case NeutronHandlerType::enricher: return new InplaceMapValidater<itl::map<int,int,neutron_enricher > >;
+ case NeutronHandlerType::emitter : return new InplaceMapValidater<itl::map<int,int,neutron_emitter > >;
+ case NeutronHandlerType::polluter: return new InplaceMapValidater<itl::map<int,int,neutron_polluter > >;
+ 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::absorber: return new IntervalMapValidater<interval_map<int,int> >;
+ case NeutronHandlerType::enricher: return new IntervalMapValidater<interval_map<int,int,neutron_enricher > >;
+ case NeutronHandlerType::emitter : return new IntervalMapValidater<interval_map<int,int,neutron_emitter > >;
+ case NeutronHandlerType::polluter: return new IntervalMapValidater<interval_map<int,int,neutron_polluter > >;
+ 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::absorber: return new IntervalMapValidater<split_interval_map<int,int> >;
+ case NeutronHandlerType::enricher: return new IntervalMapValidater<split_interval_map<int,int,neutron_enricher > >;
+ case NeutronHandlerType::emitter : return new IntervalMapValidater<split_interval_map<int,int,neutron_emitter > >;
+ case NeutronHandlerType::polluter: return new IntervalMapValidater<split_interval_map<int,int,neutron_polluter > >;
+ 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/itv_map_settic_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/itv_map_settic_validater.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 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/typevalidater.h>
+#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class ItvMapSetticValidater : public itl_validater
+ {
+ public:
+ ItvMapSetticValidater() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 0;
+ _rootChoice[RootType::interval_set] = 0;
+ _rootChoice[RootType::separate_interval_set] = 0;
+ _rootChoice[RootType::split_interval_set] = 0;
+ _rootChoice[RootType::itl_map] = 33;
+ _rootChoice[RootType::interval_map] = 33;
+ _rootChoice[RootType::split_interval_map] = 34;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 100;
+ _domainChoice[DomainType::Double] = 0;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 0;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 100;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::absorber] = 50;
+ _neutronizerChoice[NeutronHandlerType::enricher] = 50;
+ _neutronizerChoice[NeutronHandlerType::emitter] = 0;
+ _neutronizerChoice[NeutronHandlerType::polluter] = 0;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("ItvMapSetticValidater::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ AlgebraValidater* 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::absorber: return new InplaceMapValidater<itl::map<int,itl::set<int> > >;
+ case NeutronHandlerType::enricher: return new InplaceMapValidater<itl::map<int,itl::set<int>,neutron_enricher> >;
+ //case NeutronHandlerType::emitter : return new InplaceMapValidater<itl::map<int,itl::set<int>,neutron_emitter > >;
+ 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::absorber: return new IntervalMapValidater<interval_map<int,itl::set<int> > >;
+ case NeutronHandlerType::enricher: return new IntervalMapValidater<interval_map<int,itl::set<int>,neutron_enricher> >;
+ //case NeutronHandlerType::emitter : return new IntervalMapValidater<interval_map<int,itl::set<int>,neutron_emitter > >;
+ 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::absorber: return new IntervalMapValidater<split_interval_map<int,itl::set<int> > >;
+ case NeutronHandlerType::enricher: return new IntervalMapValidater<split_interval_map<int,itl::set<int>,neutron_enricher> >;
+ //case NeutronHandlerType::emitter : return new IntervalMapValidater<split_interval_map<int,itl::set<int>,neutron_emitter > >;
+ 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/itv_set_validater.hpp
==============================================================================
--- (empty file)
+++ sandbox/itl/boost/validate/itv_set_validater.hpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 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 <time.h>
+#include <boost/validate/typevalidater.h>
+#include <boost/validate/itl_validater.hpp>
+#include <boost/validate/utility.hpp>
+
+namespace boost{namespace itl
+{
+
+ class ItvSetValidater : public itl_validater
+ {
+ public:
+ ItvSetValidater() { setProfile(); }
+
+
+ void setProfile()
+ {
+ setValid(true);
+ _rootChoice.setSize(RootType::Types_size);
+ _rootChoice.setMaxWeights(100);
+ _rootChoice[RootType::itl_set] = 25;
+ _rootChoice[RootType::interval_set] = 25;
+ _rootChoice[RootType::separate_interval_set] = 25;
+ _rootChoice[RootType::split_interval_set] = 25;
+ _rootChoice[RootType::itl_map] = 0;
+ _rootChoice[RootType::interval_map] = 0;
+ _rootChoice[RootType::split_interval_map] = 0;
+ setRootTypeNames();
+ _rootChoice.init();
+
+ _domainChoice.setSize(DomainType::DomainTypes_size);
+ _domainChoice.setMaxWeights(100);
+ _domainChoice[DomainType::Int] = 50;
+ _domainChoice[DomainType::Double] = 50;
+ setDomainTypeNames();
+ _domainChoice.init();
+
+ _codomainChoice.setSize(CodomainType::CodomainTypes_size);
+ _codomainChoice.setMaxWeights(100);
+ _codomainChoice[CodomainType::Int] = 100;
+ _codomainChoice[CodomainType::Double] = 0;
+ _codomainChoice[CodomainType::set_int] = 0;
+ setCodomainTypeNames();
+ _codomainChoice.init();
+
+ _neutronizerChoice.setSize(NeutronHandlerType::NeutronHandlerTypes_size);
+ _neutronizerChoice.setMaxWeights(100);
+ _neutronizerChoice[NeutronHandlerType::absorber] = 100;
+ _neutronizerChoice[NeutronHandlerType::enricher] = 0;
+ _neutronizerChoice[NeutronHandlerType::emitter] = 0;
+ _neutronizerChoice[NeutronHandlerType::polluter] = 0;
+ setNeutronHandlerTypeNames();
+ _neutronizerChoice.init();
+
+ if(!_rootChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _rootChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
+ }
+
+ if(!_domainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _domainChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
+ }
+
+ if(!_codomainChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _codomainChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
+ }
+
+ if(!_neutronizerChoice.is_consistent())
+ {
+ setValid(false);
+ std::cout << _neutronizerChoice.inconsitencyMessage("ItvSetValidater::setProfile()") << std::endl;
+ }
+
+ }
+
+
+ AlgebraValidater* chooseValidater()
+ {
+ int rootChoice = _rootChoice.some();
+ int domainChoice = _domainChoice.some();
+ int codomainChoice = _codomainChoice.some();
+ int neutronizerChoice = _neutronizerChoice.some();
+
+ switch(rootChoice)
+ {
+ case RootType::itl_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new InplaceSetValidater<itl::set<int> >;
+ case DomainType::Double: return new InplaceSetValidater<itl::set<double> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::itl_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new IntervalSetValidater<interval_set<int> >;
+ case DomainType::Double: return new InplaceSetValidater<interval_set<double> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::separate_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new IntervalSetValidater<separate_interval_set<int> >;
+ case DomainType::Double: return new IntervalSetValidater<separate_interval_set<double> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ case RootType::split_interval_set: {
+ switch(domainChoice) {
+ case DomainType::Int: return new IntervalSetValidater<split_interval_set<int> >;
+ case DomainType::Double: return new IntervalSetValidater<split_interval_set<double> >;
+ default: return choiceError(ITL_LOCATION("\nRootType::split_interval_set: domainChoice:\n"),
+ domainChoice, _domainChoice);
+ }
+ }
+ 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/laws/monoid.h
==============================================================================
--- sandbox/itl/boost/validate/laws/monoid.h (original)
+++ sandbox/itl/boost/validate/laws/monoid.h 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -213,7 +213,7 @@
               template<class>class Accumulator = inplace_plus,
               template<class>class Equality = itl::std_equal>
     class InplaceAssociativity
- : public Law<InplaceAssociativity<Type,Accumulator>,
+ : 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'
@@ -227,7 +227,8 @@
         std::string typeString()const
         {
             return "Associativity<"+type_to_string<Type>::apply()+","
- +unary_template_to_string<Accumulator>::apply()+">";
+ +unary_template_to_string<Accumulator>::apply()+","
+ +unary_template_to_string<Equality>::apply()+">";
         }
 
     public:

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-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -83,7 +83,7 @@
                 typedef typename inverse<Combiner<Type> >::type InverseCombinerT;
 
         std::string name()const { return "InplaceInverseRemovability"; }
- std::string formula()const { return "a -= a; a == 0"; }
+ std::string formula()const { return "(0-a) + a == 0"; }
 
         std::string typeString()const
         {
@@ -130,6 +130,7 @@
                      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)
@@ -229,6 +230,7 @@
                      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)
@@ -296,7 +298,7 @@
                      LOKI_TYPELIST_3(Type,Type,Type), LOKI_TYPELIST_2(Type,Type)>
     {
         /** (a + b) - c == (a - c) + (b - c)
- computed using inplace operators +=, += and *=
+ computed using inplace operators +=, -= and *=
         Input = (a := inVal1, b := inVal2, c := inVal3)
         Output = (lhs_result, rhs_result)
         */

Modified: sandbox/itl/boost/validate/realmvalidater.h
==============================================================================
--- sandbox/itl/boost/validate/realmvalidater.h (original)
+++ sandbox/itl/boost/validate/realmvalidater.h 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -137,8 +137,8 @@
                 }
             case RootType::separate_interval_set: {
                     switch(domainChoice) {
- case DomainType::Int: return new IntervalSetValidater<split_interval_set<int> >;
- case DomainType::Double: return new IntervalSetValidater<split_interval_set<double> >;
+ case DomainType::Int: return new IntervalSetValidater<separate_interval_set<int> >;
+ case DomainType::Double: return new IntervalSetValidater<separate_interval_set<double> >;
                     default: return choiceError(ITL_LOCATION("\nRootType::separate_interval_set: domainChoice:\n"),
                                                 domainChoice, _domainChoice);
                     }

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

Modified: sandbox/itl/boost/validate/typevalidater.h
==============================================================================
--- sandbox/itl/boost/validate/typevalidater.h (original)
+++ sandbox/itl/boost/validate/typevalidater.h 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -275,20 +275,10 @@
             case strictWeakStdOrder: return _lessValidater.chooseValidater();
             case partialStdOrder: return _lessEqualValidater.chooseValidater();
             case containedInOrder: return _containedInValidater.chooseValidater();
- case inplacePlusAssociativity:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value
- && absorbs_neutrons<Type>::value && emits_neutrons<Type>::value)
- return new LawValidater<InplaceAssociativity<Type, inplace_plus, element_equal>, RandomGentor>;
- else
- return new LawValidater<InplaceAssociativity<Type>, RandomGentor>;
+ case inplacePlusAssociativity: return new LawValidater<InplaceAssociativity<Type>, RandomGentor>;
             case inplacePlusNeutrality: return new LawValidater<InplaceNeutrality<Type>, RandomGentor>;
             case inplacePlusCommutativity: return new LawValidater<InplaceCommutativity<Type>, RandomGentor>;
- case inplaceStarAssociativity:
- if( is_interval_container<Type>::value && is_interval_splitter<Type>::value
- && absorbs_neutrons<Type>::value && emits_neutrons<Type>::value)
- return new LawValidater<InplaceAssociativity<Type, inplace_star, element_equal>, RandomGentor>;
- else
- return new LawValidater<InplaceAssociativity<Type, inplace_star>, RandomGentor>;
+ case inplaceStarAssociativity: return new LawValidater<InplaceAssociativity<Type, inplace_star>, RandomGentor>;
             case inplaceStarCommutativity: return new LawValidater<InplaceCommutativity<Type, inplace_star>, RandomGentor>;
             default: return NULL;
             }
@@ -417,7 +407,8 @@
                                 return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_star, itl::std_equal>, RandomGentor>;
 
             case inplaceStarDeMorgan:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
+ if( itl::is_interval_container<Type>::value
+ && (itl::is_interval_splitter<Type>::value || itl::is_interval_separator<Type>::value))
                                         return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::element_equal>, RandomGentor>;
                                 else
                                         return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::std_equal>, RandomGentor>;
@@ -460,7 +451,8 @@
                                 return new LawValidater<InplaceDeMorgan<Type, inplace_plus, inplace_star, itl::std_equal>, RandomGentor>;
 
             case inplaceStarDeMorgan:
- if( itl::is_interval_container<Type>::value && itl::is_interval_splitter<Type>::value)
+ if( itl::is_interval_container<Type>::value
+ && (itl::is_interval_splitter<Type>::value || itl::is_interval_separator<Type>::value))
                                         return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::element_equal>, RandomGentor>;
                                 else
                                         return new LawValidater<InplaceDeMorgan<Type, inplace_star, inplace_plus, itl::std_equal>, RandomGentor>;

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-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -53,6 +53,8 @@
 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
 Global
         GlobalSection(SolutionConfigurationPlatforms) = preSolution
                 Debug|Win32 = Debug|Win32
@@ -163,6 +165,10 @@
                 {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
         EndGlobalSection
         GlobalSection(SolutionProperties) = preSolution
                 HideSolutionNode = FALSE

Modified: sandbox/itl/libs/itl/doc/concepts.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/concepts.qbk (original)
+++ sandbox/itl/libs/itl/doc/concepts.qbk 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -240,13 +240,16 @@
 
 [table
 [[Trait][]]
-[[__absorber__][value pairs that carry neutrons `(x,0)` are never stored]]
-[[__enricher__][value pairs that carry neutrons `(x,0)` are never deleted by subtract]]
-[[__emitter__] [all value pairs that don't carry protons have neutrons as mapped values.]]
+[[__absorber__][Value pairs that carry neutrons `(x,0)` are never stored]]
+[[__enricher__][Value pairs that carry neutrons `(x,0)` are never deleted by subtract]]
+[[__emitter__] [All value pairs that don't carry protons are mapped to neutrons as a default.
+ But those neutrons are not stored in the map.]]
+[[__polluter__][All value pairs that don't carry protons are mapped to neutrons as a default.
+ In addition, associated neutrons that emerge from aggregations are stored.]]
 ]
 
 Note, that a neutron is defined in relation to a combiner operation. In many cases
-this relation is straight and often covered by the default parameters of itl `Maps`.
+this relation is provided by the default parameters of itl `Maps`.
 
 [table
 [[type] [operation] [neutron]]
@@ -256,7 +259,7 @@
 ]
 
 In those cases the `neutron` value is delivered by the default constructor
-of a type. But there are well known exceptions like for numeric multiplication:
+of a type. But there are well known exceptions like e.g. numeric multiplication:
 
 [table
 [[type] [operation] [neutron]]
@@ -287,7 +290,7 @@
 __absorber__. To be a __absorber__ is the default setting
 for the Trait parameter. Moreover a __absorber__ is able
 to erase a pair `(x,y)` from a map `{(x,y)}` by calling
-`subtract((x,y))` or `operator -`:
+`subtract((x,y))` or `operator - ` .
 
 ``{(x,y)} - (x,y) == {}``
 
@@ -324,7 +327,8 @@
 neutron value for every key value, that has not been set or
 aggregated to a value unequal to the `neutron` value.
 
-That way a __emitter__ map is an ['*infinite vector*], that
+That way a __emitter__ map is a ['*large*] or
+theoretically ['*infinite vector*], that
 is always initialized with neutron values.
 
 Of course those initial neutronic values for all keys of the
@@ -332,6 +336,24 @@
 implementation is as minimal as the implementation of an
 __absorber__.
 
+[h4 Neutron Polluter]
+
+A __polluter__ combines the characteristics of a __emitter__
+and a __enticher__. Value pairs, that emerged due to aggregations
+and carry `neutron` values are actually stored. All value pairs,
+that are not represented carry `neutrons` via default but are not stored.
+
+['Neutronic traits] can be summarized as follows
+
+[table
+[[] [] [absorbs neutrons] []]
+[[] [] [true] [false]]
+[[[*emits neutrons]][false] [__absorber__] [__enricher__]]
+[[] [true] [__emitter__] [__polluter__]]
+]
+
+
+
 [endsect] [/ kind of nuclear]
 
 [endsect][/ Concepts]

Modified: sandbox/itl/libs/itl/doc/itl.qbk
==============================================================================
--- sandbox/itl/libs/itl/doc/itl.qbk (original)
+++ sandbox/itl/libs/itl/doc/itl.qbk 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -86,6 +86,7 @@
 [def __enricher__ [classref boost::itl::neutron_enricher neutron_enricher]]
 [def __enrichers__ [classref boost::itl::neutron_enricher neutron_enrichers]]
 [def __emitter__ [classref boost::itl::neutron_emitter neutron_emitter]]
+[def __polluter__ [classref boost::itl::neutron_emitter neutron_polluter]]
 
 [def __itv_bse_set__ [classref boost::itl::interval_base_set interval_base_set]]
 [def __e [link element_type *e*]]
@@ -127,6 +128,7 @@
 [include introduction.qbk]
 [include examples.qbk]
 [include concepts.qbk]
+[include semantics.qbk]
 [include interface.qbk]
 [include acknowledgments.qbk]
 [xinclude itldoc.xml]

Added: sandbox/itl/libs/itl/doc/semantics.qbk
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/itl/doc/semantics.qbk 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -0,0 +1,608 @@
+[/
+ Copyright (c) 2008-2008 Joachim Faulhaber
+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENSE_1_0.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
+]
+
+[section Semantics]
+
+In the *itl* we follow the notion, that the semantics of a ['*concept*] or an
+['*abstract data type*] can be expressed by ['*laws*]. In the *itl* we formulate
+laws over interval containers that can be evaluated for a given
+instantiation of the variables contained in the law. The following
+pseudocode gives a shorthand notation of such a law.
+``
+Commutativity<typename T>
+T a, b: a + b == b + a;
+``
+This can of course be coded as a proper c++ class template which has
+been done for the validation of the *itl*. For sake of simplicity
+we will use pseudocode here.
+
+The laws that describe the semantics of the *itl's* class templates
+were validated using the Law based Test Automaton ['*LaBatea*],
+a tool that generates instances for the law's variables and then
+tests it's validity.
+
+Since the *itl* deals with sets, maps and orderings, that are
+well known objects from mathematics, the laws that we are
+using are mostly /recycled/ ones. Also some of those laws are grouped
+in notions like e.g. /orderings/ or /algebras/.
+
+[section Orderings and Equivalences]
+
+[h4 Lexicographical Ordering and Equality]
+
+On all set and map containers of the itl, there is an `operator <`
+that implements a
+[@http://www.sgi.com/tech/stl/StrictWeakOrdering.html strict weak ordering]
+(see also [@http://en.wikipedia.org/wiki/Strict_weak_ordering here]).
+The semantics of `operator <` is the same as for the stl's
+AssociativeContainer, especially stl::set and stl::map:
+``
+Irreflexivity<T,< > : T a; !(a<a)
+Asymmetry<T,< > : T a,b; a<b implies !(b<a)
+Transitivity<T,< > : T a,b,c; a<b && b<c implies a<c
+``
+
+`Operator <` depends on the itl::container's template parameter
+`Compare` that implements a ['strict weak ordering] for the container's
+`key_type`.
+For a given `Compare` ordering, `operator <` implements a
+lexicographical comparison on itl::containers, that uses the
+`Compare` order to establish a unique sequence of values in
+the container.
+
+The induced equivalence of `operator <` is lexicographical
+equality which is implementd as `operator ==`.
+``
+//equivalence induced by strict weak ordering <
+!(a<b) && !(b<a) implies a == b;
+``
+Again this
+follows the semantics of the *stl*.
+Lexicographical equality is finer than the equality
+of elements. Two containers that contain the same elements
+can be lexicographically unqueal, if their elements are
+differently sorted.
+
+Lexicographical comparison belongs to the __iterative__
+aspect. Of all the different sequences that are valid
+for unordered sets and maps, one such sequence is
+selected by the Compare order of elements. Based on
+this selection a unique iteration is possible.
+
+[h4 Subset Ordering and Element Equality]
+
+On the __conceptual__ aspect only membeship of elements
+matters, not their sequence. So there are functions
+`contained_in` and `element_equal` that implement
+the subset relation and the equality on elements.
+
+Yet, `contained_in` and `is_element_equal` functions are not
+really working on the level of elements. They also
+work on the basis of the containers templates
+`Compare` parameter. In practical terms we need to
+distinguish between lexicographical equality
+`operator ==` and equality of elements `is_element_equal`,
+if we work with interval splitting interval containers:
+``
+split_interval_set<time> w1, w2; //Pseudocode
+w1 = {[Mon .. Sun)}; //split_interval_set containing a week
+w2 = {[Mon .. Fri)[Sat .. Sun)}; //Same week split in work and week end parts.
+w1 == w2; //false: Different segmentation
+is_element_equal(w1,w2); //true: Same elements contained
+``
+
+So for a constant `Compare` order on key elements,
+memberfuntion `contained_in` that is defined for all
+itl::containers implements a
+[@http://en.wikipedia.org/wiki/Partially_ordered_set partial order]
+on itl::containers.
+
+``
+with <= for contained_in,
+ = for is_element_equal:
+Reflexivity<T,<= > : T a; a<=a
+Antisymmetry<T,<=,=> : T a,b; a<=b && b<=a implies a=b
+Transitivity<T,<= > : T a,b,c; a<=b && b<=c implies a<c
+``
+
+The induced equivalence is the equality of elements that
+is implemented via function `is_element_equal`.
+``
+//equivalence induced by the partial ordering contained_in on itl::container a,b
+a.contained_in(b) && b.conainted_in(a) implies is_element_equal(a, b);
+``
+
+[endsect][/ Orderings and Equivalences]
+
+[section Sets]
+
+For all set types `S` that are models concept `Set`
+(__itl_set__, __itv_set__, __sep_itv_set__ and __spl_itv_set__)
+most of the well known mathematical
+[@http://en.wikipedia.org/wiki/Algebra_of_sets laws on sets]
+were successfully checked via LaBatea. The next tables
+are giving an overview over the checked laws ordered by
+operations. If possible, the laws are formulated with
+the stronger lexicographical equality (`operator ==`)
+which implies the the laws validity for the weaker
+element equality `is_element_equal`. Throughout this
+chapter we will denote element equality as `=e=` instead
+of `is_element_equal` where a short notation is advantageous.
+
+[h5 Laws on set union]
+
+For the operation ['*set union*] available as
+`operator +, +=, |, |=` and the neutral element
+`neutron<S>::value()` which is the empty set `T()`
+these laws hold:
+``
+Associativity<S,+,== >: S a,b,c: a+(b+c) == (a+b)+c
+Neutrality<S,+,== > : S a: a+S() == a
+Commutativity<S,+,== >: S a,b: a+b == b+a
+``
+
+[h5 Laws on set intersection]
+
+For the operation ['*set intersection*] available as
+`operator *, *=, &, &=` these laws were validated:
+
+``
+Associativity<S,*,== >: S a,b,c: a*(b*c) == (a*b)*c
+Commutativity<S,*,== >: S a,b: a*b == b*a
+``
+
+Neutrality has *not* been validated to avoid
+additional requirements on the sets template
+parameters.
+
+[h5 Laws on set difference]
+
+For set difference there are only these laws. It is
+not associative and not commutative. It's neutrality
+is non symmetrical.
+
+``
+RightNeutrality<S,-,== > : S a: a-S() == a
+SelfRemovability<S,-,== >: S a: a - a == S()
+``
+
+Summarized in the next table are laws that use `+`, `*` and `-`
+as a single operation. For all validated laws,
+the left and right hand sides of the equations
+are lexicographically equal, as denoted by `==` in the cells
+of the table.
+
+``
+ + * -
+Associativity == ==
+Neutrality == ==
+Commutativity == ==
+SelfRemovability ==
+``
+
+[h5 Distributivity Laws]
+
+Laws, like distributivity, that use more than one operation can
+sometimes be instantiated for different sequences of operators
+as can be seen below. In the two instantiations of the distributivity
+laws operators `+` and `*` are swapped. So we can have small operator
+signatures like `+,*` and `*,+` to describe such instantiations,
+which will be used below.
+Not all instances of distributivity laws hold for lexicographical equality.
+Therefore they are denoted using a /variable/ equality `=v=` below.
+
+``
+ Distributivity<S,+,*,=v= > : S a,b,c: a + (b * c) =v= (a + b) * (a + c)
+ Distributivity<S,*,+,=v= > : S a,b,c: a * (b + c) =v= (a * b) + (a * c)
+RightDistributivity<S,+,-,=v= > : S a,b,c: (a + b) - c =v= (a - c) + (b - c)
+RightDistributivity<S,*,-,=v= > : S a,b,c: (a * b) - c =v= (a - c) * (b - c)
+``
+
+The next table shows the relationship between
+law instances,
+[link boost_itl.introduction.interval_combining_styles interval combining style]
+and the
+used equality relation.
+
+``
+ +,* *,+
+ Distributivity joining == ==
+ separating == ==
+ splitting =e= =e=
+
+ +,- *,-
+RightDistributivity joining == ==
+ separating == ==
+ splitting =e= ==
+``
+
+The table gives an overview over 12 instantiations of
+the four distributivity laws and shows the equalities
+which the instantiations holds for. For instance
+`RightDistributivity` with operator signature `+,-`
+instantiated for __spl_itv_sets__ holds only for
+element equality (denoted as `=e=`):
+``
+RightDistributivity<S,+,-,=e= > : S a,b,c; (a + b) - c =e= (a - c) + (b - c)
+``
+The remaining five instantiations of `RightDistributivity`
+are valid for lexicographical equality (demoted as `==`) as well.
+
+[link boost_itl.introduction.interval_combining_styles Interval combining styles]
+correspond to containers according to
+``
+style set
+joining interval_set, itl::set
+separating separate_interval_set
+splitting split_interval_set
+``
+where the __itl_set__ of elements can be subsumed in the `joining` rows.
+
+
+Finally there are two laws that combine all three major set operations:
+De Mogans Law and Symmetric Difference.
+
+[h5 DeMorgan's Law]
+
+De Morgans Law is better known in an incarnation where the unary
+complement operation `~` is used. `~(a+b) == ~a * ~b`. The version
+below is an adaption for the binary set difference `-`, which is
+also called ['*relative complement*].
+``
+DeMorgan<S,+,*,=v= > : S a,b,c: a - (b + c) =v= (a - b) * (a - c)
+DeMorgan<S,*,+,=v= > : S a,b,c: a - (b * c) =v= (a - b) + (a - c)
+``
+
+``
+ +,* *,+
+DeMorgan joining == ==
+ separating == =e=
+ splitting == =e=
+``
+
+Again not all law instances are valid for lexicographical equality.
+The second instantiations only holds for element equality, if
+the interval sets are non joining.
+
+[h5 Symmetric Difference]
+
+``
+SymmetricDifference<S,== > : S a,b,c: (a + b) - (a * b) == (a - b) + (b - a)
+``
+
+Finally Symmetrical Difference holds for all of itl set types and
+lexicographical equality.
+
+[/ pushout laws]
+
+[endsect][/ Sets]
+
+[section Maps]
+
+By definition a map is set of pairs. So we would expect maps to
+obey the same laws that are valid for sets. Yet
+the semantics of the *itl's* maps may be a different one, because
+of it's aggregating facilities, where the aggregating combiner
+operations are passed to combine the map's associated values.
+
+It turnes out, that the aggregation on overlap principle
+induces semantical properties to itl maps in such a way,
+that the set of equations that are valid will depend on
+the semantics of the type `CodomainT` of the map's associated
+values.
+
+This is less magical as it might seem at first glance.
+If for instance, if we instantiate an __itv_map__ to
+collect and concatenate
+`std::strings` associated to intervals,
+
+``
+interval_map<int,std::string> cat_map;
+cat_map += make_pair(interval<int>::rightopen(1,5),std::string("Hello"));
+cat_map += make_pair(interval<int>::rightopen(3,7),std::string(" World"));
+cout << "cat_map: " << cat_map << endl;
+``
+
+we won't be able to apply `operator -=`
+``
+// This will not compile because string::operator -= is missing.
+cat_map -= make_pair(interval<int>::rightopen(3,7),std::string(" World"));
+``
+because, as std::sting does not implement `-=` itself, this won't compile.
+So all *laws*, that rely on `operator -=` or `-` not only will not be valid they
+can not even be stated.
+This reduces the set of laws that can be valid for a richer `CodomainT`
+type to a smaller set of laws and thus to a less restricted semantics.
+
+Currently we have investigated and validated two major instantiations
+of itl::Maps,
+
+* ['*Maps of Sets*] that will be called ['*Collectors*] and
+* ['*Maps of Numbers*] which will be called ['*Quantifiers*]
+
+both of which seem to have many interesting usecases for practical
+applications. The semantics associated with the term /Numbers/
+is a
+[@http://en.wikipedia.org/wiki/Monoid commutative monoid]
+for unsigned numbers
+and a
+[@http://en.wikipedia.org/wiki/Abelian_group commutative or abelian group]
+for signed numbers.
+From a practical point of view we can think
+of numbers as counting or quantifying the key values
+of the map.
+
+
+[h4 Summary of Collector and Quantifier Semantics]
+
+Itl `Maps of Sets` of `Collectors`
+are models of a concept `Set` which implies that all laws that have been
+stated as a semantics for `itl::Sets` in the previous chapter also hold for
+`Maps of Sets`.
+
+Itl `Maps of Numbers` of `Quantifiers` on the contrary are not models of concept `Set`.
+But there is a substantial intersection of laws that apply both for
+`Collectors` and `Quantifiers`. `Maps of Numbers` appear to be a models
+of a concept `InfiniteVector` instead.
+
+[table
+[[Kind of Map] [Alias] [Behavior] ]
+[[Maps of Sets] [Collector] [Collects items *for* key values] ]
+[[Maps of Numbers][Quantifier][Counts or quantifies *the* key values]]
+]
+
+In the next two sections the law based semantics of `Maps of Sets` (Collectors)
+and `Maps of Numbers` (Quantifiers) will be described in more detail.
+
+[endsect][/ Maps]
+
+[section Collectors: Maps of Sets]
+
+`Itl Maps of Sets` or `Collectors`, behave like `Sets`.
+This can be understood easily, if we consider, that
+ervery map of sets can be transformed to an equivalent
+set of pairs.
+For instance
+``
+//Pseudocode:
+itl::map<int,set<int> > m = {(1->{1,2}), (2->{1})}; //is equivalent to
+itl::set<pair<int,int> > s = {(1,1),(1,2), //representing 1->{1,2}
+ (2,1) }; //representing 2->{1}
+``
+
+Also the results of add, subtract and other operations on `map m` and `set s`
+preserves the equivalence of the containers ['*almost*] perfectly:
+``
+m += (1,3);
+m == {(1->{1,2,3}), (2->{1})}; //aggregated on collision of key value 1
+s += (1,3);
+s == {(1,1),(1,2),(1,3), //representing 1->{1,2,3}
+ (2,1) }; //representing 2->{1}
+``
+
+The equivalence of `m` and `s` is only violated if an
+empty set occures in `m` by subtraction of a value pair:
+``
+m -= (2,1);
+m == {(1->{1,2,3}), (2->{})}; //aggregated on collision of key value 2
+s -= (2,1);
+s == {(1,1),(1,2),(1,3) //representing 1->{1,2,3}
+ }; //2->{} is not represented in s
+``
+
+This problem can be dealt with in two ways.
+
+# Deleting value pairs form the Collector, if it's associated value
+ becomes a neutral value or `neutron`.
+# Using a different equality, called protonic equality in the laws
+ to validate. Protonic equality `is_protonic_equal` or `=p=` only
+ accounts for value pairs that that carry values unequal to the `neutron` value.
+
+Solution (1) led to the introduction of map traits, particularly trait
+neutron_absorber trait which is the default setting in all itl's map
+templates.
+
+Solution (2), is applied to check the semantics of itl::Maps for the
+neutron_enricher trait that does not delete value pairs that carry
+neutrons. Protonic equality is implemented by a non member function
+called `is_protonic_equal`. Througout this chapter
+protonic equality in pseudocode and law denotations is denoted
+as `=p=` operator.
+
+The validity of the sets of laws that make up `Set` semantics
+should now be quite evident. So the following text shows the
+laws that are validated for all `Collector` types `C`. Which are
+__itl_map__`<D,S,T>`, __itv_map__`<D,S,T>` and __spl_itv_map__`<D,S,T>`
+where `CodomainT` type `S` is a model of `Set` and `Trait` type `T` is either
+__absorber__ or __enricher__.
+
+
+[h5 Laws on set union, set intersection and set difference]
+
+``
+Associativity<C,+,== >: C a,b,c: a+(b+c) == (a+b)+c
+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
+
+RightNeutrality<C,-,== > : C a: a-C() == a
+SelfRemovability<C,-,=v= >: C a: a - a =v= C()
+``
+
+All the fundamental laws could be validated for all
+itl Maps in their instantiation as Maps of Sets or Collectors.
+As expected SelfRmovability only holds for protonic equality,
+if the map is not a `neutron_absorber`.
+
+``
+ + * -
+Associativity == ==
+Neutrality == ==
+Commutativity == ==
+SelfRemovability neutron_absorber ==
+ neutron_enricher =p=
+``
+
+[h5 Distributivity Laws]
+
+``
+ Distributivity<C,+,*,=v= > : C a,b,c: a + (b * c) =v= (a + b) * (a + c)
+ Distributivity<C,*,+,=v= > : C a,b,c: a * (b + c) =v= (a * b) + (a * c)
+RightDistributivity<C,+,-,=v= > : C a,b,c: (a + b) - c =v= (a - c) + (b - c)
+RightDistributivity<C,*,-,=v= > : C a,b,c: (a * b) - c =v= (a - c) * (b - c)
+``
+
+Results for the distributivity laws are almost identical to
+the validation of sets except that
+for a `neutron_enricher map` the law `(a * b) - c == (a - c) * (b - c)`
+holds for lexicographical equality.
+
+``
+ +,* *,+
+ Distributivity joining == ==
+ splitting neutron_absorber =e= =e=
+ neutron_enricher =e= ==
+
+ +,- *,-
+RightDistributivity joining == ==
+ splitting =e= ==
+``
+
+[h5 DeMorgan's Law and Symmetric Difference]
+
+``
+DeMorgan<C,+,*,=v= > : C a,b,c: a - (b + c) =v= (a - b) * (a - c)
+DeMorgan<C,*,+,=v= > : C a,b,c: a - (b * c) =v= (a - b) + (a - c)
+``
+
+``
+ +,* *,+
+DeMorgan joining == ==
+ splitting == =e=
+``
+
+``
+SymmetricDifference<C,== > : C a,b,c: (a + b) - (a * b) == (a - b) + (b - a)
+``
+
+Reviewing the validity tables above shows, that the sets of valid laws for
+`itl Sets` and `itl Maps of Sets` that are /neutron absorbing/ are exactly the same.
+As expected, only for Maps of Sets that represent empty sets as associated values,
+called /neutron enrichers/, there are marginal semantical differences.
+
+[endsect][/ Collectors]
+
+[section Quantifiers: Maps of Numbers]
+
+With `Sets` and `Collectors` the semantics of
+`operator -` is
+that of /set difference/ which means, that you can
+only subtract what has been put into the container before.
+With `Quantifiers` that ['*count*] or ['*quantify*]
+their key values in some way,
+the semantics of `operator -` may be different.
+
+The question is how subtraction should be defined here?
+``
+//Pseudocode:
+itl::map<int,some_number> q = {(1->1)};
+q -= (2->1);
+``
+If type `some_number` is `unsigned` a /set difference/ kind of
+still subtraction make sense
+``
+itl::map<int,some_number> q = {(1->1)};
+q -= (2->1); // key 2 is not not in the map so
+q == {(1->1)}; // q is unchanged by 'aggregate on collision'
+``
+If `some_number` is a `signed` numerical type
+the result can also be this
+``
+itl::map<int,some_number> q = {(1->1)};
+q -= (2->1); // subtracting works like
+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.
+
+Another model, that we can think of, is that in a `Quantifier`
+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.
+So a `Quantifier` that has a signed numerical codomain type can be
+conceived as an `InfiniteVector`.
+
+To become an infinite vector
+that is totally defined on it's domain we can set
+the map's `Trait` parameter to the value __emitter__.
+
+[table
+[[Trait] [CodomainT as number] [CodomainT more abstract] [Concept for Quanifier Map]]
+[[emits_neutrons] [signed number] [commutative group] [InfiniteVector]]
+[[!emits_neutrons] [unsigned number] [commutative monoid] [hybrid type]]
+]
+
+Another difference between `Collectors` and `Quantifiers`
+is the semantics of `operator *`, that has the meaing of
+set intersection for `Collectors`.
+
+For the aggregate on overlap principle the operation `*`
+has to be passed to combine associated values on overlap
+of intervals or collision of keys. This can not be done
+for `Quantifiers`, since numeric types do not implement
+intersection.
+
+[/ JODO * degeneriert zu +, + wird vector addition, - wird vector subraction, scalarprodukt kann definiert werden]
+
+[/ JODO nur den InfiniteVector Fall beschreiben? Wie könnte man denn den hybrid benennen??
+ gibt es interessante nicht numerische Beispiele für Quantifier?
+ Was ist mit Quantifier of Quantifier
+]
+
+[h5 Laws on set union, set intersection and set difference]
+
+Again, we are pacing the parade 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
+
+RightNeutrality<Q,-,== > : Q a: a-Q() == a
+SelfRemovability<Q,-,=v= >: Q a: a - a =v= Q()
+``
+
+For a `Quantifier Map` the same basic laws apply that are
+valid for `Collector Maps`:
+
+``
+ + * -
+Associativity == ==
+Neutrality == ==
+Commutativity == ==
+SelfRemovability absorbs_neutrons ==
+ enriches_neutrons =p=
+``
+
+
+
+[endsect][/ Quantifiers]
+
+[endsect][/ Semantics]

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-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -221,6 +221,15 @@
         cout << "cat_map: " << cat_map << endl;
 }
 
+void quantifier_intersect_test()
+{
+ interval_map<int,int,neutron_emitter> sec_map;
+ sec_map += make_pair(interval<int>::rightopen(1,5), 1);
+ sec_map *= make_pair(interval<int>::rightopen(3,7), 1);
+
+ cout << "sec_map: " << sec_map << endl;
+}
+
 
 int main()
 {
@@ -237,8 +246,9 @@
 
         template_default_problem();
         */
- codomain_test();
- string_codomain_test();
+ //codomain_test();
+ //string_codomain_test();
+ quantifier_intersect_test();
     return 0;
 }
 

Added: sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itv_set/labat_itv_set.cpp 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -0,0 +1,52 @@
+/*----------------------------------------------------------------------------+
+A Law Based Test Automaton 'LaBatea'
+Author: Joachim Faulhaber
+Copyright (c) 2007-2008: Joachim Faulhaber
++-----------------------------------------------------------------------------+
+ Distributed under the Boost Software License, Version 1.0.
+ (See accompanying file LICENCE.txt or copy at
+ http://www.boost.org/LICENSE_1_0.txt)
++----------------------------------------------------------------------------*/
+#include <iostream>
+#include <stdio.h>
+
+#include <boost/itl/ptime.hpp> //CL (4 a quick test only)
+
+#include <boost/validate/loki_xt/Tuple.h>
+#include <boost/itl/set.hpp>
+#include <boost/itl/map.hpp>
+#include <boost/validate/lawvalidater.h>
+#include <boost/validate/laws/monoid.h>
+#include <boost/validate/gentor/gentorprofile.h>
+#include <boost/validate/gentor/rangegentor.h>
+
+#include <boost/validate/itv_set_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_ItvSetValidater()
+{
+ ItvSetValidater 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_ItvSetValidater();
+ return 0;
+}

Added: sandbox/itl/libs/validate/example/labat_itv_set/vc9_labat_itv_set.vcproj
==============================================================================
--- (empty file)
+++ sandbox/itl/libs/validate/example/labat_itv_set/vc9_labat_itv_set.vcproj 2009-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+ ProjectType="Visual C++"
+ Version="9,00"
+ Name="vc9_labat_itv_set"
+ ProjectGUID="{BF42574F-66E2-42DD-90D9-3A8FCE6F471D}"
+ RootNamespace="vc9_labat_itv_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_itv_set\labat_itv_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_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-01-09 08:46:16 EST (Fri, 09 Jan 2009)
@@ -47,10 +47,10 @@
     //map_cluster_star_pushout.setTrialsCount(1000);
     //map_cluster_star_pushout.run();
 
- //typedef InplaceSymmetricDifference<interval_map<int, itl::set<int>, neutron_emitter_and_enricher >, std_equal> TestLawT;
- //LawValidater<TestLawT, RandomGentor> test_law;
- //test_law.setTrialsCount(1000);
- //test_law.run();
+ typedef InplaceSymmetricDifference<interval_map<int, itl::set<int>, neutron_polluter >, std_equal> TestLawT;
+ LawValidater<TestLawT, RandomGentor> test_law;
+ test_law.setTrialsCount(1000);
+ test_law.run();
 
         //typedef InplaceDistributivity
         // <split_interval_map<int, itl::set<int>, neutron_absorber >,
@@ -58,14 +58,14 @@
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);
 
- typedef InplaceSelfRemovability
- <split_interval_map<int, itl::set<int>, neutron_emitter >,
- itl::inplace_plus, itl::protonic_equal> TestLawT;
- LawValidater<TestLawT, RandomGentor> test_law;
- test_law.setTrialsCount(1000);
+ //typedef InplaceSelfRemovability
+ // <split_interval_map<int, itl::set<int>, neutron_emitter >,
+ // itl::inplace_plus, itl::protonic_equal> TestLawT;
+ //LawValidater<TestLawT, RandomGentor> test_law;
+ //test_law.setTrialsCount(1000);
 
         //typedef InplaceAssociativity
- // <interval_map<int, int, neutron_absorber >, inplace_plus> TestLawT;
+ // <split_interval_map<int, int, neutron_emitter >, inplace_star> TestLawT;
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);
 
@@ -79,6 +79,11 @@
         //LawValidater<TestLawT, RandomGentor> test_law;
         //test_law.setTrialsCount(1000);
 
+ //typedef InplaceInverseRemovability
+ // <split_interval_map<int, int, neutron_enricher>, inplace_plus> TestLawT;
+ //LawValidater<TestLawT, RandomGentor> test_law;
+ //test_law.setTrialsCount(1000);
+
         std::cout << "Start\n";
         ptime start(microsec_clock::local_time());
         test_law.run();


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