Docsity

CSci 435: Billiards Table Formal Specification Homework - Prof. David Coppit, Assignments of Software Engineering

Toggle sidebar
bg1
CSci 435: Homework 6
Formal Methods
Due Monday April 19th by 11:00 AM
Summary
Working in groups of two, develop a formal specification for the state of the billiards
table and key operations on it. You must specify the balls, the table (with balls on it), the
size and positions of the balls, and the operations of racking, shooting, and pocketing the
balls. Extra credit will be given for additional specification effort.
You may abstract the computation of the detailed trajectories and locations of the balls.
You do not need to specify any rules.
Some Z Warnings
Schema inclusion is sort of like inheritance (but more like
#include
). A schema is sort of
like a C++
struct
(without methods)—methods are specified separately as operations on
values.
Z doesn’t have polymorphism. If you want to simulate subclasses, you will need to create
a set for the base type and one or more sets for the subtypes. Attributes are then modeled
using partial functions which map values from the sets to the attribute values. (I’ll explain
in class.) In other words, you can’t use schemas when you do polymorphism.
See the Z reference card for the LaTeX commands that you need to write the
specifications.
Template
I have created a template that you must use to create your specification
http://www.cs.wm.edu/~coppit/csci435/billiards_specification-2004-04-
03.tar.gz
The document is created using LaTeX. You’ll need to edit the
source/main.tex
file,
then run “
make
” to create the output PDF file in the
output
directory. When you are
ready to submit your assignment, run “
make dist
” and email me the resulting
.tar.gz
file. (There are other make targets as well—see the GNUMakefile for more information.)
Type Checking
Your submission must type check correctly to receive any credit. You can easily check
this by running “
make ztc
” (for the ztc type checker) and “
make fuzz
” (for the fuzz type
checker). You will need to set the following environment variables:
PATH=$PATH:/home/f85/coppit/bin
FUZZLIB=/home/f85/coppit/lib/fuzzlib
pf2

Partial preview of the text

Download CSci 435: Billiards Table Formal Specification Homework - Prof. David Coppit and more Assignments Software Engineering in PDF only on Docsity!

CSci 435: Homework 6

Formal Methods

Due Monday April 19th by 11:00 AM

Summary

Working in groups of two, develop a formal specification for the state of the billiards table and key operations on it. You must specify the balls, the table (with balls on it), the size and positions of the balls, and the operations of racking, shooting, and pocketing the balls. Extra credit will be given for additional specification effort.

You may abstract the computation of the detailed trajectories and locations of the balls. You do not need to specify any rules.

Some Z Warnings

Schema inclusion is sort of like inheritance (but more like #include). A schema is sort of like a C++ struct (without methods)—methods are specified separately as operations on values.

Z doesn’t have polymorphism. If you want to simulate subclasses, you will need to create a set for the base type and one or more sets for the subtypes. Attributes are then modeled using partial functions which map values from the sets to the attribute values. (I’ll explain in class.) In other words, you can’t use schemas when you do polymorphism.

See the Z reference card for the LaTeX commands that you need to write the specifications.

Template

I have created a template that you must use to create your specification

http://www.cs.wm.edu/~coppit/csci435/billiards_specification-2004-04- 03.tar.gz

The document is created using LaTeX. You’ll need to edit the source/main.tex file, then run “make” to create the output PDF file in the output directory. When you are ready to submit your assignment, run “make dist” and email me the resulting .tar.gz file. (There are other make targets as well—see the GNUMakefile for more information.)

Type Checking

Your submission must type check correctly to receive any credit. You can easily check this by running “make ztc” (for the ztc type checker) and “make fuzz” (for the fuzz type checker). You will need to set the following environment variables:

PATH=$PATH:/home/f85/coppit/bin

FUZZLIB=/home/f85/coppit/lib/fuzzlib

ZLIBPATH=/home/f85/coppit/share/ztc

Questions

I expect that you’ll have many questions about how to structure your specification, what the scope should be, etc. Post questions in the forum and I’ll answer them as quickly as I can.

Grading

300 points total

Both students receive the same grade.

You will be graded on completeness, correctness, structure/clarity, and appropriate structure and exposition. In terms of structure and exposition, your specification should explain each bit of formalism, and should explain unformalized or abstracted aspects of the system.