User loginNavigation |
Small Value Set TypesI want to use a kind of dependent type, which I am calling a small value set (SVS) for the time being. An SVS type is a finite set of values of a given type, and is a subtype of that type. One usage of the SVS type is for performing optimization passes (full and partial computations of constant expressions). Using the concatenative language Cat as an example, given the following function f: define f { 30 12 + } The inferred type is () -> (42) Which means it consumes no values from the stack, and produces a single value of the simple dependent type 42. Given the function g: define g { [42] [13] if } The inferred type would be: (bool) -> (42|13) Which means that the function consumes a single boolean value from the stack and produces a value of the SVS type containing the values 42 and 13. In other words the union of the simple dependent types 42 and 13. Am I just renaming something else here? By cdiggins at 2006-09-03 19:28 | LtU Forum | previous forum topic | next forum topic | other blogs | 6365 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago