curiousdannii-testing / inform7-imported-bugs

0 stars 0 forks source link

[I7-2024] [Mantis 2061] When declaring a thing with kind, relationships declared in sub-clause are reversed. #60

Open curiousdannii-testing opened 2 years ago

curiousdannii-testing commented 2 years ago

Reported by : hakim

Description :

All the declarations in the minimal reproduction should be equivalent.

We declare Thing A without a kind, only a relationship.
We declare Thing B with a kind. Then we set the relationship in a new sentence.
We declare Thing C with a kind and relationship as sub-clause.

Grammatically I think Thing B and Thing C are equivalent.

When you run the source, you see that Thing C is also an "animal". e.g. Inform has determined that Mr Socks is owned by Thing C, and therefore the latter is an animal. Running `relations` confirms the mistake.

Steps to reproduce :

Ownership relates various things to one animal.
The verb to be owned by means the ownership relation.

Thing A is owned by Mr Socks.
Thing B is a thing. It is owned by Mr Socks.
Thing C is a thing owned by Mr Socks.
[Thing C is a thing which is owned by Mr Socks.] [Alternate & equivalent phrasing for Thing C]

The Garden of Confusing Relationships is a room.
All the animals are in the garden.

Additional information :

If you substitute a built-in relation, this works as expected, e.g.:

Thing A is worn by Mr Socks.
Thing B is a thing. It is worn by Mr Socks.
Thing C is a thing worn by Mr Socks.

All the Things are now worn by Mr Socks and not the other way around.

imported from: [Mantis 2061] When declaring a thing with kind, relationships declared in sub-clause are reversed.
  • status: Reported
  • resolution: Open
  • resolved: 2022-04-07T05:02:37+10:00
  • imported: 2022/01/10
curiousdannii-testing commented 2 years ago

557058:4c095ffd-6d6f-47ce-9e73-77c613347b86:

Comment by hakim :
Switching the relationship from M-1 to 1-M fixes it:

Ownership relates one animal to various things.
The verb to belong to means the reversed ownership relation.
The verb to own means the ownership relation.

Thing A is owned by Mr Socks.
Thing B is a thing. It is owned by Mr Socks.
Thing C is a thing which is owned by Mr Socks.

[OR the following
Thing A belongs to Mr Socks.
Thing B is a thing. It belongs to Mr Socks.
Thing C is a thing which belongs to Mr Socks. ]

This behaves as expected