5- The set of formulas can be defined as follows: i. An atomic formula is a formula ii. if "X" and "y&#...
5- The set of formulas can be defined as follows: i. An atomic formula is a formula ii. if "X" and "y" are formulas, then also "not X", "X and Y", "x or Y", and "X implies Y" are formulas iii. If "X" is a formula and "a" is an identifier, then also "exists a. X" and "Seram a . x" are formulas These properties must hold: The precedence order is as follows (1) not a. (2) and 3) Oniie (4) implies (5) exists, forall b. "and" and "or" are left-associative, "implies" is right-associative c. Formulas can be preceded by an arbitrary number of negations (i.e. "not net x", "not aat aet x", etc. are allowed) Examples of the strings in the languages: forall x. foxaul y. exists z. X or B implies C Not A facade x. A or B not C Give an unambiguous CFG generating the language above and satisfying all properties. You may assume given productions for generating identifiers and atomic formulas starting from the non-terminals ID (can be any of the alphabet) and ATOM (can be any atomic formula) respectively.