Skip to content

Commit f428e5f

Browse files
authored
Merge pull request #166 from terry-norbraten/master
Correct paths in unit test configs
2 parents 71cb7f6 + 80796de commit f428e5f

File tree

11 files changed

+97
-46
lines changed

11 files changed

+97
-46
lines changed

.github/workflows/ant.yml

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
working-directory: ${{ github.workspace }}
141141
run: |
142142
find $SIGMA_HOME/KBs -name '*.ser' -delete
143+
find $SIGMA_HOME/KBs -name '*.tff' -delete
143144
rm -rf $SIGMA_HOME/KBs/tests
144145
145146
- name: Upload sigmakee jars

.github/workflows/docker-publish.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ env:
2020

2121
jobs:
2222
build:
23-
# Previous runner due to seg. faults (2/25) when building Vampire
23+
# Previous runner due to seg. faults (1/29/25) when building Vampire
24+
# Now know to match ubuntu-latest version with builder name, i.e. noble
2425
# runs-on: ubuntu-22.04
2526
runs-on: ubuntu-latest
2627
steps:

docker/sigma-ci/Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ RUN apt-get update && apt-get install -y --install-recommends \
2222
python3 ;\
2323
wget $E_PROVER && tar xf E.tgz ;\
2424
cd E ;\
25-
./configure && make -j2 ;\
25+
./configure && make -j`nproc` ;\
2626
cd .. ;\
2727
wget $WORD_NET && tar xf WordNet-3.0.tar.gz ;\
2828
git clone $VAMPIRE_GIT ;\
@@ -89,7 +89,7 @@ COPY --from=builder \
8989

9090
#COPY --from=builder \
9191
# /usr/local/tomcat/vampire-4.9casc2024/vampire /usr/local/bin/vampire
92-
#
92+
9393
#COPY --from=builder \
9494
# /usr/local/tomcat/vampire-4.9casc2024/z3/build/libz3.* /usr/local/bin/
9595

removeMath.sh

+34-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,37 @@
11
#!/bin/bash -e
22

3+
UNAME=$(command -v uname)
4+
file=$1
5+
6+
function nix {
7+
sed -i 's/.*$to_real.*//g' $file
8+
sed -i 's/.*$remainder_t.*//g' $file
9+
sed -i 's/.*$quotient_e.*//g' $file
10+
}
11+
312
# Prepending the string expression with an empty string: '' lets it work on
4-
# macOS as well as other *nix O/S's
5-
sed -i '' 's/.*$to_real.*//g' $1
6-
sed -i '' 's/.*$remainder_t.*//g' $1
7-
sed -i '' 's/.*$quotient_e.*//g' $1
13+
# macOS by mitigating unknown label errors
14+
function mac {
15+
sed -i '' 's/.*$to_real.*//g' $file
16+
sed -i '' 's/.*$remainder_t.*//g' $file
17+
sed -i '' 's/.*$quotient_e.*//g' $file
18+
}
19+
20+
case $( "${UNAME}" | tr '[:upper:]' '[:lower:]') in
21+
linux*)
22+
nix
23+
;;
24+
darwin*)
25+
mac
26+
;;
27+
msys*|cygwin*|mingw*)
28+
# or possible 'bash on windows'
29+
nix
30+
;;
31+
nt|win*)
32+
nix
33+
;;
34+
*)
35+
printf 'unsupported o/s\n'
36+
;;
37+
esac

src/java/com/articulate/sigma/trans/TPTP3ProofProcessor.java

