﻿<?xml-stylesheet type="text/xsl" href="../../templates/doc.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:doc="http://www.lepus.org.uk/doc" xmlns:classz="http://www.lepus.org.uk/classz" xmlns:fopl="http://www.lepus.org.uk/fopl" xml:lang="EN" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">

	<head>
		<link rel="stylesheet" type="text/css" href="http://www.lepus.org.uk/templates/doc.css" />
		<title>Part I: Abstract Semantics for Java 1.4 Programs</title>
		<meta http-equiv="Content-Style-Type" content="text/css" />
		<meta name="Author" content="Amnon H Eden, Jonathan Nicholson, Epameinondas Gasparis" />
		<style type="text/css">
			@media print {
				div.example {
					page-break-after: always;
				}
			}
			th { background-color:transparent; }
		</style>
	</head>

	<body>
		<p class="pagetitle">Abstract Semantics for Java 1.4 Programs</p>
		
		<p class="subtitle">Part I of: Verification of LePUS3/Class-Z 
		Specifications: Sample models and Abstract Semantics for Java 1.4</p>

		<p class="subtitle">Technical Report CSM-471, ISSN 1744-8050</p>
		
		<p><a href="verif.pdf" style="border:0px">
			<img alt="Print this document" src="../../site/print.gif" /></a></p>

		<p class="author">
			<a href="http://www.nicholsonweb.co.uk/">Jonathan Nicholson</a>,
			<a href="http://www.eden-study.org/">Amnon H Eden</a>, Epameinondas 
			Gasparis  
			<br />
			Department of Computer Science, University of Essex, United Kingdom
		</p>
		<p class="author">
			31 December 2007</p>

		<!-- <p>Draft: 14 August 2007</p> -->

		<p>See also: <a href="2case_studies.xml">Part II, Verification of 
		LePUS3/Class-Z Specifications</a></p>
		
		<div class="abstract">
			<h3>Abstract</h3>
			<p>
				This document is a compendium of examples that describe the 
				entities and relations that represent the 
				<a href="../refman/refman.xml#abstractsemantics">abstract semantics</a> (<a href="../refman/refman.xml#finitestructures">finite 
				structures</a>) of programs in the Java<sup>TM</sup>
				programming language. It is designed to provide further 
				explanation to the definitions given in the
				<a href="../refman/refman.xml">LePUS3 and Class-Z Reference 
				manual</a> [<a href="#References">Eden et al. 2007</a>].
				</p>
			<p>
				To remind the reader, a
				<a href="../refman/refman.xml#finitestructures">finite structure</a> 
				is a simplified ('abstracted') picture of the program, which 
				'flattens' the knotty structure and syntax of the source code 
				into a set of primitive entities (also called
				<a href="../refman/refman.xml#Entity_of_dimension_0">entities of 
				dimension 0</a>) and relations. Essentially, each finite 
				structure can be viewed as a relational database, or a set of 
				tables which contain tuples of entities ('records'). Below we list a few sample Java 
				programs and the finite structure that represents them.</p>
			<p>
				See also:
			</p>
			<ul> 
				<li><a href="../refman/refman.xml">LePUS3 and Class-Z Reference 
				manual</a> [<a href="#References">Eden et al. 2007</a>]<ul>
					<li><a href="../refman/refman.xml#definition7">Definition 
					VII: Unary relation</a></li>
					<li><a href="../refman/refman.xml#definition8">Definition 
					VIII: Binary relation</a></li>
				</ul>
				</li>
				<li><a href="2case_studies.xml">Part II, Verification of LePUS3/Class-Z Specifications</a>
				[<a href="#References">Nicholson et al. 2007</a>]</li>
				
			</ul>
		</div>

		<doc:toc />

		<div>
			<h1>Classes</h1>

			<p>In the abstract semantics of the Java programming language, each entity in the <a href="../refman/refman.xml#Unary_relation">unary relation</a>
				<fopl:relation value="Class" /> (also called '<a href="../refman/refman.xml#Class_of_dimension_0">a class of dimension 0</a>') 
				stands for one of the static types mentioned in the program which, 
				in Java, includes classes (<code>java.lang.Object</code>), interfaces (<code>java.util.Collection</code>), 
				primitive types (<code>int</code>), and array types (<code>int[]</code>). 
				Following are some examples that should demonstrate the correlation 
				between types in Java programs and the entities which represent 
				them.
			</p>
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class <em>A</em> {
 <em>int</em> integer;
 <em>int[]</em> array = new int[5];
 class <em>inner</em> {
  class <em>nestedInner</em> { ... }
 }
}

