hgoratela: you should dive into the Prolog docs if you haven't already. And you should probably post on a forum that actually specializes in Prolog. I don't think very many (anyone?) here actually uses Prolog.
We continue to get Prolog posts from time to time because we have a couple of threads on it in the archives, and people keep finding them on Google. But we're a game development forum and Prolog isn't commonly used for game development, so this is really the wrong place to ask Prolog questions.