From: Jacob Sparre Andersen <jacob@jacob-sparre.dk>
Subject: Re: Ada conditional compilation and program variants
Date: Mon, 07 May 2018 10:41:48 +0200
Date: 2018-05-07T10:41:48+02:00 [thread overview]
Message-ID: <87in7zuab7.fsf@jacob-sparre.dk> (raw)
In-Reply-To: fjh151Fq7qrU1@mid.individual.net
Niklas Holsti wrote:
> An interesting question is this: if package declaration or body B uses
> package A, and package A has a definition, how far can a compiler
> check that B uses A in legal ways if the compiler is allowed to look
> only at the definition of A, but not at the (or a) declaration of A?
>
> If the compiler could check legality using only the package
> definitions of server packages, it would make it easier to ensure that
> all program variants are legal, by two separate and non-combinatorial
> steps:
>
> - checking each variant package declaration against the (invariant)
> package definition, and
>
> - checking each variant package body against the (invariant) package
> definitions of all other packages (those used by this body).
>
> If checking the legality of how B uses A requires looking at the
> declaration of A (and not only at the definition of A), there is again
> a risk of combinatorial explosion in checking the legality of all
> (complete) program variants when there are variant package
> declarations.
The only counter-examples I've been able to come up with so far are
run-time errors, such as going beyond the range of a numerical type.
What about enumeration types? Should it be allowed to declare names for
some, but not all values of an enumeration type? One could of course
declare a function returning a value of the type in the package
definition, and say that it can be implemented in the package
declaration as an enumeration value. - Can't do that for characters
though, so maybe it is a bad idea.
Greetings,
Jacob
--
"Genes don't matter. It's all physics."
next prev parent reply other threads:[~2018-05-07 8:41 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 3:32 Interesting article on ARG work Randy Brukardt
2018-04-02 14:49 ` Dan'l Miller
2018-04-03 16:34 ` Bojan Bozovic
2018-04-03 22:33 ` Randy Brukardt
2018-04-04 2:12 ` Bojan Bozovic
2018-04-04 15:05 ` Dan'l Miller
2018-04-04 15:30 ` gerdien.de.kruyf
2018-04-04 16:09 ` Dan'l Miller
2018-04-04 22:30 ` Randy Brukardt
2018-04-04 22:43 ` Paul Rubin
2018-04-05 0:44 ` Mehdi Saada
2018-04-05 21:23 ` Randy Brukardt
2018-04-05 2:05 ` Bojan Bozovic
2018-04-05 22:12 ` Randy Brukardt
2018-04-06 13:35 ` Bojan Bozovic
2018-04-07 2:01 ` Randy Brukardt
2018-04-05 7:21 ` Dmitry A. Kazakov
2018-04-05 22:18 ` Randy Brukardt
2018-04-06 7:30 ` Dmitry A. Kazakov
2018-04-07 2:25 ` Randy Brukardt
2018-04-07 10:11 ` Dmitry A. Kazakov
2018-04-07 15:27 ` Dan'l Miller
2018-04-07 15:59 ` Dmitry A. Kazakov
2018-04-08 0:14 ` Dan'l Miller
2018-04-08 7:46 ` Dmitry A. Kazakov
2018-04-08 19:48 ` Dan'l Miller
2018-04-08 20:09 ` Dmitry A. Kazakov
2018-04-09 3:50 ` Dan'l Miller
2018-04-09 6:40 ` Jan de Kruyf
2018-04-09 7:43 ` Dmitry A. Kazakov
2018-04-09 13:40 ` Dan'l Miller
2018-04-09 14:13 ` Dmitry A. Kazakov
2018-04-09 14:36 ` Dan'l Miller
2018-04-09 14:44 ` Dmitry A. Kazakov
2018-04-09 15:03 ` Dan'l Miller
2018-04-09 16:12 ` Niklas Holsti
2018-04-09 16:30 ` Dmitry A. Kazakov
2018-04-09 16:45 ` Niklas Holsti
2018-04-09 17:33 ` Dan'l Miller
2018-04-09 19:47 ` Dmitry A. Kazakov
2018-04-09 20:24 ` Randy Brukardt
2018-04-10 8:17 ` Dmitry A. Kazakov
2018-04-09 18:08 ` Dan'l Miller
2018-04-09 21:17 ` Niklas Holsti
2018-04-09 22:09 ` Dan'l Miller
2018-04-10 19:23 ` Niklas Holsti
2018-04-10 19:46 ` Dan'l Miller
2018-04-15 7:50 ` Niklas Holsti
2018-04-15 13:31 ` Dan'l Miller
2018-04-15 18:37 ` Niklas Holsti
2018-04-09 20:14 ` Randy Brukardt
2018-04-06 23:49 ` Dan'l Miller
2018-04-12 10:21 ` Marius Amado-Alves
2018-04-15 13:07 ` Ada conditional compilation and program variants Niklas Holsti
2018-05-07 8:41 ` Jacob Sparre Andersen [this message]
2018-04-06 13:35 ` Interesting article on ARG work Marius Amado-Alves
2018-04-07 2:15 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox