Tie is a type of Beam. you are likely to find Beam in/at/on Barn. 
Function is a synonym of Work. Work is related to Horse. 
Tie --IsA--> Beam --AtLocation--> Barn 
Function <--Synonym--> Work <--RelatedTo--> Horse 