I think tables would be your best bet here.
Code:
The block giving rule is not listed in any rulebook.
A commodity is a kind of thing.
iron, steel, copper, cheetos, and pizza are commodities.
The giving it to action has an object called the object received.
Carry out giving something to someone:
repeat through Table of Exchanged Goods:
if the noun is your gift entry and the second noun is interlocutor entry:
now the player is holding their gift entry;
now the interlocutor entry is holding your gift entry;
now the object received is their gift entry.
Report giving it to:
say "[The second noun] gives you [object received] in return!"
Table of Exchanged Goods
interlocutor your gift their gift
Bob iron pizza
Sue pizza copper
Sue steel cheetos
Joe copper iron
Joe pizza steel
Bob and Joe are men. Sue is a woman.
Home is a room. Bob, Joe and Sue are in Home. The player holds iron.
EDIT: Bear in mind that (purely from laziness on my part) I cut some corners on the example. For this to work well I'd at least add a rule to block giving if no suitable pair of interlocutor - gift was found in the table. I'd probably also block the action if the interlocutor no longer held their gift.