Next: Barriers, Previous: Agreement1, Up: Principles list
principle.agreementSubset
D
Agr1: tv(T)Agr2: tv(T)Agree: set(label(D))
Agr1: ^.D.attrs.agrAgr2: _.D.attrs.agrAgree: ^.D.entry.agree
AgreementSubset (priority 100)
This principle assumes that the Graph principle (Graph) is used
on dimension D.
The AgreementSubset principle establishes subset agreement between the nodes connected by an edge.
It stipulates that:
Agree,
then Agr2 is a subset of Agr1
Here is the definition of the AgreementSubset constraint
functor:
%% Copyright 2001-2008
%% by Ralph Debusmann <rade@ps.uni-sb.de> (Saarland University) and
%% Denys Duchier <duchier@ps.uni-sb.de> (LIFO, Orleans) and
%% Jorge Marques Pelizzoni <jpeliz@icmc.usp.br> (ICMC, Sao Paulo) and
%% Jochen Setz <info@jochensetz.de> (Saarland University)
%%
functor
import
Helpers(checkModel) at 'Helpers.ozf'
Opti(isIn) at 'Opti.ozf'
export
Constraint
define
proc {Constraint Nodes G Principle FD FS Select}
DVA2DIDA = Principle.dVA2DIDA
ArgRecProc = Principle.argRecProc
%%
DIDA = {DVA2DIDA 'D'}
DIDA2LabelLat = G.dIDA2LabelLat
LabelLat = {DIDA2LabelLat DIDA}
LAs = LabelLat.constants
in
%% check features
if {Helpers.checkModel 'AgreementSubset.oz' Nodes
[DIDA#daughtersL]} then
for Node1 in Nodes do
for Node2 in Nodes do
for LA in LAs do
if {Not {Opti.isIn Node2.index Node1.DIDA.model.daughtersL.LA}=='out'} then
LI = {LabelLat.aI2I LA}
%%
AgreeLM = {ArgRecProc 'Agree' o('^': Node1
'_': Node2)}
Agr1M = {ArgRecProc 'Agr1' o('^': Node1
'_': Node2)}
Agr2M = {ArgRecProc 'Agr2' o('^': Node1
'_': Node2)}
in
{FD.impl
{FS.reified.include Node2.index Node1.DIDA.model.daughtersL.LA}
{FD.impl
{FS.reified.include LI AgreeLM}
{FS.reified.subset Agr2M Agr1M}} 1}
end
end
end
end
end
end
end