Copyright (1997-2013) EDMGROUP Pty Ltd - EZY Prolog Reference

EZY PROLOG SUITE(download)

What is that? It is simple to answer - first, it is a Suite of software for prolog programmers and second - it is EZY (which stands for easy here, in Australia).  Combined together it suppose to make programming in Prolog easy. Sounds very ambitious.

 

If you know nothing about Prolog programming  language - you better stop reading now. You will not learn about Prolog here. I consider EZY Prolog Suite as a learning tool for beginners as well as enhanced version of Prolog for advanced users and GUI programming paradigm for experienced Visual Prolog programmers. So, everyone could find something interesting.

 

Users, who want (or need) to do experiments in programming using Prolog language could find EZY Prolog console suitable to experiment with various prolog samples. Users, who want to write GUI (Graphical User Interface) Prolog programs find EZY Prolog Visual Development Environment (VDE) as a handy tool to try various Prolog samples (included into the Suite). Experienced Visual Prolog programmers could benefit from EZY Prolog VDE and EZY GUI programming paradigm by getting working Prolog code from graphical user interface (GUI), drawn in EZY Prolog VDE.

 

EZY Prolog has many functional components, which could be useful for advanced users (ODBC databases, XML, regular expressions and  etc) as well as run-time environment for various platforms (Windows, DOS, WEB or embedded). EZY Prolog suite comes with many functionally complete samples (SQL Explorer, File Explorer), which allows to shorten learning cycle.

 

So, if  you are still reading, it means you know or at least heard about Prolog language. And I am sure that you already know - it is not easy.

So, you will understand, if I say, that EZY Prolog Suite is:

Everyone may find something interesting in EZY Prolog:

  • Beginners - easy and simple way to write Prolog program with GUI.

  • Students - pass exams and laboratory assignments.

  • Professional Visual Prolog programmers - easy GUI programming technology (object code or source code).

  • Professional imperative programmers (C, Java, VB) - embedded Prolog Inference Engine as decision-making module to include into their application.

  • WEB programmers - Prolog Inference Engine to work on WEB server via CGI

  • Various researches - Prolog Inference Engine in different forms (command line utility, CGI) - to experiment with programming for Artificial Intelligence.

  • Hobby-programmers - just to have fun to see that Prolog works.

The most important part of EZY Prolog is VDE (Visual Development Environment) with:

  • GUI Designer - Visual Basic- style GUI drawing tool, which generates Prolog code for drawn GUI (EZY Prolog code or Visual Prolog classes).

  • Code Expert with powerful text editor, code navigator and intelligent code insertion tools

  • Help panel for language calls and domains.

  • Context-based language calls insertion.

  • Program logic verification (Turbo/Visual Prolog compatible code only).

  • Service panels - Messages, Variables Watch, Calling Stack.

  • Support tools (code viewer, code searcher, code HTML formatter), which help to organize things together.

  • Prolog interpreter (enhanced version of Visual Prolog PIE), which runs prolog code with or without GUI

  • Code generator - creates working code from drawn GUI (EZY Prolog and Visual Prolog classes).

Please note, this EZY Prolog is not a new version or "new dialect" of Prolog language. EZY Prolog interpreter is compatible with Turbo/PDC Prolog Prolog (typed version of Prolog) and classical (not-typed) Prolog and inherits features of these major Prolog "dialects".

You can run many Turbo prolog programs inside EZY Prolog without modification. For example, many Turbo/PDC Prolog language tutorials can be tried in EZY Prolog. So, if you do not have Turbo/PDC Prolog and you want to study programming in Prolog - you can use EZY Prolog with Turbo/PDC Prolog samples. 

 

It is FREE and, therefore, EZY to start with.

EZY Prolog accepts but doesn't require types declarations - it is "smart" enough and simply... ignores DOMAINS and PREDICATES declarations (required by PDC/Turbo Prolog) and only processes rules, defined in CLAUSE section of the program. So, it behaves like traditional Prolog interpreter and if you have traditional prolog program (from a classical Prolog book,for instance), which doesn't have type declarations, required by Turbo/PDC Prolog, you can use EZY Prolog to give this program a try (more about program structure here).

And continue your education in a classical way.

If you are confused with this type of "compatibility" of EZY Prolog with two incompatible dialects of prolog - you should read here (TBA)  for more information. WARNING - it could be boring, my advise - just accept that as a fact.

 

So, why it is called (named by me) EZY?. Not because it is FREE (many Prolog implementations are free).

I really feel that many things are very easy with this version of Prolog.

 

First, it is really EZY to install. You can run it from CD or flash card without installation on your system. It is really "plug and play" - download, unzip and run. You will need less than 4 MB of space for console-style executables (so, you can even store it on your mobile phone ;) ).

 

If you are not excited with FREE and EZY to install, there is something else. EZY Prolog gives you:

So, what else is EASY in this dialect of Prolog?

 

You do not need to type much in EZY Prolog VDE. First, if you develop program with GUI, system will generate Prolog code from drawn GUI. Generated code will have comments and ready to execute.

