Solve this logic puzzle using clingo Answer Set Programming(clingo)

Each of four men owns a di erent species of exotic pet. Here is what

we know about them:

1. Mr Engels (whose pet is named Sparky), Abner and Mr. Foster all

belong to a club for owners of unusual pets.

2. The iguana isn’t owned by either Chuck or Duane.

3. Neither the jackal nor the king cobra is owned by Mr. Foster.

4. The llama doesn’t belong to Duane (whose pet is named Waggles).

5. Abner, who doesn’t own the king cobra, isn’t Mr. Gunter.

6. Bruce and Mr. Foster are neighbors.

7. Mr. Halevy is afraid of iguanas.

Problem: Find each man’s full name and determine what kind of pet he

owns.

    

Still stressed with your coursework?
Get quality coursework help from an expert!