Posted to tcl by Zarutian at Fri Apr 13 16:59:51 GMT 2007view raw

  1. # obsolites http://paste.tclers.tk/190
  2. # The below text by Zarutian is here by put in the international public domain.
  3. #
  4. #Backaus-Noir Form:
  5. # task_quanta := input_queue, output_queue, address_book, state, run_quota
  6. # run_quota := how many commands to be run until next task switching (the size of the slice so to speak)
  7. # input_queue := message*
  8. # output_queue := message*
  9. # message := address_handle*, data
  10. # address_book := address_book_entry*
  11. # address_book_entry := address_handle, real address of an other task_quanta or an entity that can recive messages
  12. # state := return_stack, data_stack, definitions
  13. # return_stack := stack_frame+
  14. # stack_frame := code, code_index
  15. # definitions := definition+
  16. # definition := name, type, code
  17. # type := ("primitive" | "composite")
  18. #
  19. # when a message is recived for an task_quanta
  20. # all addresses in the message are substituted to address_handles
  21. # makeing new address_handles for previously unknown addresses
  22. # when a message is sent from an task_quanta
  23. # all address_handles are substituted to real addresses
  24. #
  25. # a task_quanta can only be suspended because of one of these conditions has occured:
  26. # a) run_quota for current scheduling round has been used up
  27. # b) the task_quanta requested the next message from its input queue
  28. # and the input queue is empty
  29.