Skip to content

Commit 70fd8a7

Browse files
committed
first released version
1 parent aa06e2f commit 70fd8a7

165 files changed

Lines changed: 73578 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,31 @@
11
# ATDebugger
2+
3+
Requirement:
4+
Java 7+ JVM with javafx support. Some builds of openjdk7 do not have javafx support.
5+
6+
Compiling:
7+
A recent version of sbt(simple build tool) is needed. Edit the path to your jdk into the build.sbt file. Run sbt then type packageJavafx to compile.
8+
9+
Usage:
10+
Run the jar, and the block control window will show up. Click 'Add AT' to open AT windows. You can drag a text file containing AT assembly into the code table and it will load it.
11+
12+
ATs can be given balance either by setting the balance at the top of their windows, or by clicking 'Send tx' and making a transaction to them. All balances are represented as they are processed internally in burst (100000000 (10^8) = 1 coin). Step fees are 10^7(10000000) for normal opcodes, and 10^8(100000000) for api calls.
13+
14+
Breakpoints can be set by clicking in the bp column next to code lines.
15+
16+
Clicking 'Advance Block' in the block control window will cause ATs which are eligable to run to run.
17+
18+
While an AT is running, run will cause an AT to run until it hits it's next breakpoint. Step into will run exactly one opcode. Step over will run until it gets to a line which is shown in the code. Step into and over will usually do the same thing, however the code window shows your source, which may not perfectly match the assembled code, so if any line was expanded to multiple operations, step into will run them one at a time, but step over will execute them together.
19+
20+
When the AT is in progress, you can double click in the instruction pointer column to set the next statement. Variables can also be edited on the right side while the AT is in progress. The instuction pointer and variables cannot be edited in between blocks.
21+
22+
If you have multiple AT windows, they share they same pool of transactions, so they can send to each other.
23+
24+
Each AT window keeps a complete history of it's state each block, so you can use 'Undo Block' all the way back.
25+
26+
This uses completly different assembling code from the available ATAssembler and may assemble to different code. There are 2 known cases where it will assemble differently:
27+
1. Branch statements can jump a limited distance. ATAssembler issues a warning if you try to branch too far, but ATDebugger automatically fixes it by inverting the branch and adding a jmp.
28+
2. ATAssembler wastes a variable when setting error handlers. ATDebugger does not.
29+
30+
A new assembler that shares the assembling code with ATDebugger will be released to make it consistent.
31+

build.sbt

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name:= "ATDebugger"
2+
3+
version := "1.0"
4+
5+
scalaVersion := "2.11.5"
6+
7+
resolvers += "Typesafe Repository" at "http://repo.typesafe.com/typesafe/releases/"
8+
9+
libraryDependencies += "com.typesafe.akka" %% "akka-actor" % "2.3.9" withSources() withJavadoc()
10+
11+
libraryDependencies += "org.scalafx" %% "scalafx" % "2.2.76-R11" withSources() withJavadoc()
12+
13+
addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.0-M5" cross CrossVersion.full)
14+
15+
libraryDependencies += "org.scalafx" %% "scalafxml-core-sfx2" % "0.2.2" withSources() withJavadoc()
16+
17+
//libraryDependencies += "org.scalafx" %% "scalafxml-core" % "0.2.1" withSources() withJavadoc()
18+
19+
fork in run := true
20+
21+
incOptions := incOptions.value.withNameHashing(false)
22+
23+
jfxSettings
24+
25+
JFX.mainClass := Some("atdebugger.ATDebugger")
26+
27+
JFX.devKit := JFX.jdk("/path/to/jdk")
28+
29+
EclipseKeys.withSource := true

