src/HOL/Imperative_HOL/Overview.thy
changeset 40671 5e46057ba8e0
parent 40358 b6ed3364753d
child 41413 64cd30d6b0b8
equal deleted inserted replaced
40630:3b5c31e55540 40671:5e46057ba8e0
    94 
    94 
    95 text {*
    95 text {*
    96   To establish correctness of imperative programs, predicate
    96   To establish correctness of imperative programs, predicate
    97 
    97 
    98   \begin{quote}
    98   \begin{quote}
    99     @{term_type crel}
    99     @{term_type effect}
   100   \end{quote}
   100   \end{quote}
   101 
   101 
   102   provides a simple relational calculus.  Primitive rules are @{text
   102   provides a simple relational calculus.  Primitive rules are @{text
   103   crelI} and @{text crelE}, rules appropriate for reasoning about
   103   effectI} and @{text effectE}, rules appropriate for reasoning about
   104   imperative operations are available in the @{text crel_intros} and
   104   imperative operations are available in the @{text effect_intros} and
   105   @{text crel_elims} fact collections.
   105   @{text effect_elims} fact collections.
   106 
   106 
   107   Often non-failure of imperative computations does not depend
   107   Often non-failure of imperative computations does not depend
   108   on the heap at all;  reasoning then can be easier using predicate
   108   on the heap at all;  reasoning then can be easier using predicate
   109 
   109 
   110   \begin{quote}
   110   \begin{quote}
   112   \end{quote}
   112   \end{quote}
   113 
   113 
   114   Introduction rules for @{const success} are available in the
   114   Introduction rules for @{const success} are available in the
   115   @{text success_intro} fact collection.
   115   @{text success_intro} fact collection.
   116 
   116 
   117   @{const execute}, @{const crel}, @{const success} and @{const bind}
   117   @{const execute}, @{const effect}, @{const success} and @{const bind}
   118   are related by rules @{text execute_bind_success}, @{text
   118   are related by rules @{text execute_bind_success}, @{text
   119   success_bind_executeI}, @{text success_bind_crelI}, @{text
   119   success_bind_executeI}, @{text success_bind_effectI}, @{text
   120   crel_bindI}, @{text crel_bindE} and @{text execute_bind_eq_SomeI}.
   120   effect_bindI}, @{text effect_bindE} and @{text execute_bind_eq_SomeI}.
   121 *}
   121 *}
   122 
   122 
   123 
   123 
   124 section {* Monadic data structures *}
   124 section {* Monadic data structures *}
   125 
   125 
   233       correctness prove of the whole imperative program simply
   233       correctness prove of the whole imperative program simply
   234       consists of composing those.
   234       consists of composing those.
   235       
   235       
   236     \item Whether one should prefer equational reasoning (fact
   236     \item Whether one should prefer equational reasoning (fact
   237       collection @{text execute_simps} or relational reasoning (fact
   237       collection @{text execute_simps} or relational reasoning (fact
   238       collections @{text crel_intros} and @{text crel_elims}) depends
   238       collections @{text effect_intros} and @{text effect_elims}) depends
   239       on the problems to solve.  For complex expressions or
   239       on the problems to solve.  For complex expressions or
   240       expressions involving binders, the relation style usually is
   240       expressions involving binders, the relation style usually is
   241       superior but requires more proof text.
   241       superior but requires more proof text.
   242 
   242 
   243     \item Note that you can extend the fact collections of Imperative
   243     \item Note that you can extend the fact collections of Imperative