specs-feup / coral

1 stars 0 forks source link

Docs: Installation procedure #2

Open vian21 opened 1 week ago

vian21 commented 1 week ago

Hey, I stumbled upon this paper over the summer and became really interested in this project. Could you provide some documentation on how to install Coral locally (deps included: clava-flow is not on npm) and how one could use it to check some C code?

Thank you.

I believe this research has great potential. No need to invent a new language when you can just sanitize already battle tested code.

Goncalerta commented 1 week ago

Hello!

Thanks a lot for your interest. Right now, coral is still in a very early phase, and is not suitable for production scenarios. In the future, as we develop the tool, we will ease the instalation process and document all instructions.

If, however, you just want to experiment the tool as presented in the paper, here are the instructions for the latest version, corresponding to my Msc thesis, published in july 2024.

First, check if you have these pre-requisites installed:

Create a new folder with the file package.json:

{
  "name": "coraljs",
  "type": "module",
  "workspaces": [
    "clava/Clava-JS",
    "lara-framework/Lara-JS",
    "coral",
    "clava-flow"
  ]
}

Then run in that same folder:

git clone https://github.com/specs-feup/coral.git
cd coral
git checkout 202171be79a369be0eee6961e1952ce7ab4121b6
cd ..
git clone https://github.com/specs-feup/specs-java-libs
git clone https://github.com/specs-feup/lara-framework.git
cd lara-framework
git checkout 768af2dd4eb471a0ab7cc5b75be0bc33faa05330
cd ..
git clone https://github.com/specs-feup/clava.git
cd clava
git checkout f188b7d924b97bc0668e029e9af70cd942b61a80
cd ..
git clone https://github.com/specs-feup/clava-flow.git
cd clava-flow
git checkout a504de47349e525c778ccb34c14836a0cb9af7ae
cd ..
npm i
npm run build -w lara-framework/Lara-JS 
npm run build -w clava/Clava-JS
npm run build -w clava-flow
npm run build -w coral
npm i
cd clava/ClavaWeaver
gradle installDist
cd ../..

Finally, copy the folder ./clava/ClavaWeaver/build/install/ClavaWeaver into a new folder called java-binaries in ./clava/Clava-JS:

mkdir clava/Clava-JS/java-binaries
cp -r ./clava/ClavaWeaver/build/install/ClavaWeaver ./clava/Clava-JS/java-binaries

Now, to run the unit tests from the CORAL Benchmark:

npm run test -w coral

And to run on any files that you want, put those files inside the folder ./coral/in/sandbox and run:

npm run sandbox -w coral

Note that several features are missing at this moment: do not use on files that deal with arrays or heap memory.

If you have any difficulty following these steps or any other question, please let me know! :)