fork download
  1. (deffacts initial-facts
  2. "Исходные факты для запуска процесса создания веб-сайта"
  3. (client Ivan)
  4. )
  5.  
  6. (defrule wants-to-create-website
  7. (client Ivan)
  8. =>
  9. (printout t "Иван, хочешь создать веб-сайт? (yes/no): ")
  10. (assert (wants-to-create-website (read)))
  11. )
  12.  
  13. (defrule has-budget
  14. (wants-to-create-website yes)
  15. =>
  16. (printout t "Есть ли у тебя бюджет на создание сайта? (yes/no): ")
  17. (assert (has-budget (read)))
  18. )
  19.  
  20. (defrule start-TZ
  21. (has-budget yes)
  22. =>
  23. (printout t "Начинаем разработку ТЗ." crlf)
  24. (assert (can-start-TZ yes))
  25. )
  26.  
  27. (defrule develop-TZ
  28. (can-start-TZ yes)
  29. =>
  30. (printout t "Разработано ТЗ." crlf)
  31. (assert (developed-TZ yes))
  32. )
  33.  
  34. (defrule approve-TZ
  35. (developed-TZ yes)
  36. =>
  37. (printout t "ТЗ утверждено?" crlf)
  38. (printout t "Подтверждаешь? (yes/no): ")
  39. (assert (approved-TZ (read)))
  40. )
  41.  
  42. (defrule design-website
  43. (approved-TZ yes)
  44. =>
  45. (printout t "Разработан дизайн сайта." crlf)
  46. (assert (designed-website yes))
  47. )
  48.  
  49. (defrule implement-website
  50. (designed-website yes)
  51. =>
  52. (printout t "Сайт реализован." crlf)
  53. (assert (implemented-website yes))
  54. )
  55.  
  56. (defrule test-website
  57. (implemented-website yes)
  58. =>
  59. (printout t "Сайт протестирован." crlf)
  60. (assert (tested-website yes))
  61. )
  62.  
  63. (defrule setup-hosting
  64. (tested-website yes)
  65. =>
  66. (printout t "Настроены хостинг и домен?" crlf)
  67. (printout t "Подтверждаешь? (yes/no): ")
  68. (assert (hosting-setup (read)))
  69. )
  70.  
  71. (defrule launch-website
  72. (hosting-setup yes)
  73. =>
  74. (printout t "Сайт запущен!" crlf)
  75. (assert (website-launched yes))
  76. )
  77.  
  78. (exit)
  79. ; empty line at the end
Success #stdin #stdout 0.01s 5384KB
stdin
Standard input is empty
stdout
Standard output is empty