On 12/04/2012 15:47, Athanasios Anastasiou wrote:
>
> > It's eiffel, so easy to read ;-)
> I am not familiar with Eiffel so let's just say i am glad you have
> included that comment in the beginning of the function :-D
back to Pascal / Algol class then ;-)
>
> That last (pseudocode) ELSE is to complement the outer if...right? (or
> is it the elif?)
hm.... some dumb rendering problem to do with tabs i guess. here is the
original:
-- build slot_id_index in ARCH_REP_ARCHETYPE.
-- Current slot logic of include/exclude lists:
-- IF includes not empty and /= 'any' THEN
-- IF not excludes empty THEN -- excludes must =
any; means not a recommendation
-- create match list = includes constraint
-- ELSE -- it is just a recommendation;formally it
means match all
-- create match list = all archetypes of
compatible RM type
-- END
-- ELSEIF excludes not empty and /= 'any' THEN
-- IF not includes empty THEN -- includes must =
any; means not a recommendation
-- create match list = all achetypes - excludes
constraint matchlist
-- ELSE -- just a recommendation; formally it means
match all
-- create match list = all archetypes of
compatible RM type
-- END
-- ELSE
-- create match list = all archetypes of compatible
RM type
-- END
>
> Still there's only two cases "formal binding" (i.e. ONLY the indicated
> archetype) and recommendation (i.e. Anything of indicated TYPE but
> better if it's one of the indicated archetypes).
>
> If that's the case, maybe rule 3 should be absorbed by rule 1 in
> adl1.5.pdf p 62 ?
> *
> *
I think the text needed some work. How about this:
The semantics of the include and exclude lists are somewhat subtle, and
may initially be confusing. The semantics are as follows:
* The meaning of the 'set of all archetypes' in any given environment
is evaluatable (and evaluated) to a finite set consisting of all
archetypes actually available within that environment, known as the
/current archetype set/, not some notional virtual / global set of
archetypes, or theoretically possible set.
* An include or exclude constraint may be 'substantive', i.e. defining
a particular set of archetypes that would be matched within a given
slot, or 'open', i.e. matching all possible archetype.
* A slot constraint may consist of a single include or exclude
constraint, or of an include / exclude pair.
* If an include or exclude constraint is present on its own, it is
understood as a recommendation, i.e. it does not constitute a formal
constraint for matching or exclusion, but tools and applications may
use the recommended match set in an intelligent way. The result set
for such an include or exclude is the whole current archetype set.
* If a substantive include or exclude constraint is present with a
corresponding open exclude or include, respectively, the substantive
constraint is considered formally binding.
BTW, these lexical rules are historical, and will be obsoleted one day -
I more or less had to construct them after 100s of archetypes that
actually assume these rules had been built! You will see further down in
the ADL 1.5 text an indication of the future, but for today, we are
stuck with the above...
- thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.openehr.org/pipermail/openehr-technical_lists.openehr.org/attachments/20120412/aadd030a/attachment.html>