/src/tools/semantics/code/instructions/liberty_assignment.e

http://github.com/tybor/Liberty · Specman e · 51 lines · 31 code · 6 blank · 14 comment · 0 complexity · 647f1b03341b926f874bea6b746fbda5 MD5 · raw file

  1. -- This file is part of Liberty Eiffel.
  2. --
  3. -- Liberty Eiffel is free software: you can redistribute it and/or modify
  4. -- it under the terms of the GNU General Public License as published by
  5. -- the Free Software Foundation, version 3 of the License.
  6. --
  7. -- Liberty Eiffel is distributed in the hope that it will be useful,
  8. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. -- GNU General Public License for more details.
  11. --
  12. -- You should have received a copy of the GNU General Public License
  13. -- along with Liberty Eiffel. If not, see <http://www.gnu.org/licenses/>.
  14. --
  15. deferred class LIBERTY_ASSIGNMENT
  16. inherit
  17. LIBERTY_INSTRUCTION
  18. feature {ANY}
  19. writable: LIBERTY_WRITABLE
  20. expression: LIBERTY_EXPRESSION
  21. feature {LIBERTY_REACHABLE, LIBERTY_REACHABLE_COLLECTION_MARKER}
  22. mark_reachable_code (mark: INTEGER) is
  23. do
  24. writable.mark_reachable_code(mark)
  25. expression.mark_reachable_code(mark)
  26. end
  27. feature {}
  28. make (a_writable: like writable; a_expression: like expression; a_position: like position) is
  29. require
  30. a_writable /= Void
  31. a_expression /= Void
  32. a_position /= Void
  33. do
  34. writable := a_writable
  35. expression := a_expression
  36. position := a_position
  37. ensure
  38. writable = a_writable
  39. expression = a_expression
  40. position = a_position
  41. end
  42. invariant
  43. writable /= Void
  44. expression /= Void
  45. end