I have a problem that I want to formulate using Z3. However, I not sure what is the best way to do that. Here is a description of what I want to encode and the anticipated output.
If I have a language grammar where x, y and z are non-terminals and "and", "or" and "a" are the language terminals:
x ::= y "or" y
| y
y ::= z "and" z
| z
- z ::= "a"
I want first to encode the previous rules and then I want to generate All possible terminal derivations that are accepted by the grammar.
The ultimate output would be :
a and a or a and a
a or a
a and a
a and a or a
a or a and a
...
I do not know where to start. What is the best way to encode the problem?
Any suggestion/guidance is very appreciated..
Thanks