Narnia_Optimus
Narnia_Optimus

Reputation: 448

Counting the number of Total CounterExamples in Alloy

Calling the

Kodkod.execute() 

method returns a A4Soluiton object, which we can iterate by next() method until it reaches to a counterexample which is unsatisfiable(). By this way we can count the total number of counterexamples by the solver.

My question is, if it is possible to know the total number of counterexamples directly from the A4Solution object without iterating through it.

Thanks a lot in advance for your reply.

Upvotes: 1

Views: 243

Answers (1)

Aleksandar Milicevic
Aleksandar Milicevic

Reputation: 3857

You can't get the total number of counterexamples ahead of time, i.e., without enumerating one by one.

Upvotes: 1

Related Questions