Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
se2aa4_cs2me3
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
W. Spencer Smith
se2aa4_cs2me3
Commits
0646b697
Commit
0646b697
authored
7 years ago
by
W. Spencer Smith
Browse files
Options
Downloads
Patches
Plain Diff
Addition of L09 on MIS (abstract object)
parent
9caccc51
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Lectures/L08_MathematicsForMIS/MathematicsForMIS.tex
+1
-0
1 addition, 0 deletions
Lectures/L08_MathematicsForMIS/MathematicsForMIS.tex
Lectures/L09_MIS/MIS.pdf
+0
-0
0 additions, 0 deletions
Lectures/L09_MIS/MIS.pdf
Lectures/L09_MIS/MIS.tex
+70
-43
70 additions, 43 deletions
Lectures/L09_MIS/MIS.tex
with
71 additions
and
43 deletions
Lectures/L08_MathematicsForMIS/MathematicsForMIS.tex
+
1
−
0
View file @
0646b697
...
...
@@ -51,6 +51,7 @@
\item
Multiple assignment statement
\item
Conditional rules
\item
Finite state machines
\item
Circle intersection example
\end{itemize}
\end{frame}
...
...
This diff is collapsed.
Click to expand it.
Lectures/L09_MIS/MIS.pdf
+
0
−
0
View file @
0646b697
No preview for this file type
This diff is collapsed.
Click to expand it.
Lectures/L09_MIS/MIS.tex
+
70
−
43
View file @
0646b697
...
...
@@ -22,7 +22,7 @@
\mode
<presentation>
{}
\input
{
../def-beamer
}
\Draft
tru
e
\Draft
fals
e
\newcommand
{
\topicTitle
}{
09 Module Interface Specification (H
\&
S Ch.
\
7, Ghezzi Ch.
\
4)
}
\ifDraft
...
...
@@ -44,13 +44,14 @@
\begin{itemize}
\item
Administrative details
\item
pdfnup
\item
Overview of MIS
\item
MIS Template
\begin{itemize}
\item
Syntax
\item
Semantics
\end{itemize}
\item
Sequence example
\item
Sequence example
(abstract object)
\end{itemize}
\end{frame}
...
...
@@ -64,17 +65,12 @@ TBD
\else
{
\begin{itemize}
\item
Assignment 1
\begin{itemize}
\item
Files due by midnight January 28
\item
E-mail partner files by January 28
\item
Lab report due February 2
\item
Using Python 2.7, doxygen, make, LaTeX, git
\item
Make sure everything runs on mills
\item
\structure
{
Use the folder structure and filenames given!
}
\item
Partner Files: January 28, 2018
\item
Part 2: January 31, 2018
\end{itemize}
\item
Questions on assignment?
\end{itemize}
}
\fi
...
...
@@ -82,6 +78,23 @@ TBD
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle
{
pdfnup
}
\begin{itemize}
\item
If you like to print the lecture and/or tutorial slides consider printing
4 (or more) slides per page
\item
Consider using
\href
{
https://warwick.ac.uk/fac/sci/statistics/staff/academic-research/firth/software/pdfjam/
}{
pdfjam
}
\item
pdfjam provides pdfnup for ``n-upping'' pages
\item
\texttt
{
alias pdfnup='pdfnup --nup 2x2 --frame true --paper letterpaper --scale 0.9'
}
\end{itemize}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle
{
Sequences
}
\begin{itemize}
...
...
@@ -189,7 +202,11 @@ TBD
\item
Show access routines in tabular form
\begin{itemize}
\item
Important design decisions are made at this point
\item
Later we will discuss qualities of a good interface, like minimal,
essential, etc.
\item
The goal is to have the syntax match many implementation languages
\item
The mapping to a programming language will not always be the same; it
depends on the syntax of the programming language
\end{itemize}
\end{itemize}
\end{frame}
...
...
@@ -197,7 +214,7 @@ TBD
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle
{
Syntax of a Sequence Module
}
\frametitle
{
Syntax of a Sequence Module
(Abstract Object)
}
\textbf
{
Exported Constants
}
\\
~
\newline
...
...
@@ -216,17 +233,17 @@ MAX\_SIZE = 100\\
\hline
\textbf
{
Routine name
}
&
\textbf
{
In
}
&
\textbf
{
Out
}
&
\textbf
{
Exceptions
}
\\
\hline
s
eq
\_
init
&
~
&
~
&
~
\\
S
eq
\_
init
&
~
&
~
&
~
\\
\hline
s
eq
\_
add
&
integer, integer
&
~
&
FULL, POS
\\
S
eq
\_
add
&
integer, integer
&
~
&
FULL, POS
\\
\hline
s
eq
\_
del
&
integer
&
~
&
POS
\\
S
eq
\_
del
&
integer
&
~
&
POS
\\
\hline
s
eq
\_
setval
&
integer, integer
&
~
&
POS
\\
S
eq
\_
setval
&
integer, integer
&
~
&
POS
\\
\hline
s
eq
\_
getval
&
integer
&
integer
&
POS
\\
S
eq
\_
getval
&
integer
&
integer
&
POS
\\
\hline
s
eq
\_
size
&
~
&
integer
&
~
\\
S
eq
\_
size
&
~
&
integer
&
~
\\
\hline
\end{tabular}
...
...
@@ -296,7 +313,7 @@ seq\_size & ~ & integer & ~\\
~
\newline
\textbf
{
Assumptions
}
\\
s
eq
\_
init() is called before any other access program
S
eq
\_
init() is called before any other access program
\end{frame}
...
...
@@ -316,7 +333,7 @@ $s$: sequence of integer
~
\newline
\textbf
{
Assumptions
}
\\
s
eq
\_
init() is called before any other access program
S
eq
\_
init() is called before any other access program
\end{frame}
...
...
@@ -334,7 +351,7 @@ $| s | \leq \mbox{MAX\_SIZE}$
~
\newline
\textbf
{
Assumptions
}
\\
s
eq
\_
init() is called before any other access program
S
eq
\_
init() is called before any other access program
\end{frame}
...
...
@@ -345,13 +362,13 @@ seq\_init() is called before any other access program
\textbf
{
Access Routine Semantics
}
\\
~
\newline
s
eq
\_
init():
S
eq
\_
init():
\begin{itemize}
\item
transition:
\structure
{
What should the state transition be?
}
\item
exception: none
\end{itemize}
~
\newline
\noindent
s
eq
\_
add(
$
i, p
$
):
\noindent
S
eq
\_
add(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| <p> || s
[
i..
\structure
{
?
}
]
$
\item
exception:
$
exc :
=
(
|s|
=
\structure
{
?
}
)
$
\structure
{
What exceptions? How
...
...
@@ -368,13 +385,13 @@ seq\_init():
\textbf
{
Access Routine Semantics
}
\\
~
\newline
s
eq
\_
init():
S
eq
\_
init():
\begin{itemize}
\item
transition:
$
s :
=
< >
$
\item
exception: none
\end{itemize}
~
\newline
\noindent
s
eq
\_
add(
$
i, p
$
):
\noindent
S
eq
\_
add(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| <p> || s
[
i..|s|
-
1
]
$
\item
exception:
$
exc :
=
(
|s|
=
\structure
{
?
}
)
$
\structure
{
What exceptions? How
...
...
@@ -391,13 +408,13 @@ seq\_init():
\textbf
{
Access Routine Semantics
}
\\
~
\newline
s
eq
\_
init():
S
eq
\_
init():
\begin{itemize}
\item
transition:
$
s :
=
< >
$
\item
exception: none
\end{itemize}
~
\newline
\noindent
s
eq
\_
add(
$
i, p
$
):
\noindent
S
eq
\_
add(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| <p> || s
[
i..|s|
-
1
]
$
\item
exception:
$
exc :
=
(
|s|
=
\mbox
{
MAX
\_
SIZE
}
\Rightarrow
\mbox
{
FULL
}
~ | ~ i
\notin
[
0
..|s|
]
\Rightarrow
...
...
@@ -411,19 +428,19 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
del(
$
i
$
):
\noindent
S
eq
\_
del(
$
i
$
):
\begin{itemize}
\item
transition:
$
s :
=
\structure
{
?
}$
\item
exception:
$
exc :
=
\structure
{
?
}$
\end{itemize}
~
\newline
\noindent
s
eq
\_
setval(
$
i, p
$
):
\noindent
S
eq
\_
setval(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
\structure
{
?
}$
\item
exception:
$
\structure
{
?
}$
\end{itemize}
~
\newline
\noindent
s
eq
\_
getval(
$
i
$
):
\noindent
S
eq
\_
getval(
$
i
$
):
\begin{itemize}
\item
output:
$
\structure
{
?
}$
\item
exception:
$
\structure
{
?
}$
...
...
@@ -436,19 +453,19 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
del(
$
i
$
):
\noindent
S
eq
\_
del(
$
i
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| s
[
i
+
1
..|s|
-
1
]
$
\item
exception:
$
exc :
=
\structure
{
?
}$
\end{itemize}
~
\newline
\noindent
s
eq
\_
setval(
$
i, p
$
):
\noindent
S
eq
\_
setval(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
\structure
{
?
}$
\item
exception:
$
\structure
{
?
}$
\end{itemize}
~
\newline
\noindent
s
eq
\_
getval(
$
i
$
):
\noindent
S
eq
\_
getval(
$
i
$
):
\begin{itemize}
\item
output:
$
\structure
{
?
}$
\item
exception:
$
\structure
{
?
}$
...
...
@@ -460,19 +477,19 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
del(
$
i
$
):
\noindent
S
eq
\_
del(
$
i
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| s
[
i
+
1
..|s|
-
1
]
$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
\end{itemize}
~
\newline
\noindent
s
eq
\_
setval(
$
i, p
$
):
\noindent
S
eq
\_
setval(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
\structure
{
?
}$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
\end{itemize}
~
\newline
\noindent
s
eq
\_
getval(
$
i
$
):
\noindent
S
eq
\_
getval(
$
i
$
):
\begin{itemize}
\item
output:
$
\structure
{
?
}$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
...
...
@@ -484,19 +501,19 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
del(
$
i
$
):
\noindent
S
eq
\_
del(
$
i
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| s
[
i
+
1
..|s|
-
1
]
$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
\end{itemize}
~
\newline
\noindent
s
eq
\_
setval(
$
i, p
$
):
\noindent
S
eq
\_
setval(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
s
[
i
]
:
=
p
$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
\end{itemize}
~
\newline
\noindent
s
eq
\_
getval(
$
i
$
):
\noindent
S
eq
\_
getval(
$
i
$
):
\begin{itemize}
\item
output:
$
\structure
{
?
}$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
...
...
@@ -508,19 +525,19 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
del(
$
i
$
):
\noindent
S
eq
\_
del(
$
i
$
):
\begin{itemize}
\item
transition:
$
s :
=
s
[
0
..i
-
1
]
|| s
[
i
+
1
..|s|
-
1
]
$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
\end{itemize}
~
\newline
\noindent
s
eq
\_
setval(
$
i, p
$
):
\noindent
S
eq
\_
setval(
$
i, p
$
):
\begin{itemize}
\item
transition:
$
s
[
i
]
:
=
p
$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
\end{itemize}
~
\newline
\noindent
s
eq
\_
getval(
$
i
$
):
\noindent
S
eq
\_
getval(
$
i
$
):
\begin{itemize}
\item
output:
$
out :
=
s
[
i
]
$
\item
exception:
$
exc :
=
(
i
\notin
[
0
..|s|
-
1
]
\Rightarrow
\mbox
{
POS
}
)
$
...
...
@@ -533,7 +550,7 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
size():
\noindent
S
eq
\_
size():
\begin{itemize}
\item
output:
$
\structure
{
?
}$
\item
exception:
\structure
{
?
}
...
...
@@ -546,7 +563,7 @@ seq\_init():
\begin{frame}
\frametitle
{
Access Routine Semantics Continued
}
\noindent
s
eq
\_
size():
\noindent
S
eq
\_
size():
\begin{itemize}
\item
output:
$
out :
=
| s |
$
\item
exception: none
...
...
@@ -556,4 +573,14 @@ seq\_init():
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{frame}
\frametitle
{
Homework
}
\structure
{
How would you implement Seq in Python? Remember Seq is an abstract
object.
}
\end{frame}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\end{document}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment