From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,3ccb707f4c91a5f2 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Java vs Ada 95 (Was Re: Once again, Ada absent from DoD SBIR solicitation) Date: 1996/11/14 Message-ID: #1/1 X-Deja-AN: 196817579 references: <325BC3B3.41C6@hso.link.com> <55gkch$gg6@fozzie.sun3.iaf.nl> <1996Nov4.072757.1@eisner> organization: New York University newsgroups: comp.lang.ada Date: 1996-11-14T00:00:00+00:00 List-Id: Robert Eachus says " It is the case that if you want to have a program which has multiple tasks which reference the same bounded string, and one of them does an update, then you have to have a synchronization point before the next reference. Now as long as there are no synchronization points in the string ops, you don't have a problem. You can even allow for the case where an allocation or free can be an external synchronization point. The only problem is transitive updates:" At first I thought this must be wrong, but as I think about it, I think it is the complete answer to the concern about reference counts, but it is hardly a satisfactory answer. If you are using reference counts for unbounded strings, then it is indeed the case that the code manipulating these refrence counts is highly likely to be erroneous (wrt the reference counts as shared variables), if there is any sharing of string values between tasks. So I think one must conclude that such sharing is not required to work. Perhaps an example is worthwhile Suppose we have two variables V1 and V2 We write V1 := V2 (these are unbounded strings by the way) then we spawn two tasks, T1, T2, then in T1 we assign a completely new value to V1 and in T2 we assign a completely new value to V2. Well this program execution may be erroneous, which is at least to me a bit of a surprise.