Consuming var views?

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea

Simple reproduction:

implement main() = let
var x = 1 : int
prval some = Some_v(view@(x))
prval Some_v y = some
in 0 end

gives me two errors:

the linear dynamic variable [y$65(-1)] needs to be consumed but it is preserved with the type [S2EVar(0)] instead.
the linear dynamic variable [x$view$66(-1)] is preserved but with an incompatible type.

Which make sense to me but I’m not sure how to fix it.On Sun, Sep 07, 2014 at 10:40:37PM -0400, Hongwei Xi wrote:

Code?

On Sun, Sep 7, 2014 at 10:34 PM, Shea Levy sh...@shealevy.com wrote:

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/20140908023429.GC2286%40nixos.hsd1.nh.comcast.net
.


You received this message because you are subscribed to the Google Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLqDYjgz5JoL_rpmW%3Dxedzj%2BOFdiuvZPLrA2oRkh-7QK_A%40mail.gmail.com.

prval some = Some_v{int@x}(view@x)

Am I understanding correct that the static term {int@x} references a
dynamic expression “x”? Thanks.On Sunday, September 7, 2014 10:34:32 PM UTC-4, Shea Levy wrote:

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea

implement main() = let
var x = 1 : int
prval some = Some_v{int@x}(view@x)
prval Some_v y = some
prval () = view@(x) := y
in 0 endOn Sunday, September 7, 2014 10:47:18 PM UTC-4, Shea Levy wrote:

Simple reproduction:

implement main() = let
var x = 1 : int
prval some = Some_v(view@(x))
prval Some_v y = some
in 0 end

gives me two errors:

the linear dynamic variable [y$65(-1)] needs to be consumed but it is
preserved with the type [S2EVar(0)] instead.
the linear dynamic variable [x$view$66(-1)] is preserved but with an
incompatible type.

Which make sense to me but I’m not sure how to fix it.

On Sun, Sep 07, 2014 at 10:40:37PM -0400, Hongwei Xi wrote:

Code?

On Sun, Sep 7, 2014 at 10:34 PM, Shea Levy <sh...@shealevy.com <javascript:>> wrote:

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea


You received this message because you are subscribed to the Google
Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/ats-lang-users/20140908023429.GC2286%40nixos.hsd1.nh.comcast.net

.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLqDYjgz5JoL_rpmW%3Dxedzj%2BOFdiuvZPLrA2oRkh-7QK_A%40mail.gmail.com.

In int@x, x is static.

The declaration ‘var x: int’ also introduces a static address ‘x’.On Monday, September 8, 2014 4:30:01 PM UTC-4, Zhiqiang Ren wrote:

prval some = Some_v{int@x}(view@x)

Am I understanding correct that the static term {int@x} references a
dynamic expression “x”? Thanks.

On Sunday, September 7, 2014 10:34:32 PM UTC-4, Shea Levy wrote:

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea

Code?On Sun, Sep 7, 2014 at 10:34 PM, Shea Levy sh...@shealevy.com wrote:

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea


You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/20140908023429.GC2286%40nixos.hsd1.nh.comcast.net
.

Ah ha, thanks!On Sun, Sep 07, 2014 at 08:32:53PM -0700, gmhwxi wrote:

implement main() = let
var x = 1 : int
prval some = Some_v{int@x}(view@x)
prval Some_v y = some
prval () = view@(x) := y
in 0 end

On Sunday, September 7, 2014 10:47:18 PM UTC-4, Shea Levy wrote:

Simple reproduction:

implement main() = let
var x = 1 : int
prval some = Some_v(view@(x))
prval Some_v y = some
in 0 end

gives me two errors:

the linear dynamic variable [y$65(-1)] needs to be consumed but it is
preserved with the type [S2EVar(0)] instead.
the linear dynamic variable [x$view$66(-1)] is preserved but with an
incompatible type.

Which make sense to me but I’m not sure how to fix it.

On Sun, Sep 07, 2014 at 10:40:37PM -0400, Hongwei Xi wrote:

Code?

On Sun, Sep 7, 2014 at 10:34 PM, Shea Levy <sh...@shealevy.com <javascript:>> wrote:

Hi all,

I have a function where I create an instance of a dataview from an
@-view of a var, and after the function I then break the dataview back
down into the component @-view. The compiler then complains that the
component @-view is not consumed, how can I consume it?

~Shea


You received this message because you are subscribed to the Google
Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an
email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/ats-lang-users/20140908023429.GC2286%40nixos.hsd1.nh.comcast.net

.


You received this message because you are subscribed to the Google
Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to ats-lang...@googlegroups.com <javascript:>.
To post to this group, send email to ats-l...@googlegroups.com
<javascript:>.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/CAPPSPLqDYjgz5JoL_rpmW%3Dxedzj%2BOFdiuvZPLrA2oRkh-7QK_A%40mail.gmail.com.


You received this message because you are subscribed to the Google Groups “ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
Visit this group at http://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/ats-lang-users/75b55cd6-2d55-4bc6-afc3-f88e82d4716f%40googlegroups.com.