<?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=Elizabeth+Safro</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=Elizabeth+Safro"/>
	<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Special:Contributions/Elizabeth_Safro"/>
	<updated>2026-04-09T16:06:14Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Fundamental_Prolog_Part_1&amp;diff=2517</id>
		<title>Fundamental Prolog Part 1</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Fundamental_Prolog_Part_1&amp;diff=2517"/>
		<updated>2011-02-24T11:56:52Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* PIE: Prolog Inference Engine */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FundamentalPrologNavbar}}&lt;br /&gt;
&lt;br /&gt;
In this &amp;#039;&amp;#039;&amp;#039;Prolog tutorial&amp;#039;&amp;#039;&amp;#039; you will learn about the very fundamental ideas of Prolog language programming.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog is object oriented, strictly typed and mode checked.&lt;br /&gt;
You will of course have to master all this to write Visual Prolog programs.&lt;br /&gt;
But in this tutorial we will focus on the &amp;#039;&amp;#039;core&amp;#039;&amp;#039; of the code, i.e. the Prolog code when disregarding classes, types and modes.&lt;br /&gt;
&lt;br /&gt;
For this purpose we will use the PIE example that is included in the Visual Prolog distribution.&lt;br /&gt;
&lt;br /&gt;
PIE is a &amp;quot;classical&amp;quot; Prolog interpreter, by using this you can learn and experiment with Prolog without at all being concerned with classes, types, etc.&lt;br /&gt;
&lt;br /&gt;
== Horn Clause Logic ==&lt;br /&gt;
&lt;br /&gt;
Visual Prolog and other Prolog language dialects are based on Horn Clause logic.&lt;br /&gt;
Horn Clause logic is a formal system for reasoning about things and the way they relate to each other.&lt;br /&gt;
&lt;br /&gt;
In natural language I can express a statement like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;John is the father of Bill.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here I have two &amp;quot;things&amp;quot;: John and Bill, and a &amp;quot;relation&amp;quot; between these, namely that one is the father of the other.&lt;br /&gt;
In Horn Clause Logic I can formalize this statement in the following way:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;father(&amp;quot;Bill&amp;quot;, &amp;quot;John&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
father is a predicate/relation taking two arguments, where the second is the father of the first.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Notice&amp;#039;&amp;#039;&amp;#039; that &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;I &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;have chosen that the &amp;#039;&amp;#039;&amp;#039;second&amp;#039;&amp;#039;&amp;#039; person should be the father of the &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
I might as well have chosen it the other way around:  The order of the arguments is the choice of the &amp;quot;designer&amp;quot; of the formalization.&lt;br /&gt;
However, once you have chosen, you must be consistent.&lt;br /&gt;
So in &amp;#039;&amp;#039;&amp;#039;my&amp;#039;&amp;#039;&amp;#039; formalization the father must &amp;#039;&amp;#039;&amp;#039;always&amp;#039;&amp;#039;&amp;#039; be the second person.&lt;br /&gt;
&lt;br /&gt;
I have chosen to represent the persons by their names (which are string literals).&lt;br /&gt;
In a more complex world this would not be sufficient because many people have same name.&lt;br /&gt;
But for now we will be content with this simple formalization.&lt;br /&gt;
&lt;br /&gt;
With formalizations like the one above I can state any kind of family relation between any persons.&lt;br /&gt;
But for this to become really interesting I will also have to formalize &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;rules&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;X is the grandfather of Z, if X is the father of Y and Y is the father of Z&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;vp&amp;gt;X&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;Y&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;Z&amp;lt;/vp&amp;gt; are persons.&lt;br /&gt;
In Horn Clause Logic I can formalize this rule like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;grandFather(Person, GrandFather) :-&lt;br /&gt;
    father(Person, Father), father(Father, GrandFather).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
I have chosen to use &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;variable&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; names that help understanding better than &amp;lt;vp&amp;gt;X&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;Y&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;Z&amp;lt;/vp&amp;gt;.&lt;br /&gt;
I have also introduced a predicate for the grandfather relation.&lt;br /&gt;
Again I have chosen that the grandfather should be the second argument.&lt;br /&gt;
It is wise to be consistent like that, i.e. that the arguments of the different predicates follow some common principle.&lt;br /&gt;
When reading rules you should interpret :- as &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; and the comma that separates the relations as &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
Statements like &amp;quot;John is the father of Bill&amp;quot; are called &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;facts&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, while statements like &amp;quot;&amp;lt;vp&amp;gt;X&amp;lt;/vp&amp;gt; is the grandfather of &amp;lt;vp&amp;gt;Z&amp;lt;/vp&amp;gt;, if &amp;lt;vp&amp;gt;X&amp;lt;/vp&amp;gt; is the father of &amp;lt;vp&amp;gt;Y&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;Y&amp;lt;/vp&amp;gt; is the father of &amp;lt;vp&amp;gt;Z&amp;lt;/vp&amp;gt;&amp;quot; are called &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;rules&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
With facts and rules we are ready to formulate theories.&lt;br /&gt;
A &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;theory&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; is a collection of facts and rules.&lt;br /&gt;
Let me state a little theory:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;father(&amp;quot;Bill&amp;quot;, &amp;quot;John&amp;quot;).&lt;br /&gt;
father(&amp;quot;Pam&amp;quot;, &amp;quot;Bill&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
grandFather(Person, GrandFather) :-&lt;br /&gt;
    father(Person, Father),&lt;br /&gt;
    father(Father, GrandFather).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The purpose of the theory is to answer questions like these:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;Is John the father of Sue?&lt;br /&gt;
Who is the father of Pam?&lt;br /&gt;
Is John the grandfather of Pam?&lt;br /&gt;
...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such questions are called goals.&lt;br /&gt;
And they can be formalized like this (respectively):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(&amp;quot;Sue&amp;quot;, &amp;quot;John&amp;quot;).&lt;br /&gt;
?- father(&amp;quot;Pam&amp;quot;, X).&lt;br /&gt;
?- grandFather(&amp;quot;Pam&amp;quot;, &amp;quot;John&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Such questions are called &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;goal clauses&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; or simply &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;goals&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
Together &amp;#039;&amp;#039;facts&amp;#039;&amp;#039;, &amp;#039;&amp;#039;rules&amp;#039;&amp;#039; and &amp;#039;&amp;#039;goals&amp;#039;&amp;#039; are called Horn clauses, hence the name Horn Clause Logic.&lt;br /&gt;
&lt;br /&gt;
Some goals like the first and last are answered with a simple &amp;#039;&amp;#039;yes&amp;#039;&amp;#039; or &amp;#039;&amp;#039;no&amp;#039;&amp;#039;.&lt;br /&gt;
For other goals like the second we seek a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;solution&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, like &amp;lt;vp&amp;gt;X = &amp;quot;Bill&amp;quot;&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Some goals may even have many solutions.&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(X, Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
has two solutions:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;X = &amp;quot;Bill&amp;quot;, Y = &amp;quot;John&amp;quot;.&lt;br /&gt;
X = &amp;quot;Pam&amp;quot;, Y = &amp;quot;Bill&amp;quot;.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A Prolog program is a theory and a goal.&lt;br /&gt;
When the program starts it tries to find a solution to the goal in the theory.&lt;br /&gt;
&lt;br /&gt;
== PIE: Prolog Inference Engine ==&lt;br /&gt;
&lt;br /&gt;
Now we will try the little example above in PIE, the Prolog Inference Engine that comes with Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
Before we start you should install and build the PIE example.&lt;br /&gt;
&lt;br /&gt;
*Select &amp;quot;Install Examples&amp;quot; in the Windows start menu (&amp;#039;&amp;#039;&amp;#039;Start -&amp;gt; Visual Prolog -&amp;gt; Install Examples&amp;#039;&amp;#039;&amp;#039;).&lt;br /&gt;
*Open the PIE project in the IDE and &amp;#039;&amp;#039;&amp;#039;run&amp;#039;&amp;#039;&amp;#039; the program, as it is described in the [[Environment Overview]].&lt;br /&gt;
&lt;br /&gt;
When the program starts it will look like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Fundamental_Prolog_1_PIE.png|Prolog Inference Engine]]&lt;br /&gt;
&lt;br /&gt;
Select &amp;#039;&amp;#039;&amp;#039;File -&amp;gt; New&amp;#039;&amp;#039;&amp;#039; and enter the father and grandFather clauses above:&lt;br /&gt;
&lt;br /&gt;
[[Image:Fundamental_Prolog_1_GrandFather.png|Grand Father example]]&lt;br /&gt;
&lt;br /&gt;
While the editor window is active choose &amp;#039;&amp;#039;&amp;#039;Engine -&amp;gt; Reconsult&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
This will load the file into the engine.&lt;br /&gt;
In the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Dialog&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; window you should receive a message like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;Reconsulted from: ....\pie\Exe\FILE4.PRO&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reconsult loads whatever is in the editor, &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;without&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; saving the contents to the file, if you want to save the contents use &amp;#039;&amp;#039;&amp;#039;File -&amp;gt; Save&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;File -&amp;gt; Consult&amp;#039;&amp;#039;&amp;#039; will load the disc contents of the file regardless of whether the file is opened for editing or not.&lt;br /&gt;
&lt;br /&gt;
Once you have &amp;quot;consulted&amp;quot; the theory, you can use it to answer goals.&lt;br /&gt;
&lt;br /&gt;
On a blank line in the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;Dialog&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; window type a goal (without the &amp;#039;&amp;#039;&amp;#039;?-&amp;#039;&amp;#039;&amp;#039; in front).&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
[[Image:Fundamental_Prolog_1_goal1.png|Typing a goal]]&lt;br /&gt;
&lt;br /&gt;
When the caret is placed at the end of the line, press the &amp;#039;&amp;#039;&amp;#039;Enter&amp;#039;&amp;#039;&amp;#039; key on your keyboard.&lt;br /&gt;
PIE will now consider the text from the beginning of the line to the caret as a goal to execute.&lt;br /&gt;
You should see a result like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Fundamental_Prolog_1_goal2.png|Goal result]]&lt;br /&gt;
&lt;br /&gt;
== Extending the family theory ==&lt;br /&gt;
&lt;br /&gt;
It is straight forward to extend the family theory above with predicates like mother and grandMother.&lt;br /&gt;
You should try that yourself.&lt;br /&gt;
You should also add more persons.&lt;br /&gt;
I suggest that you use persons from your own family, because that makes it lot easier to validate, whether some person is indeed the grandMother of some other person, etc.&lt;br /&gt;
&lt;br /&gt;
Given mother and father we can also define a parent predicate.&lt;br /&gt;
You are a parent if you are a mother; you are also a parent if you are a father.&lt;br /&gt;
Therefore we can define parent using two clauses like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;parent(Person, Parent) :- mother(Person, Parent).&lt;br /&gt;
parent(Person, Parent) :- father(Person, Parent).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first rule reads (recall that the second argument corresponds to the predicate name):&lt;br /&gt;
&lt;br /&gt;
Parent is the parent of Person, if Parent is the mother of Person&lt;br /&gt;
&lt;br /&gt;
You can also define the parent relation using semicolon &amp;quot;;&amp;quot; which means or, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;parent(Person, Parent) :-&lt;br /&gt;
    mother(Person, Parent);&lt;br /&gt;
    father(Person, Parent).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This rule reads:&lt;br /&gt;
&lt;br /&gt;
Parent is the parent of Person, if Parent is the mother of Person &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;or&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; Parent is the father of Person&lt;br /&gt;
&lt;br /&gt;
I will however advise you to use semicolon as little as possible (or actually not at all).&lt;br /&gt;
There are several reasons for this:&lt;br /&gt;
&lt;br /&gt;
*The typographical difference &amp;quot;,&amp;quot; and &amp;quot;;&amp;quot; is very small, but the semantic difference is rather big.  &amp;quot;;&amp;quot; is often a source of confusion, since it is easily misinterpreted as &amp;quot;,&amp;quot;, especially when it is on the end of a long line.&lt;br /&gt;
*Visual Prolog only allows to use semicolon on the outermost level (PIE will allow arbitrarily deep nesting).&lt;br /&gt;
&lt;br /&gt;
Try creating a sibling predicate! Did that give problems?&lt;br /&gt;
&lt;br /&gt;
You might find that siblings are found &amp;#039;&amp;#039;&amp;#039;twice&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
At least if you say: Two persons are siblings if they have same mother, two persons are also siblings if they have same father.&lt;br /&gt;
I.e. if you have rules like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;sibling(Person, Sibling) :- mother(Person, Mother), mother(Sibling, Mother).&lt;br /&gt;
sibling(Person, Sibling) :- father(Person, Father), father(Sibling, Father).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first rule reads:&lt;br /&gt;
&lt;br /&gt;
Sibling is the sibling of Person, if Mother is the mother of Person &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;and&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; Mother is the mother of Sibling&lt;br /&gt;
&lt;br /&gt;
The reason that you receive siblings twice is that most siblings both have same father and mother, and therefore they fulfill both requirements above.&lt;br /&gt;
And therefore they are found twice.&lt;br /&gt;
&lt;br /&gt;
We shall not deal with this problem now; currently we will just accept that some rules give too many results.&lt;br /&gt;
&lt;br /&gt;
A fullBlodedSibling predicate does not have the same problem, because it will require that both the father and the mother are the same:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;fullBlodedSibling(Person, Sibling) :-&lt;br /&gt;
    mother(Person, Mother),&lt;br /&gt;
    mother(Sibling, Mother),&lt;br /&gt;
    father(Person, Father),&lt;br /&gt;
    father(Sibling, Father).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Prolog is a Programming Language ==&lt;br /&gt;
&lt;br /&gt;
From the description so far you might think that Prolog is an expert system, rather than a programming language.&lt;br /&gt;
And indeed Prolog can be used as an expert system, but it is designed to be a programming language.&lt;br /&gt;
&lt;br /&gt;
We miss two important ingredients to turn Horn Clause logic into a programming language:&lt;br /&gt;
&lt;br /&gt;
*Rigid search order/program control&lt;br /&gt;
*Side effects&lt;br /&gt;
&lt;br /&gt;
== Program Control ==&lt;br /&gt;
&lt;br /&gt;
When you try to find a solution to a goal like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(X, Y).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can do it in many ways.&lt;br /&gt;
For example, you might just consider at the second fact in the theory and then you have a solution.&lt;br /&gt;
&lt;br /&gt;
But Prolog does not use a &amp;quot;random&amp;quot; search strategy, instead it always use the same strategy.&lt;br /&gt;
The system maintains a &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;current goal&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, which is always solved from &amp;#039;&amp;#039;&amp;#039;left to right&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
I.e. if the current goal is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- grandFather(X, Y), mother(Y, Z).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then the system will always try to solve the sub-goal grandFather(X, Y) before it solves mother(Y, Z), if the first (i.e. left-most) sub-goal cannot be solved then there is no solution to the overall problem and then the second sub-goal is not tried at all.&lt;br /&gt;
&lt;br /&gt;
When solving a particular sub-goal, the facts and rules are always tried from &amp;#039;&amp;#039;&amp;#039;top to bottom&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
When a sub-goal is solved by using a rule, the right hand side replaces the sub-goal in the current goal.&lt;br /&gt;
&lt;br /&gt;
I.e. if the current goal is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- grandFather(X, Y), mother(Y, Z).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And we are using the rule&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;grandFather(Person, GrandFather) :- father(Person, Father), father(Father, GrandFather).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
to solve the first sub-goal, then the resulting current goal will be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(X, Father), father(Father, Y), mother(Y, Z).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that some variables in the rule have been replaced by variables from the sub-goal.&lt;br /&gt;
I will explain this in details later.&lt;br /&gt;
&lt;br /&gt;
Given this evaluation strategy you can interpret clauses much more &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;procedural&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;. Consider this rule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;grandFather(Person, GrandFather) :- father(Person, Father), father(Father, GrandFather).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Given the strict evaluation we can read this rule like this:&lt;br /&gt;
&lt;br /&gt;
To solve grandFather(Person, GrandFather) &amp;#039;&amp;#039;&amp;#039;first&amp;#039;&amp;#039;&amp;#039; solve father(Person, Father) &amp;#039;&amp;#039;&amp;#039;and then &amp;#039;&amp;#039;&amp;#039;solve father(Father, GrandFather).&lt;br /&gt;
&lt;br /&gt;
Or even like this:&lt;br /&gt;
&lt;br /&gt;
When grandFather(Person, GrandFather) is &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;called&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, first &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;call&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; father(Person, Father) and then &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;call&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; father(Father, GrandFather).&lt;br /&gt;
&lt;br /&gt;
With this &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;procedural &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;reading you can see that predicates correspond to procedures/subroutines in other languages.&lt;br /&gt;
The main difference is that a Prolog predicate can return several solutions to a single invocation or even &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;fail&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
This will be discussed in details in the next sections.&lt;br /&gt;
&lt;br /&gt;
== Failing ==&lt;br /&gt;
&lt;br /&gt;
A predicate invocation might not have any solution in the theory.&lt;br /&gt;
For example calling parent(&amp;quot;Hans&amp;quot;, X) has no solution as there are no parent facts or rules that applies to &amp;quot;Hans&amp;quot;.&lt;br /&gt;
We say that the predicate call &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;fails&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
If the goal fails then there is simply no solution to the goal in the theory.&lt;br /&gt;
The next section will explain how failing is treated in the general case, i.e. when it is not the goal that fails.&lt;br /&gt;
&lt;br /&gt;
== Backtracking ==&lt;br /&gt;
&lt;br /&gt;
In the procedural interpretation of a Prolog program &amp;quot;or&amp;quot; is treated in a rather special way.&lt;br /&gt;
Consider the clause&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;parent(Person, Parent) :-&lt;br /&gt;
    mother(Person, Parent);&lt;br /&gt;
    father(Person, Parent).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the logical reading we interpreted this clause as:&lt;br /&gt;
&lt;br /&gt;
Parent&lt;br /&gt;
is the parent of Person &amp;#039;&amp;#039;&amp;#039;if&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Parent is the mother of&lt;br /&gt;
Person &amp;#039;&amp;#039;&amp;#039;or&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Parent is the father of Person.&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;or&amp;quot; introduces two possible solutions to an invocation of the parent predicate.&lt;br /&gt;
Prolog handles such multiple choices by first trying one choice and later (if necessary) &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;backtracking&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to the next alternative choice, etc.&lt;br /&gt;
&lt;br /&gt;
During the execution of a program a lot of alternative choices (known as &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;backtrack points&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;) might exist from earlier predicate calls.&lt;br /&gt;
If some predicate call fails, then we will backtrack to the last backtrack point we met and try the alternative solution instead.&lt;br /&gt;
If no further backtrack points exists then the overall goal has failed, meaning that there was no solution to it.&lt;br /&gt;
&lt;br /&gt;
With this in mind we can interpret the clause above like this:&lt;br /&gt;
&lt;br /&gt;
When parent(Person, Parent) is called first record a backtrack point to the second alternative solution (i.e. to the call to father(Person, Parent)) and then call mother(Person, Parent)&lt;br /&gt;
&lt;br /&gt;
A predicate that has several classes behave in a similar fashion.&lt;br /&gt;
Consider the clauses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;father(&amp;quot;Bill&amp;quot;, &amp;quot;John&amp;quot;).&lt;br /&gt;
father(&amp;quot;Pam&amp;quot;, &amp;quot;Bill&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When father is invoked we first record a backtrack point to the second clause, and then try the first clause.&lt;br /&gt;
&lt;br /&gt;
If there are three or more choices we still only create one backtrack point, but that backtrack point will start by creating another backtrack point.&lt;br /&gt;
Consider the clauses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;father(&amp;quot;Bill&amp;quot;, &amp;quot;John&amp;quot;).&lt;br /&gt;
father(&amp;quot;Pam&amp;quot;, &amp;quot;Bill&amp;quot;).&lt;br /&gt;
father(&amp;quot;Jack&amp;quot;, &amp;quot;Bill&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When father is invoked, we first record a backtrack point.&lt;br /&gt;
And then we try the first clause.&lt;br /&gt;
The backtrack point we create points to some code, which will itself create a backtrack point (namely to the third clause) and then try the second clause.&lt;br /&gt;
Thus all choice points have only two choices, but one choice might itself involve a choice.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Example&amp;#039;&amp;#039;&amp;#039; To illustrate how programs are executed I will go through an example in details.&lt;br /&gt;
Consider these clauses:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;mother(&amp;quot;Bill&amp;quot;, &amp;quot;Lisa&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
father(&amp;quot;Bill&amp;quot;, &amp;quot;John&amp;quot;).&lt;br /&gt;
father(&amp;quot;Pam&amp;quot;, &amp;quot;Bill&amp;quot;).&lt;br /&gt;
father(&amp;quot;Jack&amp;quot;, &amp;quot;Bill&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
parent(Person, Parent) :-&lt;br /&gt;
    mother(Person, Parent);&lt;br /&gt;
    father(Person, Parent).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then consider this goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(AA, BB), parent(BB, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This goal states that we want to find three persons AA, BB and CC, such that BB is the father of AA and CC is a parent of BB.&lt;br /&gt;
&lt;br /&gt;
As mentioned we always solve the goals from left to right, so first we call the father predicate.&lt;br /&gt;
When executing the father predicate we first create a backtrack point to the second clause, and then use the first clause.&lt;br /&gt;
&lt;br /&gt;
Using the first clause we find that AA is &amp;quot;Bill&amp;quot; and BB is &amp;quot;John&amp;quot;.&lt;br /&gt;
So we now effectively have the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- parent(&amp;quot;John&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we call parent, which gives the following goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- mother(&amp;quot;John&amp;quot;, CC); father(&amp;quot;John&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will notice that the variables in the clause have been replaced with the actual parameters of the call (exactly like when you call subroutines in other languages).&lt;br /&gt;
&lt;br /&gt;
The current goal is an &amp;quot;or&amp;quot; goal, so we create a backtrack point to the second alternative and pursuit the first.&lt;br /&gt;
We now have two active backtrack points, one to the second alternative in the parent clause, and one to the second clause in the father predicate.&lt;br /&gt;
&lt;br /&gt;
After the creation of this backtrack point we are left with the following goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- mother(&amp;quot;John&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So we call the mother predicate.&lt;br /&gt;
The mother predicate fails when the first argument is &amp;quot;John&amp;quot; (because it has no clauses that match this value in the first argument).&lt;br /&gt;
&lt;br /&gt;
In case of failure we backtrack to the last backtrack point we created.&lt;br /&gt;
So we will now pursuit the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(&amp;quot;John&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calling father this time, we will again first create a backtrack point to the second father clause.&lt;br /&gt;
&lt;br /&gt;
Recall that we also still have a backtrack point to the second clause of the father predicate, which corresponds to the first call in the original goal.&lt;br /&gt;
&lt;br /&gt;
We now try to use the first father clause on the goal, but that fails, because the first arguments do not match (i.e. &amp;quot;John&amp;quot; does not match &amp;quot;Bill&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
Therefore we backtrack to the second clause, but before we use this clause we create a backtrack point to the third clause.&lt;br /&gt;
&lt;br /&gt;
The second clause also fails, since &amp;quot;John&amp;quot; does not match &amp;quot;Pam&amp;quot;, so we backtrack to the third clause.&lt;br /&gt;
This also fails, since &amp;quot;John&amp;quot; does not match &amp;quot;Jack&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Now we must backtrack all the way back to the first father call in the original goal; here we created a backtrack point to the second father clause.&lt;br /&gt;
&lt;br /&gt;
Using the second clause we find that AA is &amp;quot;Pam&amp;quot; and BB is &amp;quot;Bill&amp;quot;.&lt;br /&gt;
So we now effectively have the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- parent(&amp;quot;Bill&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When calling parent we now get:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- mother(&amp;quot;Bill&amp;quot;, CC); father(&amp;quot;Bill&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again we create a backtrack point to the second alternative and pursuit the first:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- mother(&amp;quot;Bill&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This goal succeeds with CC being &amp;quot;Lisa&amp;quot;.&lt;br /&gt;
So now we have found a solution to the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AA = &amp;quot;Pam&amp;quot;, BB = &amp;quot;Bill&amp;quot;, CC = &amp;quot;Lisa&amp;quot;.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When trying to find additional solutions we backtrack to the last backtrack point, which was the second alternative in the parent predicate:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- father(&amp;quot;Bill&amp;quot;, CC).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This goal will also succeed with CC being &amp;quot;John&amp;quot;.&lt;br /&gt;
So now we have found one more solution to the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AA = &amp;quot;Pam&amp;quot;, BB = &amp;quot;Bill&amp;quot;, CC = &amp;quot;John&amp;quot;.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we try to find more solutions we will find:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AA = &amp;quot;Jack&amp;quot;, BB = &amp;quot;Bill&amp;quot;, CC = &amp;quot;John&amp;quot;.&lt;br /&gt;
AA = &amp;quot;Jack&amp;quot;, BB = &amp;quot;Bill&amp;quot;, CC = &amp;quot;Lisa&amp;quot;.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After that we will experience that everything will eventually fail leaving no more backtrack points.&lt;br /&gt;
So all in all there are four solutions to the goal.&lt;br /&gt;
&lt;br /&gt;
== Improving the Family Theory ==&lt;br /&gt;
&lt;br /&gt;
If you continue to work with the family relation above, you will probably find out that you have problems with relations like &amp;#039;&amp;#039;brother&amp;#039;&amp;#039; and &amp;#039;&amp;#039;sister&amp;#039;&amp;#039;, because it is rather difficult to determine the sex of a person (unless the person is a father or mother).&lt;br /&gt;
&lt;br /&gt;
The problem is that we have chosen a bad way to formalize our theory.&lt;br /&gt;
&lt;br /&gt;
The reason that we arrived at this theory is because we started by considering the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;relations&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; between the entities.&lt;br /&gt;
If we instead first focus on the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;entities&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, then the result will naturally become different.&lt;br /&gt;
&lt;br /&gt;
Our main entities are persons.&lt;br /&gt;
Persons have a name (in this simple context will still assume that the name identifies the person, in a real scale program this would not be true).&lt;br /&gt;
Persons also have a sex.&lt;br /&gt;
Persons have many other properties, but none of them have any interest in our context.&lt;br /&gt;
&lt;br /&gt;
Therefore we define a person predicate, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;person(&amp;quot;Bill&amp;quot;, &amp;quot;male&amp;quot;).&lt;br /&gt;
person(&amp;quot;John&amp;quot;, &amp;quot;male&amp;quot;).&lt;br /&gt;
person(&amp;quot;Pam&amp;quot;, &amp;quot;female&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first argument of the person predicate is the name and the second is the sex.&lt;br /&gt;
&lt;br /&gt;
Instead of using mother and father as facts, I will choose to have parent as facts and mother and father as rules:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;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;).&lt;br /&gt;
&lt;br /&gt;
father(Person, Father) :- parent(Person, Father), person(Father, &amp;quot;male&amp;quot;).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notice that when father is a &amp;quot;derived&amp;quot; relation like this, it is impossible to state &amp;#039;&amp;#039;female&amp;#039;&amp;#039; fathers.&lt;br /&gt;
So this theory also has a built-in consistency on this point, which did not exist in the other formulation.&lt;br /&gt;
&lt;br /&gt;
== Recursion ==&lt;br /&gt;
&lt;br /&gt;
Most family relations are easy to construct given the principles above.&lt;br /&gt;
But when it comes to &amp;quot;infinite&amp;quot; relations like &amp;#039;&amp;#039;ancestor&amp;#039;&amp;#039; we need something more.&lt;br /&gt;
If we follow the principle above, we should define ancestor like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ancestor(Person, Ancestor) :- parent(Person, Ancestor).&lt;br /&gt;
ancestor(Person, Ancestor) :- parent(Person, P1), parent(P1, Ancestor).&lt;br /&gt;
ancestor(Person, Ancestor) :- parent(Person, P1), parent(P1, P2), parent(P2, Ancestor).&lt;br /&gt;
...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The main problem is that this line of clauses never ends.&lt;br /&gt;
The way to overcome this problem is to use a recursive definition, i.e. a definition that is defined in terms of itself. like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;ancestor(Person, Ancestor) :- parent(Person, Ancestor).&lt;br /&gt;
ancestor(Person, Ancestor) :- parent(Person, P1), ancestor(P1, Ancestor).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This declaration states that a parent is an ancestor, and that an ancestor to a parent is also an ancestor.&lt;br /&gt;
&lt;br /&gt;
If you are not already familiar with recursion you might find it tricky (in several senses).&lt;br /&gt;
Recursion is however fundamental to Prolog programming.&lt;br /&gt;
You will use it again and again, so eventually you will find it completely natural.&lt;br /&gt;
&lt;br /&gt;
Let us try to execute an ancestor goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- ancestor(&amp;quot;Pam&amp;quot;, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We create a backtrack point to the second ancestor clause, and then we use the first, finding the new goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- parent(&amp;quot;Pam&amp;quot;, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This succeeds with the solution:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AA = &amp;quot;Bill&amp;quot;.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then we try to find another solution by using our backtrack point to the second ancestor clause.&lt;br /&gt;
This gives the new&lt;br /&gt;
goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- parent(&amp;quot;Pam&amp;quot;, P1), ancestor(P1, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again &amp;quot;Bill&amp;quot; is the&lt;br /&gt;
parent of &amp;quot;Pam&amp;quot;,&lt;br /&gt;
so we find P1=&lt;br /&gt;
&amp;quot;Bill&amp;quot;, and then we have the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- ancestor(&amp;quot;Bill&amp;quot;, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To solve this goal we first create a backtrack point to the second ancestor clause and then we use the first one.&lt;br /&gt;
This gives the following goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- parent(&amp;quot;Bill&amp;quot;, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This goal has the gives the solution:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;AA = &amp;quot;John&amp;quot;.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So now we have found two ancestors of &amp;quot;Pam&amp;quot;:&lt;br /&gt;
* &amp;quot;Bill&amp;quot; and&lt;br /&gt;
* &amp;quot;John&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
If we use the backtrack point to the second ancestor clause we get the following goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- parent(&amp;quot;Bill&amp;quot;, P1), ancestor(P1, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here we will again find that&lt;br /&gt;
&amp;quot;John&amp;quot; is the parent of&lt;br /&gt;
&amp;quot;Bill&amp;quot;, and thus that&lt;br /&gt;
P1 is&lt;br /&gt;
&amp;quot;John&amp;quot;.&lt;br /&gt;
This gives the goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- ancestor(&amp;quot;John&amp;quot;, AA).&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you pursuit this goal you will find that it will not have any solution.&lt;br /&gt;
So all in all we can only find two ancestors of&lt;br /&gt;
&amp;quot;Pam&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Recursion is very powerful but it can also be a bit hard to control.&lt;br /&gt;
Two things are important to remember:&lt;br /&gt;
&lt;br /&gt;
*the recursion must make progress&lt;br /&gt;
*the recursion must terminate&lt;br /&gt;
&lt;br /&gt;
In the code above the first clause ensures that the recursion can terminate, because this clause is not recursive (i.e. it makes no calls to the predicate itself).&lt;br /&gt;
&lt;br /&gt;
In the second clause (which is recursive) we have made sure, that we go one ancestor-step further back, before making the recursive call.&lt;br /&gt;
I.e. we have ensured that we make some progress in the problem.&lt;br /&gt;
&lt;br /&gt;
== Side Effects ==&lt;br /&gt;
&lt;br /&gt;
Besides a strict evaluation order Prolog also has side effects.&lt;br /&gt;
For example Prolog has a number of predefined predicates for reading and writing.&lt;br /&gt;
&lt;br /&gt;
The following goal will write the found ancestors of &amp;quot;Pam&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- ancestor(&amp;quot;Pam&amp;quot;, AA), write(&amp;quot;Ancestor of Pam : &amp;quot;, AA), nl().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ancestor call will find an ancestor of &amp;quot;Pam&amp;quot; in AA.&lt;br /&gt;
&lt;br /&gt;
The write call will write the string literal &amp;quot;Ancestor of Pam : &amp;quot;, and then it will write the value of AA.&lt;br /&gt;
&lt;br /&gt;
The nl call will shift to a new line in the output.&lt;br /&gt;
&lt;br /&gt;
When running programs in PIE, PIE itself writes solutions, so the overall effect is that your output and PIE&amp;#039;s own output will be mixed.&lt;br /&gt;
This might of course not be desirable.&lt;br /&gt;
&lt;br /&gt;
A very simple way to avoid PIE&amp;#039;s own output is to make sure that the goal has no solutions.&lt;br /&gt;
Consider the following goal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;?- ancestor(&amp;quot;Pam&amp;quot;, AA), write(&amp;quot;Ancestor of Pam : &amp;quot;, AA), nl(), fail.&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
fail is a predefined call that always fails (i.e. it has no solutions).&lt;br /&gt;
&lt;br /&gt;
The first three predicate calls have exactly the same effect as above: an ancestor is found (if such one exists, of course) and then it is written.&lt;br /&gt;
But then we call fail this will of course &amp;#039;&amp;#039; fail&amp;#039;&amp;#039;. Therefore we must pursuit a backtrack point if we have any.&lt;br /&gt;
&lt;br /&gt;
When pursuing this backtrack point, we will find another ancestor (if such one exists) and write that, and then we will fail again.&lt;br /&gt;
And so forth.&lt;br /&gt;
&lt;br /&gt;
So, we will find and write all ancestors. and eventually there will be no more backtrack points, and then the complete goal will fail.&lt;br /&gt;
&lt;br /&gt;
There are a few important points to notice here:&lt;br /&gt;
&lt;br /&gt;
*The goal itself did not have a single solution, but nevertheless all the solutions we wanted was given as side effects.&lt;br /&gt;
*Side effects in failing computations are not undone.&lt;br /&gt;
&lt;br /&gt;
These points are two sides of the same thing.&lt;br /&gt;
But they represent different level of optimism.&lt;br /&gt;
The first optimistically states some possibilities that you can use, while the second is more pessimistic and states that you should be aware about using side effects, because they are not undone even if the current goal does not lead to any solution.&lt;br /&gt;
&lt;br /&gt;
Anybody, who learns Prolog, will sooner or later experience unexpected output coming from failing parts of the program.&lt;br /&gt;
Perhaps, this little advice can help you:  Separate the &amp;quot;calculating&amp;quot; code from the code that performs input/output.&lt;br /&gt;
&lt;br /&gt;
In our examples above all the stated predicate are &amp;quot;calculating&amp;quot; predicates.&lt;br /&gt;
They all calculate some family relation.&lt;br /&gt;
If you need to write out, for example, &amp;quot;parents&amp;quot;, create a separate predicate for writing parents and let that predicate call the &amp;quot;calculating&amp;quot; parent predicate.&lt;br /&gt;
&lt;br /&gt;
== Conclusion ==&lt;br /&gt;
&lt;br /&gt;
In this tutorial we have looked at some of the basic features of Prolog.&lt;br /&gt;
You have seen &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;facts&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;, &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;rules&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;goals&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You learned about the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;execution strategy &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;for Prolog including the notion of &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;failing&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;backtracking&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You have also seen that backtracking can give &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;many results &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;to a single question.&lt;br /&gt;
And finally you have been introduced to &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;side effects&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[Fundamental Prolog Part 2]]&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Video_Tutorials_about_Visual_Prolog&amp;diff=2481</id>
		<title>Video Tutorials about Visual Prolog</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Video_Tutorials_about_Visual_Prolog&amp;diff=2481"/>
		<updated>2010-11-26T11:54:36Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Visual Prolog Video Tutorials Provided by PDC ==&lt;br /&gt;
&lt;br /&gt;
* PDC [http://www.visual-prolog.com/video/HelloWorld/default.htm Hello World! Video Tutorial] covers basic IDE functionality&lt;br /&gt;
* PDC [http://www.visual-prolog.com/video/IntelliSpeed/default.htm IntelliSpeed Video Tutorial] demonstrates the context sensitive keyboard accelerator and browse system.&lt;br /&gt;
* PDC [http://www.visual-prolog.com/video/formdemo/default.htm FormDemo Video Tutorial] demonstrates how to create a form and link it to a menu item.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Visual Prolog Video Tutorials Created by Visual Prolog Users==&lt;br /&gt;
&lt;br /&gt;
If you have created a useful video on Visual Prolog, let Visual Prolog community know about it. &lt;br /&gt;
&lt;br /&gt;
* Nestor Sanchez Espinobarros [http://www.youtube.com/watch?v=quHLpnyZTpU Instalacion Visual Prolog] on YouTube. (In Spanish)&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2478</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2478"/>
		<updated>2010-11-12T13:33:08Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7301 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
* The following GUI controls have been added to the Personal Edition: listViewControl, tabControl, and treeViewControl.&lt;br /&gt;
&lt;br /&gt;
=== Build 7302 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7302&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7302 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
=== Build 7303 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7303&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7303 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros&amp;diff=2451</id>
		<title>Visual Prolog for Tyros</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros&amp;diff=2451"/>
		<updated>2010-09-15T17:31:42Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;Visual Prolog for Tyros&amp;#039;&amp;#039; is a comprehensive book written by &amp;#039;&amp;#039;Eduardo Costa&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is a good starting point to study Visual Prolog. And it might be used by teachers for education.&lt;br /&gt;
&lt;br /&gt;
The latest edition of the book is &amp;quot;Visual Prolog 7.3 for Tyros&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The book includes a number of examples illustrating different features of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Contents ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;I Savoir-faire&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# Introduction&lt;br /&gt;
# Forms&lt;br /&gt;
# Mouse events&lt;br /&gt;
# Less Figures&lt;br /&gt;
# Horn Clauses&lt;br /&gt;
# Console Applications&lt;br /&gt;
# Grammars&lt;br /&gt;
# Painting&lt;br /&gt;
# Data types&lt;br /&gt;
# How to solve it in Prolog&lt;br /&gt;
# Facts&lt;br /&gt;
# Classes and Objects&lt;br /&gt;
# Giuseppe Peano&lt;br /&gt;
# L-Systems&lt;br /&gt;
# Games&lt;br /&gt;
# Animation&lt;br /&gt;
# Text Editor&lt;br /&gt;
# Printing&lt;br /&gt;
# Tab forms and other goodies&lt;br /&gt;
# Bugs&lt;br /&gt;
# A Data Base Manager&lt;br /&gt;
# Books and articles&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;II Artificial Intelligence&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# Search&lt;br /&gt;
# Neural Networks&lt;br /&gt;
# Alpha Beta Pruning&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
;Visual Prolog 7.3&lt;br /&gt;
* [http://download.pdc.dk/vip/73/books/tyros/tyros73.pdf Visual Prolog 7.3 for Tyros] (September, 2010, PDF).&lt;br /&gt;
* [http://download.pdc.dk/vip/73/books/tyros/tyros73.zip Examples 7.3] (zip).&lt;br /&gt;
&lt;br /&gt;
;Visual Prolog 7.2&lt;br /&gt;
* [http://download.pdc.dk/vip/72/books/tyros/tyros72.pdf Visual Prolog 7.2 for Tyros] (January, 2009, PDF).&lt;br /&gt;
* [http://download.pdc.dk/vip/72/books/tyros/tyros72.zip Examples 7.2] (zip).&lt;br /&gt;
&lt;br /&gt;
;Visual Prolog 7.1&lt;br /&gt;
* [http://download.pdc.dk/vip/71/Costas-Tyros.pdf Visual Prolog 7.1 for Tyros] (PDF). &lt;br /&gt;
* [http://download.pdc.dk/vip/71/Costas-Tyros.zip Examples 7.1] (zip).&lt;br /&gt;
&lt;br /&gt;
=== Translations ===&lt;br /&gt;
&lt;br /&gt;
* [http://wikiru.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros Russian]&lt;br /&gt;
* [[Visual Prolog for Tyros in Chinese|Chinese]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Visual Prolog для чайников]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros&amp;diff=2450</id>
		<title>Visual Prolog for Tyros</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros&amp;diff=2450"/>
		<updated>2010-09-15T16:53:32Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;Visual Prolog for Tyros&amp;#039;&amp;#039; is a comprehensive book written by &amp;#039;&amp;#039;Eduardo Costa&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is a good starting point to study Visual Prolog. And it might be used by teachers for education.&lt;br /&gt;
&lt;br /&gt;
The book includes a number of examples illustrating different features of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
The latest edition of the book is &amp;quot;Visual Prolog 7.3 for Tyros&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Contents ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;I Savoir-faire&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# Introduction&lt;br /&gt;
# Forms&lt;br /&gt;
# Mouse events&lt;br /&gt;
# Less Figures&lt;br /&gt;
# Horn Clauses&lt;br /&gt;
# Console Applications&lt;br /&gt;
# Grammars&lt;br /&gt;
# Painting&lt;br /&gt;
# Data types&lt;br /&gt;
# How to solve it in Prolog&lt;br /&gt;
# Facts&lt;br /&gt;
# Classes and Objects&lt;br /&gt;
# Giuseppe Peano&lt;br /&gt;
# L-Systems&lt;br /&gt;
# Games&lt;br /&gt;
# Animation&lt;br /&gt;
# Text Editor&lt;br /&gt;
# Printing&lt;br /&gt;
# Tab forms and other goodies&lt;br /&gt;
# Bugs&lt;br /&gt;
# A Data Base Manager&lt;br /&gt;
# Books and articles&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;II Artificial Intelligence&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# Search&lt;br /&gt;
# Neural Networks&lt;br /&gt;
# Alpha Beta Pruning&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
;Visual Prolog 7.3&lt;br /&gt;
* [http://download.pdc.dk/vip/73/books/tyros/tyros73.pdf Visual Prolog 7.3 for Tyros] (September, 2010, PDF).&lt;br /&gt;
* [http://download.pdc.dk/vip/73/books/tyros/tyros73.zip Examples 7.3] (zip).&lt;br /&gt;
&lt;br /&gt;
;Visual Prolog 7.2&lt;br /&gt;
* [http://download.pdc.dk/vip/72/books/tyros/tyros72.pdf Visual Prolog 7.2 for Tyros] (January, 2009, PDF).&lt;br /&gt;
* [http://download.pdc.dk/vip/72/books/tyros/tyros72.zip Examples 7.2] (zip).&lt;br /&gt;
&lt;br /&gt;
;Visual Prolog 7.1&lt;br /&gt;
* [http://download.pdc.dk/vip/71/Costas-Tyros.pdf Visual Prolog 7.1 for Tyros] (PDF). &lt;br /&gt;
* [http://download.pdc.dk/vip/71/Costas-Tyros.zip Examples 7.1] (zip).&lt;br /&gt;
&lt;br /&gt;
=== Translations ===&lt;br /&gt;
&lt;br /&gt;
* [http://wikiru.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros Russian]&lt;br /&gt;
* [[Visual Prolog for Tyros in Chinese|Chinese]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Visual Prolog для чайников]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros&amp;diff=2449</id>
		<title>Visual Prolog for Tyros</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros&amp;diff=2449"/>
		<updated>2010-09-10T10:09:17Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;Visual Prolog for Tyros&amp;#039;&amp;#039; is a comprehensive book written by &amp;#039;&amp;#039;Eduardo Costa&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is a good starting point to study Visual Prolog. And it might be used by teachers for education.&lt;br /&gt;
&lt;br /&gt;
The book includes a number of examples illustrating different features of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
=== Contents ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;I Savoir-faire&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
# Introduction&lt;br /&gt;
# Forms&lt;br /&gt;
# Mouse events&lt;br /&gt;
# Less Figures&lt;br /&gt;
# Horn Clauses&lt;br /&gt;
# Console Applications&lt;br /&gt;
# Grammars&lt;br /&gt;
# Painting&lt;br /&gt;
# Data types&lt;br /&gt;
# How to solve it in Prolog&lt;br /&gt;
# Facts&lt;br /&gt;
# Classes and Objects&lt;br /&gt;
# Giuseppe Peano&lt;br /&gt;
# L-Systems&lt;br /&gt;
# Games&lt;br /&gt;
# Animation&lt;br /&gt;
# Text Editor&lt;br /&gt;
# Printing&lt;br /&gt;
# Tab forms and other goodies&lt;br /&gt;
# Bugs&lt;br /&gt;
# A Data Base Manager&lt;br /&gt;
# Books and articles&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;II Artificial Intelligence&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol start=&amp;quot;23&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Search&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Neural Networks&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Alpha Beta Pruning&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Download ===&lt;br /&gt;
;Visual Prolog 7.3&lt;br /&gt;
* [http://download.pdc.dk/vip/73/books/tyros/tyros73.pdf Visual Prolog 7.3 for Tyros] (September, 2010, PDF).&lt;br /&gt;
* [http://download.pdc.dk/vip/73/books/tyros/tyros73.zip Examples 7.3] (zip).&lt;br /&gt;
&lt;br /&gt;
;Visual Prolog 7.2&lt;br /&gt;
* [http://download.pdc.dk/vip/72/books/tyros/tyros72.pdf Visual Prolog 7.2 for Tyros] (January, 2009, PDF).&lt;br /&gt;
* [http://download.pdc.dk/vip/72/books/tyros/tyros72.zip Examples 7.2] (zip).&lt;br /&gt;
&lt;br /&gt;
;Visual Prolog 7.1&lt;br /&gt;
* [http://download.pdc.dk/vip/71/Costas-Tyros.pdf Visual Prolog 7.1 for Tyros] (PDF). &lt;br /&gt;
* [http://download.pdc.dk/vip/71/Costas-Tyros.zip Examples 7.1] (zip).&lt;br /&gt;
&lt;br /&gt;
=== Translations ===&lt;br /&gt;
&lt;br /&gt;
* [http://wikiru.visual-prolog.com/index.php?title=Visual_Prolog_for_Tyros Russian]&lt;br /&gt;
* [[Visual Prolog for Tyros in Chinese|Chinese]]&lt;br /&gt;
&lt;br /&gt;
[[ru:Visual Prolog для чайников]]&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Frequently_Asked_Questions&amp;diff=2438</id>
		<title>Frequently Asked Questions</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Frequently_Asked_Questions&amp;diff=2438"/>
		<updated>2010-06-24T12:52:44Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: What project management software is used for Visual Prolog development?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FAQ&lt;br /&gt;
|Q=How to get started with Visual Prolog?&lt;br /&gt;
|A=Start by reading [[Getting Started]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Which platforms does Visual Prolog support?&lt;br /&gt;
|A=Visual Prolog  supports  Windows 7/Vista/XP/2000. &lt;br /&gt;
&lt;br /&gt;
There are no plans for supporting Linux or any Unix platforms.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=What are the differences between Visual Prolog and traditional Prolog?&lt;br /&gt;
|A=The differences between traditional Prolog and Visual Prolog can be broadly divided into these categories:&lt;br /&gt;
&lt;br /&gt;
#Program structure differences&amp;lt;br&amp;gt;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 Goal that the program has to seek using specific keywords. &lt;br /&gt;
#File considerations&amp;lt;br&amp;gt;Visual Prolog gives various facilities to organize the structure of the program into different kinds of files. &lt;br /&gt;
#Scope access issues&amp;lt;br&amp;gt;A Visual Prolog program can pick up functionality developed in other modules using a concept called scope identification. &lt;br /&gt;
#Object orientation&amp;lt;br&amp;gt;A Visual Prolog program can be written as an object-oriented program, using classic object oriented features. &lt;br /&gt;
See [[Fundamental Visual Prolog]] tutorial for details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Where can I find examples and demos?&lt;br /&gt;
|A=Visual Prolog examples and demos are available in several ways:&lt;br /&gt;
&lt;br /&gt;
Visual Prolog distribution includes sample projects  that can be installed from the Integrated Development Environment (IDE) with the help of the command Help |  Install Examples.&lt;br /&gt;
  &lt;br /&gt;
This site contains examples provided by members of Visual Prolog Community.&lt;br /&gt;
  &lt;br /&gt;
Visual Prolog [[:Category:Tutorials|tutorials]] discuss examples that might be downloaded. You will be suggested to download source files while reading these tutorials.&lt;br /&gt;
For example, the tutorials [[Fundamental Prolog Part 1]], [[Fundamental Prolog Part 2]], and [[Fundamental Visual Prolog]] discuss a well-known prolog family example in details. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=How do I make and use COM objects?&lt;br /&gt;
|A=Visual Prolog is COM compatible, the IDE can generate necessary wrap classes and interfaces based on a type library supplied with the COM object.&lt;br /&gt;
}}&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=What project management software is used for Visual Prolog development?&lt;br /&gt;
|A=[http://www.agile-team.com/ Agile-Team&amp;lt;sup&amp;gt;TM&amp;lt;/sup&amp;gt; project management tool] is being used for Visual Prolog development during  many years. &lt;br /&gt;
Usage of this project management software makes Visual Prolog especially safe and fast developing programming language, because it helps to manage projects, tasks, fix bugs and resolve various development issues, prioritize tasks, provide extensive support of users, etc.&lt;br /&gt;
}}&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Are there any plans for supporting Linux or any Unix platforms?&lt;br /&gt;
|A=There are no plans for supporting Linux or any Unix platforms.&lt;br /&gt;
}}&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Does the current version of Visual Prolog include the Help Maker from Visual Prolog 5.x?&lt;br /&gt;
|A=No. Visual Prolog 5.2 Help Maker provided creating Help systems in WinHelp format (.hlp) that is outdated now.&lt;br /&gt;
&lt;br /&gt;
To create Help systems for Visual Prolog  applications, please, use MS Help Workshop or third-party tools that create Help systems in MS HTML Help format (.chm) or other modern Help formats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Is it possible to use a DLL, created by Visual Prolog, in a Microsoft.NET project?&lt;br /&gt;
|A=Yes. It is possible. Such DLL created by Visual Prolog  should have predicates exported with stdcall calling convention. And VB.NET or C#.NET code should call it in the same manner as invocation of an API function.&lt;br /&gt;
&lt;br /&gt;
You are welcome to download How to Use Visual Prolog DLL from .Net example that creates a Visual Prolog DLL and shows how a program, created by Visual Basic .NET, can call a predicate, exported by this DLL.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Can I use my registration in the Discussion Forum to have Registered Visual Prolog Personal Edition and vice versa?&lt;br /&gt;
|A=No. Registration in the Discussion Forum and registration of Visual Prolog Personal Edition are two different registrations.&lt;br /&gt;
&lt;br /&gt;
To register your Personal Edition you need to use the &amp;#039;&amp;#039;&amp;#039;WEB|Register&amp;#039;&amp;#039;&amp;#039; menu item in the Integrated Development Environment (IDE).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Can I compile my Visual Prolog 5.x program in the current version of Visual Prolog?&lt;br /&gt;
|A=No, the current version of Visual Prolog is not backwards compatible with Visual Prolog 5.x.  The syntax has been changed in certain respects, and all Visual Prolog code must be in classes.  But Visual Prolog  contains backwards-libraries that have almost identical interface and behavior.&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center has released the migration tool that can assist in migrating code from Visual Prolog 5.&lt;br /&gt;
Please see [[Getting Started]] for details.&lt;br /&gt;
}}&lt;br /&gt;
{{FAQ&lt;br /&gt;
|Q=Can I create a Sudoku solver with Visual Prolog?&lt;br /&gt;
|A=Yes, &lt;br /&gt;
Please see the following for details:&lt;br /&gt;
* [http://www.visual-prolog.com/vip/example/pdcExample/sudoku.htm Sudoku Puzzle - an Exercise in Constraint Programming and Visual Prolog 7] by Carsten Kehler Holst (Prolog Development Center);&lt;br /&gt;
&lt;br /&gt;
* [http://www.visual-prolog.com/vip/example/userExample/sudoku_Cumming/sudoku_Cumming.htm Sudoku Example] by Stuart Cumming.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic Information]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2437</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2437"/>
		<updated>2010-06-22T09:39:04Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Build 7302 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7301 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
* The following GUI controls have been added to the Personal Edition: listViewControl, tabControl, and treeViewControl.&lt;br /&gt;
&lt;br /&gt;
=== Build 7302 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7302&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7302 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference&amp;diff=2433</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference&amp;diff=2433"/>
		<updated>2010-06-17T12:41:05Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: Visual Prolog 7.3 Language Reference in Chinese&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|{{PAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
This document describes the syntax and semantics of the Visual Prolog  programming language.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog is a strongly typed object oriented programming language based on the logical programming language Prolog.&lt;br /&gt;
&lt;br /&gt;
A Visual Prolog program consists of a &amp;#039;&amp;#039;goal&amp;#039;&amp;#039; and a number of:&lt;br /&gt;
&lt;br /&gt;
* {{lang|Interfaces|Interfaces}}&lt;br /&gt;
* {{lang|Classes|Class declarations}} and&lt;br /&gt;
* {{lang|Implementations|Class implementations}}&lt;br /&gt;
&lt;br /&gt;
Which contain declarations and definitions of Prolog entities:&lt;br /&gt;
&lt;br /&gt;
* {{lang|Domains|Domains}}&lt;br /&gt;
* {{lang|Constants|Constants}}&lt;br /&gt;
* {{lang|Predicates|Predicates}}&lt;br /&gt;
* {{lang|Properties|Properties}}&lt;br /&gt;
* {{lang|Facts|Fact databases}}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;actual&amp;quot; code of a Visual Prolog is the {{lang|Clauses|clauses}}, which are located in {{lang|Implementations|class implementations}} and which implements {{lang|Predicates|predicates}}.&lt;br /&gt;
&lt;br /&gt;
{{ifLRBook|inBook=|notInBook=&lt;br /&gt;
=== Language Reference in other Languages ===&lt;br /&gt;
[http://download.pdc.dk/vip/73/documentation/LanguageReference_chinese.pdf Visual Prolog 7.3 Language Reference in Chinese (PDF file)]&lt;br /&gt;
&lt;br /&gt;
[http://download.pdc.dk/vip/72/documentation/LanguageReference_chinese.pdf Visual Prolog 7.2 Language Reference in Chinese (PDF file)]&lt;br /&gt;
}}&lt;br /&gt;
== See also ==&lt;br /&gt;
[[Visual Prolog 7.2 Prolog Foundation Classes (PFC) in Chinese]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2398</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2398"/>
		<updated>2010-05-28T09:34:44Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes [http://kb.visual-prolog.com/fixes/fixes7300.htm#7301 several minor bugs].&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
* The following GUI controls have been added to the Personal Edition: listViewControl, tabControl, and treeViewControl.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2397</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2397"/>
		<updated>2010-05-27T15:23:09Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
* The following GUI controls have been added to the Personal Edition: listViewControl, tabControl, and treeViewControl.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2396</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2396"/>
		<updated>2010-05-27T12:38:49Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Coming Soon: Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference&amp;diff=2379</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference&amp;diff=2379"/>
		<updated>2010-05-26T12:21:37Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|{{PAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
This document describes the syntax and semantics of the Visual Prolog  programming language.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog is a strongly typed object oriented programming language based on the logical programming language Prolog.&lt;br /&gt;
&lt;br /&gt;
A Visual Prolog program consists of a &amp;#039;&amp;#039;goal&amp;#039;&amp;#039; and a number of:&lt;br /&gt;
&lt;br /&gt;
* {{lang|Interfaces|Interfaces}}&lt;br /&gt;
* {{lang|Classes|Class declarations}} and&lt;br /&gt;
* {{lang|Implementations|Class implementations}}&lt;br /&gt;
&lt;br /&gt;
Which contain declarations and definitions of Prolog entities:&lt;br /&gt;
&lt;br /&gt;
* {{lang|Domains|Domains}}&lt;br /&gt;
* {{lang|Constants|Constants}}&lt;br /&gt;
* {{lang|Predicates|Predicates}}&lt;br /&gt;
* {{lang|Properties|Properties}}&lt;br /&gt;
* {{lang|Facts|Fact databases}}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;actual&amp;quot; code of a Visual Prolog is the {{lang|Clauses|clauses}}, which are located in {{lang|Implementations|class implementations}} and which implements {{lang|Predicates|predicates}}.&lt;br /&gt;
&lt;br /&gt;
{{ifLRBook|inBook=|notInBook=&lt;br /&gt;
=== Language Reference in other Languages ===&lt;br /&gt;
&lt;br /&gt;
[http://download.pdc.dk/vip/72/documentation/LanguageReference_chinese.pdf Visual Prolog 7.2 Language Reference in Chinese (PDF file)]&lt;br /&gt;
}}&lt;br /&gt;
== See also ==&lt;br /&gt;
[[Visual Prolog 7.2 Prolog Foundation Classes (PFC) in Chinese]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference&amp;diff=2378</id>
		<title>Language Reference</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference&amp;diff=2378"/>
		<updated>2010-05-26T12:20:09Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{languageReferenceNavbar|{{PAGENAME}}}}&lt;br /&gt;
&lt;br /&gt;
This document describes the syntax and semantics of the Visual Prolog  programming language.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog is a strongly typed object oriented programming language based on the logical programming language Prolog.&lt;br /&gt;
&lt;br /&gt;
A Visual Prolog program consists of a &amp;#039;&amp;#039;goal&amp;#039;&amp;#039; and a number of:&lt;br /&gt;
&lt;br /&gt;
* {{lang|Interfaces|Interfaces}}&lt;br /&gt;
* {{lang|Classes|Class declarations}} and&lt;br /&gt;
* {{lang|Implementations|Class implementations}}&lt;br /&gt;
&lt;br /&gt;
Which contain declarations and definitions of Prolog entities:&lt;br /&gt;
&lt;br /&gt;
* {{lang|Domains|Domains}}&lt;br /&gt;
* {{lang|Constants|Constants}}&lt;br /&gt;
* {{lang|Predicates|Predicates}}&lt;br /&gt;
* {{lang|Properties|Properties}}&lt;br /&gt;
* {{lang|Facts|Fact databases}}&lt;br /&gt;
&lt;br /&gt;
The &amp;quot;actual&amp;quot; code of a Visual Prolog is the {{lang|Clauses|clauses}}, which are located in {{lang|Implementations|class implementations}} and which implements {{lang|Predicates|predicates}}.&lt;br /&gt;
&lt;br /&gt;
{{ifLRBook|inBook=|notInBook=&lt;br /&gt;
=== Language Reference in other Languages ===&lt;br /&gt;
&lt;br /&gt;
[http://download.pdc.dk/vip/72/documentation/LanguageReference_chinese.pdf Visual Prolog 7.2 Language Reference in Chinese (PDF file)]&lt;br /&gt;
}}&lt;br /&gt;
== See also ==&lt;br /&gt;
[[Visual Prolog 7.2 Prolog Foundation Classes (PFC) in Chinese  (zipped .chm file)]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Prolog_Foundation_Classes_(PFC)_in_Chinese&amp;diff=2374</id>
		<title>Prolog Foundation Classes (PFC) in Chinese</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Prolog_Foundation_Classes_(PFC)_in_Chinese&amp;diff=2374"/>
		<updated>2010-05-25T16:55:06Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: English-Chinese description of PFC translation&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Prolog Foundation Classes (PFC ) is the set of classes and interfaces that constitutes the foundation for writing various kinds of applications and software components in Visual Prolog. &lt;br /&gt;
An English version of PFC is provided as a part of Visual Prolog Help system.&lt;br /&gt;
&lt;br /&gt;
Yi Ding from China has kindly translated Visual Prolog 7.2 PFC to Chinese.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
译者说明&lt;br /&gt;
&lt;br /&gt;
这里译出的内容，取自Visual Prlog 7.2安装目录下的\pfc目录及其子目录内的.htm文件，与帮助文件（vip.chm）中的PFC说明部分完全一样。\pfc\5xVIP是有关如何将5.x版本程序转换适应新版本软件的内容，没有译。&lt;br /&gt;
&lt;br /&gt;
Prolog 基础类（PFC）中的重点内容，对初学者来说是vpi和gui。仔细阅读这些内容，对理解 Visual Prolog 的编程方式有很大帮助，至少译者自己有这样的体会和感受。&lt;br /&gt;
&lt;br /&gt;
译者的计算机语言基础知识不是很好，面向对象编程的知识更差。对翻译对象的理解不足，加上英文也不怎么样，译的东西肯定不会好。因此，为方便对照和发现差错，每篇译文后面都附了原文。译者的初衷是为了自己学习 Visual Prolog 时的方便，所以译了这些内容。既然花了些时间有了这个译本，想想放出来对一些 Visual Prolog 的初学者可能多少有些帮助。或有方家不吝赐教，那就更是幸甚啦！&lt;br /&gt;
&lt;br /&gt;
乙丁  its2u@qq.com&lt;br /&gt;
&lt;br /&gt;
2010年5月&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
[http://download.pdc.dk/vip/72/documentation/VPI_PFC_Chinese.zip 下载 Prolog 基础类（PFC）]&lt;br /&gt;
&lt;br /&gt;
[[Category:Chinese]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=A_Guide_to_Artificial_Intelligence_with_Visual_Prolog._Addendum_for_Version_7.3&amp;diff=2368</id>
		<title>A Guide to Artificial Intelligence with Visual Prolog. Addendum for Version 7.3</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=A_Guide_to_Artificial_Intelligence_with_Visual_Prolog._Addendum_for_Version_7.3&amp;diff=2368"/>
		<updated>2010-05-24T17:18:21Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: New page: &amp;#039;&amp;#039;Written by Randall Scott&amp;#039;&amp;#039;  For both the Sample Program in the Book and the slightly enhanced version of the Sample Program provided by the Supplemental Package, you will need to do the ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;Written by Randall Scott&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
For both the Sample Program in the Book and the slightly enhanced version of the Sample Program provided by the Supplemental Package, you will need to do the following for the Programs to work with the new Visual Prolog version 7.3, if they were already constructed with version 7.2. If on the other hand, you start constructing them with the version 7.3, I don’t think you’ll encounter any problems. This sounds reasonable if you construct all the program yourself entirely, which should happen as you read the book and construct &amp;#039;&amp;#039;&amp;#039;GAMegaLotto&amp;#039;&amp;#039;&amp;#039;. However, this probably is not true regarding &amp;#039;&amp;#039;&amp;#039;LottoV2&amp;#039;&amp;#039;&amp;#039; in the Supplemental Package.&lt;br /&gt;
&lt;br /&gt;
# Copy all of the programs from their version 7.2 directories to new directories for version 7.3. Then delete all the ‘OBJ’ files from the ‘OBJ’ directory. Also delete all the files in the EXE directories except the ‘Stats.txt’, ‘ImportInstruction.hlp’, and the ‘MegaMillionsHistory.csv’ files.&lt;br /&gt;
# Assuming these Programs were constructed with Version 7.2, Open Visual Prolog version 7.3 and then open the Sample Projects one at a time and make the following changes. Keep in mind Version 7.3 will be opening ‘.prj’ files created by version 7.2.&lt;br /&gt;
&lt;br /&gt;
===a. For GAMegaLotto:===&lt;br /&gt;
&lt;br /&gt;
(1) Try to Build the GAMegaLotto Project and ‘Add’ requested and required items suggested:&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;vp&amp;gt;#include @&amp;quot;pfc\vpi\vpi.ph&amp;quot; in Lotto.pack&amp;lt;/vp&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Required items&amp;#039;&amp;#039;&amp;lt;nowiki&amp;gt;: As you can see a lot of new PFC items were built into version 7.3&amp;lt;/nowiki&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(Note: you could just click on ‘Add All’)&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* collection.pack&lt;br /&gt;
* mapM_redBlack.pack&lt;br /&gt;
* setM_redBlack.pack&lt;br /&gt;
* monitorQueue.pack&lt;br /&gt;
* mapMSupport.pack&lt;br /&gt;
* collectionMsupport.pack&lt;br /&gt;
* redBlackTree.pack&lt;br /&gt;
* redBlackSet.pack&lt;br /&gt;
&lt;br /&gt;
(2) Since a lot of new items have now been added to your project, you’ll see a few Errors and warnings.&lt;br /&gt;
&lt;br /&gt;
(3) Select ‘Build All’ to force a total rebuild. This will clear all the errors and just leave warnings and the program should work as it did with Version 7.2.&lt;br /&gt;
&lt;br /&gt;
===b. For LottoV2:===&lt;br /&gt;
&lt;br /&gt;
(1) Try to ‘Build’ the LottoV2 Project and ‘Add’ all required items suggested:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Required items&amp;#039;&amp;#039;: Again, a lot of new PFC items were built into version 7.3&lt;br /&gt;
&lt;br /&gt;
(Note: again you could just click on ‘Add All’)&lt;br /&gt;
&lt;br /&gt;
* collection.pack&lt;br /&gt;
* mapM_redBlack.pack&lt;br /&gt;
* setM_redBlack.pack&lt;br /&gt;
* monitorQueue.pack&lt;br /&gt;
* mapMSupport.pack&lt;br /&gt;
* collectionMsupport.pack&lt;br /&gt;
* redBlackTree.pack&lt;br /&gt;
* redBlackSet.pack&lt;br /&gt;
&lt;br /&gt;
(2) A lot of new items have now been added to your project as before, and this time you’ll see only 5 Errors; now select ‘Build All’ to force a total rebuild. This will include these items in the second Build, unfortunately this will not clear the errors - a little more work will need to be done to force visibility of the PFC ‘vpi’ that Visual Prolog 7.3 detected and suggested adding in GAMegaLotto, but not for LottoV2. The solution I chose was as follows:&lt;br /&gt;
&lt;br /&gt;
(a) Open the ‘Numbers.pro’ Class Implementation file and make the following change:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Before:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;vp&amp;gt;open core, vpiDomains      &amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;After:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
     &amp;lt;vp&amp;gt;open core, vpiDomains, vpi&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
(b) Save the ‘Numbers.pro’ Class Implementation file then select ‘Build’ again. Select ‘Add’ #include @&amp;quot;pfc\vpi\vpi.ph&amp;quot; when requested; which will now get it included as needed; and when finished rebuilding, the program should now work as it did with Version 7.2.&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2367</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2367"/>
		<updated>2010-05-24T17:03:25Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Coming soon: Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Coming Soon: Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2366</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2366"/>
		<updated>2010-05-24T12:27:42Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Build 7301 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== Updates ==&lt;br /&gt;
&lt;br /&gt;
=== Coming soon: Build 7301 ===&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Visual Prolog 7.3, Build 7301&amp;#039;&amp;#039;&amp;#039; fixes several minor bugs.&lt;br /&gt;
&lt;br /&gt;
The following new feature has been implemented:  &lt;br /&gt;
&lt;br /&gt;
* Built-in predicate &amp;lt;vp&amp;gt;toEllipsis : (any* Terms) -&amp;gt; ...&amp;lt;/vp&amp;gt;&lt;br /&gt;
* The PFC &amp;#039;&amp;#039;&amp;#039;treeControl&amp;#039;&amp;#039;&amp;#039; has been extended with key down and drag-and-drop handling&lt;br /&gt;
* The set of examples for &amp;#039;&amp;#039;&amp;#039;Personal Edition&amp;#039;&amp;#039;&amp;#039; was extended&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2328</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2328"/>
		<updated>2010-05-13T17:29:38Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &amp;quot;{{Preliminary Documentation}}&amp;quot; has been removed&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is now possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2312</id>
		<title>Visual Prolog 7.3 New Features</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_New_Features&amp;diff=2312"/>
		<updated>2010-04-29T16:14:27Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Others */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
== Language ==&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces and Classes ===&lt;br /&gt;
&lt;br /&gt;
See {{lang|Generic Interfaces and Classes|Generic Interfaces and Classes}}.&lt;br /&gt;
&lt;br /&gt;
=== Conversion to Generic Type ===&lt;br /&gt;
&lt;br /&gt;
=== Monitors ===&lt;br /&gt;
&lt;br /&gt;
{{lang|Monitors|Monitors}} with {{lang2|Monitors|Guards|guards}}&lt;br /&gt;
&lt;br /&gt;
=== Must Unify Operator ===&lt;br /&gt;
&lt;br /&gt;
New operator == (must-unify)&lt;br /&gt;
&lt;br /&gt;
=== Universal term type  ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;any&amp;lt;/vp&amp;gt; and the predicate &amp;lt;vp&amp;gt;toAny/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== 64 bit preparation ===&lt;br /&gt;
&lt;br /&gt;
Preparations for supporting 64bit systems: built-in types &amp;lt;vp&amp;gt;integerNative&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;unsignedNative&amp;lt;/vp&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Foreign language interfacing ===&lt;br /&gt;
&lt;br /&gt;
Native interfaces support (attributes):&lt;br /&gt;
* {{lang2|Attributes|inline|inline}}: Inline structures and strings. &lt;br /&gt;
* {{lang2|Attributes|union|union}}: Functor-less unions. &lt;br /&gt;
* {{lang2|Attributes|byVal|byVal}}: Passing parameters by value. &lt;br /&gt;
&lt;br /&gt;
External resolution is default for predicates declared with &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; calling convention.&lt;br /&gt;
* They cannot have clauses&lt;br /&gt;
* explicit externally resolution is only legal when a DLL is stated&lt;br /&gt;
&lt;br /&gt;
=== Other language features ===&lt;br /&gt;
&lt;br /&gt;
* The precedence of unary minus is changed (so that power operator has higher precedence)&lt;br /&gt;
* Extended versions of built-in predicates &amp;lt;vp&amp;gt;toTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;tryToTerm/2-&amp;gt;&amp;lt;/vp&amp;gt; (type as the first parameter).&lt;br /&gt;
* New built-in predicate &amp;lt;vp&amp;gt;fromEllipsis : (...) -&amp;gt; any* Terms&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Runtime distinction between privately and publicly supported interfaces is removed&lt;br /&gt;
&lt;br /&gt;
New attributes&lt;br /&gt;
* {{lang2|Attributes|retired|retired}}&lt;br /&gt;
* {{lang2|Attributes|noDefaultConstructor|noDefaultConstructor}}&lt;br /&gt;
* {{lang2|Attributes|used|used}}&lt;br /&gt;
&lt;br /&gt;
Warnings:&lt;br /&gt;
* Local object predicates which do not use &amp;lt;vp&amp;gt;This&amp;lt;/vp&amp;gt; (and therefore can be declared as class predicates)&lt;br /&gt;
* Unused local constants&lt;br /&gt;
* Condition of foreach statement which has no backtrack point (i.e. mode is not &amp;lt;vp&amp;gt;multi&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;nondeterm&amp;lt;/vp&amp;gt;)&lt;br /&gt;
* &amp;lt;vp&amp;gt;unheckedConversion&amp;lt;/vp&amp;gt;&amp;#039;s that would be illegal on 64 bit platforms (e.g. &amp;lt;vp&amp;gt;pointer&amp;lt;/vp&amp;gt; -&amp;gt; &amp;lt;vp&amp;gt;integer&amp;lt;/vp&amp;gt;)&lt;br /&gt;
&lt;br /&gt;
== IDE ==&lt;br /&gt;
&lt;br /&gt;
=== Project tree ===&lt;br /&gt;
&lt;br /&gt;
The project tree is redesigned and reimplemented.  The functionality is more or less unchanged, but the performance is improved.&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IncludedIn&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;Includes&amp;#039;&amp;#039;&amp;#039; windows has been moved to preview pane of project window.&lt;br /&gt;
&lt;br /&gt;
It is not possible to have several packages with same name in a project (which can make much sense when using namespaces).&lt;br /&gt;
&lt;br /&gt;
=== Browse dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Browse&amp;#039;&amp;#039;&amp;#039; dialog is improved in several smaller respects, including:&lt;br /&gt;
* It automatically jump to the 1st occurrence of search entity on locate&lt;br /&gt;
* The last dialog position is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Find In Files ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Find In Files&amp;#039;&amp;#039;&amp;#039; dialog is improved in several respects, including:&lt;br /&gt;
* result window is reused for subsequent searches&lt;br /&gt;
* F8 button for next match (Shift+F8 - previous)&lt;br /&gt;
* Prolog case sensitive search mode&lt;br /&gt;
* state is saved for next appearence&lt;br /&gt;
&lt;br /&gt;
=== Namespace support ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Namespaces support&amp;#039;&amp;#039;&amp;#039; is improved, so that forms, dialogs, etc can be places in namespaces when created.&lt;br /&gt;
&lt;br /&gt;
=== IntelliSense ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;IntelliSense&amp;#039;&amp;#039;&amp;#039; feature is improved for better overview, speed typing and convenience of work.&lt;br /&gt;
&lt;br /&gt;
=== Tab navigation dialog ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;tab navigation&amp;#039;&amp;#039;&amp;#039; dialog functionality has been extended:&lt;br /&gt;
* use ALT button for filtering [ReadOnly] windows&lt;br /&gt;
* use Del for closing windows&lt;br /&gt;
&lt;br /&gt;
=== Go to Position on Clipboard ===&lt;br /&gt;
&lt;br /&gt;
The &amp;#039;&amp;#039;&amp;#039;Go to Position on Clipboard&amp;#039;&amp;#039;&amp;#039; (Shift+F2) has been extended to accept a complete exception dump.  F8 will go to the next stack entry.&lt;br /&gt;
&lt;br /&gt;
=== Sorting in various windows ===&lt;br /&gt;
&lt;br /&gt;
The Errors Window, the Break points Window, etc. has been extended with sorting capabilities (clicking on the top banner).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Optimal Set of Includes improved&amp;#039;&amp;#039;&amp;#039; (output, local scopes, etc.)&lt;br /&gt;
&lt;br /&gt;
== Debugger ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Highlighting&amp;#039;&amp;#039;&amp;#039; changed values in variable window&lt;br /&gt;
* View of &amp;#039;&amp;#039;&amp;#039;long lists&amp;#039;&amp;#039;&amp;#039; improvement&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; of restarting is improved&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Memory break points&amp;#039;&amp;#039;&amp;#039; and fact access (for some types)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Multi-threaded&amp;#039;&amp;#039;&amp;#039; application debugging is improved (thread names, break points handling)&lt;br /&gt;
* Multi-line &amp;#039;&amp;#039;&amp;#039;tool tips&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== PFC ==&lt;br /&gt;
&lt;br /&gt;
=== New entities ===&lt;br /&gt;
&lt;br /&gt;
* [[Collection library]]&lt;br /&gt;
** Algebraic: &amp;lt;vp&amp;gt;redBlackSet&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;leftistPriorityQueue&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Modifiable: &amp;lt;vp&amp;gt;mapM_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueM_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueM_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setM_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
** Persistent: &amp;lt;vp&amp;gt;mapP_redBlack&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;priorityQueueP_leftist&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;queueP_fact&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;setP_redBlack&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;varM&amp;lt;/vp&amp;gt; modifiable variable&lt;br /&gt;
* &amp;lt;vp&amp;gt;linkControl&amp;lt;/vp&amp;gt; PFC version of the Link common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;richEditControl&amp;lt;/vp&amp;gt; PFC version of the RichEdit common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;treeControl&amp;lt;/vp&amp;gt; PFC model based version of the TreeView common control&lt;br /&gt;
* &amp;lt;vp&amp;gt;gdiplus&amp;lt;/vp&amp;gt; PFC version of GDI+&lt;br /&gt;
* &amp;lt;vp&amp;gt;cryptography&amp;lt;/vp&amp;gt; hash, sha1, md5 &amp;amp; base64&lt;br /&gt;
* &amp;lt;vp&amp;gt;eventSource&amp;lt;/vp&amp;gt; generalization of event notification/listening&lt;br /&gt;
* &amp;lt;vp&amp;gt;monitorQueue&amp;lt;/vp&amp;gt; thread safe queue class based on the monitor facility&lt;br /&gt;
* &amp;lt;vp&amp;gt;reflection&amp;lt;/vp&amp;gt; basic functionalty for code reflection&lt;br /&gt;
* &amp;lt;vp&amp;gt;inputStream_null&amp;lt;/vp&amp;gt; &amp;amp; &amp;lt;vp&amp;gt;outputStream_null&amp;lt;/vp&amp;gt; media-less streams (input is exhausted; outpt throws away)&lt;br /&gt;
* &amp;lt;vp&amp;gt;lZ_fileSystem_native&amp;lt;/vp&amp;gt; Interface to Lempel-Ziv Decompression API functionality&lt;br /&gt;
* &amp;lt;vp&amp;gt;shell_api&amp;lt;/vp&amp;gt; Api level interface to the Windows Shell&lt;br /&gt;
* &amp;lt;vp&amp;gt;winsock2_native&amp;lt;/vp&amp;gt; native bindings to Windows Sockets 2&lt;br /&gt;
&lt;br /&gt;
=== Extensions and improvements ===&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;vp&amp;gt;list&amp;lt;/vp&amp;gt; package:&lt;br /&gt;
** speed: &amp;lt;vp&amp;gt;sort&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;removeDuplicate&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;drop&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;min&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;max&amp;lt;/vp&amp;gt;, etc.)&lt;br /&gt;
** functionality: &amp;lt;vp&amp;gt;isMemberEq&amp;lt;/vp&amp;gt; (and similar predicates) that uses a &amp;lt;vp&amp;gt;determ&amp;lt;/vp&amp;gt; predicate as test&lt;br /&gt;
* &amp;lt;vp&amp;gt;listControl&amp;lt;/vp&amp;gt; with owner-drawing capabilities&lt;br /&gt;
* &amp;lt;vp&amp;gt;uxTheme_native&amp;lt;/vp&amp;gt; extended with the rest of the functions and the constants from vsStyle.h, etc.&lt;br /&gt;
* Add moving listener/responder to &amp;lt;vp&amp;gt;splitTwoControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Add the fraction handling from &amp;lt;vp&amp;gt;format&amp;lt;/vp&amp;gt; to &amp;lt;vp&amp;gt;formatTime&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Speed&amp;#039;&amp;#039;&amp;#039; improvements for: &lt;br /&gt;
** &amp;lt;vp&amp;gt;string&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;fileName&amp;lt;/vp&amp;gt;&lt;br /&gt;
** &amp;lt;vp&amp;gt;listViewControl&amp;lt;/vp&amp;gt;&lt;br /&gt;
* &amp;lt;vp&amp;gt;string::rear/2-&amp;gt;&amp;lt;/vp&amp;gt; returns the rear part of a string&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Math&amp;#039;&amp;#039;&amp;#039; package: predicates &amp;lt;vp&amp;gt;roundToInteger64/1-&amp;gt;&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;roundToUnsigned64/1-&amp;gt;&amp;lt;/vp&amp;gt;&lt;br /&gt;
* Better handling of &amp;#039;&amp;#039;&amp;#039;default button size&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;lt;vp&amp;gt;msXLM_api&amp;lt;/vp&amp;gt; update to version 6.0 of various COMponent classes&lt;br /&gt;
&lt;br /&gt;
== Others ==&lt;br /&gt;
&lt;br /&gt;
* More efficient &amp;#039;&amp;#039;&amp;#039;memory handling&amp;#039;&amp;#039;&amp;#039;; using typed memory allocation for compound terms and internal facts chains&lt;br /&gt;
* Various optimizations for speed and size of generated code&lt;br /&gt;
* New Demo Examples (Commercial Edition only):&lt;br /&gt;
** Parser Generator&lt;br /&gt;
** LZDecompression&lt;br /&gt;
** TreeControlDemo&lt;br /&gt;
* Help on built-in entities&lt;br /&gt;
* VipBuilder: extra option to ignore &amp;lt;vp&amp;gt;#requires&amp;lt;/vp&amp;gt; directives&lt;br /&gt;
* Extend &amp;#039;&amp;#039;&amp;#039;Win32&amp;#039;&amp;#039;&amp;#039; library (with more names from MS libraries).&lt;br /&gt;
* More context to consult exceptions&lt;br /&gt;
* Linker speed improvement&lt;br /&gt;
* Vault Integration updated to version 5.0.1&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
[http://kb.visual-prolog.com/fixes/fixes7300.htm Bugs Fixed in Visual Prolog 7.3]&lt;br /&gt;
&lt;br /&gt;
[[Visual Prolog 7.3 Upgrade Notes]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2302</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2302"/>
		<updated>2010-04-16T13:15:12Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition (CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the messages suggesting adding or removing packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend you reading the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2301</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2301"/>
		<updated>2010-04-16T13:12:53Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.0 &amp;amp; 6.x */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition (CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the messages suggesting adding or removing packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend you reading the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2300</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2300"/>
		<updated>2010-04-16T13:11:36Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition (CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the messages suggesting adding or removing packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2299</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2299"/>
		<updated>2010-04-16T13:09:39Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition (CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message suggesting to add or remove packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2298</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2298"/>
		<updated>2010-04-16T13:09:14Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message suggesting to add or remove packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2297</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2297"/>
		<updated>2010-04-16T13:07:20Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition(CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open a project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message suggesting to add or remove packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2296</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2296"/>
		<updated>2010-04-16T13:06:41Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version of Visual Prolog Commercial Edition(CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message suggesting to add or remove packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2295</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2295"/>
		<updated>2010-04-16T13:04:14Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. &lt;br /&gt;
The new version of Visual Prolog Commercial Edition(CE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
The new version of Visual Prolog Personal Edition (PE) will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3PE&amp;#039;&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
You can remove a previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message suggesting to add or remove packages / modules.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2294</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2294"/>
		<updated>2010-04-15T13:39:36Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
This document describes how to upgrade Visual Prolog projects created by previous versions of Visual Prolog to Visual Prolog 7.3.&lt;br /&gt;
&lt;br /&gt;
If you have problems with upgrading your projects and need additional information, you are welcome to ask questions in [http://discuss.visual-prolog.com/viewforum.php?f=2 Visual Prolog Discussion Forum].&lt;br /&gt;
 &lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2293</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2293"/>
		<updated>2010-04-15T13:23:59Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 5.x */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects to the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2292</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2292"/>
		<updated>2010-04-15T13:23:25Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.0 &amp;amp; 6.x */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Alongside with the actions described in the section &amp;quot;Upgrading Projects from Visual Prolog 7.1 &amp;amp; 7.2&amp;quot;, some additional actions might be required to upgrade projects from the versions earlier than Visual Prolog 7.1.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2291</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2291"/>
		<updated>2010-04-15T13:18:32Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.0 &amp;amp; 6.x */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.3 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.3 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2290</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2290"/>
		<updated>2010-04-15T13:14:23Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading from 7.1 &amp;amp; 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.1 &amp;amp; 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.1 &amp;amp; 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE, it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2288</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2288"/>
		<updated>2010-04-15T12:45:13Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: Visual prolog 7.3 Upgrade Notes moved to Visual Prolog 7.3 Upgrade Notes: Incorrect case&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2287</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2287"/>
		<updated>2010-04-15T12:33:09Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;This topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.1 &amp;amp; 7.2 ==&lt;br /&gt;
&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Note ===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 7.0 &amp;amp; 6.x ==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
== Upgrading from 5.x ==&lt;br /&gt;
&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.3]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Release Notes]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2285</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2285"/>
		<updated>2010-04-14T17:41:01Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;The topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3==&lt;br /&gt;
# By default, the installation of Visual Prolog 7.3 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Note===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.0 and Visual Prolog 6.x to Visual Prolog 7.3==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 5.x==&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.2]]&lt;br /&gt;
* [http://kb.visual-prolog.com/fixes/fixes7201.htm Bugs Fixed in Visual Prolog 7.2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic Information]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2284</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2284"/>
		<updated>2010-04-14T17:37:57Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading Projects from Visual Prolog 7.0 and Visual Prolog 6.x to Visual Prolog 7.2 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;The topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3==&lt;br /&gt;
# By default, the installation of Visual Prolog 7.2 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Note===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.0 and Visual Prolog 6.x to Visual Prolog 7.3==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.3 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 5.x==&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.2]]&lt;br /&gt;
* [http://kb.visual-prolog.com/fixes/fixes7201.htm Bugs Fixed in Visual Prolog 7.2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic Information]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2283</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2283"/>
		<updated>2010-04-14T17:36:59Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;The topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3==&lt;br /&gt;
# By default, the installation of Visual Prolog 7.2 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3CE&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Note===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.0 and Visual Prolog 6.x to Visual Prolog 7.2==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.2 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 5.x==&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.2]]&lt;br /&gt;
* [http://kb.visual-prolog.com/fixes/fixes7201.htm Bugs Fixed in Visual Prolog 7.2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic Information]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2282</id>
		<title>Visual Prolog 7.3 Upgrade Notes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Visual_Prolog_7.3_Upgrade_Notes&amp;diff=2282"/>
		<updated>2010-04-14T16:11:38Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: New page: &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;The topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; ==Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3== # By default, the installation of Visual Prolog 7.2 will not replace any ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;The topic is under construction&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.1 - 7.2 to Visual Prolog 7.3==&lt;br /&gt;
# By default, the installation of Visual Prolog 7.2 will not replace any previously installed versions. The new version will be installed by default to &amp;#039;&amp;#039;&amp;#039;C:\Program Files\Visual Prolog 7.3&amp;#039;&amp;#039;&amp;#039;. You can remove the previous version or continue working with both.&lt;br /&gt;
# Visual Prolog 7.3 projects are backward-compatible with Visual Prolog 7.2 projects.&lt;br /&gt;
# If you are going to use different versions of Visual Prolog installed at one computer, avoid opening projects by double-clicking on prj6 files.&lt;br /&gt;
# Some changes might require automatic updates in Visual Prolog 7.2 projects. Therefore, it is recommended to make the project file (PRJ6) writable before the first build. Also, it is recommended to make copies for all project files first.&lt;br /&gt;
# When your open project in the Visual Prolog 7.3 IDE it will automatically perform necessary updates.&lt;br /&gt;
# After this, it is recommended you rebuild the project with the help of the &amp;#039;&amp;#039;&amp;#039;Build | Rebuild All command&amp;#039;&amp;#039;&amp;#039; and answer &amp;quot;Yes to All&amp;quot; to the message &amp;quot;The new module is required to be added into the project&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
===Note===&lt;br /&gt;
# Depending on Visual Prolog version, you are upgrading your projects from, some additional actions described below might be required.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 7.0 and Visual Prolog 6.x to Visual Prolog 7.2==&lt;br /&gt;
&lt;br /&gt;
Depending on Visual Prolog version, you are upgrading your projects from, some additional actions might be required.&lt;br /&gt;
&lt;br /&gt;
# Visual Prolog 7.3 projects are not fully backward-compatible with Visual Prolog 7.0 and Visual Prolog 6.x projects. &amp;lt;br /&amp;gt;Visual Prolog 7.0 and earlier IDE will not allow opening projects modified by Visual Prolog 7.1 IDE.&amp;lt;br /&amp;gt;It is recommended to create a backup copy of your project before opening it by the Visual Prolog 7.2 IDE.&lt;br /&gt;
# If you are going to use Visual Prolog 7.2 simultaneously with Visual Prolog 7.0 or an earlier version at the same computer, it is recommended to switch the IDE setting &amp;quot;Open Project at Startup&amp;quot; in the previous version OFF, to prevent opening Visual Prolog 7.1 projects in the earlier IDE.&amp;lt;br /&amp;gt;Note that beginning with Visual Prolog 7.1, projects are not opened at startup, and, hence, the setting &amp;quot;Open Project at Startup&amp;quot; is not used anymore.&lt;br /&gt;
# The following keywords were introduced:&amp;lt;br /&amp;gt;&lt;br /&gt;
#* In Visual Prolog 7.1: &amp;lt;vp&amp;gt;properties&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;try&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;catch&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;finally&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;elseif&amp;lt;/vp&amp;gt;.&lt;br /&gt;
#* In Visual Prolog 7.0: &amp;lt;vp&amp;gt;if&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;then&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;else&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;foreach&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;do&amp;lt;/vp&amp;gt; &amp;lt;br /&amp;gt;That means that they can no longer be used as identifiers.&lt;br /&gt;
# Stronger treatment of types introduced in Visual Prolog 7.0 might require some changes in your program: typically change of declarations or insertions of explicit conversions might be necessary.&lt;br /&gt;
# Reference domains are not supported since Visual Prolog 7.0. If your project uses reference domains, we recommend to read the &amp;quot;[http://wiki.visual-prolog.com/index.php?title=How_To_Remove_Reference_Domains_from_a_Project How To Erase Reference Domains from a Project]&amp;quot; tutorial.&lt;br /&gt;
# G-stack is not used anymore since Visual Prolog 7.0. Hence, all G-stack related predicates have been removed.&lt;br /&gt;
# Beginning with Visual Prolog 7.0 some accelerator keys have been changed to comply with Microsoft standards.&lt;br /&gt;
# The format of specifying a fully-qualified (i.e. with an arity) predicate with a return value in &amp;lt;vp&amp;gt;resolve&amp;lt;/vp&amp;gt;/&amp;lt;vp&amp;gt;delegate&amp;lt;/vp&amp;gt; predicates from qualifications has been changed since Visual Prolog 6.2: &amp;lt;vp&amp;gt;predicateName//N&amp;lt;/vp&amp;gt; =&amp;gt; &amp;lt;vp&amp;gt;predicateName/N-&amp;gt;&amp;lt;/vp&amp;gt;. This may cause error messages while building your project in the latest version of Visual Prolog.&lt;br /&gt;
# Predicates &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; and &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; have changed their meaning for negative numbers.&lt;br /&gt;
&lt;br /&gt;
In Visual Prolog 6.1&lt;br /&gt;
&amp;lt;vip&amp;gt;-1 = -5 div 3&lt;br /&gt;
-2 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Since Visual Prolog 6.2&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;-2 = -5 div 3&lt;br /&gt;
+1 = -5 mod 3&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
So, each file that contains &amp;lt;vp&amp;gt;div&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;mod&amp;lt;/vp&amp;gt; in the projects created in Visual Prolog 6.1 should be checked, whether it works correctly. The simplest solution is to replace:&lt;br /&gt;
&lt;br /&gt;
 div =&amp;gt; quot&lt;br /&gt;
 mod =&amp;gt; rem&lt;br /&gt;
&lt;br /&gt;
in all source files.&lt;br /&gt;
&lt;br /&gt;
==Upgrading Projects from Visual Prolog 5.x==&lt;br /&gt;
Prolog Development Center provides the [http://www.visual-prolog.com/vip6/Product/migration.htm Migration Tool] that will assist you to migrate your Visual Prolog 5.x projects into Visual Prolog 6.x projects. &lt;br /&gt;
&lt;br /&gt;
After migrating your projects into Visual Prolog 6.x, follow the recommendations above to upgrade your projects into the latest version of Visual Prolog.&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
* [[New Features in Visual Prolog 7.2]]&lt;br /&gt;
* [http://kb.visual-prolog.com/fixes/fixes7201.htm Bugs Fixed in Visual Prolog 7.2]&lt;br /&gt;
&lt;br /&gt;
[[Category:Basic Information]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Generic_Interfaces_and_Classes&amp;diff=2228</id>
		<title>Language Reference/Generic Interfaces and Classes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Generic_Interfaces_and_Classes&amp;diff=2228"/>
		<updated>2010-03-17T18:03:26Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Generic Interfaces and Classes}}&lt;br /&gt;
&lt;br /&gt;
{{lang|Interfaces|Interfaces}} and {{lang|Classes|classes}} can be parametrized with type parameters so that they can be used in different instantiations in different contexts.&lt;br /&gt;
&lt;br /&gt;
This section must be considered as an extension to the individual sections about:&lt;br /&gt;
* {{lang|Interfaces|Interfaces}}&lt;br /&gt;
* {{lang|Classes|Classes}}&lt;br /&gt;
* {{lang|Implementations|Implementations}}&lt;br /&gt;
&lt;br /&gt;
The pragmatic reason to use generic classes and interfaces is to declare &amp;#039;&amp;#039;&amp;#039;parametrized object facts&amp;#039;&amp;#039;&amp;#039; and implement operations on these facts.  As illustrated in the Queue example below.&lt;br /&gt;
&lt;br /&gt;
=== Example: Queue ===&lt;br /&gt;
&lt;br /&gt;
Consider this interface&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface queue_integer&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Value).&lt;br /&gt;
        tryGet : () -&amp;gt; integer Value.&lt;br /&gt;
end interface queue_integer&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An object of this type is a queue of integers, if you replace &amp;quot;integer&amp;quot; with &amp;quot;string&amp;quot; you would have a type describing queues of strings.&lt;br /&gt;
&lt;br /&gt;
A generic interface can be used to describe all such interfaces in a single interface definition:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (@Elem Value).&lt;br /&gt;
        tryGet : () -&amp;gt; @Elem Value.&lt;br /&gt;
end interface queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;@Elem&amp;lt;/vp&amp;gt; is a &amp;#039;&amp;#039;scope type variable&amp;#039;&amp;#039; (distinguished from local type variables by the &amp;lt;vp&amp;gt;@&amp;lt;/vp&amp;gt;).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;queue{integer}&amp;lt;/vp&amp;gt; represents integer-queues; &amp;lt;vp&amp;gt;queue{string}&amp;lt;/vp&amp;gt; represents string-queues; and so forth.&lt;br /&gt;
&lt;br /&gt;
We can declare a generic queue class like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class queueClass{@Elem} : queue{@Elem}&lt;br /&gt;
end class queueClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;queueClass{@Elem}&amp;lt;/vp&amp;gt; constructs objects type &amp;lt;vp&amp;gt;queue{@Elem}&amp;lt;/vp&amp;gt; for any instantiation of &amp;lt;vp&amp;gt;@Elem&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
The implementation can look like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement queueClass{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        queue_fact : (@Elem Value).&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Value) :-&lt;br /&gt;
            assert(queue_fact(Value)).&lt;br /&gt;
    clauses&lt;br /&gt;
        tryGet() = Value :-&lt;br /&gt;
            retract(queue_fact(Value)),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queueClass&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This piece of code illustrates how to create an integer queue and insert an element in it:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;..., Q = queueClass{integer}::new(), Q:insert(17), ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is not necessary to apply the type explicitly, instead the compiler can infer it from the context:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;..., Q = queueClass::new(), Q:insert(17), ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The compiler sees that &amp;lt;vp&amp;gt;Q&amp;lt;/vp&amp;gt; must be an integer queue, because we insert 17 into it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Generic Interfaces ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
Generic interfaces have a list of type parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
    interface &amp;lt;InterfaceName&amp;gt; { &amp;lt;ScopeTypeVariable&amp;gt;-comma-sep-list-opt } &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;InterfaceName&amp;gt;-opt&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScopeTypeParameter&amp;gt; :&lt;br /&gt;
    @ &amp;lt;UppercaseName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The scope type parameters can be used in any declaration/definition in the interface.&lt;br /&gt;
&lt;br /&gt;
==== Semantics ====&lt;br /&gt;
&lt;br /&gt;
A generic interface defines all the interfaces that can be obtained by instantiating the type parameters with actual types.  The scope type parameters from the opening are bound in the entire interface.&lt;br /&gt;
&lt;br /&gt;
==== Restrictions ====&lt;br /&gt;
&lt;br /&gt;
Then closing name should not have parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx % no parameters here&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is illegal to use same interface name for interfaces with different arity (in the same namespace):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx % xxx/0&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&lt;br /&gt;
&lt;br /&gt;
interface xxx{@A, @B} % error: Several classes, interfaces and/or namespaces have the same name &amp;#039;xxx&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters can be used in supported interfaces:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@P} supports yyy{@P} % legal: @P is bound&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&lt;br /&gt;
&lt;br /&gt;
interface xxx supports yyy{@P} % illegal: @P must be bound&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Supported interfaces can be instantiated with any type expressions (as long as parameters are bound):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@A} supports yyy{integer, @A*}&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Generic Classes ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
Generic classes have a list of type parameters, and constructs objects of an interface type uses the these parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
    class &amp;lt;ClassName&amp;gt; { &amp;lt;ScopeTypeVariable&amp;gt;-comma-sep-list-opt } &amp;lt;ConstructionType&amp;gt; &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScopeTypeParameter&amp;gt; :&lt;br /&gt;
    @ &amp;lt;UppercaseName&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ConstructionType&amp;gt; :&lt;br /&gt;
   : &amp;lt;TypeExpression&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The construction type must be generic (i.e. a generic interface).&lt;br /&gt;
&lt;br /&gt;
==== Semantics ====&lt;br /&gt;
&lt;br /&gt;
A generic class declares a class with a generic constructor.  The type of the constructed object will be inferred from the usage of the constructor.&lt;br /&gt;
&lt;br /&gt;
==== Restrictions ====&lt;br /&gt;
&lt;br /&gt;
Then closing name should not have parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@A} : xxx{@AAA}&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx % no parameters here&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It is illegal to use same class name for class with different arity (in the same namespace):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx % xxx/0&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&lt;br /&gt;
&lt;br /&gt;
class xxx{@A} : yyy{@A} % error: Several classes, interfaces and/or namespaces have the same name &amp;#039;xxx&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If a class and interface can have the same name, the class must construct objects of that interface.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;interface xxx{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end interface xxx&lt;br /&gt;
&lt;br /&gt;
class xxx{@Q, @P} : object % error: Several classes, interfaces and/or namespaces have the same name &amp;#039;xxx&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Parameters in the construction type, etc must be bound:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class bbb : xxx{@Q} % error: Free parameter &amp;#039;@Q&amp;#039; is used in type expression&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
All the parameters from the class must be used in the construction type:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@P} : object % error: Unused type parameter &amp;#039;@P&amp;#039;&lt;br /&gt;
    ...&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In class declarations scope parameter can only be used in constructors, domains and constants.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@P} : xxx{@P}&lt;br /&gt;
    domains&lt;br /&gt;
        list = @P*. % legal&lt;br /&gt;
    constants&lt;br /&gt;
        empty : @P* = []. % legal&lt;br /&gt;
    constructors&lt;br /&gt;
        new  : (@P Init).  % legal&lt;br /&gt;
    predicates&lt;br /&gt;
        p : (@P X). % error: Scope parameter &amp;#039;@P&amp;#039; used in a class entity&lt;br /&gt;
end class xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Generic Implmentations ===&lt;br /&gt;
&lt;br /&gt;
==== Syntax ====&lt;br /&gt;
&lt;br /&gt;
Generic implementations have a list of type parameters.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
    implement &amp;lt;ClassName&amp;gt; { &amp;lt;ScopeTypeVariable&amp;gt;-comma-sep-list-opt } &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&lt;br /&gt;
    ...&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ScopeTypeParameter&amp;gt; :&lt;br /&gt;
    @ &amp;lt;UppercaseName&amp;gt;&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Semantics ====&lt;br /&gt;
&lt;br /&gt;
A generic class declares a class with a generic constructor.  The type of the constructed object will be inferred from the usage of the constructor.&lt;br /&gt;
&lt;br /&gt;
==== Restrictions ====&lt;br /&gt;
&lt;br /&gt;
Then closing name should not have parameters:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement xxx{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end implement xxx % no parameters here&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The parameters must be the same as in the corresponding class declaration and have same order.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;class xxx{@A} : aaa{@A}&lt;br /&gt;
    ...&lt;br /&gt;
end class xxx&lt;br /&gt;
&lt;br /&gt;
implement xxx{@B} % error: The parameter &amp;#039;@B&amp;#039; is not the same as in the declaration &amp;#039;@A&amp;#039;&lt;br /&gt;
    ...&lt;br /&gt;
end implement xxx&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In class implementations scope parameter can be used in constructors, domains, constants and in object entities (i.e. object facts, object predicates and object properties).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;implement xxx{@P}&lt;br /&gt;
    domains&lt;br /&gt;
        list = @P*. % legal&lt;br /&gt;
    constants&lt;br /&gt;
        empty : @P* = []. % legal&lt;br /&gt;
    constructors&lt;br /&gt;
        new  : (@P Init).  % legal&lt;br /&gt;
    predicates&lt;br /&gt;
        op : (@P X). % legal&lt;br /&gt;
    class predicates&lt;br /&gt;
        cp : (@P X). % error: Scope parameter &amp;#039;@P&amp;#039; used in a class entity&lt;br /&gt;
    facts&lt;br /&gt;
        ofct : (@P). % legal&lt;br /&gt;
    class facts&lt;br /&gt;
        cfct : (@P). % error: Scope parameter &amp;#039;@P&amp;#039; used in a class entity&lt;br /&gt;
    ...&lt;br /&gt;
end implement xxx&amp;lt;/vip&amp;gt;&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2227</id>
		<title>Language Reference/Monitors</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2227"/>
		<updated>2010-03-17T17:51:31Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Shared output streams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Monitors}}&lt;br /&gt;
&lt;br /&gt;
A monitor is a language construction to synchronize two or more threads that use a shared resource, usually a hardware device or a set of variables. The compiler transparently inserts locking and unlocking code to appropriately designated procedures, instead of the programmer having to access concurrency primitives explicitly.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog monitor entrances can be controlled by guard predicates (conditions).&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
Monitor interfaces and monitor classes are scopes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;Scope&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;MonitorInterface&amp;gt;&lt;br /&gt;
    &amp;lt;MonitorClass&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;/source&amp;gt;&lt;br /&gt;
A monitor interface is defined by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular interface definition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorInterface&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;IntertfaceDefinition&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A monitor class is declared by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular class declaration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorClass&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;ClassDeclaration&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Monitor classes and interfaces cannot declare &amp;#039;&amp;#039;&amp;#039;multi&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;nondeterm&amp;#039;&amp;#039;&amp;#039; predicate members.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions ===&lt;br /&gt;
&lt;br /&gt;
* A regular interface cannot support a monitor interface&lt;br /&gt;
* A monitor class cannot construct objects.&lt;br /&gt;
* It is not legal to inherit from a monitor (i.e. from a class that implements a monitor interface).&lt;br /&gt;
&lt;br /&gt;
=== Semantics ===&lt;br /&gt;
&lt;br /&gt;
The predicates and properties declared in a monitor are the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;entrances&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to the monitor.  A thread enters the monitor through an entrance and is in the monitor until it leaves that entrance again.  Only one thread is allowed to be in the monitor at the time.  So each entry is protected as a critical region.&lt;br /&gt;
&lt;br /&gt;
The semantics is simplest to understand as a program transformation (which is how it is implemented).  Consider this academic example:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :- &amp;lt;B1&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :- &amp;lt;B2&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :- &amp;lt;Bn&amp;gt;.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt; Where &amp;lt;B1&amp;gt;, &amp;lt;B2&amp;gt;, ..., &amp;lt;Bn&amp;gt; are clause bodies.  This code corresponds to the following &amp;quot;normal&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B1&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B2&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;Bn&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt;&lt;br /&gt;
So each monitor class is extended with a mutex, which is used to create a critical region around each entry body.&lt;br /&gt;
&lt;br /&gt;
The code for monitor objects are similar, except that the mutex object is owned by the object.&lt;br /&gt;
&lt;br /&gt;
=== Guards ===&lt;br /&gt;
&lt;br /&gt;
Consider a monitor protected queue:  some threads (&amp;#039;&amp;#039;producers&amp;#039;&amp;#039;) inserts elements in the queue and others (&amp;#039;&amp;#039;consumers&amp;#039;&amp;#039;) pick-out elements.  However, you cannot pick-out elements if the queue is empty.&lt;br /&gt;
&lt;br /&gt;
If we implement the queue using a monitor, the &amp;quot;pick-out&amp;quot; entry could be determ, failing if the queue is empty.  But then the consumers would have to &amp;quot;poll&amp;quot; the queue until an element can be obtained. Such polling uses system resources, and normally it is desirable to avoid polling. This problem can be solved by guard predicates.&lt;br /&gt;
&lt;br /&gt;
Each entry can have a guard associated in the implementation.  The guard is added as a special guard-clause before the other clauses of the entry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Clause&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;GuardClause&amp;gt;.&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;GuardClause&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;LowerCaseIdentifier&amp;gt; .&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;AnonymousPredicate&amp;gt; .&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can be the name of a predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard remove_guard.&lt;br /&gt;
    remove() = ...&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can also be an anonymous predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard { :- element_fact(_), ! }.&lt;br /&gt;
    remove() = ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The guard predicates are evaluated when the monitor is created.  For monitor classes this means at program start, for object predicates this is immediately after the construction of the object.  The guard predicates are also evaluated whenever a tread leaves the monitor.  But they are &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; evaluated at any other time.&lt;br /&gt;
&lt;br /&gt;
If a certain guard succeeds the corresponding entry is &amp;#039;&amp;#039;open&amp;#039;&amp;#039;, if it fails the entry is &amp;#039;&amp;#039;closed&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is only possible to enter open entries.&lt;br /&gt;
&lt;br /&gt;
{{Example| Here is a queue class that solves the pick-out problem using a guard predicate on the &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; operation:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            assert(element_fact(Element)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove guard remove_guard.&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            retract(element_fact(Element)),&lt;br /&gt;
            !;&lt;br /&gt;
            common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
    predicates&lt;br /&gt;
        remove_quard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
Notice that &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; is a procedure, because threads that call remove will &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;wait&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; until there is an element for them.  The guard predicate &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; succeeds if there is an element in the queue.&lt;br /&gt;
&lt;br /&gt;
So &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; is evaluated each time a thread leaves the monitor, and the &amp;#039;&amp;#039;&amp;#039;element_fact&amp;#039;&amp;#039;&amp;#039; fact database can only be changed by a thread that is inside the monitor.  Therefore the guard value stays sensible all the time (i.e. when there are no threads in the monitor).  It is important to ensure such &amp;quot;stays sensible&amp;quot; condition for guards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Guard predicates are handled in the transformation mentioned above.  The queue example is effectively the same as this &amp;quot;monitor-free&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
        remove_guard_event : event := event::create(true, toBoolean(remove_guard())).&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                assert(element_fact(Element))&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            _W = syncObject::waitAll([monitorRegion, remove_guard_event]),&lt;br /&gt;
            try&lt;br /&gt;
                retract(element_fact(Element)),&lt;br /&gt;
                !;&lt;br /&gt;
                common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                    &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;)&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        remove_guard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        setGuardEvents : ().&lt;br /&gt;
    clauses&lt;br /&gt;
        setGuardEvents() :-&lt;br /&gt;
            remove_guard_event:setSignaled(toBoolean(remove_guard())).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;event&amp;#039;&amp;#039;&amp;#039; is created for each guard predicate; this event is set to &amp;#039;&amp;#039;signaled&amp;#039;&amp;#039; if the guard predicate succeeds.  As mentioned it is set during the creation of the monitor and each time a predicate leaves the monitor (before it leaves the critical region).&lt;br /&gt;
&lt;br /&gt;
When entering an entry the threads waits &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;both&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; for the &amp;#039;&amp;#039;&amp;#039;monitorRegion&amp;#039;&amp;#039;&amp;#039; and for the guard event to be in signalled state.&lt;br /&gt;
&lt;br /&gt;
In the code above the initialization of the class itself and the guard events are done in an undetermined order.  But actually it is ensured that the guard events are initialized after all other class/object initialization is performed.&lt;br /&gt;
&lt;br /&gt;
=== Examples of practical usage ===&lt;br /&gt;
&lt;br /&gt;
This section shows a few cases where monitors are handy.&lt;br /&gt;
&lt;br /&gt;
==== Writing to a log file ====&lt;br /&gt;
&lt;br /&gt;
Several threads needs to log information to a single log file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class log&lt;br /&gt;
    properties&lt;br /&gt;
        logStream : outputStream.&lt;br /&gt;
    predicates&lt;br /&gt;
        write : (...).&lt;br /&gt;
end class log&lt;br /&gt;
&lt;br /&gt;
implement log&lt;br /&gt;
    class facts&lt;br /&gt;
        logStream : outputStream := erroneous.&lt;br /&gt;
    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&lt;br /&gt;
 end implement log&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The monitor ensures that writing of a log lines are not mixed with each other, and that stream changes only takes place between writing of log lines.&lt;br /&gt;
&lt;br /&gt;
==== Shared output streams ====&lt;br /&gt;
&lt;br /&gt;
This monitor can be used to thread protect the operations of an output stream:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface outputStream_sync&lt;br /&gt;
    supports outputStream&lt;br /&gt;
end interface outputStream_sync&lt;br /&gt;
&lt;br /&gt;
class outputStream_sync : outputStream_sync&lt;br /&gt;
    constructors&lt;br /&gt;
        new : (outputStream Stream).&lt;br /&gt;
end class outputStream_sync &lt;br /&gt;
&lt;br /&gt;
implement outputStream_sync&lt;br /&gt;
    delegate interface outputStream to stream&lt;br /&gt;
&lt;br /&gt;
    facts&lt;br /&gt;
        stream : outputStream.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        new(Stream) :- stream := Stream.&lt;br /&gt;
end implement outputStream_sync&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should realize however that with code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
consists of &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;three separate&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; operations, so it can still be the case (fx) that two threads first write the time and then one writes the &amp;quot;...&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
==== Queue ====&lt;br /&gt;
&lt;br /&gt;
The queue above is fine, but actually it may be better to create queue objects.  Using generic interfaces we can create a very general queue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        enqueue : (@Elem Value).&lt;br /&gt;
    predicates&lt;br /&gt;
        dequeue : () -&amp;gt; @Elem Value.&lt;br /&gt;
end interface queue&lt;br /&gt;
&lt;br /&gt;
class queue{@Elem} : queue{@Elem}&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        value_fact : (@Elem Value).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        enqueue(V) :-&lt;br /&gt;
            assert(value_fact(V)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        dequeue guard { value_fact(_), ! }.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            value_fact(V),&lt;br /&gt;
            !.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            common_exception::raise_error(....).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*[[wikipedia:Monitor (synchronization)]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2226</id>
		<title>Language Reference/Monitors</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2226"/>
		<updated>2010-03-17T17:49:13Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Guards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Monitors}}&lt;br /&gt;
&lt;br /&gt;
A monitor is a language construction to synchronize two or more threads that use a shared resource, usually a hardware device or a set of variables. The compiler transparently inserts locking and unlocking code to appropriately designated procedures, instead of the programmer having to access concurrency primitives explicitly.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog monitor entrances can be controlled by guard predicates (conditions).&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
Monitor interfaces and monitor classes are scopes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;Scope&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;MonitorInterface&amp;gt;&lt;br /&gt;
    &amp;lt;MonitorClass&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;/source&amp;gt;&lt;br /&gt;
A monitor interface is defined by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular interface definition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorInterface&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;IntertfaceDefinition&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A monitor class is declared by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular class declaration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorClass&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;ClassDeclaration&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Monitor classes and interfaces cannot declare &amp;#039;&amp;#039;&amp;#039;multi&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;nondeterm&amp;#039;&amp;#039;&amp;#039; predicate members.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions ===&lt;br /&gt;
&lt;br /&gt;
* A regular interface cannot support a monitor interface&lt;br /&gt;
* A monitor class cannot construct objects.&lt;br /&gt;
* It is not legal to inherit from a monitor (i.e. from a class that implements a monitor interface).&lt;br /&gt;
&lt;br /&gt;
=== Semantics ===&lt;br /&gt;
&lt;br /&gt;
The predicates and properties declared in a monitor are the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;entrances&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to the monitor.  A thread enters the monitor through an entrance and is in the monitor until it leaves that entrance again.  Only one thread is allowed to be in the monitor at the time.  So each entry is protected as a critical region.&lt;br /&gt;
&lt;br /&gt;
The semantics is simplest to understand as a program transformation (which is how it is implemented).  Consider this academic example:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :- &amp;lt;B1&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :- &amp;lt;B2&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :- &amp;lt;Bn&amp;gt;.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt; Where &amp;lt;B1&amp;gt;, &amp;lt;B2&amp;gt;, ..., &amp;lt;Bn&amp;gt; are clause bodies.  This code corresponds to the following &amp;quot;normal&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B1&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B2&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;Bn&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt;&lt;br /&gt;
So each monitor class is extended with a mutex, which is used to create a critical region around each entry body.&lt;br /&gt;
&lt;br /&gt;
The code for monitor objects are similar, except that the mutex object is owned by the object.&lt;br /&gt;
&lt;br /&gt;
=== Guards ===&lt;br /&gt;
&lt;br /&gt;
Consider a monitor protected queue:  some threads (&amp;#039;&amp;#039;producers&amp;#039;&amp;#039;) inserts elements in the queue and others (&amp;#039;&amp;#039;consumers&amp;#039;&amp;#039;) pick-out elements.  However, you cannot pick-out elements if the queue is empty.&lt;br /&gt;
&lt;br /&gt;
If we implement the queue using a monitor, the &amp;quot;pick-out&amp;quot; entry could be determ, failing if the queue is empty.  But then the consumers would have to &amp;quot;poll&amp;quot; the queue until an element can be obtained. Such polling uses system resources, and normally it is desirable to avoid polling. This problem can be solved by guard predicates.&lt;br /&gt;
&lt;br /&gt;
Each entry can have a guard associated in the implementation.  The guard is added as a special guard-clause before the other clauses of the entry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Clause&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;GuardClause&amp;gt;.&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;GuardClause&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;LowerCaseIdentifier&amp;gt; .&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;AnonymousPredicate&amp;gt; .&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can be the name of a predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard remove_guard.&lt;br /&gt;
    remove() = ...&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can also be an anonymous predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard { :- element_fact(_), ! }.&lt;br /&gt;
    remove() = ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The guard predicates are evaluated when the monitor is created.  For monitor classes this means at program start, for object predicates this is immediately after the construction of the object.  The guard predicates are also evaluated whenever a tread leaves the monitor.  But they are &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; evaluated at any other time.&lt;br /&gt;
&lt;br /&gt;
If a certain guard succeeds the corresponding entry is &amp;#039;&amp;#039;open&amp;#039;&amp;#039;, if it fails the entry is &amp;#039;&amp;#039;closed&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is only possible to enter open entries.&lt;br /&gt;
&lt;br /&gt;
{{Example| Here is a queue class that solves the pick-out problem using a guard predicate on the &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; operation:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            assert(element_fact(Element)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove guard remove_guard.&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            retract(element_fact(Element)),&lt;br /&gt;
            !;&lt;br /&gt;
            common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
    predicates&lt;br /&gt;
        remove_quard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
Notice that &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; is a procedure, because threads that call remove will &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;wait&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; until there is an element for them.  The guard predicate &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; succeeds if there is an element in the queue.&lt;br /&gt;
&lt;br /&gt;
So &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; is evaluated each time a thread leaves the monitor, and the &amp;#039;&amp;#039;&amp;#039;element_fact&amp;#039;&amp;#039;&amp;#039; fact database can only be changed by a thread that is inside the monitor.  Therefore the guard value stays sensible all the time (i.e. when there are no threads in the monitor).  It is important to ensure such &amp;quot;stays sensible&amp;quot; condition for guards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Guard predicates are handled in the transformation mentioned above.  The queue example is effectively the same as this &amp;quot;monitor-free&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
        remove_guard_event : event := event::create(true, toBoolean(remove_guard())).&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                assert(element_fact(Element))&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            _W = syncObject::waitAll([monitorRegion, remove_guard_event]),&lt;br /&gt;
            try&lt;br /&gt;
                retract(element_fact(Element)),&lt;br /&gt;
                !;&lt;br /&gt;
                common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                    &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;)&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        remove_guard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        setGuardEvents : ().&lt;br /&gt;
    clauses&lt;br /&gt;
        setGuardEvents() :-&lt;br /&gt;
            remove_guard_event:setSignaled(toBoolean(remove_guard())).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;event&amp;#039;&amp;#039;&amp;#039; is created for each guard predicate; this event is set to &amp;#039;&amp;#039;signaled&amp;#039;&amp;#039; if the guard predicate succeeds.  As mentioned it is set during the creation of the monitor and each time a predicate leaves the monitor (before it leaves the critical region).&lt;br /&gt;
&lt;br /&gt;
When entering an entry the threads waits &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;both&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; for the &amp;#039;&amp;#039;&amp;#039;monitorRegion&amp;#039;&amp;#039;&amp;#039; and for the guard event to be in signalled state.&lt;br /&gt;
&lt;br /&gt;
In the code above the initialization of the class itself and the guard events are done in an undetermined order.  But actually it is ensured that the guard events are initialized after all other class/object initialization is performed.&lt;br /&gt;
&lt;br /&gt;
=== Examples of practical usage ===&lt;br /&gt;
&lt;br /&gt;
This section shows a few cases where monitors are handy.&lt;br /&gt;
&lt;br /&gt;
==== Writing to a log file ====&lt;br /&gt;
&lt;br /&gt;
Several threads needs to log information to a single log file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class log&lt;br /&gt;
    properties&lt;br /&gt;
        logStream : outputStream.&lt;br /&gt;
    predicates&lt;br /&gt;
        write : (...).&lt;br /&gt;
end class log&lt;br /&gt;
&lt;br /&gt;
implement log&lt;br /&gt;
    class facts&lt;br /&gt;
        logStream : outputStream := erroneous.&lt;br /&gt;
    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&lt;br /&gt;
 end implement log&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The monitor ensures that writing of a log lines are not mixed with each other, and that stream changes only takes place between writing of log lines.&lt;br /&gt;
&lt;br /&gt;
==== Shared output streams ====&lt;br /&gt;
&lt;br /&gt;
This monitor can be used to thread protect the operations of an output stream:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface outputStream_sync&lt;br /&gt;
    supports outputStream&lt;br /&gt;
end interface outputStream_sync&lt;br /&gt;
&lt;br /&gt;
class outputStream_sync : outputStream_sync&lt;br /&gt;
    constructors&lt;br /&gt;
        new : (outputStream Stream).&lt;br /&gt;
end class outputStream_sync &lt;br /&gt;
&lt;br /&gt;
implement outputStream_sync&lt;br /&gt;
    delegate interface outputStream to stream&lt;br /&gt;
&lt;br /&gt;
    facts&lt;br /&gt;
        stream : outputStream.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        new(Stream) :- stream := Stream.&lt;br /&gt;
end implement outputStream_sync&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should realize however that with code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
consists of &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;three separate&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; opeations, so it can still be the case (fx) that two threads first write the time and then one writes the &amp;quot;...&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
==== Queue ====&lt;br /&gt;
&lt;br /&gt;
The queue above is fine, but actually it may be better to create queue objects.  Using generic interfaces we can create a very general queue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        enqueue : (@Elem Value).&lt;br /&gt;
    predicates&lt;br /&gt;
        dequeue : () -&amp;gt; @Elem Value.&lt;br /&gt;
end interface queue&lt;br /&gt;
&lt;br /&gt;
class queue{@Elem} : queue{@Elem}&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        value_fact : (@Elem Value).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        enqueue(V) :-&lt;br /&gt;
            assert(value_fact(V)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        dequeue guard { value_fact(_), ! }.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            value_fact(V),&lt;br /&gt;
            !.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            common_exception::raise_error(....).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*[[wikipedia:Monitor (synchronization)]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2225</id>
		<title>Language Reference/Monitors</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2225"/>
		<updated>2010-03-17T17:42:43Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Guards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Monitors}}&lt;br /&gt;
&lt;br /&gt;
A monitor is a language construction to synchronize two or more threads that use a shared resource, usually a hardware device or a set of variables. The compiler transparently inserts locking and unlocking code to appropriately designated procedures, instead of the programmer having to access concurrency primitives explicitly.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog monitor entrances can be controlled by guard predicates (conditions).&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
Monitor interfaces and monitor classes are scopes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;Scope&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;MonitorInterface&amp;gt;&lt;br /&gt;
    &amp;lt;MonitorClass&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;/source&amp;gt;&lt;br /&gt;
A monitor interface is defined by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular interface definition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorInterface&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;IntertfaceDefinition&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A monitor class is declared by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular class declaration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorClass&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;ClassDeclaration&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Monitor classes and interfaces cannot declare &amp;#039;&amp;#039;&amp;#039;multi&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;nondeterm&amp;#039;&amp;#039;&amp;#039; predicate members.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions ===&lt;br /&gt;
&lt;br /&gt;
* A regular interface cannot support a monitor interface&lt;br /&gt;
* A monitor class cannot construct objects.&lt;br /&gt;
* It is not legal to inherit from a monitor (i.e. from a class that implements a monitor interface).&lt;br /&gt;
&lt;br /&gt;
=== Semantics ===&lt;br /&gt;
&lt;br /&gt;
The predicates and properties declared in a monitor are the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;entrances&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to the monitor.  A thread enters the monitor through an entrance and is in the monitor until it leaves that entrance again.  Only one thread is allowed to be in the monitor at the time.  So each entry is protected as a critical region.&lt;br /&gt;
&lt;br /&gt;
The semantics is simplest to understand as a program transformation (which is how it is implemented).  Consider this academic example:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :- &amp;lt;B1&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :- &amp;lt;B2&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :- &amp;lt;Bn&amp;gt;.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt; Where &amp;lt;B1&amp;gt;, &amp;lt;B2&amp;gt;, ..., &amp;lt;Bn&amp;gt; are clause bodies.  This code corresponds to the following &amp;quot;normal&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B1&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B2&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;Bn&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt;&lt;br /&gt;
So each monitor class is extended with a mutex, which is used to create a critical region around each entry body.&lt;br /&gt;
&lt;br /&gt;
The code for monitor objects are similar, except that the mutex object is owned by the object.&lt;br /&gt;
&lt;br /&gt;
=== Guards ===&lt;br /&gt;
&lt;br /&gt;
Consider a monitor protected queue:  some threads (&amp;#039;&amp;#039;producers&amp;#039;&amp;#039;) inserts elements in the queue and others (&amp;#039;&amp;#039;consumers&amp;#039;&amp;#039;) pick-out elements.  However, you cannot pick-out elements if the queue is empty.&lt;br /&gt;
&lt;br /&gt;
If we implement the queue using a monitor, the &amp;quot;pick-out&amp;quot; entry could be determ, failing if the queue is empty.  But then the consumers would have to &amp;quot;poll&amp;quot; the queue until an element can be obtained. Such polling uses system resources, and normally it is desirable to avoid polling. This problem can be solved by guard predicates.&lt;br /&gt;
&lt;br /&gt;
Each entry can have a guard associated in the implementation.  The guard is added as a special guard-clause before the other clauses of the entry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Clause&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;GuardClause&amp;gt;.&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;GuardClause&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;LowerCaseIdentifier&amp;gt; .&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;AnonymousPredicate&amp;gt; .&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can be the name of a predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard remove_guard.&lt;br /&gt;
    remove() = ...&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can also be an anonymous predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard { :- element_fact(_), ! }.&lt;br /&gt;
    remove() = ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The guard predicates are evaluated when the monitor is created.  For monitor classes this means at program start, for object predicates this is immediately after the construction of the object.  The guard predicates are also evaluated whenever a tread leaves the monitor.  But they are &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; evaluated at any other time.&lt;br /&gt;
&lt;br /&gt;
If a certain guard succeeds the corresponding entry is &amp;#039;&amp;#039;open&amp;#039;&amp;#039;, if it fails the entry is &amp;#039;&amp;#039;closed&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is only possible to enter open entries.&lt;br /&gt;
&lt;br /&gt;
{{Example| Here is a queue class that solves the pick-out problem using a guard predicate on the &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; operation:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            assert(element_fact(Element)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove guard remove_guard.&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            retract(element_fact(Element)),&lt;br /&gt;
            !;&lt;br /&gt;
            common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
    predicates&lt;br /&gt;
        remove_quard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
Notice that &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; is a procedure, because threads that call remove will &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;wait&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; until there is an element for them.  The guard predicate &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; succeeds if there is an element in the queue.&lt;br /&gt;
&lt;br /&gt;
So &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; is evaluated each time a thread leaves the monitor, and the &amp;#039;&amp;#039;&amp;#039;element_fact&amp;#039;&amp;#039;&amp;#039; fact database can only be changed by a thread that is inside the monitor.  Therefore the guard value stays sensible all the time (i.e. when there are no threads in the monitor).  It is important to ensure such &amp;quot;stays sensible&amp;quot; condition for guards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Guard predicates are handled in the transformation mentioned above.  The queue example is effectively the same as this &amp;quot;monitor-free&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
        remove_guard_event : event := event::create(true, toBoolean(remove_guard())).&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                assert(element_fact(Element))&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            _W = syncObject::waitAll([monitorRegion, remove_guard_event]),&lt;br /&gt;
            try&lt;br /&gt;
                retract(element_fact(Element)),&lt;br /&gt;
                !;&lt;br /&gt;
                common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                    &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;)&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        remove_guard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        setGuardEvents : ().&lt;br /&gt;
    clauses&lt;br /&gt;
        setGuardEvents() :-&lt;br /&gt;
            remove_guard_event:setSignaled(toBoolean(remove_guard())).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;event&amp;#039;&amp;#039;&amp;#039; is created for each guard predicate; this event is set to &amp;#039;&amp;#039;signaled&amp;#039;&amp;#039; if the guard predicate succeeds.  As mentioned it is set during the creation of the monitor and each time a predicate leaves the monitor (before it leaves the critical region).&lt;br /&gt;
&lt;br /&gt;
When entering an entry the threads waits &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;both&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; for the &amp;#039;&amp;#039;&amp;#039;monitorRegion&amp;#039;&amp;#039;&amp;#039; and for the guard event to be in signalled state.&lt;br /&gt;
&lt;br /&gt;
In the code above the initialization of the class itself and the guard events are done in an undetermined order.  But actually it is ensured that the guard events are initialized after all ohter class/object initialization is performed.&lt;br /&gt;
&lt;br /&gt;
=== Examples of practical usage ===&lt;br /&gt;
&lt;br /&gt;
This section shows a few cases where monitors are handy.&lt;br /&gt;
&lt;br /&gt;
==== Writing to a log file ====&lt;br /&gt;
&lt;br /&gt;
Several threads needs to log information to a single log file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class log&lt;br /&gt;
    properties&lt;br /&gt;
        logStream : outputStream.&lt;br /&gt;
    predicates&lt;br /&gt;
        write : (...).&lt;br /&gt;
end class log&lt;br /&gt;
&lt;br /&gt;
implement log&lt;br /&gt;
    class facts&lt;br /&gt;
        logStream : outputStream := erroneous.&lt;br /&gt;
    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&lt;br /&gt;
 end implement log&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The monitor ensures that writing of a log lines are not mixed with each other, and that stream changes only takes place between writing of log lines.&lt;br /&gt;
&lt;br /&gt;
==== Shared output streams ====&lt;br /&gt;
&lt;br /&gt;
This monitor can be used to thread protect the operations of an output stream:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface outputStream_sync&lt;br /&gt;
    supports outputStream&lt;br /&gt;
end interface outputStream_sync&lt;br /&gt;
&lt;br /&gt;
class outputStream_sync : outputStream_sync&lt;br /&gt;
    constructors&lt;br /&gt;
        new : (outputStream Stream).&lt;br /&gt;
end class outputStream_sync &lt;br /&gt;
&lt;br /&gt;
implement outputStream_sync&lt;br /&gt;
    delegate interface outputStream to stream&lt;br /&gt;
&lt;br /&gt;
    facts&lt;br /&gt;
        stream : outputStream.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        new(Stream) :- stream := Stream.&lt;br /&gt;
end implement outputStream_sync&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should realize however that with code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
consists of &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;three separate&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; opeations, so it can still be the case (fx) that two threads first write the time and then one writes the &amp;quot;...&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
==== Queue ====&lt;br /&gt;
&lt;br /&gt;
The queue above is fine, but actually it may be better to create queue objects.  Using generic interfaces we can create a very general queue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        enqueue : (@Elem Value).&lt;br /&gt;
    predicates&lt;br /&gt;
        dequeue : () -&amp;gt; @Elem Value.&lt;br /&gt;
end interface queue&lt;br /&gt;
&lt;br /&gt;
class queue{@Elem} : queue{@Elem}&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        value_fact : (@Elem Value).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        enqueue(V) :-&lt;br /&gt;
            assert(value_fact(V)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        dequeue guard { value_fact(_), ! }.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            value_fact(V),&lt;br /&gt;
            !.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            common_exception::raise_error(....).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*[[wikipedia:Monitor (synchronization)]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2224</id>
		<title>Language Reference/Monitors</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2224"/>
		<updated>2010-03-17T17:38:39Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Guards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Monitors}}&lt;br /&gt;
&lt;br /&gt;
A monitor is a language construction to synchronize two or more threads that use a shared resource, usually a hardware device or a set of variables. The compiler transparently inserts locking and unlocking code to appropriately designated procedures, instead of the programmer having to access concurrency primitives explicitly.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog monitor entrances can be controlled by guard predicates (conditions).&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
Monitor interfaces and monitor classes are scopes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;Scope&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;MonitorInterface&amp;gt;&lt;br /&gt;
    &amp;lt;MonitorClass&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;/source&amp;gt;&lt;br /&gt;
A monitor interface is defined by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular interface definition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorInterface&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;IntertfaceDefinition&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A monitor class is declared by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular class declaration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorClass&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;ClassDeclaration&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Monitor classes and interfaces cannot declare &amp;#039;&amp;#039;&amp;#039;multi&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;nondeterm&amp;#039;&amp;#039;&amp;#039; predicate members.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions ===&lt;br /&gt;
&lt;br /&gt;
* A regular interface cannot support a monitor interface&lt;br /&gt;
* A monitor class cannot construct objects.&lt;br /&gt;
* It is not legal to inherit from a monitor (i.e. from a class that implements a monitor interface).&lt;br /&gt;
&lt;br /&gt;
=== Semantics ===&lt;br /&gt;
&lt;br /&gt;
The predicates and properties declared in a monitor are the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;entrances&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to the monitor.  A thread enters the monitor through an entrance and is in the monitor until it leaves that entrance again.  Only one thread is allowed to be in the monitor at the time.  So each entry is protected as a critical region.&lt;br /&gt;
&lt;br /&gt;
The semantics is simplest to understand as a program transformation (which is how it is implemented).  Consider this academic example:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :- &amp;lt;B1&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :- &amp;lt;B2&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :- &amp;lt;Bn&amp;gt;.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt; Where &amp;lt;B1&amp;gt;, &amp;lt;B2&amp;gt;, ..., &amp;lt;Bn&amp;gt; are clause bodies.  This code corresponds to the following &amp;quot;normal&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B1&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B2&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;Bn&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt;&lt;br /&gt;
So each monitor class is extended with a mutex, which is used to create a critical region around each entry body.&lt;br /&gt;
&lt;br /&gt;
The code for monitor objects are similar, except that the mutex object is owned by the object.&lt;br /&gt;
&lt;br /&gt;
=== Guards ===&lt;br /&gt;
&lt;br /&gt;
Consider a monitor protected queue:  some threads (&amp;#039;&amp;#039;producers&amp;#039;&amp;#039;) inserts elements in the queue and others (&amp;#039;&amp;#039;consumers&amp;#039;&amp;#039;) pick-out elements.  However, you cannot pick-out elements if the queue is empty.&lt;br /&gt;
&lt;br /&gt;
If we implement the queue using a monitor, the &amp;quot;pick-out&amp;quot; entry could be determ, failing if the queue is empty.  But then the consumers would have to &amp;quot;poll&amp;quot; the queue until an element can be obtained. Such polling uses system resources, and normally it is desirable to avoid polling. This problem can be solved by guard predicates.&lt;br /&gt;
&lt;br /&gt;
Each entry can have a guard associated in the implementation.  The guard is added as a special guard-clause before the other clauses of the entry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Clause&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;GuardClause&amp;gt;.&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;GuardClause&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;LowerCaseIdentifier&amp;gt; .&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;AnonymousPredicate&amp;gt; .&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can be the name of a predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard remove_guard.&lt;br /&gt;
    remove() = ...&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can also be an anonymous predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard { :- element_fact(_), ! }.&lt;br /&gt;
    remove() = ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The guard predicates are evaluated when the monitor is created.  For monitor classes this means at program start, for object predicates this is immediately after the construction of the object.  The guard predicates are also evaluated whenever a tread leaves the monitor.  But they are &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; evaluated at any other time.&lt;br /&gt;
&lt;br /&gt;
If a certain guard succeeds the corresponding entry is &amp;#039;&amp;#039;open&amp;#039;&amp;#039;, if it fails the entry is &amp;#039;&amp;#039;closed&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is only possible to enter open entries.&lt;br /&gt;
&lt;br /&gt;
{{Example| Here is a queue class that solves the pick-out problem using a guard predicate on the &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; operation:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            assert(element_fact(Element)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove guard remove_guard.&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            retract(element_fact(Element)),&lt;br /&gt;
            !;&lt;br /&gt;
            common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
    predicates&lt;br /&gt;
        remove_quard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
Notice that &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; is a procedure, because threads that call remove will &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;wait&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; until there is an element for them.  The guard predicate &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; succeeds if there is an element in the queue.&lt;br /&gt;
&lt;br /&gt;
So &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; is evaluated each time a thread leaves the monitor, and the &amp;#039;&amp;#039;&amp;#039;element_fact&amp;#039;&amp;#039;&amp;#039; fact database can only be changed by a thread that is inside the monitor.  Therefore the guard value stays sensible all the time (i.e. when there are no threads in the monitor).  It is important to ensure such &amp;quot;stays sensible&amp;quot; condition for guards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Guard predicates are handled in the transformation mentioned above.  The queue example is effectively the same as this &amp;quot;monitor-free&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
        remove_guard_event : event := event::create(true, toBoolean(remove_guard())).&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                assert(element_fact(Element))&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            _W = syncObject::waitAll([monitorRegion, remove_guard_event]),&lt;br /&gt;
            try&lt;br /&gt;
                retract(element_fact(Element)),&lt;br /&gt;
                !;&lt;br /&gt;
                common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                    &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;)&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        remove_guard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        setGuardEvents : ().&lt;br /&gt;
    clauses&lt;br /&gt;
        setGuardEvents() :-&lt;br /&gt;
            remove_guard_event:setSignaled(toBoolean(remove_guard())).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;event&amp;#039;&amp;#039;&amp;#039; is created for each guard predicate, this event is set to &amp;#039;&amp;#039;signaled&amp;#039;&amp;#039; if the guard predicate succeeds.  As mentioned it is set during the creation of the monitor and each time a predicate leaves the monitor (before it leaves the critical region).&lt;br /&gt;
&lt;br /&gt;
When entering an entry the threads waits &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;both&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; for the &amp;#039;&amp;#039;&amp;#039;monitorRegion&amp;#039;&amp;#039;&amp;#039; and for the guard event to be in signalled state.&lt;br /&gt;
&lt;br /&gt;
In the code above the initialization of the class itself and the guard events are done in an undetermined order.  But actually it is ensured that the guard events are initialized after all ohter class/object initialization is performed.&lt;br /&gt;
&lt;br /&gt;
=== Examples of practical usage ===&lt;br /&gt;
&lt;br /&gt;
This section shows a few cases where monitors are handy.&lt;br /&gt;
&lt;br /&gt;
==== Writing to a log file ====&lt;br /&gt;
&lt;br /&gt;
Several threads needs to log information to a single log file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class log&lt;br /&gt;
    properties&lt;br /&gt;
        logStream : outputStream.&lt;br /&gt;
    predicates&lt;br /&gt;
        write : (...).&lt;br /&gt;
end class log&lt;br /&gt;
&lt;br /&gt;
implement log&lt;br /&gt;
    class facts&lt;br /&gt;
        logStream : outputStream := erroneous.&lt;br /&gt;
    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&lt;br /&gt;
 end implement log&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The monitor ensures that writing of a log lines are not mixed with each other, and that stream changes only takes place between writing of log lines.&lt;br /&gt;
&lt;br /&gt;
==== Shared output streams ====&lt;br /&gt;
&lt;br /&gt;
This monitor can be used to thread protect the operations of an output stream:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface outputStream_sync&lt;br /&gt;
    supports outputStream&lt;br /&gt;
end interface outputStream_sync&lt;br /&gt;
&lt;br /&gt;
class outputStream_sync : outputStream_sync&lt;br /&gt;
    constructors&lt;br /&gt;
        new : (outputStream Stream).&lt;br /&gt;
end class outputStream_sync &lt;br /&gt;
&lt;br /&gt;
implement outputStream_sync&lt;br /&gt;
    delegate interface outputStream to stream&lt;br /&gt;
&lt;br /&gt;
    facts&lt;br /&gt;
        stream : outputStream.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        new(Stream) :- stream := Stream.&lt;br /&gt;
end implement outputStream_sync&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should realize however that with code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
consists of &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;three separate&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; opeations, so it can still be the case (fx) that two threads first write the time and then one writes the &amp;quot;...&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
==== Queue ====&lt;br /&gt;
&lt;br /&gt;
The queue above is fine, but actually it may be better to create queue objects.  Using generic interfaces we can create a very general queue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        enqueue : (@Elem Value).&lt;br /&gt;
    predicates&lt;br /&gt;
        dequeue : () -&amp;gt; @Elem Value.&lt;br /&gt;
end interface queue&lt;br /&gt;
&lt;br /&gt;
class queue{@Elem} : queue{@Elem}&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        value_fact : (@Elem Value).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        enqueue(V) :-&lt;br /&gt;
            assert(value_fact(V)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        dequeue guard { value_fact(_), ! }.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            value_fact(V),&lt;br /&gt;
            !.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            common_exception::raise_error(....).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*[[wikipedia:Monitor (synchronization)]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2223</id>
		<title>Language Reference/Monitors</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Monitors&amp;diff=2223"/>
		<updated>2010-03-17T17:36:58Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Monitors}}&lt;br /&gt;
&lt;br /&gt;
A monitor is a language construction to synchronize two or more threads that use a shared resource, usually a hardware device or a set of variables. The compiler transparently inserts locking and unlocking code to appropriately designated procedures, instead of the programmer having to access concurrency primitives explicitly.&lt;br /&gt;
&lt;br /&gt;
Visual Prolog monitor entrances can be controlled by guard predicates (conditions).&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
Monitor interfaces and monitor classes are scopes:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;Scope&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;MonitorInterface&amp;gt;&lt;br /&gt;
    &amp;lt;MonitorClass&amp;gt;&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;/source&amp;gt;&lt;br /&gt;
A monitor interface is defined by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular interface definition:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorInterface&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;IntertfaceDefinition&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A monitor class is declared by writing the keyword &amp;#039;&amp;#039;&amp;#039;monitor&amp;#039;&amp;#039;&amp;#039; in front of a regular class declaration:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;vipbnf&amp;quot;&amp;gt;&amp;lt;MonitorClass&amp;gt; :&lt;br /&gt;
    monitor &amp;lt;ClassDeclaration&amp;gt;&amp;lt;/source&amp;gt;&lt;br /&gt;
Monitor classes and interfaces cannot declare &amp;#039;&amp;#039;&amp;#039;multi&amp;#039;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;&amp;#039;nondeterm&amp;#039;&amp;#039;&amp;#039; predicate members.&lt;br /&gt;
&lt;br /&gt;
=== Restrictions ===&lt;br /&gt;
&lt;br /&gt;
* A regular interface cannot support a monitor interface&lt;br /&gt;
* A monitor class cannot construct objects.&lt;br /&gt;
* It is not legal to inherit from a monitor (i.e. from a class that implements a monitor interface).&lt;br /&gt;
&lt;br /&gt;
=== Semantics ===&lt;br /&gt;
&lt;br /&gt;
The predicates and properties declared in a monitor are the &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;entrances&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; to the monitor.  A thread enters the monitor through an entrance and is in the monitor until it leaves that entrance again.  Only one thread is allowed to be in the monitor at the time.  So each entry is protected as a critical region.&lt;br /&gt;
&lt;br /&gt;
The semantics is simplest to understand as a program transformation (which is how it is implemented).  Consider this academic example:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :- &amp;lt;B1&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :- &amp;lt;B2&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :- &amp;lt;Bn&amp;gt;.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt; Where &amp;lt;B1&amp;gt;, &amp;lt;B2&amp;gt;, ..., &amp;lt;Bn&amp;gt; are clause bodies.  This code corresponds to the following &amp;quot;normal&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class mmmm&lt;br /&gt;
    predicates&lt;br /&gt;
        e1 : (a1 A1).&lt;br /&gt;
        e2 : (a2 A2).&lt;br /&gt;
        ...&lt;br /&gt;
        en : (an An).&lt;br /&gt;
end class mmmm&lt;br /&gt;
&lt;br /&gt;
implement mmmm&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e1(A1) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B1&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        e2(A2) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;B2&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
    ...&lt;br /&gt;
    clauses&lt;br /&gt;
        en(An) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                &amp;lt;Bn&amp;gt;&lt;br /&gt;
            finally&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
end implement mmmm&amp;lt;/vip&amp;gt;&lt;br /&gt;
So each monitor class is extended with a mutex, which is used to create a critical region around each entry body.&lt;br /&gt;
&lt;br /&gt;
The code for monitor objects are similar, except that the mutex object is owned by the object.&lt;br /&gt;
&lt;br /&gt;
=== Guards ===&lt;br /&gt;
&lt;br /&gt;
Consider a monitor protected queue:  some threads (&amp;#039;&amp;#039;producers&amp;#039;&amp;#039;) inserts elements in the queue and others (&amp;#039;&amp;#039;consumers&amp;#039;&amp;#039;) pick-out elements.  However, you cannot pick-out elements if the queue is empty.&lt;br /&gt;
&lt;br /&gt;
If we implement the queue using a monitor, the &amp;quot;pick-out&amp;quot; entry could be determ, failing if the queue is empty.  But then the consumers would have to &amp;quot;poll&amp;quot; the queue until an element can be obtained. Such polling uses system resources, and normally it is desirable to avoid polling. This problem can be solved by guard predicates.&lt;br /&gt;
&lt;br /&gt;
Each entry can have a guard associated in the implementation.  The quard is added as a special guard-clause before the other clauses of the entry.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Clause&amp;gt; : one of&lt;br /&gt;
    ...&lt;br /&gt;
    &amp;lt;GuardClause&amp;gt;.&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;GuardClause&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;LowerCaseIdentifier&amp;gt; .&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; guard &amp;lt;AnonymousPredicate&amp;gt; .&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can be the name of a predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard remove_guard.&lt;br /&gt;
    remove() = ...&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
{{Example| The guard can also be an anonymous predicate&lt;br /&gt;
&amp;lt;vip&amp;gt;&lt;br /&gt;
clauses&lt;br /&gt;
    remove guard { :- element_fact(_), ! }.&lt;br /&gt;
    remove() = ...&lt;br /&gt;
&amp;lt;/vip&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The guard predicates are evaluated when the monitor is created.  For monitor classes this means at program start, for object predicates this is immediately after the construction of the object.  The guard predicates are also evaluated whenever a tread leaves the monitor.  But they are &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; evaluated at any other time.&lt;br /&gt;
&lt;br /&gt;
If a certain guard succeeds the corresponding entry is &amp;#039;&amp;#039;open&amp;#039;&amp;#039;, if it fails the entry is &amp;#039;&amp;#039;closed&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
It is only possible to enter open entries.&lt;br /&gt;
&lt;br /&gt;
{{Example| Here is a queue class that solves the pick-out problem using a guard predicate on the &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; operation:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            assert(element_fact(Element)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove guard remove_guard.&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            retract(element_fact(Element)),&lt;br /&gt;
            !;&lt;br /&gt;
            common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
    predicates&lt;br /&gt;
        remove_quard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
Notice that &amp;#039;&amp;#039;&amp;#039;remove&amp;#039;&amp;#039;&amp;#039; is a procedure, because threads that call remove will &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;wait&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; until there is an element for them.  The guard predicate &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; succeeds if there is an element in the queue.&lt;br /&gt;
&lt;br /&gt;
So &amp;#039;&amp;#039;&amp;#039;remove_guard&amp;#039;&amp;#039;&amp;#039; is evaluated each time a thread leaves the monitor, and the &amp;#039;&amp;#039;&amp;#039;element_fact&amp;#039;&amp;#039;&amp;#039; fact database can only be changed by a thread that is inside the monitor.  Therefore the guard value stays sensible all the time (i.e. when there are no threads in the monitor).  It is important to ensure such &amp;quot;stays sensible&amp;quot; condition for guards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Guard predicates are handled in the transformation mentioned above.  The queue example is effectively the same as this &amp;quot;monitor-free&amp;quot; code:&lt;br /&gt;
&amp;lt;vip&amp;gt;class queue&lt;br /&gt;
    predicates&lt;br /&gt;
        insert : (integer Element).&lt;br /&gt;
    predicates&lt;br /&gt;
        remove : () -&amp;gt; integer Element.&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue&lt;br /&gt;
    class facts&lt;br /&gt;
        monitorRegion : mutex := mutex::create(false).&lt;br /&gt;
        remove_guard_event : event := event::create(true, toBoolean(remove_guard())).&lt;br /&gt;
        element_fact : (integer Element) nondeterm.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        insert(Element) :-&lt;br /&gt;
            _W = monitorRegion:wait(),&lt;br /&gt;
            try&lt;br /&gt;
                assert(element_fact(Element))&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        remove() = Element :-&lt;br /&gt;
            _W = syncObject::waitAll([monitorRegion, remove_guard_event]),&lt;br /&gt;
            try&lt;br /&gt;
                retract(element_fact(Element)),&lt;br /&gt;
                !;&lt;br /&gt;
                common_exception::raise_error(common_exception::classInfo, predicate_name(),&lt;br /&gt;
                    &amp;quot;The guard should have ensured that the queue is not empty&amp;quot;)&lt;br /&gt;
            finally&lt;br /&gt;
                setGuardEvents(),&lt;br /&gt;
                monitorRegion:release()&lt;br /&gt;
            end try.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        remove_guard : () determ.&lt;br /&gt;
    clauses&lt;br /&gt;
        remove_guard() :-&lt;br /&gt;
            element_fact(_),&lt;br /&gt;
            !.&lt;br /&gt;
&lt;br /&gt;
    class predicates&lt;br /&gt;
        setGuardEvents : ().&lt;br /&gt;
    clauses&lt;br /&gt;
        setGuardEvents() :-&lt;br /&gt;
            remove_guard_event:setSignaled(toBoolean(remove_guard())).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
An &amp;#039;&amp;#039;&amp;#039;event&amp;#039;&amp;#039;&amp;#039; is created for each guard predicate, this event is set to &amp;#039;&amp;#039;signaled&amp;#039;&amp;#039; if the guard predicate succeeds.  As mentioned it is set during the creation of the monitor and each time a predicate leaves the monitor (before it leaves the critical region).&lt;br /&gt;
&lt;br /&gt;
When entering an entry the threads waits &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;both&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; for the &amp;#039;&amp;#039;&amp;#039;monitorRegion&amp;#039;&amp;#039;&amp;#039; and for the guard event to be in signalled state.&lt;br /&gt;
&lt;br /&gt;
In the code above the initialization of the class itself and the guard events are done in an undetermined order.  But actually it is ensured that the guard events are initialized after all ohter class/object initialization is performed.&lt;br /&gt;
&lt;br /&gt;
=== Examples of practical usage ===&lt;br /&gt;
&lt;br /&gt;
This section shows a few cases where monitors are handy.&lt;br /&gt;
&lt;br /&gt;
==== Writing to a log file ====&lt;br /&gt;
&lt;br /&gt;
Several threads needs to log information to a single log file.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor class log&lt;br /&gt;
    properties&lt;br /&gt;
        logStream : outputStream.&lt;br /&gt;
    predicates&lt;br /&gt;
        write : (...).&lt;br /&gt;
end class log&lt;br /&gt;
&lt;br /&gt;
implement log&lt;br /&gt;
    class facts&lt;br /&gt;
        logStream : outputStream := erroneous.&lt;br /&gt;
    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&lt;br /&gt;
 end implement log&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The monitor ensures that writing of a log lines are not mixed with each other, and that stream changes only takes place between writing of log lines.&lt;br /&gt;
&lt;br /&gt;
==== Shared output streams ====&lt;br /&gt;
&lt;br /&gt;
This monitor can be used to thread protect the operations of an output stream:&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface outputStream_sync&lt;br /&gt;
    supports outputStream&lt;br /&gt;
end interface outputStream_sync&lt;br /&gt;
&lt;br /&gt;
class outputStream_sync : outputStream_sync&lt;br /&gt;
    constructors&lt;br /&gt;
        new : (outputStream Stream).&lt;br /&gt;
end class outputStream_sync &lt;br /&gt;
&lt;br /&gt;
implement outputStream_sync&lt;br /&gt;
    delegate interface outputStream to stream&lt;br /&gt;
&lt;br /&gt;
    facts&lt;br /&gt;
        stream : outputStream.&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        new(Stream) :- stream := Stream.&lt;br /&gt;
end implement outputStream_sync&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should realize however that with code like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;    clauses&lt;br /&gt;
        write(...) :-&lt;br /&gt;
            logStream:write(time::new():formatShortDate(), &amp;quot;: &amp;quot;),&lt;br /&gt;
            logStream:write(...),&lt;br /&gt;
            logStream:nl().&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
consists of &amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039;three separate&amp;#039;&amp;#039;&amp;#039;&amp;#039;&amp;#039; opeations, so it can still be the case (fx) that two threads first write the time and then one writes the &amp;quot;...&amp;quot;, etc.&lt;br /&gt;
&lt;br /&gt;
==== Queue ====&lt;br /&gt;
&lt;br /&gt;
The queue above is fine, but actually it may be better to create queue objects.  Using generic interfaces we can create a very general queue:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vip&amp;gt;monitor interface queue{@Elem}&lt;br /&gt;
    predicates&lt;br /&gt;
        enqueue : (@Elem Value).&lt;br /&gt;
    predicates&lt;br /&gt;
        dequeue : () -&amp;gt; @Elem Value.&lt;br /&gt;
end interface queue&lt;br /&gt;
&lt;br /&gt;
class queue{@Elem} : queue{@Elem}&lt;br /&gt;
end class queue&lt;br /&gt;
&lt;br /&gt;
implement queue{@Elem}&lt;br /&gt;
    facts&lt;br /&gt;
        value_fact : (@Elem Value).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        enqueue(V) :-&lt;br /&gt;
            assert(value_fact(V)).&lt;br /&gt;
&lt;br /&gt;
    clauses&lt;br /&gt;
        dequeue guard { value_fact(_), ! }.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            value_fact(V),&lt;br /&gt;
            !.&lt;br /&gt;
        dequeue() = V :-&lt;br /&gt;
            common_exception::raise_error(....).&lt;br /&gt;
end implement queue&amp;lt;/vip&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*[[wikipedia:Monitor (synchronization)]]&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2222</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2222"/>
		<updated>2010-03-17T17:26:50Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning. &lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4 &lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2221</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2221"/>
		<updated>2010-03-17T17:24:13Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* Insertion Points */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts are at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning. &lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4 &lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2220</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2220"/>
		<updated>2010-03-17T17:22:06Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* union */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts is at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning. &lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4 &lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ union structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2219</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2219"/>
		<updated>2010-03-17T17:17:31Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* out */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts is at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning. &lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4 &lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ uninon structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
	<entry>
		<id>https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2218</id>
		<title>Language Reference/Attributes</title>
		<link rel="alternate" type="text/html" href="https://wiki.visual-prolog.com/index.php?title=Language_Reference/Attributes&amp;diff=2218"/>
		<updated>2010-03-17T17:15:39Z</updated>

		<summary type="html">&lt;p&gt;Elizabeth Safro: /* noDefaultConstructor */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Preliminary Documentation}}&lt;br /&gt;
&lt;br /&gt;
{{languageReferenceNavbar|Attributes}}&lt;br /&gt;
&lt;br /&gt;
Various definitions and declarations can be annotated with attributes.  This section describes the general syntax of attributes and where they can be placed.  It also describes the meaning of the specific attributes.&lt;br /&gt;
&lt;br /&gt;
=== Syntax ===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attributes&amp;gt; :&lt;br /&gt;
    [ &amp;lt;Attribute&amp;gt;-comma-sep-list ]&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;Attribute&amp;gt; : one of&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt;&lt;br /&gt;
    &amp;lt;LowerCaseIdentifier&amp;gt; ( &amp;lt;Literal&amp;gt;-comma-sep-list )&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where the literals must either be numbers or string literals.&lt;br /&gt;
&lt;br /&gt;
=== Insertion Points ===&lt;br /&gt;
&lt;br /&gt;
The attributes of interfaces, classes and implementations are right before the scope qualifications.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;InterfaceDeclaration&amp;gt; :&lt;br /&gt;
   interface &amp;lt;IinterfaceName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end interface &amp;lt;IinterfaceName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassDeclaration&amp;gt; :&lt;br /&gt;
   class &amp;lt;ClassName&amp;gt; &amp;lt;ConstructionType&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end class &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ClassImplementation&amp;gt; :&lt;br /&gt;
   implement &amp;lt;ClassName&amp;gt; &amp;lt;Attributes&amp;gt;-opt &amp;lt;ScopeQualifications&amp;gt; &amp;lt;Sections&amp;gt; end implement &amp;lt;ClassName&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of constants, domains, predicates, properties and facts is at the end (i.e. right before the terminating dot).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;ConstantDefinition&amp;gt;: one of&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
    &amp;lt;ConstantName&amp;gt; : &amp;lt;TypeName&amp;gt; = &amp;lt;ConstantValue&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;DomainDefinition&amp;gt;:&lt;br /&gt;
    &amp;lt;DomainName&amp;gt; &amp;lt;FormalTypeParameterList&amp;gt;-opt = &amp;lt;TypeExpression&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PredicateDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomain&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;PredicateName&amp;gt; : &amp;lt;PredicateDomainName&amp;gt; &amp;lt;LinkName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;PropertyDeclaration&amp;gt; :&lt;br /&gt;
    &amp;lt;PropertyName&amp;gt; : &amp;lt;PropertyType&amp;gt; &amp;lt;FlowPattern&amp;gt;-list-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FactDeclaration&amp;gt; :&lt;br /&gt;
   &amp;lt;FactVariableDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&lt;br /&gt;
   &amp;lt;FactFunctorDeclaration&amp;gt; &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The attributes of formal arguments are at the end.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vipbnf&amp;gt;&amp;lt;FormalArgument&amp;gt; :&lt;br /&gt;
    &amp;lt;TypeExpression&amp;gt; &amp;lt;ArgumentName&amp;gt;-opt &amp;lt;Attributes&amp;gt;-opt&amp;lt;/vipbnf&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Specific Attributes ===&lt;br /&gt;
&lt;br /&gt;
==== byVal ====&lt;br /&gt;
&lt;br /&gt;
An argument is transferred directly on the stack rather than using a pointer.  Valid for formal predicate arguments provided the &amp;lt;vp&amp;gt;language&amp;lt;/vp&amp;gt; is &amp;lt;vp&amp;gt;stdcall&amp;lt;/vp&amp;gt;, &amp;lt;vp&amp;gt;apicall&amp;lt;/vp&amp;gt; or &amp;lt;vp&amp;gt;c&amp;lt;/vp&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    externalP : (point Point [byVal]) language apicall.&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== deprecated ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is deprecated. The string literal describes how to migrate from it.  The entity still exist, but usage will cause a warning. &lt;br /&gt;
The entity will not exist in future versions of Visual Prolog.  Valid for member declarations and scopes.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    oldFasioned : (string Arg) [deprecated(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== formatString ====&lt;br /&gt;
&lt;br /&gt;
The argument is a {{lang2|Domains|Format Strings|format string}} for a subsequent ellipsis argument (i.e. &amp;lt;vp&amp;gt;...&amp;lt;/vp&amp;gt;).  Valid for one string argument of a predicate with an ellipsis argument.  The use of formatString will make the compiler check the validity of actual arguments with respect to actual format strings (where possible).&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    writef : (string Format [formatString], ...).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== in ====&lt;br /&gt;
&lt;br /&gt;
The argument is an input argument.  Valid for a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string InputArg [in]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== inline ====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;vp&amp;gt;inline&amp;lt;/vp&amp;gt; alters the memory layout of a struct (i.e. a single alternative functor domain with an align qualification).  The corresponding field is inlined instead of being pointed to.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    point = align 4 &lt;br /&gt;
        p(integer X, integer Y).&lt;br /&gt;
&lt;br /&gt;
domains&lt;br /&gt;
    rectangle = align 4&lt;br /&gt;
        r(&lt;br /&gt;
            point UpperLeft [inline],&lt;br /&gt;
            point LowerRight [inline]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
It is also possible to inline fixed size string and string8 fields in structs:&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    device = align 4&lt;br /&gt;
        device(&lt;br /&gt;
            integer Id,&lt;br /&gt;
            string DeviceName [inline(32)]&lt;br /&gt;
        ).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== noDefaultConstructor ====&lt;br /&gt;
&lt;br /&gt;
Used for a class to indicate that it should not have an implicit default constructor, and can thus be used to a class that does not have any constructors at all.  Valid for an object creating class declaration.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;class classWithoutPublicConstructors : myInterface&lt;br /&gt;
    [noDefaultConstructor]&lt;br /&gt;
...&lt;br /&gt;
end class classWithoutPublicConstructors&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== out ====&lt;br /&gt;
&lt;br /&gt;
The argument is an output argument.  Valid for a a formal predicate argument.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    pred : (string OutputArg [out]).&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== retired ====&lt;br /&gt;
&lt;br /&gt;
The declared entity is retired. The string literal describes how to migrate from it.  The entity does not exist anymore.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    veryOldFasioned : (string Arg) [retired(&amp;quot;Use newFasion instead&amp;quot;)].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== union ====&lt;br /&gt;
&lt;br /&gt;
Used for creating functor domains with several alternatives but no real functors.  This should only be used to mimic C/C++ uninon structs in low-level interfacing.  Valid for functor domain with several alternatives and alignment.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;domains&lt;br /&gt;
    u64var = align 4&lt;br /&gt;
        u64(unsigned64 Value64);&lt;br /&gt;
        u64_struct(unsigned Low32, unsigned High32)&lt;br /&gt;
        [union].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==== used ====&lt;br /&gt;
&lt;br /&gt;
An unused local member can be marked &amp;lt;vp&amp;gt;used&amp;lt;/vp&amp;gt; to prevent the compiler to issue a warning and remove the corresponding code.  Valid for local members.&lt;br /&gt;
&lt;br /&gt;
{{Example|&lt;br /&gt;
&amp;lt;vip&amp;gt;predicates&lt;br /&gt;
    seeminglyUnused : () [used].&amp;lt;/vip&amp;gt;&lt;br /&gt;
}}&lt;/div&gt;</summary>
		<author><name>Elizabeth Safro</name></author>
	</entry>
</feed>