From a-doug@microsoft.com  Thu Aug 10 06:17:29 2000
Received: from mail4.microsoft.com (mail4.microsoft.com [131.107.3.122])
	by swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id GAA14116
	for <prolog@swi.psy.uva.nl>; Thu, 10 Aug 2000 06:17:25 +0200 (MET DST)
Received: from 157.54.9.103 by mail4.microsoft.com (InterScan E-Mail VirusWall NT); Wed, 09 Aug 2000 21:16:25 -0700 (Pacific Daylight Time)
Received: by INET-IMC-04 with Internet Mail Service (5.5.2651.58)
	id <PGAJXKAW>; Wed, 9 Aug 2000 21:15:22 -0700
Message-ID: <E713F2760348D211A9B600805F6FA1AB09509A91@RED-MSG-09.itg-messaging.redmond.corp.microsoft.com>
From: "Douglas Miles (Volt Computer)" <a-doug@microsoft.com>
To: "'Paul Singleton'" <p.singleton@keele.ac.uk>,
        SWI Prolog
	 <prolog@swi.psy.uva.nl>
Cc: Dean Meleshenko <deanmel@microsoft.com>
Subject: RE: representing terms canonically
Date: Wed, 9 Aug 2000 21:16:27 -0700 
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2651.58)
Content-Type: multipart/mixed;
	boundary="----_=_NextPart_000_01C00281.C1004130"

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C00281.C1004130
Content-Type: multipart/alternative;
	boundary="----_=_NextPart_001_01C00281.C1004130"


------_=_NextPart_001_01C00281.C1004130
Content-Type: text/plain;
	charset="ISO-8859-1"

Paul I am working on a simular project while we speak.

I have been implementing it with a psuedo object modeling system. that
transfers easiely between domains of Prolog and COM, Java, VB


There are two types:  models and instances of the living models.

These models are built of identicle shaped nodes

'Each node contains this struct
Public Type ModelNode
     MemberName As String
     Modelkind As ModelKinds
     Pointer As String
     Origin As Object
     TypeName As String
     NativeTli As TypeLibInfo
     Models As PropertyMap
     SiteName As SiteNames
    'Only Properties and Methods use these
     InvokeKind As InvokeKinds
     ReturnVARType As VarTypeInfo
     Value As Variant
End Type

 
They themselves transfer in/out of prolog terms  I have been testing this
against live COM objects in Visual Basic. (So far very successfull)

The structures are like trees with nodes that all languages have one special
form for rebuilding the objects

 

Here are the Basic node types i use

'Each node falls into one of these model parts

Public Enum ModelKinds
    MODELKIND_PROPERTY = (tli.InvokeKinds.INVOKE_PROPERTYPUT Or
tli.InvokeKinds.INVOKE_PROPERTYGET)    'if this is set the object holds a
pointer to the parent object and the interface or variable
    MODELKIND_CONTENT = tli.InvokeKinds.INVOKE_PROPERTYPUTREF   'Basic
building block of any model (this is the OBJECT)
    MODELKIND_FUNCTION = tli.InvokeKinds.INVOKE_FUNC
    MODELKIND_EVENT = tli.InvokeKinds.INVOKE_EVENTFUNC
    MODELKIND_UNKNOWN = tli.InvokeKinds.INVOKE_UNKNOWN
    MODELKIND_PARAMETER  '(this is mainly used for defining event and
funbction params)
End Enum
 
'The site name was what application was originally used to build the object
(but and application can share them)
Public Enum SiteNames
    SITENAME_UNKNOWN = 0
    SITENAME_UNBOUND = 1  ' Prolog unbound
    SITENAME_ARRAY = 2  'Safe
    SITENAME_COLLECTION = 4 'Any site that For-Each-In
    SITENAME_MAP = 8 ' Morphism DataType
    SITENAME_LIST = 16 'VWorlds only
    SITENAME_REFDATA = 32   'usualy holds a strings/Long (basicly non
objects) that ar AS-IS terms
    SITENAME_VWTHING = 64 ' Dynamic virtual worlds com
    SITENAME_VWSERVER = 128 ' See Typlib info
    SITENAME_WINCOM = 256 'Standard windows COM ' OLE  Automated 
    SITENAME_MORPHISM = 512
    SITENAME_PROLOG_SERVER = 1024   'PROQUERY.DLL
    SITENAME_PROLOG_CLIENT = 2048  'SWIACTX.DLL
End Enum
 
Attached is a an HTML that shows an expanding interlanguage Model


-----Original Message-----
From: Paul Singleton [  <mailto:p.singleton@keele.ac.uk>
mailto:p.singleton@keele.ac.uk]
Sent: Wednesday, August 09, 2000 4:09 PM
To: SWI Prolog
Subject: representing terms canonically


I want to represent general Prolog terms in a non-Prolog environment (e.g.
structures in Java or Visual Basic; byte strings in databases or networks)
with all these properties if possible:

 * no loss of information
    + an equivalent term should be reconstructable from the foreign repn.
      (I can do this :-)
    + preserve internal order of any variables (I can see how to do this)

>>>> I am using VTABLE ofsets of IDispatch Pointers for COM..  (but saving
the actual values in a special      SITENAME_REFDATA + MODELKIND_CONTENT
node object)

 * compactly
    + cyclic terms have finite representations
    + recombinant terms are not "exploded"
    + common atoms, variables (of course) and subterms are factored out

>>>> I keep an AddRef Collection of ObjectPointers to make sure when the
Nodes have been already included in the graph

 * canonically
    + all (inc. cyclic) terms denoting the "same" term (apart from renaming
      of variables) have a single common representation
>>>>  the nodes tend to translate system to system and language to language 
>>>> I have only  one terming system  that had to only be coded
com_to_datum, datum_to_com, datum_to_prolog, prolog_to_datam,
*_to_datum, datum_to_* 

I suspect it is obvious to some others that canonical repn of cyclic terms
is in general impossible, or infeasible to compute?  It just seems likely
to me...
>>>> thsoe objects i mark as SITENAME_PROLOG_SERVER +     MODELKIND_FUNCTION
(only if they are self iterative)  I move between prolog and COM

I want to factor out common atoms because some may be very large.
 
>>>> I am not been afarid of my objects bloating too much but probly should
be

I want to preserve variable order in case it is significant, e.g. indexed
sets of lemmas for some theorem prover or other interpreter...

