Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
apease committed Jan 19, 2025
2 parents abf9830 + aacb545 commit a77ce07
Show file tree
Hide file tree
Showing 25 changed files with 640 additions and 511 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ant.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ jobs:
sed -i "s|/home/theuser/workspace/sumo|$ONTOLOGYPORTAL_GIT/sumo|g" $SIGMA_HOME/KBs/config.xml
sed -i "s|/home/theuser/E/bin/e_ltb_runner|/usr/local/bin/e_ltb_runner|g" $SIGMA_HOME/KBs/config.xml
- name: Set up JDK 11 for x64
- name: Set up JDK 21 for x64
uses: actions/setup-java@v4
with:
java-version: '11'
java-version: '21'
distribution: 'temurin'

- name: Build with Ant
Expand Down
4 changes: 2 additions & 2 deletions INSTALL.MacOS
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ these variables created before the next step, and replace

Next, execute step-by-step the commands below (tested on MacOS 10.14.5 to Sonoma 14.5):

You will need at least Java 11+ (avoid JDK 17) to compile SigmaKEE and to run
You will need at least Java 21+ (avoid JDK 17) to compile SigmaKEE and to run
Apache Tomcat.

! For ARM processors download it from here: https://jdk.java.net/archive/
Expand All @@ -66,7 +66,7 @@ Apache Tomcat.
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-23.jdk/Contents/Home
export PATH=$JAVA_HOME/bin:$PATH

Install (ensure the above preparation have been performed)
Install (ensure the above preparations have been performed)
> ant install

*** Legacy install steps now taken care of by the above command "ant install"
Expand Down
24 changes: 22 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,17 @@ echo "export HISTSIZE=10000 HISTFILESIZE=100000" >> .bashrc
echo "export JAVA_HOME=/home/theuser/Programs/jdk-23" >> .bashrc
```

mandtory additions to .bashrc
```sh
echo "export SIGMA_HOME=~/.sigmakee" >> .bashrc
echo "export ONTOLOGYPORTAL_GIT=~/workspace" >> .bashrc
echo "export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/sigmakee" >> .bashrc
echo "export CATALINA_OPTS=\"$CATALINA_OPTS -Xmx10g -Xss1m\"" >> .bashrc
echo "export CATALINA_HOME=~/Programs/apache-tomcat-9.0.97" >> .bashrc
echo "export PATH=$CATALINA_HOME/bin:$PATH" >> .bashrc
echo "export SIGMA_CP=$SIGMA_SRC/build/sigmakee.jar:$SIGMA_SRC/lib/*" >> .bashrc
```

load the definitions into your environment
```sh
source .bashrc
Expand Down Expand Up @@ -303,9 +314,18 @@ PS1=Vagrant:$PS1
First, comply with System preparation on Linux above
Clone SigmaKEE
Clone SigmaKEE. First, ensure the below exports are contained in your ~/.bashrc.
If not, then perform the exports before cloning SigmaKEE.
```sh
cd ~
echo "export SIGMA_HOME=~/.sigmakee" >> .bashrc
echo "export ONTOLOGYPORTAL_GIT=~/workspace" >> .bashrc
echo "export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/sigmakee" >> .bashrc
echo "export CATALINA_OPTS=\"$CATALINA_OPTS -Xmx10g -Xss1m\"" >> .bashrc
echo "export CATALINA_HOME=~/Programs/apache-tomcat-9.0.97" >> .bashrc
echo "export PATH=$CATALINA_HOME/bin:$PATH" >> .bashrc
echo "export SIGMA_CP=$SIGMA_SRC/build/sigmakee.jar:$SIGMA_SRC/lib/*" >> .bashrc
source .bashrc
mkdir workspace
cd workspace
git clone https://github.com/ontologyportal/sigmakee
Expand Down Expand Up @@ -458,7 +478,7 @@ See INSTALL.MacOS
Open up CMD prompt
```
wsl –install
wsl –-install
.bashrc already existed in home directory. Did not update path.
echo "alias dir='ls --color=auto --format=vertical -la'" >> .bashrc
Manually changed with "nano .bashrc" HISTSIZE=10000 and HISTFILESIZE=100000
Expand Down
66 changes: 49 additions & 17 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<property name="tomcat.version" value="9.0.97"/>

<!-- Define the sigma user spaces -->
<property name="workspace.dir" value="${git.home}/workspace"/>
<property name="workspace.dir" value="${user.home}/workspace"/>
<property name="programs.dir" value="${user.home}/Programs"/>

