Documente Academic
Documente Profesional
Documente Cultură
Chapter11StructuredAnalysisWiki
Chapter11
FromStructuredAnalysisWiki
Contents
1ProcessSpecifications
1.1STRUCTUREDENGLISH
1.2PRE/POSTCONDITIONS
1.3DECISIONTABLES
1.4OTHERPROCESSSPECIFICATIONTOOLS
1.4.1GraphsandCharts
1.4.2NarrativeEnglish
1.4.3Flowcharts
1.4.4NassiShneidermanDiagrams
1.5SUMMARY
1.6REFERENCES
1.7QUESTIONSANDEXERCISES
1.8ENDNOTES
ProcessSpecifications
Ourlittlesystemshavetheirday.
Alfred,LordTennyson
InMemoriam,1850
INTHISCHAPTER,YOUWILLLEARN:
1. HowtowritestructuredEnglishprocessspecifications
2. Howtowriteprocessspecificationswithpre/postconditions
3. Howtousedecisiontablestowriteprocessspecificationsand
4. Whentousealternativespecificationtools.
Inthischapter,weexploretheprocessspecification,thedescriptionofwhatshappeninginsideeach
bottomlevel,primitivebubbleinadataflowdiagram.Varioustextbooks,including[DeMarco,1978],and
[GaneandSarson,1977]alsousethetermminispec(asanabbreviationforminiaturespecification)asan
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
1/30
8/17/2015
Chapter11StructuredAnalysisWiki
alternativeforprocessspecification.Regardlessofitsname,thepurposeofaprocessspecificationisquite
straightforward:itdefineswhatmustbedoneinordertotransforminputsintooutputs.Itisadetailed
descriptionoftheusersbusinesspolicythateachbubblecarriesout.
Aswewillseeinthischapter,thereisavarietyoftoolsthatwecanusetoproduceaprocessspecification:
decisiontables,structuredEnglish,pre/postconditions,flowcharts,NassiShneidermandiagrams,andso
on.WhilemostsystemsanalystsfavorstructuredEnglish,youshouldrememberthatanymethodcanbe
used,aslongasitsatisfiestwocrucialrequirements:
Theprocessspecificationmustbeexpressedinaformthatcanbeverifiedbytheuserandthe
systemsanalyst.ItispreciselyforthisreasonthatweavoidnarrativeEnglishasaspecification
tool:itisnotoriouslyambiguous,especiallywhendescribingalternativeactions(decisions)and
repetitiveactions(loops).Byitsnature,italsotendstocausegreatconfusionwhenexpressing
compoundBooleanconditions(i.e.,combinationsoftheBooleanoperatorsAND,OR,and
NOT).
Theprocessspecificationmustbeexpressedinaformthatcanbeeffectivelycommunicatedto
thevariousaudiencesinvolved.Whileitwilltypicallybethesystemsanalystwhowritesthe
processspecification,itwillusuallybeadiverseaudienceofusers,managers,auditors,quality
assurancepersonnel,andotherswhomustreadtheprocessspecification.Aprocess
specificationcouldperhapsbeexpressedinpredicatecalculus,orinPascal,orinaformal
diagrammingapproachsuchasHigherOrderSoftwaresUSEIT<ref>Formoreinformationon
USEIT,seeJamesMartinandCarmaMcCluresStructuredTechniquesforComputing.
(EnglewoodCliffs,N.J.:PrenticeHall,1986).</ref>butiftheusercommunityrefusestolook
atsuchspecifications,theyareworthless.Thesamemayturnouttobetrueofdecisiontables,
structuredEnglishorotherspecificationtools,tooitisverymuchafunctionofthepersonality,
background,andattitudeoftheusersyoudealwith.
Asmentionedabove,mostsystemsanalystsusestructuredEnglishastheirpreferredmethodofwriting
processspecifications.Itisperhapsmoreimportanttopointoutthatmostsystemsanalysts,andmost
organizations,useonetoolforwritingalloftheirspecifications.<ref>Thisisoftencausedbythe
introductionofanentiresetofstructuredanalysisstandardsintheorganization.Whilethestandardsarean
admirableefforttocombatsloth,ignorance,andtotalanarchy,theyoftengotoofarandprescribearigidly
regimentedsolutiontoallproblems.Asacommonsayinggoes,Ifyouronlytoolisahammer,allthe
worldlookslikeanail.</ref>Thisis,inmyopinion,amajormistake:youshouldfeelfreetousea
combinationofspecificationtools,dependingon(a)theuserspreference,(b)yourownpreferences,and
(c)theidiosyncraticnatureofthevariousprocesses.
Agoodprocessspecificationtoolshouldhaveathirdcharacteristic,too:itshouldnotimpose(orimply)
arbitrarydesignandimplementationdecisions.Thisisoftenverydifficult,becausetheuser,onwhomwe
mustdependforastatementofthepolicycarriedoutbyeachbubbleintheDFD,ispronetodescribethe
policyintermsofthewayhecarriesitouttoday.Itisyourjobasasystemsanalysttodistillfromthis
presentationtheessenceofwhatthepolicyis,nothowthepolicyiscarriedouttoday.
Considerthefollowingexample:thesystemsanalystisdiscussingasmallfragmentofasystem,as
illustratedbyFigure11.1.HewantstodevelopaprocessspecificationforthebubblelabeledCOMPUTE
WIDGETFACTOR.Sincethesystemsanalystisentirelyunfamiliarwiththeapplication,hehas
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
2/30
8/17/2015
Chapter11StructuredAnalysisWiki
interviewedtheuserandhaslearnedthatthepolicyforcomputingwidgetfactorsforanyvalueoftheinput
dataelement,x,isasfollows:
1. Thewidgetfactorisnotproducedastheresultofasinglecalculation.Infact,wehavetobegin
bymakingaguess.Theuserhastoldusthatheisparticularlyfondof14asafirstguess.
2. Thenwemakeanotherguess.Wedothisbydividingourcurrentguessintothenumber,x,that
westartedwith.
3. Wethentaketheresultofthiscalculationandsubtractitfromthecurrentguess.
4. Wethentaketheresultofstep3,anddivideitinhalf.Thisbecomesournewguess.
5. Ifthenewguessandthecurrentguessareprettyclosetoeachother,say,within0.0001,then
wecanstopthenewguessisthewidgetfactor.Otherwise,gobacktostep2anddoitallover
again.
Figure11.1:Computationofwidgetfactorsource:
File:Figure111.graffle
Youmightarguethatthisprocessspecificationisdifficulttoreadandunderstandbecauseitiswrittenin
narrativeEnglish.Indeed,thefollowingdescriptionismuchmorecompact(notethattheverticalbars|in
theUNTILclausemeanabsolutevalueoftheenclosedexpression):
widgetfactor0=14
REPEATforN=0instepsof1
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
3/30
8/17/2015
Chapter11StructuredAnalysisWiki
widgetfactorN+1=(widgetfactorN(X/widgetfactorN))/2
UNTIL|widgetfactorN+1widgetfactorN|<0.0001
However,eventhisisflawed:itdescribesthepolicyintermsofaparticularproceduralimplementation.
Thepolicy,asmayhavebeenevident(butequallylikely,maynothavebeenevident),istheNewton
Raphsonalgorithmforapproximatingasquareroot.<ref>Trythealgorithmoutonacoupleoftestcases.
Youllfindthatitconvergesfairlyquickly.</ref>Thefollowingprocessspecificationdescribesthesame
policy,butleavesthedesigner/programmercompletefreedomtochooseherownalgorithm:
PRECONDITION
ThereexistsanumberXthatisnonnegative.
POSTCONDITION
Awidgetfactorisproducedsuchthat
X=widgetfactor*widgetfactor
Theprogrammermayindeedchoosetousetheusersalgorithmforcalculatingthesquareroot,butshe
shouldnotbeconstrainedtodosobythesystemsanalyst.Indeed,theextravagantattentiontothe
proceduralalgorithm,especiallyinthefirstversionofthespecificationabove,entirelyobscuredwhatthe
processreallywas!
Beforeweexplorethevariousprocessspecificationtools,weshouldemphasizeonepoint:process
specificationsareonlydevelopedforthebottomlevelprocessesinaleveledsetofdataflowdiagrams.As
wecanseeinFigure11.2,allthehigherlevelprocessesaredefinedbythenextlowerlevelnetworkof
processes.Inotherwords,theprocessspecificationforahigherlevelbubbleisthelowerlevelDFD.To
writeanadditionalprocessspecificationinstructuredEnglishwouldnotonlybesuperfluous,itwouldbe
redundantthatis,itwouldcreateaspecificationthatwouldbemoredifficulttokeepuptodate.
<ref>Notwithstandingthiswarning,weshouldpointoutthatyouwillsometimesberequired,asasystems
analyst,toproduceawrittenprocessspecificationforhigherlevelprocesses.Thiswillhappeniftheuser
decidesthathewantstoshowthespecificationtohisbossandisconcernedthatthebosswonttoleratethe
ideaofleveledDFDs.Thus,theuserwillsaytoyou,Look,Iknowthatyoudontneedaprocess
specificationforthesetoplevelbubbles,butIdappreciateitifyouwouldwritethemanywaysothatthe
bosscanunderstandwhatthesystemisallabout.Youllhavetodealwiththisproblemwiththesame
diplomaticskillsthatyouusetosolveallotherpoliticalproblemsinyourproject.</ref>
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
4/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.2:Processspecificationsforbottomlevelbubblessource:
File:Figure112.graffle
Wewillconcentrateonthreemajorprocessspecificationtoolsinthischapter:
StructuredEnglish
Pre/postconditions
Decisiontables
Wewillalsocommentbrieflyonanumberofotherlesscommonlyusedspecificationtools:narrative
English,flowcharts,andNassiShneidermandiagrams.
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
5/30
8/17/2015
Chapter11StructuredAnalysisWiki
STRUCTUREDENGLISH
StructuredEnglish,asthenameimplies,isEnglishwithstructure.Thatis,itisasubsetofthefullEnglish
languagewithsomemajorrestrictionsonthekindofsentencesthatcanbeusedandthemannerinwhich
sentencescanbeputtogether.ItisalsoknownbysuchnamesasPDL(forprogramdesignlanguage)and
PSL(forproblemstatementlanguageorproblemspecificationlanguage).Itspurposeistostrikea
reasonablebalancebetweentheprecisionofaformalprogramminglanguageandthecasualinformalityand
readabilityoftheEnglishlanguage.
AsentenceinstructuredEnglishmayconsistofanalgebraicequation,forexample
X=(Y*Z)/(Q+14)
orasimpleimperativesentenceconsistingofaverbandanobject.Notethatthissentencedoesnothavethe
semicolonthatterminatesaprogrammingstatementinmanydifferentprogramminglanguagesitmayor
maynotterminatewithaperiod(.),dependingonyourtasteinsuchthings.Also,notethatsentences
describingcomputationscanbeprefixedwiththeverbsCOMPUTE,ADD,SET,andsoonthus,wecould
havewrittentheaboveexampleas
COMPUTEX=(Y*Z)/(Q+14)
andwecanhavestructuredEnglishcomputationslikethefollowingones:
SETTAXRATETO13
ADD3TOX
MULTIPLYUNITPRICEBYQUANTITY
DIVIDECURRENTASSETSBYCURRENTLIABILITIES.
Verbsshouldbechosenfromasmallsetofactionorientedverbssuchas:
GET(orACCEPTorREAD)
PUT(orDISPLAYorWRITE)
FIND(orSEARCHorLOCATE)
ADD
SUBTRACT
MULTIPLY
DIVIDE
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
6/30
8/17/2015
Chapter11StructuredAnalysisWiki
COMPUTE
DELETE
FIND
VALIDATE
MOVE
REPLACE
SET
SORT
Mostorganizationsfindthat40to50verbsaresufficienttodescribeanypolicyinanyprocess
specification.
Objects(thesubjectofthesimpleimperativesentences)shouldconsistonlyofdataelementsthathavebeen
definedinthedatadictionaryorlocalterms.Localtermsareterms(words)thatareexplicitlydefined
withinanindividualprocessspecificationtheyareonlyknown,relevant,andmeaningfulwithinthat
processspecification.Atypicalexampleofalocaltermisanintermediatecalculation,whichisusedto
producethefinaloutputoftheprocess.<ref>Localtermsaredefinedwithintheprocessspecificationwhere
theyoccurandarenotdefinedinthedatadictionary.Theyareoftenderived(directlycalculated)fromterms
thatarealreadyinthedatadictionary,soitwouldberedundanttoaddthelocalterms.Also,bydefinition,
thelocaltermsareonlyknownwithinalocalcontext(i.e.,insideabubbleinadataflowdiagram).They
shouldnotappearasaflowontheDFD,andtheyareusuallynotpartofthenormalvocabularyof
applicationorientedwordsusedbytheuser.</ref>Forexample,thestructuredEnglishprocess
specificationbelowexaminesaseriesoforderrecordsinanORDERSstoretocomputeadailytotal:
dailytotal=0
DOWHILEtherearemoreordersinORDERSwithInvoicedate=todaysdate
READnextorderinORDERSwithInvoicedate=todaysdate
DISPLAYtoAccountinginvoicenumber,customername,totalamount
dailytotal=dailytotal+totalamount
ENDDO
DISPLAYtoAccountingdailytotal
Finally,structuredEnglishallowssentencestobecombinedinafewlimitedwaysthesearetakenfromthe
familiarstructuredprogrammingconstructs.<ref>Ifyouarenotfamiliarwithstructuredprogramming,
consultanyofthestandardtextsonthesubject,orseesomeoftheearlypapersonthesubjectcollectedin
[Yourdon,1979].</ref>
TheIFTHENELSEconstructisusedtodescribealternativesentencesthataretobecarried
outbasedontheresultofabinarydecision.TheIFTHENELSEconstructcantakeeitherof
thefollowingtwoforms:
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
7/30
8/17/2015
Chapter11StructuredAnalysisWiki
IFcondition1
sentence1
ENDIF
or
IFcondition1
sentence1
ELSE
sentence2
ENDIF
Thus,thesystemsanalystmaywrite:
IFcustomerlivesinNewYork
addcustomertoMARKETINGPROSPECTS
ENDIF
or
IFcustomeragegreaterthan65
setbillingratetoseniorcitizenrate
ELSE
setbillingratetonormalrate
ENDIF
TheCASEconstructisusedtodescribealternativesentencestobecarriedoutbasedonthe
resultsofamultivalueddecision(ascomparedtothebinarydecisionthattakesplacewithan
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
8/30
8/17/2015
Chapter11StructuredAnalysisWiki
IFTHENconstruct).TheCASEconstructtakesthegeneralform:
DOCASE
CASEvariable=value1
sentence1
CASEvariable=valuen
sentencen
OTHERWISE
sentencen+1
ENDCASE
Thus,thesystemsanalystmightwrite:
DOCASE
CASEcustomerage<13
setbillingratetochildrate
CASEcustomerage13andcustomerage<20
setbillingratetoteenagerate
CASEcustomerage>20andcustomerage<65
setbillingratetoadultrate
OTHERWISE
setbillingratetoseniorcitizenrate
ENDCASE
Or,asanotherexample,considerthefollowingportionofastructuredEnglishprocessspecification:
DOCASE
CASEstate=NY
setsalestaxto0.0825
CASEstate=NJ
setsalestaxto0.07
CASEstate=CA
setsalestaxto0.05
OTHERWISE
setsalestaxto0
ENDCASE
Notethatthe"OTHERWISE"clauseisoftenusedtocatchsituationsthattheuserforgetstospecifyandthat
thesystemsanalystforgetstoaskaboutitwilloftenpromptsomediscussionsbetweenuserandsystems
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
9/30
8/17/2015
Chapter11StructuredAnalysisWiki
analystthatwouldotherwisenottakeplaceuntilafterthesystemhadbeenputinoperation.Considerthe
followingexample:
DOCASE
CASEpaymenttype=cash
setdiscountrateto0.05
CASEpaymenttype=creditcard
setdiscountrateto0.01
OTHERWISE
setdiscountrateto0
ENDCASE
Theusermightquestionthisprocessspecificationandaskwhythesystemsanalystincludedthe
OTHERWISEclausethesystemsanalystmightrespondbyaskingaboutpaymentsbycheck,travelers
check,goldcoins,andbarter.
TheDOWHILEconstructisusedtodescribeasentencethatistobecarriedoutrepetitively
untilsomeBooleanconditionistrue.Ittakesthegeneralform:
DOWHILEcondition1
sentence1
ENDDO
Thetest(condition1intheexampleabove)ismadebeforesentence1iscarriedoutthus,ifthe
conditionisnotsatisfied,itispossiblethatsentence1willbecarriedoutzerotimes.
Forexample,thesystemsanalystmightwrite:
DOWHILEtherearemoreitemsinthecustomerorder
extendedprice=unitprice*unitquantity
ENDDO
Manyorganizationsincludeanotherstructurethatcarriesoutaspecifiedsentenceatleastoncebefore
makingatesttoseeifitshouldberepeated.Thisvariation,usuallyknownastheREPEATUNTIL
construct,hasthefollowingform:
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
10/30
8/17/2015
Chapter11StructuredAnalysisWiki
REPEAT
sentence1
UNTILcondition1
Compoundsentencescanbebuiltfromcombinationsofsimplesentencesandthesimplestructures
presentedabove,accordingtothefollowingrules:
1.Alinearsequenceofsimplesentencesisequivalent(structurally)toasimplesentence.Thus,the
sequence
sentence1
sentence2
sentencen
isstructurallyequivalenttoasingle,simplesentenceandcanbesubstitutedwhereverasimplesentenceis
expected.Thisallowsustobuildstructureslikethis:
IFcondition1
sentence1
sentence2
ELSE
sentence3
sentence4
sentence5
ENDIF
or
DOWHILEcondition1
sentence1
sentence2
sentence3
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
11/30
8/17/2015
Chapter11StructuredAnalysisWiki
ENDDO
2.AsimpleIFTHENELSEconstructisconsideredstructurallyequivalenttoasingle,simplesentence.
ThisallowsIFTHENELSEstructurestobenestedwithinotherIFTHENELSEstructures,orwithin
DOWHILEstructures,orwithinCASEstructures.Forexample:
IFcondition1
sentence1
IFcondition2
sentence2
sentence3
ELSE
sentence4
sentence5
ENDIF
sentence6
ELSE
sentence7
IFcondition3
sentence8
ENDIF
sentence9
ENDIF
3.AsimpleDOWHILEstructureisconsideredstructurallyequivalenttoasimple,singlesentence.This
allowsDOWHILEstructurestobenestedwithinotherDOWHILEstructures,orwithinIFTHEN
ELSEstructures,orwithinCASEstructures.Thus,wemighthaveastructuredEnglishspecificationofthe
followingnature:
grandtotal=0
DOWHILEtherearemoreorderstoprocess
invoicetotal=0
READnextorderfromORDERS
DOWHILEtherearemoreitemsintheorder
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
12/30
8/17/2015
Chapter11StructuredAnalysisWiki
invoicetotal=invoicetotal+itemamount
ENDDO
DISPLAYinvoicenumber,invoicetotal
grandtotal=grandtotal+invoicetotal
ENDDO
DISPLAYgrandtotal
4.AsimpleCASEstructureisconsideredstructurallyequivalenttoasimple,singlesentence.Thisallows
CASEstructurestobenestedwithinotherCASEstructures,orwithinIFTHENELSEstructures,or
withinDOWHILEstructures.
Asyoucansee,thisallowsustoconstructarbitrarilycomplexdescriptionsofbusinesspolicy,while
maintainingstrictcontroloverthevocabulary,organizationandstructureofthedescription.However,this
arbitrarycomplexityisalsothemajordisadvantageofstructuredEnglish:ifthesystemsanalystcomposesa
processspecificationthatistoocomplexfortheusertounderstandandverify,hehasfailed.Thiscan
usuallybepreventedbyadheringtothefollowingthreeguidelines:
1. RestrictthestructuredEnglishprocessspecificationtoasinglepageoftext(e.g.,8by11sheet
ofpaper,66linesoftextonawordprocessingsystem,or24linesonacomputerscreen).Ifthe
specificationtakesmorethanonepage,thenthesystemsanalyst(withthehelpoftheuser)
shouldthinkofanentirelydifferentwayofformulatingthepolicy(i.e.,pickadifferent,
simpleralgorithm).Ifthatcannotbedone,thenitispossiblethattheprocessitself(i.e.,the
bubblewithintheDFD)istoocomplexandshouldbesplitintoanetworkoflowerlevel,
simplerprocesses.
2. Dontallowmorethanthreelevelsofnesting(i.e.,threelevelsofnestedIFTHENELSE
structures,orthreelevelsofCASEstructures,etc.).ParticularlyinthecaseofIFTHEN
ELSEstructures,morethaneventwolevelsofnestingisastrongindicationthatadecision
tablespecificationwouldbepreferablethisisdiscussedinSection11.3.
3. Avoidconfusionaboutlevelsofnestingbyusingindentation,asshownintheexamplesabove.
Thiscanbeaccomplishedandcontrolledveryeasilyifyouareusinganykindofautomated
supporttodeveloptheprocessspecifications(evensomethingassimpleasastandardword
processingsystem).Iftheprocessspecificationsarebeingtypedmanuallybyaclericalperson
whoisnotfamiliarwithstructuredprogrammingorstructuredanalysis,youwillhaveto
explainverycarefullywhatkindofindentationyouwantyoushouldalsoproofreadthe
resultingtextverycarefullytoseeifitiscorrect.
Manysystemsanalystsaskwhethertheusercanbeexpectedtoreadandunderstandaprocessspecification
writteninstructuredEnglish.Myexperiencehasbeenalmostuniformlypositiveinthisarea:userscanread
structuredEnglish,withthefollowingprovisos:
1. Youwillhavetowalkthroughthedocumentonceortwicetoensurethattheyunderstandthe
formatandthevariousconstructs.Onthefirstreading,itmaywelllooklikealegaldocument,
especiallyifyouhavehighlightedtheIFTHENELSEconstruct,andthelike.
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
13/30
8/17/2015
Chapter11StructuredAnalysisWiki
2. DontrefertotheprocessspecificationasstructuredEnglish.Ifnecessary,refertoitasa
formaldescriptionofyourbusinesspolicyforcarryingoutthisactivity.
Paycarefulattentiontotheoverallformatandlayoutofthedocumenttheindentationofnestedblocksof
logicisespeciallyimportant.Someuserspreferanoutlinestyleofindentation,thatis,whereindented
levelsarenumbered1.1,1.1.1,1.1.1.1,andsoon.
SeveralexamplesofstructuredEnglishprocessspecificationsareshowninthecasestudyinAppendixF.
PRE/POSTCONDITIONS
Pre/postconditionsisaconvenientwayofdescribingthefunctionthatmustbecarriedoutbyaprocess,
withoutsayingverymuchatallaboutthealgorithmorprocedurethatwillbeused.Itisaparticularlyuseful
approachwhen:
1. Theuserhasatendencytoexpressthepolicycarriedoutbyabubbleintermsofaparticular,
idiosyncraticalgorithmthatheorshehasbeenusingfordecades.
2. Thesystemsanalystisreasonablysurethattherearemanydifferentalgorithmsthatcouldbe
used.
3. Thesystemsanalystwantstolettheprogrammerexploreseveralsuchalgorithms,butdoesnot
wanttogetinvolvedinsuchdetailshimself,andespeciallydoesnotwanttoengagein
argumentswiththeuserabouttherelativemeritsofsuchalgorithms.
Anexampleofaprocessspecificationwrittenwiththepre/postconditionapproachisshowninFigure11.3:
Figure11.3:Apre/postconditionspecification
Therearetwomainpartsofthespecification:preconditionsandpostconditions.Inaddition,such
specificationscancontainlocalterms,asdefinedintheStructuredEnglishSection(seealsofootnote5).
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
14/30
8/17/2015
Chapter11StructuredAnalysisWiki
Preconditionsdescribeallthethings(ifany)thatmustbetruebeforetheprocessbeginsoperating.Its
sometimesconvenienttothinkoftheprocessasasleepingprincess,andthepreconditionsrepresentthe
magickissthatwillawakentheprocessandsetittowork.Alternatively,youcanthinkofthe
preconditionsasaguaranteefromtheuser:Iguaranteethatwhenthisprocessisactivatedthefollowing
thingswillbetrue.Typically,thepreconditionswilldescribethefollowing:
Whatinputsmustbeavailable.Theseinputswillarriveviaaflowconnectedtotheprocess,as
shownonthedataflowdiagram.Notethattheremaybecaseswherethereareseveralflows
comingintoaprocess,butonlyoneoftheflowsisanecessarypreconditiontoactivatethe
process.Forexample,ifwesawaspecificationthatbeganwith
Precondition
dataelementXoccurs
associatedwiththedataflowdiagramshowninFigure11.4,wewouldinterpretitasfollows:
thearrivalofdataelementXistheactivatingstimulusthatmakestheprocessbeginitswork.
Aspartofitswork,itseeksinputfromdataflowYorZ,orboth,butYandZarenotnecessary
fortheprocesstobegindoingitswork.
Whatrelationshipsmustexistbetweeninputsorwithininputs.Quiteoftenapreconditionwill
specifythattwoinputswithmatchingfieldsmustarrive(e.g.,orderdetailsandshippingdetails
withthesameaccountnumber).Orthepreconditionmayspecifythatonecomponentofan
inputdataelementbewithinacertainrange(e.g.,anorderwithadeliverydatemorethan60
daysinthefutureoccurs).
Whatrelationshipsmustexistbetweeninputsanddatastores.Apreconditionmightstipulate
thattherebearecordwithinastorethatmatchessomeaspectofaninputdataelement(e.g.,the
preconditionmightsay,Thereisacustomerorderwithcustomeraccountnumbermatchinga
customeraccountnumberinthecustomersstore).
Whatrelationshipsmustexistbetweendifferentstoresorwithinasinglestore.Thus,the
preconditionmightsay,Thereisanorderintheordersstorewhosecustomeraccountnumber
matchesthecustomeraccountnumberinthecustomersstore.Orthepreconditionmightsay,
Thereisanorderwithintheordersstorewithashippingdateequaltothecurrentdate.
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
15/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.4:ADFDwithinputsX,Y,and
Zsource:File:Figure114.graffle
Similarly,thepostconditionsdescribewhatmustbetruewhentheprocesshasfinisheddoingitsjob.Again,
thiscanbethoughtofasaguarantee:Iguaranteethatwhentheprocessisfinishedthefollowingwillbe
true.Postconditionstypicallydescribethefollowing:
Theoutputsthatwillbegeneratedorproducedbytheprocess.Thisisthemostcommonform
ofpostcondition(e.g.,Aninvoicewillbeproduced).
Therelationshipsthatwillexistbetweenoutputvaluesandtheoriginalinputvalues.Thisis
commonforthesituationwhereanoutputisadirectmathematicalfunctionofaninputvalue.
Thus,apostconditionmightsay,Theinvoicetotalwillbecalculatedasthesumofunititem
pricesplusshippingcharges.
Therelationshipsthatwillexistbetweenoutputvaluesandvaluesinoneormorestores.Thisis
commonwheninformationistoberetrievedfromastoreandusedaspartofanoutputofthe
process.Forexample,aprocessspecificationmighthaveasapostconditionthefollowing
statement:TheonhandbalanceintheINVENTORYstorewillbeincreasedbyamount
received,andthenewonhandbalancewillbeproducedasoutputfromthisprocess.
Thechangesthatwillhavebeenmadetostores:newitemsadded,existingitemsmodified,or
existingitemsdeleted.Thus,wemightseestatementslikeTheorderwillbeappendedtothe
ORDERSstoreorThecustomerrecordwillbedeletedfromtheCUSTOMERSstore.
Whenbuildingapre/postconditionspecification,beginbydescribingthenormalprocessingsituationsfirst.
Theremaybeseveraldifferentnormalsituations(e.g.,uniquecombinationsofvalidinput/storage
relationships)eachofwhichisexpressedasadistinct,separateprecondition.Foreachsuchprecondition,
youshouldthendescribetheconditionoftheprocessbubblewhentheoutputshavebeenproducedandthe
storeshavebeenmodified.Afterthenormalprocessingsituationshavebeendescribed,youshouldinclude
appropriatepreconditionsandpostconditionsforerrorcasesandabnormalcases.Considerthepre/post
conditionspecificationshowninFigure11.5(b)thatwouldbedevelopedforanewsystemfromthe
narrativespecificationinFigure11.5(a).
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
16/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.5(a):Anexampleofnarrativespecifications
Figure11.5(b):Anexampleofpre/postconditions
Thoughthepre/postconditionapproachisquiteusefulandhasanumberofadvantages,therearetimes
whenitmaynotbeappropriate.Thelackofintermediatestepsbetweentheinputs(preconditions)andthe
outputs(postconditions)isdeliberateandconsciousbutitmaymakethespecificationhardtounderstand
ifthereadercannotvisualizesomekindofprocedurethatwillleadfrominputstooutputs.Also,ifthereare
complexrelationshipsbetweeninputsandoutputs,itmaybeeasiertowritethespecificationusing
structuredEnglish.Anexampleofaprecondition/postconditionspecificationthatisprobablytoo
complicatedisshowninFigure11.6.
Figure11.6:Anoverlycomplicatedpre/postconditionspecification
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
17/30
8/17/2015
Chapter11StructuredAnalysisWiki
Aswithalltheformsofprocessspecification,youshouldletyourownjudgmentandtheuser'sreactions
guideyouiftheuserfindsitdifficulttoreadtheprecondition/postconditionspecification,chooseanother
format.Theprecondition/postconditionapproachareshowninthecasestudyin[AppendixG]the
alternativestructuredEnglishapproachisusedinthecasestudyin[AppendixF].Lookcarefullyatboth
casestudiestodeterminethesuitabilityofthesetwoprocessspecificationtools.
DECISIONTABLES
TherearesituationswhereneitherstructuredEnglishnorpre/postconditionsareappropriateforwriting
processspecifications.Thisisparticularlytrueiftheprocessmustproducesomeoutputortakesome
actionsbasedoncomplexdecisions.Ifthedecisionsarebasedonseveraldifferentvariables(e.g.,inputdata
elements),andifthosevariablescantakeonmanydifferentvalues,thenthelogicexpressedbystructured
Englishorpre/postconditionsislikelytobesocomplexthattheuserwontunderstandit.Adecisiontable
islikelytobethepreferredapproach.
AsshowninFigure11.7,adecisiontableiscreatedbylistingalltherelevantvariables(sometimesknown
asconditionsorinputs)andalltherelevantactionsontheleftsideofthetablenotethatthevariablesand
actionshavebeenconvenientlyseparatedbyaheavyhorizontalline.Inthisexample,eachvariableisa
logicalvariable,meaningthatitcantakeonthevalueoftrueorfalse.
Inmanyapplications,itiseasy(andpreferable)toexpressthevariablesasbinary(truefalse)variables,but
decisiontablescanalsobebuiltfrommultivaluedvariablesforexample,onecouldbuildadecisiontable
withavariablecalledcustomeragewhoserelevantvaluesarelessthan10,between10and30,and
greaterthan30.
Figure11.7:Atypicaldecisiontable
Next,everypossiblecombinationofvaluesofthevariablesislistedinaseparatecolumneachcolumnis
typicallycalledarule.Aruledescribestheaction(oractions)thatshouldbecarriedoutforaspecific
combinationofvaluesofthevariables.Atleastoneactionneedstobespecifiedforeachrule(i.e.,foreach
verticalcolumninthedecisiontable),orthebehaviorofthesystemforthatsituationwillbeunspecified.
IfthereareNvariableswithbinary(truefalse)values,thentherewillbe2Ndistinctrulesthus,ifthereare
3conditions,therewillbe8rules,andifthereare7conditions,therewillbe128rules.Enumeratingallthe
rulesisafairlystraightforwardprocess:bytreatingtheYes(orT)asabinaryzero,andtheNo(orF)asa
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
18/30
8/17/2015
Chapter11StructuredAnalysisWiki
binaryone,itiseasytogenerateasequenceof000,001,010,011,100,101,andsoforthuntilall2N
combinationshavebeengenerated.<ref>Ofcourse,therewillbesituationswherethedecisiontable
conditionsarenotbinaryinnature,butarecapableoftakingonseveralvalues(e.g.,aninsurance
applicationmightinvolvecustomerageandmightusethevaluesunder18years,18through64,and
65orover).Todeterminethetotalnumberofrulesinsuchadecisiontable,wemustmultiplythe
numberofvaluesthatvariable1cantakeonbythenumberofvaluesthatvariable2cantakeonby...the
numberofvaluesthatvariableNcantakeon.Thus,ifwehaveanapplicationwherevariable1cantakeon
3values,variable2cantakeon5values,andvariable3cantakeon4values,wewillneed3x5x4=60
distinctrules.</ref>
Youmustdiscusseachrulewiththeusertoensurethatyouhaveidentifiedthecorrectaction,oractions,for
eachcombinationofvariables.Itisquitecommon,whendoingthis,tofindthattheuserhasneverthought
aboutcertaincombinationsofvariablesorthattheyhaveneveroccurredinhisorherexperience.
<ref>Thereareguidelinesforsimplifyingdecisiontablesandcombiningseveralrulesintocompositerules,
butwewillnotcovertheminthisbook.See[Yourdon,1976]fordetails.</ref>Theadvantageofthe
decisiontableapproachisthatyoucanconcentrateononeruleatatime.
Anotheradvantageofthedecisiontableapproachisthatitdoesnotimplyanyparticularformof
implementation.Thatis,whenthesystemsanalystdeliversthedecisiontable(alongwiththeDFDs,etc.)to
thedesigner/programmer,thereisatremendousfreedomofchoiceintermsofimplementationstrategy:the
decisiontablecanbeprogrammedwithnestedIFstatements,withaCASEconstructoraGOTO
DEPENDINGONconstructinCOBOLintheextremecase,adecisiontablecodegeneratorcan
automaticallygeneratecodefromthedecisiontable.Thus,decisiontablesareoftenreferredtoasa
nonproceduralsystemmodelingtool,fortheydonotrequireanyspecificproceduralalgorithmtocarryout
therequiredactions.
Tosummarize,wemustgothroughthefollowingstepstocreateadecisiontableforaprocessspecification:
1. Identifyalltheconditions,orvariables,inthespecification.Identifyallthevaluesthateach
variablecantakeon.
2. Calculatethenumberofcombinationsofconditions.Ifalltheconditionsarebinary,thenthere
are2NcombinationsofNvariables.
3. Identifyeachpossibleactionthatiscalledforinthespecification.
4. Createanemptydecisiontablebylistingalltheconditionsandactionsalongtheleftsideand
numberingthecombinationsofconditionsalongthetopofthetable.
5. Listallthecombinationsofconditions,oneforeachverticalcolumninthetable.
6. Examineeachverticalcolumn(knownasarule)andidentifytheappropriateaction(s)tobe
taken.
7. Identifyanyomissions,contradictions,orambiguitiesinthespecification(e.g.,rulesinthe
decisiontableforwhichthespecificationdoesnotindicatethatactionsshouldbetaken).
8. Discusstheomissions,contradictions,andambiguitieswiththeuser.
OTHERPROCESSSPECIFICATIONTOOLS
GraphsandCharts
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
19/30
8/17/2015
Chapter11StructuredAnalysisWiki
Insomecases,itmaybeappropriatetoexpressaprocessspecificationasagraphorachart.Indeed,the
usermayalreadyhaveagraphorachartthatiscurrentlyusedtocarryoutthatpartoftheapplication.Ifso,
useit!ThereisnoneedforthesystemsanalysttotranslateagraphintostructuredEnglishinstead,letthe
programmertranslatethegraphdirectlyintoCOBOL,VisualBasic,orsomeotherprogramminglanguage
whenitistimetoimplementthesystem.
Consider,forexample,aprocessspecificationthatdeterminesacustomersinsurancepremiumasa
functionofage.Theuserhastoldusthatthecurrentbusinesspolicyistodeterminethepremiumfromthe
graphshowninFigure11.8.
Figure11.8:Insurancepremiumasafunctionofage
Assumingthatthepolicyisnotgoingtochangewhenanewsystemisbuilt,andassumingthatthe
insurancepremiumisonlyafunctionofage,thereisnoneedforthesystemsanalysttodoanyfurtherwork.
Figure11.8istheprocessspecification.
NarrativeEnglish
Aswehaveimpliedseveraltimesinthischapter,narrativeEnglishisnotarecommendedtoolforwriting
processspecifications.Thisisbecause:
Anunrestrictedvocabulary(i.e.,indiscriminateuseofnouns,verbs,andadjectives)makesit
likelythattheprocessdescriptionwillincludetermsthatarenotinthedatadictionaryand
whosemeaningisnotclear.
Alternativeactions(i.e.,decisions)areoftenexpressedinaclumsy,ambiguousfashion.This
becomesevenmoredangerouswhennesteddecisionsareexpressed.
Repetitiveactions(i.e.,loops)arealsoexpressedinaclumsy,ambiguousfashion.Nestedloops
areextremelydangerouswhenexpressedincolloquialEnglish.
Theconceptofblockstructurescanonlybeexpressedwithindentationoranoutlinestyle
presentationifoneiswillingtogothisfar,onemightaswellusetheformalstructuredEnglish
notation.
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
20/30
8/17/2015
Chapter11StructuredAnalysisWiki
If,forsomereason,youareforcedtousenarrativeEnglish,youshouldatleastmaintainsomeofthe
advantagesofthehighlypartitionedstructuredanalysisapproachthatwehavediscussedthroughoutthis
book.Thatis,undernocircumstancesshouldyouallowyourselftobeforcedintothepositionofwritinga
2000pagemonolithicVictoriannovelspecification.Attheveryleast,youshouldpartitionthespecification
intosmallpieces,sothatyoucanwrite2000independentshortstories.
Flowcharts
Wehaveavoidedtheuseofflowchartsthusfarinourdiscussion,butthatisareflectionofcurrent
disinterestinflowchartsratherthananindictmentofthem.<ref>However,itisinterestingtonotethat
flowchartsmaybeabouttoexperiencearebirth.RecentworkbyDavidScanlanatCaliforniaState
UniversityinSacramentohasshownthatprogrammingstudentsstronglypreferflowchartsasthepreferred
methodoflearningaboutalgorithms.Ifthisistrueforprogrammingstudents,maybeitwillbetruefor
users,too.Formoreonthis,seeScanlanspaperentitledANicheforStructuredFlowcharts,Proceedings
ofthe1987ACMComputerScienceConference.</ref>Muchofthecriticismofflowchartshasresulted
fromtheirmisuseinthefollowingtwoareas:
1. Asahighlevelsystemsmodelingtool,flowchartssufferbadly.Aflowchartshowssequential,
procedurallogicaswehaveseeninChapter9,adataflowdiagramisamoreappropriatetool
formodelinganetworkofasynchronous,communicatingprocesses.
2. Thereisnothingtopreventthesystemsanalystfromcreatinganarbitrarilycomplex,
unstructuredflowchartofthesortshowninFigure11.9.
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
21/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.9:Anunstructuredflowchartsource:
File:Figure119.graffle
However,iftheflowchartisonlyusedtodescribedetailedlogic,andifthesystemsanalystrestrictshimself
toflowchartingsymbolsequivalenttothestructuredEnglishconstructsdescribedinSection11.1,then
thereisnothingwrongwiththeiruse.Tocreateastructuredflowchart,thesystemsanalystmustorganize
hisorherlogicwithnestedcombinationsoftheflowchartsymbolsshowninFigure11.10.<ref>Formore
informationonstructuredflowcharts,seetheclassicpaper[BhmandJacopini,1966].</ref>
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
22/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.10:TheBhmJacopinistructuredflowchartsymbolssource:File:Figure110.graffle
AnalternativeistheuseofNassiShneidermandiagrams,discussedinSection11.4.4.However,itshould
bepointedoutthatveryfewsystemsanalystsuseflowchartsforprocessspecifications(nor,forthatmatter,
aretheyfrequentlyusedforprogramdesigneither).ThoughtheautomatedtoolsdescribedinAppendixA
couldbeusedtocreateandmaintainflowcharts,thesimpletruthisstructuredEnglish,decisiontables,and
pre/postconditionspecificationsareeasiertocreateandmaintain.
NassiShneidermanDiagrams
Whenstructuredprogrammingfirstbecamepopularinthemid1970s,NassiShneidermandiagramswere
introducedasastructuredflowchartingtechniquesee[NassiandShneiderman,1973]and[Chapin,1974].
AtypicalNassiShneidermandiagramhastheformshowninFigure11.11.
Notethatasimpleimperativestatementisrepresentedbyarectangle,asshowninFigure11.12(a)the
rectanglecanalsobeusedtorepresentablockofsequentialstatements.ThebinaryIFTHENELSE
constructisrepresentedbythegraphicnotationshowninFigure11.12(b)andtherepetitiveDOWHILE
constructisrepresentedbythegraphicnotationshowninFigure11.12(c).
TheNassiShneidermandiagramsaregenerallymoreorganized,morestructured,andmorecomprehensible
thanthetypicalflowchartforthatreason,theyaresometimespreferredasatoolforcreatingprocess
specifications.However,theydostillrequireanontrivialamountofgraphics,anditisnotclearthatthe
graphicsaddthatmuchvalue.Asmanysystemsanalystshavebeenheardtomutterafterspendinganhour
creatingaNassiShneidermandiagram,ThisisjuststructuredEnglishwithsomeboxesdrawnaroundthe
statements!
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
23/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.11:AtypicalNassi
Shneidermandiagram
Figure11.12(a):
Representationofa
sequentialstatement
Figure11.12(b):Representation
ofanIFTHENELSE
construct
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
24/30
8/17/2015
Chapter11StructuredAnalysisWiki
Figure11.12(c):Representationofa
DOWHILEconstruct
Ontheotherhand,recentresearchconductedbyDavidScanlanatCaliforniaStateUniversity([Scanlan,
1987])showsthat75%to80%ofcomputersciencestudentsstronglypreferNassiShneidermandiagrams
overpseudocodewhenlearningaboutcomplexalgorithmsalthoughthisdoesnotagreewiththetypical
negativereactionofexperiencedprogrammerstowardflowcharts,Scanlansconclusionsarebasedon
carefulfactoranalyticstudiesofseveralhundredstudents.Whileendusersdonotnecessarilyhavethe
samepreferencesascomputersciencestudents,thereisatleastthepossibilitythattheywouldprefera
graphicalrepresentationofaprocessspecificationthananarrative/textualrepresenation.
SUMMARY
Thepurposeofthischapterhasbeentoshowyouthattherearemanydifferentwaystodescribethedetailed
userpolicyinsideeachprimitivebubbleinadataflowdiagram.WhilestructuredEnglishisthemost
commonlyusedtechniqueatthepresenttime,youshouldconsidertheuseofdecisiontables,flowcharts,
pre/postconditions,oranyotherapproachthatcanbeverifiedandcommunicatedeasilytoyourusers.
Keepinmindthattheprocessspecificationsrepresentthelargestamountofdetailedworkinbuildinga
systemmodeltheremaybehundredsoreventhousandsofprocessspecifications,andeachonemaybea
pageinlength.Becauseoftheamountofworkinvolved,youmaywanttoconsiderthetopdown
implementationapproachdiscussedinChapter5:beginthedesignandimplementationphaseofyour
projectbeforealltheprocessspecificationshavebeenfinished.
Keepinmindalsothattheactivityofwritingprocessspecificationsservesasasanitytestofthedataflow
diagramsthathavealreadybeendeveloped.Youmaydiscoverthattheprocessspecificationneeds
additionalinputdataflowsorthatitproducesadditionaloutputdataflows(i.e.,flowsthatwerenotshownon
theDFD).Andasyouwritetheprocessspecification,youmayfindthatadditionalfunctionsareneededfor
example,asyouwritetheprocessspecificationforafunctionthataddsanewrecordtotheCUSTOMERS
store,youmaynoticethattheDFDdoesnothaveabubblethatmodifiesordeletesarecordfromthatstore.
Thus,youshouldexpectthatchanges,revisions,andcorrectionstotheDFDmodelwillberequiredbased
onthedetailedworkofwritingtheprocessspecifications.
REFERENCES
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
25/30
8/17/2015
Chapter11StructuredAnalysisWiki
1. TomDeMarco,StructuredAnalysisandSystemsSpecification.EnglewoodCliffs,N.J.:PrenticeHall,
1979.
2. ChrisGaneandTrishSarson,StructuredSystemsAnalysis:ToolsandTechniques.EnglewoodCliffs,
N.J.:PrenticeHall,1978.
3. EdwardYourdon,TechniquesofProgramStructureandDesign.EnglewoodCliffs,N.J.:Prentice
Hall,1976.
4. JamesMartinandCarmaMcClure,DiagrammingTechniquesforSoftwareEngineering.Englewood
Cliffs,N.J.:PrenticeHall,1985.
5. VictorWeinberg,StructuredAnalysis.EnglewoodCliffs,N.J.:PrenticeHall,1978.
6. EdwardYourdon,ClassicsinSoftwareEngineering.NewYork:YOURDONPress,1979.
7. CorradoBhmandGuiseppeJacopini,FlowDiagrams,TuringMachines,andLanguageswithOnly
TwoFormationRules,CommunicationsoftheACM,Volume9,Number5(May1966),pp.366
371.AlsoreprintedinClassicsinSoftwareEngineering(op.cit.).
8. I.NassiandB.Shneiderman,FlowchartTechniquesforStructuredProgramming,ACMSIGPLAN
Notices,Volume8,Number8(August,1973),pp.1226.
9. NedChapin,NewFormatforFlowcharts,SoftwarePracticeandExperience,Volume4,Number
4(OctoberDecember1974),pp.341357.
10. H.McDaniel,editor,ApplicationofDecisionTables.Princeton,N.J.:,BrandonSystemsPress,1970.
11. S.Pollack,H.Hicks,andW.Harrison,DecisionTablesTheoryandPractice.NewYork:Wiley,
1971.
12. T.R.Gildersleeve,DecisionTablesandTheirPracticalApplicationsinDataProcessing.Englewood
Cliffs,N.J.:PrenticeHall,1970.
13. DavidScanlan,CognitiveFactorsinthePreferenceforStructuredFlowcharts:AFactorAnalytic
Study,presentedattheFirstAnnualYOURDONPressAuthorsConference,NewYork,December
5,1987.
QUESTIONSANDEXERCISES
1. Considerthefollowingspecification,providedtoyouinanarrativeform.Whichofthespecification
toolspresentedinthischapterdoyouthinkwouldbethemostappropriate?Why?
WhenIgetapurchaseorder,myjobistopickasupplierfromourfileofavailablesuppliers.
Ofcourse,somesuppliersgeteliminatedrightawaybecausetheirpriceistoohigh,orbecause
theyvebeentemporarilyblacklistedbecauseofpoorquality.ButtherealworkthatIdoisto
picktheoptimalsupplierfromthosethatqualifytheonethatwilldeliverourorderinthe
shortestamountoftime.Mybosshadasystemforestimatingdeliverytime,andhetaughtitto
me,butatthispointIjustlookatthesupplierslocation,thequantityofitemsbeingordered,
andthedatethatweneedthegoods,andIknowwhichsupplierwillbethebestone....Imnot
evensurehowIdoitanymore.
2. Whatisaprocessspecification?Whatareitsobjectives?
3. Whatarefivecommontoolsformodelingprocessspecifications?
4. Whatarethethreerequirementsthataprocessspecificationshouldsatisfy?
5. Shouldasystemsdevelopmentprojectuseonetoolforprocessspecifications?Whyorwhynot?
6. ResearchProject:Whichspecificationtoolsareusedinyourorganization?Arethererestrictionson
whichtoolsareused?Doyouthinktherighttoolsareinuse?
7. WhichbubblesinaDFDrequireprocessspecifications?
8. Whataretheconsequencesofwritingprocessspecificationsfornonatomic(nonprimitive)bubbles?
9. Howshouldthesystemsanalystdeterminewhattheprocessspecificationsforabubbleshouldbe?
10. Howdoesithappenthatprocessspecificationssometimesimposearbitrarydesignand
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
26/30
8/17/2015
Chapter11StructuredAnalysisWiki
implementationdecisions?Whataretheconsequencesofthis?
11. ResearchProject:Findanexampleofaprocessspecificationinyourorganizationthatexhibits
arbitrarydesignorimplementationdecisions.Howwouldyourewriteittoavoidthisproblem?
12. GiveadefinitionofthetermstructuredEnglish?Whataresomesynonymsforthisterm?
13. HowmanyverbsareneededtoformstructuredEnglishsentences?Suggestalistof20verbs.
14. WhyarealgebraicequationsusuallynecessaryinastructuredEnglishprocessspecification?
15. WhatcharacteristicsshouldtheobjectsinastructuredEnglishprocessspecificationhave?
16. Whatarelocalterms?
17. Shouldlocaltermsbeincludedinadatadictionary?Whyorwhynot?
18. DolocaltermsappearasflowsonDFDs?
19. Giveaspecificexampleofalocalterm.
20. WhatstructuredprogrammingconstructsareusedinstructuredEnglish?
21. WhatisthepurposeoftheOTHERWISEclauseinstructuredEnglish?
22. WhatisthedifferencebetweenaDOWHILEconstructandaREPEATUNTILconstructin
structuredEnglish?
23. Whatisacompoundsentence?
24. IstheCASEconstructnecessaryinstructuredEnglish?Whataretheadvantagesanddisadvantages
oftheCASEconstruct?
25. Whatarethefourcomponentsofacompoundsentence?
26. Whatisthedifferencebetween(a)and(b)?
Question26(a)
Question26(b)
27. Whichoftheabovetwoexamplesdoyouthinkiseasiesttounderstand?Why?
28. ResearchProject:Constructseveralexamplessimilartothatinquestion26,andconductasurvey
amongyouruserstoseewhichversiontheyprefer.
29. WhatthreeguidelinesshouldbefollowedtoensurethatastructuredEnglishspecificationwillbe
readable?
30. DoyouthinkthatthreelevelsofnestedIFconstructsinastructuredEnglishspecificationareOK?
Whyorwhynot?
31. ResearchProject:MakeupseveralexamplesofstructuredEnglishprocessspecificationsinvolving
two,three,andfourlevelsofnestedIFconstructs.Conductasurveytodetermine,onaverage,how
manylevelstheusersinyourorganizationarewillingtoaccept.
32. WhatisthepurposeofindentationinastructuredEnglishprocessspecification?
33. WhyisitimportanttoconductwalkthroughsofastructuredEnglishprocessspecificationwiththe
appropriateuser?
34. WhatisthepurposeofusingoutlinestylenumberinginastructuredEnglishprocessspecification?
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
27/30
8/17/2015
Chapter11StructuredAnalysisWiki
35. Giveadefinitionoftheprecondition/postconditionspecificationtechnique.
36. WhatisthedifferencebetweenthestructuredEnglishspecificationtechniqueandthe
precondition/postconditiontechnique?
37. Underwhatconditionsistheprecondition/postconditionspecificationtechniqueagoodoneforthe
systemsanalysttouse?
38. Giveadefinitionofaprecondition.
39. Whatarethefourthingsthatapreconditiontypicallydescribes?
40. WhatistherelationshipbetweenpreconditionsinaprocessspecificationandinputflowsonaDFD?
41. Whathappensifthepreconditionsofaprocessspecificationarenotsatisfied?
42. Giveadefinitionofapostcondition.
43. Whatarethefourthingsthatapostconditiontypicallydescribes?
44. WhatistherelationshipbetweenpostconditionsandoutputflowsonaDFD?
45. Ifaprocessspecificationhasfoursetsofpreconditions,howmanysetsofpostconditionsshouldit
have?
46. Whatistheminimumnumberofpreconditionsthataprocessspecificationcouldhave?
47. Whatarethepotentialdisadvantagesoftheprecondition/postconditionapproach?
48. ResearchProject:Findanexampleofarealworldprocessspecificationthatwouldnotbewellsuited
totheprecondition/postconditionspecificationapproach.Whyisitnotwellsuited?
49. LookatFigure11.6.Whatwouldbeabettermodelingtoolforcreatingaprocessspecificationfor
thissituation?
50. ResearchProject:Findanexampleofarealworldprocessspecificationthatwouldbewellsuitedto
theprecondition/postcontionapproach.Whyisitwellsuited?
51. Whatisadecisiontable?Whatarethecomponentsofadecisiontable?
52. Underwhatconditionsisadecisiontableagoodmodelingtoolforprocessspecifications?
53. Whatiswrongwiththefollowingdecisiontable?
54. Whatiswrongwiththefollowingdecisiontable?
55. Whatiswrongwiththefollowingdecisiontable?
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
28/30
8/17/2015
Chapter11StructuredAnalysisWiki
56. Whatisthedifferencebetweenadecisiontablewithbinaryvariablesandadecisiontablewith
multivaluedvariables?
57. IfadecisiontablehasNbinaryvaluedvariables,howmanyrulesshouldithave?
58. Underwhatconditionsshouldthesystemsanalystuseagraphforaprocessspecification?
59. WhataretheadvantagesofagraphoverstructuredEnglishasamodelingtoolforprocess
specifications?
60. WhatarethefourmajordisadvantagesofnarrativeEnglishasamodelingtoolforprocess
specifications?
61. WhatguidelinesshouldbefollowedifnarrativeEnglishmustbeusedasamodelingtoolforprocess
specifications?
62. Whatarethetwocommoncriticismsofflowchartsasamodelingtool?
63. Whatarethethreecomponentsofastructuredflowchart?
64. ResearchProject:ShowthesamespecificationtoauserintheformofstructuredEnglishanda
flowchart.Whichapproachispreferred?Formoreinformationonthissee[Scanlan,1987].
65. WhatisaNassiShneidermandiagram?WhatisthedifferencebetweenaflowchartandaNassi
Shneidermandiagram?
66. FromStructuredAnalysisbyVictorWeinberg(NewYork:YOURDONPress,1978):Writea
decisiontableforthefollowingnarrativespecification,andindicateanyomissions,ambiguities,or
contradictionsthatyoufind:
TheSwellStoreemploysanumberofsalesmentosellavarietyofitems.Mostofthese
salesmenearntheirincomefromacommission,paidontheitemstheysell,butafeware
salarypluscommissionemployeesthatis,theyreceiveafixedsalary,regardlessofthe
quantityortypeofitemstheysell,plusacommissiononcertainitems.TheSwellStoresells
severaldifferentlinesofmerchandise,someofwhichareknownasstandarditems(acanof
tomatosoup,forexample)becausetheyarewidespreadanddonotrequireanycreativesales
techniquesinaddition,therearebonusitemsthatarehighlyprofitablebutdifficulttosell(a
goldplated,diamondstuddedCadillac,perhaps).Thestandardandbonusitemsgenerally
representthelowandhighendsofthepricespectrum,sandwichingagreaternumberofitems
inthemiddleofthespectrum.
Customers,also,arecategorized.Someareknownasregulars,becausetheydobusinessso
oftenthatnocreativesellingisrequired.Mostofthecustomers,however,doasmallamountof
businessattheSwellStore,andarelikelytowalkinrightoffthestreet,buysomething,and
thendisappearforever.
Themanagementscommissionpolicyisasfollows:Ifanonsalariedemployeesellsanitem
thatisneitherstandardnorbonustosomeoneotherthanaregularcustomer,hereceivesa10
percentcommission,unlesstheitemcostsmorethan$10,000,inwhichcasethecommissionis
5percent.Forallsalesmen,ifastandarditemissold,orifanyitemissoldtoaregular
customer,nocommissionisgiven.Ifasalariedsalesmansellsabonusitem,hereceivesa5
percentcommission,unlesstheitemsellsformorethan$1,000,inwhichcasehereceivesaflat
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
29/30
8/17/2015
Chapter11StructuredAnalysisWiki
$25commission.Ifanonsalariedsalesmansellsabonusitemtosomeoneotherthanaregular
customer,hereceivesa10%commission,unlesstheitemsellsformorethan$1,000,inwhich
casehereceivesaflatcommissionof$75.
ENDNOTES
<references/>
Retrievedfrom"http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&oldid=3324"
Category:
Pageswithbrokenfilelinks
Thispagewaslastmodifiedon6June2007,at14:38.
Thispagehasbeenaccessed132,124times.
http://yourdon.com/strucanalysis/wiki/index.php?title=Chapter_11&printable=yes
30/30