>>>> Most Models I use are represented in SETS .. i am going to be moving to
LISTS as soon as SITENAME_ARRAY is CoSymetrical to SITENAME_COLLECTION
>>>> Pass things arround with {NAME=Value ,NAME=Value ,NAME=Value } SETs so
you can order the set based on the proper name order (that is Site defined)
to make a VALUE,VALUE,VALUE if you wish

I want to represent cyclic terms finitely because I can't guarantee that
applications won't build them, and anyway some applications may use them
(whether they *should* is irrelevant, I hope).

>>>> This is where one child has more then one dirrection on the links (or
just more then one parrent node will do this In my node model )
 have this throughout the MSBNX Control (it has a child.parent.child.parent
(mainly so you can always move one step up from any point in a tree)..etc..)
.. the way i block this out is i made parentname a child property and treat
it as a SITENAME_REFDATA (terminal) as opposed to SITENAME_CONTENT (which is
recurively modeled)

I'm willing to assume that no atom gc or stack shifting occurs while any
particular term is being exported.

I reckon this needs facilities not provided in the FLI: e.g. get the
dictionary address of an atom, and the heap address of a compound term

>>> I realy havent been able to involve myself with staticly comprehending
what any particualar site is Physicly doing with my term.. (i do store
static pointers but only into live objects (not cause i want to, but i am
afraid i'll lose them in  system memory :)  (also keeps the objects from
terminationing to have asked for pointers to them) or while in prolog i tend
to think that i am Meta-processing Level and a string or a number means
something in the live object context... the classes/names are for my prolog
program to understand :
In terms of what the prolog site does with it:    it manipulates the object
instead of the object manipulating prolog.

I have a tentative algorithm for factoring common subterms based on
maintaining a hash value for each subterm during traversal, then using
a safe (cycle-detecting) comparison...

>>>>> I need your help Paul  :) .. I am just building the stable system that
has all this inter-language support ,,,,   and i havent even begun to decide
how to use it !
And that's as far as I've got - comments, help and advice please.

Paul Singleton


----------------
* To UNSUBSCRIBE, please use the HTML form at

     <http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist>
http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist

or send mail to prolog-request@swi.psy.uva.nl using the Subject:
"unsubscribe"
(without the quotes) and *no* message body.

** An ARCHIVE of this list is maintained at

     <http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/>
http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/


------_=_NextPart_001_01C00281.C1004130
Content-Type: text/html;
	charset="ISO-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<TITLE></TITLE>

