Discussions related to Visual Prolog
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

[explicitTag] attribute in vpiDomains

Unread post by Peter Muraya »

Hi,
I encounter this attribute explicitTag quite often in class vpiDomains and I don't see any documentation referring to it. Here is an example of where it is used.

Code: Select all

domains     menu =         resMenu(resid Resid);         dynMenu(menuItem* SubMenu);         noMenu [explicitTag].
What is it telling the compiler?
Mutall Data Management Technical Support
User avatar
Thomas Linder Puls
VIP Member
Posts: 1399
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

The representation of compound domains (with more than one alternative) have changed binary representation to a more optimal representation.

However certain domains are also used in external C/C++ based library code and to avoid rewriting this code these particular domains continue to use the old representation. The explicitTag attribute instructs the compiler to use the old representation.

We have not documented this externally, because we do not externally support/guarantee a certain represen of such domains. We continue to preserve the possibility to change the binary representation of the mentioned kind of domains.

Binary serialization to files/streams have not changed. So all external behavior should be unchanged.
Regards Thomas Linder Puls
PDC
Peter Muraya
VIP Member
Posts: 147
Joined: 5 Dec 2012 7:29

Unread post by Peter Muraya »

Thanks Thomas.
I read that "this is for internal use by the the Visual Prolog compiler developers". Would it make sense to provide a means of adding new local attributes for other developers? At one time, I don't remember why I really wanted to, I wished that Prolog would allow me to add my own attribute for my local need -- and one which the compiler would ignore.
Mutall Data Management Technical Support
Post Reply