<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>Function interface annotations</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I want to use annotations to specify the interface of a function. I want to specify every variable that is an input to the function (except variables passed by value; this is obvious by the parameter list) and every variable that is output of that function (if not returned by return()). Also, i want to specify the side-effects of the function. For that purpose, I want to use @in@, @out@, @modifies@, @globals@ annotations.</FONT></P>

<P><FONT SIZE=2 FACE="Arial">Is this the correct approach?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">I have some questions on these annotations:</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">/*@in@*/ int *p: Is p or *p mutable?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">/*@out@*/ int *p: Does p have to be allocated? That is, if p==NULL, does splint generate an error?</FONT>

<BR><FONT SIZE=2 FACE="Arial">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Do I have to include *p in @modifies@?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">@globals@: How do I specify that a function does not use any globals?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial">Regards,</FONT>

<BR><FONT SIZE=2 FACE="Arial">Boris</FONT>
</P>

</BODY>
</HTML>