Path: utzoo!attcan!uunet!munnari.oz.au!brolga!uqcspe!batserver.cs.uq.oz.au!brendan From: brendan@batserver.cs.uq.oz.au (Brendan Mahony) Newsgroups: comp.specification Subject: Re: Difference between Spec and Code? Message-ID: <5554@uqcspe.cs.uq.oz.au> Date: 6 Nov 90 03:31:45 GMT References: <21500@dime.cs.umass.edu> <5321@uqcspe.cs.uq.oz.au> <13576@june.cs.washington.edu> <1990Oct31.102351.21789@newcastle.ac.uk> <1990Nov06.020123.29702@comp.vuw.ac.nz> Sender: news@uqcspe.cs.uq.oz.au Reply-To: brendan@batserver.cs.uq.oz.au Lines: 45 lindsay@comp.vuw.ac.nz (Lindsay Groves) writes: >It may be helpful to distinguish between the following questions: > (i) what kind of text CAN be considered to be a specification/program? > (ii) what kind of thing you SHOULD write in a specification/program? >If you are concerned with (i), then Brendan's answer (that programs are >the executable subset of specifications) is fine. If you are concerned >with (ii), that answer is not at all helpful. In this case you would be >hard pressed to better than the old adage (anyone know who said this >first?): a specification should say WHAT is to be done, not HOW it is to >be done. I think my definition does address this point (ii). If you require your specification to be executable then you are requiring that it detail (either explicitly ot implicitly through language convention) HOW the required effect may be achieved. If you do not require it to be executable then you are freed from the NECESSITY to specify details of HOW, though these may still be useful. >Saying that a specification is "more abstract" than a program does mean >that it contains less information. Perhaps more to the point, it contains fewer constraints, allowing the implementer greater freedom of action in producing the software. The primary purpose of the specification process should be to describe the system (not just software) requirements with the maximum clarity. Generally this will be assisted by paying more attention to WHAT than to HOW. Some HOW type things are so well known (e.g. the standard model of the integers, sequences etc) that their use does contribute the clarity of the specification. For example it is almost impossible to clearly specify an indexed stack without basing the specification on sequences. Though using sequences in the specification is clearly introducing an implementation bias, it is still better to do it this way since it makes the specification clearer. This is of course just my theological slant. -- Brendan Mahony | brendan@batserver.cs.uq.oz Department of Computer Science | heretic: someone who disgrees with you University of Queensland | about something neither of you knows Australia | anything about.