Question

Consider the following BNF: Y ::= W S F | S M F | S M W ::= "d" | "j" | "f" S ::= "m" | "a" | "y" M ::= "y" | "n" | "u" | &#34...

  1. Consider the following BNF:

Y ::= W S F | S M F | S M

W ::= "d" | "j" | "f"

S ::= "m" | "a" | "y"

M ::= "y" | "n" | "u" | "g"

F ::= "p" | "o" | "n"  

  1. Write two strings that are valid according to the BNF.
  2. For each of your two strings, give two valid mutants of the string.
  3. For each of your two strings, give two invalid mutants of the string.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Grammars describe both valid strings and invalid strings.

both types can be produced as mutants.

Mutant is a variations of valid string. mutants may be valid or invalid strings.

a) Two valid strings according to BNF :

dmp, my

b) For each of two strings, two valid mutants of the string :

dmo, dmn, mn, mu

c) For each of two strings, two invalid mutants of the string :

dmu, dma, mp, ma

Add a comment
Know the answer?
Add Answer to:
Consider the following BNF: Y ::= W S F | S M F | S M W ::= "d" | "j" | "f" S ::= "m" | "a" | "y" M ::= "y" | "n" | "u" | &#34...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT