Skip to content
Snippets Groups Projects
Commit bec1c509 authored by Mikaël Mayer's avatar Mikaël Mayer Committed by Ravi
Browse files

Updated isabelle annotation for the new string theory.

parent 1e0783f1
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,8 @@ object String {
def fromChar(i: Char): String = {
StringCons(i, StringNil())
}
@isabelle.noBody()
def fromBigInt(i: BigInt): String =
if(i < 0) StringCons('-', fromBigInt(-i))
else if(i == BigInt(0)) StringCons('0', StringNil())
......@@ -51,6 +52,7 @@ object String {
else if(i == BigInt(9)) StringCons('9', StringNil())
else fromBigInt(i / 10).concat(fromBigInt(i % 10))
@isabelle.noBody()
def fromInt(i: Int): String = i match {
case -2147483648 => StringCons('-', StringCons('2', fromInt(147483648)))
case i if i < 0 => StringCons('-', fromInt(-i))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment