From: Douglas McIlroy <douglas.mcilroy@dartmouth.edu>
To: Marc Donner <marc.donner@gmail.com>
Cc: TUHS main list <tuhs@tuhs.org>
Subject: [TUHS] Re: undiagnosed pic error
Date: Sat, 17 Jun 2023 11:53:00 -0400 [thread overview]
Message-ID: <CAKH6PiU6COeo9nB6PwUbq3_1_0crbk30F6AWgU+C8awg6VH-PA@mail.gmail.com> (raw)
In-Reply-To: <CALQ0xCCNLqBfAs5aj3uzP3_pwwhZYW0PweH5vVMfeFio1EJ5pg@mail.gmail.com>
It's fairly sparse, e.g. "at" is compatible with most everything
except "from" and "to". Setup might look like this:
long int compat[] = {
[HAS_AT] = HAS_FROM | HAS_TO,
On Wed, Jun 14, 2023 at 6:42 AM Marc Donner <marc.donner@gmail.com> wrote:
>
> How sparse is the 35x35 matrix? For comprehensibility would it be the best way to do it?
>
> On Tue, Jun 13, 2023 at 9:59 PM Douglas McIlroy <douglas.mcilroy@dartmouth.edu> wrote:
>>
>> There may be a simple generic way to correct pic's habit of accepting
>> any set of object modifiers on any object, but obeying only a
>> compatible subset.
>>
>> Pic already collects a bit vector of modifier types attached to the
>> current object. If that were extended with a few more bits that
>> designate the object types, the size, B, of the bit vector would be
>> about 35--an easy fit in one 64-bit word. Then a BxB bit matrix could
>> record both modifier/modifier incompatibilities and object/modifier
>> incompatibilities. The collected bit vector needs to be tested against
>> the matrix once per object definition.
>>
>> It seems to be harder to catch duplication of modifiers, requiring
>> extra code at all points where bits are set. Nevertheless, this kind
>> of error also merits detection.
>>
>> Some questions
>>
>> Does anybody think the issue is not worth addressing?
>>
>> Is there a better scheme than that suggested above?
>>
>> Is the scheme adequate? It would not, for example, catch a three-way
>> incompatibility that does not entail any pairwise incompatibility,
>> should such an incompatibility exist.
>>
>> Any other thoughts?
>>
>> Doug
>
> --
> =====
> nygeek.net
> mindthegapdialogs.com/home
next prev parent reply other threads:[~2023-06-17 15:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-14 1:58 Douglas McIlroy
2023-06-14 10:41 ` Marc Donner
2023-06-17 15:53 ` Douglas McIlroy [this message]
2023-06-17 15:59 ` Douglas McIlroy
2023-06-18 0:11 ` Kenneth Goodwin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAKH6PiU6COeo9nB6PwUbq3_1_0crbk30F6AWgU+C8awg6VH-PA@mail.gmail.com \
--to=douglas.mcilroy@dartmouth.edu \
--cc=marc.donner@gmail.com \
--cc=tuhs@tuhs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).