<META content="MSHTML 5.50.4134.600" name=GENERATOR></HEAD>
<BODY>
<P><FONT color=#0000ff size=2>Paul I am working on a simular project while we 
speak.<BR><BR>I have been implementing it with a psuedo object modeling system. 
that transfers easiely between domains of&nbsp;Prolog and COM<SPAN 
class=375324902-10082000>, Java, VB</SPAN></FONT></P><SPAN 
class=375324902-10082000></SPAN>
<P><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><BR><FONT color=#0000ff size=2>There are two 
types:&nbsp;&nbsp;models and instances of the living models.</FONT></P>
<P><SPAN class=375324902-10082000></SPAN><FONT color=#0000ff size=2>T<SPAN 
class=375324902-10082000>hese models are built of identicle shaped 
nodes</SPAN></FONT></P>
<DIV>
<DIV>
<DIV><STRONG><FONT face=Arial color=#0000ff size=2>'Each node contains this 
struct</FONT></STRONG></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Public Type 
ModelNode<BR>&nbsp;&nbsp;&nbsp;&nbsp; MemberName As 
String<BR>&nbsp;&nbsp;&nbsp;&nbsp; Modelkind As 
ModelKinds<BR>&nbsp;&nbsp;&nbsp;&nbsp; Pointer As 
String<BR>&nbsp;&nbsp;&nbsp;&nbsp; Origin As Object<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
TypeName As String<BR>&nbsp;&nbsp;&nbsp;&nbsp; NativeTli As 
TypeLibInfo<BR>&nbsp;&nbsp;&nbsp;&nbsp; Models As 
PropertyMap<BR>&nbsp;&nbsp;&nbsp;&nbsp; SiteName As 
SiteNames<BR>&nbsp;&nbsp;&nbsp; 'Only Properties and Methods use 
these<BR>&nbsp;&nbsp;&nbsp;&nbsp; InvokeKind As 
InvokeKinds<BR>&nbsp;&nbsp;&nbsp;&nbsp; ReturnVARType As 
VarTypeInfo<BR>&nbsp;&nbsp;&nbsp;&nbsp; Value As Variant<BR>End 
Type<BR></FONT></DIV></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><FONT color=#0000ff 
size=2></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2>They themselves&nbsp;<SPAN 
class=375324902-10082000>transfer in/out of prolog terms</SPAN>&nbsp; I have 
been testing this against live COM objects in Visual Basic. (So far very 
successfull)</FONT></DIV>
<DIV>
<P><FONT face=Arial color=#0000ff size=2>The structures are like trees with 
nodes that all languages have one special form for rebuilding the 
objects</FONT></P>
<P><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</P>
<P><SPAN class=375324902-10082000><FONT face=Arial color=#0000ff size=2>Here are 
the Basic node types i use<BR><BR></FONT></SPAN><STRONG><FONT face=Arial 
color=#0000ff size=2>'Each node falls into one of these model 
parts</FONT></STRONG></P></DIV></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Public Enum 
ModelKinds<BR>&nbsp;&nbsp;&nbsp; MODELKIND_PROPERTY = 
(tli.InvokeKinds.INVOKE_PROPERTYPUT Or tli.InvokeKinds.INVOKE_PROPERTYGET)<SPAN 
class=375324902-10082000>&nbsp;&nbsp;&nbsp; 'if this is set the object holds a 
pointer to the parent object&nbsp;and the interface or variable</SPAN><BR><SPAN 
class=375324902-10082000>&nbsp;&nbsp;&nbsp; </SPAN>MODELKIND_CONTENT&nbsp;= 
tli.InvokeKinds.INVOKE_PROPERTYPUTREF<SPAN class=375324902-10082000>&nbsp;&nbsp; 
'Basic building block of any model (this is the 
OBJECT)</SPAN><BR>&nbsp;&nbsp;&nbsp; MODELKIND_FUNCTION&nbsp;= 
tli.InvokeKinds.INVOKE_FUNC<BR>&nbsp;&nbsp;&nbsp; MODELKIND_EVENT = 
tli.InvokeKinds.INVOKE_EVENTFUNC<BR>&nbsp;&nbsp;&nbsp; MODELKIND_UNKNOWN = 
tli.InvokeKinds.INVOKE_UNKNOWN<BR>&nbsp;&nbsp;&nbsp; MODELKIND_PARAMETER<SPAN 
class=375324902-10082000>&nbsp; '(this is mainly used for defining event and 
funbction params)</SPAN><BR>End Enum</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><STRONG><FONT face=Arial><FONT color=#0000ff><FONT size=2>'The site name 
was what application was&nbsp;<SPAN class=375324902-10082000>originally 
</SPAN>used to build the object<SPAN class=375324902-10082000> (but and 
application can share them)</SPAN></FONT></FONT></FONT></STRONG></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>Public Enum 
SiteNames<BR>&nbsp;&nbsp;&nbsp; SITENAME_UNKNOWN = 0<BR>&nbsp;&nbsp;&nbsp; 
SITENAME_UNBOUND = 1<SPAN class=375324902-10082000>&nbsp; ' Prolog 
unbound</SPAN><BR>&nbsp;&nbsp;&nbsp; SITENAME_ARRAY = 2<SPAN 
class=375324902-10082000>&nbsp; 'Safe</SPAN><BR>&nbsp;&nbsp;&nbsp; 
SITENAME_COLLECTION = 4<SPAN class=375324902-10082000> 'Any site that 
For-Each-In</SPAN><BR>&nbsp;&nbsp;&nbsp; SITENAME_MAP = 8<SPAN 
class=375324902-10082000> ' Morphism DataType</SPAN><BR>&nbsp;&nbsp;&nbsp; 
SITENAME_LIST = 16<SPAN class=375324902-10082000> 'VWorlds 
only</SPAN><BR>&nbsp;&nbsp;&nbsp; SITENAME_REFDATA = 32<SPAN 
class=375324902-10082000>&nbsp;&nbsp; 'usualy holds a strings/Long (basicly non 
objects) that ar AS-IS terms</SPAN><BR>&nbsp;&nbsp;&nbsp; SITENAME_VWTHING = 
64<SPAN class=375324902-10082000> ' Dynamic virtual worlds 
com</SPAN><BR>&nbsp;&nbsp;&nbsp; SITENAME_VWSERVER = 128<SPAN 
class=375324902-10082000> ' See Typlib info</SPAN><BR>&nbsp;&nbsp;&nbsp; 
SITENAME_WINCOM = 256<SPAN class=375324902-10082000> 'Standard windows COM ' 
OLE&nbsp; Automated&nbsp;</SPAN><BR>&nbsp;&nbsp;&nbsp; SITENAME_MORPHISM = 
512<BR>&nbsp;&nbsp;&nbsp; SITENAME_PROLOG_SERVER = 1024<SPAN 
class=375324902-10082000>&nbsp;&nbsp; 'PROQUERY.DLL</SPAN><BR>&nbsp;&nbsp;&nbsp; 
SITENAME_PROLOG_CLIENT = 2048<SPAN class=375324902-10082000>&nbsp; 
'SWIACTX.DLL</SPAN><BR>End Enum</FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=375324902-10082000></SPAN></FONT></FONT></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=375324902-10082000>Attached</SPAN> is a&nbsp;<SPAN 
class=375324902-10082000>an HTML that shows an expanding interlanguage 
Model</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><BR><BR><FONT size=2>-----Original 
Message-----<BR>From: Paul Singleton [</FONT><A 
href="mailto:p.singleton@keele.ac.uk"><FONT 
size=2>mailto:p.singleton@keele.ac.uk</FONT></A><FONT size=2>]<BR>Sent: 
Wednesday, August 09, 2000 4:09 PM<BR>To: SWI Prolog<BR>Subject: representing 
terms canonically<BR><BR><BR>I want to represent general Prolog terms in a 
non-Prolog environment (e.g.<BR>structures in Java or Visual Basic; byte strings 
in databases or networks)<BR>with all these properties if 
possible:<BR><BR>&nbsp;* no loss of information<BR>&nbsp;&nbsp;&nbsp; + an 
equivalent term should be reconstructable from the foreign 
repn.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (I can do this :-)<BR>&nbsp;&nbsp;&nbsp; 
+ preserve internal order of any variables (I can see how to do 
this)<BR><BR><FONT color=#0000ff>&gt;&gt;&gt;&gt; I am using VTABLE ofsets of 
IDispatch Pointers for COM..<SPAN class=375324902-10082000>&nbsp; (but saving 
the actual values in a special&nbsp;&nbsp;<FONT face=Arial>&nbsp;&nbsp;&nbsp; 
SITENAME_REFDATA + MODELKIND_CONTENT&nbsp;node 
object)</FONT></SPAN></FONT><BR><BR>&nbsp;* compactly<BR>&nbsp;&nbsp;&nbsp; + 
cyclic terms have finite representations<BR>&nbsp;&nbsp;&nbsp; + recombinant 
terms are not "exploded"<BR>&nbsp;&nbsp;&nbsp; + common atoms, variables (of 
course) and subterms are factored out<BR><BR><FONT 
color=#0000ff>&gt;&gt;&gt;&gt; I keep an AddRef Collection of ObjectPointers to 
make sure when the Nodes have been already included in the 
graph</FONT><BR><BR>&nbsp;* canonically<BR>&nbsp;&nbsp;&nbsp; + all (inc. 
cyclic) terms denoting the "same" term (apart from 
renaming<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; of variables) have a single common 
representation</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2>
<DIV><FONT color=#0000ff><SPAN 
class=375324902-10082000>&gt;&gt;&gt;&gt;&nbsp;<FONT size=2><FONT 
color=#0000ff><SPAN class=375324902-10082000>&nbsp;the&nbsp;nodes tend to 
translate system to system and language to language 
</SPAN></FONT></FONT></SPAN></FONT></DIV></FONT></DIV>
<DIV><FONT face=Arial></FONT><FONT color=#0000ff><FONT size=2>&gt;&gt;&gt;&gt; I 
have<SPAN class=375324902-10082000> only </SPAN>&nbsp;one terming 
system&nbsp;<SPAN class=375324902-10082000> </SPAN>that had to only be 
coded&nbsp;&nbsp; com_to_datum, datum_to_com, datum_to_prolog, 
prolog_to_datam<SPAN class=375324902-10082000>,</SPAN></FONT></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff>*_to_datum, 
datum_to_*&nbsp;</FONT><BR><BR>I suspect it is obvious to some others that 
canonical repn of cyclic terms<BR>is in general impossible, or infeasible to 
compute?&nbsp; It just seems likely<BR>to me...<BR><SPAN 
class=375324902-10082000><FONT color=#0000ff>&gt;&gt;&gt;&gt; thsoe objects i 
mark as <FONT face=Arial>SITENAME_PROLOG_SERVER +&nbsp;&nbsp;&nbsp;&nbsp; 
MODELKIND_FUNCTION&nbsp; (only if they are self iterative)&nbsp; I move between 
prolog and COM</FONT></FONT></SPAN></FONT></DIV>
<DIV><FONT size=2><BR>I want to factor out common atoms because some may be very 
large.</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=375324902-10082000><FONT color=#0000ff size=2>&gt;&gt;&gt;&gt; 
I am not been afarid of my objects bloating too much but probly should 
be</FONT></SPAN><BR><BR><FONT size=2>I want to preserve variable order in case 
it is significant, e.g. indexed<BR>sets of lemmas for some theorem prover or 
other interpreter...<BR></DIV></FONT>
<DIV><SPAN class=375324902-10082000><FONT color=#0000ff size=2>&gt;&gt;&gt;&gt; 
Most Models I use are represented in SETS .. i am going to be moving to LISTS as 
soon as SITENAME_ARRAY is CoSymetrical to 
SITENAME_COLLECTION</FONT></SPAN></DIV>
<DIV><SPAN class=375324902-10082000><FONT face=Arial color=#0000ff 
size=2>&gt;&gt;&gt;&gt; Pass things arround with {NAME=Value ,NAME=Value 
,NAME=Value } SETs so you can order the set based on the proper name order (that 
is Site defined) &nbsp;to make a VALUE,VALUE,VALUE if you 
wish</FONT></SPAN></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><BR><FONT size=2>I want to 
represent cyclic terms finitely because I can't guarantee that<BR>applications 
won't build them, and anyway some applications may use them<BR>(whether they 
*should* is irrelevant, I hope).<BR></FONT></DIV>
<DIV><SPAN class=375324902-10082000><FONT face=Arial color=#0000ff 
size=2>&gt;&gt;&gt;&gt; This is where one child has more then one dirrection on 
the links (or just more then one parrent node will do this </FONT></SPAN><SPAN 
class=375324902-10082000><FONT face=Arial color=#0000ff size=2>In my node model 
)</FONT></SPAN></DIV>
<DIV><SPAN class=375324902-10082000><FONT face=Arial color=#0000ff 
size=2>&nbsp;have this throughout the MSBNX Control (it has a 
child.parent.child.parent&nbsp; (mainly so you can always move one step up from 
any point in a tree)..etc..)&nbsp;.. the way i block this out is i made 
parentname a child property and treat it as a SITENAME_REFDATA&nbsp;(terminal) 
as opposed to SITENAME_CONTENT (which is recurively 
modeled)</FONT></SPAN></DIV><FONT face=Arial size=2></FONT>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><BR><FONT size=2>I'm willing to assume that no atom gc or stack 
shifting occurs while any<BR>particular term is being exported.<BR></FONT><FONT 
size=2><BR>I reckon this needs facilities not provided in the FLI: e.g. get 
the<BR>dictionary address of an atom, and the heap address of a compound 
term</FONT></DIV><FONT size=2>
<DIV><FONT face=Arial></FONT><FONT face=Arial></FONT><BR><FONT 
color=#0000ff>&gt;<SPAN class=375324902-10082000>&gt;&gt; I realy havent been 
able to involve myself with staticly comprehending what any particualar site is 
Physicly doing with my term.. (i do store static pointers but only into live 
objects (not cause i want to, but i am afraid i'll lose them in&nbsp; system 
memory :)&nbsp; (also keeps the objects from terminationing to have asked for 
pointers to them) or while in prolog i tend to think that i am Meta-processing 
Level and a string or a number means something in the live object context... the 
classes/names are for my prolog program to 
understand&nbsp;:</SPAN></FONT></DIV></FONT>
<DIV><FONT size=2><FONT color=#0000ff><SPAN class=375324902-10082000>In terms of 
what the prolog site does with it:&nbsp;&nbsp;&nbsp; it manipulates the object 
instead of the object manipulating prolog.</SPAN></FONT></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT 
face=Arial size=2></FONT><FONT face=Arial size=2></FONT><FONT face=Arial 
size=2></FONT><FONT face=Arial size=2></FONT><BR><FONT size=2>I have a tentative 
algorithm for factoring common subterms based on<BR>maintaining a hash value for 
each subterm during traversal, then using<BR>a safe (cycle-detecting) 
comparison...<BR></FONT></DIV>
<DIV><SPAN class=375324902-10082000></SPAN><FONT size=2><FONT 
color=#0000ff>&gt;<SPAN class=375324902-10082000>&gt;&gt;&gt;&gt; I need your 
help Paul&nbsp; :) .. I am just building the stable system that has 
all&nbsp;this inter-language support ,,,,&nbsp;&nbsp; and i havent even 
begun&nbsp;to&nbsp;decide&nbsp;how to use it !</SPAN></FONT><BR>And that's as 
far as I've got - comments, help and advice please.<BR><BR>Paul 
Singleton<BR></FONT><FONT size=2><BR><BR>----------------<BR>* To UNSUBSCRIBE, 
please use the HTML form at<BR><BR>&nbsp;&nbsp;&nbsp; </FONT><A target=_blank 
href="http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist"><FONT 
size=2>http://www.swi.psy.uva.nl/projects/SWI-Prolog/index.html#mailinglist</FONT></A><BR><BR><FONT 
size=2>or send mail to prolog-request@swi.psy.uva.nl using the Subject: 
"unsubscribe"<BR>(without the quotes) and *no* message body.<BR><BR>** An 
ARCHIVE of this list is maintained at<BR><BR>&nbsp;&nbsp;&nbsp; </FONT><A 
target=_blank 
href="http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/"><FONT 
size=2>http://www.swi.psy.uva.nl/projects/SWI-Prolog/mailinglist/archive/</FONT></A><BR></DIV></BODY></HTML>

