stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Stdcxx Wiki] Update of "LocaleLookup" by MartinSebor
Date Tue, 11 Mar 2008 18:38:15 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Stdcxx Wiki" for change notification.

The following page has been changed by MartinSebor:
http://wiki.apache.org/stdcxx/LocaleLookup

The comment on the change is:
Added more detail to The Plan. Minor edits in Problem Statement and Objective.

------------------------------------------------------------------------------
+ [[Anchor(Problem Statement)]]
  = Problem Statement =
  
  Modern operating systems provide support for dozens or even hundreds locales encoded in
various codesets. The set of locales and codesets installed on a computer is typically determined
by the system administrator at the time the operating system is installed. Although there
are standards and conventions in place to establish a common set of locale names, due to historical
reasons both locale and codeset names tend to vary from one implementation to another. Operating
systems may provide the standard names as well as the traditional ones, with the former simply
being aliases for the latter.
  
- The stdcxx test suite contains tests that exercise the behavior of the localization library.
Since the set of installed locales may vary from server to server and since their names need
not be consistent across different operating systems, the test stdcxx driver provides mechanisms
to determine the names of all locales known to a system. For simplicity, many tests exercise
the localization library using all these locale names. Other tests do so in an effort to exercise
different code paths taken based on whether a locale uses a single-byte or multi-byte encoding.
On systems with many installed locales running these tests may take a considerable amount
of time and use up valuable system resources. For example, on AIX systems with all available
locales installed running each test can take as much as an hour. In addition, since many of
the locale names reference the same locale exercising all of them is wasteful. In addition,
since many locales differ only in very minor detail
 s (e.g., the values of punctuator characters), exhaustively testing all of them ends up repeatedly
executing the same code paths and is unnecessary.
+ The stdcxx test suite contains tests that exercise the behavior of the localization library.
Since the set of installed locales may vary from server to server and since their names need
not be consistent across different operating systems, the stdcxx test driver provides mechanisms
to determine the names of all locales known to a system. For simplicity, many tests exercise
the localization library using all these locale names. Other tests do so in an effort to exercise
different code paths taken based on whether a locale uses a single-byte or multi-byte encoding.
On systems with many installed locales running these tests may take a considerable amount
of time and use up valuable system resources. For example, on AIX systems with all available
locales installed running each test can take as much as an hour. In addition, since many of
the locale names reference the same locale exercising all of them is wasteful. In addition,
since many locales differ only in very minor detail
 s (e.g., the values of punctuator characters), exhaustively testing all of them ends up repeatedly
executing the same code paths and is unnecessary.
  
+ [[Anchor(Objective)]]
  = Objective =
  
- The objective of this project is to provide an interface to make it easy to write localization
tests without the knowledge of platform-specific details that provide sufficient code coverage
and that complete in a reasonable amount of time (ideally seconds as opposed to minutes).
The interface must make it easy to query the system for locales that satisfy the specific
requirements of each test. For example, most tests that currently use all installed locales
(e.g., the set of tests for the `std::ctype` facet) only need to exercise a representative
sample of the installed locales without using the same locale more than once. Thus the interface
will need to make it possible to specify such a sample. Another example is tests that attempt
to exercise locales in multibyte encodings whose `MB_CUR_MAX` ranges from 1 to 6 (some of
the `std::codecvt` facet tests). The new interface will need to make it easy to specify such
a set of locales without explicitly naming them, and it will 
 need to retrieve such locales without returning duplicates.
+ The objective of this project is to provide an interface to make it easy to write localization
tests without the knowledge of platform-specific details (such as locale names) that provide
sufficient code coverage and that complete in a reasonable amount of time (ideally seconds
as opposed to minutes). The interface must make it easy to query the system for locales that
satisfy the specific requirements of each test. For example, most tests that currently use
all installed locales (e.g., the set of tests for the `std::ctype` facet) only need to exercise
a representative sample of the installed locales without using the same locale more than once.
Thus the interface will need to make it possible to specify such a sample. Another example
is tests that attempt to exercise locales in multibyte encodings whose `MB_CUR_MAX` ranges
from 1 to 6 (some of the `std::codecvt` facet tests). The new interface will need to make
it easy to specify such a set of locales without explicitly na
 ming them, and it will need to retrieve such locales without returning duplicates.
  
  [[Anchor(Definitions)]]
  = Definitions =
@@ -28, +30 @@

  [[Anchor(Plan)]]
  = Plan =
  
- This page relates to the issue described at http://issues.apache.org/jira/browse/STDCXX-608.
There has been some discussion both on and off the dev@ list about how to proceed. This page
is here to document what has been discussed.
+ This page relates to the issue described in [http://issues.apache.org/jira/browse/STDCXX-608
STDCXX-608]. There has been some discussion both on and off the dev@ list about how to proceed.
This page is here to document what has been discussed.
  
- The plan is to take a regular expression like query string, do a brace expansion to get
several simpler regular expressions, and then search the list of installed locales for matches.
+ The plan to meet the [#Objective Objective] is to provide an interface to query the set
of installed locales based on a set of a small number of essential parameters  used by the
localization tests. The interface should make it easy to express conjunction, disjunction,
and negation of the terms (parameters) and support (a perhaps simplified version of) [http://www.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap09.html#tag_09_03
Basic Regular Expression] syntax. We've decided to use shell brace expansion as a means of
expressing logical conjunction between terms: a valid brace expression is expanded to obtain
a set of terms implicitly connected by a logical AND. Individual ('\n'-separated) lines of
the query string are taken to be implicitly connected by a logical OR. This approach models
the [http://www.opengroup.org/onlinepubs/009695399/utilities/grep.html grep] interface with
each line loosely corresponding to the argument of the `-e` option to `grep`.
  
  Given a query string 
  
@@ -82, +84 @@

     a 1 2 b
  }}}
  
- In most cases you would want to use rw_shell_expand(). '''Perhaps ''rw_brace_expand'' should
become an implementation function and the header/source/test should be renamed to shellexp.h/shellexp.cpp/0.shellexp.cpp'''

+ In most cases you would want to use `rw_shell_expand()`. '''Perhaps ''rw_brace_expand''
should become an implementation function and the header/source/test should be renamed to shellexp.h/shellexp.cpp/0.shellexp.cpp'''

  
  [[Anchor(Part2)]]
  = Part 2 (STDCXX-715) =

Mime
View raw message