public interface <em>B</em> { ... }
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="int" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="int[]" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.inner" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.inner.nestedInner" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>

		<h1>Methods and signatures</h1>

		<p>Each entity in the <a href="../refman/refman.xml#Unary_relation">unary relation</a>
			<fopl:relation value="Method" /> (also called '<a href="../refman/refman.xml#Class_of_dimension_0">a method of dimension 0</a>') 
			stands for exactly one method in a Java Program.
		</p>
		<p>Each entity in the <a href="../refman/refman.xml#Unary_relation">unary relation</a>
			<fopl:relation value="Signature" /> (also called '<a href="../refman/refman.xml#Class_of_dimension_0">a signature of dimension 0</a>') 
			stands for the signature (name and argument types) of one or more of the methods in a Java Program.
		</p>
		<p>
			The pair 
			<fopl:row>
				<fopl:tuple>
					<fopl:entity value="sig" />
					<fopl:entity value="mth" />
				</fopl:tuple>
			</fopl:row>
			in the <a href="../refman/refman.xml#Binary_relation">binary relation</a>
			<fopl:relation value="SignatureOf" />
			indicates that the method
			<fopl:entity value="mth" />
			has the signature 
			<fopl:entity value="sig" />
			. Since every method in a Java program has exactly one signature,
			each method is associated with exactly one signature.
		</p>
		<p>The relation 
			<fopl:relation value="Member" />
			(<a href="#Member_Relation">see below</a>)
			associates methods with classes, and the relation 
			<fopl:relation value="Inheritable" />
			(<a href="#Inheritable_Relation">see below</a>)
			indicates that a method is accessible from subclasses.
		</p>
		<p>The compiler adds the empty constructor if one has not been provided.</p>
		<div class="example">
			<table class="definition">
				<tr>
					<th>Program</th>
					<th>Complete finite structure</th>
				</tr>
				<tr>
					<td>
						<pre class="program">
							<code>
public class Cls {
 public void <em>mth()</em> { ... }
}								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:entity value="Cls" /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="Cls.mth()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="Cls.Cls()" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="mth()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="Cls()" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple>
												<fopl:entity value="mth()" />
												<fopl:entity value="Cls.mth()" />
											</fopl:tuple>
											<fopl:tuple>
												<fopl:entity value="Cls()" />
												<fopl:entity value="Cls.Cls()" />
											</fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="SignatureOf" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple>
												<fopl:entity value="Cls" />
												<fopl:entity value="Cls.mth()" />
											</fopl:tuple>
											<fopl:tuple>
												<fopl:entity value="Cls" />
												<fopl:entity value="Cls.Cls()" />
											</fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Member" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple>
												<fopl:entity value="Cls.mth()" />
											</fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Inheritable" /></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
			<div class="example">
			<table class="definition">
				<tr>
					<th>Program</th>
					<th>Partial finite structure</th>
				</tr>
				<tr>
					<td>
						<pre class="program">
							<code>
public class <em>A</em> {
 public void <em>t()</em> { ... }
 public void <em>z()</em> { ... }
}

public interface <em>B</em> {
 public void <em>s()</em>;
}

