<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.visual-prolog.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mark+Green</id>
	<title>wiki.visual-prolog.com - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.visual-prolog.com/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Mark+Green"/>
	<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Special:Contributions/Mark_Green"/>
	<updated>2026-04-16T04:59:41Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Fundamental_Visual_Prolog&amp;diff=4626</id>
		<title>Fundamental Visual Prolog</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Fundamental_Visual_Prolog&amp;diff=4626"/>
		<updated>2019-05-14T01:18:10Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FundamentalPrologNavbar}}&lt;br /&gt;
&lt;br /&gt;
In this tutorial, we will introduce a program that is developed on the Visual Prolog platform. The essential algorithms of the tutorial are the same as those that were developed in [[Fundamental Prolog Part 2]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Differences between Visual Prolog and traditional Prolog==&lt;br /&gt;
&lt;br /&gt;
The differences between traditional Prolog and Visual Prolog can be broadly divided into these categories:&lt;br /&gt;
&lt;br /&gt;
*Program structure differences: There are distinct, yet easy to understand differences between the structure used in traditional Prolog and that used in Visual Prolog. It essentially comprises of understanding how to mark out the declarations from the definitions, and to indicate the main &amp;#039;&amp;#039;Goal&amp;#039;&amp;#039; that the program has to seek using specific keywords.&lt;br /&gt;
&lt;br /&gt;
*File considerations: Visual Prolog provides various facilities to organize the structure of the program into different kinds of files.&lt;br /&gt;
&lt;br /&gt;
*Scope access issues: A Visual Prolog program can pick up functionality developed in other modules using a concept called &amp;#039;&amp;#039;scope identification&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
*Object orientation: A Visual Prolog program can be written as an object-oriented program, using classic object oriented features.&lt;br /&gt;
&lt;br /&gt;
===Program Structure Differences===&lt;br /&gt;
&lt;br /&gt;
====Declarations and Definitions====&lt;br /&gt;
&lt;br /&gt;
In Prolog, when we need to use a predicate we simply do so without any prior indication to the Prolog engine about our intention. For example, in the earlier tutorial the &amp;lt;code&amp;gt;grandFather&amp;lt;/code&amp;gt; predicate&amp;#039;s clause was directly written using the traditional Prolog predicate head and body construction. We did not bother to inform the engine in the code that such a predicate construction is to be expected later.&lt;br /&gt;
&lt;br /&gt;
Similarly, when a compound domain is used in traditional Prolog, we can use it without first warning the Prolog engine about our intention to use the domain. We simply use a domain the moment we feel the need for it.&lt;br /&gt;
&lt;br /&gt;
However, in Visual Prolog, before writing the code for the clause body of a predicate we first need to declare the existence of such a predicate. Similarly, before using any domains, they need to be declared. The reason such forewarnings are required in Visual Prolog is to ensure that runtime exceptions are converted into compile time errors as far as possible.&lt;br /&gt;
&lt;br /&gt;
By &amp;#039;&amp;#039;&amp;quot;runtime exceptions&amp;quot;&amp;#039;&amp;#039;, we mean issues that turn up when a program is run. For example, if you had intended to use an integer as the argument of a functor, and instead of the integer you had erroneously used a real number, it would become a &amp;#039;&amp;#039;runtime&amp;#039;&amp;#039; error in programs written using most other Prolog compilers and the program would fail there. When you declare the predicates and domains in advance, this kind of positional grammar (which argument belongs to which domain), etc. is made available to the compiler. Therefore, when Visual Prolog performs a compilation, it checks the program quite thoroughly to weed out such grammatical and other mistakes.&lt;br /&gt;
&lt;br /&gt;
Because of this feature in Visual Prolog, the overall efficiency of a programmer improves. The programmer does not have to wait till the program is actually executed to detect a bug. In fact, those of you who are experienced in programming would understand what a life-saver this can be; often, the particular sequence of events that causes a &amp;#039;&amp;#039;runtime exception&amp;#039;&amp;#039; to happen may be so elusive that the bug may only turn up after several years, or it may manifest itself in some critical or other embarrassing situations!&lt;br /&gt;
&lt;br /&gt;
All this implies that the compiler &amp;#039;&amp;#039;&amp;#039;has&amp;#039;&amp;#039;&amp;#039; to be given explicit instructions regarding the predicates and domains that exist in the code using appropriate declarations before they are defined.&lt;br /&gt;
&lt;br /&gt;
====Keywords====&lt;br /&gt;
&lt;br /&gt;
A Visual Prolog program consists of Prolog code which is punctuated into different &amp;#039;&amp;#039;&amp;#039;sections&amp;#039;&amp;#039;&amp;#039; by appropriate keywords that inform the compiler the code it has to generate. For example, there are keywords that differentiate the &amp;#039;&amp;#039;declarations&amp;#039;&amp;#039; from the &amp;#039;&amp;#039;definitions&amp;#039;&amp;#039; of predicates and domains. Usually, each section is preceded by a keyword. There is normally no keyword which signifies the ending of a particular section. The presence of another keyword indicates the ending of the previous section, and the starting of the next one.&lt;br /&gt;
&lt;br /&gt;
The exception to this rule, are the keywords &amp;quot;implement&amp;quot; and &amp;quot;end implement&amp;quot;. The code contained between these two keywords indicates the code to be used for a particular class. Those of you who do not understand the concept of a &amp;quot;class&amp;quot; can, for now, think of it as a module or a section of the overall program code.&lt;br /&gt;
&lt;br /&gt;
For the purpose of this tutorial, we&amp;#039;ll introduce only the following keywords (given below). We are also giving the purpose behind these keywords, and the actual syntax can be easily learnt from the documentation. There are other keywords also in Visual Prolog, and those can easily be picked up in later tutorials and the documentation.&lt;br /&gt;
&lt;br /&gt;
The list of the keywords that you need to know in this tutorial is the following:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;implement&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;end implement&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:Among all the keywords discussed here, this is the only one, which exists as a pair. Visual Prolog treats the code written between these two keywords as the code that belongs to one class. The name of the class MUST be given after the implement keyword.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;open&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:This keyword is used to extend the &amp;#039;&amp;#039;scope visibility&amp;#039;&amp;#039; of the class. It is to be used just after the implement keyword.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;constants&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:This keyword is used to mark a section of the code that defines some commonly used values in the program code. For example, if the string literal &amp;quot;PDC Prolog&amp;quot; is to be used in multiple locations throughout the code, then you can define a mnemonic (a short-form, easily remembered word) for the same thus:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&amp;lt;vip&amp;gt;constants&lt;br /&gt;
    pdc = &amp;quot;PDC Prolog&amp;quot;.&amp;lt;/vip&amp;gt;&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
:Note that the definition of a constant ends in a period (.). Unlike a Prolog variable, a constant should be a word starting with a lower case letter.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;domains&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:This keyword is used to mark a section declaring the domains that would be used in the code. There are many variations for the syntax of such domain declarations, and they cater to the all the possible kinds of domains that would be used later on in the code. As this tutorial is a basic one, we shall not get into the finer details of the domain declarations that can be possible.&lt;br /&gt;
&lt;br /&gt;
:To summarize here, you would be declaring the functor that would be used for the domain and the kind of domains that would form its arguments. Functors and compound domains were explained in detail in the previous part of the Tutorial.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;class facts&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:This keyword designates a section, which declares the facts that would be used later on in the code of the program. Each fact is declared with the name used to signify the fact and the arguments that are used for the respective facts along with the domains that those arguments belong to.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;class predicates&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:This section contains the declarations of the predicates that would be later defined in the clauses section of the code. Once again, the names that would be used for these predicates along with the arguments and the domains, to which the arguments belong to, would be indicated in this section.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;clauses&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:Of all the sections that are present in a Visual Prolog code, this section is the one that closely mimics a traditional Prolog program. It contains the actual &amp;#039;&amp;#039;definitions&amp;#039;&amp;#039; of the previously declared predicates. And you would find that the predicates used here would follow the syntax as declared in the &amp;#039;&amp;#039;class predicates&amp;#039;&amp;#039; section.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;goal&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
:This section defines the main entry point into a Visual Prolog program. A more detailed explanation is given below.&lt;br /&gt;
&lt;br /&gt;
====Goal====&lt;br /&gt;
&lt;br /&gt;
In traditional Prolog, whenever a predicate is defined in the code, the Prolog Engine can be instructed to start the code execution from that predicate onwards. However, that is not the case with Visual Prolog. Being a &amp;#039;&amp;#039;compiler&amp;#039;&amp;#039; it has the responsibility of producing efficiently executing code for the program you write. This code would not be actually executing at the same time the &amp;#039;&amp;#039;compiler&amp;#039;&amp;#039; is doing its work. Hence, the &amp;#039;&amp;#039;compiler&amp;#039;&amp;#039; needs to know beforehand the exact predicate from which the code execution would start, so that later on when the program is called to perform, it can do so from the correct starting point. As you may have guessed, the compiled program can run independently without the Visual Prolog compiler or the IDE itself.&lt;br /&gt;
&lt;br /&gt;
In order to do that, there is a special section indicated by the keyword &amp;#039;&amp;#039;Goal&amp;#039;&amp;#039;. Think of it as a special predicate that you would write without arguments. That predicate is the one from which the entire program execution will start.&lt;br /&gt;
&lt;br /&gt;
===File Considerations===&lt;br /&gt;
&lt;br /&gt;
Many times, it may become cumbersome to put all the parts of the program into one file itself. It may even make the program unreadable and sometimes incorrect. Visual Prolog has the capability of dividing the program code into separate files using the IDE (Integrated Development Environment) and it is possible to write neat pieces of code into separate files using that IDE. When it is done in that manner, things that are to be used commonly can be accessed across files. E.g. If you have a domain that is to be used in multiple files, then the declaration of that domain is done in a separate file, and that file is then accessed from other files.&lt;br /&gt;
&lt;br /&gt;
However, for the purpose of simplifying this particular tutorial, we shall predominantly be using only one file to develop the program code. In the course of constructing the program, the IDE would automatically create some more files which we can ignore for the time being. We can learn about them in future tutorials.&lt;br /&gt;
&lt;br /&gt;
===Scope Access Issues===&lt;br /&gt;
&lt;br /&gt;
Visual Prolog divides the total program code into separate parts, each part defining one class. In object oriented languages, a class is a package of code and its associated data which is put together. This requires more explanation which would be available in later tutorials. As noted earlier, for those of you who are not familiar with object oriented programs, you can think of a &amp;#039;&amp;#039;class&amp;#039;&amp;#039; loosely as being synonymous to &amp;#039;&amp;#039;modules&amp;#039;&amp;#039;. Normally, Visual Prolog defines each class in its own separate file.&lt;br /&gt;
&lt;br /&gt;
During the program execution, it often so happens that the program may need to invoke a predicate that is actually defined in another class (file). Similarly, data (constants) or domains defined in a class may need to be accessed from a different file.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog allows such cross class code/data references using a concept called scope access. This can be understood by an example. Suppose there is a predicate called pred1 defined in a class called class1 (which is written down in another file using the IDE), and we need to call that predicate in the clause body of some other predicate, pred2 in a different file (say class2) then this is how pred1 would be called within the clause body of pred2 :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
    pred3:-&lt;br /&gt;
        ...&lt;br /&gt;
        !.&lt;br /&gt;
&lt;br /&gt;
    pred2:-&lt;br /&gt;
        class1::pred1, % pred1 is not known in this class. It is defined in some other class, hence a class qualifier is needed&lt;br /&gt;
        pred3,&lt;br /&gt;
        ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the above example, you can see that the clause body of pred2 calls two predicates pred1 and pred3. As pred1 is defined in another file (which defines class1), the word class1 with the token &amp;#039;&amp;#039;&amp;#039;::&amp;#039;&amp;#039;&amp;#039; (two colons) precedes the word pred1. This can be called as a class qualifier.But the predicate pred3 is defined within the same file as pred2 itself. Hence there is no need to indicate class2:: prior to the predicate call for pred3.&lt;br /&gt;
&lt;br /&gt;
This behavior is technically explained thus: The &amp;#039;&amp;#039;scope visibility&amp;#039;&amp;#039; of pred3 is within the same scope of pred2. Hence there is no need to clarify that pred3 is from the same class as pred2. The compiler would automatically look for the definition of pred3 within the same scope area as defined for class2.&lt;br /&gt;
&lt;br /&gt;
The scope area of a particular class definition is restricted to the class that is implemented in a particular file (i.e. code that is written within the implement &amp;#039;&amp;#039;-&amp;#039;&amp;#039; end implement keywords). The predicates defined therein can call each other without the class qualifier and the double colon (::) token preceding it.&lt;br /&gt;
&lt;br /&gt;
The scope area of a class can be extended by using the open keyword. This keyword informs the compiler to bring in names (of predicates / constants / domains) that were defined in other files. If a scope area is extended, then we need not write the class qualifier with the double colon.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;open class1&lt;br /&gt;
            ...&lt;br /&gt;
&lt;br /&gt;
clauses&lt;br /&gt;
    pred3:-&lt;br /&gt;
        ...&lt;br /&gt;
        !.&lt;br /&gt;
&lt;br /&gt;
    pred2:-&lt;br /&gt;
        pred1, %Note: &amp;quot;class1::&amp;quot; qualifier is not needed anymore, as the scope area is extended using the &amp;#039;open&amp;#039; keyword&lt;br /&gt;
        pred3,&lt;br /&gt;
        ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Object Orientation===&lt;br /&gt;
&lt;br /&gt;
The current version of Visual Prolog is a strongly object oriented language. The ENTIRE code which is developed for a program is put into appropriate classes, as needed. This happens by default, even if you are not interested in the object oriented features of the language. You would notice this feature in the example given in this tutorial also. The code is inserted into a class called &amp;quot;family1&amp;quot; even though we would eventually not use any objects created from that class. Instead, we would use publicly accessible predicates of the code within that class directly.&lt;br /&gt;
&lt;br /&gt;
This tutorial will not handle the object oriented features of the language. Future tutorials would extend this concept, and even actually use the object oriented features.&lt;br /&gt;
&lt;br /&gt;
== A Full Fledged Example: family1.vipprj ==&lt;br /&gt;
&lt;br /&gt;
This project is available as an example in the Visual Prolog installation, use &amp;#039;&amp;#039;&amp;#039;Help -&amp;gt; Install Examples...&amp;#039;&amp;#039;&amp;#039; to install the examples.  This particular example is then in the folder: &amp;#039;…\_tutorial\familyfamily1&amp;#039;, where &amp;#039;…&amp;#039; is the folder in which you installed the examples.&lt;br /&gt;
&lt;br /&gt;
Let us now put all the knowledge we&amp;#039;ve gathered together to create our first Visual Prolog program. This will contain the same basic logic that was explored in the Tutorial &amp;quot;Fundamental Prolog. Part 2&amp;quot;. All the code that is to be written for this tutorial is shown below. The actual code writing will be done using the Visual Prolog IDE (Integrated Development Environment). There are some more files that are needed for the tutorial, but those would automatically be generated and maintained by the IDE. The step by step instructions (using screenshots) for utilizing the IDE to develop the program will shortly follow.&lt;br /&gt;
&lt;br /&gt;
But first of all, let us acquaint ourselves with the main code of the program:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement main&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    gender = female; male.&lt;br /&gt;
&lt;br /&gt;
class facts - familyDB&lt;br /&gt;
    person : (string Name, gender Gender).&lt;br /&gt;
    parent : (string Person, string Parent).&lt;br /&gt;
&lt;br /&gt;
class predicates&lt;br /&gt;
    father : (string Person, string Father) nondeterm anyflow.&lt;br /&gt;
clauses&lt;br /&gt;
    father(Person, Father) :-&lt;br /&gt;
        parent(Person, Father),&lt;br /&gt;
        person(Father, male).&lt;br /&gt;
&lt;br /&gt;
class predicates&lt;br /&gt;
    grandFather : (string Person [out], string GrandFather [out]) nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    grandFather(Person, GrandFather) :-&lt;br /&gt;
        parent(Person, Parent),&lt;br /&gt;
        father(Parent, GrandFather).&lt;br /&gt;
&lt;br /&gt;
class predicates&lt;br /&gt;
    ancestor : (string Person, string Ancestor [out]) nondeterm.&lt;br /&gt;
clauses&lt;br /&gt;
    ancestor(Person, Ancestor) :-&lt;br /&gt;
        parent(Person, Ancestor).&lt;br /&gt;
    ancestor(Person, Ancestor) :-&lt;br /&gt;
        parent(Person, P1),&lt;br /&gt;
        ancestor(P1, Ancestor).&lt;br /&gt;
&lt;br /&gt;
class predicates&lt;br /&gt;
    reconsult : (string FileName).&lt;br /&gt;
clauses&lt;br /&gt;
    reconsult(FileName) :-&lt;br /&gt;
        retractFactDB(familyDB),&lt;br /&gt;
        file::consult(FileName, familyDB).&lt;br /&gt;
&lt;br /&gt;
clauses&lt;br /&gt;
    run() :-&lt;br /&gt;
        console::init(),&lt;br /&gt;
        stdio::write(&amp;quot;Load data\n&amp;quot;),&lt;br /&gt;
        reconsult(@&amp;quot;..\fa.txt&amp;quot;),&lt;br /&gt;
        stdio::write(&amp;quot;\nfather test\n&amp;quot;),&lt;br /&gt;
        father(X, Y),&lt;br /&gt;
        stdio::writef(&amp;quot;% is the father of %\n&amp;quot;, Y, X),&lt;br /&gt;
        fail.&lt;br /&gt;
&lt;br /&gt;
    run() :-&lt;br /&gt;
        stdio::write(&amp;quot;\ngrandFather test\n&amp;quot;),&lt;br /&gt;
        grandFather(X, Y),&lt;br /&gt;
        stdio::writef(&amp;quot;% is the grandfather of %\n&amp;quot;, Y, X),&lt;br /&gt;
        fail.&lt;br /&gt;
&lt;br /&gt;
    run() :-&lt;br /&gt;
        stdio::write(&amp;quot;\nancestor of Pam test\n&amp;quot;),&lt;br /&gt;
        X = &amp;quot;Pam&amp;quot;,&lt;br /&gt;
        ancestor(X, Y),&lt;br /&gt;
        stdio::writef(&amp;quot;% is the ancestor of %\n&amp;quot;, Y, X),&lt;br /&gt;
        fail.&lt;br /&gt;
&lt;br /&gt;
    run() :-&lt;br /&gt;
        stdio::write(&amp;quot;End of test\n&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
end implement main&lt;br /&gt;
&lt;br /&gt;
goal&lt;br /&gt;
    mainExe::run(main::run).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Step 1: Create a New Console Project in the IDE===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1a.&amp;#039;&amp;#039;&amp;#039; After starting the Visual Prolog IDE, click on the New menu item from the Project menu.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 1b.&amp;#039;&amp;#039;&amp;#039; A dialog would be presented to you. Enter all the relevant information. Ensure that the Project Kind is &amp;#039;&amp;#039;Console&amp;#039;&amp;#039; and NOT &amp;#039;&amp;#039;GUI&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
:[[Image:FundamentalVisualProlog2.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 2: Build an Empty Project===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2a.&amp;#039;&amp;#039;&amp;#039; When the project is just created, the IDE would display the following project window. At this point in time, it does not have any clue about what files the project is dependent on. It does, however create the basic source code files for the project.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 2b.&amp;#039;&amp;#039;&amp;#039; Use the Build menu item of the Build menu, to compile and link the empty project to create an executable file which basically does not do anything. (At this point it time, it would not generate any errors either)&lt;br /&gt;
&lt;br /&gt;
While building the project, take a look at the messages that are dynamically displayed in the &amp;#039;&amp;#039;&amp;#039;Messages&amp;#039;&amp;#039;&amp;#039; window of the IDE. (In the case the &amp;#039;&amp;#039;&amp;#039;Messages&amp;#039;&amp;#039;&amp;#039; window is not visible, you can turn it on using the Window menu of the IDE) You will notice that the IDE intelligently pulls in ALL the necessary PFC (Prolog Foundation Classes) modules into your project. PFC classes are those classes which contains the basic functionality on which your programs would be built.&lt;br /&gt;
&lt;br /&gt;
===Step 3: Populate the main.pro with the Actual Code===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3a.&amp;#039;&amp;#039;&amp;#039; The default code inserted by the IDE is very basic and does not do anything useful. You would need to delete the entire code and copy and paste the actual code of main.pro (given in this tutorial) into that window.&lt;br /&gt;
&lt;br /&gt;
:[[Image:FundamentalVisualProlog5.png]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Step 3b.&amp;#039;&amp;#039;&amp;#039; After you perform the copy-paste operation, the main.pro window would now look as shown below:&lt;br /&gt;
&lt;br /&gt;
:[[Image:FundamentalVisualProlog6.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 4: Rebuild the Code===&lt;br /&gt;
&lt;br /&gt;
Re-invoke the Build menu command, and the IDE will notice that the source code has changed, and will take measures to appropriately recompile the correct sections. If you use the Build All menu command, then &amp;#039;&amp;#039;ALL&amp;#039;&amp;#039; the modules would be recompiled. For large programs this can consume some time. Build All is often used ONLY at the end of a series of smaller compilations; just to ensure that everything is in ship-shape order.&lt;br /&gt;
&lt;br /&gt;
During the &amp;#039;&amp;#039;Build&amp;#039;&amp;#039; process, the IDE not only does the compilation; but it also determines whether the project may need any other missing PFC modules, and inserts those and re-starts the compilation process if required. This can be seen in the messages appearing in the Messages window, where you&amp;#039;ll notice the IDE was forced to build the project &amp;#039;&amp;#039;twice&amp;#039;&amp;#039; because of some additional include statements.&lt;br /&gt;
&lt;br /&gt;
:[[Image:FundamentalVisualProlog7.png]]&lt;br /&gt;
&lt;br /&gt;
===Step 5: Execute the Program===&lt;br /&gt;
&lt;br /&gt;
We now have our first true application complied using Visual Prolog. In order to test the application we&amp;#039;ve just compiled, you can run the program using the &amp;#039;&amp;#039;&amp;#039;Build -&amp;gt; Run&amp;#039;&amp;#039;&amp;#039; menu command. However, in our case this would result in an error. The reason is that our little program is trying to read a text file (fa.txt) for its functioning. That text file contains the actual data regarding persons which our program will process. We&amp;#039;ll come to the syntax of that file a bit later.&lt;br /&gt;
&lt;br /&gt;
We need to now write that text file using some text editor and place it in the same directory where the executable is now residing. Normally, the executable would reside in the sub-folder called exe from the main project folder.&lt;br /&gt;
&lt;br /&gt;
You cannot create such a file directly in the IDE itself, but you can save an existing files with a new name (using &amp;#039;&amp;#039;&amp;#039;File -&amp;gt; Save as ...&amp;#039;&amp;#039;&amp;#039;) and then edit that file.  Give the file the name &amp;#039;&amp;#039;fa.txt&amp;#039;&amp;#039;. After you have saved the file you can add it to the project by selecting &amp;#039;&amp;#039;&amp;#039;File -&amp;gt; Add...&amp;#039;&amp;#039;&amp;#039;. The advantage of adding it to the project is that it will be available for any subsequent debugging, etc.&lt;br /&gt;
&lt;br /&gt;
The contents of the file should be as follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
    person(&amp;quot;Judith&amp;quot;,female).&lt;br /&gt;
    person(&amp;quot;Bill&amp;quot;,male).&lt;br /&gt;
    person(&amp;quot;John&amp;quot;,male).&lt;br /&gt;
    person(&amp;quot;Pam&amp;quot;,female).&lt;br /&gt;
    parent(&amp;quot;John&amp;quot;,&amp;quot;Judith&amp;quot;).&lt;br /&gt;
    parent(&amp;quot;Bill&amp;quot;,&amp;quot;John&amp;quot;).&lt;br /&gt;
    parent(&amp;quot;Pam&amp;quot;,&amp;quot;Bill&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Though it is a data file, you would notice that the syntax of the file is VERY similar to regular Prolog code! Even though the program is now compiled and is now in a binary format; you can change the output by simply changing the crucial data the program is processing. And that data is written into this text file using the same syntax as Prolog. Thus Visual Prolog emulates the &amp;#039;&amp;#039;dynamic&amp;#039;&amp;#039; code writing capability of traditional Prolog. Albeit, not all features are available but at least complicated domains such as those in this example can definitely be given.&lt;br /&gt;
&lt;br /&gt;
The syntax used in fa.txt MUST be compatible with the domain definitions of the program. E.g. The functor used for defining a person MUST be &amp;#039;&amp;#039;person&amp;#039;&amp;#039; and not anything else; else appropriate compound domain representing that functor would not get initialized. (We had covered the topic of functors and compound domains in an earlier tutorial).&lt;br /&gt;
&lt;br /&gt;
Now, when you run the program using the &amp;#039;&amp;#039;&amp;#039;Build -&amp;gt; Run in Window&amp;#039;&amp;#039;&amp;#039; menu command, this is what you&amp;#039;ll see:&lt;br /&gt;
&lt;br /&gt;
:[[Image:FundamentalVisualProlog8.png]]&lt;br /&gt;
&lt;br /&gt;
The program processes the information in the file fa.txt and works out the logical sequence of the parentages of people given there.&lt;br /&gt;
&lt;br /&gt;
===A Round up of the Program===&lt;br /&gt;
&lt;br /&gt;
The logic of the program is very simple. We had discussed it in an earlier tutorial, where we explained how the correct representation of data can help yield the appropriate results in a Prolog program. Let us now discuss the manner in which this logic works.&lt;br /&gt;
&lt;br /&gt;
At start up, the main predicate will be invoked directly. This in turns branches off to the run predicate. The first thing the run predicate will do is to read in the data which is written in the file fa.txt. Once the data is in place, the program systematically progresses from one test to another to process the data and write out the conclusions of that test onto the console.&lt;br /&gt;
&lt;br /&gt;
The mechanisms for processing the data are standard mechanisms of backtracking and recursions. This tutorial is not the place for a detailed explanation of how Prolog works, but here is a short summary of the internal workings.&lt;br /&gt;
&lt;br /&gt;
When the run predicate is calling the father predicate, it does not stop at the first satisfactory ending of the father predicate. The invoking of a fail at the end of the predicate, forces the Prolog engine to seek another pass through the father predicate. Such a behavior is called &amp;#039;&amp;#039;backtracking&amp;#039;&amp;#039;, because the Prolog engine literally seems to backtrack over code which had earlier executed.&lt;br /&gt;
&lt;br /&gt;
This happens recursively (i.e. as a repetitive process or cyclically), and at each cycle the father predicate yields the next result. Eventually all the possible definitions of &amp;quot;fathers&amp;quot; given in the data are exhausted, and the run predicate would have no choice but carry over to the next clause body of the run predicate.&lt;br /&gt;
&lt;br /&gt;
The father predicate (as well as some other predicates) has been declared to be non-deterministic. The keyword nondeterm can be used to declare non-deterministic predicates; i.e. predicates that can yield multiple answers using backtracking.&lt;br /&gt;
&lt;br /&gt;
If the no keyword is used in a predicate declaration, then the predicate has got the procedure mode, which can give only one solution, and the father predicate will stop after yielding the first result and cannot be re-entered into. Also, one must be careful in the usage of the cut (!) in the clause bodies of such non-deterministic predicates. If there is a cut at the end of the clause body of the father predicate, yet again; the predicate will yield only one solution (even if it has been declared to be non-deterministic).&lt;br /&gt;
&lt;br /&gt;
The anyflow flow-pattern tells the compiler that the parameters that are given for the predicate could be either free or bound, with no restrictions whatsoever. That means, with the same definition of the father predicate, it would be possible to both yield the father&amp;#039;s name (in case the name of the offspring was bound) OR the offspring&amp;#039;s name (in case the name of the father was bound). It can also handle situations where both are bound; in which case the predicate will check if such a relationship exists in the data.&lt;br /&gt;
&lt;br /&gt;
And; to state the obvious; the anyflow flow pattern can also accommodate a situation where both the parameters of the father predicate are free variables. In such a case, the father predicate will yield the various combinations of father+offspring present in the data the program has learnt (through consulting the fa.txt file) to the enquirer. The last usage is what is performed in the run predicate, as seen in the code snippet below. You would notice that the variables X and Y given to the father predicate are not bound when the father predicate is called.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;clauses&lt;br /&gt;
    run():-&lt;br /&gt;
        console::init(),&lt;br /&gt;
        stdio::write(&amp;quot;Load  data\n&amp;quot;),&lt;br /&gt;
        reconsult(&amp;quot;fa.txt&amp;quot;),&lt;br /&gt;
        stdio::write(&amp;quot;\nfather test\n&amp;quot;),&lt;br /&gt;
        father(X,Y),&lt;br /&gt;
        stdio::writef(&amp;quot;% is the father of %\n&amp;quot;, Y, X),&lt;br /&gt;
        fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
In this lesson we learnt that programs written in Visual Prolog are often very similar to those written in traditional Prolog. There are several keywords that are used to differentiate the various parts of a Visual Prolog source code. Though Visual Prolog is an object-oriented language, it is possible to develop code which avoids the language&amp;#039;s object-oriented features. A complete console-based application (family1) was developed in this tutorial, which explains, how to create such a program.&lt;br /&gt;
&lt;br /&gt;
We also found that it is possible to emulate the dynamic working of a traditional Prolog program by keeping part of the code as a data file outside the main binary compiled application. The syntax of such a data file closely follows Prolog syntax.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
[[ru:Основы Системы Visual Prolog]]&lt;br /&gt;
[[Category:Fundamental Visual Prolog Tutorial]]&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Getting_Started&amp;diff=4625</id>
		<title>Getting Started</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Getting_Started&amp;diff=4625"/>
		<updated>2019-05-14T01:10:24Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;How to get started with Visual Prolog? The answer depends on what you know already.&lt;br /&gt;
&lt;br /&gt;
No matter what prerequisites you have, it is a good idea to read the [[:Category:Tutorials|tutorials]] and you may choose to start with [[Visual Prolog for Tyros]].&lt;br /&gt;
&lt;br /&gt;
== Starting from scratch ==&lt;br /&gt;
&lt;br /&gt;
The book [[A Beginners Guide to Visual Prolog]] is a good starting point.&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can start with the [[Fundamental Prolog Part 1|Fundamental Prolog tutorials]], which describes the basic ideas of &amp;quot;classical&amp;quot; Prolog programming.  It uses Edinburgh/ISO Prolog syntax, which is simpler than Visual Prolog because it does not have any type declarations and no Object-Oriented overhead. The code from the examples can be run  in &amp;#039;&amp;#039;&amp;#039;PIE&amp;#039;&amp;#039;&amp;#039; (&amp;#039;&amp;#039;&amp;#039;P&amp;#039;&amp;#039;&amp;#039;rolog &amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039;nference &amp;#039;&amp;#039;&amp;#039;E&amp;#039;&amp;#039;&amp;#039;ngine), which is a Edinburgh/ISO Prolog interpreter written in Visual Prolog. &amp;#039;&amp;#039;&amp;#039;PIE&amp;#039;&amp;#039;&amp;#039; is supplied as an example with Visual Prolog. To run it, click &amp;quot;Browse&amp;quot; on the Open Project menu in Visual Prolog, then look in your Documents directory for &amp;lt;code&amp;gt;Visual Prolog Examples&amp;lt;/code&amp;gt; and the directory &amp;lt;code&amp;gt;pie&amp;lt;/code&amp;gt; within it, and open the project there. &lt;br /&gt;
&lt;br /&gt;
== Knowing &amp;#039;&amp;#039;traditional&amp;#039;&amp;#039; Prolog ==&lt;br /&gt;
 &lt;br /&gt;
The tutorials in the [[Fundamental Visual Prolog]] section describe differences between Visual Prolog and traditional Prolog, and introduce a program that is developed in Visual Prolog. You will be asked to download example projects devoted to family relations that are discussed in these tutorials.&lt;br /&gt;
&lt;br /&gt;
Other tutorials discuss the [[Ide/Environment Overview|Visual Prolog Integrated Environment]] (IDE) and various Visual Prolog language features.&lt;br /&gt;
&lt;br /&gt;
These books are also good starting points:&lt;br /&gt;
&lt;br /&gt;
* [[A Beginners Guide to Visual Prolog]] by &amp;#039;&amp;#039;Thomas W. de Boer&amp;#039;&amp;#039;&lt;br /&gt;
* [[Visual Prolog for Tyros]] by &amp;#039;&amp;#039;Eduardo Costas&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Video Tutorials ==&lt;br /&gt;
&lt;br /&gt;
* [http://www.visual-prolog.com/video/HelloWorld/default.htm Hello World! Video Tutorial] covers basic IDE functionality&lt;br /&gt;
* [http://www.visual-prolog.com/video/IntelliSpeed/default.htm IntelliSpeed Video Tutorial] demonstrates the context sensitive keyboard accelerator and browse system.&lt;br /&gt;
&lt;br /&gt;
== Online Help System ==&lt;br /&gt;
&lt;br /&gt;
Once you are familiar with the concepts and principles, you also can use reference material from the following sections of the Help system: &lt;br /&gt;
&lt;br /&gt;
*The [[Language Reference]] that describes the syntax and semantics of the Visual Prolog language. &lt;br /&gt;
*Integrated Development Environment (IDE) Help.&lt;br /&gt;
*Prolog Foundation Classes (PFC) reference documentation. &lt;br /&gt;
&lt;br /&gt;
This Help is reference material rather than tutorial, meaning that it is not a good place to learn Visual Prolog, but it is a very good place to seek answers to specific questions.&lt;br /&gt;
&lt;br /&gt;
The Help system is available from the Integrated Development Environment.&lt;br /&gt;
&lt;br /&gt;
== Community ==&lt;br /&gt;
&lt;br /&gt;
You are also welcome to join Visual Prolog world-wide Community and seek assistance or share your knowledge in the [http://discuss.visual-prolog.com Visual Prolog Discussion forums] and this wiki.&lt;br /&gt;
&lt;br /&gt;
You will find a lot of interesting information in the [http://discuss.visual-prolog.com/viewforum.php?f=3 Visual Prolog Tips, How To&amp;#039;s, Code Samples, etc]. And, of course, you are also invited to contribute your own tips, etc.&lt;br /&gt;
&lt;br /&gt;
== Examples ==&lt;br /&gt;
&lt;br /&gt;
In the distribution there is a number of example programs. You can install these examples from the IDE, just press Help -&amp;gt; Install Examples.... You can install these examples again and again, so do not worry about experimenting with them. You can also use them as a starting point for your own programs. Finally, you can download even more examples on [http://www.visual-prolog.com/vip/example/default.htm Visual Prolog Examples and Demos].&lt;br /&gt;
&lt;br /&gt;
== Knowledge Base ==&lt;br /&gt;
&lt;br /&gt;
If you come over a problem, while creating your project, and think that there is a bug in Visual Prolog, you can check [http://kb.visual-prolog.com/ Visual Prolog Knowledge Base]. Here you will find descriptions of bugs and problems that the PDC knows about and is investigating for a possible future fix. Often we provide steps to work around the problem. The Knowledge Base is available from the IDE by &lt;br /&gt;
If a bug is fixed in a new release of the product, the &amp;quot;Bug&amp;quot; article includes information about the product version, where the Bug is fixed.&lt;br /&gt;
&lt;br /&gt;
You will also find a lot valuable information in [http://www.visual-prolog.com Visual Prolog site].&lt;br /&gt;
&lt;br /&gt;
Visual Prolog Tutorials, Visual Prolog Discussion forums, the Knowledge Base, and information about Visual Prolog updates are available directly from the Integrated Development Environment (IDE) via the WEB menu.&lt;br /&gt;
&lt;br /&gt;
== Prolog Develpment Center Site ==&lt;br /&gt;
&lt;br /&gt;
We invite you to visit the [http://www.pdc.dk Prolog Development Center site] to find descriptions of real-world commercial projects written entirely in Visual Prolog for:&lt;br /&gt;
&lt;br /&gt;
* Staff Planning &lt;br /&gt;
* Hospital Booking &lt;br /&gt;
* Airport Decision Support &lt;br /&gt;
* Airline Decision Support &lt;br /&gt;
* Shop Floor Scheduling &lt;br /&gt;
* Speech Based Solutions &lt;br /&gt;
&lt;br /&gt;
We hope, you will enjoy Visual Prolog!&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic Information]]&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Library_Reference&amp;diff=4624</id>
		<title>Library Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Library_Reference&amp;diff=4624"/>
		<updated>2019-05-13T22:33:56Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: Created page with &amp;quot;The reference to the standard Visual Prolog library, the Prolog Foundation Classes, is contained within Visual Prolog itself. This ensures that you will always be viewing the...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The reference to the standard Visual Prolog library, the Prolog Foundation Classes, is contained within Visual Prolog itself. This ensures that you will always be viewing the correct documentation for the version of Visual Prolog you are using. PDC have requested that the PFC documentation is not placed on the wiki.&lt;br /&gt;
&lt;br /&gt;
To view the Library Reference for your copy of Visual Prolog, follow the steps below:&lt;br /&gt;
&lt;br /&gt;
=== From within Visual Prolog ===&lt;br /&gt;
&lt;br /&gt;
* Create a project and open one of its source files (&amp;lt;code&amp;gt;.pro&amp;lt;/code&amp;gt; files) in the text editor.&lt;br /&gt;
* Place the text cursor over the name of a PFC library or predicate and press F1.&lt;br /&gt;
&lt;br /&gt;
If pressing F1 opens this Wiki on a page related to getting started or the text editor, then the text cursor was not over the name of a PFC library or predicate when you pressed F1. (Note that the &amp;#039;&amp;#039;&amp;#039;text&amp;#039;&amp;#039;&amp;#039; cursor must be over the name, not the &amp;#039;&amp;#039;&amp;#039;mouse&amp;#039;&amp;#039;&amp;#039; cursor.)&lt;br /&gt;
&lt;br /&gt;
If you are writing a new program or learning Visual Prolog, you can place the cursor on the word &amp;lt;code&amp;gt;core&amp;lt;/code&amp;gt; of the &amp;lt;code&amp;gt;open core&amp;lt;/code&amp;gt; line at the top of the project template. Once the Library Reference is open you can view the documentation for any class.&lt;br /&gt;
&lt;br /&gt;
=== Without Visual Prolog ===&lt;br /&gt;
&lt;br /&gt;
If you wish to browsre the PFC reference without connecting to the Visual Prolog IDE, you can find it by opening the directory where you installed Visual Prolog (usually &amp;lt;code&amp;gt;\Program Files (x86)\Visual Prolog 9&amp;lt;/code&amp;gt; or the appropriate version number) and looking in the subfolder &amp;lt;code&amp;gt;`appData\doc`&amp;lt;/code&amp;gt;. Double clicking the file &amp;lt;code&amp;gt;vip.chm&amp;lt;/code&amp;gt; will open the Library Reference.&lt;br /&gt;
&lt;br /&gt;
== List of Packages ==&lt;br /&gt;
&lt;br /&gt;
The list of PFC libraries is shown below. These give an overview of the functionality available in PFC and can be used in the editor to open the documentation on each one.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;5xVip&amp;lt;/code&amp;gt; contains predicates for compatibility with Visual Prolog v5.&lt;br /&gt;
* &amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; provides standard classes for passing event messages between listeners.&lt;br /&gt;
* &amp;lt;code&amp;gt;application&amp;lt;/code&amp;gt; provides support for calling external processes or foreign DLLs.&lt;br /&gt;
* &amp;lt;code&amp;gt;asynchronous&amp;lt;/code&amp;gt; supports asynchronous networking via winSock.&lt;br /&gt;
* &amp;lt;code&amp;gt;basis&amp;lt;/code&amp;gt; provides base classes for iterators, cancelable operations and disposable resources.&lt;br /&gt;
* &amp;lt;code&amp;gt;binary&amp;lt;/code&amp;gt; provides support for raw binary data.&lt;br /&gt;
* &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; provides support for C-style int-booleans and logical operations.&lt;br /&gt;
* &amp;lt;code&amp;gt;chainDB&amp;lt;/code&amp;gt; contains support for external databases.&lt;br /&gt;
* &amp;lt;code&amp;gt;codePageId&amp;lt;/code&amp;gt; contains constants representing standard code pages.&lt;br /&gt;
* &amp;lt;code&amp;gt;collection&amp;lt;/code&amp;gt; contains standard classes for maps, queues, trees and sets.&lt;br /&gt;
* &amp;lt;code&amp;gt;commandLineParser&amp;lt;/code&amp;gt; contains support for parsing command line options.&lt;br /&gt;
* &amp;lt;code&amp;gt;communications&amp;lt;/code&amp;gt; contains support for pipes and synchronous sockets.&lt;br /&gt;
* &amp;lt;code&amp;gt;console&amp;lt;/code&amp;gt; provides console I/O.&lt;br /&gt;
* &amp;lt;code&amp;gt;cryptography&amp;lt;/code&amp;gt; provides support for encryption and decryption, hashing, and also base64 encoding.&lt;br /&gt;
* &amp;lt;code&amp;gt;dataType&amp;lt;/code&amp;gt; contains support for disjoint sets.&lt;br /&gt;
* &amp;lt;code&amp;gt;environment&amp;lt;/code&amp;gt; provides support for manipulating environment variables.&lt;br /&gt;
* &amp;lt;code&amp;gt;event&amp;lt;/code&amp;gt; provides fully general purpose event message passing with variable numbers of parameters.&lt;br /&gt;
* &amp;lt;code&amp;gt;exception&amp;lt;/code&amp;gt; holds the basic exception classes.&lt;br /&gt;
* &amp;lt;code&amp;gt;fileSystem&amp;lt;/code&amp;gt; contains file operations.&lt;br /&gt;
* &amp;lt;code&amp;gt;gui&amp;lt;/code&amp;gt; contains GUI support.&lt;br /&gt;
* &amp;lt;code&amp;gt;guid&amp;lt;/code&amp;gt; provides support for manipulating Globally Unique IDs (GUIDs)&lt;br /&gt;
* &amp;lt;code&amp;gt;hash&amp;lt;/code&amp;gt; provides incremental hashing.&lt;br /&gt;
* &amp;lt;code&amp;gt;htmlHelp&amp;lt;/code&amp;gt; provides an interface to the Microsoft HTML Help engine, as used to display the Library Reference.&lt;br /&gt;
* &amp;lt;code&amp;gt;InternetExplorer&amp;lt;/code&amp;gt; contains classes for interfacing with web browsers.&lt;br /&gt;
* &amp;lt;code&amp;gt;list&amp;lt;/code&amp;gt; contains standard list manipulation predicates.&lt;br /&gt;
* &amp;lt;code&amp;gt;log&amp;lt;/code&amp;gt; provides support for logging to the console, databases, streams, or files.&lt;br /&gt;
* &amp;lt;code&amp;gt;math&amp;lt;/code&amp;gt; contains standard math operations.&lt;br /&gt;
* &amp;lt;code&amp;gt;memory&amp;lt;/code&amp;gt; allows direct C-style manipulation of system memory.&lt;br /&gt;
* &amp;lt;code&amp;gt;multiThread&amp;lt;/code&amp;gt; provides support for multithreaded applications.&lt;br /&gt;
* &amp;lt;code&amp;gt;namedValue&amp;lt;/code&amp;gt; contains support for lists of named values.&lt;br /&gt;
* &amp;lt;code&amp;gt;ODBC&amp;lt;/code&amp;gt; provides connections to ODBC databases.&lt;br /&gt;
* &amp;lt;code&amp;gt;pie&amp;lt;/code&amp;gt; contains the Prolog Inference Engine.&lt;br /&gt;
* &amp;lt;code&amp;gt;presenter&amp;lt;/code&amp;gt; contains support for [[Presenters]].&lt;br /&gt;
* &amp;lt;code&amp;gt;printing&amp;lt;/code&amp;gt; provides support for print jobs.&lt;br /&gt;
* &amp;lt;code&amp;gt;profile&amp;lt;/code&amp;gt; provides support for execution profiling.&lt;br /&gt;
* &amp;lt;code&amp;gt;programControl&amp;lt;/code&amp;gt; allows direct control over the program&amp;#039;s execution flow.&lt;br /&gt;
* &amp;lt;code&amp;gt;reflection&amp;lt;/code&amp;gt; provides support for reflection of defined predicates.&lt;br /&gt;
* &amp;lt;code&amp;gt;regEx&amp;lt;/code&amp;gt; provides support for regular expression matching.&lt;br /&gt;
* &amp;lt;code&amp;gt;registry&amp;lt;/code&amp;gt; provides support for manipulating the Windows registry.&lt;br /&gt;
* &amp;lt;code&amp;gt;service&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;serviceImplementation&amp;lt;/code&amp;gt; provide support for remotely executed services.&lt;br /&gt;
* &amp;lt;code&amp;gt;shellDDEServer&amp;lt;/code&amp;gt; provides connection with Windows Explorer (the file browser, distinct from Internet Explorer)&lt;br /&gt;
* &amp;lt;code&amp;gt;smapi&amp;lt;/code&amp;gt; provides an interface to Windows&amp;#039; SMAPI interface.&lt;br /&gt;
* &amp;lt;code&amp;gt;std&amp;lt;/code&amp;gt; provides predicates for looping, likely used together with &amp;lt;code&amp;gt;foreach&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;stream&amp;lt;/code&amp;gt; provides generic stream support.&lt;br /&gt;
* &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;string8&amp;lt;/code&amp;gt; provide support for Unicode and ASCII strings respectively.&lt;br /&gt;
* &amp;lt;code&amp;gt;syntax&amp;lt;/code&amp;gt; contains predicates supporting the [[LALR Parser Generator]].&lt;br /&gt;
* &amp;lt;code&amp;gt;systemTray&amp;lt;/code&amp;gt; provides support for the Windows System Tray.&lt;br /&gt;
* &amp;lt;code&amp;gt;templateExpander&amp;lt;/code&amp;gt; provides support for defining output templates.&lt;br /&gt;
* &amp;lt;code&amp;gt;testSupport&amp;lt;/code&amp;gt; provides support for automated testing.&lt;br /&gt;
* &amp;lt;code&amp;gt;time&amp;lt;/code&amp;gt; contains date/time handling.&lt;br /&gt;
* &amp;lt;code&amp;gt;timingStatistics&amp;lt;/code&amp;gt; provides code for timing sections of the program.&lt;br /&gt;
* &amp;lt;code&amp;gt;vpi&amp;lt;/code&amp;gt; provides further GUI support.&lt;br /&gt;
* &amp;lt;code&amp;gt;watchDirectory&amp;lt;/code&amp;gt; allows a file system directory to be watched for changes.&lt;br /&gt;
* &amp;lt;code&amp;gt;web&amp;lt;/code&amp;gt; contains support for XHTML, XML, JSON and MIME, an HTTP client and an interface to CGI.&lt;br /&gt;
* &amp;lt;Code&amp;gt;windowsApi&amp;lt;/code&amp;gt; contains predicates for directly calling the Windows API.&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Main/3rd/frameBoxText&amp;diff=4623</id>
		<title>Main/3rd/frameBoxText</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Main/3rd/frameBoxText&amp;diff=4623"/>
		<updated>2019-05-13T21:40:42Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== 3rd party packages and add-ons ==&lt;br /&gt;
&lt;br /&gt;
The wiki has a name space dedicated to [[3rd:Main Page|3rd party packages and add-on&amp;#039;s]].&lt;br /&gt;
[[Category:Main Page]]&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Main/help/frameBoxText&amp;diff=4622</id>
		<title>Main/help/frameBoxText</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Main/help/frameBoxText&amp;diff=4622"/>
		<updated>2019-05-13T21:40:31Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Wiki software and help ===&lt;br /&gt;
&lt;br /&gt;
The wiki is based on [https://www.mediawiki.org/wiki/MediaWiki MediaWiki] software, which is also used for [https://www.wikipedia.org/ Wikipedia].  If you need help with the wiki itself and cannot find it here, you may search in:&lt;br /&gt;
*[https://www.mediawiki.org/wiki/Help:Contents MediaWiki help pages]&lt;br /&gt;
*[https://en.wikipedia.org/wiki/Help:Contents Wikipedea help pages].&lt;br /&gt;
&lt;br /&gt;
[[Category:Main Page]]&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Main/content/frameBoxText&amp;diff=4621</id>
		<title>Main/content/frameBoxText</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Main/content/frameBoxText&amp;diff=4621"/>
		<updated>2019-05-13T21:40:11Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Content ==&lt;br /&gt;
&lt;br /&gt;
If you are new to Visual Prolog you may start with [[Getting Started]].&lt;br /&gt;
&lt;br /&gt;
Also check out the Visual Prolog [[:Category:Tutorials|Tutorials]] and the books:&lt;br /&gt;
* &amp;#039;&amp;#039;[[A Beginners Guide to Visual Prolog]]&amp;#039;&amp;#039; by &amp;#039;&amp;#039;Thomas W. de Boer&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;[[Visual Prolog for Tyros]]&amp;#039;&amp;#039; by &amp;#039;&amp;#039;Eduardo Costa&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The [[Language Reference]] is also on the wiki, as are instructions for looking up the [[Library Reference]] within Visual Prolog itself.&lt;br /&gt;
&lt;br /&gt;
[[Category:Main Page]]&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Main/contribute/frameBoxText&amp;diff=4620</id>
		<title>Main/contribute/frameBoxText</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Main/contribute/frameBoxText&amp;diff=4620"/>
		<updated>2019-05-13T21:38:46Z</updated>

		<summary type="html">&lt;p&gt;Mark Green: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Contribution ==&lt;br /&gt;
&lt;br /&gt;
To contribute to this wiki, send an e-mail to [mailto:support@visual.prolog.com support@visual.prolog.com] to get an account on the wiki.&lt;br /&gt;
&lt;br /&gt;
Automatic account creation has been closed due to misuse.&lt;br /&gt;
&lt;br /&gt;
[[Category:Main Page]]&lt;/div&gt;</summary>
		<author><name>Mark Green</name></author>
	</entry>
</feed>