Показаны сообщения с ярлыком prolog. Показать все сообщения
Показаны сообщения с ярлыком prolog. Показать все сообщения

понедельник, 25 декабря 2017 г.

Prolog ideas

Here is my list of Prolog ideas:

  1. JSON parser
  2. HTTP requests parser
  3. Declarative UI
  4. Validation rules for UI
  5. Business logic in C\C++\Java
The idea of declarative UI I borrowed from the Turbo Prolog 2 User guide and Turbo Prolog Toolbox. It could be useful to have some intermediate UI form representation  in order to be able to translate it into different languages.

As for the last topic it turned out to be easy embed tuProlog in Java. And I had a prototype where I call java methods from Prolog.

The later topics need to be researched further.

четверг, 21 декабря 2017 г.

W.F. Clocksin, C.S. Mellish. Programming in Prolog

Hi everyone.

I have just read "Programming in Prolog" and wonder why this book is recommended for beginners?

The most useful tip in this book is located at the end of it in appendix C:
This book describes Prolog version which is not related to any particular existing version. The idea was to create the description of "general" Prolog which applies to all systems at once.
 The best way to learn Prolog system you have -- is to read user documentation supplied with it.

Wow! Such a wonderful advise. Why I have to read all the book till the end in order to find out this?
Beginners  will suffer a lot and will complain about Prolog. This shouldn't be like this.

Please treat the book as an approach to explain ideas behind Prolog, not a tutorial.

пятница, 24 ноября 2017 г.

Adventure in Prolog

Ever wanted to learn logic programming?
Wanna know how to program in Prolog?

Wanna know how to integrate Java with Prolog?

A lot of questions arise when we face with a "new" language such as Prolog.
After Java, Prolog looks like a fresh air. It has simple syntax, small number of concepts comparing to the OOP. For me the main advantage that it is a declarative language, not imperative.

If you deal a lot with business rules in your programs you know how ugly imperative implementations look like. This could be the opportunity for Prolog and constantly changing business world.

A lot of information exist about Prolog. What to start with?
IMHO Adventure in Prolog could be a good introduction to Prolog. All concepts are introduced and presented with examples and small tasks.

Examples could be run on almost any Edinburgh compatible Prolog. I use tuProlog. It runs on top of the JVM. Also it has a simple IDE, so you can just move straight to executing your code.

I also started a new repo on https://github.com/chernykhalexander/PrologExperiments for Prolog experiments.