notPathPattern.addConstraint( getBoundVariableConstraint( notPathPattern,
"guestName",
leftGuestNameDeclaration,
this.objectEqualEvaluator ) );
final GroupElement notPath = GroupElementFactory.newNotInstance();
notPath.addChild( notPathPattern );
rule.addPattern( notPath );
// ------------
// not ( Chosen( id == seatingId, guestName == leftGuestName, hobby ==
// rightGuestHobby ) )
// ------------
final Pattern notChosenPattern = new Pattern( 6,
this.chosenType );
notChosenPattern.addConstraint( getBoundVariableConstraint( notChosenPattern,
"id",
seatingIdDeclaration,
this.integerEqualEvaluator ) );
notChosenPattern.addConstraint( getBoundVariableConstraint( notChosenPattern,
"guestName",
leftGuestNameDeclaration,
this.objectEqualEvaluator ) );
notChosenPattern.addConstraint( getBoundVariableConstraint( notChosenPattern,
"hobby",
rightGuestHobbyDeclaration,
this.objectEqualEvaluator ) );
final GroupElement notChosen = GroupElementFactory.newNotInstance();
notChosen.addChild( notChosenPattern );
rule.addPattern( notChosen );
// ------------
// int newSeat = rightSeat + 1;