[prev in list] [next in list] [prev in thread] [next in thread]
List: e-lang
Subject: Re: [e-lang] [friam] Classification of actor languages
From: "Mark S. Miller" <erights () google ! com>
Date: 2015-02-17 1:13:44
Message-ID: CABHxS9hPoyyM3=ALMbzTSHD_aOA5tPuoJUVagjupO1DXk=TyZw () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
What language is this in? Where can I read about this language? Are
"implements", "using", "also" and "afterward" keywords of this language?
On Mon, Feb 16, 2015 at 1:25 PM, Carl Hewitt <hewitt@irobust.org> wrote:
> *Actor **Counter**[* *]*
>
> * count **≔ *0, // *count *is an assignable variable initialized
> with 0
>
> *pair**[ ]**:[**UpCounter**,* *DownCounter]* *→* *[** **UpCounter*
> *,* * **DownCounter]*
>
> * implements **UpCounter* *using *
>
> * increment**[ ]→* *count*+1* afterward count*++
>
> * also implements **DownCounter* *using *
>
> * decrement**[ ]→* *count*-1* afterward count*-- ▮
>
>
>
> [anUpCounter, aDownCounter] *← **Counter**[* *]**∎**pair**[ ]*▮
>
>
>
> Of course the following is illegal:
>
> aDownCounter*∎**increment**[ ]*▮
>
>
>
>
>
>
>
>
>
> *From:* friam@googlegroups.com [mailto:friam@googlegroups.com]
> *Sent:* Monday, February 16, 2015 12:38
> *To:* friam
> *Cc:* Discussion of E and other capability languages
> *Subject:* Re: [friam] Classification of actor languages
>
>
>
> My favorite time example. If Bob is given only the upCounter and Carol is
> given only the downCounter, then Bob can only increment and see the result,
> and Carol can only decrement and see the result.
>
>
>
> For the same thing in Dr.SES, see also slides 14 and 31 of <
> http://soft.vub.ac.be/events/mobicrant_talks/talk2_OO_security.pdf>.
>
>
>
>
>
>
>
> def makeCounterPair() {
>
> var count := 0
>
> def upCounter {
> to incr() { return count += 1 }
> }
>
> def downCounter {
> to decr() { return count -= 1 }
> }
>
> return [upCounter, downCounter]
>
> }
>
>
> ? def [u, d] := makeCounterPair()
> # value: [<upCounter>, <downCounter>]
>
> ? u.incr()
> # value: 1
>
> ? u.incr()
> # value: 2
>
> ? d.incr()
> # problem: <NoSuchMethodException: <a downCounter>.incr/0>
>
> ? d.decr()
> # value: 1
>
> Figure 6.5: Two Counting Facets Sharing a Slot. makeCounterPair makes a
> Slot, and it makes and returns two objects sharing access to that Slot.
> These three objects form a lexical composite. The returned objects are
> facets of this composite. The Slot is encapsulated within this composite.
>
>
>
>
>
>
>
>
> On Mon, Feb 16, 2015 at 12:23 PM, Tom Van Cutsem <tomvc.be@gmail.com>
> wrote:
>
> Hi Carl,
>
>
>
> 2015-02-14 1:19 GMT+01:00 Carl Hewitt <hewitt@irobust.org>:
>
> Of course, an Actor can implement multiple interfaces.
>
>
>
> I am wondering how a "facet" relates to an interface.
>
>
>
> Indeed, an actor can implement multiple interfaces, but this typically
> means that anyone having a reference to the actor can send any message from
> the union of all interface methods. By contrast, in a vat with multiple
> facets, a reference to a facet provides access to only the methods exposed
> by that facet. Thus, facets make it easier to restrict authority.
>
>
>
> Of course, one could encode facets in a pure actor model, by passing a
> token designating the facet as part of the message. The actor can be
> programmed to dispatch the message to an internal object only if the token
> matches. But this would be an encoding of the vat model in a pure actor
> model.
>
>
>
> Cheers,
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "friam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to friam+unsubscribe@googlegroups.com.
> To post to this group, send email to friam@googlegroups.com.
> Visit this group at http://groups.google.com/group/friam.
> For more options, visit https://groups.google.com/d/optout.
>
>
>
>
>
> --
>
> Cheers,
> --MarkM
>
> --
> You received this message because you are subscribed to the Google Groups
> "friam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to friam+unsubscribe@googlegroups.com.
> To post to this group, send email to friam@googlegroups.com.
> Visit this group at http://groups.google.com/group/friam.
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "friam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to friam+unsubscribe@googlegroups.com.
> To post to this group, send email to friam@googlegroups.com.
> Visit this group at http://groups.google.com/group/friam.
> For more options, visit https://groups.google.com/d/optout.
>
--
Cheers,
--MarkM
[Attachment #5 (text/html)]
<div dir="ltr">What language is this in? Where can I read about this language? Are \
"implements", "using", "also" and "afterward" \
keywords of this language?<div><br><div><br></div></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">On Mon, Feb 16, 2015 at 1:25 PM, \
Carl Hewitt <span dir="ltr"><<a href="mailto:hewitt@irobust.org" \
target="_blank">hewitt@irobust.org</a>></span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div>
<p class="MsoNormal" style="margin-left:4.5pt"><b><span \
style="font-family:"Cambria Math",serif">Actor </span></b><b><span \
style="font-family:"Cambria \
Math",serif;color:#0e6835">Counter</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#0e6835">[</span></b><span \
style="font-family:"Cambria Math",serif"> <b><span \
style="color:#0e6835">]</span></b> <u></u><u></u></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><span style="font-family:"Cambria Math",serif"> \
<b> <span style="color:#c55a11">count </span></b></span><b><span \
style="font-family:"Cambria Math",serif">≔ </span></b><span \
style="font-family:"Cambria Math",serif">0,</span><span \
style="font-size:14.0pt;font-family:"Cambria Math",serif"> </span><span \
style="font-size:14.0pt;font-family:"Microsoft Sans \
Serif",sans-serif;color:#494949">//</span><span \
style="font-size:14.0pt;font-family:"Cambria Math",serif;color:gray"> \
</span><b><span style="font-family:"Cambria \
Math",serif;color:#c55a11">count </span></b><span \
style="font-family:"Microsoft Sans Serif",sans-serif;color:#494949">is an \
assignable variable initialized with</span><span style="font-family:"Cambria \
Math",serif;color:#494949"> </span><span style="font-family:"Cambria \
Math",serif">0<u></u><u></u></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><b><span style="font-family:"Cambria \
Math",serif;color:#c55a11"> </span></b><b><span \
style="font-family:"Cambria \
Math",serif;color:#8a008a">pair</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a">[ \
]</span></b><b><span style="font-family:"Cambria Math",serif">:<span \
style="color:#2f5597">[</span></span></b><b><span style="font-family:"Cambria \
Math",serif;color:#0e6835">UpCounter</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#2f5597">,</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#0e6835"> </span></b><b><span \
style="font-family:"Cambria \
Math",serif;color:#0e6835">DownCounter]</span></b><span \
style="font-size:10.0pt;font-family:"Cambria Math",serif"> </span><b><span \
style="font-family:"Cambria \
Math",serif;color:#8a008a">→</span></b><i><span \
style="font-family:"Cambria Math",serif;color:#8a008a"> \
</span></i><b><span style="font-family:"Cambria Math",serif;color:#8a008a"> \
</span></b><b><span style="font-family:"Cambria \
Math",serif;color:#2f5597">[</span></b><b><span \
style="font-size:10.0pt;font-family:"Cambria Math",serif;color:#8a008a"> \
</span></b><b><span style="font-family:"Cambria \
Math",serif;color:#0e6835">UpCounter</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#2f5597">,</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#0e6835"> </span></b><b><span \
style="font-size:10.0pt;font-family:"Cambria Math",serif;color:#8a008a"> \
</span></b><b><span style="font-family:"Cambria \
Math",serif;color:#0e6835">DownCounter]</span></b><span \
style="font-size:10.0pt;font-family:"Cambria Math",serif"> </span><span \
style="font-family:"Cambria Math",serif"><u></u><u></u></span></p> <p \
class="MsoNormal" style="margin-left:4.5pt"><b><span style="font-family:"Cambria \
Math",serif"> implements </span></b><b><span \
style="font-family:"Cambria \
Math",serif;color:#0e6835">UpCounter</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a"> </span></b><b><span \
style="font-family:"Cambria Math",serif">using <span \
style="color:#8a008a"><u></u><u></u></span></span></b></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><b><span style="font-family:"Cambria \
Math",serif"> <span \
style="color:#8a008a">increment</span></span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a">[ \
]→</span></b><i><span style="font-family:"Cambria \
Math",serif;color:#8a008a"> </span></i><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a"> \
</span></b><b><span style="font-family:"Cambria \
Math",serif;color:#c55a11">count</span></b><span \
style="font-family:"Cambria Math",serif">+1<b> afterward <span \
style="color:#c55a11"> count</span></b>++</span><span \
style="font-size:10.0pt;font-family:"Cambria Math",serif"> \
<u></u><u></u></span></p> <p class="MsoNormal" style="margin-left:4.5pt"><b><span \
style="font-family:"Cambria Math",serif"> also implements \
</span></b><b><span style="font-family:"Cambria \
Math",serif;color:#0e6835">DownCounter</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a"> </span></b><b><span \
style="font-family:"Cambria Math",serif">using <span \
style="color:#8a008a"><u></u><u></u></span></span></b></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><b><span style="font-family:"Cambria \
Math",serif"> <span \
style="color:#8a008a">decrement</span></span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a">[ \
]→</span></b><i><span style="font-family:"Cambria \
Math",serif;color:#8a008a"> </span></i><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a"> \
</span></b><b><span style="font-family:"Cambria \
Math",serif;color:#c55a11">count</span></b><span \
style="font-family:"Cambria Math",serif">-1<b> <span style="color:#c55a11">
</span>afterward <span style="color:#c55a11">
count</span></b>--</span><span style="font-size:10.0pt;font-family:"Cambria \
Math",serif"> </span><span><span style="font-size:10.0pt;font-family:"MS \
Gothic"">▮</span></span><span \
style="font-size:10.0pt;font-family:"Cambria \
Math",serif"><u></u><u></u></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><b><span style="font-family:"Cambria \
Math",serif"><u></u> <u></u></span></b></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><span style="font-family:"Cambria \
Math",serif">[anUpCounter, aDownCounter] </span><b><span \
style="font-family:"Cambria Math",serif">← </span></b><b><span \
style="font-family:"Cambria \
Math",serif;color:#0e6835">Counter</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#0e6835">[</span></b><span \
style="font-family:"Cambria Math",serif"> <b><span \
style="color:#0e6835">]</span></b></span><span><b><sub><span \
style="font-size:7.0pt;font-family:"Cambria \
Math",serif;color:#8a008a">∎</span></sub></b></span><b><span \
style="font-family:"Cambria \
Math",serif;color:#8a008a">pair</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a">[ \
]</span></b><span><span style="font-size:10.0pt;font-family:"MS \
Gothic"">▮<u></u><u></u></span></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><span><span style="font-size:10.0pt;font-family:"MS \
Gothic""><u></u> <u></u></span></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><span style="font-family:"Microsoft Sans \
Serif",sans-serif">Of course the following is illegal:<u></u><u></u></span></p> \
<p class="MsoNormal" style="margin-left:4.5pt"><span style="font-family:"Cambria \
Math",serif;color:#2f5597"> </span><span \
style="font-family:"Cambria \
Math",serif">aDownCounter</span><span><b><sub><span \
style="font-size:7.0pt;font-family:"Cambria \
Math",serif;color:#8a008a">∎</span></sub></b></span><b><span \
style="font-family:"Cambria \
Math",serif;color:#8a008a">increment</span></b><b><span \
style="font-family:"Cambria Math",serif;color:#8a008a">[ \
]</span></b><span><span style="font-size:10.0pt;font-family:"MS \
Gothic"">▮</span></span><span style="font-family:"Cambria \
Math",serif;color:#2f5597"><u></u><u></u></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><span style="font-family:"Cambria \
Math",serif;color:#2f5597"><u></u> <u></u></span></p> <p class="MsoNormal" \
style="margin-left:4.5pt"><span style="font-size:11.0pt;font-family:"Cambria \
Math",serif"><u></u> <u></u></span></p> <p class="MsoNormal"><span \
style="font-size:11.0pt;font-family:"Microsoft Sans \
Serif",sans-serif;color:black"><u></u> <u></u></span></p> <p \
class="MsoNormal"><span style="font-size:11.0pt;font-family:"Microsoft Sans \
Serif",sans-serif;color:black"><u></u> <u></u></span></p> <p class="MsoNormal" \
style="margin-left:.5in"><b><span \
style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span \
style="font-size:11.0pt;font-family:"Calibri",sans-serif"> <a \
href="mailto:friam@googlegroups.com" target="_blank">friam@googlegroups.com</a> \
[mailto:<a href="mailto:friam@googlegroups.com" \
target="_blank">friam@googlegroups.com</a>] <br><span class="">
<b>Sent:</b> Monday, February 16, 2015 12:38<br>
<b>To:</b> friam<br>
</span><b>Cc:</b> Discussion of E and other capability languages<br>
<b>Subject:</b> Re: [friam] Classification of actor \
languages<u></u><u></u></span></p><div><div class="h5"> <p class="MsoNormal" \
style="margin-left:.5in"><u></u> <u></u></p> <div>
<div>
<p class="MsoNormal" style="margin-left:.5in">My favorite time example. If Bob is \
given only the upCounter and Carol is given only the downCounter, then Bob can only \
increment and see the result, and Carol can only decrement and see the \
result.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">For the same thing in Dr.SES, see also \
slides 14 and 31 of <<a \
href="http://soft.vub.ac.be/events/mobicrant_talks/talk2_OO_security.pdf" \
target="_blank">http://soft.vub.ac.be/events/mobicrant_talks/talk2_OO_security.pdf</a>>.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">def makeCounterPair() \
{<u></u><u></u></p> <div>
<p class="MsoNormal" style="margin-left:.5in"> var count := 0<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"> def upCounter {<br>
to incr() { return count += 1 }<br>
}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> def downCounter {<br>
to decr() { return count -= 1 }<br>
}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"> return [upCounter, \
downCounter]<u></u><u></u></p> </div>
<div>
<p class="MsoNormal" style="margin-left:.5in">}<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><br>
? def [u, d] := makeCounterPair()<br>
# value: [<upCounter>, <downCounter>]<br>
<br>
? u.incr()<br>
# value: 1<br>
<br>
? u.incr()<br>
# value: 2<br>
<br>
? d.incr()<br>
# problem: <NoSuchMethodException: <a downCounter>.incr/0><br>
<br>
? d.decr()<br>
# value: 1<br>
<br>
Figure 6.5: Two Counting Facets Sharing a Slot. makeCounterPair makes a Slot, and it \
makes and returns two objects sharing access to that Slot. These three objects form a \
lexical composite. The returned objects are facets of this composite. The Slot is \
encapsulated within this composite.<br>
<br>
<br>
<br>
<br>
<u></u><u></u></p>
</div>
</div>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">On Mon, Feb 16, 2015 at 12:23 PM, Tom \
Van Cutsem <<a href="mailto:tomvc.be@gmail.com" \
target="_blank">tomvc.be@gmail.com</a>> wrote:<u></u><u></u></p> <blockquote \
style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in \
6.0pt;margin-left:4.8pt;margin-right:0in"> <div>
<p class="MsoNormal" style="margin-left:.5in">Hi Carl,<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in">2015-02-14 1:19 GMT+01:00 Carl Hewitt \
<<a href="mailto:hewitt@irobust.org" \
target="_blank">hewitt@irobust.org</a>>:<u></u><u></u></p> <blockquote \
style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in \
6.0pt;margin-left:4.8pt;margin-right:0in"> <div>
<div>
<p class="MsoNormal" style="margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">Of \
course, an Actor can implement multiple interfaces.</span><u></u><u></u></p> <p \
class="MsoNormal" style="margin-left:.5in"> <span \
style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d"> \
</span><u></u><u></u></p> <p class="MsoNormal" style="margin-left:.5in">
<span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1f497d">I \
am wondering how a "facet" relates to an interface.</span><u></u><u></u></p> </div>
</div>
</blockquote>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Indeed, an actor can implement multiple \
interfaces, but this typically means that anyone having a reference to the actor can \
send any message from the union of all interface methods. By contrast, in a vat with \
multiple facets, a reference to a facet provides access to only the methods exposed \
by that facet. Thus, facets make it easier to restrict authority.<u></u><u></u></p> \
</div> <div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Of course, one could encode facets in a \
pure actor model, by passing a token designating the facet as part of the message. \
The actor can be programmed to dispatch the message to an internal object only if the \
token matches. But this would be an encoding of the vat model in a pure actor \
model.<u></u><u></u></p> </div>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Cheers,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-left:.5in">Tom<u></u><u></u></p>
</div>
</div>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-left:.5in">-- <br>
You received this message because you are subscribed to the Google Groups \
"friam" group.<br> To unsubscribe from this group and stop receiving emails \
from it, send an email to <a href="mailto:friam+unsubscribe@googlegroups.com" \
target="_blank">friam+unsubscribe@googlegroups.com</a>.<br> To post to this group, \
send email to <a href="mailto:friam@googlegroups.com" target="_blank"> \
friam@googlegroups.com</a>.<br> Visit this group at <a \
href="http://groups.google.com/group/friam" target="_blank"> \
http://groups.google.com/group/friam</a>.<br> For more options, visit <a \
href="https://groups.google.com/d/optout" target="_blank"> \
https://groups.google.com/d/optout</a>.<u></u><u></u></p> </div>
</div>
</blockquote>
</div>
<p class="MsoNormal" style="margin-left:.5in"><br>
<br clear="all">
<u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"><u></u> <u></u></p>
</div>
<p class="MsoNormal" style="margin-left:.5in">-- <u></u><u></u></p>
<div>
<p class="MsoNormal" style="margin-left:.5in"> Cheers,<br>
--MarkM<u></u><u></u></p>
</div>
</div>
<p class="MsoNormal" style="margin-left:.5in">-- <br>
You received this message because you are subscribed to the Google Groups \
"friam" group.<br> To unsubscribe from this group and stop receiving emails \
from it, send an email to <a href="mailto:friam+unsubscribe@googlegroups.com" \
target="_blank">friam+unsubscribe@googlegroups.com</a>.<br> To post to this group, \
send email to <a href="mailto:friam@googlegroups.com" \
target="_blank">friam@googlegroups.com</a>.<br> Visit this group at <a \
href="http://groups.google.com/group/friam" \
target="_blank">http://groups.google.com/group/friam</a>.<br> For more options, visit \
<a href="https://groups.google.com/d/optout" \
target="_blank">https://groups.google.com/d/optout</a>.<u></u><u></u></p> \
</div></div></div> </div><div class="HOEnZb"><div class="h5">
<p></p>
-- <br>
You received this message because you are subscribed to the Google Groups \
"friam" group.<br> To unsubscribe from this group and stop receiving emails \
from it, send an email to <a href="mailto:friam+unsubscribe@googlegroups.com" \
target="_blank">friam+unsubscribe@googlegroups.com</a>.<br> To post to this group, \
send email to <a href="mailto:friam@googlegroups.com" \
target="_blank">friam@googlegroups.com</a>.<br> Visit this group at <a \
href="http://groups.google.com/group/friam" \
target="_blank">http://groups.google.com/group/friam</a>.<br> For more options, visit \
<a href="https://groups.google.com/d/optout" \
target="_blank">https://groups.google.com/d/optout</a>.<br> \
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div \
class="gmail_signature"> Cheers,<br> --MarkM</div> </div>
_______________________________________________
e-lang mailing list
e-lang@mail.eros-os.org
http://www.eros-os.org/mailman/listinfo/e-lang
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic