Skip to content

Conversation

@Sameersawant77
Copy link

Fixes #138

Added Dockerfile for Consistent and Streamlined setup to resolve OS and dependencies issues.

Copy link

@sohah sohah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Sameersawant77 for your contribution. This is looking good to me. I have add a small comment on the script. But, also, can you also add a section to the readme about how to use the docker image?
Finally, I have tried it on Ubuntu machine, which machines have you tried it on? mac? windows?

Dockerfile Outdated
Comment on lines 28 to 30
RUN echo 'alias jpf-build="cd /app/jpf-core && ./gradlew build -x test && cd /app/jpf-symbc && ./gradlew build -x test"' >> /root/.bashrc
RUN echo 'alias jpf-run="java -Xmx1024m -ea -Djava.library.path=/app/jpf-symbc/lib -jar /app/jpf-core/build/RunJPF.jar"' >> /root/.bashrc
RUN echo 'alias jpf-sv="bash /app/jpf-symbc/bin/jpf-sv-comp.sh"' >> /root/.bashrc
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change the alias names to have the prefix "spf" instead of "jpf"

Dockerfile Outdated
RUN echo 'alias jpf-run="java -Xmx1024m -ea -Djava.library.path=/app/jpf-symbc/lib -jar /app/jpf-core/build/RunJPF.jar"' >> /root/.bashrc
RUN echo 'alias jpf-sv="bash /app/jpf-symbc/bin/jpf-sv-comp.sh"' >> /root/.bashrc

RUN chmod +x /app/jpf-symbc/bin/jpf-sv-comp.sh && \
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a comment about usage of dos2unix here

@Sameersawant77
Copy link
Author

Thank you for the review @sohah. I made the changes as commented. I also updated the Readme.md file for steps to build with Docker. As for your question about machine, I am testing it using a Macbook, although it should ideally work perfectly with Windows too

@Sameersawant77
Copy link
Author

Just now, added few commits. Making the docker file minimalistic and building inside the docker interactive mode. As i was having build issues using the build alias because SPF requires sequential build i.e First building jpf-core and then building jpf-symbc.

Attaching my build steps for reference:

sameersawant@Sameers-MacBook-Air jpf-symbc % docker build -t spf-dev .
[+] Building 3.1s (11/11) FINISHED                                                                                                                                                        docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                      0.0s
 => => transferring dockerfile: 942B                                                                                                                                                                      0.0s
 => [internal] load metadata for docker.io/library/eclipse-temurin:8-jdk-focal                                                                                                                            2.4s
 => [auth] library/eclipse-temurin:pull token for registry-1.docker.io                                                                                                                                    0.0s
 => [internal] load .dockerignore                                                                                                                                                                         0.0s
 => => transferring context: 2B                                                                                                                                                                           0.0s
 => [1/6] FROM docker.io/library/eclipse-temurin:8-jdk-focal@sha256:24dd0ef75eadf6107a0620471ce106d5df9716a2d4d54f2ac0f7cc16b144d823                                                                      0.0s
 => => resolve docker.io/library/eclipse-temurin:8-jdk-focal@sha256:24dd0ef75eadf6107a0620471ce106d5df9716a2d4d54f2ac0f7cc16b144d823                                                                      0.0s
 => CACHED [2/6] RUN apt-get update && apt-get install -y     git unzip wget bash dos2unix     && rm -rf /var/lib/apt/lists/*                                                                             0.0s
 => CACHED [3/6] WORKDIR /workspace                                                                                                                                                                       0.0s
 => CACHED [4/6] RUN wget -q https://services.gradle.org/distributions/gradle-6.9-bin.zip &&     unzip -q gradle-6.9-bin.zip -d /opt &&     rm gradle-6.9-bin.zip                                         0.0s
 => CACHED [5/6] RUN mkdir -p /root/.jpf &&     echo "jpf-core = /workspace/jpf-core" > /root/.jpf/site.properties &&     echo "jpf-symbc = /workspace/jpf-symbc" >> /root/.jpf/site.properties &&     e  0.0s
 => CACHED [6/6] RUN echo 'alias spf-run="java -Xmx1024m -ea -Djava.library.path=/workspace/jpf-symbc/lib -jar /workspace/jpf-core/build/RunJPF.jar"' >> /root/.bashrc                                    0.0s
 => exporting to image                                                                                                                                                                                    0.7s
 => => exporting layers                                                                                                                                                                                   0.0s
 => => exporting manifest sha256:650caa9ea658cf17a126adb090774c9278197519a484e4cd1a8574e14f2ba2dc                                                                                                         0.0s
 => => exporting config sha256:a90935d3c09ee87622fe75fc644c67418f49cf4c62e723b0ffe09d3d0f51d482                                                                                                           0.0s
 => => exporting attestation manifest sha256:b03e09b11ae2c9a72fa53ea302cbf0f2fbda0c8c2f083c87a30a6f93d746cbc7                                                                                             0.0s
 => => exporting manifest list sha256:d65987e24cb94e5449bad046f1ddf3fad8e94bb4dae079a34d9b070e2d12a59f                                                                                                    0.0s
 => => naming to docker.io/library/spf-dev:latest                                                                                                                                                         0.0s
 => => unpacking to docker.io/library/spf-dev:latest                                                                                                                                                      0.7s
sameersawant@Sameers-MacBook-Air jpf-symbc % docker run -it --name spf-active -v "$PWD:/workspace" spf-dev
root@7d841ba117f5:/workspace# ./gradlew :jpf-core:buildJars
Downloading https://services.gradle.org/distributions/gradle-6.9-bin.zip
..........10%..........20%..........30%...........40%..........50%..........60%...........70%..........80%..........90%...........100%

Welcome to Gradle 6.9!

Here are the highlights of this release:
 - This is a small backport release.
 - Java 16 can be used to compile when used with Java toolchains
 - Dynamic versions can be used within plugin declarations
 - Native support for Apple Silicon processors

For more details see https://docs.gradle.org/6.9/release-notes.html

Starting a Gradle Daemon (subsequent builds will be faster)
jpf-core
jpf-symbc

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 23s
16 actionable tasks: 2 executed, 14 up-to-date
root@7d841ba117f5:/workspace# ./gradlew :jpf-symbc:buildJars
jpf-core
jpf-symbc

> Task :jpf-symbc:compileJava
POM relocation to an other version number is not fully supported in Gradle : xml-apis:xml-apis:2.0.2 relocated to xml-apis:xml-apis:1.0.b2.
Please update your dependency to directly use the correct version 'xml-apis:xml-apis:1.0.b2'.
Resolution will only pick dependencies of the relocated element.  Artifacts and other metadata will be ignored.

> Task :jpf-symbc:compileJava UP-TO-DATE

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.9/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 5s
13 actionable tasks: 5 executed, 8 up-to-date
root@7d841ba117f5:/workspace# 

@Sameersawant77
Copy link
Author

Also i got caught up with solving the docker build issues today, I will look into cast1.yml issue as suggested by you

@sohah
Copy link

sohah commented Jan 7, 2026

@Sameersawant77 , thank you for contribution. This looks better for development.

@yannicnoller , can we please have this PR accepted? Thank you!

@yannicnoller yannicnoller merged commit 090eba7 into SymbolicPathFinder:sv-comp Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants