Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2023
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.71 KB | None | 0 0
  1. Грамматика экспертной системы
  2.  
  3. Экспертная система
  4. <expert system> ::= <defenition> <initialization> <rule block> <variable block> <completion>
  5.  
  6. Общие нетерминалы
  7. <output> ::= OUTPUT: {<output data>,…}
  8. <output data> ::= <expertise variable name> | <text>
  9.  
  10. <value> ::= <simple value> | {<fuzzy value>,…}
  11. <fuzzy value> ::= <simple value> CF 1..100
  12.  
  13. <assigment> ::= <variable name> = <value>
  14. <variable name> ::= <expertise variable name> | <environment variable name>
  15.  
  16. <input> ::= INPUT: <expertise variable name> <type> WITH <text>
  17.  
  18. 1.Блок цели
  19. <definition> ::= GOAL: <expertise variable name>
  20.  
  21.  
  22. 2.Блок инициализации
  23. <initialization> ::= INITIAL: {<initialization command>,…}
  24. <initialization command> ::= <output> | <assignment> | <input>
  25.  
  26.  
  27.  
  28. 3.Блок правил
  29. <rule block> ::= {<rule>,…}
  30. <rule> ::= [{<auxiliary element>,…}] [<ready>] IF: <premise> THEN: <conclusion> [<reason>] [<variables>]
  31.  
  32. <auxiliary element> ::= <priority> | <cost> | <test> | <comment>
  33. <priority> ::= PRIORITY: 1..100
  34. <cost> ::= COST: 1..100
  35. <test> ::= TEST: {S | E | P}
  36. <comment> ::= COMMENT: <text>
  37.  
  38. <ready> ::= READY: {<ready command>,…}
  39. <ready command> ::= <output> | <assignment>
  40.  
  41. <premise> ::= < logical expression >
  42. <logical expression> ::= <logical operand> | <logical expression> <logical operator> <logical expression>
  43. <logical operand> ::= (<logical expression> ) | <comparison expression>
  44. <logical operator> ::= AND | OR
  45. <comparison expression> ::= <comparison operand> <comparison operator> <comparison operand>
  46. <comparison operand> ::= <expertise variable name> | <value> | <function name>(<expertise variable name>)
  47. <comparison operator> ::= > | < | >= | <= | ==
  48.  
  49. <conclusion> ::= {<action>,…}
  50. <action> ::= <expertise variable name> <operator> <value> | <output>
  51. <operator> ::= +=, -=, =
  52.  
  53. <reason> ::= REASON: <text >
  54.  
  55. <used variables> ::= <needs> | <changes>
  56. <needs> ::= NEEDS: {<expertise variable name>,…}
  57. <changes> ::= CHANGES: {<expertise variable name>,…}
  58.  
  59.  
  60.  
  61.  
  62.  
  63. 4.Блок переменных
  64. <variable block> ::= {<variable>,…}
  65. <variable> ::= VAR: <expertise variable name> [{<variable command>,…}]
  66.  
  67. <variable command> ::= <find> | <label> | <when> | <cf type> | <rigor> | <limit>
  68.  
  69. <find> ::= FIND: {<find command>,…}
  70. <find command> ::= <assignment> | <input>
  71. <label> ::= LABEL: <text>
  72. <when> ::= WHEN: {F | L | N}
  73. <cf type> ::= CF TYPE: <cf type value><cf type value>
  74. <cf type value> ::= {M | P}
  75. <rigor> ::= RIGOR: {M | C | A}
  76. <limit> ::= LIMIT: <number>
  77.  
  78.  
  79.  
  80. 5.Блок завершения
  81. <completion> ::= DO: {<completion command>,…}
  82. <completion command> ::= <assignment> | <output>
  83.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement