diff --git a/ndnboost/test/utils/runtime/argument.hpp b/ndnboost/test/utils/runtime/argument.hpp
new file mode 100644
index 0000000..c14956c
--- /dev/null
+++ b/ndnboost/test/utils/runtime/argument.hpp
@@ -0,0 +1,112 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : model of actual argument (both typed and abstract interface)
+// ***************************************************************************
+
+#ifndef BOOST_RT_ARGUMENT_HPP_062604GER
+#define BOOST_RT_ARGUMENT_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/rtti.hpp>
+
+// STL
+#include <cassert>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************              runtime::argument               ************** //
+// ************************************************************************** //
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+
+class argument {
+public:
+    // Constructor
+    argument( parameter const& p, rtti::id_t value_type )
+    : p_formal_parameter( p )
+    , p_value_type( value_type )
+    {}
+
+    // Destructor
+    virtual     ~argument()  {}
+
+    // Public properties
+    unit_test::readonly_property<parameter const&> p_formal_parameter;
+    unit_test::readonly_property<rtti::id_t>       p_value_type;
+};
+
+// ************************************************************************** //
+// **************             runtime::typed_argument          ************** //
+// ************************************************************************** //
+
+template<typename T>
+class typed_argument : public argument {
+public:
+    // Constructor
+    explicit typed_argument( parameter const& p )
+    : argument( p, rtti::type_id<T>() )
+    {}
+    typed_argument( parameter const& p, T const& t )
+    : argument( p, rtti::type_id<T>() )
+    , p_value( t )
+    {}
+
+    unit_test::readwrite_property<T>    p_value;
+};
+
+// ************************************************************************** //
+// **************               runtime::arg_value             ************** //
+// ************************************************************************** //
+
+template<typename T>
+inline T const&
+arg_value( argument const& arg_ )
+{
+    assert( arg_.p_value_type == rtti::type_id<T>() ); // detect logic error
+
+    return static_cast<typed_argument<T> const&>( arg_ ).p_value.value;
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline T&
+arg_value( argument& arg_ )
+{
+    assert( arg_.p_value_type == rtti::type_id<T>() ); // detect logic error
+
+    return static_cast<typed_argument<T>&>( arg_ ).p_value.value;
+}
+
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ARGUMENT_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/argument_factory.hpp b/ndnboost/test/utils/runtime/cla/argument_factory.hpp
new file mode 100644
index 0000000..4f6709b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/argument_factory.hpp
@@ -0,0 +1,218 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : generic typed_argument_factory implementation
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGUMENT_FACTORY_HPP_062604GER
+#define BOOST_RT_CLA_ARGUMENT_FACTORY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+#include <ndnboost/test/utils/runtime/trace.hpp>
+#include <ndnboost/test/utils/runtime/interpret_argument_value.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/value_generator.hpp>
+#include <ndnboost/test/utils/runtime/cla/value_handler.hpp>
+#include <ndnboost/test/utils/runtime/cla/validation.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+#include <ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/callback.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************           default_value_interpreter          ************** //
+// ************************************************************************** //
+
+namespace rt_cla_detail {
+
+struct default_value_interpreter {
+    template<typename T>
+    void operator()( argv_traverser& tr, ndnboost::optional<T>& value )
+    {
+        if( interpret_argument_value( tr.token(), value, 0 ) )
+            tr.next_token();
+    }
+};
+
+} // namespace rt_cla_detail
+
+// ************************************************************************** //
+// **************             typed_argument_factory           ************** //
+// ************************************************************************** //
+
+template<typename T>
+struct typed_argument_factory : public argument_factory {
+    // Constructor
+    typed_argument_factory()
+    : m_value_interpreter( rt_cla_detail::default_value_interpreter() )
+    {}
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~typed_argument_factory() {}
+
+    // properties modification
+    template<typename Modifier>
+    void                accept_modifier( Modifier const& m )
+    {
+        optionally_assign( m_value_handler, m, handler );
+        optionally_assign( m_value_interpreter, m, interpreter );
+
+        if( m.has( default_value ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !m_value_generator, 
+                BOOST_RT_PARAM_LITERAL( "multiple value generators for parameter" ) );
+
+            T const& dv_ref = m[default_value];
+            m_value_generator = rt_cla_detail::const_generator<T>( dv_ref );
+        }
+
+        if( m.has( default_refer_to ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !m_value_generator, 
+                BOOST_RT_PARAM_LITERAL( "multiple value generators for parameter" ) );
+
+            cstring ref_id = m[default_refer_to];
+            m_value_generator = rt_cla_detail::ref_generator<T>( ref_id );
+        }
+
+        if( m.has( assign_to ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !m_value_handler, 
+                BOOST_RT_PARAM_LITERAL( "multiple value handlers for parameter" ) );
+
+            m_value_handler = rt_cla_detail::assigner<T>( m[assign_to] );
+        }
+    }
+
+    // Argument factory implementation
+    virtual argument_ptr produce_using( parameter& p, argv_traverser& tr );
+    virtual argument_ptr produce_using( parameter& p, parser const& );
+    virtual void         argument_usage_info( format_stream& fs );
+
+// !! private?
+    // Data members
+    unit_test::callback2<parameter const&,T&>                   m_value_handler;
+    unit_test::callback2<parser const&,ndnboost::optional<T>&>     m_value_generator;
+    unit_test::callback2<argv_traverser&,ndnboost::optional<T>&>   m_value_interpreter;
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline argument_ptr
+typed_argument_factory<T>::produce_using( parameter& p, argv_traverser& tr )
+{
+    ndnboost::optional<T> value;
+
+    try {
+        m_value_interpreter( tr, value );
+    }
+    catch( ... ) { // !! should we do that?
+        BOOST_RT_PARAM_TRACE( "Fail to parse argument value" );
+
+        if( !p.p_optional_value )
+            throw;
+    }
+
+    argument_ptr actual_arg = p.actual_argument();
+
+    BOOST_RT_CLA_VALIDATE_INPUT( !!value || p.p_optional_value, tr, 
+        BOOST_RT_PARAM_LITERAL( "Argument value missing for parameter " ) << p.id_2_report() );
+
+    BOOST_RT_CLA_VALIDATE_INPUT( !actual_arg || p.p_multiplicable, tr, 
+        BOOST_RT_PARAM_LITERAL( "Unexpected repetition of the parameter " ) << p.id_2_report() );
+
+    if( !!value && !!m_value_handler )
+        m_value_handler( p, *value );
+
+    if( !p.p_multiplicable )
+        actual_arg.reset( p.p_optional_value && (rtti::type_id<T>() != rtti::type_id<bool>())
+            ? static_cast<argument*>(new typed_argument<ndnboost::optional<T> >( p, value ))
+            : static_cast<argument*>(new typed_argument<T>( p, *value )) );
+    else {
+        typedef std::list<ndnboost::optional<T> > optional_list;
+
+        if( !actual_arg )
+            actual_arg.reset( p.p_optional_value 
+                ? static_cast<argument*>(new typed_argument<optional_list>( p ))
+                : static_cast<argument*>(new typed_argument<std::list<T> >( p )) );
+
+        if( p.p_optional_value ) {
+            optional_list& values = arg_value<optional_list>( *actual_arg );
+
+            values.push_back( value );
+        }
+        else {
+            std::list<T>& values = arg_value<std::list<T> >( *actual_arg );
+            
+            values.push_back( *value );
+        }
+    }
+
+    return actual_arg;
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline argument_ptr 
+typed_argument_factory<T>::produce_using( parameter& p, parser const& pa )
+{
+    argument_ptr actual_arg;
+
+    if( !m_value_generator )
+        return actual_arg;
+
+    ndnboost::optional<T> value;
+    m_value_generator( pa, value );
+
+    if( !value )
+        return actual_arg;
+
+    if( !!m_value_handler )
+        m_value_handler( p, *value );
+
+    actual_arg.reset( new typed_argument<T>( p, *value ) );
+
+    return actual_arg;
+}
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline void
+typed_argument_factory<T>::argument_usage_info( format_stream& fs )
+{
+    rt_cla_detail::argument_value_usage( fs, 0, reinterpret_cast<T*>(0) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace ndnboost
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace cla
+
+#endif // BOOST_RT_CLA_ARGUMENT_FACTORY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/argv_traverser.hpp b/ndnboost/test/utils/runtime/cla/argv_traverser.hpp
new file mode 100644
index 0000000..8674bd2
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/argv_traverser.hpp
@@ -0,0 +1,98 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines facility to hide input traversing details
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGV_TRAVERSER_HPP_062604GER
+#define BOOST_RT_CLA_ARGV_TRAVERSER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+
+// Boost
+#include <ndnboost/noncopyable.hpp>
+#include <ndnboost/shared_array.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************          runtime::cla::argv_traverser        ************** //
+// ************************************************************************** //
+
+class argv_traverser : noncopyable {
+    class parser;
+public:
+    // Constructor
+    argv_traverser();
+
+    // public_properties
+    unit_test::readwrite_property<bool>         p_ignore_mismatch;
+    unit_test::readwrite_property<char_type>    p_separator;
+
+    // argc+argv <-> internal buffer exchange
+    void            init( int argc, char_type** argv );
+    void            remainder( int& argc, char_type** argv );
+
+    // token based parsing
+    cstring         token() const;
+    void            next_token();
+
+    // whole input parsing
+    cstring         input() const;
+    void            trim( std::size_t size );
+    bool            match_front( cstring );
+    bool            match_front( char_type c );
+    bool            eoi() const;
+
+    // transaction logic support
+    void            commit();
+    void            rollback();
+
+    // current position access; used to save some reference points in input
+    std::size_t     input_pos() const;
+
+    // returns true if mismatch detected during input parsing handled successfully
+    bool            handle_mismatch();
+
+private:
+    // Data members
+    dstring                 m_buffer;
+    cstring                 m_work_buffer;
+
+    cstring                 m_token;
+    cstring::iterator       m_commited_end;
+
+    shared_array<char_type> m_remainder;
+    std::size_t             m_remainder_size;
+};
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/argv_traverser.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_ARGV_TRAVERSER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/argv_traverser.ipp b/ndnboost/test/utils/runtime/cla/argv_traverser.ipp
new file mode 100644
index 0000000..da03cd9
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/argv_traverser.ipp
@@ -0,0 +1,209 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : implements facility to hide input traversing details
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGV_TRAVERSER_IPP_070604GER
+#define BOOST_RT_CLA_ARGV_TRAVERSER_IPP_070604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/trace.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// STL
+#include <memory>
+#include <cstring>
+
+#ifdef BOOST_NO_STDC_NAMESPACE
+namespace std { using ::memcpy; }
+#endif
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************          runtime::cla::argv_traverser        ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE
+argv_traverser::argv_traverser()
+: p_ignore_mismatch( false ), p_separator( BOOST_RT_PARAM_LITERAL( ' ' ) )
+{
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::init( int argc, char_type** argv )
+{
+    for( int index = 1; index < argc; ++index ) {
+        m_buffer += argv[index];
+        if( index != argc-1 )
+            m_buffer += BOOST_RT_PARAM_LITERAL( ' ' );
+    }
+
+    m_remainder.reset( new char_type[m_buffer.size()+1] );
+    m_remainder_size    = 0;
+    m_work_buffer       = m_buffer;
+    m_commited_end      = m_work_buffer.begin();
+
+    BOOST_RT_PARAM_TRACE( "Input buffer: " << m_buffer );
+
+    next_token();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::remainder( int& argc, char_type** argv )
+{
+    argc = 1;
+    std::size_t pos = 0;
+    while(pos < m_remainder_size ) {
+        argv[argc++] = m_remainder.get() + pos;
+
+        pos = std::find( m_remainder.get() + pos, m_remainder.get() + m_remainder_size, 
+                         BOOST_RT_PARAM_LITERAL( ' ' ) ) - m_remainder.get();
+        m_remainder[pos++] = BOOST_RT_PARAM_LITERAL( '\0' );
+    }
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE cstring
+argv_traverser::token() const
+{
+    return m_token;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::next_token()
+{
+    if( m_work_buffer.is_empty() )
+        return;
+
+    m_work_buffer.trim_left( m_token.size() ); // skip remainder of current token
+
+    if( m_work_buffer.size() != m_buffer.size() ) // !! is there a better way to identify first token
+        m_work_buffer.trim_left( 1 ); // skip separator if not first token;
+
+    m_token.assign( m_work_buffer.begin(),
+                    std::find( m_work_buffer.begin(), m_work_buffer.end(), p_separator ) );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE cstring
+argv_traverser::input() const
+{
+    return m_work_buffer;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::trim( std::size_t size )
+{
+    m_work_buffer.trim_left( size );
+
+    if( size <= m_token.size() )
+        m_token.trim_left( size );
+    else {
+        m_token.assign( m_work_buffer.begin(),
+                        std::find( m_work_buffer.begin(), m_work_buffer.end(), p_separator ) );
+    }
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::match_front( cstring str )
+{
+    return m_work_buffer.size() < str.size() ? false : m_work_buffer.substr( 0, str.size() ) == str;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::match_front( char_type c )
+{
+    return first_char( m_work_buffer ) == c;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::eoi() const
+{
+    return m_work_buffer.is_empty();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::commit()
+{
+    m_commited_end = m_work_buffer.begin();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+argv_traverser::rollback()
+{
+    m_work_buffer.assign( m_commited_end, m_work_buffer.end() );
+    m_token.assign( m_work_buffer.begin(),
+                    std::find( m_work_buffer.begin(), m_work_buffer.end(), p_separator ) );
+
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE std::size_t
+argv_traverser::input_pos() const
+{
+    return m_work_buffer.begin() - m_commited_end;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+argv_traverser::handle_mismatch()
+{
+    if( !p_ignore_mismatch )
+        return false;
+
+    std::memcpy( m_remainder.get() + m_remainder_size, token().begin(), token().size() );
+    m_remainder_size += token().size();
+    m_remainder[m_remainder_size++] = p_separator;
+
+    next_token();
+    commit();
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_ARGV_TRAVERSER_IPP_070604GER
diff --git a/ndnboost/test/utils/runtime/cla/basic_parameter.hpp b/ndnboost/test/utils/runtime/cla/basic_parameter.hpp
new file mode 100644
index 0000000..39ebb72
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/basic_parameter.hpp
@@ -0,0 +1,85 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : generic custom parameter generator
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/typed_parameter.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+
+// Boost
+#include <ndnboost/utility/base_from_member.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************         runtime::cla::basic_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T, typename IdPolicy>
+class basic_parameter : private base_from_member<IdPolicy>, public typed_parameter<T> {
+public:
+    // Constructors
+    explicit    basic_parameter( cstring n ) 
+    : base_from_member<IdPolicy>()
+    , typed_parameter<T>( base_from_member<IdPolicy>::member )
+    {
+        this->accept_modifier( name = n );
+    }
+
+    // parameter properties modification
+    template<typename Modifier>
+    void        accept_modifier( Modifier const& m )
+    {
+        typed_parameter<T>::accept_modifier( m );
+
+        base_from_member<IdPolicy>::member.accept_modifier( m );
+    }
+};
+
+//____________________________________________________________________________//
+
+#define BOOST_RT_CLA_NAMED_PARAM_GENERATORS( param_type )                                       \
+template<typename T>                                                                            \
+inline shared_ptr<param_type ## _t<T> >                                                         \
+param_type( cstring name = cstring() )                                                          \
+{                                                                                               \
+    return shared_ptr<param_type ## _t<T> >( new param_type ## _t<T>( name ) );                 \
+}                                                                                               \
+                                                                                                \
+inline shared_ptr<param_type ## _t<cstring> >                                                   \
+param_type( cstring name = cstring() )                                                          \
+{                                                                                               \
+    return shared_ptr<param_type ## _t<cstring> >( new param_type ## _t<cstring>( name ) );     \
+}                                                                                               \
+/**/
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_BASIC_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/char_parameter.hpp b/ndnboost/test/utils/runtime/cla/char_parameter.hpp
new file mode 100644
index 0000000..d95b95b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/char_parameter.hpp
@@ -0,0 +1,98 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines model of parameter with single char name
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_CHAR_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_CHAR_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/basic_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/id_policy.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               char_name_policy               ************** //
+// ************************************************************************** //
+
+class char_name_policy : public basic_naming_policy {
+public:
+    // Constructor
+    char_name_policy();
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~char_name_policy() {}
+
+    // policy interface
+    virtual bool    conflict_with( identification_policy const& ) const;
+
+    // Accept modifier
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        basic_naming_policy::accept_modifier( m );
+
+        BOOST_RT_PARAM_VALIDATE_LOGIC( p_name->size() <= 1, "Invalid parameter name "  << p_name );
+    }
+};
+
+// ************************************************************************** //
+// **************          runtime::cla::char_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T>
+class char_parameter_t : public basic_parameter<T,char_name_policy> {
+    typedef basic_parameter<T,char_name_policy> base;
+public:
+    // Constructors
+    explicit    char_parameter_t( char_type name ) : base( cstring( &name, 1 ) ) {}
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline shared_ptr<char_parameter_t<T> >
+char_parameter( char_type name )
+{
+    return shared_ptr<char_parameter_t<T> >( new char_parameter_t<T>( name ) );
+}
+
+//____________________________________________________________________________//
+
+inline shared_ptr<char_parameter_t<cstring> >
+char_parameter( char_type name )
+{
+    return shared_ptr<char_parameter_t<cstring> >( new char_parameter_t<cstring>( name ) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/char_parameter.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_CHAR_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/char_parameter.ipp b/ndnboost/test/utils/runtime/cla/char_parameter.ipp
new file mode 100644
index 0000000..5922902
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/char_parameter.ipp
@@ -0,0 +1,57 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : implements model of parameter with single char name
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_CHAR_PARAMETER_IPP_062904GER
+#define BOOST_RT_CLA_CHAR_PARAMETER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/char_parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               char_name_policy               ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE 
+char_name_policy::char_name_policy()
+: basic_naming_policy( rtti::type_id<char_name_policy>() )
+{
+    assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+char_name_policy::conflict_with( identification_policy const& id ) const
+{
+    return id.p_type_id == p_type_id && 
+           p_name == static_cast<char_name_policy const&>( id ).p_name;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_CHAR_PARAMETER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp b/ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp
new file mode 100644
index 0000000..b78097b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/detail/argument_value_usage.hpp
@@ -0,0 +1,82 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Permission to copy, use, modify, sell and distribute this software
+//  is granted provided this copyright notice appears in all copies.
+//  This software is provided "as is" without express or implied warranty,
+//  and with no claim as to its suitability for any purpose.
+  
+//  See http://www.boost.org for updates, documentation, and revision history.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : argument usage printing helpers
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
+#define BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+
+#include <ndnboost/lexical_cast.hpp>
+
+// STL
+// !! can we eliminate these includes?
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+namespace rt_cla_detail {
+
+// ************************************************************************** //
+// **************             argument_value_usage             ************** //
+// ************************************************************************** //
+
+// generic case
+template<typename T>
+inline void
+argument_value_usage( format_stream& fs, long, T* = 0 )
+{
+    fs << BOOST_RT_PARAM_CSTRING_LITERAL( "<value>" );
+}
+
+//____________________________________________________________________________//
+
+// specialization for list of values
+template<typename T>
+inline void
+argument_value_usage( format_stream& fs, int, std::list<T>* = 0 )
+{
+    fs << BOOST_RT_PARAM_CSTRING_LITERAL( "(<value1>, ..., <valueN>)" );
+}
+
+//____________________________________________________________________________//
+
+// specialization for type bool
+inline void
+argument_value_usage( format_stream& fs,  int, bool* = 0 )
+{
+    fs << BOOST_RT_PARAM_CSTRING_LITERAL( "yes|y|no|n" );
+}
+
+//____________________________________________________________________________//
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_ARGUMENT_VALUE_USAGE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp b/ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp
new file mode 100644
index 0000000..3adbb85
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp
@@ -0,0 +1,96 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines model of generic parameter with dual naming
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_DUAL_NAME_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_DUAL_NAME_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/named_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/char_parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               dual_name_policy               ************** //
+// ************************************************************************** //
+
+class dual_name_policy : public dual_id_policy<dual_name_policy,string_name_policy,char_name_policy> {
+public:
+    dual_name_policy();
+
+    // Accept modifier
+    template<typename Modifier>
+    void    accept_modifier( Modifier const& m )
+    {
+        if( m.has( prefix ) ) {
+            set_prefix( m[prefix] );
+            m.erase( prefix );
+        }
+
+        if( m.has( name ) ) {
+            set_name( m[name] );
+            m.erase( name );
+        }
+
+        if( m.has( separator ) ) {
+            set_separator( m[separator] );
+            m.erase( separator );
+        }
+
+        dual_id_policy<dual_name_policy,string_name_policy,char_name_policy>::accept_modifier( m );
+    }
+private:
+    void    set_prefix( cstring );
+    void    set_name( cstring );
+    void    set_separator( cstring );
+};
+
+// ************************************************************************** //
+// **************       runtime::cla::dual_name_parameter      ************** //
+// ************************************************************************** //
+
+template<typename T>
+class dual_name_parameter_t : public basic_parameter<T,dual_name_policy> {
+    typedef basic_parameter<T,dual_name_policy> base;
+public:
+    // Constructors
+    explicit    dual_name_parameter_t( cstring name ) : base( name ) {}
+};
+
+//____________________________________________________________________________//
+
+BOOST_RT_CLA_NAMED_PARAM_GENERATORS( dual_name_parameter )
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_DUAL_NAME_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp b/ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp
new file mode 100644
index 0000000..8fcb04f
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/dual_name_parameter.ipp
@@ -0,0 +1,90 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : implements model of generic parameter with dual naming
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_DUAL_NAME_PARAMETER_IPP_062904GER
+#define BOOST_RT_CLA_DUAL_NAME_PARAMETER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/dual_name_parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               dual_name_policy               ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE 
+dual_name_policy::dual_name_policy()
+{
+    m_primary.accept_modifier( prefix = BOOST_RT_PARAM_CSTRING_LITERAL( "--" ) );
+    m_secondary.accept_modifier( prefix = BOOST_RT_PARAM_CSTRING_LITERAL( "-" ) );
+}
+
+//____________________________________________________________________________//
+
+namespace {
+
+template<typename K>
+inline void
+split( string_name_policy& snp, char_name_policy& cnp, cstring src, K const& k )
+{
+    cstring::iterator sep = std::find( src.begin(), src.end(), BOOST_RT_PARAM_LITERAL( '|' ) );
+    
+    if( sep != src.begin() )
+        snp.accept_modifier( k = cstring( src.begin(), sep ) );
+
+    if( sep != src.end() )
+        cnp.accept_modifier( k = cstring( sep+1, src.end() ) );
+}
+
+} // local namespace
+
+BOOST_RT_PARAM_INLINE void
+dual_name_policy::set_prefix( cstring src )
+{
+    split( m_primary, m_secondary, src, prefix );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+dual_name_policy::set_name( cstring src )
+{
+    split( m_primary, m_secondary, src, name );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+dual_name_policy::set_separator( cstring src )
+{
+    split( m_primary, m_secondary, src, separator );
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_DUAL_NAME_PARAMETER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/fwd.hpp b/ndnboost/test/utils/runtime/cla/fwd.hpp
new file mode 100644
index 0000000..4065e9b
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/fwd.hpp
@@ -0,0 +1,55 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : cla subsystem forward declarations
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_FWD_HPP_062604GER
+#define BOOST_RT_CLA_FWD_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+class parser;
+class parameter;
+typedef shared_ptr<parameter> parameter_ptr;
+class naming_policy;
+typedef shared_ptr<naming_policy> naming_policy_ptr;
+class argv_traverser;
+
+namespace rt_cla_detail {
+
+template<typename T> class const_generator;
+template<typename T> class ref_generator;
+
+template<typename T> class assigner;
+
+class named_parameter_base;
+class positional_parameter_base;
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_FWD_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/id_policy.hpp b/ndnboost/test/utils/runtime/cla/id_policy.hpp
new file mode 100644
index 0000000..fb29cb7
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/id_policy.hpp
@@ -0,0 +1,145 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : some generic identification policies definition
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ID_POLICY_HPP_062604GER
+#define BOOST_RT_CLA_ID_POLICY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/iface/id_policy.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************               naming_policy_base             ************** //
+// ************************************************************************** //
+// model: <prefix> <name> <separtor>
+
+class basic_naming_policy : public identification_policy {
+public:
+    // Public properties
+    unit_test::readwrite_property<dstring>    p_prefix;
+    unit_test::readwrite_property<dstring>    p_name;
+    unit_test::readwrite_property<dstring>    p_separator;
+
+    // Policy interface
+    virtual bool    responds_to( cstring name ) const       { return p_name == name; }
+    virtual cstring id_2_report() const                     { return p_name.get(); }
+    virtual void    usage_info( format_stream& fs ) const;
+    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const;
+
+    // Accept modifier
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        nfp::optionally_assign( p_prefix.value,    m, prefix );
+        nfp::optionally_assign( p_name.value,      m, name );
+        nfp::optionally_assign( p_separator.value, m, separator );
+    }
+
+protected:
+    explicit basic_naming_policy( rtti::id_t dyn_type )
+    : identification_policy( dyn_type )
+    {}
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~basic_naming_policy() {}
+
+    // Naming policy interface
+    virtual bool    match_prefix( argv_traverser& tr ) const;
+    virtual bool    match_name( argv_traverser& tr ) const;
+    virtual bool    match_separator( argv_traverser& tr, bool optional_value ) const;
+};
+
+// ************************************************************************** //
+// **************                 dual_id_policy               ************** //
+// ************************************************************************** //
+
+template<typename MostDerived,typename PrimaryId,typename SecondId>
+class dual_id_policy : public identification_policy {
+public:
+    // Constructor
+    dual_id_policy()
+    : identification_policy( rtti::type_id<MostDerived>() )
+    , m_primary()
+    , m_secondary()
+    {}
+
+    // Policy interface
+    virtual bool    responds_to( cstring name ) const
+    {
+        return m_primary.responds_to( name ) || m_secondary.responds_to( name );
+    }
+    virtual bool    conflict_with( identification_policy const& id_p ) const
+    {
+        return id_p.conflict_with( m_primary ) || id_p.conflict_with( m_secondary );
+    }
+    virtual cstring id_2_report() const
+    {
+        return m_primary.id_2_report();
+    }
+    virtual void    usage_info( format_stream& fs ) const
+    {
+        fs << BOOST_RT_PARAM_LITERAL( '{' );
+        m_primary.usage_info( fs );
+        fs << BOOST_RT_PARAM_LITERAL( '|' );
+        m_secondary.usage_info( fs );
+        fs << BOOST_RT_PARAM_LITERAL( '}' );
+    }
+    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const
+    {
+        return m_primary.matching( p, tr, primary ) || m_secondary.matching( p, tr, primary );
+    }
+
+    // Accept modifier
+    template<typename Modifier>
+    void    accept_modifier( Modifier const& m )
+    {
+        m_primary.accept_modifier( m );
+        m_secondary.accept_modifier( m );
+    }
+
+protected:
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~dual_id_policy() {}
+
+    // Data members
+    PrimaryId       m_primary;
+    SecondId        m_secondary;
+};
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/id_policy.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_ID_POLICY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/id_policy.ipp b/ndnboost/test/utils/runtime/cla/id_policy.ipp
new file mode 100644
index 0000000..6d2c2f4
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/id_policy.ipp
@@ -0,0 +1,118 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : some generic identification policies implementation
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_ID_POLICY_IPP_062904GER
+#define BOOST_RT_CLA_ID_POLICY_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/id_policy.hpp>
+#include <ndnboost/test/utils/runtime/cla/parameter.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************              basic_naming_policy             ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE void
+basic_naming_policy::usage_info( format_stream& fs ) const
+{
+    fs << p_prefix << p_name << p_separator;
+
+    if( p_separator->empty() )
+        fs << BOOST_RT_PARAM_LITERAL( ' ' );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::match_prefix( argv_traverser& tr ) const
+{
+    if( !tr.match_front( p_prefix.get() ) )
+        return false;
+
+    tr.trim( p_prefix->size() );
+    return true;
+}
+
+//____________________________________________________________________________//
+    
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::match_name( argv_traverser& tr ) const
+{
+    if( !tr.match_front( p_name.get() ) )
+        return false;
+
+    tr.trim( p_name->size() );
+    return true;
+}
+
+//____________________________________________________________________________//
+    
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::match_separator( argv_traverser& tr, bool optional_value ) const
+{
+    if( p_separator->empty() ) {
+        if( !tr.token().is_empty() )
+            return false;
+
+        tr.trim( 1 );
+    }
+    else {
+        if( !tr.match_front( p_separator.get() ) ) {
+            // if parameter has optional value separator is optional as well
+            if( optional_value && ( tr.eoi() || tr.match_front( ' ' ) ) ) {
+                return true;
+            }
+            return false;
+        }
+
+        tr.trim( p_separator->size() );
+    }
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+basic_naming_policy::matching( parameter const& p, argv_traverser& tr, bool ) const
+{
+    if( !match_prefix( tr ) )
+        return false;
+        
+    if( !match_name( tr ) )
+        return false;
+
+    if( !match_separator( tr, p.p_optional_value ) )
+        return false;
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_ID_POLICY_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp b/ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp
new file mode 100644
index 0000000..84c1e40
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp
@@ -0,0 +1,51 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines interface for argument_factory
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_IFACE_ARGUMENT_FACTORY_HPP_062604GER
+#define BOOST_RT_CLA_IFACE_ARGUMENT_FACTORY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************                argument_factory              ************** //
+// ************************************************************************** //
+// another name can be argument production policy
+
+class argument_factory {
+public:
+    // Argument factory interface
+    virtual argument_ptr produce_using( parameter& p, argv_traverser& tr ) = 0;  /// produce argument based on input
+    virtual argument_ptr produce_using( parameter& p, parser const& )      = 0;  /// produce argument based on internal generator and/or values of other parameters
+    virtual void         argument_usage_info( format_stream& fs )          = 0;  /// argument value format information
+protected:
+    BOOST_TEST_PROTECTED_VIRTUAL ~argument_factory() {}
+};
+
+} // namespace ndnboost
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace cla
+
+#endif // BOOST_RT_CLA_IFACE_ARGUMENT_FACTORY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/iface/id_policy.hpp b/ndnboost/test/utils/runtime/cla/iface/id_policy.hpp
new file mode 100644
index 0000000..338f8d5
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/iface/id_policy.hpp
@@ -0,0 +1,73 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines interface for identification_policy
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
+#define BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************             identification_policy            ************** //
+// ************************************************************************** //
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+
+class identification_policy {
+public:
+    // Public properties
+    unit_test::readwrite_property<rtti::id_t>    p_type_id;
+
+    // Policy interface
+    virtual bool    responds_to( cstring name ) const = 0;
+    virtual cstring id_2_report() const = 0;
+    virtual void    usage_info( format_stream& fs ) const = 0;
+    virtual bool    matching( parameter const& p, argv_traverser& tr, bool primary ) const = 0;
+
+    virtual bool    conflict_with( identification_policy const& ) const = 0;
+
+protected:
+    // Constructor
+    explicit        identification_policy( rtti::id_t dyn_type )
+    : p_type_id( dyn_type )
+    {}
+    BOOST_TEST_PROTECTED_VIRTUAL ~identification_policy() {}
+};
+
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_IFACE_ID_POLICY_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/modifier.hpp b/ndnboost/test/utils/runtime/cla/modifier.hpp
new file mode 100644
index 0000000..32719ab
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/modifier.hpp
@@ -0,0 +1,69 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : parameter modifiers
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_MODIFIER_HPP_062604GER
+#define BOOST_RT_CLA_MODIFIER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/named_params.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************         environment variable modifiers       ************** //
+// ************************************************************************** //
+
+namespace {
+
+nfp::typed_keyword<bool,struct optional_t>              optional_m;
+nfp::named_parameter<bool,optional_t,bool>              optional( true );
+nfp::typed_keyword<bool,struct required_t>              required_m;
+nfp::named_parameter<bool,required_t,bool>              required( true );
+nfp::typed_keyword<bool,struct multiplicable_t>         multiplicable_m;
+nfp::named_parameter<bool,multiplicable_t,bool>         multiplicable( true );
+nfp::typed_keyword<bool,struct guess_name_t>            guess_name_m;
+nfp::named_parameter<bool,guess_name_t,bool>            guess_name( true );
+nfp::typed_keyword<bool,struct ignore_mismatch_t>       ignore_mismatch_m;
+nfp::named_parameter<bool,ignore_mismatch_t,bool>       ignore_mismatch( true );
+nfp::typed_keyword<bool,struct optional_value_t>        optional_value_m;
+nfp::named_parameter<bool,optional_value_t,bool>        optional_value( true );
+
+nfp::typed_keyword<char_type,struct input_separator_t>  input_separator;
+nfp::typed_keyword<cstring,struct prefix_t>             prefix;
+nfp::typed_keyword<cstring,struct name_t>               name;
+nfp::typed_keyword<cstring,struct separator_t>          separator;
+nfp::typed_keyword<cstring,struct description_t>        description;
+nfp::typed_keyword<cstring,struct refer_to_t>           default_refer_to;
+
+nfp::keyword<struct default_value_t>                    default_value;
+nfp::keyword<struct handler_t>                          handler;
+nfp::keyword<struct interpreter_t>                      interpreter;
+nfp::keyword<struct assign_to_t>                        assign_to;
+
+} // local namespace
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_MODIFIER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/named_parameter.hpp b/ndnboost/test/utils/runtime/cla/named_parameter.hpp
new file mode 100644
index 0000000..28f03b4
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/named_parameter.hpp
@@ -0,0 +1,93 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines model of named parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_NAMED_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_NAMED_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/basic_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/id_policy.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************              string_name_policy              ************** //
+// ************************************************************************** //
+
+class string_name_policy : public basic_naming_policy {
+public:
+    // Constructor
+    string_name_policy();
+    BOOST_RT_PARAM_UNNEEDED_VIRTUAL ~string_name_policy() {}
+
+    // policy interface
+    virtual bool    responds_to( cstring name ) const;
+    virtual bool    conflict_with( identification_policy const& ) const;
+
+    // Accept modifier
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        basic_naming_policy::accept_modifier( m );
+
+        if( m.has( guess_name_m ) )
+            m_guess_name = true;
+    }
+
+private:
+    // Naming policy interface
+    virtual bool    match_name( argv_traverser& tr ) const;
+
+    // Data members
+    bool            m_guess_name;
+};
+
+// ************************************************************************** //
+// **************         runtime::cla::named_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T>
+class named_parameter_t : public basic_parameter<T,string_name_policy> {
+    typedef basic_parameter<T,string_name_policy> base;
+public:
+    // Constructors
+    explicit    named_parameter_t( cstring name ) : base( name ) {}
+};
+
+//____________________________________________________________________________//
+
+BOOST_RT_CLA_NAMED_PARAM_GENERATORS( named_parameter )
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/named_parameter.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_NAMED_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/named_parameter.ipp b/ndnboost/test/utils/runtime/cla/named_parameter.ipp
new file mode 100644
index 0000000..1d77018
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/named_parameter.ipp
@@ -0,0 +1,129 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : implements model of named parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER
+#define BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/named_parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/char_parameter.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/algorithm.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************              string_name_policy              ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE 
+string_name_policy::string_name_policy()
+: basic_naming_policy( rtti::type_id<string_name_policy>() )
+, m_guess_name( false )
+{
+    assign_op( p_prefix.value, BOOST_RT_PARAM_CSTRING_LITERAL( "-" ), 0 );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+string_name_policy::responds_to( cstring name ) const
+{
+    std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
+
+    mm_pos = unit_test::mismatch( name.begin(), name.end(), p_name->begin(), p_name->end() );
+
+    return mm_pos.first == name.end() && (m_guess_name || (mm_pos.second == p_name->end()) );
+}
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_MSVC
+#  pragma warning(push)
+#  pragma warning(disable:4244)
+#endif
+
+BOOST_RT_PARAM_INLINE bool
+string_name_policy::conflict_with( identification_policy const& id ) const
+{
+    if( id.p_type_id == p_type_id ) {
+        string_name_policy const& snp = static_cast<string_name_policy const&>( id );
+
+        if( p_name->empty() || snp.p_name->empty() )
+            return false;
+
+        if( p_prefix != snp.p_prefix )
+            return false;
+
+        std::pair<dstring::const_iterator,dstring::const_iterator> mm_pos =
+            unit_test::mismatch( p_name->begin(), p_name->end(), snp.p_name->begin(), snp.p_name->end() );
+
+        return mm_pos.first != p_name->begin()                              &&  // there is common substring
+                ((m_guess_name    && (mm_pos.second == snp.p_name->end()) ) ||  // that match other guy and I am guessing
+                (snp.m_guess_name && (mm_pos.first  == p_name->end()) ));       // or me and the other guy is
+    }
+    
+    if( id.p_type_id == rtti::type_id<char_name_policy>() ) {
+        char_name_policy const& cnp = static_cast<char_name_policy const&>( id );
+
+        return m_guess_name                 && 
+               (p_prefix == cnp.p_prefix)   && 
+               unit_test::first_char( cstring( p_name ) ) == unit_test::first_char( cstring( cnp.p_name ) );
+    }
+    
+    return false;    
+}
+
+#ifdef BOOST_MSVC
+#  pragma warning(pop)
+#endif
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE bool
+string_name_policy::match_name( argv_traverser& tr ) const
+{
+    if( !m_guess_name )
+        return basic_naming_policy::match_name( tr );
+
+    cstring in = tr.input();
+
+    std::pair<cstring::iterator,dstring::const_iterator> mm_pos;
+    
+    mm_pos = unit_test::mismatch( in.begin(), in.end(), p_name->begin(), p_name->end() );
+
+    if( mm_pos.first == in.begin() )
+        return false;
+
+    tr.trim( mm_pos.first - in.begin() );
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_NAMED_PARAMETER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/parameter.hpp b/ndnboost/test/utils/runtime/cla/parameter.hpp
new file mode 100644
index 0000000..36edbb6
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/parameter.hpp
@@ -0,0 +1,150 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 81913 $
+//
+//  Description : defines model of formal parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/parameter.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/iface/argument_factory.hpp>
+#include <ndnboost/test/utils/runtime/cla/iface/id_policy.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************            runtime::cla::parameter           ************** //
+// ************************************************************************** //
+
+class parameter : public BOOST_RT_PARAM_NAMESPACE::parameter {
+public:
+    parameter( identification_policy& ID, argument_factory& F, bool optional_value = false )
+    : p_optional( false )
+    , p_multiplicable( false )
+    , p_optional_value( optional_value )
+    , m_id_policy( ID )
+    , m_arg_factory( F )
+    {}
+
+    // Destructor
+    virtual         ~parameter()                                {}
+
+    unit_test::readwrite_property<bool>      p_optional;
+    unit_test::readwrite_property<bool>      p_multiplicable;
+    unit_test::readwrite_property<bool>      p_optional_value;
+    unit_test::readwrite_property<dstring>   p_description;
+
+    // parameter properties modification
+    template<typename Modifier>
+    void            accept_modifier( Modifier const& m )
+    {
+        if( m.has( optional_m ) )
+            p_optional.value = true;
+
+        if( m.has( required_m ) )
+            p_optional.value = false;
+
+        if( m.has( multiplicable_m ) )
+            p_multiplicable.value = true;
+
+        if( m.has( optional_value_m ) )
+            p_optional_value.value = true;
+
+        nfp::optionally_assign( p_description.value, m, description );
+    }
+
+    // access methods
+    bool            has_argument() const                        { return m_actual_argument!=0; }
+    argument const& actual_argument() const                     { return *m_actual_argument; }
+    argument_ptr    actual_argument()                           { return m_actual_argument; }
+
+
+    // identification interface
+    bool            responds_to( cstring name ) const           { return m_id_policy.responds_to( name ); }
+    bool            conflict_with( parameter const& p ) const
+    {
+        return (id_2_report() == p.id_2_report() && !id_2_report().is_empty())  ||
+               m_id_policy.conflict_with( p.m_id_policy )                       || 
+               ((m_id_policy.p_type_id != p.m_id_policy.p_type_id) && p.m_id_policy.conflict_with( m_id_policy ));
+    }
+    cstring         id_2_report() const                         { return m_id_policy.id_2_report(); }
+    void            usage_info( format_stream& fs ) const
+    { 
+        m_id_policy.usage_info( fs );
+        if( p_optional_value )
+            fs << BOOST_RT_PARAM_LITERAL( '[' );
+
+        m_arg_factory.argument_usage_info( fs );
+
+        if( p_optional_value )
+            fs << BOOST_RT_PARAM_LITERAL( ']' );
+    }
+
+    // argument match/produce based on input
+    bool            matching( argv_traverser& tr, bool primary ) const
+    {
+        return m_id_policy.matching( *this, tr, primary );
+    }
+
+    // argument production based on different source
+    void            produce_argument( argv_traverser& tr )
+    {
+        m_id_policy.matching( *this, tr, true ); // !! can we save this position somehow
+        m_actual_argument = m_arg_factory.produce_using( *this, tr );
+    }
+    void            produce_argument( parser const& p )
+    {
+        m_actual_argument = m_arg_factory.produce_using( *this, p );
+    }
+
+private:
+    //Data members
+    identification_policy&  m_id_policy;
+    argument_factory&       m_arg_factory;
+    argument_ptr            m_actual_argument;
+};
+
+//____________________________________________________________________________//
+
+template<typename Parameter,typename Modifier>
+inline shared_ptr<Parameter>
+operator-( shared_ptr<Parameter> p, Modifier const& m )
+{
+    p->accept_modifier( m );
+
+    return p;
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/parser.hpp b/ndnboost/test/utils/runtime/cla/parser.hpp
new file mode 100644
index 0000000..d98625c
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/parser.hpp
@@ -0,0 +1,153 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : defines parser - public interface for CLA parsing and accessing
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_PARSER_HPP_062604GER
+#define BOOST_RT_CLA_PARSER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+// STL
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************             runtime::cla::parser             ************** //
+// ************************************************************************** //
+
+namespace cla_detail {
+
+template<typename Modifier>
+class global_mod_parser {
+public:
+    global_mod_parser( parser& p, Modifier const& m )
+    : m_parser( p )
+    , m_modifiers( m )
+    {}
+
+    template<typename Param>
+    global_mod_parser const&
+    operator<<( shared_ptr<Param> param ) const
+    {
+        param->accept_modifier( m_modifiers );
+
+        m_parser << param;
+
+        return *this;
+    }
+
+private:
+    // Data members;
+    parser&             m_parser;
+    Modifier const&     m_modifiers;
+};
+
+}
+
+// ************************************************************************** //
+// **************             runtime::cla::parser             ************** //
+// ************************************************************************** //
+
+class parser {
+public:
+    typedef std::list<parameter_ptr>::const_iterator param_iterator;
+
+    // Constructor
+    explicit            parser( cstring program_name = cstring() );
+
+    // parameter list construction interface
+    parser&             operator<<( parameter_ptr param );
+
+    // parser and global parameters modifiers
+    template<typename Modifier>
+    cla_detail::global_mod_parser<Modifier>
+    operator-( Modifier const& m )
+    {
+        nfp::optionally_assign( m_traverser.p_separator.value, m, input_separator );
+        nfp::optionally_assign( m_traverser.p_ignore_mismatch.value, m, ignore_mismatch_m );
+
+        return cla_detail::global_mod_parser<Modifier>( *this, m );
+    }
+
+    // input processing method
+    void                parse( int& argc, char_type** argv );
+
+    // parameters access
+    param_iterator      first_param() const;
+    param_iterator      last_param() const;
+
+    // arguments access
+    const_argument_ptr  operator[]( cstring string_id ) const;
+    cstring             get( cstring string_id ) const;    
+
+    template<typename T>
+    T const&            get( cstring string_id ) const
+    {
+        return arg_value<T>( valid_argument( string_id ) );
+    }
+
+    template<typename T>
+    void                get( cstring string_id, ndnboost::optional<T>& res ) const
+    {
+        const_argument_ptr actual_arg = (*this)[string_id];
+
+        if( actual_arg )
+            res = arg_value<T>( *actual_arg );
+        else
+            res.reset();
+    }
+
+    // help/usage
+    void                usage( out_stream& ostr );
+    void                help(  out_stream& ostr );
+
+private:
+    argument const&     valid_argument( cstring string_id ) const;
+
+    // Data members
+    argv_traverser              m_traverser;
+    std::list<parameter_ptr>    m_parameters;
+    dstring                     m_program_name;
+};
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/parser.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_PARSER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/parser.ipp b/ndnboost/test/utils/runtime/cla/parser.ipp
new file mode 100644
index 0000000..5be8503
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/parser.ipp
@@ -0,0 +1,258 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : implements parser - public interface for CLA parsing and accessing
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_PARSER_IPP_062904GER
+#define BOOST_RT_CLA_PARSER_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/trace.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+#include <ndnboost/test/utils/runtime/cla/parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/modifier.hpp>
+#include <ndnboost/test/utils/runtime/cla/validation.hpp>
+#include <ndnboost/test/utils/runtime/cla/parser.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/foreach.hpp>
+
+// Boost
+#include <ndnboost/lexical_cast.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************             runtime::cla::parser             ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE
+parser::parser( cstring program_name )
+{
+    assign_op( m_program_name, program_name, 0 );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE parser::param_iterator
+parser::first_param() const
+{
+    return m_parameters.begin();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE parser::param_iterator
+parser::last_param() const
+{
+    return m_parameters.end();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE argument const&
+parser::valid_argument( cstring string_id ) const
+{
+    const_argument_ptr arg = (*this)[string_id];
+
+    BOOST_RT_PARAM_VALIDATE_LOGIC( !!arg, "Actual argument for parameter " << string_id << " is not present" );
+
+    return *arg;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE parser&
+parser::operator<<( parameter_ptr new_param )
+{
+    BOOST_TEST_FOREACH( parameter_ptr, old_param, m_parameters ) {
+        BOOST_RT_PARAM_VALIDATE_LOGIC( !old_param->conflict_with( *new_param ),
+            BOOST_RT_PARAM_LITERAL( "Definition of parameter " )                << new_param->id_2_report() << 
+            BOOST_RT_PARAM_LITERAL( " conflicts with defintion of parameter " ) << old_param->id_2_report() );
+    }
+
+    m_parameters.push_back( new_param );
+
+    return *this;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+parser::parse( int& argc, char_type** argv )
+{
+    if( m_program_name.empty() ) {
+        m_program_name.assign( argv[0] );
+        dstring::size_type pos = m_program_name.find_last_of( BOOST_RT_PARAM_LITERAL( "/\\" ) );
+
+        if( pos != static_cast<dstring::size_type>(cstring::npos) )
+            m_program_name.erase( 0, pos+1 );
+    }
+
+    m_traverser.init( argc, argv );
+
+    try {
+        while( !m_traverser.eoi() ) {
+            parameter_ptr found_param;
+
+            BOOST_RT_PARAM_TRACE( "Total " << m_parameters.size() << " parameters registered" );
+
+            BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+                BOOST_RT_PARAM_TRACE( "Try parameter " << curr_param->id_2_report() );
+
+                if( curr_param->matching( m_traverser, !found_param ) ) {
+                    BOOST_RT_PARAM_TRACE( "Match found" );
+                    BOOST_RT_CLA_VALIDATE_INPUT( !found_param, (m_traverser.rollback(),m_traverser), "Ambiguous input" );
+
+                    found_param = curr_param;
+                }
+
+                m_traverser.rollback();
+            }
+
+            if( !found_param ) {
+                BOOST_RT_PARAM_TRACE( "No match found" );
+                BOOST_RT_CLA_VALIDATE_INPUT( m_traverser.handle_mismatch(), m_traverser,
+                                             BOOST_RT_PARAM_LITERAL( "Unexpected input" ) );
+
+                continue;
+            }
+
+            BOOST_RT_PARAM_TRACE( "Parse argument value" );
+            found_param->produce_argument( m_traverser );
+
+            m_traverser.commit();
+        }
+
+        BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+            if( !curr_param->p_optional && !curr_param->actual_argument() ) {
+                curr_param->produce_argument( *this );
+
+                BOOST_RT_PARAM_VALIDATE_LOGIC( curr_param->actual_argument(),
+                    BOOST_RT_PARAM_LITERAL( "Required argument for parameter " ) << curr_param->id_2_report()
+                        << BOOST_RT_PARAM_LITERAL( " is missing" ) );
+            }
+        }
+    }
+    catch( bad_lexical_cast const& ) {
+        BOOST_RT_PARAM_REPORT_LOGIC_ERROR( 
+            BOOST_RT_PARAM_LITERAL( "String to value convertion error during input parsing" ) );
+    }
+
+    m_traverser.remainder( argc, argv );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE const_argument_ptr
+parser::operator[]( cstring string_id ) const
+{
+    parameter_ptr found_param;
+
+    BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+        if( curr_param->responds_to( string_id ) ) {
+            BOOST_RT_PARAM_VALIDATE_LOGIC( !found_param,
+                                           BOOST_RT_PARAM_LITERAL( "Ambiguous parameter string id: " ) << string_id );
+
+            found_param = curr_param;
+        }
+    }
+
+    return found_param ? found_param->actual_argument() : argument_ptr();
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE cstring
+parser::get( cstring string_id ) const
+{
+    return get<cstring>( string_id );
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+parser::usage( out_stream& ostr )
+{
+    if( m_program_name.empty() )
+        assign_op( m_program_name, BOOST_RT_PARAM_CSTRING_LITERAL( "<program>" ), 0 );
+
+    format_stream fs;
+
+    fs << m_program_name;
+
+    BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+        fs << BOOST_RT_PARAM_LITERAL( ' ' );
+
+        if( curr_param->p_optional )
+            fs << BOOST_RT_PARAM_LITERAL( '[' );
+
+        curr_param->usage_info( fs );
+
+        if( curr_param->p_optional )
+            fs << BOOST_RT_PARAM_LITERAL( ']' );
+
+        if( curr_param->p_multiplicable ) {
+            fs << BOOST_RT_PARAM_CSTRING_LITERAL( " ... " );
+            
+            if( curr_param->p_optional )
+                fs << BOOST_RT_PARAM_LITERAL( '[' );
+
+            curr_param->usage_info( fs );
+
+            if( curr_param->p_optional )
+                fs << BOOST_RT_PARAM_LITERAL( ']' );
+        }
+    }
+
+    ostr << BOOST_RT_PARAM_CSTRING_LITERAL( "Usage:\n" ) << fs.str() << std::endl;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+parser::help( out_stream& ostr )
+{
+    usage( ostr );
+
+    bool need_where = true;
+
+    BOOST_TEST_FOREACH( parameter_ptr const&, curr_param, m_parameters ) {
+        if( curr_param->p_description->empty() )
+            continue;
+
+        if( need_where ) {
+            ostr << BOOST_RT_PARAM_CSTRING_LITERAL( "where:\n" );
+            need_where = false;
+        }
+
+        ostr << curr_param->id_2_report() << BOOST_RT_PARAM_CSTRING_LITERAL( " - " ) << curr_param->p_description << std::endl;
+    }
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_PARSER_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/cla/typed_parameter.hpp b/ndnboost/test/utils/runtime/cla/typed_parameter.hpp
new file mode 100644
index 0000000..b8ad9e4
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/typed_parameter.hpp
@@ -0,0 +1,70 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : generic typed parameter model
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_TYPED_PARAMETER_HPP_062604GER
+#define BOOST_RT_CLA_TYPED_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/parameter.hpp>
+#include <ndnboost/test/utils/runtime/cla/argument_factory.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/rtti.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************         runtime::cla::typed_parameter        ************** //
+// ************************************************************************** //
+
+template<typename T>
+class typed_parameter : public cla::parameter {
+public:
+    explicit typed_parameter( identification_policy& ID ) 
+    : cla::parameter( ID, m_arg_factory, rtti::type_id<T>() == rtti::type_id<bool>() ) 
+    {}
+
+    // parameter properties modification
+    template<typename Modifier>
+    void    accept_modifier( Modifier const& m )
+    {
+        cla::parameter::accept_modifier( m );
+
+        m_arg_factory.accept_modifier( m );
+
+        BOOST_RT_PARAM_VALIDATE_LOGIC( !p_optional || !m_arg_factory.m_value_generator,
+            BOOST_RT_PARAM_LITERAL( "can't define a value generator for optional parameter " ) << id_2_report() );
+    }
+
+private:
+    // Data members
+    typed_argument_factory<T>   m_arg_factory;
+};
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_TYPED_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/validation.hpp b/ndnboost/test/utils/runtime/cla/validation.hpp
new file mode 100644
index 0000000..18c9b77
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/validation.hpp
@@ -0,0 +1,55 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : input validation helpers definition
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALIDATION_HPP_062604GER
+#define BOOST_RT_CLA_VALIDATION_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************       runtime::cla::report_input_error       ************** //
+// ************************************************************************** //
+
+void report_input_error( argv_traverser const& tr, format_stream& msg );
+
+//____________________________________________________________________________//
+
+#define BOOST_RT_CLA_VALIDATE_INPUT( b, tr, msg ) \
+    if( b ) ; else ::ndnboost::BOOST_RT_PARAM_NAMESPACE::cla::report_input_error( tr, format_stream().ref() << msg )
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#  define BOOST_RT_PARAM_INLINE inline
+#  include <ndnboost/test/utils/runtime/cla/validation.ipp>
+
+#endif
+
+#endif // BOOST_RT_CLA_VALIDATION_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/validation.ipp b/ndnboost/test/utils/runtime/cla/validation.ipp
new file mode 100644
index 0000000..5d295d7
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/validation.ipp
@@ -0,0 +1,65 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : input validation helpers implementation
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALIDATION_IPP_070604GER
+#define BOOST_RT_CLA_VALIDATION_IPP_070604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/argv_traverser.hpp>
+#include <ndnboost/test/utils/runtime/cla/validation.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp> // BOOST_RT_PARAM_NAMESPACE::logic_error
+
+// Boost
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// STL
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+// ************************************************************************** //
+// **************           runtime::cla::validation           ************** //
+// ************************************************************************** //
+
+BOOST_RT_PARAM_INLINE void
+report_input_error( argv_traverser const& tr, format_stream& msg )
+{
+    if( tr.eoi() )
+        msg << BOOST_RT_PARAM_LITERAL( " at the end of input" );
+    else {
+        msg << BOOST_RT_PARAM_LITERAL( " in the following position: " );
+
+        if( tr.input().size() > 5 )
+            msg << tr.input().substr( 0, 5 ) << BOOST_RT_PARAM_LITERAL( "..." );
+        else
+            msg << tr.input();
+    }
+
+    throw BOOST_RT_PARAM_NAMESPACE::logic_error( msg.str() );
+}
+
+//____________________________________________________________________________//
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_VALIDATION_IPP_070604GER
diff --git a/ndnboost/test/utils/runtime/cla/value_generator.hpp b/ndnboost/test/utils/runtime/cla/value_generator.hpp
new file mode 100644
index 0000000..d402977
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/value_generator.hpp
@@ -0,0 +1,81 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : specific value generators
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALUE_GENERATOR_HPP_062604GER
+#define BOOST_RT_CLA_VALUE_GENERATOR_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+#include <ndnboost/test/utils/runtime/cla/parser.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+namespace rt_cla_detail {
+
+// ************************************************************************** //
+// **************        runtime::cla::const_generator         ************** //
+// ************************************************************************** //
+
+template<typename T>
+class const_generator {
+public:
+    // Constructor
+    explicit    const_generator( T const& t ) : m_const_value( t ) {}
+
+    // generator interface
+    void        operator()( parser const&, ndnboost::optional<T>& t ) const   { t = m_const_value; }
+
+private:
+    // Data members
+    T           m_const_value;
+};
+
+// ************************************************************************** //
+// **************         runtime::cla::ref_generator          ************** //
+// ************************************************************************** //
+
+template<typename T>
+class ref_generator {
+public:
+    // Constructor
+    explicit    ref_generator( cstring ref_id ) : m_ref_id( ref_id ) {}
+
+    // generator interface
+    void        operator()( parser const& p, ndnboost::optional<T>& t ) const
+    {
+        p.get( m_ref_id, t );
+    }
+
+private:
+    // Data members
+    cstring     m_ref_id;
+};
+
+//____________________________________________________________________________//
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_VALUE_GENERATOR_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/cla/value_handler.hpp b/ndnboost/test/utils/runtime/cla/value_handler.hpp
new file mode 100644
index 0000000..1d792ba
--- /dev/null
+++ b/ndnboost/test/utils/runtime/cla/value_handler.hpp
@@ -0,0 +1,57 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : specific value handlers
+// ***************************************************************************
+
+#ifndef BOOST_RT_CLA_VALUE_HANDLER_HPP_062604GER
+#define BOOST_RT_CLA_VALUE_HANDLER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#include <ndnboost/test/utils/runtime/cla/fwd.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace cla {
+
+namespace rt_cla_detail {
+
+// ************************************************************************** //
+// **************            runtime::cla::assigner            ************** //
+// ************************************************************************** //
+
+template<typename T>
+class assigner {
+public:
+    // Constructor
+    explicit    assigner( T& loc ) : m_target( loc )    {}
+
+    // value handler implementation
+    void        operator()( parameter const&, T& t )  { m_target = t; }
+
+private:
+    // Data members
+    T&          m_target;
+};
+
+} // namespace rt_cla_detail
+
+} // namespace cla
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CLA_VALUE_HANDLER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/config.hpp b/ndnboost/test/utils/runtime/config.hpp
new file mode 100644
index 0000000..8067a96
--- /dev/null
+++ b/ndnboost/test/utils/runtime/config.hpp
@@ -0,0 +1,156 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : Runtime.Param library configuration
+// ***************************************************************************
+
+#ifndef BOOST_RT_CONFIG_HPP_062604GER
+#define BOOST_RT_CONFIG_HPP_062604GER
+
+// Boost
+#include <ndnboost/config.hpp>
+#ifdef BOOST_MSVC
+# pragma warning(disable: 4511) // copy constructor could not be generated
+# pragma warning(disable: 4512) // assignment operator could not be generated
+# pragma warning(disable: 4181) // qualifier applied to reference type; ignored
+# pragma warning(disable: 4675) // resolved overload was found by argument-dependent lookup
+#endif
+
+// Boost.Test
+#include <ndnboost/test/detail/config.hpp>
+#include <ndnboost/test/utils/basic_cstring/basic_cstring.hpp>
+#include <ndnboost/test/utils/wrap_stringstream.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp> // operator<<(ndnboost::runtime::cstring)
+
+// STL
+#include <string>
+#include <cstdlib>
+
+//____________________________________________________________________________//
+
+#ifndef BOOST_RT_PARAM_CUSTOM_STRING
+#  ifndef BOOST_RT_PARAM_WIDE_STRING
+#    define BOOST_RT_PARAM_NAMESPACE                            runtime
+#  else
+#    define BOOST_RT_PARAM_NAMESPACE                            wide_runtime
+#  endif
+#endif
+
+#ifdef __SUNPRO_CC
+extern int putenv(char*);
+#endif
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+#ifndef BOOST_RT_PARAM_CUSTOM_STRING
+#  ifndef BOOST_RT_PARAM_WIDE_STRING
+
+typedef char                                                    char_type;
+typedef std::string                                             dstring;
+typedef unit_test::const_string                                 cstring;
+typedef unit_test::literal_string                               literal_cstring;
+typedef wrap_stringstream                                       format_stream;
+
+#ifdef BOOST_CLASSIC_IOSTREAMS
+typedef std::ostream                                            out_stream;
+#else
+typedef std::basic_ostream<char_type>                           out_stream;
+#endif
+
+#ifdef BOOST_MSVC
+#pragma warning(push)
+#pragma warning(disable:4996) // putenv
+#endif
+
+#ifndef UNDER_CE
+#if defined(__COMO__) && 0
+inline void
+putenv_impl( cstring name, cstring value )
+{
+    using namespace std;
+    // !! this may actually fail. What should we do?
+    setenv( name.begin(), value.begin(), 1 );
+}
+#else
+inline void
+putenv_impl( cstring name, cstring value )
+{
+    format_stream fs;
+
+    fs << name << '=' << value;
+
+    // !! this may actually fail. What should we do?
+    // const_cast is used to satisfy putenv interface
+    using namespace std;
+    putenv( const_cast<char*>( fs.str().c_str() ) );
+}
+#endif
+#endif
+
+#ifdef BOOST_MSVC 
+#pragma warning(pop) 
+#endif 
+
+#define BOOST_RT_PARAM_LITERAL( l ) l
+#define BOOST_RT_PARAM_CSTRING_LITERAL( l ) cstring( l, sizeof( l ) - 1 )
+#define BOOST_RT_PARAM_GETENV getenv
+#define BOOST_RT_PARAM_PUTENV ::ndnboost::BOOST_RT_PARAM_NAMESPACE::putenv_impl
+#define BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+
+//____________________________________________________________________________//
+
+#  else
+
+typedef wchar_t                                                 char_type;
+typedef std::basic_string<char_type>                            dstring;
+typedef unit_test::basic_cstring<wchar_t const>                 cstring;
+typedef const unit_test::basic_cstring<wchar_t const>           literal_cstring;
+typedef wrap_wstringstream                                      format_stream;
+typedef std::wostream                                           out_stream;
+
+#ifndef UNDER_CE
+inline void
+putenv_impl( cstring name, cstring value )
+{
+    format_stream fs;
+
+    fs << name << '=' << value;
+
+    // !! this may actually fail. What should we do?
+    // const_cast is used to satisfy putenv interface
+    using namespace std;
+    wputenv( const_cast<wchar_t*>( fs.str().c_str() ) );
+}
+#endif
+
+#define BOOST_RT_PARAM_LITERAL( l ) L ## l
+#define BOOST_RT_PARAM_CSTRING_LITERAL( l ) cstring( L ## l, sizeof( L ## l )/sizeof(wchar_t) - 1 )
+#define BOOST_RT_PARAM_GETENV wgetenv
+#define BOOST_RT_PARAM_PUTENV putenv_impl
+
+#  endif
+#endif
+
+#ifdef __GNUC__
+#define BOOST_RT_PARAM_UNNEEDED_VIRTUAL virtual
+#else
+#define BOOST_RT_PARAM_UNNEEDED_VIRTUAL
+#endif
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_CONFIG_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/environment.hpp b/ndnboost/test/utils/runtime/env/environment.hpp
new file mode 100644
index 0000000..b45f10f
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/environment.hpp
@@ -0,0 +1,172 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : defines and implements inline model of program environment 
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER
+#define BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER
+
+#ifdef UNDER_CE
+#error Windows CE does not support environment variables.
+#endif
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+#include <ndnboost/test/utils/runtime/interpret_argument_value.hpp>
+
+#include <ndnboost/test/utils/runtime/env/fwd.hpp>
+#include <ndnboost/test/utils/runtime/env/modifier.hpp>
+#include <ndnboost/test/utils/runtime/env/variable.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/callback.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************      runtime::environment implementation     ************** //
+// ************************************************************************** //
+
+namespace environment {
+
+namespace rt_env_detail {
+
+template<typename T, typename Modifiers>
+variable_data&
+init_new_var( cstring var_name, Modifiers m = nfp::no_params )
+{
+    rt_env_detail::variable_data& new_vd = new_var_record( var_name );
+
+    cstring str_value = sys_read_var( new_vd.m_var_name );
+
+    if( !str_value.is_empty() ) {
+        try {
+            ndnboost::optional<T> value;
+
+            if( m.has( interpreter ) )
+                m[interpreter]( str_value, value );
+            else
+                interpret_argument_value( str_value, value, 0 );
+
+            if( !!value ) {
+                new_vd.m_value.reset( new typed_argument<T>( new_vd ) );
+
+                arg_value<T>( *new_vd.m_value ) = *value;
+            }
+        }
+        catch( ... ) { // !! could we do that
+            // !! should we report an error?
+        }
+    }
+
+    if( !new_vd.m_value && m.has( default_value ) ) {
+        new_vd.m_value.reset( new typed_argument<T>( new_vd ) );
+
+        nfp::optionally_assign( arg_value<T>( *new_vd.m_value ), m[default_value] );
+    }
+
+    nfp::optionally_assign( new_vd.m_global_id, m, global_id );
+
+    return new_vd;
+}
+
+//____________________________________________________________________________//
+
+} // namespace rt_env_detail
+
+} // namespace environment
+
+// ************************************************************************** //
+// **************             runtime::environment             ************** //
+// ************************************************************************** //
+
+namespace environment {
+
+    // variable access
+    variable_base
+    var( cstring var_name );
+
+    //________________________________________________________________________//
+
+    template<typename T>
+    inline variable<T>
+    var( cstring var_name )
+    {
+        rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
+
+        return environment::variable<T>( !vd ? rt_env_detail::init_new_var<T>( var_name, nfp::no_params ) : *vd );
+    }
+
+    //________________________________________________________________________//
+
+    template<typename T, typename Modifiers>
+    inline variable<T>
+    var( cstring var_name, Modifiers const& m )
+    {
+        rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
+
+        return environment::variable<T>( !vd ? rt_env_detail::init_new_var<T>( var_name, m ) : *vd );
+    }
+
+    //________________________________________________________________________//
+
+    // direct variable value access
+    inline cstring
+    get( cstring var_name )
+    {
+        return environment::var<cstring>( var_name ).value();
+    }
+
+    //________________________________________________________________________//
+
+    template<typename T>
+    inline T const&
+    get( cstring var_name )
+    {
+        return environment::var<T>( var_name ).value();
+    }
+
+    //________________________________________________________________________//
+
+    template<typename T>
+    inline void
+    get( cstring var_name, ndnboost::optional<T>& res )
+    {
+        variable<T> const& v = environment::var<T>( var_name );
+        v.value( res );
+    }
+
+    //________________________________________________________________________//
+
+} // namespace environment
+
+namespace env = environment;
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#ifndef BOOST_RT_PARAM_OFFLINE
+
+#define BOOST_RT_PARAM_INLINE inline
+#include <ndnboost/test/utils/runtime/env/environment.ipp>
+
+#endif
+
+#endif // BOOST_RT_ENV_ENVIRONMENT_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/environment.ipp b/ndnboost/test/utils/runtime/env/environment.ipp
new file mode 100644
index 0000000..f2929de
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/environment.ipp
@@ -0,0 +1,125 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 57992 $
+//
+//  Description : implements model of program environment 
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
+#define BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/validation.hpp>
+
+#include <ndnboost/test/utils/runtime/env/variable.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+
+// STL
+#include <map>
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+// ************************************************************************** //
+// **************             runtime::environment             ************** //
+// ************************************************************************** //
+
+namespace rt_env_detail {
+
+typedef std::map<cstring,rt_env_detail::variable_data> registry;
+typedef std::list<dstring> keys;
+
+BOOST_RT_PARAM_INLINE registry& s_registry()    { static registry instance; return instance; }
+BOOST_RT_PARAM_INLINE keys&     s_keys()        { static keys instance; return instance; }
+
+BOOST_RT_PARAM_INLINE variable_data&
+new_var_record( cstring var_name )
+{
+    // save the name in list of keys
+    s_keys().push_back( dstring() );
+    dstring& key = s_keys().back();
+    assign_op( key, var_name, 0 );
+
+    // create and return new record
+    variable_data& new_var_data = s_registry()[key];
+    
+    new_var_data.m_var_name = key;
+    
+    return new_var_data;
+}
+
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE variable_data*
+find_var_record( cstring var_name )
+{
+    registry::iterator it = s_registry().find( var_name );
+
+    return it == s_registry().end() ? 0 : &(it->second);
+}
+
+//____________________________________________________________________________//
+
+#ifdef BOOST_MSVC 
+#pragma warning(push) 
+#pragma warning(disable:4996) // getenv
+#endif
+
+BOOST_RT_PARAM_INLINE cstring
+sys_read_var( cstring var_name )
+{
+    using namespace std;
+    return BOOST_RT_PARAM_GETENV( var_name.begin() );
+}
+
+#ifdef BOOST_MSVC 
+#pragma warning(pop) 
+#endif
+//____________________________________________________________________________//
+
+BOOST_RT_PARAM_INLINE void
+sys_write_var( cstring var_name, format_stream& var_value )
+{
+    BOOST_RT_PARAM_PUTENV( var_name, cstring( var_value.str() ) );
+}
+
+//____________________________________________________________________________//
+
+} // namespace rt_env_detail
+
+BOOST_RT_PARAM_INLINE variable_base
+var( cstring var_name )
+{
+    rt_env_detail::variable_data* vd = rt_env_detail::find_var_record( var_name );
+
+    BOOST_RT_PARAM_VALIDATE_LOGIC( !!vd,
+                                   BOOST_RT_PARAM_LITERAL( "First access to the environment variable " ) 
+                                        << var_name << BOOST_RT_PARAM_LITERAL( " should be typed" ) );
+
+    return variable_base( *vd );
+}
+
+//____________________________________________________________________________//
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_ENVIRONMENT_IPP_062904GER
diff --git a/ndnboost/test/utils/runtime/env/fwd.hpp b/ndnboost/test/utils/runtime/env/fwd.hpp
new file mode 100644
index 0000000..b869605
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/fwd.hpp
@@ -0,0 +1,54 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 54633 $
+//
+//  Description : environment subsystem forward declarations
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_FWD_HPP_062604GER
+#define BOOST_RT_ENV_FWD_HPP_062604GER
+
+#ifdef UNDER_CE
+#error Windows CE does not support environment variables.
+#endif
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+class variable_base;
+variable_base var( cstring var_name );
+
+namespace rt_env_detail {
+
+struct variable_data;
+
+variable_data&  new_var_record( cstring var_name );
+variable_data*  find_var_record( cstring var_name );
+
+cstring         sys_read_var( cstring var_name );
+void            sys_write_var( cstring var_name, format_stream& var_value );
+
+}
+
+template <typename T> class variable;
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_FWD_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/modifier.hpp b/ndnboost/test/utils/runtime/env/modifier.hpp
new file mode 100644
index 0000000..a760368
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/modifier.hpp
@@ -0,0 +1,47 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  Use, modification, and distribution are subject to 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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines variable modifiers
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_MODIFIER_HPP_062604GER
+#define BOOST_RT_ENV_MODIFIER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/named_params.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+// ************************************************************************** //
+// **************         environment variable modifiers       ************** //
+// ************************************************************************** //
+
+namespace {
+
+nfp::typed_keyword<cstring,struct global_id_t>   global_id;
+nfp::keyword<struct default_value_t>             default_value;
+nfp::keyword<struct interpreter_t>               interpreter;
+
+} // local namespace
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_MODIFIER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/env/variable.hpp b/ndnboost/test/utils/runtime/env/variable.hpp
new file mode 100644
index 0000000..17a4f39
--- /dev/null
+++ b/ndnboost/test/utils/runtime/env/variable.hpp
@@ -0,0 +1,223 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 81913 $
+//
+//  Description : defines model of program environment variable
+// ***************************************************************************
+
+#ifndef BOOST_RT_ENV_VARIABLE_HPP_062604GER
+#define BOOST_RT_ENV_VARIABLE_HPP_062604GER
+
+#ifdef UNDER_CE
+#error Windows CE does not support environment variables.
+#endif
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/fwd.hpp>
+#include <ndnboost/test/utils/runtime/parameter.hpp>
+#include <ndnboost/test/utils/runtime/argument.hpp>
+
+#include <ndnboost/test/utils/runtime/env/fwd.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+// ************************************************************************** //
+// **************      runtime::environment::variable_data     ************** //
+// ************************************************************************** //
+
+namespace rt_env_detail {
+
+struct variable_data : public runtime::parameter {
+    cstring         m_var_name;
+    dstring         m_global_id;
+    argument_ptr    m_value;
+};
+
+} // namespace rt_env_detail
+
+// ************************************************************************** //
+// **************     runtime::environment::variable_base      ************** //
+// ************************************************************************** //
+
+class variable_base {
+public:
+    explicit    variable_base( rt_env_detail::variable_data& data ) : m_data( &data ) {}
+
+    // arguments access
+    template<typename T>
+    T const&    value() const
+    {
+        return arg_value<T>( *m_data->m_value );
+    }
+
+    template<typename T>
+    void        value( ndnboost::optional<T>& res ) const
+    {
+        if( has_value() )
+            res = arg_value<T>( *m_data->m_value );
+        else
+            res.reset();
+    }
+
+    bool        has_value() const   { return m_data->m_value!=0; }
+    cstring     name() const        { return m_data->m_var_name; }
+
+protected:
+    // Data members
+    rt_env_detail::variable_data*  m_data;
+} ;
+
+// ************************************************************************** //
+// **************        runtime::environment::variable        ************** //
+// ************************************************************************** //
+
+template<typename T = cstring>
+class variable : public variable_base {
+public:
+    // Constructors
+    explicit    variable( cstring var_name );
+
+    template<typename Modifiers>
+    explicit    variable( cstring var_name, Modifiers const& m );
+
+    explicit    variable( rt_env_detail::variable_data& data ) 
+    : variable_base( data )                                 {}
+
+    // other variable assignment
+    void        operator=( variable const& v )              { m_data = v.m_data; }
+
+    // access methods
+    T const&    value() const                               { return variable_base::value<T>(); }
+
+#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3206)) || \
+    BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x0593))
+    template<typename T>
+    void        value( ndnboost::optional<T>& res ) const      { variable_base::value( res ); }
+#else
+    using       variable_base::value;
+#endif
+
+    // Value assignment
+    template<typename V>
+    void        operator=( V const& v )
+    {
+        if( !has_value() )
+            m_data->m_value.reset( new typed_argument<T>( *m_data ) );
+
+        arg_value<T>( *m_data->m_value ) = v;
+
+        rt_env_detail::sys_write_var( m_data->m_var_name, format_stream().ref() << value() );
+    }
+}; // class variable
+
+//____________________________________________________________________________//
+
+template<typename CharT, typename Tr,typename T>
+inline std::basic_ostream<CharT,Tr>&
+operator<<( std::basic_ostream<CharT,Tr>& os, variable<T> const& v )
+{
+    os << v.name() << '=';
+
+    if( v.has_value() )
+        os << v.value();
+
+    return os;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator==( variable<T> ev, V const& v )
+{
+    return ev.has_value() && ev.value() == v;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator==( V const& v, variable<T> ev )
+{
+    return ev.has_value() && ev.value() == v;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator!=( variable<T> ev, V const& v )
+{
+    return !ev.has_value() || ev.value() != v;
+}
+
+//____________________________________________________________________________//
+
+template<typename T, typename V>
+inline bool
+operator!=( V const& v, variable<T> ev )
+{
+    return !ev.has_value() || ev.value() != v;
+}
+
+//____________________________________________________________________________//
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+// ************************************************************************** //
+// ************************************************************************** //
+// Implementation
+
+#include <ndnboost/test/utils/runtime/env/environment.hpp>
+
+// ************************************************************************** //
+// **************        runtime::environment::variable        ************** //
+// ************************************************************************** //
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+namespace environment {
+
+template<typename T>
+variable<T>::variable( cstring var_name )
+: variable_base( environment::var<T>( var_name ) )
+{}
+
+//____________________________________________________________________________//
+
+template<typename T>
+template<typename Modifiers>
+variable<T>::variable( cstring var_name, Modifiers const& m )
+: variable_base( environment::var<T>( var_name, m ) )
+{}
+
+//____________________________________________________________________________//
+
+} // namespace environment
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_ENV_VARIABLE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/fwd.hpp b/ndnboost/test/utils/runtime/fwd.hpp
new file mode 100644
index 0000000..3714bfc
--- /dev/null
+++ b/ndnboost/test/utils/runtime/fwd.hpp
@@ -0,0 +1,41 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : global framework level forward declaration
+// ***************************************************************************
+
+#ifndef BOOST_RT_FWD_HPP_062604GER
+#define BOOST_RT_FWD_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+class parameter;
+
+class argument;
+typedef shared_ptr<argument> argument_ptr;
+typedef shared_ptr<argument const> const_argument_ptr;
+
+template<typename T> class value_interpreter;
+template<typename T> class typed_argument;
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_FWD_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/interpret_argument_value.hpp b/ndnboost/test/utils/runtime/interpret_argument_value.hpp
new file mode 100644
index 0000000..4f5a214
--- /dev/null
+++ b/ndnboost/test/utils/runtime/interpret_argument_value.hpp
@@ -0,0 +1,163 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : default algorithms for string to specific type convertions
+// ***************************************************************************
+
+#ifndef BOOST_RT_INTERPRET_ARGUMENT_VALUE_HPP_062604GER
+#define BOOST_RT_INTERPRET_ARGUMENT_VALUE_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+#include <ndnboost/test/utils/runtime/trace.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/basic_cstring/io.hpp>
+#include <ndnboost/test/utils/basic_cstring/compare.hpp>
+
+// Boost
+#include <ndnboost/optional.hpp>
+#include <ndnboost/lexical_cast.hpp>
+
+// STL
+// !! could we eliminate these includes?
+#include <list>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************       runtime::interpret_argument_value      ************** //
+// ************************************************************************** //
+// returns true if source is used false otherwise
+
+// generic case
+template<typename T>
+struct interpret_argument_value_impl {
+    static bool _( cstring source, ndnboost::optional<T>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<" << typeid(T).name() << ">" );
+
+        res = lexical_cast<T>( source );
+
+        BOOST_RT_PARAM_TRACE( "String " << source << " is interpreted as " << *res );
+        return true;
+    }
+};
+
+
+//____________________________________________________________________________//
+
+// dstring case
+template<>
+struct interpret_argument_value_impl<dstring> {
+    static bool _( cstring source, ndnboost::optional<dstring>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<dstring>" );
+
+        res = dstring();
+        assign_op( *res, source, 0 );
+
+        return true;
+    }
+};
+
+//____________________________________________________________________________//
+
+// cstring case
+template<>
+struct interpret_argument_value_impl<cstring> {
+    static bool _( cstring source, ndnboost::optional<cstring>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<cstring>" );
+
+        res = source;
+
+        return true;
+    }
+};
+
+//____________________________________________________________________________//
+
+// specialization for type bool
+template<>
+struct interpret_argument_value_impl<bool> {
+    static bool _( cstring source, ndnboost::optional<bool>& res )
+    {
+        BOOST_RT_PARAM_TRACE( "In interpret_argument_value_impl<bool>" );
+
+        static literal_cstring YES( BOOST_RT_PARAM_CSTRING_LITERAL( "YES" ) );
+        static literal_cstring Y( BOOST_RT_PARAM_CSTRING_LITERAL( "Y" ) );
+        static literal_cstring NO( BOOST_RT_PARAM_CSTRING_LITERAL( "NO" ) );
+        static literal_cstring N( BOOST_RT_PARAM_CSTRING_LITERAL( "N" ) );
+        static literal_cstring one( BOOST_RT_PARAM_CSTRING_LITERAL( "1" ) );
+        static literal_cstring zero( BOOST_RT_PARAM_CSTRING_LITERAL( "0" ) );
+
+        source.trim();
+
+        if( case_ins_eq( source, YES ) || case_ins_eq( source, Y ) || case_ins_eq( source, one ) ) {
+            res = true;
+            return true;
+        }
+        else if( case_ins_eq( source, NO ) || case_ins_eq( source, N ) || case_ins_eq( source, zero ) ) {
+            res = false;
+            return true;
+        }
+        else {
+            res = true;
+            return false;
+        }
+    }
+};
+
+//____________________________________________________________________________//
+
+template<typename T>
+inline bool
+interpret_argument_value( cstring source, ndnboost::optional<T>& res, long )
+{
+    return interpret_argument_value_impl<T>::_( source, res );
+}
+
+//____________________________________________________________________________//
+
+// specialization for list of values
+template<typename T>
+inline bool
+interpret_argument_value( cstring source, ndnboost::optional<std::list<T> >& res, int )
+{
+    BOOST_RT_PARAM_TRACE( "In interpret_argument_value<std::list<T>>" );
+
+    res = std::list<T>();
+
+    while( !source.is_empty() ) {
+        // !! should we use token_iterator
+        cstring::iterator single_value_end = std::find( source.begin(), source.end(), BOOST_RT_PARAM_LITERAL( ',' ) );
+
+        ndnboost::optional<T> value;
+        interpret_argument_value( cstring( source.begin(), single_value_end ), value, 0 );
+
+        res->push_back( *value );
+
+        source.trim_left( single_value_end + 1 );
+    }
+
+    return true;
+}
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_INTERPRET_ARGUMENT_VALUE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/parameter.hpp b/ndnboost/test/utils/runtime/parameter.hpp
new file mode 100644
index 0000000..2f6d1b7
--- /dev/null
+++ b/ndnboost/test/utils/runtime/parameter.hpp
@@ -0,0 +1,38 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : abstract interface for the formal parameter
+// ***************************************************************************
+
+#ifndef BOOST_RT_PARAMETER_HPP_062604GER
+#define BOOST_RT_PARAMETER_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************              runtime::parameter              ************** //
+// ************************************************************************** //
+
+class parameter {
+public:
+    virtual ~parameter() {}
+};
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_PARAMETER_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/trace.hpp b/ndnboost/test/utils/runtime/trace.hpp
new file mode 100644
index 0000000..c71eb8e
--- /dev/null
+++ b/ndnboost/test/utils/runtime/trace.hpp
@@ -0,0 +1,30 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : optional internal tracing
+// ***************************************************************************
+
+#ifndef BOOST_RT_TRACE_HPP_062604GER
+#define BOOST_RT_TRACE_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+#ifdef BOOST_RT_PARAM_DEBUG
+
+#include <iostream>
+
+#  define BOOST_RT_PARAM_TRACE( str ) std::cerr << str << std::endl
+#else
+#  define BOOST_RT_PARAM_TRACE( str )
+#endif
+
+#endif // BOOST_RT_TRACE_HPP_062604GER
diff --git a/ndnboost/test/utils/runtime/validation.hpp b/ndnboost/test/utils/runtime/validation.hpp
new file mode 100644
index 0000000..e794df9
--- /dev/null
+++ b/ndnboost/test/utils/runtime/validation.hpp
@@ -0,0 +1,82 @@
+//  (C) Copyright Gennadiy Rozental 2005-2008.
+//  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)
+
+//  See http://www.boost.org/libs/test for the library home page.
+//
+//  File        : $RCSfile$
+//
+//  Version     : $Revision: 49312 $
+//
+//  Description : defines exceptions and validation tools
+// ***************************************************************************
+
+#ifndef BOOST_RT_VALIDATION_HPP_062604GER
+#define BOOST_RT_VALIDATION_HPP_062604GER
+
+// Boost.Runtime.Parameter
+#include <ndnboost/test/utils/runtime/config.hpp>
+
+// Boost.Test
+#include <ndnboost/test/utils/class_properties.hpp>
+
+// Boost
+#include <ndnboost/shared_ptr.hpp>
+
+// STL
+#ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+#include <stdexcept>
+#endif
+
+namespace ndnboost {
+
+namespace BOOST_RT_PARAM_NAMESPACE {
+
+// ************************************************************************** //
+// **************             runtime::logic_error             ************** //
+// ************************************************************************** //
+
+class logic_error 
+#ifdef BOOST_RT_PARAM_EXCEPTION_INHERIT_STD
+: public std::exception
+#endif
+{
+    typedef shared_ptr<dstring> dstring_ptr;
+public:
+    // Constructor // !! could we eliminate shared_ptr
+    explicit    logic_error( cstring msg ) : m_msg( new dstring( msg.begin(), msg.size() ) ) {}
+    ~logic_error() throw()                          {}
+
+    dstring const&   msg() const                    { return *m_msg; }
+    virtual char_type const* what() const throw()   { return m_msg->c_str(); }
+
+private:
+    dstring_ptr m_msg;
+};
+
+// ************************************************************************** //
+// **************          runtime::report_logic_error         ************** //
+// ************************************************************************** //
+
+inline void
+report_logic_error( format_stream& msg )
+{
+    throw BOOST_RT_PARAM_NAMESPACE::logic_error( msg.str() );
+}
+
+//____________________________________________________________________________//
+
+#define BOOST_RT_PARAM_REPORT_LOGIC_ERROR( msg ) \
+    ndnboost::BOOST_RT_PARAM_NAMESPACE::report_logic_error( format_stream().ref() << msg )
+
+#define BOOST_RT_PARAM_VALIDATE_LOGIC( b, msg ) \
+    if( b ) {} else BOOST_RT_PARAM_REPORT_LOGIC_ERROR( msg )
+
+//____________________________________________________________________________//
+
+} // namespace BOOST_RT_PARAM_NAMESPACE
+
+} // namespace ndnboost
+
+#endif // BOOST_RT_VALIDATION_HPP_062604GER
