QUESTION: Date: December 1, 2004 7:32:13 PM PST From: adukovic@calpoly.edu Subject: Logic statement To: gfisher@calpoly.edu Hello. I'm in your morning 205 section, test tool team. I just wanted a quick bit of feedback from you. I am trying to perfect the GenerateAdvancedTest operation and I cannot quite get one statement to get through the compiler. Basically, I want to say that each question has one of the keywords in it. The keywords input by the user in the wizard are atc.keywords, and the keywords in the question are q.keywords. t.questions is the set of questions in a test. forall (q in t.questions) exists (str in atc.keywords) and exists (k in q.keywords) str = k I have tried a number of different variants but it just isn't working out. If you could show me a way to do this I'd be grateful. Adam Dukovich ANSWER: From: gfisher@csc.calpoly.edu Date: December 2, 2004 6:25:19 AM PST Subject: Re: Logic statement To: adukovic@calpoly.edu I think you can simplify it to just this: forall (q in t.questions) exists (str in atc.keywords) str in q.keywords This says there is at least one, possibly more keywords from the criteria in each question. From what I recall from the requirements, this is what you want. What the above logic does not rule out are other keywords in the question that aren't in the criteria, which I think is as it should be. The logic also does not rule out more than one of the criteria keywords being in the question, which is again OK according to the requirements.