EZY VDE lets you do less typing by giving working templates for the Prolog code. You type in beginning of language call, system will show list of matches, you select from the list and system inserts language call with correct syntax.

 

As result - less typing, less mistakes and shorter development cycle. This is what suppose to make things EZY..

 

The goal of EZY Prolog is to make programming in Prolog easier by the following enhancements:

  • Context-based code templates insertion - type in the beginning of the predicate and system will insert template code for it.

  • Domains and Predicate explorer to insert language templates

  • Turbo/PDC Prolog compiler for robust logic verification (types, flow patterns and use of non-assigned variables, unused variables and predicates).

  • EZY GUI software paradigm (Prolog declarations for GUI)

  • Visual Basic - style GUI Designer, which generates working Prolog code/VIP classes from drawn GUI  (no typing and no programming required).

  • Code expert, which helps navigation in program structure via code tree.

  • Quick help on language calls and domains

  • Search for code samples (using regular expressions) to reuse working code across modules

What makes programming easy in EZY Prolog?

 

  Context-based code templates insertion 

If you need to type in language call - just type in the beginning, press button and system will show the list of matches. Select language call - system will insert CORRECT format of the selected language call with variable names. The only you need is to change variable names to reflect program logic.

 EZY Password - all EZY Prolog predicates start with keyword ezy. If you need to insert language call but do not know exactly it's syntax - type in ezy and press Ctrl+Shift+Space key - system will display predicate expert, which will help you to insert correct language call.

As a result - you will learn by programming, will have less syntax errors and will have less to type.

Isn't that EZY?

 

Turbo/PDC Prolog compiler for robust logic verification.

Any program could have errors. Even if EZY VDE helps to reduce typing by placing templates, it is programmer, who can write program with incorrect logic. This is where EZY Prolog can help to verify, that program source doesn't have logical errors, such as use of non-assignment variables, predicates flow patterns as well as unused variables (note: this works only for program source, compatible with Turbo/Visual Prolog).

 

This makes logic programming very EZY and reduces development cycle - no need to spend your time finding out why programs doesn't do what you expect.

 

EZY GUI software paradigm (Prolog declarations for GUI)

All modern programming is about interfaces and visual interfaces have little common with logic programming. Any modern programming language has tools to create and control visual components. So has EZY Prolog, but there is little difference.

 

Every GUI element has it's representation as Prolog term. EZY Prolog has one (only one) language call to set/get properties/values of the GUI element

 

Imagine, if you have visual object, which has several (let say - 10) properties (color, font, size) and several methods (reactors to user action) and we have, let say, 100 different objects - you, as a programmer, have to learn all these methods and properties. No wonder modern "programming bibles", which suppose to be a quick reference, have hundreds of pages (10 methods plus 10 properties by 100 controls - this small subset could be as big as 400 pages).

 

So, you should have a lot of time to read such "bibles".

What EZY Prolog makes different here? In simple terms, EZY GUI concept based upon assumption, that every GUI element has it's logical representation as Prolog term. One (only one) language call works to set and get GUI element properties. So, it is ONE EZY call.

EZY GUI Designer allows setting GUI element properties at design stage, reducing the need to write any code.

So, one can say that you still have to learn all these prolog terms (syntax and etc)?

 

The answer is - NO, there is NO such need, because EZY Prolog GENERATES correct terms from the GUI element and/or their composition, interactively drawn by EZY GUI Designer.

I should add that generated GUI  term has comments for easy reading. 

How to access individual properties of a complex term?

It is easy - by use of term unification mechanism, which is core component of Prolog language.

The critics would say "And where is the difference? We still have to learn these terms and how to program them".

 

The difference is huge.

  • First - less typing, because system generates necessary code for you..

  • Second - you learn while programming, learn as you go from COMMENTED code templates.

  • Third - simply less to learn. You should know how to draw GUI, system will generate corresponding GUI terms and use one language call to get/set properties.

These 3 steps are enough to write working GUI program in EZY Prolog.

 

Visual Basic-style GUI Designer (GUI Expert)

Drawing is simple - select component, draw it's border and use object inspector to define properties. System stores GUI declarations in EZY FORM file, which stores associated Prolog program to work with GUI layout.

System will generates working Prolog code framework from drawn GUI  (no typing and no programming required).

So, programmer always has WORKING code, which he can work with.

 

And where is difference from traditional GUI designers?

 

The answer is - NESTING of GUI elements.

 

Some EZY GUI elements can include others (frame, Tab control) paradigm allows to nest controls, which at the end create a control tree based upon parent-child relationship between them. What is more important is that system can generate prolog term for any element from this tree of controls. Programmer can use this term to get/set values of the whole GUI layout by one simple call.

 

And finally, EZY Prolog (with all it's components and modules) is an Open Source Project.

It means, that you can have access to it's source codes.

Please note, that Open Source doesn't mean Free Sources (more information later - TBA).

 

ePC Model Analyzer

 

Copyright 1997-2013 EDMGROUP (Australia)