Skip to content

Commit

Permalink
Initial work on splitting the concrete and concolic interpreters
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartenS11 committed Nov 15, 2023
1 parent 9163e0b commit f7ef7c9
Show file tree
Hide file tree
Showing 13 changed files with 1,177 additions and 308 deletions.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ if (BUILD_EMULATOR)
src/WARDuino/WARDuino.cpp
src/WARDuino/CallbackHandler.cpp
src/Primitives/emulated.cpp
src/Interpreter/instructions.cpp
src/Interpreter/interpreter.h
src/Interpreter/concolic_interpreter.cpp
src/Interpreter/concolic_interpreter.h
src/Interpreter/interpreter.cpp
src/Memory/mem.cpp
src/Utils/util.cpp
src/Utils/util_arduino.cpp
Expand Down
3 changes: 2 additions & 1 deletion examples/assemblyscript/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ set(SOURCE_FILES
../../../src/Utils/macros.cpp
../../../src/WARDuino/WARDuino.cpp
../../../src/Primitives/emulated.cpp
../../../src/Interpreter/instructions.cpp
../../../src/Interpreter/interpreter.h
../../../src/Interpreter/interpreter.cpp
../../../src/WARDuino/CallbackHandler.cpp
)

Expand Down
3 changes: 2 additions & 1 deletion examples/wat/main/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(SOURCE_FILES
../../../src/Debug/debugger.cpp
../../../src/Interpreter/instructions.cpp
../../../src/Interpreter/interpreter.h
../../../src/Interpreter/interpreter.cpp
../../../src/Memory/mem.cpp
../../../src/Primitives/idf.cpp
../../../src/Edward/proxy.cpp
Expand Down
3 changes: 2 additions & 1 deletion platforms/ESP-IDF/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
set(SOURCE_FILES
../../src/Debug/debugger.cpp
../../src/Interpreter/instructions.cpp
../../../src/Interpreter/interpreter.h
../../../src/Interpreter/interpreter.cpp
../../src/Memory/mem.cpp
../../src/Primitives/idf.cpp
../../src/Edward/proxy.cpp
Expand Down
6 changes: 3 additions & 3 deletions src/Edward/proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include <cstring>
#include <map>

#include "../Interpreter/instructions.h"
#include "../Interpreter/interpreter.h"
#include "../Utils/macros.h"
#include "../Utils/util.h"

Expand Down Expand Up @@ -39,7 +39,7 @@ void Proxy::pushRFC(Module *m, RFC *rfc) {
}

// push function to callstack
setup_call(m, rfc->fidx);
Interpreter().setup_call(m, rfc->fidx);
// push proxy guard block to stack
this->pushProxyGuard(m);

Expand Down Expand Up @@ -115,5 +115,5 @@ void Proxy::pushProxyGuard(Module *m) {
}
auto *guard = (Block *)malloc(sizeof(struct Block));
guard->block_type = 0xfe; // 0xfe proxy guard
push_block(m, guard, m->sp);
Interpreter().push_block(m, guard, m->sp);
}
Loading

0 comments on commit f7ef7c9

Please sign in to comment.