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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: SPARK 2014 and protected objects Date: Tue, 30 Aug 2016 16:33:13 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="90a7515de723fda2443060f3e878f4b0"; logging-data="30832"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19QLVqWU1Mn4xvLHLGYfYcClvF9LjaWOpg=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:4vKvRCqc06tgvU8LZFiCTjO0kVg= sha1:hwmEICmjx9b4qlcsm+Bh7UHtFRU= Xref: news.eternal-september.org comp.lang.ada:31647 Date: 2016-08-30T16:33:13+01:00 List-Id: Shark8 writes: > Have you tried moving "Protected_Value : Integer := 0 with Volatile;" > into the protected object's private section (inside the > specification)? Like this ... private Protected_Value : Integer := 0 with Volatile, Part_Of => State; end PO; but I still get the problem with Impl ... so I put its spec in po.ads similarly ... State still needs refinement, but it can't be done ... 1. package body PO 2. with Refined_State => (State => (Protected_Value, | >>> non-external state "State" cannot contain external constituents in refinement 3. Impl)) 4. is What is a non-external state? (by the way, this is the compiler complaining, not gnatprove)