package tcra.exercises;

import java.util.Vector;
import tcra.math.*;
import tcra.exercises.resolve_bounded_stack_private.*;

public class ResolveBoundedStackExercise extends TCRAExercise 
{
   private static final int max_depth = 5;
   
	public ResolveBoundedStackExercise()
	{
		super("<html>Concept Stack_Template(type Integer;" +
            " evaluates Max_Depth: Integer);<br>" +
            "uses Std_Integer_Fac, String_Theory;<br>" +
            "requires Max_Depth &gt; 0; (Max_Depth = "+
            max_depth + ")<p>"+
            "Type Family Stack ⊆ Str(Entry);<br>" +
            "exemplar S;<br>" +
            "constraints |S| ≤ Max_Depth;<br>" +
            "initialization ensures S = Λ;");
		contracts = new Vector<MethodContract>();
		contracts.add(new ResolveBoundedStack_PushContract());
		contracts.add(new ResolveBoundedStack_PopContract());
		contracts.add(new ResolveBoundedStack_DepthContract());
		contracts.add(new ResolveBoundedStack_ClearContract());
		contracts.add(new ResolveBoundedStack_Rem_CapacityContract());
	}
	
	public MathModel getMathRep()   { return new MathStringModel(); }
	public String getSelfString()   { return "S";}
	public static int getMaxDepth() { return max_depth; }

}
