Spaces:
Sleeping

File size: 3,501 Bytes
f6fd1d1
a0d90c4
 
 
 
f6fd1d1
a0d90c4
f6fd1d1
 
a0d90c4
 
83a9a5a
a0d90c4
 
 
 
 
 
 
 
223bac6
 
 
 
f9afae4
223bac6
8d598a4
a0d90c4
83a9a5a
 
31b9410
83a9a5a
a0d90c4
 
83a9a5a
a0d90c4
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
title: FoxDec research artifacts
emoji: 🦊
colorFrom: yellow
colorTo: gray
sdk: docker
app_port: 7860
---

# FoxDec research artifacts

Run the PLDI 2022 `simple_local_array` example, the CCS 2024 certificate workflow or the SEFM 2020 `wc` decompilation. The app runs one job at a time and displays the results in the page. PLDI has a five-minute deadline. CCS has an eight-minute deadline after completing in about four minutes on two CPUs and 16 GB of memory. The [artifact catalog](catalog.md) links to the original papers and reproduction packages.

## Run locally

```sh
docker build --platform linux/amd64 -t foxdec-space .
docker run --rm --cpus 2 --memory 16g -p 127.0.0.1:7860:7860 foxdec-space
```

Open [the local Space](http://127.0.0.1:7860), select an **Artifact**, choose an **Input**, then select **Run**. Every runnable artifact has a built-in example. The PLDI example uses the binary supplied with the tagged release and generates its analysis and diagnostics using the upstream Makefile. The tagged release records an unresolved return address and a nonzero exit for this example. The app displays the analysis and diagnostics when it reproduces that outcome.

## Analyze a new binary

PLDI, CCS and SEFM accept Linux x86-64 ELF executables and shared objects up to 16 MiB. Choose **Upload a binary**. The tools analyze the file as data without running it as a program.

The ELF entry point is used by default. Enter a hexadecimal address such as `0x401000` to choose a starting point for PLDI or to add a function entry for FoxDec. The CCS workflow accepts multiple addresses separated by spaces or commas. The CCS runner displays the last completed stage if an uploaded binary cannot be recompiled or verified.

## SEFM 2020 decompilation to C

The build downloads the paper artifact from Zenodo and checks its hash. It is distributed under CC BY 4.0 by Freek Verbeek, Pierre Olivier and Binoy Ravindran. The build compiles the artifact’s Haskell decompiler against Z3 and runs it on the artifact’s own `wc` disassembly, data dump and configuration. The generated C is then recompiled with `gcc`. The decompiler needs a hand-written configuration that lists the functions to decompile and their argument registers. The configuration is an editable text field. Choose the built-in `wc` example, write C that the Space compiles with `gcc` (the program is compiled, never run; the compiler options are editable but limited to optimization, code generation, warning and macro options), or upload an ELF binary. Binaries are disassembled with the Space’s `objdump`, and entry addresses do not apply. The `Preamble:` section must include the headers the generated C needs, such as `stdint.h` and `stdbool.h`. [SEFM 2020 artifact](https://doi.org/10.5281/zenodo.3952034)

## CCS 2024 certificate validation

The build downloads the paper artifact from Zenodo and checks its hash. It is distributed under CC BY 4.0. The archive credits Freek Verbeek for the embedded FoxDec release under CC BY-SA 4.0. The build copies only the original input, the generator and the common P-Code theory into the validation image. It generates the certificate inside a fresh job directory. [CCS 2024 artifact](https://zenodo.org/records/12721325)

```sh
docker build --platform linux/amd64 --target ccs-validation -t foxdec-ccs .
docker run --rm --cpus 2 --memory 16g foxdec-ccs 900
```

The command accepts a time limit in seconds and prints stage timings and Isabelle’s verification log.