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

Refactor to get threaded operations when writing *.tptp and *.tff KBs #164

Merged
merged 105 commits into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
105 commits
Select commit Hold shift + click to select a range
877e5d5
[Terry N.] Announce the SUMO.tptp file has been generated
Feb 12, 2025
bc61676
[Terry N.] use syserr for errors, minor edit to printHelp method
Feb 12, 2025
9cb9c04
[Terry N.] use syserr for errors, add printHelp method, extend
Feb 12, 2025
3976884
[Terry N.] add external task to run vampire
Feb 12, 2025
0111e63
[Terry N.] thorough clean only on special occasions like after unit
Feb 12, 2025
867835e
[Terry N.] use syserr for errors
Feb 12, 2025
345e0c0
[Terry N.] lable various run.args
Feb 12, 2025
700d0a9
[Terry N.] var dec. outside of loops
Feb 12, 2025
e812cd5
[Terry N.] add to compile path
Feb 12, 2025
9900f5b
[Terry N.] turn on quite a few more integration tests
Feb 12, 2025
5307dad
[Terry N.] minor refactors
Feb 12, 2025
ea2f34a
[Terry N.] expand info
Feb 12, 2025
c4f7653
[Terry N.] expand info
Feb 12, 2025
3dfbff3
[Terry N.] use syserr for errors
Feb 12, 2025
2413e0f
[Terry N.] new target for tinySUMO
Feb 12, 2025
1167e9f
[Terry N.] consolidate constructors
Feb 12, 2025
d58c872
[Terry N.] add output proof to menu
Feb 12, 2025
fa33c1c
[Terry N.] base type stream
Feb 13, 2025
0612580
[Terry N.] cast not necessary
Feb 13, 2025
21adc7b
[Terry N.] add test for qlist resolution
Feb 13, 2025
99061e9
[Terry N.] fix AIOOB Exception
Feb 13, 2025
1b50dd4
[Terry N.] whitespace
Feb 13, 2025
2a49457
[Terry N.] expand main output
Feb 13, 2025
8b14182
[Terry N.] unused import
Feb 13, 2025
39f7a86
[Terry N.] use dec. var
Feb 14, 2025
b0ae06d
[Terry N.] synchronize for threading work
Feb 14, 2025
942d166
[Terry N.] workable threaded writeFile. However, metadata out of order
Feb 14, 2025
422e5a8
[Terry N.] commentable tasks with diff. dependencies
Feb 14, 2025
fe937ed
[Terry N.] define debug.jvmargs
Feb 14, 2025
a5df7c4
[Terry N.] minor type cleanups
Feb 14, 2025
2b031d4
[Terry N.] use syserr for errors
Feb 14, 2025
2aabd36
[Terry N.] use syserr for errors, use diamond operators, var dec. out of
Feb 14, 2025
9a432a6
[Terry N.] add to refresh.KBs a dependency for pull on SUMO
Feb 14, 2025
caf91ce
Merge origin/master
Feb 14, 2025
7719a79
Merge branch 'ontologyportal:master' into master
terry-norbraten Feb 14, 2025
4830cc3
[Terry N.] whitespace
Feb 14, 2025
38ad23a
[Terry N.] capitalize final var
Feb 14, 2025
4731ba1
[Terry N.] provide update (git pull) for sigmaUtils, TPTP-ANTLR
Feb 14, 2025
ad19d6a
[Terry N.] print date serialized
Feb 14, 2025
b501b3c
[Terry N.] serialize WN where it was supposed to be in WordNetMappings
Feb 14, 2025
af9830c
[Terry N.] better error validation output
Feb 14, 2025
f24b407
[Terry N.] run args for KButilities error check
Feb 14, 2025
c914c59
[Terry N.] confirmed v3.0.0
Feb 15, 2025
36c9b8f
Merge branch 'ontologyportal:master' into master
terry-norbraten Feb 15, 2025
5b134af
[Terry N.] merge from the main repo
Feb 15, 2025
c59be11
[Terry N.] print where error came from
Feb 15, 2025
94351ae
[Terry N.] catch IOException
Feb 15, 2025
bc25492
Merge branch 'master' of github.com:terry-norbraten/sigmakee
Feb 15, 2025
88606f8
[Terry N.] loadFresh has nothing to do with acct. mgmt
Feb 15, 2025
44f63c7
[Terry N.] edit note
Feb 16, 2025
4a29ed5
[Terry N.] consolidate constructors
Feb 16, 2025
03ebd0c
[Terry N.] reduce object creation
Feb 16, 2025
52d2d86
[Terry N.] add path for z3 lib
Feb 16, 2025
9bca2ed
[Terry N.] move ThreadPoolExecutor and shutdown method here
Feb 16, 2025
0b4066d
[Terry N.] implement a ThreadPoolExecutor service for the
Feb 16, 2025
dc4a2c9
[Terry N.] save the manually threaded writeFile method for Hx purposes
Feb 16, 2025
b9605f5
[Terry N.] cache of targets w/ differing dependencies
Feb 16, 2025
982fb17
[Terry N.] add various props
Feb 16, 2025
13eaecb
[Terry N.] add executor shutdown method at bottom of main
Feb 16, 2025
24f7fbe
[Terry N.] add executor shutdown for @AfterClass
Feb 16, 2025
2eb14e5
[Terry N.] add executor shutdown for @AfterClass
Feb 16, 2025
17a71ef
[Terry N.] static var type dec.
Feb 16, 2025
c3a57c4
[Terry N.] identify class in sysout
Feb 16, 2025
3664bae
[Terry N.] add FIXME note about having to loadFresh every startup even
Feb 16, 2025
6b20e14
[Terry N.] var dec. out of loops
Feb 16, 2025
7cc0851
[Terry N.] reduce object creation
Feb 16, 2025
4aa96d4
[Terry N.] whitespace
Feb 16, 2025
2d0bae0
[Terry N.] orig. filterAxiom format
Feb 16, 2025
70553e6
[Terry N.] syserr for errors
Feb 16, 2025
4847b39
[Terry N.] note on experimental manual threading of main loop
Feb 16, 2025
9213c1f
[Terry N.] note on experimental manual threading of main loop
Feb 16, 2025
ba59542
[Terry N.] note on experimental thread pool executor
Feb 16, 2025
7b1b113
[Terry N.] javadoc update
Feb 17, 2025
fc99de3
[Terry N.] javadoc update
Feb 17, 2025
f4abede
[Terry N.] javadoc update
Feb 17, 2025
51298fc
[Terry N.] final var convention
Feb 18, 2025
9904261
[Terry N.] final var convention
Feb 18, 2025
565ad33
[Terry N.] consolidate similar constructors
Feb 18, 2025
f07cea7
[Terry N.] var dec. out of loops
Feb 18, 2025
83610b0
[Terry N.] add switch (-R) in KB for rapid TPTP translation processing.
Feb 18, 2025
7707625
[Terry N.] whitespace
Feb 18, 2025
41394dc
[Terry N.] set run.class
Feb 18, 2025
4900cf0
[Terry N.] set run.class
Feb 18, 2025
f4fa87a
[Terry N.] runtime hook to terminate the ExecutorService on JVM
Feb 18, 2025
06c43e8
[Terry N.] expand "done" monitors to other loops
Feb 18, 2025
04c46b1
[Terry N.] newline for info output
Feb 18, 2025
5d62916
[Terry N.] add debug.sigma.web.app target
Feb 18, 2025
a31dd57
[Terry N.] update note
Feb 18, 2025
06d8db9
[Terry N.] split out the process method into synchronized for threaded
Feb 19, 2025
89c5e72
[Terry N.] javadoc
Feb 19, 2025
ed0b91e
[Terry N.] split out the tptpParseSUOKIFString method into synchronized
Feb 19, 2025
77fee02
[Terry N.] refactor for capturing the whole formula string complete w/
Feb 19, 2025
a15f664
[Terry N.] set flag in main for rapid parsing (threaded)
Feb 19, 2025
af8fe1d
[Terry N.] set flag in main for rapid parsing (threaded)
Feb 19, 2025
f14eb41
[Terry N.] common classpath refs
Feb 19, 2025
d405ae7
[Terry N.] var dec. out of loop
Feb 19, 2025
71204bd
[Terry N.] confirm ExecServ shutdown
Feb 19, 2025
8c38f77
[Terry N.] set flag in startup for rapid parsing (threaded)
Feb 19, 2025
1c0359e
[Terry N.] move flag to startup for rapid parsing (threaded)
Feb 19, 2025
8774489
[Terry N.] move flag to startup for rapid parsing (threaded)
Feb 19, 2025
85a88e5
[Terry N.] confirm flag set for rapid parsing (threaded)
Feb 19, 2025
ebf8eeb
[Terry N.] clean up
Feb 19, 2025
11bdcd1
[Terry N.] clean up imports
Feb 19, 2025
43b0566
[Terry N.] reset counter
Feb 19, 2025
686239e
Merge branch 'ontologyportal:master' into master
terry-norbraten Feb 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -638,12 +638,11 @@ Default user/pw: admin/admin
You can use Sigma without being administrator, but you'll have limited use of
its functionality.