<condition property="isUnixNotMac">
Expand All @@ -140,10 +140,19 @@
</path>

<target name="init" depends="init-ivy">
<available property="jdk11+" classname="java.net.http.HttpClient"/>
<fail message="Unsupported JDK version: ${ant.java.version}. Please use JDK version 11 or greater, but avoid JDK 17."
unless="jdk11+">
<condition property="jdk21+">
<javaversion atleast="21"/>
</condition>
<fail message="Unsupported JDK version: ${ant.java.version}. Please use a Java Development Kit (JDK) version 21 or greater."
unless="jdk21+">
</fail>
<condition property="nojdk">
<contains string="${java.home}" substring="jdk"/>
</condition>
<fail message="Please install a Java Development Kit (JDK) version 21 or greater."
unless="nojdk">
</fail>

<echo message="Welcome to the ${product.Name} v${product.Version}"/>
<echo message="Specification Vendor: ${spec.vendor}"/>
<echo message=""/>
Expand All @@ -156,6 +165,7 @@
<echo message="classpath: ${env.SIGMA_CP}"/>
<echo message="Java Version via Ant: ${ant.java.version}"/>
<echo message="Java Version System Prop: ${java.version}"/>
<echo message="JDK HOME: is set to: ${java.home}"/>

<tstamp>
<format property="TODAY_US" pattern="EEE, d MMM yyyy HHmm Z" locale="en,US"/>
Expand Down Expand Up @@ -359,9 +369,15 @@
<!-- At this point we will assume you have already complied with the
README.md under the heading "System preparation on Linux." This task
will take over from the heading "Linux Installation." -->
<target name="install" depends="init" description="Installs WordNetMappings and SUMO to ${sigma.home}/KBs">
<target name="install" depends="init" description="Appends .*hrc files, clones Sigma tools, installs WordNetMappings and SUMO to ${sigma.home}/KBs and builds the E and Vampire Theorem provers">
<mkdir dir="${workspace.dir}"/>
<chmod dir="${workspace.dir}" perm="777" includeemptydirs="true">
<include name="**/*"/>
</chmod>
<mkdir dir="${programs.dir}"/>
<chmod dir="${programs.dir}" perm="777" includeemptydirs="true">
<include name="**/*"/>
</chmod>

<!-- Install Tomcat -->
<antcall target="install.tomcat"/>
Expand All @@ -370,7 +386,7 @@
<antcall target="retrieve.wordnet"/>

<!-- Retrieve E prover -->
<antcall tareget="retrieve.E"/>
<antcall target="retrieve.E"/>

<!-- Clone the sigma tools -->
<antcall target="clone.sumo"/>
Expand All @@ -388,10 +404,6 @@
<antcall target="clone.z3"/>
<antcall target="build.z3"/>
<antcall target="build.vampire"/>

<!-- Configure ~/.bashrc ~/.zshrc -->
<antcall target="append.bashrc"/>
<antcall target="append.zshrc"/>
</target>

<target name="retrieve.wordnet">
Expand All @@ -408,6 +420,9 @@

<target name="copy.to.sigma.home">
<mkdir dir="${user.home}/.${app.name}"/>
<chmod dir="${user.home}/.${app.name}" perm="777" includeemptydirs="true">
<include name="**/*"/>
</chmod>
<mkdir dir="${user.home}/.${app.name}/KBs"/>
<copy todir="${user.home}/.${app.name}/KBs">
<fileset dir="${kbs.home}"/>
Expand All @@ -422,7 +437,8 @@
</target>

<target name="clone.sumo">
<git command="clone">
<mkdir dir="${workspace.dir}/sumo"/>
<git command="clone" dir="${workspace.dir}/sumo">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
Expand All @@ -432,7 +448,8 @@
</git>
</target>
<target name="clone.tptpantlr">
<git command="clone">
<mkdir dir="${workspace.dir}/TPTP-ANTLR"/>
<git command="clone" dir="${workspace.dir}/TPTP-ANTLR">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
Expand All @@ -442,7 +459,8 @@
</git>
</target>
<target name="clone.sigmautils">
<git command="clone">
<mkdir dir="${workspace.dir}/SigmaUtils"/>
<git command="clone" dir="${workspace.dir}/SigmaUtils">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
Expand Down Expand Up @@ -470,6 +488,14 @@
</args>
</git>
</target>
<target name="update.sigmakee">
<git command="pull" dir="${user.dir}">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
</args>
</git>
</target>

