<?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.2 $" ##
####################################

"U_assert" (Unreified) assertions:
_____________________________________________

These are quite unlike BigAssert, TRA_assert, or A_assert, because the
only thing about the assertion that's reified is the role players (the
x-proxies).  There are no proxies for the relationship (a-proxies), no
casting proxies (c-proxies), no role proxies (r-proxies), and no
assertion type proxies (t-proxies).  The roles are identified by
strings.

Assumptions:

      ____role...>_____           "U_assert" _- unreified assertion
     x1                x2         Suggest: "unreified mutual relationship"
      ___<...role______           

* An unreified assertion-like relationship is created by uttering an x_LrnRrnRrp property, and
  adding it to the role player of the local role.  All other
  properties will be conferred into existence, including those of the
  other role players.

* From U_assert properties, it cannot be known how many assertions
  there are, nor which roles go with which assertions, unless somehow
  it is known that all assertions are two-role assertions.  U_assert
  properties really don't represent assertions at all!  All they show
  is rolename-pair relations between pairs of roleplayers.

* You can't create an x_LrnRrnRrp property unless the x-proxy it
  refers to already already exists.  That x-proxy must already have
  one or more SIPs.  (Because conferral operations can't duplicate
  SIPs that don't exist.)  The SIPs of x-proxies are outside the scope
  of this TMA.

properties of x-proxies
_______________________

*     6 properties on each roleplayer:

(1) x_LrnRrnRrp
(2) x_LrnRrpRrn
(3) x_RrnRrpLrn
(4) x_RrnLrnRrp
(5) x_RrpLrnRrn
(6) x_RrpRrnLrn

  Each of the six property classes consists of a dictionary whose
  keys (which are strings) have values that are dictionaries whose
  keys (which are strings) have values that are lists of strings.
  
  All of the six property classes have essentially the same
  constraints, most of which are enforced by the valueType
  implementation.  Their values must be non-empty dictionaries, whose
  keys must be strings, whose values must be non-empty dictionaries,
  whose keys must be strings, whose values must be non-empty lists,
  whose items must be strings.  At one of the three levels, the
  strings must be valid proxyIds of living proxies.  At the other two
  levels, in any particular case, the strings must not match, and they
  must not look like proxyIds.

  The property-class-specific value checking checks
  the other 11 properties for consistency with itself.

  (1) x_localRoleName_remoteRoleName_remoteRolePlayer (x_LrnRrnRrp)
      keys are roleNames played by this rolePlayer; value is a dict in which
        keys are roleNames played by remote rolePlayers with respect to this rolePlayer, and
        values are references to remote rolePlayers

      Property value type:
        stringKeyDictOfStringKeyDictsWithStringListValues3 
          The '3' means that levelAtWhichProxyReferenceAppears ==
          'third', i.e., the string list values are proxyIds, while
          the keys of the first- and second-level dictionaries are
          role names.

  (2) x_localRoleName_remoteRolePlayer_remoteRoleName (x_LrnRrpRrn)
      keys are roleNames played by this rolePlayer; value is a dict in which
        keys are references to remote rolePlayers, and
        values are roleNames played by remote rolePlayers with respect to this rolePlayer

      Property value type:
        stringKeyDictOfStringKeyDictsWithStringListValues2 

  (3) x_remoteRoleNames_remoteRolePlayer_localRoleNames (x_RrnRrpLrn)
      keys are roleNames played by remote rolePlayers with respect to this rolePlayer; value is a dict in which
        keys are references to remote rolePlayers, and
        values are roleNames played by this rolePlayer

      Property value type:
        stringKeyDictOfStringKeyDictsWithStringListValues2

  (4) x_remoteRoleNames_localRoleNames_remoteRolePlayer (x_RrnLrnRrp)
      keys are roleNames played by remote rolePlayers with respect to this rolePlayer; value is a dict in which
        keys are roleNames played by this rolePlayer, andn
        values are references to remote rolePlayers

      Property value type:
        stringKeyDictOfStringKeyDictsWithStringListValues3

  (5) x_remoteRolePlayer_localRoleNames_remoteRoleNames (x_RrpLrnRrn)
      keys are references to remote rolePlayers; value is a dict in which
        keys are roleNames played by this rolePlayer, and
        values are roleNames played by remote rolePlayers with respect to this rolePlayer

      Property value type:
        stringKeyDictOfStringKeyDictsWithStringListValues1

  (6) x_remoteRolePlayer_remoteRoleNames_localRoleNames (x_RrpRrnLrn)
      keys are references to remote rolePlayers; value is a dict in which
        keys are roleNames played by remote rolePlayers with respect to this rolePlayer, and
        keys are roleNames played by this rolePlayer

      Property value type:
        stringKeyDictOfStringKeyDictsWithStringListValues1

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

  ><Desc>TMA for unreified relationships with role names.</Desc

  ><ValueType ValueTypeName="stringKeyDictOfStringKeyDictsWithStringListValues1"
    ><Desc>Value type for U_Assert properties whose first-level dictionary keys are proxyIds.</Desc
    ><ValueIsNotOfType__
      functionModuleFilePath="valueTypes.py"
      functionName="ValueIsNotOfType_stringKeyDictOfStringKeyDictsWithStringListValues_"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'first'"
    /><InstanceOf__ValueTypeToXMLContentString
      functionModuleFilePath="valueTypes.py"
      functionName="InstanceOf_stringKeyDictOfStringKeyDictsWithStringListValues_ValueTypeToXMLContentString"
    /><XMLContentStringToInstanceOf__ValueType
      functionModuleFilePath="valueTypes.py"
      functionName="XMLContentStringToInstanceOf_stringKeyDictOfStringKeyDictsWithStringListValues_ValueType"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'first'"
  /></ValueType

  ><ValueType ValueTypeName="stringKeyDictOfStringKeyDictsWithStringListValues2"
    ><Desc>Value type for U_Assert properties whose second-level dictionary keys are proxyIds.</Desc
    ><ValueIsNotOfType__
      functionModuleFilePath="valueTypes.py"
      functionName="ValueIsNotOfType_stringKeyDictOfStringKeyDictsWithStringListValues_"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'second'"
    /><InstanceOf__ValueTypeToXMLContentString
      functionModuleFilePath="valueTypes.py"
      functionName="InstanceOf_stringKeyDictOfStringKeyDictsWithStringListValues_ValueTypeToXMLContentString"
    /><XMLContentStringToInstanceOf__ValueType
      functionModuleFilePath="valueTypes.py"
      functionName="XMLContentStringToInstanceOf_stringKeyDictOfStringKeyDictsWithStringListValues_ValueType"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'second'"
  /></ValueType

  ><ValueType ValueTypeName="stringKeyDictOfStringKeyDictsWithStringListValues3"
    ><Desc>Value type for U_Assert properties whose third-level list items are proxyIds.</Desc
    ><ValueIsNotOfType__
      functionModuleFilePath="valueTypes.py"
      functionName="ValueIsNotOfType_stringKeyDictOfStringKeyDictsWithStringListValues_"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'third'"
    /><InstanceOf__ValueTypeToXMLContentString
      functionModuleFilePath="valueTypes.py"
      functionName="InstanceOf_stringKeyDictOfStringKeyDictsWithStringListValues_ValueTypeToXMLContentString"
    /><XMLContentStringToInstanceOf__ValueType
      functionModuleFilePath="valueTypes.py"
      functionName="XMLContentStringToInstanceOf_stringKeyDictOfStringKeyDictsWithStringListValues_ValueType"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'third'"
  /></ValueType

  ><PropertyClass PropertyClassName="x_LrnRrnRrp" ValueType="stringKeyDictOfStringKeyDictsWithStringListValues3"
    ><Desc>x_localRoleName_remoteRoleName_remoteRolePlayer (x_LrnRrnRrp)</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Add_U_assert_PropToOverheadDict"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'third'"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Remove_U_assert_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_U_assert_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="propertyClasses.py"
      functionName="Merge_U_assert_PropertyValues"
      functionExtraArgsString="workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="propertyClasses.py"
      functionName="ValuesOf_U_assert_PropertyInstancesAreSignificantlyDifferent"
      functionExtraArgsString="propertyInstance1 = propertyInstance1, propertyInstance2 = propertyInstance2, workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"

    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="propertyClasses.py"
      functionName="UpdateProxyReferencesIn_U_assert_Value"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'third'"
  /></PropertyClass

  ><PropertyClass PropertyClassName="x_LrnRrpRrn" ValueType="stringKeyDictOfStringKeyDictsWithStringListValues2"
    ><Desc>x_localRoleName_remoteRolePlayer_remoteRoleName (x_LrnRrpRrn)</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Add_U_assert_PropToOverheadDict"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'second'"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Remove_U_assert_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_U_assert_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="propertyClasses.py"
      functionName="Merge_U_assert_PropertyValues"
      functionExtraArgsString="workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="propertyClasses.py"
      functionName="ValuesOf_U_assert_PropertyInstancesAreSignificantlyDifferent"
      functionExtraArgsString="propertyInstance1 = propertyInstance1, propertyInstance2 = propertyInstance2, workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"

    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="propertyClasses.py"
      functionName="UpdateProxyReferencesIn_U_assert_Value"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'second'"
  /></PropertyClass

  ><PropertyClass PropertyClassName="x_RrnRrpLrn" ValueType="stringKeyDictOfStringKeyDictsWithStringListValues2"
    ><Desc>x_remoteRoleNames_remoteRolePlayer_localRoleNames (x_RrnRrpLrn)</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Add_U_assert_PropToOverheadDict"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'second'"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Remove_U_assert_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_U_assert_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="propertyClasses.py"
      functionName="Merge_U_assert_PropertyValues"
      functionExtraArgsString="workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="propertyClasses.py"
      functionName="ValuesOf_U_assert_PropertyInstancesAreSignificantlyDifferent"
      functionExtraArgsString="propertyInstance1 = propertyInstance1, propertyInstance2 = propertyInstance2, workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"

    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="propertyClasses.py"
      functionName="UpdateProxyReferencesIn_U_assert_Value"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'second'"
  /></PropertyClass

  ><PropertyClass PropertyClassName="x_RrnLrnRrp" ValueType="stringKeyDictOfStringKeyDictsWithStringListValues3"
    ><Desc>x_remoteRoleNames_localRoleNames_remoteRolePlayer (x_RrnLrnRrp)</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Add_U_assert_PropToOverheadDict"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'third'"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Remove_U_assert_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_U_assert_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="propertyClasses.py"
      functionName="Merge_U_assert_PropertyValues"
      functionExtraArgsString="workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="propertyClasses.py"
      functionName="ValuesOf_U_assert_PropertyInstancesAreSignificantlyDifferent"
      functionExtraArgsString="propertyInstance1 = propertyInstance1, propertyInstance2 = propertyInstance2, workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"

    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="propertyClasses.py"
      functionName="UpdateProxyReferencesIn_U_assert_Value"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'third'"
  /></PropertyClass

  ><PropertyClass PropertyClassName="x_RrpLrnRrn" ValueType="stringKeyDictOfStringKeyDictsWithStringListValues1"
    ><Desc>x_remoteRolePlayer_localRoleNames_remoteRoleNames (x_RrpLrnRrn)</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Add_U_assert_PropToOverheadDict"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'first'"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Remove_U_assert_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_U_assert_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="propertyClasses.py"
      functionName="Merge_U_assert_PropertyValues"
      functionExtraArgsString="workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="propertyClasses.py"
      functionName="ValuesOf_U_assert_PropertyInstancesAreSignificantlyDifferent"
      functionExtraArgsString="propertyInstance1 = propertyInstance1, propertyInstance2 = propertyInstance2, workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"

    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="propertyClasses.py"
      functionName="UpdateProxyReferencesIn_U_assert_Value"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'first'"
  /></PropertyClass

  ><PropertyClass PropertyClassName="x_RrpRrnLrn" ValueType="stringKeyDictOfStringKeyDictsWithStringListValues1"
    ><Desc>x_remoteRolePlayer_remoteRoleNames_localRoleNames (x_RrpRrnLrn)</Desc
    ><Add__PropToOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Add_U_assert_PropToOverheadDict"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'first'"
    /><Remove__PropFromOverheadDict
      functionModuleFilePath="propertyClasses.py"
      functionName="Remove_U_assert_PropFromOverheadDict"

    /><ValueIsInvalidFor__Property
      functionModuleFilePath="propertyClasses.py"
      functionName="ValueIsInvalidFor_U_assert_Property"

    /><Merge__PropertyValues
      functionModuleFilePath="propertyClasses.py"
      functionName="Merge_U_assert_PropertyValues"
      functionExtraArgsString="workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"
    /><ValuesOf__PropertyInstancesAreSignificantlyDifferent
      functionModuleFilePath="propertyClasses.py"
      functionName="ValuesOf_U_assert_PropertyInstancesAreSignificantlyDifferent"
      functionExtraArgsString="propertyInstance1 = propertyInstance1, propertyInstance2 = propertyInstance2, workingValueSourceListOfPropertyInstances = workingValueSourceListOfPropertyInstances, propertyInstanceToMerge = propertyInstanceToMerge"

    /><UpdateProxyReferencesIn__Value
      functionModuleFilePath="propertyClasses.py"
      functionName="UpdateProxyReferencesIn_U_assert_Value"
      functionExtraArgsString="levelAtWhichProxyReferenceAppears = 'first'"
  /></PropertyClass

  ><ConferralRule ConferralRuleName="infer_U_assert_properties_from_U_assert_properties"
      functionModuleFilePath="conferralRules.py"
      functionName="infer_U_assert_properties_from_U_assert_properties"
    ><Desc>From each U_assert property, confer all other U_assert properties.</Desc
  ></ConferralRule

  ><ConferralRule ConferralRuleName="bridgeFrom_A_assert_modelTo_U_assert"
      functionModuleFilePath="conferralRules.py"
      functionName="bridgeFrom_a_sip_modelTo_U_assert"
      functionExtraArgsString="bridgeFromTMAName = 'A_assert',
                               rolesTMAName = 'Roles',
                               roleNamePropertyClassName = 'role name',
                               assertionModel = 'A_assert'"
    ><Desc>From each A_assert,,a_sip property, confer an x_LrnRrnRrp property on each of its role players.</Desc
  ></ConferralRule

></VersavantTMA>