You'll also need to set a few parameters in your config.xml file. If you chose
user "admin", then your config.xml will need these 2 new lines added.
You'll also need to set a parameter in your config.xml file. If you chose
user "admin", then your config.xml will need this line added.

```xml
<preference name="dbUser" value="admin" />
<preference name="loadFresh" value="false" />
```

To handle the account registration feature, you'll need to have an email account and supply the
Expand Down
70 changes: 47 additions & 23 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@

<property name="impl.title" value="${ant.project.name}"/>
<property name="product.Name" value="Sigma Knowledge Engineering Environment (${impl.title})"/>
<property name="product.version.major" value="1"/>
<property name="product.version.major" value="3"/>
<property name="product.version.minor" value="0"/>
<property name="product.version.patch" value="0"/>
<property name="product.Version" value="${product.version.major}.${product.version.minor}.${product.version.patch}"/>
Expand Down Expand Up @@ -375,7 +375,7 @@
<!-- 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="Appends .*hrc files, clones Sigma tools, installs WordNetMappings and SUMO to ${sigma.home}/KBs and builds the E and Vampire Theorem provers">
<target name="install" depends="init" description="Appends .*shrc files, clones Sigma tools, installs WordNetMappings and SUMO to ${sigma.home}/KBs and builds the E and Vampire Theorem provers">
<mkdir dir="${git.home}"/>
<chmod dir="${git.home}" perm="ugo+rw" includes="**/*"/>
<mkdir dir="${programs.dir}"/>
Expand All @@ -391,9 +391,9 @@
<antcall target="retrieve.E"/>

