anchor.diff:  ; Search for regression solving the CSP used by MAC (Maintain Arc Consistency)
   ; function and applying MRV heuristic model.
   
  -(defun procura-retrocesso-mac-mrv(psr)
  +(defun procura-retrocesso-mac-mrv (psr)
   	(let ((testesTotais 0) (res nil) (res1 nil) (var nil) (inf nil))
   		(cond ((psr-completo-p psr) 
   			(return-from procura-retrocesso-mac-mrv (values psr testesTotais))))
  
positive.code: (defun psr-variavel-consistente-p (psr var)
  	(let
  		(
  			(psr1 (cria-psr
  							(PSR-listvars psr)
  							(PSR-listdomains psr)
  							(copy-list
  								(psr-variavel-restricoes psr var)
  							)
  						)
  			)
  		(sz (list-length (PSR-listvalues psr))))
  		
  		(dotimes (i sz)
  			(setf (nth i (PSR-listvalues psr1) ) (nth i (PSR-listvalues psr) ) )
  		)
  		
  		(psr-consistente-p psr1)
  	)
  )
  
  
negative.code: ; and a value for this variable, a variable v2 and a
  ; value for that variable, and returns two values.
  
  (defun psr-atribuicoes-consistentes-arco-p (psr var1 v1 var2 v2)
  	(if (equal (psr-listconstrains psr) nil)
  		(return-from
  			psr-atribuicoes-consistentes-arco-p
  				(values T 0)
  		)
  	)
  
  	(let
  		(
  			(testes 0)
  			(aux1 (psr-variavel-valor psr var1))
  			(aux2 (psr-variavel-valor psr var2))
  		)
  		
  		(if (equal aux1 nil)
  			(setf aux1 nil)
  		)
  		
  		(if (equal aux2 nil)
  			(setf aux2 nil)
  		)
  
  		(psr-adiciona-atribuicao! psr var1 v1)
  		(psr-adiciona-atribuicao! psr var2 v2)
  		
  		(dolist (r (psr-variavel-restricoes psr var1))
  			(cond
  				(
  					(membro var2 (restricao-variaveis r))
  					(incf testes)
  					(cond
  						(
  							(not (funcall (restricao-funcao-validacao r) psr))
  							(psr-adiciona-atribuicao! psr var1 aux1)
  							(psr-adiciona-atribuicao! psr var2 aux2)
  							(return-from
  								psr-atribuicoes-consistentes-arco-p
  									(values nil testes)
  							)
  						)
  				  )
  				)
  			)
  		)
  		(psr-adiciona-atribuicao! psr var1 aux1)
  		(psr-adiciona-atribuicao! psr var2 aux2)
  		(values T testes)
  	)
  )
  
  