A simple expert system in Prolog