<!-- Clone the sigma tools -->
<antcall target="clone.sumo"/>
<antcall target="clone.tptpantlr"/>
<antcall target="clone.sigmautils"/>
<antcall target="clone.tptpantlr"/>
<antcall target="clone.sumo"/>

<!-- Copy sumo and WordNet files to ${sigma.home} -->
<antcall target="copy.sumo.and.wordnet.to.sigma.home"/>
Expand Down Expand Up @@ -434,7 +434,7 @@
</target>

<!-- When the SUMO KB files get updated, do this frequently -->
<target name="refresh.KBs" description="Copy updated KBs from SUMO to ~/.sigmakee -> ($SIGMA_HOME)">
<target name="refresh.KBs" depends="update.sumo" description="Copy updated KBs from SUMO to ~/.sigmakee -> ($SIGMA_HOME)">
<mkdir dir="${user.home}/.${web.app.name}"/>
<chmod dir="${user.home}/.${web.app.name}" perm="ugo+rw" includes="**/*"/>
<mkdir dir="${user.home}/.${web.app.name}/KBs"/>
Expand All @@ -445,14 +445,22 @@
</copy>
</target>

<target name="clone.sumo">
<mkdir dir="${kbs.home}"/>
<git command="clone" dir="${kbs.home}">
<target name="clone.sigmautils">
<mkdir dir="${git.home}/SigmaUtils"/>
<git command="clone" dir="${git.home}/SigmaUtils">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
<arg value="https://github.com/ontologyportal/SigmaUtils"/>
<arg value="${git.home}/SigmaUtils"/>
</args>
</git>
</target>
<target name="update.sigmautils">
<git command="pull" dir="${git.home}/SigmaUtils">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
<arg value="https://github.com/ontologyportal/sumo"/>
<arg value="${kbs.home}"/>
</args>
</git>
</target>
Expand All @@ -467,14 +475,38 @@
</args>
</git>
</target>
<target name="clone.sigmautils">
<mkdir dir="${git.home}/SigmaUtils"/>
<git command="clone" dir="${git.home}/SigmaUtils">
<target name="update.tptpantlr">
<git command="pull" dir="${git.home}/TPTP-ANTLR">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
</args>
</git>
</target>
<target name="clone.sumo">
<mkdir dir="${kbs.home}"/>
<git command="clone" dir="${kbs.home}">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
<arg value="https://github.com/ontologyportal/sumo"/>
<arg value="${kbs.home}"/>
</args>
</git>
</target>
<target name="update.sumo">
<git command="pull" dir="${kbs.home}">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
</args>
</git>
</target>
<target name="update.sigmakee">
<git command="pull" dir="${user.dir}">
<args>
<arg value="--progress"/>
<arg value="--verbose"/>
<arg value="https://github.com/ontologyportal/SigmaUtils"/>
<arg value="${git.home}/SigmaUtils"/>
</args>
</git>
</target>
Expand All @@ -497,14 +529,6 @@
</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
13 changes: 8 additions & 5 deletions docker/sigma-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ RUN apt-get update && apt-get install -y --install-recommends \
cp build/vampire vampire ;\
./checks/sanity vampire