public class <em>C</em>
   extends A implements B {
 public void <em>s()</em> { ... }
 public void <em>s(int i)</em> { ... }
 public void <em>t()</em> { ... }
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A.A()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.t()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.z()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B.B()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.C()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s(int)" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.t()" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="t()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="z()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="s(int)" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A()" /><fopl:entity value="A.A()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="t()" /><fopl:entity value="A.t()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="z()" /><fopl:entity value="A.z()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B()" /><fopl:entity value="B.B()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="s()" /><fopl:entity value="B.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C()" /><fopl:entity value="C.C()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="s()" /><fopl:entity value="C.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="s(int)" /><fopl:entity value="C.s(int)" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="t()" /><fopl:entity value="C.t()" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="SignatureOf" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A" /><fopl:entity value="A.A()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A" /><fopl:entity value="A.t()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A" /><fopl:entity value="A.z()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B" /><fopl:entity value="B.B()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B" /><fopl:entity value="B.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="C.C()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="C.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="C.s(int)" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="C.t()" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Member" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>			
			<div>
				<h1>Abstract Relation</h1>
				The contents of the unary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition7">Definition VII</a>)
				<fopl:relation value="Abstract" /> relation are <fopl:entity value="Class" /> 
				(<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition3">Definition III</a>)
				and <fopl:entity value="Method" /> 
				(<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition6">Definition VI</a>)
				entities. If an entity exists in this relation then the related section of program is <em>abstract</em>,
				for example an <em>Interface</em> is always <em>abstract</em>.
				<div class="example">
					<table class="definition">
						<tr>
							<th>Program</th>
							<th>Partial finite structure</th>
						</tr>
						<tr>
							<td>
								<pre class="program">
									<code>
	public abstract class <em>A</em> {
	 public abstract void <em>s()</em>;
	 public void t() { ... }
	}
	
	public interface <em>B</em> {
	 public void <em>s()</em>;
	}
									</code>
								</pre>
							</td>
							<td>
								<table class="designmodel">
									<tr>
										<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
										<td class="operator"><fopl:equals /></td>
										<td class="range"><fopl:relation value="Class" /></td>
									</tr>
									<tr>
										<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
										<td class="operator"><fopl:equals /></td>
										<td class="range"><fopl:relation value="Method" /></td>
									</tr>
									<tr>
										<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
										<td class="operator"><fopl:equals /></td>
										<td class="range"><fopl:relation value="Signature" /></td>
									</tr>
									<tr>
										<td class="domain">
											<fopl:set vertical="yes">
												<fopl:tuple><fopl:entity value="A" /></fopl:tuple>
												<fopl:tuple><fopl:entity value="A.s()" /></fopl:tuple>
												<fopl:tuple><fopl:entity value="B" /></fopl:tuple>
												<fopl:tuple><fopl:entity value="B.s()" /></fopl:tuple>
											</fopl:set>
										</td>
										<td class="operator"><fopl:equals /></td>
										<td class="range"><fopl:relation value="Abstract" /></td>
									</tr>
									<tr>
										<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
				</div>
			</div>
		<div>
			<h1>Inherit Relation</h1>
		
			<p>The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
				<fopl:relation value="Inherit" /> relation represents inheritance, in terms of 
				Java<span class="superscript">tm</span> this means the keywords 
				<code>extend</code> and <code>implements</code>, 
				as well as the <em>subtyping </em>relation. In Java<span class="superscript">tm</span> there is no inheritance between methods, and all classes 
				which do not explicitly extend or implement from anything are taken 
				to extend class <code>java.lang.Object</code>.
			</p>
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class A <em>extends</em> B
   <em>implements</em> C { ... }

public class B { ... }

public interface C
   <em>extends</em> D { ... }

public interface D { ... }
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A" /><fopl:entity value="B" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A" /><fopl:entity value="C" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="D" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="D" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Inherit" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div>
			<h1>Inheritable Relation</h1>
			The contents of the unary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition7">Definition VII</a>)
			<fopl:relation value="Inheritable" /> relation are <fopl:entity value="method" /> entities
			(<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition6">Definition VI</a>) which were decorated with the
			<em>public</em> or <em>protected</em> access modifiers. Methods declared within <em>final</em> classes are not "inheritable"
			as the class its self cannot be inherited from.
			<p>Constructors are never
				<fopl:relation value="Inheritable" />.
			</p>
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class A {
 <em>public</em> void x() { ... }
 <em>protected</em> void y() { ... }
 private void z() { ... }
}

public <em>final</em> class B {
 public void x() { ... }
 protected void y() { ... }
 private void z() { ... }
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A.x()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.y()" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Inheritable" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div>
			<h1>Member and Aggregate Relations</h1>
			<p>
				The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
				<fopl:relation value="Member" /> relation represents the ownership one class has of its methods and fields.
				The domain is always the &quot;owner&quot;, and the range is either the method or type of the field in question.
			</p>
			<p>
				The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
				<fopl:relation value="Aggregate" /> relation shows that a class has a collection/array of a specified type.
				The domain is always the &quot;owner&quot;, and the range is the basic type stored in the collection/array.
				An <fopl:relation value="Aggregate" /> relation is added for any array, or for any field which inherits from
				<code>java.util.Collection</code>. 
			</p>
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class C {
 <em>Object</em> o1;
 <em>Object</em> o2;
 <em>String[]</em> stringArray;
 <em>int[][]</em> intArray;
 <em>Set</em> objectSet;
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="String[]" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="int[][]" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="java.util.Set" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Member" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="java.lang.String" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="int" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Aggregate" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="java.util.Set" /><fopl:entity value="java.util.Collection" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Inherit" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div>
			<h1>Call and Forward Relations</h1>
			The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
			<fopl:relation value="Call" /> and <fopl:relation value="Forward" /> relations are very similar in that both
			indicate to a method call within the program. An invokation of a method with the same signature as the domain,
			using the same objects as defined by the domains arguments, is known as a forwarding method call. 
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class A {
 public void s() {
  <em>s()</em>;  // Forward
  <em>t(1)</em>; // Call
 }
 public void t(int i) {
  <em>t(i)</em>; // Forward
  <em>t(1)</em>; // Call
 }
}

public class B extends A {
 public void t() {
  <em>s()</em>;  // Call
  <em>t(1)</em>; // Call
 }
 public void t(int i) { ... }
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A.s()" /><fopl:entity value="A.t(int)" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.t(int)" /><fopl:entity value="A.t(int)" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B.t()" /><fopl:entity value="A.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="B.t()" /><fopl:entity value="B.t(int)" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Call" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="A.s()" /><fopl:entity value="A.s()" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="A.t(int)" /><fopl:entity value="A.t(int)" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Forward" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div>
			<h1>Create Relation</h1>
			The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
			<fopl:relation value="Create" /> relation most commonly represents the keyword <em>new</em> for class instantiation,
			however it also represents the initialisation of a primitive type. It is worth noting that a fields initialisation is
			actually performed within each the constructor(s) as in the following example.
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class C {
 public Object o = new Object();
 
 public void s() {
  <em>int i = 0</em>;
  <em>new Object()</em>;
  Object s = <em>new String()</em>;
  put(<em>new Integer(1)</em>);
  int[][] array = <em>new int[5][5]</em>;
 }
 public Object put(Integer i)
    { ... }
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="C.C()" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s()" /><fopl:entity value="int" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s()" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s()" /><fopl:entity value="java.lang.String" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s()" /><fopl:entity value="java.lang.Integer" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s()" /><fopl:entity value="int[][]" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Create" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div>
			<h1>Return Relation</h1>
			The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
			<fopl:relation value="Return" /> represents <em>return</em> statements in the program. Statements such as
			"<em>return;</em>" break from further execution of the method, but does not return a value. Therefore
			these statements are ignored. 
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class C {
 Object o = new Object();
 String s = new String("");
 int i = 5;
 
 public Object s1() {
  if (true)
   <em>return o</em>;
  if (true)
   <em>return s</em>;
  <em>return null</em>;
 }
 public int s2() {
  <em>return i</em>;
 }
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="C.s1()" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s1()" /><fopl:entity value="java.lang.String" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s2()" /><fopl:entity value="int" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Return" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<div>
			<h1>Produce Relation</h1>
			The binary (<a href="http://www.lepus.org.uk/docs/refman/refman.xml#definition8">Definition VIII</a>)
			<fopl:relation value="Produce" /> relation identifies methods which &quot;creates&quot; and &quot;returns&quot;
			an object during execution of the method. <br />
			<div class="example">
				<table class="definition">
					<tr>
						<th>Program</th>
						<th>Partial finite structure</th>
					</tr>
					<tr>
						<td>
							<pre class="program">
								<code>
public class C {
 public Object s1() {
  String s = "str";
  if (true)
   <em>return new Object()</em>;
  <em>return s</em>;
 }

 public int s2() {
  <em>return 5</em>;
  }
}
								</code>
							</pre>
						</td>
						<td>
							<table class="designmodel">
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Class" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Method" /></td>
								</tr>
								<tr>
									<td class="domain"><fopl:set vertical="yes"><fopl:ldots /></fopl:set></td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Signature" /></td>
								</tr>
								<tr>
									<td class="domain">
										<fopl:set vertical="yes">
											<fopl:tuple><fopl:entity value="C.s1()" /><fopl:entity value="java.lang.Object" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s1()" /><fopl:entity value="java.lang.String" /></fopl:tuple>
											<fopl:tuple><fopl:entity value="C.s2()" /><fopl:entity value="int" /></fopl:tuple>
										</fopl:set>
									</td>
									<td class="operator"><fopl:equals /></td>
									<td class="range"><fopl:relation value="Produce" /></td>
								</tr>
								<tr>
									<td colspan="3" align="center" style="height: 70px"><strong><fopl:ldots /></strong></td>
								</tr>
							</table>
						</td>
					</tr>
				</table>
			</div>
		</div>
		<h1>References</h1>
		<ul>
			<li>Amnon H. Eden, Jonathan Nicholson, Epameinondas Gasparis. 
				&ldquo;<a href="../refman/refman.xml">The LePUS3 and Class-Z Reference manual</a>.&rdquo; 
				Technical report CSM-474, ISSN 1744-8050 (2007), Department of Computer Science, University of 
				Essex. [<a href="../refman/refman.pdf">.pdf</a>]</li>
			<li>Jonathan Nicholson, Amnon H Eden, Epameinondas Gasparis. &quot;Verification of LePUS3/Class-Z 
				Specifications: Sample models and Abstract Semantics for Java 1.4 (<a href="1java_as.xml">Part 
				I</a>; <a href="2case_studies.xml">Part II</a>).&quot; Department of 
				Computer Science, University of Essex, Tech. Rep. CSM-471, ISSN 1744-8050 
				(2007). [<a href="verif.pdf">.pdf</a>]</li>
			<li>James Gosling, Bill Joy, Guy Steele, Gilad Bracha. &quot;The Java language specification&quot;,
				second edition, Prentice Hall (2000). [<a href="http://java.sun.com/docs/books/jls/index.html">online</a>]</li>
		</ul>
	</body>
</html>