comp.lang.ada
 help / color / mirror / Atom feed
* Contracts for protected objects: internal call cannot appear in precondition of protected operation
@ 2020-05-24  5:27 reinert
  2020-05-29  2:11 ` Randy Brukardt
  0 siblings, 1 reply; 3+ messages in thread
From: reinert @ 2020-05-24  5:27 UTC (permalink / 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-31 10:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-24  5:27 Contracts for protected objects: internal call cannot appear in precondition of protected operation reinert
2020-05-29  2:11 ` Randy Brukardt
2020-05-31 10:48   ` reinert

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