<!-- git macro utils setup from: https://tonyyan.wordpress.com/2017/03/10/integrate-git-into-ant-targets/-->
<macrodef name="git">
Expand Down Expand Up @@ -529,30 +555,36 @@
</exec>
</target>

<!-- If Vampire fails to build on Hamming, here is a alternate source of the binary -->
<target name="alternate.vampire">
<get src="https://github.com/vprover/vampire/releases/download/v4.9casc2024/vampire" dest="${programs.dir}/vampire/build" tryGzipEncoding="true"/>
<chmod dir="${programs.dir}/${programs.dir}/vampire/build" perm="ugo+rx" includes="vampire"/>
</target>

<target name="append.bashrc" if="isUnixNotMac">
<echo file="${user.home}/.bashrc" append="true">

# For SIGMA
export SIGMA_HOME=${user.home}/.${app.name}
export ONTOLOGYPORTAL_GIT=${workspace.dir}
export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/${app.name}
export CATALINA_OPTS="$CATALINA_OPTS ${run.jvmargs}"
export CATALINA_HOME=${programs.dir}/apache-tomcat-${tomcat.version}
export PATH=$CATALINA_HOME/bin:$PATH
export SIGMA_CP=$SIGMA_SRC/build/${app.name}.jar:$SIGMA_SRC/lib/*</echo>
export SIGMA_CP=$SIGMA_SRC/build/${app.name}.jar:$SIGMA_SRC/lib/*
</echo>
</target>

<target name="append.zshrc" unless="isUnixNotMac">
<echo file="${user.home}/.zshrc" append="true">

# For SIGMA
export SIGMA_HOME=${user.home}/.${app.name}
export ONTOLOGYPORTAL_GIT=${workspace.dir}
export SIGMA_SRC=$ONTOLOGYPORTAL_GIT/${app.name}
export CATALINA_OPTS="$CATALINA_OPTS ${run.jvmargs}"
export CATALINA_HOME=${programs.dir}/apache-tomcat-${tomcat.version}
export PATH=$CATALINA_HOME/bin:$PATH
export SIGMA_CP=$SIGMA_SRC/build/${app.name}.jar:$SIGMA_SRC/lib/*</echo>
export SIGMA_CP=$SIGMA_SRC/build/${app.name}.jar:$SIGMA_SRC/lib/*
</echo>
</target>

<target name="api_doc" depends="init" description="Build the JavaDocs and place in ${dist.javadoc.dir}.">
Expand Down
2 changes: 1 addition & 1 deletion config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<preference name="sumokbname" value="SUMO" />
<preference name="systemsDir" value="/home/theuser" />
<preference name="termFormats" value="no" />
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.96/webapps/sigma/tests" />
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
<preference name="TPTPDisplay" value="no" />
<preference name="tptpHomeDir" value="/home/theuser" />
<preference name="TPTP" value="yes" />
Expand Down
43 changes: 23 additions & 20 deletions docker/sigma-ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
FROM tomcat:9.0.96-jdk11-temurin-jammy AS builder
FROM tomcat:9.0.97-jdk21-temurin-jammy AS builder

# Followed instructions from: https://github.com/vprover/vampire/wiki/Source-Build-for-Users
# for buildling latest vampire w/ latest Z3
# for buildling latest vampire w/ latest z3

RUN apt update; \
apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
python3 \
; \
;\
wget 'http://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_2.6/E.tgz' &&\
tar xf E.tgz ; \
cd E ; \
tar xf E.tgz ;\
cd E ;\
./configure && make ;\
cd .. ;\
wget 'https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz' ; \
tar xf WordNet-3.0.tar.gz ; \
git clone https://github.com/vprover/vampire ; \
cd vampire ; \
git submodule update --init ; \
mkdir build ; \
mkdir z3/build && cd z3/build ; \
cmake .. -DZ3_SINGLE_THREADED=1 -DCMAKE_BUILD_TYPE=Release ; \
make -j`nproc` ; \
cd ../../build ; \
cmake .. ; \
make -j`nproc` ; \
cd .. ; \
cp build/vampire vampire ; \
wget 'https://wordnetcode.princeton.edu/3.0/WordNet-3.0.tar.gz' ;\
tar xf WordNet-3.0.tar.gz ;\
git clone https://github.com/vprover/vampire ;\
cd vampire ;\
git submodule update --init ;\
mkdir build ;\
mkdir z3/build && cd z3/build ;\
cmake .. -DZ3_SINGLE_THREADED=1 -DCMAKE_BUILD_TYPE=Release ;\
make -j`nproc` ;\
cd ../../build ;\
cmake .. ;\
make -j`nproc` ;\
cd .. ;\
cp build/vampire vampire ;\
./checks/sanity vampire

#################################################
# runtime image.
FROM tomcat:9.0.96-jdk11-temurin-jammy AS runtime
FROM tomcat:9.0.97-jdk21-temurin-jammy AS runtime

COPY --from=builder \
/usr/local/tomcat/E/PROVER/e_ltb_runner /usr/local/bin/e_ltb_runner
Expand All @@ -44,6 +44,9 @@ COPY --from=builder \
COPY --from=builder \
/usr/local/tomcat/vampire/vampire /usr/local/bin/vampire

COPY --from=builder \
/usr/local/tomcat/vampire/z3/build/libz3.* /usr/local/bin/

RUN apt update; \
apt-get install -y --no-install-recommends \
ant \
Expand Down
5 changes: 4 additions & 1 deletion docker/sigmakee/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM $IMAGE_ACCOUNT/sigma-ci:latest AS builder

#################################################
# runtime image.
FROM tomcat:9.0.96-jdk11-temurin-jammy AS runtime
FROM tomcat:9.0.97-jdk21-temurin-jammy AS runtime

RUN apt update; \
apt-get install -y --no-install-recommends \
Expand All @@ -18,6 +18,9 @@ COPY --from=builder \
COPY --from=builder \
/usr/local/bin/vampire /usr/local/bin/vampire

COPY --from=builder \
/usr/local/bin/libz3.* /usr/local/bin/

COPY ./sigmakee-runtime /root/sigmakee-runtime/

COPY ./sigmakee/build/WEB-INF/lib/*.jar /root/sigmakee/
Expand Down
2 changes: 1 addition & 1 deletion docker/sigmakee2023/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ RUN cd /root \
&& echo "export SIGMA_SRC=/root/workspace/sigmakee" >> .bashrc \
&& echo "export ONTOLOGYPORTAL_GIT=/root/workspace" >> .bashrc \
&& echo 'export CATALINA_OPTS="$CATALINA_OPTS -Xmx10g -Xss1m"' >> .bashrc \
&& echo "export CATALINA_HOME=/root/Programs/apache-tomcat-9.0.96" >> .bashrc \
&& echo "export CATALINA_HOME=/root/Programs/apache-tomcat-9.0.97" >> .bashrc \
&& source .bashrc

# Setup Vampire
Expand Down
5 changes: 4 additions & 1 deletion docker/sumo-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM $IMAGE_ACCOUNT/sigma-ci:latest AS builder

#################################################
# runtime image.
FROM tomcat:9.0.96-jdk11-temurin-jammy AS runtime
FROM tomcat:9.0.97-jdk21-temurin-jammy AS runtime

RUN apt update; \
apt-get install -y --no-install-recommends \
Expand All @@ -18,6 +18,9 @@ COPY --from=builder \
COPY --from=builder \
/usr/local/bin/vampire /usr/local/bin/vampire

COPY --from=builder \
/usr/local/bin/libz3.* /usr/local/bin/

COPY ./sigmakee-runtime /root/sigmakee-runtime/

COPY ./sigmakee/build/WEB-INF/lib/*.jar /root/sigmakee/
Expand Down
1 change: 1 addition & 0 deletions nbproject/ide-targets.xml
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,7 @@
<fileset dir="${sigma_home}/KBs">
<include name="*.tptp"/>
<include name="*.ser"/>
<include name="vamp-out.txt"/>
</fileset>
<fileset dir="${sigma_home}/KBs/WordNetMappings">
<include name="*.ser"/>
Expand Down
2 changes: 1 addition & 1 deletion nbproject/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ auxiliary.show.customizer.message=<message>
</ide-actions>
<export>
<type>folder</type>
<location>build/test/classes</location>
<location>build/WEB-INF/classes</location>
<script>${ant.script}</script>
<build-target>dist</build-target>
</export>
Expand Down
Loading

0 comments on commit a77ce07

Please sign in to comment.