I have been given an assignment to write a prolog program to implement a Context Free Grammar (CFG) using an english lanquage interface.
The CFG can be extremely simple. Apparently, showing the feasibility of the idea is the core requirement.
More information will be forthcoming from the instructor in a couple of days but this is all the info I have at the moment. However, since this must be completed in less than two weeks, I figure I need to start on it now.
The course I am taking is an overview of Expert Systems. We spent one class going over some prolog syntax but that is about the extent of our coverage. I have programmed enough in other lanquages to be confident of my general skill level with languages but prolog seems to be a lot different than any other lanquage I have used. However, I don't have the time to really learn the language as I have other course work that needs to be done. Personally, I am a bit perplexed as to how the instructor really expects this project to be done on such short notice though I suspect that she is really looking for someone to show her how to do it herself (I know she is just now starting to learn the lanquage herself). Regardless, though, she holds my grade in her hands so I have to do the best I can.
I downloaded swi-prolog for windows and have played around with the demo program that was included. However, I really do not understand what I am doing yet. Prolog has an entirely different way of doing things (and terminology) from procedural and object oriented lanquages I have used.
My basic questions now are:
Are there any well written Tutorials available that hit the high points quickly and perhaps contrast prolog with C ?
Something that has samples of interactive prolog programs?
How do I get input from the user via screen inputs (ie.. "Please enter something here: " )
How do I clear the screen?
How do I output to the screen? To file?
Is there a way to debug that is simple? Anything similar to printf() statements dropped where they are needed?
Does anyone have a suggestion on how to even begin this project?
I do not want you to do my project for me (ok..I really do but I don't really expect it to happen) but any examples of anything that might be in any way similar will be greatly appreciated.