Subject: RE: [IPTEL] CPL time ranges

From: "Jonathan Rosenberg" <[email-masked]>
Date: Mon, 2 Oct 2000 00:56:44 -0400

Good work. Nearly as I can tell, this seems to work. I'd feel a lot better
if there were running code. Step 4 might be a bit tricky to actually
compute, for example, but I think it can be done.

So, we now have the following on the table:

1. a potential working algorithm for a reasonable subset of iCal that runs
in O(1)
2. a few folks joining in on the side of iCal (Jay, EmmanueL)
3. Henning standing firm on iCal, Jonathan it seems also supporting his
proposed subset of iCal
4. James supporting crontab on his last post
5. myself on the fence now

Rough consensus would now seem to support an iCal subset. Running code is
not entirely there, and I suspect it won't be in time for this to move
forward swiftly. As a result, I am now proposing the following:

*IFF* it can be demonstrated that this algorithm works on at least four
example time switches of reasonable complexity, we move forward with this
proposal. To prove correctness, you take a time-switch <time> statement, a
call time, and write out the outputs of each of the steps, explaining in
English how they were arrived at. This exercise (which Jonathan likely did
in any case) will help increase confidence in the correctness of this
algorithm. I think it would also make good text for the specification.

I'd REALLY like to see such a posting in the next few days, hopefully before
WEDNESDAY. Assuming such examples do appear, and no one else switches sides
again or jumps on board in favor of crontab, we'll (hopefully) declare this
closed once and for all and move on with the other open issues in CPL.

Thanks,
Jonathan R.

---
Jonathan D. Rosenberg                       72 Eagle Rock Ave.
Chief Scientist                             First Floor
dynamicsoft                                 East Hanover, NJ 07936
[email-masked]                     FAX:   (973) 952-5050
http://www.cs.columbia.edu/~jdrosen         PHONE: (973) 952-5000
http://www.dynamicsoft.com

> -----Original Message-----
> From: Jonathan Lennox [mailto:[email-masked]]
> Sent: Friday, September 29, 2000 7:48 PM
> To: [email-masked]
> Subject: Re: [IPTEL] CPL time ranges
>
>
> On Thursday, September 28 2000, "Jonathan Lennox" wrote to
> "Henning Schulzrinne, [email-masked]" saying:
>
> > I believe a somewhat broader iCal subset will be able to represent
> > all, or almost all, of these attributes naturally, and
> still be resolvable
> > in O(1) time with respect to (now - dtstart); more
> information will be
> > forthcoming soon.
>
> Here it is.  This handles almost all of iCal -- and, I
> believe, all its
> *useful* parts -- in O(1) time.
>
> No running code yet, though implementation of this algorithm should be
> straightforward.
>
> "Beware of bugs in the above code.  I have only proven it
> correct; I haven't
> tried it yet." -- Donald Knuth
>
> Comments *very* welcome.
>
> --
> Jonathan Lennox
> [email-masked]
>
>

_______________________________________________
IPTEL mailing list
[email-masked]
http://lists.bell-labs.com/mailman/listinfo/iptel

---

From: Jonathan Lennox <[email-masked]>
Date: Thu, 5 Oct 2000 22:54:58 -0400 (EDT)

On Monday, October 2 2000, "Jonathan Rosenberg" wrote to "'Jonathan Lennox', <[email-masked]>" saying:

> if there were running code.

I live to please.  I now have running code.

Available for your reviewing pleasure:
<http://www.cs.columbia.edu/~lennox/Cal-Code.jar>.

This is preliminary code, with several known bugs, but I thought it would
be a Good Thing to get it out to the group as soon as possible.

Comments *very* welcome.

See the README file, attached.

-- 
Jonathan Lennox
[email-masked]

This archive contains sample Java code implementing the logic underneath the
CPL <time-switch> tag.

The class edu.columbia.cpl.Recurrence implements a recurrence.  It has
all the accessors necessary for setting the parameters of a recurrence.
There are two support classes, edu.columbia.cpl.Duration (which represents a
duration interval) and edu.columbia.cpl.DayAndPosition (which represents
byday rules like "fourth thursday").

This code is only a rudimentary implementation of the CPL time-switch.  It
is missing:
        * Parsers
        * Much error-checking
        * Much documentation
          (There is Javadoc documentation of some functions.)

Known bugs with the code are listed in the file 'BUGS'.

CPL time-switch, and this code, is limited from RFC 2445 iCal RRULEs in the
following ways:
        * frequencies and by* rules of less than a day are eliminated
        * "count" is eliminated
        * "bysetpos" is eliminated
        * Durations longer than the minimum interval are not supported.
          (They are currently accepted by this code, but don't work
          correctly.) 

The file TestRecur runs through those examples from RFC 2445 which meet the
above criteria.  (Tests with "count" parameters simply have the count
omitted.  These are marked with a (!) in the test name.)

This code is Copyright 2000 Columbia University.  All Rights Reserved.
Future revisions of this code (once some bugs are worked out) may be under
some type of open-source license, but this release is for informational
purposes only.

Written by Jonathan Lennox <[email-masked]>, October 5, 2000.  All
comments welcome.

---

From: Jonathan Lennox <[email-masked]>
Date: Wed, 11 Oct 2000 13:54:24 -0400 (EDT)

Version 1.0 of my sample Java code for resolving CPL time-switches is now
available from <http://www.cs.columbia.edu/~lennox/Cal-Code/>.

This version is open-source licensed under a standard BSD license.

This version fixes all the known bugs in the version I distributed last
week, and it handles all the applicable test cases from RFC 2445 correctly.
It has also been fairly thoroughly documented.

Comments welcome.

-- 
Jonathan Lennox
[email-masked]