comp.lang.ada
 help / color / mirror / Atom feed
From: reinert <reinkor@gmail.com>
Subject: Contracts for protected objects: internal call cannot appear in precondition of protected operation
Date: Sat, 23 May 2020 22:27:00 -0700 (PDT)
Date: 2020-05-23T22:27:00-07:00	[thread overview]
Message-ID: <4ed8fa1e-0b4d-4d6b-bc36-0236f6965db0@googlegroups.com> (raw)

Hello,

I tried to use pre-conditions for an entry in a protected object.
Say (in the specification):

   entry E1 with Pre => test1;   

This seems OK when test1 is external (defined outside the protected object).

However, when test1 is defined inside the protected object, I get:

internal call cannot appear in precondition of protected operation

(I assume this is related to avoid deadlock - but testing from outside
here should not give deadlock?)

I also would like to include (for security) a test on a variable
defined in the private part of the protected object). Anyhow possible?
I do not mange to include pre/post conditions in the body of my
protected object. I missed something?

reinert

             reply	other threads:[~2020-05-24  5:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-24  5:27 reinert [this message]
2020-05-29  2:11 ` Contracts for protected objects: internal call cannot appear in precondition of protected operation Randy Brukardt
2020-05-31 10:48   ` reinert
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox