<?xml version="1.0" encoding="ASCII"?>
<!-- 

#####################################################################
#####################################################################
## Copyright 2005 Steven R. Newcomb                                ##
##                                                                 ##
## This software is licensed under the Apache License, Version 2.0 ##
## (the "License"); you may not use this file except in compliance ##
## with the License.  Copies of the License are available at       ##
##        http://www.apache.org/licenses/LICENSE-2.0               ##
##                                                                 ##
## Unless required by applicable law or agreed to in writing,      ##
## software distributed under the License is distributed on an "AS ##
## IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either ##
## express or implied.  See the License for the specific language  ##
## governing permissions and limitations under the License.        ##
##                                                                 ##
## Copies of the source code and the license are available at      ##
##        http://www.versavant.org                                 ##
#####################################################################
#####################################################################

####################################
cvsRevision = "$Revision: 1.3 $" ##
####################################

"A_assert" (type-role-assertion) assertions:
_____________________________________________

These are like BigAssert, but without casting proxies (c-proxies),
role proxies (r-proxies), or assertion type proxies (t-proxies).  Only
the assertion proxies (a-proxies) are present.  The roles are identified
by strings.

Assumptions (almost the same as BigAssert):

* An assertion can only be created by uttering an a_sip property.
  Everything else will be conferred into existence (but, of course,
  that doesn't prevent the other parts of the assertion from *also*
  being created manually).  

* You can't create an assertion if its x-proxies don't already exist.
  Those x-proxies must already have one or more SIPs.  (Because
  conferral operations can't duplicate SIPs that don't exist.)

* An a_sip property consists of a set of tuples, one for each playable
  role.  Each tuple may have a single member, in which case that
  member is a unplayed role name.  The tuple may have two members, in
  which case the first member is the role name and the second is the
  proxyId of the role player.  No two tuples can have the same first
  member.

* The SIPs of x-proxies are outside the scope of this TMA.  They
  cannot be conferred into existence by uttering an a_sip.  (However,
  an a-proxy can be an x-proxy, too, in which case, obviously, the SIP
  of such an x-proxy happens to be governed by this TMA.)

properties of a-proxies

    a_sip (like BigAssert, except that the first member of each tuple
          is a role name, not a proxyId)
  
        Property value type: 

           setOfString_ProxyRefTuples.  There must be one or two
           members per tuple.  The first member of each tuple is a
           string that will be regarded as a role name.  The second
           member, if there is one, must be a proxy reference.

        Property value constraints:

           There must be at least two tuples.

           At least one of the tuples must have two members.

           (The first member will be regarded as a role name, while
           the second member, if there is one, will be regarded as a
           reference to an x-proxy.)

           No rolename can appear in more than one tuple.

        Context constraints:

           None.

        Proxies with a_sip properties merge when:

           ...the lists of tuples, considered as sets, match.

        The result of merging two or more a_sip properties will be:

           ...the same as any one of them.

        a_sip property values are significantly different if:

           ...the lists of tuples, considered as sets, don't match

        a_sip properties trigger conferrals as follows:

           - for each tuple in the a_sip property value that has two
             members (i.e., that has a reference to an x-proxy)

              . an x-proxy, with its x_roles property, plus the SIP
                that may be, but is not necessarily, governed by this
                TMA but already extant

properties of x-proxies

    (sip not governed by this TMA)

    x_roles    

        Property value type: 

           setOfString_ProxyRefTuples.  Each member of each tuple must be a
           proxy reference.


        Property value constraints:

           Each tuple must have two members.

           (The first member will be regarded as a role name.
           The second member will be regarded as a reference
           to an a-proxy.)

           Proxies referenced as a-proxies cannot have any properties
           governed by this TMA other than a_sip and x_roles.

           The role name must be a role name that appears in the
           referenced a-proxy's a-sip value.

        Context constraints:

           (none)

        Proxies merge when:

           (not applicable; this property is not an SIP)

        The result of merging two or more x_roles properties will be:

           ...the union of the sets of tuples that are their values.

        x_roles property values are significantly different if:

           the sets of tuples that are their values are not the same

-->
<!-- <!DOCTYPE VersavantTMA SYSTEM "http://www.versavant.org/dtds/TMAConfigFile.dtd">-->
<!DOCTYPE VersavantTMA SYSTEM "../versavantTMA.dtd">
<VersavantTMA
VersavantTMADTDVersion="1"

  ><Desc>TMA for assertions that reify relationships (assertions), but not castings, roles, or assertion types.</Desc

  ><ValueType ValueTypeName="setOfString_ProxyRefTuples"
    ><Desc>Value type for a_sip class.</Desc
    ><ValueIsNotOfType__
      functionModuleFilePath="${VSVEXECDIR}/Lib/VTsetOfString_ProxyRefTuples.py"
      functionName="ValueIsNotOfType_setOfString_ProxyRefTuples_"
    /><InstanceOf__ValueTypeToXMLContentString
      functionModuleFilePath="${VSVEXECDIR}/Lib/VTsetOfString_ProxyRefTuples.py"
      functionName="InstanceOf_setOfString_ProxyRefTuples_ValueTypeToXMLContentString"
    /><XMLContentStringToInstanceOf__ValueType
      functionModuleFilePath="${VSVEXECDIR}/Lib/VTsetOfString_ProxyRefTuples.py"
      functionName="XMLContentStringToInstanceOf_setOfString_ProxyRefTuples_ValueType"
  /></ValueType

  ><PropertyClass PropertyClassName="a_sip" ValueType="setOfString_ProxyRefTuples"
    ><Desc>SIP of this a-proxy; subject is a relationship.</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="Add_setOfString_ProxyRefTuples_PropToOverheadDict"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="Remove_setOfString_ProxyRefTuples_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="${VSVEXECDIR}/Lib/A_assert/propertyClasses.py"
      functionName="ValueIsInvalidFor_a_sip_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="Merge_setOfString_ProxyRefTuples_PropertyValues"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="ValuesOf_setOfString_ProxyRefTuples_PropertyInstancesAreSignificantlyDifferent"

    /><MergeProxiesBecause__PropertyInstancesSpecifySameSubject
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="MergeProxiesBecause_setOfString_ProxyRefTuples_PropertyInstancesSpecifySameSubject"
    /><ProxiesWith__ValueNotSignificantlyDifferentFrom
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="ProxiesOfSubjectIdentifiedBy_setOfString_ProxyRefTuples_Value"
    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="UpdateProxyReferencesIn_setOfString_ProxyRefTuples_Value"
  /></PropertyClass

  ><ConferralRule ConferralRuleName="inferFrom_a_sip_"
      functionModuleFilePath="${VSVEXECDIR}/Lib/BIGASSERT/conferralRules.py"
      functionName="inferFrom_a_sip_"
      functionExtraArgsString="assertionModel = 'A_assert'"
    ><Desc>From each a_sip property, confers x_roles properties.</Desc
  ></ConferralRule

  ><ConferralRule ConferralRuleName="bridge_BigAssert_a_sip_to_A_assert_a_sip"
      functionModuleFilePath="${VSVEXECDIR}/Lib/BIGASSERT/conferralRules.py"
      functionName="bridgeAcross_a_sip_Models"
      functionExtraArgsString="bridgeFromTMAName = 'BigAssert', 
                               bridgeFromTMAModel = 'BigAssert', 
                               bridgeToTMAModel = 'A_assert', 
                               bridgeFromR_ProxyPropertyName = 'role name', 
                               bridgeFromR_ProxyTMAName = 'Roles'"
    ><Desc>For each a_sip property in the TMA named in the bridgeFromTMAName keyword argument, confers an a_sip property in this TMA.</Desc
  ></ConferralRule

  ><ConferralRule ConferralRuleName="bridge_TRA_assert_a_sip_to_BigAssert_a_sip"
      functionModuleFilePath="${VSVEXECDIR}/Lib/BIGASSERT/conferralRules.py"
      functionName="bridgeAcross_a_sip_Models"
      functionExtraArgsString="bridgeFromTMAName = 'TRA_assert', 
                               bridgeFromTMAModel = 'TRA_assert', 
                               bridgeToTMAModel = 'A_assert', 
                               bridgeFromR_ProxyPropertyName = 'role name', 
                               bridgeFromR_ProxyTMAName = 'Roles'"
    ><Desc>For each a_sip property in the TMA named in the bridgeFromTMAName keyword argument, confers an a_sip property in this TMA.</Desc
  ></ConferralRule

  ><PropertyClass PropertyClassName="x_roles" ValueType="setOfString_ProxyRefTuples"
    ><Desc>Rolename/a-proxy-reference pairs that specify the roles/assertions in which the subject of this proxy is the role player.</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="Add_setOfString_ProxyRefTuples_PropToOverheadDict"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="Remove_setOfString_ProxyRefTuples_PropFromOverheadDict"
    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_x_roles_Property"
      functionExtraArgsString="a_proxy_allowed_properties = [ 'a_sip', 'x_roles']"
    /><Merge__PropertyValues
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="Merge_setOfString_ProxyRefTuples_PropertyValues"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="ValuesOf_setOfString_ProxyRefTuples_PropertyInstancesAreSignificantlyDifferent"
    /><ProxiesWith__ValueNotSignificantlyDifferentFrom
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="ProxiesOfSubjectIdentifiedBy_setOfString_ProxyRefTuples_Value"
    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="${VSVEXECDIR}/Lib/PCsetOfString_ProxyRefTuples.py"
      functionName="UpdateProxyReferencesIn_setOfString_ProxyRefTuples_Value"
  /></PropertyClass

></VersavantTMA>
