src/Doc/Codegen/Adaptation.thy
changeset 82527 803b5d19c48c
parent 82445 bb1f2a03b370
equal deleted inserted replaced
82526:c49564b6eb0f 82527:803b5d19c48c
   188        On top of these, more abstract conversions like \<^term_type>\<open>String.explode\<close> and \<^term_type>\<open>String.implode\<close>
   188        On top of these, more abstract conversions like \<^term_type>\<open>String.explode\<close> and \<^term_type>\<open>String.implode\<close>
   189        are implemented.
   189        are implemented.
   190        
   190        
   191        Part of \<open>HOL-Main\<close>.
   191        Part of \<open>HOL-Main\<close>.
   192 
   192 
       
   193     \item[\<^theory>\<open>HOL-Library.IArray\<close>] provides a type \<^typ>\<open>'a iarray\<close>
       
   194        isomorphic to lists but implemented by (effectively immutable)
       
   195        arrays \emph{in SML only}.
       
   196 
       
   197   \end{description}
       
   198 
       
   199   \noindent Using these adaptation setups the following extensions are provided:
       
   200 
       
   201   \begin{description}
       
   202 
   193     \item[\<open>Code_Target_Int\<close>] implements type \<^typ>\<open>int\<close>
   203     \item[\<open>Code_Target_Int\<close>] implements type \<^typ>\<open>int\<close>
   194        by \<^typ>\<open>integer\<close> and thus by target-language built-in integers.
   204        by \<^typ>\<open>integer\<close> and thus by target-language built-in integers.
   195 
   205 
   196     \item[\<open>Code_Binary_Nat\<close>] implements type
   206     \item[\<open>Code_Binary_Nat\<close>] implements type
   197        \<^typ>\<open>nat\<close> using a binary rather than a linear representation,
   207        \<^typ>\<open>nat\<close> using a binary rather than a linear representation,
   205        by a preprocessor.
   215        by a preprocessor.
   206 
   216 
   207     \item[\<open>Code_Target_Numeral\<close>] is a convenience theory
   217     \item[\<open>Code_Target_Numeral\<close>] is a convenience theory
   208        containing \<open>Code_Target_Nat\<close>, \<open>Code_Target_Int\<close> and \<open>Code_Target_Bit_Shifts\<close>-
   218        containing \<open>Code_Target_Nat\<close>, \<open>Code_Target_Int\<close> and \<open>Code_Target_Bit_Shifts\<close>-
   209 
   219 
       
   220     \item[\<open>Code_Bit_Shifts_for_Arithmetic\<close>] uses the preprocessor to
       
   221        replace arithmetic operations on numeric types by target-language
       
   222        built-in bit shifts whenever feasible.
       
   223 
   210     \item[\<open>Code_Abstract_Char\<close>] implements type \<^typ>\<open>char\<close> by target language
   224     \item[\<open>Code_Abstract_Char\<close>] implements type \<^typ>\<open>char\<close> by target language
   211        integers, sacrificing pattern patching in exchange for dramatically
   225        integers, sacrificing pattern patching in exchange for dramatically
   212        increased performance for comparisons.
   226        increased performance for comparisons.
   213 
       
   214     \item[\<^theory>\<open>HOL-Library.IArray\<close>] provides a type \<^typ>\<open>'a iarray\<close>
       
   215        isomorphic to lists but implemented by (effectively immutable)
       
   216        arrays \emph{in SML only}.
       
   217 
   227 
   218   \end{description}
   228   \end{description}
   219 \<close>
   229 \<close>
   220 
   230 
   221 
   231