project/plugins.sbt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
addSbtPlugin("com.typesafe.sbteclipse" % "sbteclipse-plugin" % "3.0.0")
2+
3+
addSbtPlugin("no.vedaadata" %% "sbt-javafx" % "0.6")
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// $Id: BLAKE224.java 252 2011-06-07 17:55:14Z tp $
2+
3+
package fr.cryptohash;
4+
5+
/**
6+
* <p>This class implements the BLAKE-224 digest algorithm under the
7+
* {@link Digest} API.</p>
8+
*
9+
* <pre>
10+
* ==========================(LICENSE BEGIN)============================
11+
*
12+
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
13+
*
14+
* Permission is hereby granted, free of charge, to any person obtaining
15+
* a copy of this software and associated documentation files (the
16+
* "Software"), to deal in the Software without restriction, including
17+
* without limitation the rights to use, copy, modify, merge, publish,
18+
* distribute, sublicense, and/or sell copies of the Software, and to
19+
* permit persons to whom the Software is furnished to do so, subject to
20+
* the following conditions:
21+
*
22+
* The above copyright notice and this permission notice shall be
23+
* included in all copies or substantial portions of the Software.
24+
*
25+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32+
*
33+
* ===========================(LICENSE END)=============================
34+
* </pre>
35+
*
36+
* @version $Revision: 252 $
37+
* @author Thomas Pornin &lt;thomas.pornin@cryptolog.com&gt;
38+
*/
39+
40+
public class BLAKE224 extends BLAKESmallCore {
41+
42+
/**
43+
* Create the engine.
44+
*/
45+
public BLAKE224()
46+
{
47+
super();
48+
}
49+
50+
/** The initial value for BLAKE-224. */
51+
private static final int[] initVal = {
52+
0xC1059ED8, 0x367CD507, 0x3070DD17, 0xF70E5939,
53+
0xFFC00B31, 0x68581511, 0x64F98FA7, 0xBEFA4FA4
54+
};
55+
56+
/** @see BLAKESmallCore */
57+
int[] getInitVal()
58+
{
59+
return initVal;
60+
}
61+
62+
/** @see Digest */
63+
public int getDigestLength()
64+
{
65+
return 28;
66+
}
67+
68+
/** @see Digest */
69+
public Digest copy()
70+
{
71+
return copyState(new BLAKE224());
72+
}
73+
}
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
// $Id: BLAKE256.java 252 2011-06-07 17:55:14Z tp $
2+
3+
package fr.cryptohash;
4+
5+
/**
6+
* <p>This class implements the BLAKE-256 digest algorithm under the
7+
* {@link Digest} API.</p>
8+
*
9+
* <pre>
10+
* ==========================(LICENSE BEGIN)============================
11+
*
12+
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
13+
*
14+
* Permission is hereby granted, free of charge, to any person obtaining
15+
* a copy of this software and associated documentation files (the
16+
* "Software"), to deal in the Software without restriction, including
17+
* without limitation the rights to use, copy, modify, merge, publish,
18+
* distribute, sublicense, and/or sell copies of the Software, and to
19+
* permit persons to whom the Software is furnished to do so, subject to
20+
* the following conditions:
21+
*
22+
* The above copyright notice and this permission notice shall be
23+
* included in all copies or substantial portions of the Software.
24+
*
25+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32+
*
33+
* ===========================(LICENSE END)=============================
34+
* </pre>
35+
*
36+
* @version $Revision: 252 $
37+
* @author Thomas Pornin &lt;thomas.pornin@cryptolog.com&gt;
38+
*/
39+
40+
public class BLAKE256 extends BLAKESmallCore {
41+
42+
/**
43+
* Create the engine.
44+
*/
45+
public BLAKE256()
46+
{
47+
super();
48+
}
49+
50+
/** The initial value for BLAKE-256. */
51+
private static final int[] initVal = {
52+
0x6A09E667, 0xBB67AE85, 0x3C6EF372, 0xA54FF53A,
53+
0x510E527F, 0x9B05688C, 0x1F83D9AB, 0x5BE0CD19
54+
};
55+
56+
/** @see BLAKESmallCore */
57+
int[] getInitVal()
58+
{
59+
return initVal;
60+
}
61+
62+
/** @see Digest */
63+
public int getDigestLength()
64+
{
65+
return 32;
66+
}
67+
68+
/** @see Digest */
69+
public Digest copy()
70+
{
71+
return copyState(new BLAKE256());
72+
}
73+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// $Id: BLAKE384.java 252 2011-06-07 17:55:14Z tp $
2+
3+
package fr.cryptohash;
4+
5+
/**
6+
* <p>This class implements the BLAKE-384 digest algorithm under the
7+
* {@link Digest} API.</p>
8+
*
9+
* <pre>
10+
* ==========================(LICENSE BEGIN)============================
11+
*
12+
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
13+
*
14+
* Permission is hereby granted, free of charge, to any person obtaining
15+
* a copy of this software and associated documentation files (the
16+
* "Software"), to deal in the Software without restriction, including
17+
* without limitation the rights to use, copy, modify, merge, publish,
18+
* distribute, sublicense, and/or sell copies of the Software, and to
19+
* permit persons to whom the Software is furnished to do so, subject to
20+
* the following conditions:
21+
*
22+
* The above copyright notice and this permission notice shall be
23+
* included in all copies or substantial portions of the Software.
24+
*
25+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32+
*
33+
* ===========================(LICENSE END)=============================
34+
* </pre>
35+
*
36+
* @version $Revision: 252 $
37+
* @author Thomas Pornin &lt;thomas.pornin@cryptolog.com&gt;
38+
*/
39+
40+
public class BLAKE384 extends BLAKEBigCore {
41+
42+
/**
43+
* Create the engine.
44+
*/
45+
public BLAKE384()
46+
{
47+
super();
48+
}
49+
50+
/** The initial value for BLAKE-384. */
51+
private static final long[] initVal = {
52+
0xCBBB9D5DC1059ED8L, 0x629A292A367CD507L,
53+
0x9159015A3070DD17L, 0x152FECD8F70E5939L,
54+
0x67332667FFC00B31L, 0x8EB44A8768581511L,
55+
0xDB0C2E0D64F98FA7L, 0x47B5481DBEFA4FA4L
56+
};
57+
58+
/** @see BLAKESmallCore */
59+
long[] getInitVal()
60+
{
61+
return initVal;
62+
}
63+
64+
/** @see Digest */
65+
public int getDigestLength()
66+
{
67+
return 48;
68+
}
69+
70+
/** @see Digest */
71+
public Digest copy()
72+
{
73+
return copyState(new BLAKE384());
74+
}
75+
}
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
// $Id: BLAKE512.java 252 2011-06-07 17:55:14Z tp $
2+
3+
package fr.cryptohash;
4+
5+
/**
6+
* <p>This class implements the BLAKE-512 digest algorithm under the
7+
* {@link Digest} API.</p>
8+
*
9+
* <pre>
10+
* ==========================(LICENSE BEGIN)============================
11+
*
12+
* Copyright (c) 2007-2010 Projet RNRT SAPHIR
13+
*
14+
* Permission is hereby granted, free of charge, to any person obtaining
15+
* a copy of this software and associated documentation files (the
16+
* "Software"), to deal in the Software without restriction, including
17+
* without limitation the rights to use, copy, modify, merge, publish,
18+
* distribute, sublicense, and/or sell copies of the Software, and to
19+
* permit persons to whom the Software is furnished to do so, subject to
20+
* the following conditions:
21+
*
22+
* The above copyright notice and this permission notice shall be
23+
* included in all copies or substantial portions of the Software.
24+
*
25+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
26+
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
27+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
28+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
29+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
30+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
31+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
32+
*
33+
* ===========================(LICENSE END)=============================
34+
* </pre>
35+
*
36+
* @version $Revision: 252 $
37+
* @author Thomas Pornin &lt;thomas.pornin@cryptolog.com&gt;
38+
*/
39+
40+
public class BLAKE512 extends BLAKEBigCore {
41+
42+
/**
43+
* Create the engine.
44+
*/
45+
public BLAKE512()
46+
{
47+
super();
48+
}
49+
50+
/** The initial value for BLAKE-512. */
51+
private static final long[] initVal = {
52+
0x6A09E667F3BCC908L, 0xBB67AE8584CAA73BL,
53+
0x3C6EF372FE94F82BL, 0xA54FF53A5F1D36F1L,
54+
0x510E527FADE682D1L, 0x9B05688C2B3E6C1FL,
55+
0x1F83D9ABFB41BD6BL, 0x5BE0CD19137E2179L
56+
};
57+
58+
/** @see BLAKESmallCore */
59+
long[] getInitVal()
60+
{
61+
return initVal;
62+
}
63+
64+
/** @see Digest */
65+
public int getDigestLength()
66+
{
67+
return 64;
68+
}
69+
70+
/** @see Digest */
71+
public Digest copy()
72+
{
73+
return copyState(new BLAKE512());
74+
}
75+
}

0 commit comments

Comments
 (0)