/* File Name: fg.format */ /* NEW Format of f, g functions allowing specification of parameters */ cur_state // comment next_state // comment #input_messages // comment msg.in1[:fuzzy_value][,] //only external message needs fuzzy value msg.in2[:fuzzy_value][,] //only external message needs fuzzy value ... msg.in_#input_messages[:fuzzy_value][,] // comment #preds #cond_type type.1 op #value val.1 .. val.#value .... type.#cond_type op #value val.1 .. val.#value ... . #cond_type type.1 op #value val.1 .. val.#value .... type.#cond_type op #value val.1 .. val.#value #output_ics // comment ic.out1[,ic_type] // comment ic.out2[,ic_type] // comment ... ic.out_#output_ics[,ic_type] // comment #output_messages // #output_messages should be equal to #output_ics msg.out1:fuzzy_type[,] // comment msg.out2:fuzzy_type[,] // comment ... msg.out_#output_messages:fuzzy_type[,] // comment #actions // comment action1[,] // comment action2[,] // comment ... action_#actions[,] // comment cur_state // comment next_state // comment #input_messages // comment msg.in1[:fuzzy_value][,] //only external message needs fuzzy value msg.in2[:fuzzy_value][,] //only external message needs fuzzy value ... msg.in_#input_messages[:fuzzy_value][,] // comment #preds #cond_type type.1 op #value val.1 .. val.#value .... type.#cond_type op #value val.1 .. val.#value ... #cond_type type.1 op #value val.1 .. val.#value .... type.#cond_type op #value val.1 .. val.#value #output_ics // comment ic.out1[,ic_type] // comment ic.out2[,ic_type] // comment ... ic.out_#output_ics[,ic_type] // here is what is different from previous version #output_messages // #output_messages should be equal to #output_ics msg.out1[:fuzzy_type][,] // comment msg.out2[:fuzzy_type][,] // comment ... msg.out_#output_messages[:fuzzy_type][,] // comment #actions // comment action1[,] // comment action2[,] // comment ... action_#actions[,] // comment . . . Note: If a #x is 0, there should not be a line following for x1 x2 ... where ::= '|' ::= ::= | | ::= I | F | S ::= X | Y | Z ::= G'('')' | H'('')' ::= | NULL ::= ',' ::= ::= '0'..'9' Example: 0 // current state = 0 1 // next state = 1 2 // 2 input messages 2:0.6,X1|I3 // messages types 2, fuzzy value 0.6, parameters var X1 and int 3 3:0.4,Y1 // messages types 3, fuzzy value 0.4, parameter var Y1 0 // no predicate 1 // 1 output ic 1 // output ic id 1 // 1 output message 2:1,X1|Shelp|G1(X1,Y1) // message type 2, fuzzy type 1, parameters string help, func G1 1 // 1 action 1,I10|F2.5|Y1 // action 1, parameters int 10, float 2.5, var Y1 0 // current state = 0 0 // next state = 0 1 // 1 input message 1:0.5 // messages type 1, fuzzy_value 0.5 2 // 2 predicate 2 0 IN 2 XRAY ANGIO 0 NOT 1 XRAY 1 0 NOT 1 ANGIO 1 // 1 output ic's 1 // output ic id's 1 // 1 output message 2:2 // message type 2, fuzzy type 2 1 // 1 action 2 // action 2