Sure. I describe an unsafe approach as follows. A safe one is
just the unsafe one plus some proofs.
val p0 = arrayref2ptr(A) // $UN.cast{ptr}(A)
val p1 = ptr_succ (p0, ofs)
val (pf, fpf | p1) = $UN.ptr_vtake{@[T][nelement]}(p1)
Then !p1 is the left-value your need.
On Saturday, October 24, 2015 at 3:47:56 PM UTC-4, Barry Schwartz wrote:
Is there a way to make a left-value out of a slice of an array
(arrayref, arrayptr, @, etc.)?
That has the kinds of elements I figured would be involved but putting
them together, not so much.
The book would be much easier for me BTW if it came in a single-page
version (such as one can get optionally with Texinfo). Then browser
‘find in page’ functions work. Also then it can easily be downloaded
for offline use.
Sure. I describe an unsafe approach as follows. A safe one is
just the unsafe one plus some proofs.
val p0 = arrayref2ptr(A) // $UN.cast{ptr}(A)
val p1 = ptr_succ (p0, ofs)
val (pf, fpf | p1) = $UN.ptr_vtake{@[T][nelement]}(p1)
Then !p1 is the left-value your need.
On Saturday, October 24, 2015 at 3:47:56 PM UTC-4, Barry Schwartz wrote:
Is there a way to make a left-value out of a slice of an array
(arrayref, arrayptr, @, etc.)?
That has the kinds of elements I figured would be involved but putting
them together, not so much.
The book would be much easier for me BTW if it came in a single-page
version (such as one can get optionally with Texinfo). Then browser
‘find in page’ functions work. Also then it can easily be downloaded
for offline use.