#15 ✓resolved
Douglas Creager

Dotted values

Reported by Douglas Creager | January 12th, 2009 @ 10:55 PM | in 1.0-α4

The CSPM compiler doesn't currently support dotted channels.

Comments and changes to this ticket

  • Douglas Creager

    Douglas Creager January 13th, 2009 @ 12:08 AM

    • Assigned user set to “Douglas Creager”
  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 06:04 PM

    • Title changed from “Dotted channels” to “Dotted values”

    It's actually dotted values that aren't supported. For instance, the following is a perfectly valid CSPM expression:

    1.2
    
    

    It's the dot of two numbers. That doesn't involve channels or events in any way. Dotted values will also come into play with datatype statements (part of ticket #17) and channels that carry data (what this ticket originally called “dotted channels”).

  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 06:21 PM

    • State changed from “new” to “open”
  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 06:22 PM

    • Milestone set to 1.0-α4
  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 07:34 PM

    (from [a086a735566dd10bebe7f0d85ccb209242c06317]) Dotted values

    This patch introduces basic support for dotted values. A dotted value is similar to a tuple:

    1.2 (1,2)

    However, dots support concatenation:

    x = 1.2 y = 3.4 x.y == 1.2.3.4

    The CSPM parser now allows you to construct dotted values using the “.” operator. We still need to add support for dotted values in patterns and type expressions.

    Lighthouse: [#15] http://github.com/hst/hst/commit...

  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 07:34 PM

    (from [a086a735566dd10bebe7f0d85ccb209242c06317]) Dotted values

    This patch introduces basic support for dotted values. A dotted value is similar to a tuple:

    1.2 (1,2)

    However, dots support concatenation:

    x = 1.2 y = 3.4 x.y == 1.2.3.4

    The CSPM parser now allows you to construct dotted values using the “.” operator. We still need to add support for dotted values in patterns and type expressions.

    Lighthouse: [#15] http://github.com/hst/hst/commit...

  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 07:34 PM

    (from [624f65caa7bc15a6281e6df7ece2d90bca9ed279]) Dotted values in “nametype” statements

    Dotted values in a type expression create product types, just like tuple values:

    nametype A = {0,1}.{2,3} A == {0.2, 0.3, 1.2, 1.3}

    Lighthouse: [#15] http://github.com/hst/hst/commit...

  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 07:34 PM

    (from [624f65caa7bc15a6281e6df7ece2d90bca9ed279]) Dotted values in “nametype” statements

    Dotted values in a type expression create product types, just like tuple values:

    nametype A = {0,1}.{2,3} A == {0.2, 0.3, 1.2, 1.3}

    Lighthouse: [#15] http://github.com/hst/hst/commit...

  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 07:34 PM

    • State changed from “open” to “resolved”

    (from [0dcc09f518d1117c73122ed5b0466a3d4fc159bb]) Dotted values in patterns

    Dotted values can occur in a pattern, such as in the parameters to a named function:

    f(a.b) = a + b

    Based on some experimentation, it turns out that the left-hand side of a dotted pattern must match the first element of a dotted value. The right-hand side must match the “rest” of the dotted value. If the dotted value only contains two elements, then that means it must match the second element. If it contains more than two elements, then that means it must match a slightly smaller dotted value:

    a.b matches 1.2 (a == 1, b == 2) a.b matches 1.2.3 (a == 1, b == 2.3) a.b.c matches 1.2.3 (a == 1, b == 2, c = 3) 1.b matches 1.2.3 (b == 2.3) a.3 DOES NOT MATCH 1.2.3 (a == 1, but 3 doesn't match 2.3)

    Lighthouse: [#15 state:resolved] http://github.com/hst/hst/commit...

  • Douglas Creager

    Douglas Creager March 2nd, 2009 @ 07:34 PM

    (from [0dcc09f518d1117c73122ed5b0466a3d4fc159bb]) Dotted values in patterns

    Dotted values can occur in a pattern, such as in the parameters to a named function:

    f(a.b) = a + b

    Based on some experimentation, it turns out that the left-hand side of a dotted pattern must match the first element of a dotted value. The right-hand side must match the “rest” of the dotted value. If the dotted value only contains two elements, then that means it must match the second element. If it contains more than two elements, then that means it must match a slightly smaller dotted value:

    a.b matches 1.2 (a == 1, b == 2) a.b matches 1.2.3 (a == 1, b == 2.3) a.b.c matches 1.2.3 (a == 1, b == 2, c = 3) 1.b matches 1.2.3 (b == 2.3) a.3 DOES NOT MATCH 1.2.3 (a == 1, but 3 doesn't match 2.3)

    Lighthouse: [#15 state:resolved] http://github.com/hst/hst/commit...

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

An open-source refinement checker for the CSP process algebra.

People watching this ticket

Tags

Referenced by

Pages