Simplified prolog generator