# For a specific version of Vampire and z3
#RUN apt update && apt install -y --install-recommends \
# build-essential \
# clang \
Expand Down Expand Up @@ -69,6 +70,12 @@ RUN apt-get update && apt-get install -y --install-recommends \
# runtime image.
FROM tomcat:9.0.97-jdk21-temurin-jammy AS runtime

RUN apt-get update && apt-get install -y --no-install-recommends \
ant \
ant-optional \
git \
graphviz

COPY --from=builder \
/usr/local/tomcat/E/PROVER/e_ltb_runner /usr/local/bin/e_ltb_runner

Expand All @@ -87,8 +94,4 @@ COPY --from=builder \
COPY --from=builder \
/usr/local/tomcat/vampire/z3/build/libz3.* /usr/local/bin/

RUN apt-get update && apt-get install -y --no-install-recommends \
ant \
ant-optional \
git \
graphviz
ENV LD_LIBRARY_PATH=/usr/local/bin:$LD_LIBRARY_PATH
48 changes: 44 additions & 4 deletions nbproject/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ javadoc.splitindex=true
javadoc.use=true
javadoc.version=false
javadoc.windowtitle=
#main.class=com.articulate.sigma.KB
#manifest.mf=MANIFEST.MF
platform.active=default_platform
run.classpath=\
Expand All @@ -83,6 +82,7 @@ run.classpath=\
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
# To set system properties for unit tests define test-sys-prop.name=value:
#run.jvmargs=-Xmx10g -Xss1m
debug.jvmargs=-Xmx15g -Xss4m
run.modulepath=\
${javac.modulepath}
run.test.classpath=\
Expand All @@ -101,7 +101,7 @@ source.encoding=UTF-8

# Specific SigmaKEE props
#app.name=sigma
#web.app.name=${web.app.name}kee
#web.app.name=${app.name}kee
ontologyportal.git=${workspace}
#web.dir=web
sigma_src=${basedir}
Expand All @@ -125,9 +125,40 @@ kbs_home=../sumo
#spec.vendor=Adam Pease
project.license=LICENSE

# Can't override immutable props
#main.class=com.articulate.sigma.KB
#run.class=com.articulate.sigma.KButilities
run.class=${main.class}

# Various runtime arguments here
#run.args=-g Transitway subclass
run.args=-t

# Intentional empty arguments
#run.args=

# Default run for the KB
#run.args=-c Object Transaction

# Load KB files w/ KButilities (should regenerate the KB if cleaned). -R for
# rapid (threaded) processing
run.args=-l -R

# Run Vampire on SUMO.tptp and output proof
#run.args=-p

# KB, KIF, TPTP3ProofProcessor, TPTPutil, SUMOtoTFAform - run a test
#run.args=-t

# Formula check for errors
formula='(=> (and (muscleInsertion ?MC ?BPC) (instance ?H Human) (attribute ?H Healthy)) (exists (?M ?BP) (and (instance ?M ?MC) (instance ?BP ?BPC) (part ?M ?H) (part ?BP ?H) (connects ?M ?BP))))'

# Error checking a formula w/ com.articulate.sigma.KButilities
#run.args=-v ${formula}

# Translate KB to TFF
# run com.articulate.sigma.trans.SUMOKBtoTFAKB

# Translate KB to FOF
# run com.articulate.sigma.trans.SUMOKBtoTPTPKB

# Tomcat Manager properties
catalina.ops=-Xmx10g -Xss1m
Expand Down Expand Up @@ -163,6 +194,15 @@ test.integration.resources.dir=${test.integration.dir}/resources
#unit.test.suite=com.articulate.sigma.UnitTestSuite
#integration.test.suite=com.articulate.sigma.IntegrationTestSuite

# Vampire

# default timeout is 60 if -t is not specified
# NOTE: [- -mode casc] is a shortcut for [- -mode portfolio -sched casc -p tptp]
tptp.file=${workspace}/sigmakee/nbproject/private/resources/SUMO/SUMO.tptp
#tptp.file=${sigma_home}/KBs/SUMO.tptp
vamp.out=${sigma_home}/KBs/vamp-out.txt
vamp.args=--mode casc -t 900 ${tptp.file} &amp;> ${vamp.out}

#System.out.println("PasswordService: ");
#System.out.println("-h show this Help message");
#System.out.println("-l Login");
Expand Down
Loading
Loading