User loginNavigation |
UnsoundnessHi, I wonder if someone can help resolve the conflict described below. My system is an Algol like language which supports both functional and procedural code. (x=1,y=42.1) which has type (x:int, y:double) then this is a first class value, and the field names are projections: x (x=1,y=42.1) Since I have overloading there's no conflict with the same field name in some other record, (x=1,y=42.1) . x Now, to get rid of lvalues we introduce pointer types and variables so that in var xy = (x=1,y=42.1); &xy <- (x=2,y=43.1); This is really cool because To assign to a component, we introduce a second overload for each projection that takes a pointer argument and returns a pointer: &xy . x <- 3;
This works for other products as well (tuples, arrays and structs). So far so good, but now I have another feature called "compact linear types" The problem is .. compact linear type components are not addressable. And so the conflict: polymorphic pointer projections are unsound: proc f[T,U] (r: &(T,U)) (v:T)) { r.0 <-v; } will not work if r is a pointer to a compact linear object. I can think of three solutions: (1) invent a new pointer type (destroys uniform pointer representation property) By skaller at 2017-01-11 19:14 | LtU Forum | previous forum topic | next forum topic | other blogs | 6947 reads
|
Browse archives
Active forum topics |
Recent comments
23 weeks 1 day ago
23 weeks 1 day ago
23 weeks 1 day ago
45 weeks 2 days ago
49 weeks 4 days ago
51 weeks 1 day ago
51 weeks 1 day ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago