task_interface.alc 588 B

12345678910111213141516171819202122232425262728
  1. // Do this only in the bootstrapper
  2. include "io.alh"
  3. include "primitives.alh"
  4. include "compilation_manager.alh"
  5. include "constructors.alh"
  6. include "modelling.alh"
  7. Void mutable function new_task():
  8. Integer interface
  9. while (True):
  10. interface = input()
  11. if (interface == 0):
  12. exec(deserialize(input()))
  13. elif (interface == 1):
  14. exec(construct_unknown())
  15. elif (interface == 2):
  16. output("DONE")
  17. elif (interface == 3):
  18. compilation_manager()
  19. elif (interface == 4):
  20. construct_model()
  21. elif (interface == -1):
  22. return!
  23. else:
  24. log("Unsupported interface!")
  25. return!