------_=_NextPart_001_01C00281.C1004130--

------_=_NextPart_000_01C00281.C1004130
Content-Type: text/html;
	name="index.html"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="index.html"

<html xmlns:v=3D"urn:schemas-microsoft-com:vml"
xmlns:o=3D"urn:schemas-microsoft-com:office:office"
xmlns:w=3D"urn:schemas-microsoft-com:office:word"
xmlns=3D"http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=3DContent-Type content=3D"text/html; =
charset=3Dwindows-1252">
<meta name=3DProgId content=3DWord.Document>
<meta name=3DGenerator content=3D"Microsoft Word 9">
<meta name=3DOriginator content=3D"Microsoft Word 9">
<link rel=3DFile-List href=3D"./index_files/filelist.xml">
<title>Welcome to PROLOG</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Douglas Miles</o:Author>
  <o:LastAuthor>Douglas Miles</o:LastAuthor>
  <o:Revision>4</o:Revision>
  <o:TotalTime>79</o:TotalTime>
  <o:Created>2000-08-02T06:23:00Z</o:Created>
  <o:LastSaved>2000-08-02T07:47:00Z</o:LastSaved>
  <o:Pages>4</o:Pages>
  <o:Words>1832</o:Words>
  <o:Characters>10445</o:Characters>
  <o:Company>Microsoft</o:Company>
  <o:Lines>87</o:Lines>
  <o:Paragraphs>20</o:Paragraphs>
  <o:CharactersWithSpaces>12827</o:CharactersWithSpaces>
  <o:Version>9.3821</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--