+10-9
Original file line numberDiff line numberDiff line change
@@ -1143,20 +1143,21 @@ private List<String> createProofDotGraphBody() {
11431143
*/
11441144
private void createProofDotGraphImage(String filename) throws IOException {
11451145

1146+
String graphVizDir = KBmanager.getMgr().getPref("graphVizDir");
1147+
String imageExt = "svg";
1148+
File file = new File(filename + ".dot." + imageExt);
1149+
1150+
List<String> cmd = new ArrayList<>();
1151+
cmd.add(graphVizDir + File.separator + "dot");
1152+
cmd.add("-T" + imageExt);
1153+
cmd.add("-Kosage");
1154+
cmd.add("-O");
1155+
cmd.add(filename + ".dot");
11461156
try {
1147-
String graphVizDir = KBmanager.getMgr().getPref("graphVizDir");
1148-
1149-
List<String> cmd = new ArrayList<>();
1150-
cmd.add(graphVizDir + File.separator + "dot");
1151-
cmd.add("-Tsvg");
1152-
cmd.add("-Kosage");
1153-
cmd.add("-O");
1154-
cmd.add(filename + ".dot");
11551157

11561158
// Build a ${graph}.png from an input file
11571159
// From: https://graphviz.org/doc/info/command.html#-O
11581160
ProcessBuilder pb = new ProcessBuilder(cmd);
1159-
File file = new File(filename + ".dot.png");
11601161
System.out.println("TPTP3ProofProcessor.createProofDotGraphImage(): exec command: " + pb.command());
11611162
pb.directory(file.getParentFile());
11621163
File log = new File(file.getParentFile(),"log");

test/integration/java/resources/config_all.xml

+15-6
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,58 @@
2525
<preference name="sumokbname" value="SUMO" />
2626
<preference name="systemsDir" value="/home/theuser" />
2727
<preference name="termFormats" value="no" />
28-
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.96/webapps/sigma/tests" />
28+
<preference name="testOutputDir" value="/usr/local/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
2929
<preference name="TPTPDisplay" value="no" />
3030
<preference name="tptpHomeDir" value="/home/theuser" />
3131
<preference name="TPTP" value="yes" />
3232
<preference name="typePrefix" value="yes" />
3333
<preference name="userBrowserLimit" value="25" />
34-
<preference name="vampire" value="/home/theuser/workspace/vampire/vampire" />
34+
<preference name="vampire" value="/home/theuser/Programs/vampire/build/vampire" />
3535
<kb name="SUMO" >
3636
<constituent filename="english_format.kif" />
3737
<constituent filename="domainEnglishFormat.kif" />
38-
<constituent filename="Merge.kif" />
39-
<constituent filename="Mid-level-ontology.kif" />
4038
<constituent filename="ArabicCulture.kif" />
39+
<constituent filename="Anatomy.kif" />
40+
<constituent filename="arteries.kif" />
41+
<constituent filename="Biography.kif" />
4142
<constituent filename="Cars.kif" />
4243
<constituent filename="Catalog.kif" />
4344
<constituent filename="Communications.kif" />
4445
<constituent filename="CountriesAndRegions.kif" />
4546
<constituent filename="Dining.kif" />
4647
<constituent filename="Economy.kif" />
47-
<!-- constituent filename="emotion.kif" / -->
48+
<constituent filename="emotion.kif" />
4849
<constituent filename="engineering.kif" />
50+
<constituent filename="Facebook.kif" />
4951
<constituent filename="FinancialOntology.kif" />
5052
<constituent filename="Food.kif" />
5153
<constituent filename="Geography.kif" />
5254
<constituent filename="Government.kif" />
5355
<constituent filename="Hotel.kif" />
5456
<constituent filename="Justice.kif" />
5557
<constituent filename="Languages.kif" />
58+
<constituent filename="Law.kif" />
5659
<constituent filename="Media.kif" />
60+
<constituent filename="Medicine.kif" />
61+
<constituent filename="Merge.kif" />
62+
<constituent filename="Mid-level-ontology.kif" />
5763
<constituent filename="MilitaryDevices.kif" />
5864
<constituent filename="Military.kif" />
5965
<constituent filename="MilitaryPersons.kif" />
6066
<constituent filename="MilitaryProcesses.kif" />
6167
<constituent filename="Music.kif" />
6268
<constituent filename="naics.kif" />
6369
<constituent filename="People.kif" />
70+
<constituent filename="pictureList.kif" />
71+
<constituent filename="pictureList-ImageNet.kif" />
6472
<constituent filename="QoSontology.kif" />
6573
<constituent filename="Sports.kif" />
6674
<constituent filename="TransnationalIssues.kif" />
6775
<constituent filename="Transportation.kif" />
6876
<constituent filename="TransportDetail.kif" />
77+
<constituent filename="UXExperimentalTerms.kif" />
6978
<constituent filename="VirusProteinAndCellPart.kif" />
79+
<constituent filename="Weather.kif" />
7080
<constituent filename="WMD.kif" />
7181
</kb>
7282
</configuration>
73-

test/integration/java/resources/config_topAndMid.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<preference name="sumokbname" value="SUMO" />
2626
<preference name="systemsDir" value="/home/theuser" />
2727
<preference name="termFormats" value="no" />
28-
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.96/webapps/sigma/tests" />
28+
<preference name="testOutputDir" value="/usr/local/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
2929
<preference name="TPTPDisplay" value="no" />
3030
<preference name="tptpHomeDir" value="/home/theuser" />
3131
<preference name="TPTP" value="yes" />
3232
<preference name="typePrefix" value="yes" />
3333
<preference name="userBrowserLimit" value="25" />
34-
<preference name="vampire" value="/home/theuser/workspace/vampire/vampire" />
34+
<preference name="vampire" value="/home/theuser/Programs/vampire/build/vampire" />
3535
<kb name="SUMO" >
3636
<constituent filename="Merge.kif" />
3737
<constituent filename="Mid-level-ontology.kif" />

test/integration/java/resources/config_topOnly.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<preference name="sumokbname" value="SUMO" />
2626
<preference name="systemsDir" value="/home/theuser" />
2727
<preference name="termFormats" value="no" />
28-
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.96/webapps/sigma/tests" />
28+
<preference name="testOutputDir" value="/usr/local/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
2929
<preference name="TPTPDisplay" value="no" />
3030
<preference name="tptpHomeDir" value="/home/theuser" />
3131
<preference name="TPTP" value="yes" />
3232
<preference name="typePrefix" value="yes" />
3333
<preference name="userBrowserLimit" value="25" />
34-
<preference name="vampire" value="/home/theuser/workspace/vampire/vampire" />
34+
<preference name="vampire" value="/home/theuser/Programs/vampire/build/vampire" />
3535
<kb name="SUMO" >
3636
<constituent filename="Merge.kif" />
3737
<constituent filename="english_format.kif" />

test/unit/java/resources/config_all.xml

+15-6
Original file line numberDiff line numberDiff line change
@@ -25,49 +25,58 @@
2525
<preference name="sumokbname" value="SUMO" />
2626
<preference name="systemsDir" value="/home/theuser" />
2727
<preference name="termFormats" value="no" />
28-
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.96/webapps/sigma/tests" />
28+
<preference name="testOutputDir" value="/usr/local/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
2929
<preference name="TPTPDisplay" value="no" />
3030
<preference name="tptpHomeDir" value="/home/theuser" />
3131
<preference name="TPTP" value="yes" />
3232
<preference name="typePrefix" value="yes" />
3333
<preference name="userBrowserLimit" value="25" />
34-
<preference name="vampire" value="/home/theuser/workspace/vampire/vampire" />
34+
<preference name="vampire" value="/home/theuser/Programs/vampire/build/vampire" />
3535
<kb name="SUMO" >
3636
<constituent filename="english_format.kif" />
3737
<constituent filename="domainEnglishFormat.kif" />
38-
<constituent filename="Merge.kif" />
39-
<constituent filename="Mid-level-ontology.kif" />
4038
<constituent filename="ArabicCulture.kif" />
39+
<constituent filename="Anatomy.kif" />
40+
<constituent filename="arteries.kif" />
41+
<constituent filename="Biography.kif" />
4142
<constituent filename="Cars.kif" />
4243
<constituent filename="Catalog.kif" />
4344
<constituent filename="Communications.kif" />
4445
<constituent filename="CountriesAndRegions.kif" />
4546
<constituent filename="Dining.kif" />
4647
<constituent filename="Economy.kif" />
47-
<!-- constituent filename="emotion.kif" / -->
48+
<constituent filename="emotion.kif" />
4849
<constituent filename="engineering.kif" />
50+
<constituent filename="Facebook.kif" />
4951
<constituent filename="FinancialOntology.kif" />
5052
<constituent filename="Food.kif" />
5153
<constituent filename="Geography.kif" />
5254
<constituent filename="Government.kif" />
5355
<constituent filename="Hotel.kif" />
5456
<constituent filename="Justice.kif" />
5557
<constituent filename="Languages.kif" />
58+
<constituent filename="Law.kif" />
5659
<constituent filename="Media.kif" />
60+
<constituent filename="Medicine.kif" />
61+
<constituent filename="Merge.kif" />
62+
<constituent filename="Mid-level-ontology.kif" />
5763
<constituent filename="MilitaryDevices.kif" />
5864
<constituent filename="Military.kif" />
5965
<constituent filename="MilitaryPersons.kif" />
6066
<constituent filename="MilitaryProcesses.kif" />
6167
<constituent filename="Music.kif" />
6268
<constituent filename="naics.kif" />
6369
<constituent filename="People.kif" />
70+
<constituent filename="pictureList.kif" />
71+
<constituent filename="pictureList-ImageNet.kif" />
6472
<constituent filename="QoSontology.kif" />
6573
<constituent filename="Sports.kif" />
6674
<constituent filename="TransnationalIssues.kif" />
6775
<constituent filename="Transportation.kif" />
6876
<constituent filename="TransportDetail.kif" />
77+
<constituent filename="UXExperimentalTerms.kif" />
6978
<constituent filename="VirusProteinAndCellPart.kif" />
79+
<constituent filename="Weather.kif" />
7080
<constituent filename="WMD.kif" />
7181
</kb>
7282
</configuration>
73-

test/unit/java/resources/config_topAndMid.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@
2525
<preference name="sumokbname" value="SUMO" />
2626
<preference name="systemsDir" value="/home/theuser" />
2727
<preference name="termFormats" value="no" />
28-
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-9.0.96/webapps/sigma/tests" />
28+
<preference name="testOutputDir" value="/usr/local/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
2929
<preference name="TPTPDisplay" value="no" />
3030
<preference name="tptpHomeDir" value="/home/theuser" />
3131
<preference name="TPTP" value="yes" />
3232
<preference name="typePrefix" value="yes" />
3333
<preference name="userBrowserLimit" value="25" />
34-
<preference name="vampire" value="/home/theuser/workspace/vampire/vampire" />
34+
<preference name="vampire" value="/home/theuser/Programs/vampire/build/vampire" />
3535
<kb name="SUMO" >
3636
<constituent filename="Merge.kif" />
3737
<constituent filename="Mid-level-ontology.kif" />

test/unit/java/resources/config_topOnly.xml

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,38 @@
11
<configuration>
22
<preference name="adminBrowserLimit" value="200" />
3-
<preference name="baseDir" value="/home/apease/.sigmakee" />
3+
<preference name="baseDir" value="/home/theuser/.sigmakee" />
44
<preference name="cache" value="yes" />
55
<preference name="celtdir" value="" />
6-
<preference name="editDir" value="/home/apease/workspace/sumo" />
7-
<preference name="eprover" value="/home/apease/E/bin/e_ltb_runner" />
6+
<preference name="editDir" value="/home/theuser/workspace/sumo" />
7+
<preference name="eprover" value="/home/theuser/E/bin/e_ltb_runner" />
88
<preference name="graphVizDir" value="/usr/bin" />
99
<preference name="holdsPrefix" value="no" />
1010
<preference name="hostname" value="localhost" />
1111
<preference name="https" value="false" />
12-
<preference name="inferenceTestDir" value="/home/apease/.sigmakee/KBs/tests" />
12+
<preference name="inferenceTestDir" value="/home/theuser/.sigmakee/KBs/tests" />
1313
<preference name="jedit" value="jedit" />
14-
<preference name="kbDir" value="/home/apease/.sigmakee/KBs" />
15-
<preference name="leoExecutable" value="/home/apease/leo" />
14+
<preference name="kbDir" value="/home/theuser/.sigmakee/KBs" />
15+
<preference name="leoExecutable" value="/home/theuser/leo" />
1616
<preference name="lineNumberCommand" value="" />
1717
<preference name="loadCELT" value="no" />
18-
<preference name="logDir" value="/home/apease/.sigmakee/logs" />
18+
<preference name="logDir" value="/home/theuser/.sigmakee/logs" />
1919
<preference name="logLevel" value="warning" />
2020
<preference name="port" value="8080" />
2121
<preference name="prolog" value="" />
2222
<preference name="reportDup" value="no" />
2323
<preference name="reportFnError" value="no" />
2424
<preference name="showcached" value="no" />
2525
<preference name="sumokbname" value="SUMO" />
26-
<preference name="systemsDir" value="/home/apease" />
26+
<preference name="systemsDir" value="/home/theuser" />
2727
<preference name="termFormats" value="no" />
28-
<preference name="testOutputDir" value="/var/tomcat/apache-tomcat-5.5.25/webapps/sigma/tests" />
28+
<preference name="testOutputDir" value="/usr/local/tomcat/apache-tomcat-9.0.97/webapps/sigma/tests" />
2929
<preference name="TPTPDisplay" value="no" />
30-
<preference name="tptpHomeDir" value="/home/apease" />
30+
<preference name="tptpHomeDir" value="/home/theuser" />
3131
<preference name="TPTP" value="yes" />
3232
<preference name="typePrefix" value="yes" />
3333
<preference name="userBrowserLimit" value="25" />
34-
<preference name="vampire" value="/home/apease/workspace/vampire/vampire" />
35-
<kb name="SUMO">
34+
<preference name="vampire" value="/home/theuser/Programs/vampire/build/vampire" />
35+
<kb name="SUMO" >
3636
<constituent filename="Merge.kif" />
3737
<constituent filename="english_format.kif" />
3838
<constituent filename="domainEnglishFormat.kif" />

0 commit comments

Comments
 (0)