package tcra.exercises;

import java.util.*;
import tcra.math.*;
import tcra.exercises.resolve_bounded_queue_private.*;

public class ResolveBoundedQueueExercise extends TCRAExercise
{
   private static final int max_length = 5;
   
   public ResolveBoundedQueueExercise()
   {
      super("<html>Concept Queue_Template(type Integer; "+
            "evaluates Max_Length: Integer);<br>"+
            "uses Std_Integer_Fac, String_Theory;<br>"+
            "requires Max_Length &gt; 0; (Max_Length = "+
            max_length + ")<br>"+
            "Type Family Queue ⊆ Str(Entry);<br>" +
            "exemplar Q;<br>" +
            "constraint |Q| ≤ Max_Length;<br>" +
            "initialization ensures Q = Λ;");
      contracts = new Vector<MethodContract>();
      contracts.add(new ResolveBoundedQueue_EnqueueContract());
      contracts.add(new ResolveBoundedQueue_DequeueContract());
      contracts.add(
                 new ResolveBoundedQueue_Swap_First_EntryContract());
      contracts.add(new ResolveBoundedQueue_LengthContract());
      contracts.add(new ResolveBoundedQueue_Rem_CapacityContract());
      contracts.add(new ResolveBoundedQueue_ClearContract());
      // TODO Auto-generated constructor stub
   }

   public static int getMaxLength() { return max_length; }
   public MathModel getMathRep()    { return new MathStringModel(); }
   public String getSelfString()    { return "Q"; }

}