A:hover {color: red; font-weight: bold}
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
p.MsoBodyText, li.MsoBodyText, div.MsoBodyText
	{margin:0in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;
	font-weight:bold;}
p.MsoBodyTextIndent, li.MsoBodyTextIndent, div.MsoBodyTextIndent
	{margin-top:0in;
	margin-right:0in;
	margin-bottom:0in;
	margin-left:.5in;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";
	color:black;}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;
	text-underline:single;}
p
	{margin-right:0in;
	mso-margin-top-alt:auto;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;
	mso-header-margin:.5in;
	mso-footer-margin:.5in;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext=3D"edit" spidmax=3D"1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext=3D"edit">
  <o:idmap v:ext=3D"edit" data=3D"1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=3Dwhite lang=3DEN-US link=3Dblue vlink=3Dblue =
style=3D"tab-interval:
 .5in" alink=3D"#ff00ff">

<div class=3DSection1>

<p><b>Welcome to <a =
href=3D"http://prolog.magick.nu">PROLOG.MAGICK.NU</a>&nbsp;home
of</b></p>

<h1>PrologVirtualWorlds <span style=3D"FONT-SIZE: 7.5pt"><a
 href=3D"http://nephrael.vast1.com">Douglas Miles</a></span></h1>

<p><strong>using </strong><a
 =
href=3D"http://www.swi.psy.uva.nl/projects/SWI-Prolog"><strong>SWI-Prolo=
g</strong></a><br>
<strong>and </strong><a =
href=3D"http://vworlds.research.microsoft.com"><strong>Microsoft
Virtual Worlds</strong> </a><strong>Client/Server</strong></p>

<p><strong>This site is here because of numerous requests of people who =
want to
use the Prolog language&nbsp;with a first person VRML system. =
Well&nbsp; I
looked for&nbsp;the easiest and best supported tools that I =
could.&nbsp;
SWI-Prolog provides a robust, stable and FREE, yet professional =
distribution of
a Prolog virtual machine/compiler.&nbsp; The distribution is managed =
and
developed by <i><A href=3D"mailto:jan@swi.psy.uva.nl">Jan =
Wielemaker</a></i> of
the University of Amsterdam's Department of Social Science =
Informatics.&nbsp;
Selecting a&nbsp;complementary Graphical environment was just as
important:&nbsp; Microsoft&nbsp;Virtual Worlds supports development of
applications with customizable user interfaces (3D, 2D, and text) and =
can be
used for rapid prototyping of any type of distributed multi-user =
application
from 3D virtual worlds to distance learning interfaces with streaming =
media and
chat.</strong>&nbsp; <strong>It also supports a persistent, changeable =
world
state that preserves end-user changes. You don't have to be a hard-core =
C++
programmer, you just have to have a good application idea and a basic =
knowledge
of scripting.&nbsp; Interface and object behavior that is easily =
customizable
using standards like VBScript, JScript and DHTML.&nbsp; All of these =
features
are&nbsp;available as well thru the Prolog compiler.&nbsp; So you can =
use
constraint logic and non-deterministic code.</strong></p>

<p><strong>SWI-Prolog itself&nbsp;needs no graphical capabilities and =
will not
get them to ensure your logic system can easily be embedded in any type =
of
application with a low overhead under 1 MB.</strong> =
<strong>&nbsp;Prolog is
cross-platform and runs on most distribution on UNIX/Linux and =
Windows.. even
(3.1)&nbsp;&nbsp;It is connected to these systems using pipes, =
embedding or
other suitable communication mechanisms and Windows COM.</strong></p>

<p><strong>Traditionally, people in the Prolog community have written =
Prolog
wrappers around the native (C) API of their system. Xwip is an =
important
example of this class of GUI approach for Prolog. Problem is that most =
of these
API's are fairly low-level and a lot of work is required to get the =
data types
of the API properly and naturally represented in Prolog. </strong></p>

<p><strong>A better and more popular approach is to use an external =
language
designed for GUI development. Popular candidates are Tk/Tcl, Java, =
Visual Basic
and Delphi. (Also see <a =
href=3D"http://www.swi.psy.uva.nl/projects/xpce">XPCE</a>
) </strong></p>

<p><strong><span style=3D"FONT-SIZE: 13.5pt">And now the Virtual World
System&nbsp;</span></strong>&nbsp; </p>

<p><strong>Why Microsoft?&nbsp; </strong><a
 =
href=3D"http://vworlds.research.microsoft.com/license.asp"><strong><span=

 style=3D"FONT-SIZE: 13.5pt">OPEN SOURCE CODE</span></strong></a> =
<strong>and...</strong>
</p>

<p><strong>The Virtual Worlds Group (vworlds.org) is an organization of
individuals who are dedicated to helping advance the body of research =
on online
multi-user applications. The founding members of this group are =
employees of </strong><a
 href=3D"http://research.microsoft.com"><strong>Microsoft =
Research</strong> </a><strong>and
have created a software platform <i>(<a
 =
href=3D"http://vworlds.research.microsoft.com/">http://vworlds.research.=
microsoft.com/</a>)</i>
that enables users to build these applications and quickly prototype =
user
interfaces for them&nbsp; They have released the source code of the =
Virtual
Worlds software in conjunction with the binary builds in an effort to =
actively
foster research in this area. The platform is very general purpose and, =
as
such, can be used to build almost any type of multi-user application. =
</strong></p>

<p><strong>You will need all three of these packages</strong> =
<o:p></o:p></p>
<table=20
style=3D"WIDTH: 100%; mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in =
0in 0in"=20
cellPadding=3D0 width=3D"100%" border=3D1>
 <tr>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><strong>&nbsp;</strong><strong><span =
style=3D"FONT-SIZE:
  13.5pt">DOWNLOADS:</span></strong></p>
  </td>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><strong>&nbsp;</strong><strong><span =
style=3D"FONT-SIZE:
  13.5pt">DOCUMENTATION:</span></strong></p>
  </td>
  <td width=3D"34%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 34%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><strong><span style=3D"FONT-SIZE: 13.5pt"=20
     >&nbsp;SUPPORT:</span></strong></p>
  </td>
 </tr>
 <tr>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal>SWI-Prolog&nbsp;&nbsp;<a
 =20
      =
href=3D"http://www.swi.psy.uva.nl/projects/SWI-Prolog/download.html"=20
     >Binaries</a>
  / <a
 =20
      =
href=3D"http://www.swi.psy.uva.nl/cgi-bin//nph-download/SWI-Prolog/pl-3.=
3.8.tar.gz"=20
     >Source</a></p>
  </td>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal>&nbsp;<a
 =20
      href=3D"http://www.swi.psy.uva.nl/projects/SWI-Prolog/#manual"=20
     >SWI-Prolog </a><a
 =20
      href=3D"http://www.swi.psy.uva.nl/projects/SWI-Prolog/#manual"=20
     >Development</a>
  &nbsp;</p>
  </td>
  <td width=3D"34%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 34%; PADDING-TOP: 0.75pt"=20
   >
  <p>&nbsp;<a =
href=3D"http://www.swi.psy.uva.nl/projects/SWI-Prolog/#mailinglist">SWI-=
Prolog/#</a><a
 =20
      =
href=3D"http://www.swi.psy.uva.nl/projects/SWI-Prolog/#mailinglist"=20
     >mailing
  list</a></p>
  </td>
 </tr>
 <tr>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal>Microsoft Virtual Worlds&nbsp;&nbsp;&nbsp;<a
 =20
      href=3D"http://vworlds.research.microsoft.com/download.asp"=20
     >Binary</a> / <a
 =20
      href=3D"http://vworlds.research.microsoft.com/Docs/buildproc.htm" =

     >Source</a></p>
  </td>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal>&nbsp;<a
 =20
      href=3D"http://vworlds.research.microsoft.com/documentation.asp"=20
     >Microsoft
  Virtual Worlds</a> </p>
  </td>
  <td width=3D"34%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 34%; PADDING-TOP: 0.75pt"=20
   >
  <p>&nbsp;<A =
href=3D"mailto:applications-dev@listserv.vworlds.org">applications-dev@l=
istserv.vworlds.org</a></p>
  </td>
 </tr>
 <tr>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal>PrologVirtualWorlds&nbsp; Binary / Source</p>
  </td>
  <td width=3D"33%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 33%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal>&nbsp;<A =
href=3D"..\..\..\..\..\..\msr\vw">PrologVirtualWorlds</a>
  </p>
  </td>
  <td width=3D"34%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 34%; PADDING-TOP: 0.75pt"=20
   >
  <p>&nbsp;<A =
href=3D"mailto:prolog-dev@vast1.com">prolog-dev@vast1.com</a></p>
  </td>
 </tr></TABLE>

<p><strong>You should browse around these above sites.&nbsp; There is =
allot of
useful support and contacts.. that I cant keep up with. And please join =
all of
the mailing lists </strong></p>

<p align=3Dcenter style=3D"TEXT-ALIGN: center">If any of these links =
need updated
mail to <A =
href=3D"mailto:webmistress@magick.nu">webmistress@magick.nu</a></p>

<p>&nbsp;</p>

<p>&nbsp;</p>

<h1>PrologVirtualWorlds Architecture Background</h1>

<p><b>The system of Microsoft Virtual Worlds is based on many clients =
and
servers sharing instances of objects.&nbsp; The Client called a&nbsp; =
'Client
Site' can programmatically alter objects and invoke methods.&nbsp; The =
client
can create never seen before methods and design custom objects and add
properties to any..&nbsp; The server maintains the consistency and =
informs
other clients about changes that may have affected them. This opens up =
the door
to many programming ideas of self-morphing objects.&nbsp; Objects that =
can hold
and share anything.. maybe even live processes.&nbsp; With a =
contribution to
SWI-Prolog by David Hovel at Microsoft Research it is now possible to =
manipulate
Windows Objects&nbsp; from Prolog.&nbsp; David's libraries gives us low =
level
access to IDispatched methods and maintains instance references in a =
com
container.&nbsp; This was very wonderful leap with the next step =
believed to be
exporting TypeLib infos (object descriptions) to prolog so it could =
analyze and
make plans on object usage.&nbsp; Compare and inspect DOMs and make new
structures.&nbsp; Douglas Miles begin writing methods/libraries&nbsp; =
for this
so new objects to be turned into prolog 'terms' to be manipulated in =
predicate
calculus and work with polymorphism controlled by a declarative self =
modifying
language.&nbsp; This can take us beyond conventional object orientated
programming and deep into 'agent orientated programming'.&nbsp; (the =
Very near
future).</b></p>

<p><b>Lets begin discussing the implementation; we have three virtual
implementation domains that these object references can be placed in =
currently:</b></p>

<p><b>1)&nbsp; Virtual Worlds Object Collection =
vwsystem.dll/vwmm.dll<br>
2)&nbsp; Native COM Collection maintained in Morphism.Dll<br>
3)&nbsp; Serialized Prolog Terms Representing Transient or InTransit =
objects</b></p>

