The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] Re: undiagnosed pic error
@ 2023-06-14  1:58 Douglas McIlroy
  2023-06-14 10:41 ` Marc Donner
  0 siblings, 1 reply; 5+ messages in thread
From: Douglas McIlroy @ 2023-06-14  1:58 UTC (permalink / raw)
  To: TUHS main list

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

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

* [TUHS] Re: undiagnosed pic error
  2023-06-14  1:58 [TUHS] Re: undiagnosed pic error Douglas McIlroy
@ 2023-06-14 10:41 ` Marc Donner
  2023-06-17 15:53   ` Douglas McIlroy
  2023-06-17 15:59   ` Douglas McIlroy
  0 siblings, 2 replies; 5+ messages in thread
From: Marc Donner @ 2023-06-14 10:41 UTC (permalink / raw)
  To: Douglas McIlroy; +Cc: TUHS main list

[-- Attachment #1: Type: text/plain, Size: 1416 bytes --]

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 <https://www.mindthegapdialogs.com/home>

[-- Attachment #2: Type: text/html, Size: 2105 bytes --]

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

* [TUHS] Re: undiagnosed pic error
  2023-06-14 10:41 ` Marc Donner
@ 2023-06-17 15:53   ` Douglas McIlroy
  2023-06-17 15:59   ` Douglas McIlroy
  1 sibling, 0 replies; 5+ messages in thread
From: Douglas McIlroy @ 2023-06-17 15:53 UTC (permalink / raw)
  To: Marc Donner; +Cc: TUHS main list

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

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

* [TUHS] Re: undiagnosed pic error
  2023-06-14 10:41 ` Marc Donner
  2023-06-17 15:53   ` Douglas McIlroy
@ 2023-06-17 15:59   ` Douglas McIlroy
  2023-06-18  0:11     ` Kenneth Goodwin
  1 sibling, 1 reply; 5+ messages in thread
From: Douglas McIlroy @ 2023-06-17 15:59 UTC (permalink / raw)
  To: Marc Donner; +Cc: TUHS main list

Google claims I just sent another unintended reply, this time unfinished.

Apologies,
Doug

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

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

* [TUHS] Re: undiagnosed pic error
  2023-06-17 15:59   ` Douglas McIlroy
@ 2023-06-18  0:11     ` Kenneth Goodwin
  0 siblings, 0 replies; 5+ messages in thread
From: Kenneth Goodwin @ 2023-06-18  0:11 UTC (permalink / raw)
  To: Douglas McIlroy; +Cc: Marc Donner, TUHS main list

[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]

You did.

You forgot the trailing }


Syntax error

See previous email...


On Sat, Jun 17, 2023, 12:00 PM Douglas McIlroy <
douglas.mcilroy@dartmouth.edu> wrote:

> Google claims I just sent another unintended reply, this time unfinished.
>
> Apologies,
> Doug
>
> 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
>

[-- Attachment #2: Type: text/html, Size: 2978 bytes --]

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

end of thread, other threads:[~2023-06-18  0:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-14  1:58 [TUHS] Re: undiagnosed pic error Douglas McIlroy
2023-06-14 10:41 ` Marc Donner
2023-06-17 15:53   ` Douglas McIlroy
2023-06-17 15:59   ` Douglas McIlroy
2023-06-18  0:11     ` Kenneth Goodwin

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).