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

[tlaplus] UUID



Hello,

I have a rather "philosophical" question: For my specification I created a TLA+ UUID extension:

import tlc2.value.StringValue;
import tlc2.value.Value;

public class UUID {

    public static Value UUID() {
        return new StringValue(java.util.UUID.randomUUID().toString());
    }
}

Sample output from "Evaluate Constant Expression"

UUID -> "f06b120c-2c66-40b1-a025-dc8479436fa9"
UUID -> "06d6291d-4792-4666-87e4-06eb44c25270"

By design, the operator never yields the same result. I believe this is different from CHOOSE that given the same set and predicate will yield an arbitrary yet always the same result.

The specification and the operator work as expected. However, I wonder if that operator violates "the spirit" of TLA+

Thanks and best, Dominik

-- 
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.
To post to this group, send email to tlaplus@xxxxxxxxxxxxxxxx.
Visit this group at https://groups.google.com/group/tlaplus.
For more options, visit https://groups.google.com/d/optout.