
nametype definitions
Reported by Douglas Creager | January 12th, 2009 @ 10:56 PM | in 1.0-α4
The CSPM compiler doesn't currently support type definitions.
Comments and changes to this ticket
-
Douglas Creager February 13th, 2009 @ 10:21 PM
(from [44b7758612fa95b1b7cd5f9900977473eb7a6cc4]) Int and Bool built-in types
This patch introduces initial support for named types in CSPM. Types treated the same as sets; the only difference is in that certain contexts, the tuple constructor and dot operator have different semantics, which make it easier to define the kinds of sets that types usually consist of.
The first two named types are the built-in Int and Bool types. They are defined as keywords, and have built-in evaluation rules that result in the appropriate {True, False} and {..., -1, 0, 1, ...} sets.
Lighthouse: [#17] http://github.com/hst/hst/commit...
-
Douglas Creager February 13th, 2009 @ 10:21 PM
(from [1d240247d57548c7162181ab816f4dceb9f5253b]) “nametype” statements
The CSPM parser now supports “nametype” statements at the top level of a CSPM script. A nametype statement is a simple binding of a variable to a type expression. There is not yet support for the tuple operator in type expressions; a later patch will introduce its product type semantics.
Lighthouse: [#17] http://github.com/hst/hst/commit...
-
Douglas Creager February 18th, 2009 @ 04:13 PM
- Milestone set to 1.0-α4
-
Douglas Creager February 28th, 2009 @ 12:50 PM
(from [8da06dd715d084d42f086b1df9e6730417a30d17]) Product types
In a type expression, a tuple creates a product type. In other words, with a type expression, you get
nametype A = ({0,1}, {2,3}) A == {(0,2), (0,3), (1,2), (1,3)}
whereas in a regular expression, you get
A == ({0,1}, {2,3})
Currently type expressions only occur in nametype statements.
Lighthouse: [#17] http://github.com/hst/hst/commit...
-
Douglas Creager February 28th, 2009 @ 12:50 PM
(from [8da06dd715d084d42f086b1df9e6730417a30d17]) Product types
In a type expression, a tuple creates a product type. In other words, with a type expression, you get
nametype A = ({0,1}, {2,3}) A == {(0,2), (0,3), (1,2), (1,3)}
whereas in a regular expression, you get
A == ({0,1}, {2,3})
Currently type expressions only occur in nametype statements.
Lighthouse: [#17] http://github.com/hst/hst/commit...
-
Douglas Creager March 2nd, 2009 @ 05:21 PM
- State changed from new to open
-
Douglas Creager March 2nd, 2009 @ 06:23 PM
- State changed from open to resolved
- Title changed from Type definitions to nametype definitions
We've got
nametype
statements implemented, so I'm going to retroactively focus this ticket on that one feature, and close the ticket.I'll open a new ticket for
datatype
statements. I also need to add support for dotted values tonametype
statements, but I'm filing that work under ticket #15.
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.
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
-
17 Type definitions Lighthouse: [#17] http://github.com/hst/hst/commit...
-
17 Type definitions Lighthouse: [#17] http://github.com/hst/hst/commit...
-
17 Type definitions Lighthouse: [#17] http://github.com/hst/hst/commit...
-
17 Type definitions Lighthouse: [#17] http://github.com/hst/hst/commit...
-
15 Dotted values It's the dot of two numbers. That doesn't involve channel...