-
Notifications
You must be signed in to change notification settings - Fork 0
/
transcript.tex
122 lines (106 loc) · 4.36 KB
/
transcript.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
%
% untitled
%
% Created by Niklas Frisk on 2009-11-02.
% Copyright (c) 2009 __MyCompanyName__. All rights reserved.
%
\documentclass[]{article}
% Use utf-8 encoding for foreign characters
\usepackage[utf8]{inputenc}
% Setup for fullpage use
\usepackage[top=3cm, bottom=3cm]{geometry}
\geometry{a4paper}
% Uncomment some of the following if you use the features
%
% Running Headers and footers
%\usepackage{fancyhdr}
% Multipart figures
%\usepackage{subfigure}
% More symbols
\usepackage{amsmath}
\usepackage{amssymb}
%\usepackage{latexsym}
% Surround parts of graphics with box
\usepackage{boxedminipage}
% Package for including code in the document
\usepackage{listings}
% If you want to generate a toc for each chapter (use with book)
\usepackage{minitoc}
% This is now the recommended way for checking for PDFLaTeX:
\usepackage{ifpdf}
%\newif\ifpdf
%\ifx\pdfoutput\undefined
%\pdffalse % we are not running PDFLaTeX
%\else
%\pdfoutput=1 % we are running PDFLaTeX
%\pdftrue
%\fi
\ifpdf
\usepackage[pdftex]{graphicx}
\else
\usepackage{graphicx}
\fi
\title{Transcript of Course Handout}
\author{Niklas Frisk}
\date{2009-11-29}
\begin{document}
\ifpdf
\DeclareGraphicsExtensions{.pdf, .jpg, .tif}
\else
\DeclareGraphicsExtensions{.eps, .jpg}
\fi
\maketitle
\section{What is this and why?}
This is a transcript of the hand-written handout in the Advanced Object-Oriented Systems course given at KTH in the spring 2010. If you're not a participant of this course your best course of action would most likely be to ignore this all together (it's not a terribly interesting read taken out of context). For those of you actually taking this course and wondering why we're doing this, it's simply for convenience. Handwritten notes can be slightly confusing at times (not that these are, please don't fail me!) but more importantly paper has yet to be tamed by man. Unless you shackle it with chains made of kryptonite it's bound to run off leaving you high and dry when you most need it. Now, pdf files on the other hand, you can trust. Tamed centuries ago by the brave souls at Adobe the pdf is a docile animal, content with lurking on your hard-drive for centuries. So without further ado I present to you the transcript.
\section{Seqool: a Sequential Object-Oriented Language}
Seqool is a simple theoretical Object-oriented language constructed simply for the use of modeling object-oriented languages.
\subsection{Properties}
\begin{itemize}
\item Object - an entity containing variables \& methods.
\item Sequential - no threads/concurrency.
\item Variables - instance/temporary.
\begin{itemize}
\item Instance Variable - lifetime of the object.
\item Temporary Variable - lifetime of the method call where they are local.
\end{itemize}
\end{itemize}
Variables are private, accessible only by local methods. Objects are grouped into classes and all objects of a given class have the same methods. Seqool includes two standard classes:
\begin{itemize}
\item Int - integer arithmetic class.
\item Bool - Boolean logic class.
\end{itemize}
Instances exist at the start of execution. Seqool is strongly typed.
\subsection{A Seqool Program}
A Seqool program is a set of class definitions and a statement of a specific class (main(), i.e the entry-point of the application).
\section{Syntax of Seqool}
$C$ is the set of class names.
\large
\begin{eqnarray*}
\label{C - Class names}
c,c',c_1,c_2,...c_n \in C \\
\mbox{Int, Bool} \not\in C \\
C^+ = C \cup \{\mbox{Int, Bool}\}, d \in C^+
\end{eqnarray*}
$IVar(c)_d$ is the set of instance variables for a given class $c$ of type $d$.
\begin{eqnarray*}
\label{IVar - Instance Variables}
IVar(c)_d \mbox{ for } c \in C, d \in C^+\\
x^{c}_{d}\in IVar(c)_d \mbox{ or simply } x_d
\end{eqnarray*}
$TVar_d$ is the set of temporary variables of type $d$.
\begin{eqnarray*}
\label{Tvar - Temporary Variables}
TVar_d \mbox{ for } d \in C^+ \\
u_d \in TVar_d
\end{eqnarray*}
$MName^{c}_{d_0,d_1,...,d_n}$ is the set of method names of $c$ with return type $d_0 \mbox{ where } d_0 \neq \mbox{ void}$ and parameters 1 through n with type $d_1,...,d_n$.
\begin{eqnarray*}
\label{Mname - Method Names}
\mbox{for } n \geq 0, c \in C, d_0,...,d_n \in C^+ \\
m^{c}_{d_0,...,d_n} \in MName^{c}_{d_0,...,d_n}
\end{eqnarray*}
These sets; $C, IVar(c)_d, Tvar_d, MName^{c}_{d_0,...,d_n}$ can be thought of as sets of declarations.
\normalsize
\bibliographystyle{plain}
\bibliography{}
\end{document}