<p><b>There are 3 physical locations for object references and =
instances</b></p>

<table border=3D1 cellpadding=3D0 width=3D"100%" style=3D"WIDTH:
 100%; mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in">
 <tr>
  <td width=3D"24%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 24%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><b>Virtual World Server Site</b> </p>
  </td>
  <td width=3D"76%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 76%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><b>It holds the true objects and maintains the =
World Model
  Database.&nbsp; The server system uses UDP and TCP simultaneously to
  communicate to clients about changes to the objects they are =
referencing to
  communicate object changes and methods with the Client Site. </b></p>
  </td>
 </tr>
 <tr>
  <td width=3D"24%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 24%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><b>Virtual World Client Site</b> </p>
  </td>
  <td width=3D"76%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 76%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><b>This holds objects that act as proxies of the =
real
  objects at the Server Site.&nbsp; So they look and act like the real =
objects
  to programs.&nbsp; While you invoke a method on the object a signal =
is sent
  to the real object and then you are often given a back return object =
(proxy
  as well).</b></p>
  </td>
 </tr>
 <tr>
  <td width=3D"24%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 24%; PADDING-TOP: 0.75pt"=20
   >
  <p class=3DMsoNormal><b>Virtual Worlds Prolog Site</b></p>
  </td>
  <td width=3D"76%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 76%; PADDING-TOP: 0.75pt"=20
   >
  <p align=3Dcenter style=3D"TEXT-ALIGN: center"><b><br>
  This site holds references to the Client Site objects&nbsp; so it can =
