[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [moca] How important is restriction?



Hi Luis,

> I am currently working on a Masters Thesis project to draft a 
> programming language that incorporates the ideas from mobile 
> ambients, in order to try to test them in 'real life'.

This sounds a pretty exciting project; I'll be interested to hear how it
works out.

> But on doing this I have bumped against a problem: Python is 
> a block-structured language without variable declarations. 
> That means that all names are local by default. (Or am I 
> wrong here?) This is something I want to keep.

I would proceed by not identifying ambient calculus names with Python
variables, but instead treating an ambient name as the value bound to a
Python variable.  You'd need some kind of "gensym" or "new" operator to
generate fresh names.  This is just like the way a variable in Java say
has a local, lexical scope, but it may get bound at runtime to a heap
reference that has an independent lifetime.

Hope this helps,

Andy

  
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The "models for mobility" mailing list     mailto:moca@xxxxxxxxxxxxxxx
 http://www-sop.inria.fr/mimosa/personnel/Davide.Sangiorgi/moca.html