/tutorial/backtracking/tiny_prolog/prolog_var.e

http://github.com/tybor/Liberty · Specman e · 21 lines · 21 code · 0 blank · 0 comment · 2 complexity · d8c6bf6d6c70c470e0cf31165a812053 MD5 · raw file

  1. class PROLOG_VAR
  2. inherit PROLOG_TERM
  3. feature
  4. type: INTEGER is
  5. do
  6. if value = Void then
  7. Result = type_var
  8. else
  9. Result = value.type
  10. end
  11. end
  12. deref: PROLOG_TERM is
  13. do
  14. if value = Void then
  15. Result := Current
  16. else
  17. Result := value
  18. end
  19. end
  20. value: PROLOG_TERM
  21. end