> What do implementers think is a "reasonable number of iterations"? My
> sense is that we're talking about at most 4 or 5, and usually 2 or 3.

I interpreted the word "iteration" to mean "reapplication" of the
rules; not counting the first application. The Nickname test cases
become stable after 2 iterations of the rules.

  output1 = precis_encode(input)
  output2 = precis_encode(output1)      # iteration 1
  output3 = precis_encode(output2)      # iteration 2 confirms that
output3 == output2

I can't come up with a Nickname test case that requires more than 2
iterations to become stable, but that doesn't mean they don't exist.
It's possible that a new PRECIS profile could be defined that has
stability issues. IMO, if a PRECIS profile isn't stable after 3
iterations, it's broken.

The last sentence might read like this:

  Therefore, an implementation SHOULD reapply the rules
   repeatedly until the output string is stable; if the output string
   does not stabilize after three iterations, the
   implementation SHOULD reject
   the input string as invalid.

In the worst case, this means that you are calling precis_encode()
four times for an input string.

-Bill


On Wed, Jul 19, 2017 at 6:40 PM, Peter Saint-Andre <[email protected]> wrote:
> On 7/16/17 5:20 PM, [email protected] wrote:
>>
>> A New Internet-Draft is available from the on-line Internet-Drafts 
>> directories.
>> This draft is a work item of the Preparation and Comparison of 
>> Internationalized Strings of the IETF.
>>
>>         Title           : PRECIS Framework: Preparation, Enforcement, and 
>> Comparison of Internationalized Strings in Application Protocols
>>         Authors         : Peter Saint-Andre
>>                           Marc Blanchet
>>       Filename        : draft-ietf-precis-7564bis-09.txt
>
> Our area director pointed out to me offlist that the definition of
> "reasonable" is vague in the following text:
>
>    Because of the order of operations specified here, applying the rules
>    for any given PRECIS profile is not necessarily an idempotent
>    procedure (e.g., under certain circumstances, such as when Unicode
>    normalization form KC is used, performing Unicode normalization after
>    case mapping can still yield uppercase characters for certain code
>    points).  Therefore, an implementation SHOULD apply the rules
>    repeatedly until the output string is stable; if the output string
>    does not stabilize within a reasonable number of iterations, the
>    implementation SHOULD terminate application of the rules and reject
>    the input string as invalid.

_______________________________________________
precis mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/precis

Reply via email to