Write a parser and evaluator for boolean formulae. You are given the following datatype: datatype formula_type=ATOM of string | NOT | AND | OR; Your program will take 2 inputs, namely the formula and the Boolean variables' assignments as two lists. The formula will be stored as a list of formula_type, and Boolean variable assignments will be stored as a list of string and bool pairs. For example: val formula1=[(ATOM "p"), OR, (ATOM "q"), AND, NOT, (ATOM "p")]; represents the Boolean formula: p OR q AND NOT p val assign1=[("p", false), ("q", true)]; represents that p is FALSE and q is TRUE. Since there is no parenthesis only operator precedences will be used to determine the order of the evaluation. NOT has the highest precedence, followed by AND, then OR, which has the lowest precedence. Therefore, for the above example is equivalent to the fully parenthesized expression (p OR (q AND (NOT p))). (This expression evaluates to TRUE.) Associativity of the binary operators is left to right. Your main function should be named as eval and should take two lists as its inputs, a formula and an assignment and return true or false. The function call eval(formula1,assign1); should return true. If there is either a syntax error in your formula or an assignment for a variable in the formula passed to eval doesn't appear in the assignment list or vice versa, your program is not required to work properly. (Essentially, we will ONLY test your program with valid inputs. Only worry about your program running properly in these cases. It is okay if your program crashes given invalid input.)
## Deliverables
Complete and fully-functional working program(s) in executable form as well as complete source code of all work done. Complete copyrights to all work purchased.
## Platform
in ML language also provide an instruction for how to run the program and execute it