An article entitled "ParaSail: Less is More with Multicore" was published recently on eetimes.com (and its affiliates). Here is a link to a newsletter where the editor (Bernie Cole) highlights the article:
http://i.cmpnet.com/audiencedevelopment/newsletters/06-21-2012-EmbeddedNL.html
Here is a direct link to the article:
http://www.eetimes.com/design/embedded/4375616/ParaSail--Less-is-more-with-multicore
In addition to the above, a subset of the ParaSail blog is also now available online in a somewhat more polished format as a section of the following Ada User Journal issue (covers Sept 2009 to February 2011):
http://www.ada-europe.org/archive/auj/auj-32-1.pdf
Finally, we participated in the New England Programming Languages and Systems Symposium on June 1 at the University of Southern Maine:
http://www.nepls.org/Events/26/
The slides we presented are attached.
"No Global Variables
... anything that represents variable global state, such as a static variable in C, C++, or Java, or a singleton object in Scala [2], can create the same kinds of problems associated with unexpected side-effects, hidden algorithmic coupling, etc. ..."
First my term for global variable and yours are different.
Mine is the simple "globally visible to any code" such as:
extern int myGlobalvar;
I never do this - state ("static data" or "persistent data" not "global variable") needs to be hidden.
What about state. Are you saying we never should keep the state of a system?
At some point a complex system changes state and behavior depends on that.
If you mean algorithm type computations such as signal processing shouldn't keep state then I agree. The most brittle and un-reusable code I see has static data peppered throughout the algorithms.
PS - you need to advertize this discussion group more.
On Jul 8, 12:11 pm, Tuck <tucker.t...@gmail.com> wrote:
> In ParaSail, functions can only directly modify objects passed as "var"
> parameters. The objects themselves might originate in the main routine of
> the program, and in that sense represent global state, or they might be
> local variables of the calling function. The key thing is that as part of
> the parameter passing, the object is "handed off" to the function receiving
> it, and as such, race conditions and/or the need for run-time mutual
> exclusion are eliminated.
>
I like this approach. I've seen a lot of abuse of global variables in
complex systems, making these systems very difficult to analyze or
test. Is it fair to say your approach in ParaSail is equivalent to a
SPARK program where global (package state) variables are prohibited
(via convention and/or tool) from ever having an "out" or "in out"
mode in a moded global annotation?
I just looked in the ParaSail reference manual for a description of
function parameter modes. I found the section and now I'm hoping you
will expand on why ParaSail's mode scheme is different (more specific)
than simply "in", out" and "in out"?
- Britt
Note that in ParaSail, even *reading* a global variable directly is not permitted,
since you have some of the same synchronization issues if some part of
the global is being concurrently updated. So even to read a global variable, it
must be passed as a non-var parameter to the function.
--
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/6b1e918a-1e3b-40d1-99dd-56aaade3a341%40googlegroups.com.
There are three reasons why this doesn't complain. First is that "Delta' is not a "variable" -- it is a "constant." In some programming languages, declared objects are always called "variables," but in ParaSail, only objects that can be assigned different values over their lifetime are called "variables" (and would need to be declared using "var" rather than "const").
The second reason, is that currently for *nested* operations, the use of up-level variables (as opposed to "level 0", "class-level" globals) is not limited unless they introduce a data race condition. So you can introduce nested operations to replace any repeated sequence of code, even if it reads or updates local variables of the enclosing scope. There was a design for restricting such up-level variable usage by using an explicit "global" specification at the point of the declaration of the nested operation, but that has not been implemented.
On Monday, July 29, 2019 at 2:38:19 PM UTC-4, Tucker Taft wrote:There are three reasons why this doesn't complain. First is that "Delta' is not a "variable" -- it is a "constant." In some programming languages, declared objects are always called "variables," but in ParaSail, only objects that can be assigned different values over their lifetime are called "variables" (and would need to be declared using "var" rather than "const").Ok, I see. I was thinking of them more as mutable (var) vs immutable (const) variables.
The second reason, is that currently for *nested* operations, the use of up-level variables (as opposed to "level 0", "class-level" globals) is not limited unless they introduce a data race condition. So you can introduce nested operations to replace any repeated sequence of code, even if it reads or updates local variables of the enclosing scope. There was a design for restricting such up-level variable usage by using an explicit "global" specification at the point of the declaration of the nested operation, but that has not been implemented.Is it dropped from the language or is it not implemented at the compiler level?
...
It seems that not allowing (by default) to read global constants should make the language even safer (not just for parallel programming), shouldn't it?
Best,Anton
--
You received this message because you are subscribed to the Google Groups "ParaSail Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to parasail-programming...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/parasail-programming-language/96a373a7-2e7a-43c4-8254-05cbcb1991bd%40googlegroups.com.