CSC431 Home Page
You are visitor number to this page.
There is a Departmental Web Page on CSC431.
- What is persistence? Some Principles. Orthogonal persistence.
Persistence by Reachability. An introduction to Napier88.
Referential Integrity. The Binding Spectrum.
- Persistence Language Examples: Napier88, Eiffel. Napier88 mechanics.
Type Security, Run time type checking.
- Type systems for persistence, polymorphism, the Napier88
environment mechanism, the $\chi$ capability mechanism.The commit and abort
- First class procedures, generators, reflection,
- Implementation issues, persistent and transient spaces,
pointer swizzling, page based persistent stores, before look versus
- Other languages, other environments. Galileo.
- C.Strachey; Fundamental Concepts in Programming Languages;
Oxford University Press, Oxford, 1967
- M.P.Atkinson, P.J.Bailey, K.J.Chisholm, P.W.Cockshott
and R.Morrison; An Approach to Persistent Programming, The Comp. J.,
- R.Morrison, A.L.Brown, R.C.H.Connor and A.Dearle;
The Napier88 Reference Manual, Universities of Glasgow and St. Andrews,
- M.P.Atkinson and R.Morrison; Procedures as Persistent Data
Objects, ACM Trans. Prog. Lang. and Sys., 7,4,539-559, Oct. 1985.
- Not for assessment Setup Napier environment, compile and execute euclid.N.
- Due 13 May Write a Napier88 program to meet
the following specifications:
- The program is to determine the results of a round of Australian
Football League matches.
- For each match of the round (there are 8), the program prints a
line of text identifying the winning margin, positive if the home team
wins, negative if the away team wins, followed by the name of the
- Input to the program consists of a single line identifying the
round number (an integer), followed by 8 lines of information, each
- Home team name
- Home team goals
- Home team behinds
- Away team name
- Away team goals
- Away team behinds
- Not for assessment Explore the napier88
- Use the napier88
environment to create a persistent data structure that maintains
football team statistics.
Hint: Rather than write a complete program, recall that the
programming environment allows execution of selections in the edit
- There should be up to 22 rounds of information, where each round
consists of 8 matches, and each match gives statistics for 2 teams.
Let the round number be
k, and the team number be n. Team number
n has team name name(n). This relation holds
over all matches, all rounds.
- Each team's statistics include the number of points kicked
for the team, called pf(k)(n), and the number of
points kicked against the team, called pa(k)(n).
- Assume that an input line from exercise 2 has the following
form for round k
hn hg hb an ag ab
and that hn = name(n). Then
pf(k)(n) = pf(k-1)(n) + 6*hg + hb
pa(k)(n) = pa(k-1)(n) + 6*ag + ab
for all n. A similar relation holds in the case that
an = name(n).
- If k < 1, then pf,pa(k-1)(n) = 0 for all
- updateRound(k : int) is a procedure whose
postcondition satisfies the relations in point 3 for all n.
- Not for assessment Program Reuse: Suppose you had
to rewrite all your code so that it handled the VFL (Victorian
Football League), with only 10 teams. What would you have to change
in your code? Or suppose you had to write your code to handle the NBL
(National Basketball League) with 11 teams (one team gets a bye each
round), a different number of rounds, and different scoring rules. Or
think of your own favourite sport, and its scoring rules, fixture
structures and statistical outcomes. What changes then? Anyone for
Challenge: Think about how you could write a generic
competition generator program, that when supplied with the appropriate
parameters, generated all the code necessary to handle exercises 2 and
Write your Own
You are welcome to make contributions to this page.
Send mail to John Hurst
Last updated by John Hurst on 970422:095656
201 accesses since 21 Jun 2015,
HTML cache rendered at 20000125:1114