Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shaheen/klee runner for pr #32

Open
wants to merge 65 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
735bb93
Cleaned up files.
Mar 24, 2021
8c06695
Klee runner updates and stuff.
Mar 31, 2021
2e006da
Experiment varies time now.
Apr 9, 2021
583be39
Small experiment.
Apr 21, 2021
271fea1
Hopefully makes klee work.
Jun 8, 2021
0923d9d
Fixed driver generation.
Jun 10, 2021
39dfdfc
Small updates
Jun 15, 2021
b27a1df
Fixed test files.
Jun 16, 2021
c6b11fa
Fixed typo
Jun 16, 2021
6a751e9
experiment without the long one
Jun 17, 2021
4473fb0
Better experiment.
Jun 22, 2021
18a2a43
fixed one file that was hanging
Jun 23, 2021
138096b
minor change
Jun 23, 2021
b5f986a
Minor changes
Jun 29, 2021
823362a
Merge pull request #43 from hmc-alpaqa/develop
May 17, 2022
5712232
Experiment for other computer
May 24, 2022
c6fc8c8
Merge branch 'shaheen/klee_runner_for_pr' of github.com:hmc-alpaqa/me…
May 24, 2022
aee647b
Added a bunch of files, also experiment changes
Jun 3, 2022
3a336d9
Fixed a pycparser error
Jun 10, 2022
d6c24fc
Fixed python debian version
Jun 10, 2022
3b4ffb5
Experiment time!
Jun 10, 2022
3f5dc2c
More experiments
Jun 14, 2022
468bef2
Running experiment on other computer
Jun 28, 2022
4ec8f1f
Experiment again
Jul 7, 2022
ad3ec9a
Modified experiment
Jul 18, 2022
b5a1184
Fixed experiment again hopefully
Jul 19, 2022
b21c18b
Added sample stuff for running klee
Oct 25, 2022
befe798
Removed some optimizer for clang?
Nov 7, 2022
55a709c
Removed random exception lmao
Nov 7, 2022
6ee0352
Running for varying time
Nov 22, 2022
1453ca8
Timeout is now not klee timeout, also updated files to run on?
Dec 25, 2022
109ed53
Fixed depths lol
Dec 25, 2022
be7675d
IGNORE LEXTAB
Dec 25, 2022
64dcc85
????
Dec 25, 2022
e48aa44
i hate lextab
Dec 25, 2022
ce44176
removed whitespace? maybe?
Dec 25, 2022
dc7f819
gitignore again :(
Dec 25, 2022
74d0f24
i will kill lextab
Dec 25, 2022
9f3d83e
more whitespace removal
Dec 25, 2022
ade5f1e
i hate pointers
Dec 25, 2022
252205e
Fixed something? idk
Dec 27, 2022
6739540
Changed array depth
Jan 14, 2023
454b280
Added parameter to a file
Jan 20, 2023
8a161ad
klee testing summer 2023
YukiYang31 Jul 19, 2023
989f707
ready for klee testing
YukiYang31 Jul 21, 2023
407c33e
m
YukiYang31 Jul 21, 2023
da583dd
m
YukiYang31 Jul 21, 2023
298d9ee
Merge branch 'shaheen/klee_runner_for_pr' of https://github.com/hmc-a…
YukiYang31 Jul 21, 2023
a048660
one more klee function
YukiYang31 Jul 21, 2023
57f8793
m
YukiYang31 Jul 21, 2023
351cbab
Merge remote-tracking branch 'origin/shaheen/klee_runner_for_pr' into…
YukiYang31 Jul 21, 2023
dc1790a
add c-files from C algorithms repo
tomqlam Dec 1, 2023
974352d
improved script klee
tomqlam Dec 1, 2023
75a5a6e
kleerunner for paper submission updated
tomqlam Dec 2, 2023
a5b5e37
fix main func problem
tomqlam Dec 2, 2023
d74ba11
another fix for timeout exit
tomqlam Dec 2, 2023
618a350
update algorithms
tomqlam Dec 2, 2023
ba4df51
some more changes
tomqlam Dec 3, 2023
c682bce
should run now?
tomqlam Dec 3, 2023
b62b25a
save stuff
tomqlam Dec 10, 2023
07a0082
remove scanf
YukiYang31 Dec 14, 2023
59ee366
modify needed funcs
tomqlam Dec 14, 2023
facd14d
Merge remote-tracking branch 'refs/remotes/origin/shaheen/klee_runner…
tomqlam Dec 14, 2023
bcb4451
fix some weird timeout stuff
tomqlam Feb 9, 2024
e85b378
oops
tomqlam Feb 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ src/.mypy_cache/
/src/.coverage
/src/coverage.xml
/src/htmlcov/
/src/.dmypy.json
/src/.dmypy.json
/src/klee/lextab.py
37 changes: 19 additions & 18 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,38 +1,39 @@
FROM python:3.9-slim
FROM python:3.9-slim-buster
WORKDIR /app
COPY requirements.txt /app/
COPY requirements.txt /app/
COPY ./examples /app/examples/
RUN pip install --trusted-host pypi.python.org -r requirements.txt
RUN pip install --trusted-host pypi.python.org -r requirements.txt
RUN mkdir -p /usr/share/man/man1 && apt-get update && apt-get install -y build-essential wget software-properties-common openjdk-11-jdk-headless
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
RUN apt-get update

# Get KLEE dependencies (LLVM 6.0) [http://klee.github.io/build-llvm60/]
RUN apt-get install -y curl libcap-dev git unzip doxygen libsqlite3-dev libgoogle-perftools-dev libtcmalloc-minimal4 cmake libncurses5-dev
RUN pip install tabulate
RUN apt-get install -y clang-6.0 llvm-6.0 llvm-6.0-dev llvm-6.0-tools zsh vim tmux
RUN apt-get install -y g++-multilib
# Install z3
RUN git clone https://github.com/Z3Prover/z3/
RUN cd /app/z3 && git pull && git reset --hard 2d1684bc2d2621c0d6b02b81168624388648049a
RUN cd /app/z3 && python scripts/mk_make.py
RUN apt-get install -y libgmp3-dev
# Install z3
RUN git clone https://github.com/Z3Prover/z3/
RUN cd /app/z3 && git pull && git reset --hard 2d1684bc2d2621c0d6b02b81168624388648049a
RUN cd /app/z3 && python scripts/mk_make.py
RUN cd /app/z3/build && make && make install
RUN pip install z3-solver

# Install lit
RUN pip install lit

# Build uClibc and the POSIX environment model
# Build uClibc and the POSIX environment model
RUN git clone https://github.com/klee/klee-uclibc.git
RUN ln -s /usr/bin/llvm-config-6.0 /usr/bin/llvm-config
RUN alias llvm-config=llvm-config-6.0
RUN alias llvm-config=llvm-config-6.0
RUN CC=/usr/bin/clang-6.0 /app/klee-uclibc/configure --make-llvm-lib
RUN cd /app/klee-uclibc && make -j2

# Get KLEE
RUN mkdir /app/build
RUN git clone https://github.com/klee/klee.git
RUN apt-get install zlib1g-dev
RUN apt-get install -y zlib1g-dev
RUN cd /app/build && cmake -DENABLE_SOLVER_STP=OFF -DENABLE_POSIX_RUNTIME=ON -DENABLE_KLEE_UCLIBC=ON -DKLEE_UCLIBC_PATH=/app/klee-uclibc -DENABLE_UNIT_TESTS=OFF -DLLVMCC=/usr/bin/clang-6.0 -ENABLE_ZLIB=OFF -DLLVMCXX=/usr/bin/clang++-6.0 /app/klee
RUN cd /app/build && make

Expand All @@ -45,29 +46,29 @@ RUN pip install wllvm
RUN curl -OL https://github.com/google/googletest/archive/release-1.7.0.zip
RUN unzip /app/release-1.7.0.zip

# C Parser written in python
# C Parser written in python
RUN pip install pycparser
RUN git clone https://github.com/eliben/pycparser

ENV PATH "$PATH:/app/build/bin/"

# AFL (Dependency for Kelinci)
# AFL (Dependency for Kelinci)
RUN git clone https://github.com/google/AFL

# Kelinci: https://github.com/isstac/kelinci
RUN git clone https://github.com/isstac/kelinci

# JQF + Zest
# JQF + Zest
RUN git clone https://github.com/rohanpadhye/jqf

# JPF (Symbolic Java Path Finder): https://github.com/SymbolicPathFinder/jpf-symbc
# Refer to https://github.com/SymbolicPathFinder/jpf-symbc/wiki/Documentation
# JPF (Symbolic Java Path Finder): https://github.com/SymbolicPathFinder/jpf-symbc
# Refer to https://github.com/SymbolicPathFinder/jpf-symbc/wiki/Documentation
RUN git clone https://github.com/javapathfinder/jpf-core
RUN git clone https://github.com/SymbolicPathFinder/jpf-symbc
RUN mkdir jpf && mv jpf-core jpf && mv jpf-symbc jpf
RUN mkdir jpf && mv jpf-core jpf && mv jpf-symbc jpf
COPY site.properties /app/jpf/

# PRISM: https://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions#binaries
# PRISM: https://www.prismmodelchecker.org/manual/InstallingPRISM/Instructions#binaries
COPY /dependencies/prism-4.5-linux64.tar.gz /app/
RUN gunzip prism-4.5-linux64.tar.gz && tar xf prism-4.5-linux64.tar && cd prism-4.5-linux64 && ./install.sh

Expand Down
1 change: 0 additions & 1 deletion examples
Submodule examples deleted from 5cb16c
3 changes: 3 additions & 0 deletions src/experiments/function_calls/data/apc_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
,graph_name,apc,apc_time
0,partition_cfg._Z4swapPiS_,"(1.00000000000000, 1.00000000000000)",0.022338151931762695
1,partition_cfg._Z9partitionPiii,"('1.1673**n', '1.1477*1.1673**n')",0.3525121212005615
3 changes: 3 additions & 0 deletions src/experiments/function_calls/data/fcapc_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
,graph_name,fcapc,fcapc_time
0,partition_cfg._Z4swapPiS_,"(1, 1)",0.13048791885375977
1,partition_cfg._Z9partitionPiii,"(0.723606797748011*1.12783848556**n, 0.886651779312**n*(0.167526046921159 - 0.042537371471034*I) + 0.886651779312**n*(0.167526046921159 + 0.042537371471034*I) + 0.886651779312**n*(-0.0293294458752485 - 0.0661060769196468*I) + 0.886651779312**n*(-0.0293294458752485 + 0.0661060769196468*I) - 0.999999999956541*1.0**n + 0.82202443150234*1.12783848556**n + 1.12783848556**n*(-0.0492088168771647 - 0.0436310850432438*I) + 1.12783848556**n*(-0.0492088168771647 + 0.0436310850432438*I))",1.160919189453125
3 changes: 3 additions & 0 deletions src/experiments/function_calls/data/final_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
,graph_name,apc,rapc,fcapc,getrgfapc,apc_time,rapc_time,fcapc_time,getrgfapc_time,longest for getrgf,longest time,case,gamma
0,partition_cfg._Z4swapPiS_,"(1.00000000000000, 1.00000000000000)",na,"(1, 1)",1.0**(n + 1),0.022338151931762692,na,0.13048791885375974,0.1591334342956543,gammaTime,0.107,1.0,-T0 + x**3
1,partition_cfg._Z9partitionPiii,"('1.1673**n', '1.1477*1.1673**n')",na,"(0.723606797748011*1.12783848556**n, 0.886651779312**n*(0.167526046921159 - 0.042537371471034*I) + 0.886651779312**n*(0.167526046921159 + 0.042537371471034*I) + 0.886651779312**n*(-0.0293294458752485 - 0.0661060769196468*I) + 0.886651779312**n*(-0.0293294458752485 + 0.0661060769196468*I) - 0.999999999956541*1.0**n + 0.82202443150234*1.12783848556**n + 1.12783848556**n*(-0.0492088168771647 - 0.0436310850432438*I) + 1.12783848556**n*(-0.0492088168771647 + 0.0436310850432438*I))",0.723606797749937*1.12783848556168**n,0.3525121212005615,na,1.160919189453125,0.42708683013916016,gammaTime,0.203,1.0,-(T0*(x**8 + x**4 - 1) + x**6)/(x**8 + x**4 - 1)
3 changes: 3 additions & 0 deletions src/experiments/function_calls/data/getrgfapc_data.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
,graph_name,getrgfapc,getrgfapc_time,longest for getrgf,longest time,case,gamma
0,partition_cfg._Z4swapPiS_,1.0**(n + 1),0.1591334342956543,gammaTime,0.107,1.0,-T0 + x**3
1,partition_cfg._Z9partitionPiii,0.723606797749937*1.12783848556168**n,0.42708683013916016,gammaTime,0.203,1.0,-(T0*(x**8 + x**4 - 1) + x**6)/(x**8 + x**4 - 1)
Loading