be
  accessed in these<br>
  &nbsp;three below domains</b></p>
  <table border=3D1 cellpadding=3D0 width=3D"100%" style=3D"WIDTH:
   100%; mso-cellspacing: 1.5pt; mso-padding-alt: 0in 0in 0in 0in"=20
     >
   <tr>
    <td width=3D"43%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 43%; PADDING-TOP: 0.75pt"=20
         >
    <p class=3DMsoNormal><b>PrologServer Site (PSS)</b> </p>
    </td>
    <td width=3D"57%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 57%; PADDING-TOP: 0.75pt"=20
         >
    <p class=3DMsoNormal><b><br>
    Object models are kept track of by a behind the scene prolog engine =
wrapper
    written by David Hovel (ProQuery.dll) to use Jan Weidelmaker's =
(PLLib.dll).<br>
    Douglas Miles (plserversite.prolog) </b></p>
    </td>
   </tr>
   <tr>
    <td width=3D"43%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 43%; PADDING-TOP: 0.75pt"=20
         >
    <p class=3DMsoNormal><b>TypeLib&nbsp; Morphism Engine (TLM)</b> =
</p>
    </td>
    <td width=3D"57%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 57%; PADDING-TOP: 0.75pt"=20
         >
    <p class=3DMsoNormal><br>
    <b>This is the redirector to make sure the objects exist in the =
proper
    places and resolves interfaces real or imaginary for physical and =
virtual
    objects no mater what domain they are in. Morphism.Dll</b> </p>
    </td>
   </tr>
   <tr>
    <td width=3D"43%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 43%; PADDING-TOP: 0.75pt"=20
         >
    <p class=3DMsoNormal><b>PrologClient Site (PCS)</b></p>
    </td>
    <td width=3D"57%" style=3D"PADDING-RIGHT: 0.75pt; PADDING-LEFT: =
0.75pt; PADDING-BOTTOM: 0.75pt; WIDTH: 57%; PADDING-TOP: 0.75pt"=20
         >
    <p class=3DMsoNormal><br>
    <b>Spawn of PLWIN.EXE that is using SWIACTX.DLL that the =
actual&nbsp;
    programmer places his code to manipulate bots and objects.</b></p>
    </td>
   </tr>
  </table>
  <p class=3DMsoNormal><o:p></o:p></p>
  </td>
 </tr>
</table>

<p>&nbsp;</p>

<p align=3Dcenter style=3D"TEXT-ALIGN: center"><b><span =
style=3D"FONT-SIZE: 24pt">PrologVirtualWorlds
Partial Serialization of COM&nbsp;<br>
</span></b><b><span style=3D"FONT-SIZE: 13.5pt">(Component Object =
Models)</span></b></p>

<p><span style=3D"FONT-SIZE: 13.5pt">We will look at some object models =
and see
how they manifest in various places in our system.&nbsp;&nbsp;First an =
object
such as a newly created <span style=3D"COLOR: =
green">MSScriptControl.ScriptControl
</span><span style=3D"COLOR: black">as PrologVirtualWorlds sees =
it:<o:p></o:p></span></span></p>

<p><b>Morphism.Dll <span style=3D"mso-spacerun: =
yes">&nbsp;&nbsp;&nbsp;</span>obj_pl(java_vbscript_engine,4,true)
/* 4 levels deep,<span style=3D"mso-spacerun: yes">&nbsp; =
</span>Ground_Instancing=3DTrue
*/<o:p></o:p></b></p>

<p =
class=3DMsoNormal>object(class([scriptcontrol]),type([scriptcontrol]),ob=
jptr(107915040),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: 0.5in">[</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([language]),type([vt_bstr]),_,datum(vt_bstr,[vbscrip=
t])),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([state]),type([vt_empty]),_,datum(vt_i4,[0])),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([sitehwnd]),type([vt_i4]),_,datum(vt_i4,[0])),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([timeout]),type([vt_i4]),_,datum(vt_i4,[10000])),</p=
>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([allowui]),type([vt_bool]),_,datum(vt_bool,true)),</=
p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([usesafesubset]),type([vt_bool]),_,datum(vt_bool,fal=
se)),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([modules]),type([vt_empty]),_,object(class([iscriptm=
odulecollection]),type([iscriptmodulecollection]),objptr(115800792),</p>=


<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([u_newenum]),type([vt_variant]),_,datum(vt_variant,<=
/p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 1in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 1in; TEXT-INDENT: =
0.5in">object(class([unset]),type([nothing]),0,_)</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 1in; TEXT-INDENT: =
0.5in">])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([count]),type([vt_i4]),_,datum(vt_i4,[1]))</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">])),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([error]),type([vt_empty]),_,object(class([iscripterr=
or]),type([iscripterror]),objptr(2097768),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([number]),type([vt_i4]),_,datum(vt_i4,[0])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([source]),type([vt_bstr]),_,datum(vt_bstr,[])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([description]),type([vt_bstr]),_,datum(vt_bstr,[])),=
</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([helpfile]),type([vt_bstr]),_,datum(vt_bstr,[])),</p=
>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([helpcontext]),type([vt_i4]),_,datum(vt_i4,[0])),</p=
>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([text]),type([vt_bstr]),_,datum(vt_bstr,[])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([line]),type([vt_i4]),_,datum(vt_i4,[0])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([column]),type([vt_i4]),_,datum(vt_i4,[0]))</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: =
0.5in">object(class([codeobject]),type([vt_variant]),_,object(class([vbs=
cripttypeinfo]),type([vbscripttypeinfo]),objptr(110222400),[])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: =
0.5in">object(class([procedures]),type([vt_empty]),_,object(class([iscri=
ptprocedurecollection]),type([iscriptprocedurecollection]),objptr(107319=
880),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([_newenum]),type([vt_variant]),_,datum(vt_variant,</=
p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 1in; TEXT-INDENT: =
0.5in">[object(class([unset]),type([nothing
]),0,_)])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([count]),type([vt_i4]),_,datum(vt_i4,[0]))</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">]))</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: 0.5in">])</p>

