Recent Posts

Featured Posts

MDG specification – DGDL last updated September 15, 2016 by mark

MDG specification – DGDL

  1. System{Mediation{
  2. 	turns{magnitude:multiple, ordering:strict}
  3. 	roles{speaker, listener, Mediator, Party}
  4. 	players{min:3, max:3}
  5. 	player{id:Mediator}
  6. 	player{id:PartyOne}
  7. 	player{id:PartyTwo}
  8. 	
  9. 	store{id:CommitmentsPartyTwo, owner:PartyOne, structure:set, visibility:public, {""}}
  10. 	backtrack{on}
  11. 	
  12. 	/* Rules */
  13. 	rule{id:StartingRule, scope:initial,
  14. 	{ assign(Mediator, speaker)
  15. 		& move(add, next, PureQuestion, $Party, {p}, Mediator)
  16. 		}
  17. 	}
  18. 	
  19. 	/* Interactions */
  20. 	interaction{PureQuestion, $Participant, {p}, PureQuestioning, {p}, "Do you believe $p?",
  21. 		{ move(add, next, Assert, {p}, Target)
  22. 		& move(add, next, Assert, {q}, Target)
  23. 		}
  24. 	}
  25. 
    
  26. 	interaction{Argue, {p,q}, Asserting, {q}, Arguing, {<{q},{p}>, DefaultInference}, "$p because $q",
  27. 		{
  28. 		if{ player(PartyOne) } then
  29.                         { store(add, {q}, CommitmentsPartyOne, PartyOne)
  30.                         & move(add, next, PureQuestion, $Party, {q}, Mediator)
  31.                         & move(add, next, AssertiveQuestion, $Party, {q}, Mediator)
  32.                         & move(add, next, PureChallenge, $Party, {q}, Mediator)
  33.                         }
  34.                 else
  35.                         { store(add, {q}, CommitmentsPartyTwo, PartyTwo)
  36.                         & move(add, next, PureQuestion, $Party, {q}, Mediator)
  37.                         & move(add, next, AssertiveQuestion, $Party, {q}, Mediator)
  38.                         & move(add, next, PureChallenge, $Party, {q}, Mediator)
  39.                         & assign(Mediator, speaker)
  40.                         }
  41. 		}
  42. 	}
  43. 
    
  44. 	interaction{AssertiveQuestion, $Participant, {p}, AssertiveQuestioning, {p}, "Do you agree $p?",
  45. 		{ move(add, next, Withdraw, {p}, Target)
  46. 		& move(add, next, Agree, {p}, Target)
  47. 		& move(add, next, Disagree, {p}, Target)
  48. 		}
  49. 	}
  50. 	
  51. 	interaction{PureChallenge, $Participant, {p}, PureChallenging, {p}, "Why $p?",
  52. 		{ move(add, next, Argue, {p,r}, Target)
  53. 		& move(add, next, Withdraw, {p}, Target)
  54. 		}
  55. 	}
  56. 
    
  57. 	interaction{Assert, {p}, Asserting, {p}, "I assert $p",
  58. 		{
  59. 		if{ player(PartyOne) } then
  60. 			{ store(add, {p}, CommitmentsPartyOne, PartyOne)
  61. 			& move(add, next, AssertiveQuestion, $Party, {p}, Mediator)
  62. 			& move(add, next, PureChallenge, $Party, {p}, Mediator)
  63. 			}
  64. 		else
  65. 			{ store(add, {p}, CommitmentsPartyTwo, PartyTwo)
  66. 			& move(add, next, PureQuestion, $Party, {p}, Mediator)
  67. 			& move(add, next, AssertiveQuestion, $Party, {p}, Mediator)
  68. 			& move(add, next, PureChallenge, $Party, {p}, Mediator)
  69. 			& assign(Mediator, speaker)
  70. 			}
  71. 		}
  72. 	}
  73. 
    
  74. 	interaction{Withdraw, {p}, Asserting, {p}, "Withdraw $p",
  75. 		{
  76. 		if{ player(PartyOne) } then
  77. 			{ store(remove, {p}, CommitmentsPartyOne, PartyOne)
  78. 			& move(add, next, AssertiveQuestion, $Party, {p}, Mediator)
  79. 			& move(add, next, PureQuestion, $Party, {p}, Mediator)
  80. 		& move(add, next, AssertiveQuestion, $Party, {q}, Mediator)
  81. 			}
  82. 		else
  83. 			{ store(remove, {p}, CommitmentsPartyTwo, PartyTwo)
  84. 			& move(add, next, AssertiveQuestion, $Party, {p}, Mediator)
  85. 			& move(add, next, PureQuestion, $Party, {p}, Mediator)
  86. 			& move(add, next, AssertiveQuestion, $Party, {q}, Mediator)
  87. 			}
  88. 		}
  89. 	}
  90. 	
  91. 	interaction{Agree, {p}, Asserting, {p}, "I agree with $p",
  92. 		{
  93. 		if{ player(PartyOne) } then
  94. 			{ store(add, {p}, CommitmentsPartyOne, PartyOne)
  95. 			& move(add, next, PureQuestion, $Party, {q}, Mediator)
  96. 			& move(add, next, AssertiveQuestion, $Party, {q}, Mediator)
  97. 			}
  98. 		else
  99. 			{ store(add, {p}, CommitmentsPartyTwo, PartyTwo)
  100. 			& move(add, next, PureQuestion, $Party, {q}, Mediator)
  101. 	& move(add, next, AssertiveQuestion, $Party, {q}, Mediator)
  102. 			}
  103. 		}
  104. 	}
  105. 
    
  106.     interaction{Disagree, {c}, Asserting, {!c}, Contradicting, {<{c},{!c}>, DefaultConflict}, "I disagree with $c",
  107.         {
  108.         if{ player(PartyOne) } then
  109.             { store(add, {c}, CommitmentsPartyOne, PartyOne)
  110.             & move(add, next, PureQuestion, $Party, {c}, Mediator)
  111.             & move(add, next, Restate, {c}, Mediator)
  112.             }
  113.         else
  114.             { store(add, {c}, CommitmentsPartyTwo, PartyTwo)
  115.             & move(add, next, PureQuestion, $Party, {c}, Mediator)
  116.             & move(add, next, Restate, {c}, Mediator)
  117.             }
  118.         }
  119.     }
  120. 	
  121. 	interaction{Restate, {p}, Restating, {p}, "$p",
  122. 		{ move(add, next, AssertiveQuestion, $Party, {p}, Mediator)
  123. 		& move(add, next, PureChallenge, $Party, {p}, Mediator)
  124. 		}
  125. 	}
  126. }}
  127.