A C++ backend that creates Prolog rules based on observations