  
  [1X5 [33X[0;0YRefiners[133X[101X
  
  
  [1X5.1 [33X[0;0YIntroduction to refiners[133X[101X
  
  [33X[0;0YIn [5XBacktrackKit[105X, a refiner is implemented as a record that must contain:[133X
  
  [30X    [33X[0;6YA  member  called  [10Xname[110X,  which  is  a  string  giving the name of the
        constraint;[133X
  
  [30X    [33X[0;6YA  member  called  [10Xlargest_required_point[110X,  which  is an integer which
        gives  the  smallest  size  partition  this  refiner will work on. For
        example, given a set we would expect this to be the largest element of
        the set.[133X
  
  [30X    [33X[0;6YA  member  called  [10Xconstraint[110X, which is a constraint object, such that
        the  refiner  is  refining  for  the  permutations  that  satisfy  the
        constraint.[133X
  
  [30X    [33X[0;6YA  member  called [10Xrefine[110X, which is a record; more information is given
        below.[133X
  
  [33X[0;0YA constraint may also optionally contain any of the following members:[133X
  
  [30X    [33X[0;6YA  member called [10Xbtdata[110X. The data in this member will be automatically
        saved and restored on backtrack.[133X
  
  
  [1X5.2 [33X[0;0YThe record [10Xrefine[110X[101X[1X[133X[101X
  
  [33X[0;0YThe [10Xrefine[110X member of a constraint is a record that contains functions which,
  if  present,  will be called to inform the constraint of behaviour as search
  progresses,  and  to  give  the  constraint the opportunity to influence the
  search. The permissible functions are given described below.[133X
  
  [33X[0;0YThese  functions  will  always be passed at least two arguments: firstly the
  constraint  itself,  and  then  the  partition stack. Details of any further
  arguments are described with the relevant function, below.[133X
  
  [30X    [33X[0;6Y[10Xinitialise[110X  [13X(required)[113X.  This is called when search begins. Note that,
        since  the  [10Xrefine.initialise[110X  function  is  called  for  all relevant
        constraints at the beginning of search, the partition may have already
        been   split   by   some   earlier   constraint   by   the  time  that
        [10Xrefine.initialise[110X is called for a later constraint.[133X
  
  [33X[0;0YAt most one of the following two functions will generally be implemented.[133X
  
  [30X    [33X[0;6Y[10Xchanged[110X  -  Will  be  called after one or more splits in the partition
        occur.[133X
  
  [30X    [33X[0;6Y[10Xfixed[110X  -  Will  be  called  after  one or more points in the partition
        became fixed.[133X
  
  [30X    [33X[0;6Y[10XrBaseFinished[110X  -  The  rBase  has  been  created -- this is passed the
        partition  which  was  generated  down  the  first  branch  of search.
        Constraints  which  care about this can use this to remember the rBase
        construction is finished.[133X
  
  [30X    [33X[0;6Y[10XsolutionFound[110X  -  A  solution  to  the  problem  has  been found. This
        function is passed a permutation. This function is rarely needed.[133X
  
  
  [1X5.3 [33X[0;0YConstructing refiners[133X[101X
  
  [1X5.3-1 DummyRefiner[101X
  
  [33X[1;0Y[29X[2XDummyRefiner[102X( [3Xconstraint[103X ) [32X attribute[133X
  
  [33X[0;0YThis wraps a constraint in a refiner that doesn't do any refining.[133X
  
