@@ -16,6 +16,22 @@ Class {
1616 #tag : ' Model-Report'
1717}
1818
19+ { #category : ' as yet unclassified' }
20+ ExReqStepReport >> announceValidity [
21+
22+ self repositoryReport annouceStepReportIsValid: self
23+ ]
24+
25+ { #category : ' as yet unclassified' }
26+ ExReqStepReport >> closeReport [
27+
28+ super closeReport.
29+ step := nil .
30+ requirement := nil .
31+ previousStepReport := nil .
32+ nextStepReport := nil
33+ ]
34+
1935{ #category : ' accessing' }
2036ExReqStepReport >> hasNextStepReport [
2137
@@ -94,13 +110,13 @@ ExReqStepReport >> numberOfSteps: anObject [
94110{ #category : ' as yet unclassified' }
95111ExReqStepReport >> postconditionIsValid [
96112
97- ^ postconditionValidity
113+ ^ postconditionValidity or : [ self hasPostcondition not ]
98114]
99115
100116{ #category : ' as yet unclassified' }
101117ExReqStepReport >> preconditionIsValid [
102118
103- ^ preconditionValidity
119+ ^ preconditionValidity or : [ self hasPrecondition not ]
104120]
105121
106122{ #category : ' accessing' }
@@ -166,44 +182,39 @@ ExReqStepReport >> verifyStepPostconditionWithContext: aContext [
166182 3 - Postcondition not nil -> evaluation
167183 "
168184
169- self postconditionIsValid ifTrue: [ ^ self ].
185+ postconditionValidity ifTrue: [ ^ self ].
170186 self preconditionIsValid ifFalse: [ ^ self ].
171187 self step postcondition ifNil: [
172188 postconditionValidity := true .
189+ self announceValidity.
173190 ^ self ].
174- preconditionValidity := postconditionValidity := self step
175- postcondition
176- valueWithEnoughArguments:
177- {
178- aContext receiver.
179- aContext
180- arguments.
181- self requirement } .
182- self isValid ifTrue: [
183- self repositoryReport annouceStepReportIsValid: self ]
191+ postconditionValidity := self hasPostcondition
192+ ifTrue: [
193+ self step postcondition
194+ valueWithEnoughArguments: {
195+ aContext receiver.
196+ aContext arguments.
197+ self requirement } ]
198+ ifFalse: [ true ] .
199+
200+ self isValid ifTrue: [ self announceValidity ]
184201]
185202
186203{ #category : ' as yet unclassified' }
187204ExReqStepReport >> verifyStepPreconditionWithContext: aContext [
188- "
189- 0 - Precondition ok -> ok
190- 1 - Previous step valid
191- 2 - Precondition = nil -> true
192- 3 - Precondition not nil -> evaluation
193- "
194- self preconditionIsValid ifTrue: [ ^ self ].
205+
206+ preconditionValidity ifTrue: [ ^ self ].
195207 self isPreviousStepValid ifFalse: [
196208 preconditionValidity := false .
197209 postconditionValidity := false .
198210 ^ self ].
199-
200- self step precondition ifNil: [
201- preconditionValidity := true .
202- ^ self ].
203-
204- preconditionValidity := self step precondition
205- valueWithEnoughArguments: {
206- aContext receiver.
207- aContext arguments.
208- self requirement }
211+ preconditionValidity := self hasPrecondition
212+ ifTrue: [
213+ self step precondition
214+ valueWithEnoughArguments: {
215+ aContext receiver.
216+ aContext arguments.
217+ self requirement } ]
218+ ifFalse: [ true ].
219+ self isValid ifTrue: [ self announceValidity ].
209220]
0 commit comments