// @(#) $Id: E_SLList.refines-jml,v 1.9 2005/12/24 21:20:31 chalin Exp $ // Copyright (C) 1998, 1999 Iowa State University // This file is part of JML // JML is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2, or (at your option) // any later version. // JML is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with JML; see the file COPYING. If not, write to // the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. // Author: Clyde Ruby package org.jmlspecs.samples.list.list1; //@ refine "E_SLList.java"; import org.jmlspecs.samples.list.list1.node.SLNode; // FIXME: adapt this file to non-null-by-default and remove the following modifier. /*@ nullable_by_default @*/ public class E_SLList extends SLList { /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ callable super(); @ captures \nothing; @*/ public E_SLList(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ callable \nothing; @ captures \nothing; @*/ public /*@ pure @*/ int length(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ callable \nothing; @ captures \nothing; @*/ public /*@ pure @*/ boolean isEmpty(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_; @ callable new ListIterator(E_SLList); @ captures \nothing; @*/ public ListIterator createIterator(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_, log_; @ callable super.removeEntry(); @ captures \nothing; @*/ public void removeEntry(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_, log_; @ callable super.insertAfterCursor(Object ); @ captures newEntry; @*/ public void insertAfterCursor(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible log_; @ callable decreaseCursor(), insertAfterCursor(Object), @ incrementCursor(); @ captures newEntry; @*/ public void insertBeforeCursor(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible log_; @ callable super.replaceEntry(Object); @ captures newEntry; @*/ public void replaceEntry(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible log_; @ callable lastEntry(), insertAfterCursor(Object), @ incrementCursor(); @ captures newEntry; @*/ public void append(Object newEntry); /*@ also @ protected code normal_behavior @ requires \same; @ accessible log_; @ callable firstEntry(), isOffEnd(), removeEntry(), @ incrementCursor(); @ captures \nothing; @*/ public void removeAllEntries(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible this; @ callable new E_SLList(SLNode, int ); @ captures \nothing; @*/ public /*@ non_null @*/ Object clone(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible cursorNode_; @ callable isOffEnd(), decreaseCursor(), incrementCursor(); @ captures \nothing; @*/ protected void lastEntry(); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_, log_; @ callable super(SLList), firstEntry(); @ captures othLst.theList; @*/ protected E_SLList(E_SLList othLst); /*@ also @ protected code normal_behavior @ requires \same; @ accessible length_, log_; @ callable listNode.clone(), firstEntry(); @ captures listNode.entries; @*/ protected E_SLList(SLNode listNode, int len); }