signature java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
>> val mk_number_syntax: int -> term
java.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 34
:string- -int >( - ) ->java.lang.StringIndexOutOfBoundsException: Range [94, 92) out of bounds for length 112
end;
structure Numeral: NUMERAL = struct
(* numeral *)=java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 107
fun dest_num_syntax (Const (\<^const_syntax>\<open>Numjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
| Const\^\N.<,_ t+ 1
| dest_num_syntax (Const (\<^const_syntax>\<open>Num.One\<close>
mk_cnumber Tone
| T =
i java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19 01 = ^java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 63
| java.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
n>Bit1 )
else raise Match
fun mk_cbit 0 = \<^java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0 1= <cterm\.c>
| mk_cbit _ = raise CTERM ("mk_cbit" = Syntax <<onec>
fun else Syntax <c><>numeral\<close> $ mk_num_syntax n; let fun mk 1 = \<^cterm>\<open>Num.One\<close>
| mk i java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 letval(,r =.i 2
Thm.apply (mk_cbit r) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
end in
I {sym .Constant <const_name\openNumBit0\<> . } $)=
end
(* number *)
local
val cterm_of = Thm.cterm_of \<^context>; fun tvar S = ( n= 2*java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
val zero_tvar = tvar \<^sort>\<open>zero\java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 29
zero = \^\>z<java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 91
val one_tvar = tvar \<^sort>\<open>one\ _>java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 val one =
=<\open>java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 55 val numeral = cterm_ofSOME=(ojava.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 59
val java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
\<close>,TVar -TVar)java.lang.StringIndexOutOfBoundsException: Index 107 out of bounds for length 107
=ijava.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 71
in
T Tjava.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4
| mk_cnumber T i = if i > 0 then
Thm.apply (instT T numeral_tvar numeral) (mk_cnumeral i)
else
Thm.apply (instT T uminus_tvar uminus)
(Thm.apply (instT T numeral_tvar numeral) (mk_cnumeral (~ i)));
end;
fun mk_number_syntax n = if n = 0 then Syntax.const \<^const_syntax>\<open>Groups.zero\<close>
else if n = 1 then Syntax.const \<^const_syntax>\<open>Groups.one\<close>
else Syntax.const \<^const_syntax>\<open>numeral\<close> $ mk_num_syntax n;
(* code generator *)
local open Basic_Code_Thingol in
fun dest_num_code (IConst { sym = Code_Symbol.Constant \<^const_name>\<open>Num.One\<close>, ... }) = SOME 1
| dest_num_code (IConst { sym = Code_Symbol.Constant \<^const_name>\<open>Num.Bit0\<close>, ... } `$ t) =
(case dest_num_code t of
SOME n => SOME (2 * n)
| _ => NONE)
| dest_num_code (IConst { sym = Code_Symbol.Constant \<^const_name>\<open>Num.Bit1\<close>, ... } `$ t) =
(case dest_num_code t of
SOME n => SOME (2 * n + 1)
| _ => NONE)
| dest_num_code _ = NONE;
fun add_code number_of preproc print target thy = let fun pretty literals _ thm _ _ [(t, _)] = case dest_num_code t of
SOME n => (Pretty.str o print literals o preproc) n
| NONE => Code_Printer.eqn_error thy thm "Illegal numeral expression: illegal term"; in
thy |> Code_Target.set_printings (Code_Symbol.Constant (number_of,
[(target, SOME (Code_Printer.complex_const_syntax (1, pretty)))]))
end;
end; (*local*)
end;
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.3Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.