anchor.diff:  ; Francisco Maria Calisto
   ; 70916
   
  -; ======================================================================================= ;
  -;                                             NOTAS                                       ;
  -; ======================================================================================= ;
  -
  -; How to Test: 
  -
  -; ex.
  -; clisp -i tipos_de_dados.lisp -i exemplos.lisp < test01/input
  -
  -; ======================================================================================= ;
  -;                                             LOAD                                        ;
  -; ======================================================================================= ;
  -
  -; Invocation of test files.
  -
  -;;;; =====> UNCOMMENT AS YOU NEED <===== ;;;;
  -
   (load "exemplos.fas")
  -
  -; (load "exemplos.lisp")
  -
  -; (compile-file "exemplos.lisp")
  -
   
   ; ======================================================================================= ;
   ;                               DEFINICAO DAS ESTRUTURAS DE DADOS                         ;
  
positive.code: ; Returns the corresponding domain to that variable.
  
  (defun psr-variavel-dominio (psr key)
      (defparameter *myhashtable* (make-hash-table :test 'equal))
      (let ((maxsz (list-length (PSR-listvars psr)))
             (answ2 NIL)
       			)
  				(dotimes (i maxsz (PSR-listvars psr))
  	    		(if (equal (nth i (PSR-listvars psr)) key)
  						(setf answ2 (nth i (PSR-listdomains psr)))
  	     		)
      		)
      		answ2
      )
  )
  
  ; RESTRICOES DA VARIAVEL
  
negative.code: ; The variables of our PSR will serve to index the Hashtable
  ; and this way we can access the respective values at a lower cost.
  
  ; Given a place in the game board this returns the variable
  ; associated with that place:
  (defparameter myhashtable (make-hash-table :test 'equal))
  (defparameter hashtable2 (make-hash-table :test 'equal))
  
  ; Given a variable speeds up the retrieve of its value:
  (defparameter hashtablevals (make-hash-table :test 'equal))
  
  ; Speeds up domain retrieval:
  (defparameter hashtabledoms (make-hash-table :test 'equal))
  
  ; Speeds up constrains checking:
  (defparameter hashtableconstr (make-hash-table :test 'equal))
  
  ; ======================================================================================= ;
  ; ======================================================================================= ;
  