Skip to content

Commit ff687af

Browse files
committed
minor correction
1 parent 954bb51 commit ff687af

File tree

1 file changed

+21
-19
lines changed

1 file changed

+21
-19
lines changed

src/Act/Coq.hs

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -273,31 +273,33 @@ invariantReachable (Constructor _ i _ _ _ _ _) =
273273
where
274274
claim = indent 2 $ T.unlines
275275
[ forAll (envDecl <+> interface i <+> stateDecl <+> invPropDecl i
276-
<+> parens ("HIPinvInit :" <+> invInitType <+> invPropVar) <+> parens ("HPinvStep :" <+> invStepType <+> invPropVar))
276+
<+> parens ("HIPinvInit :" <+> invInitType <+> invPropVar) <+> parens ("HIPinvStep :" <+> invStepType <+> invPropVar))
277277
, implication . concat $
278278
[ [reachableFromInitType <+> envVar <+> arguments i <+> stateDecl]
279279
, [invPropVar <+> envVar <+> arguments i <+> stateVar]
280280
]
281281
]
282-
proof = indent 2 . T.unlines $
282+
proof = T.unlines $
283283
[
284-
"Proof.",
285-
"intros" <+> envVar <+> arguments i <+> stateVar <+> invPropVar <+> "HIPinvInit HIPinvStep Hreach.",
286-
"unfold reachableFromInit in Hreach.",
287-
"destruct Hreach as [Hinit Hmulti].",
288-
"apply step_multi_step with (P := fun s s' =>" <+> invPropVar <+> envVar <+> arguments i <+> "s ->" <+> invPropVar <+> envVar <+> arguments i <+> "s' ) in Hmulti.",
289-
"- apply Hmulti.",
290-
" apply HIPinvInit; assumption.",
291-
"- intros s s' Hstep.",
292-
" apply HIPinvStep with (STATE := s) (STATE' := s') ; assumption.",
293-
"- unfold Relation_Definitions.reflexive.",
294-
" intros.",
295-
" assumption.",
296-
"- unfold Relation_Definitions.transitive.",
297-
" intros s1 s2 s3 Ht1 Ht2 Ht3.",
298-
" apply Ht2, Ht1.",
299-
" assumption.",
300-
"Qed."
284+
"Proof."
285+
, indent 2 . T.unlines $
286+
[ "intros" <+> envVar <+> arguments i <+> stateVar <+> invPropVar <+> "HIPinvInit HIPinvStep Hreach."
287+
, "unfold reachableFromInit in Hreach."
288+
, "destruct Hreach as [Hinit Hmulti]."
289+
, "apply step_multi_step with (P := fun s s' =>" <+> invPropVar <+> envVar <+> arguments i <+> "s ->" <+> invPropVar <+> envVar <+> arguments i <+> "s' ) in Hmulti."
290+
, "- apply Hmulti."
291+
, " apply HIPinvInit; assumption."
292+
, "- intros s s' Hstep."
293+
, " apply HIPinvStep with (STATE := s) (STATE' := s') ; assumption."
294+
, "- unfold Relation_Definitions.reflexive."
295+
, " intros."
296+
, " assumption."
297+
, "- unfold Relation_Definitions.transitive."
298+
, " intros s1 s2 s3 Ht1 Ht2 Ht3."
299+
, " apply Ht2, Ht1."
300+
, " assumption."
301+
]
302+
, "Qed."
301303
]
302304

303305
-- | produce a state value from a list of storage updates

0 commit comments

Comments
 (0)