<p class=3DMsoNormal><![if =
!supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></p>

<p class=3DMsoBodyText>        The SWI-Prolog kernel
had no problems working with it.<span style=3D"mso-spacerun: =
yes">&nbsp; </span>This is
a =91term serialization=92 of the object=92s model. <span =
style=3D"mso-spacerun:
 yes">&nbsp;</span>The MSScriptControl has ten Members marked as =
INVOKE_PROPGETable
in COM.<span style=3D"mso-spacerun: yes">&nbsp; </span><span =
style=3D"mso-spacerun:
 yes">&nbsp;</span>I am of strong discipline that the future of =
properly written
windows COM must expose it=92s members (in TypeLibs) in such a way as =
an object
model can be rendered with no side effects to the object (when using
INVOKE_PROPGET/GETREF).<span style=3D"mso-spacerun: yes">&nbsp; =
</span>And members
where this is unsafe need to hide behind INVOKE_FUNCT interfaces.<span
 style=3D"mso-spacerun: yes">&nbsp; </span>&nbsp;<br>
We will use the rendered serialized model to classify objects and for
PrologVirtualWorlds to <i>understand</i> them later.<span =
style=3D"mso-spacerun:
 yes">&nbsp; </span>This model was constructed 4 levels deep and =
anything 5 or below
was set to Prologs =91_=92 this is so we can Unify objects later.<span
 style=3D"mso-spacerun: yes">&nbsp; </span></p>

<p class=3DMsoBodyText><![if =
!supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></p>

<p class=3DMsoBodyText>Look at this call for a non-instanced version =
(the
objptr/1 and datum/2 which are ignored and only vt_variant and vt_empty =
are
explored)</p>

<p>&nbsp;<b>Morphism.Dll <span style=3D"mso-spacerun: =
yes">&nbsp;&nbsp;&nbsp;</span>obj_pl(java_vbscript_engine,4,fail)
/* 4 levels deep,<span style=3D"mso-spacerun: yes">&nbsp; =
</span>Ground_Instancing=3DFalse
*/<o:p></o:p></b></p>

<p =
class=3DMsoNormal>object(class([scriptcontrol]),type([scriptcontrol]),_,=
</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: 0.5in">[</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([language]),type([vt_bstr]),_,_),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([state]),type([vt_empty]),_,_),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([sitehwnd]),type([vt_i4]),_,_),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([timeout]),type([vt_i4]),_,_),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([allowui]),type([vt_bool]),_,_),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([usesafesubset]),type([vt_bool]),_,_),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([modules]),type([vt_empty]),_,object(class([iscriptm=
odulecollection]),type([iscriptmodulecollection]),_,</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([u_newenum]),type([vt_variant]),_,_)</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">]),</p>

<p class=3DMsoNormal style=3D"TEXT-INDENT: =
0.5in">object(class([error]),type([vt_empty]),_,object(class([iscripterr=
or]),type([iscripterror]),_,</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([number]),type([vt_i4]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([source]),type([vt_bstr]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([description]),type([vt_bstr]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([helpfile]),type([vt_bstr]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([helpcontext]),type([vt_i4]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([text]),type([vt_bstr]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([line]),type([vt_i4]),_,_),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([column]),type([vt_i4]),_,_)</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">])),</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: =
0.5in">object(class([codeobject]),type([vt_variant]),_,object(class([vbs=
cripttypeinfo]),type([vbscripttypeinfo]),_,[])),</p>

<p =
class=3DMsoBodyTextIndent>object(class([procedures]),type([vt_empty]),_,=
object(class([iscriptprocedurecollection]),type([iscriptprocedurecollect=
ion]),_,</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">[</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">object(class([_newenum]),type([vt_variant]),_,_)</p>

<p class=3DMsoNormal style=3D"MARGIN-LEFT: 0.5in; TEXT-INDENT: =
0.5in">]),</p>

<p>])</p>

<p><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></p>

<p><b>This information can be later used to declare a new object. The =
smallest object
declaration looks like this:<o:p></o:p></b></p>

<p style=3D"TEXT-INDENT: 0.5in"><b><span style=3D"COLOR: =
blue">assert_object</span><span
 style=3D"COLOR: black"> =
(object(class([our,new,class]),type([we,ll,know,later]),_,[])).<o:p></o:=
p></span></b></p>

<p style=3D"TEXT-INDENT: 0.5in"><b><span style=3D"COLOR: black">This =
creates a TypeLib
info in for <span style=3D"mso-spacerun: =
yes">&nbsp;</span>we_ll_know_later that has
no interface members.<o:p></o:p></span></b></p>

<p style=3D"TEXT-INDENT: 0.5in"><b><span style=3D"COLOR: black">To add =
a member to it
we use </span><span style=3D"COLOR: blue">objects</span><span =
style=3D"COLOR: black">(AnyObject),
AnyObject </span><span style=3D"COLOR: blue">=3D </span><span =
style=3D"COLOR: =
black">object(class(_),type([we|_]),_,_).<o:p></o:p></span></b></p>

<p><![if !supportEmptyParas]><![endif]>&nbsp;<o:p></o:p></p>

</div>

</body>

</html>

------_=_NextPart_000_01C00281.C1004130--

