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
