Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="wikitopline"></div>

<div class="wikitext">
<div width="30%" height="90" style="width: 45%; color: rgb(0, 0, 0);"><span style="width: 280px; text-align: center; white-space: nowrap; color: rgb(0, 0, 0);"><img src="src/docs/help/images/headline.jpg" alt="Java Geometry Expert" width="218" height="117" /></span></div>
<div width="30%" height="90" style="width: 45%; color: rgb(0, 0, 0);"><span style="width: 280px; text-align: center; white-space: nowrap; color: rgb(0, 0, 0);"><img src="src/main/resources/docs/help/images/headline.jpg" alt="Java Geometry Expert" width="218" height="117" /></span></div>
<p>JGEX is a software which combines dynamic geometry software (DGS), automated geometry theorem prover (GTP) and our approach for visually dynamic presentation of proofs. As a dynamic geometry software, JGEX can be used to build dynamic visual models to assist teaching and learning of various mathematical concepts. As an automated reasoning software, we can build dynamic logic models which can do reasoning themselves. As a tool for dynamic presentation of proofs, JGEX is a valuable for teachers and students to write and present proofs of geometry theorems with various dynamic visual effects.</p>
<ol>
<li>JGEX is a powerful software for <em>geometric reasoning</em>. Within its domain, it invites comparison with the best of human geometry provers. It implements most of the effective methods for geometric reasoning introduced in the past twenty years, including the deductive base method, Wu's method, and the full-angle method, etc. With these methods, users may automated prove geometry theorems, to discover new properties of theorems, and to generate readable proofs for many geometry theorems. </li>
Expand All @@ -20,22 +20,22 @@
<p align="center" class="codelisting STYLE1">By a dynamic geometry we simply mean a study of the parts of space andtheir relations to one another while they are in motion and changing.</p>
</blockquote>
<p> The drawing part of JGEX allows the user to construct the diagram interactively and manipulate the diagram in a dynamic way, so JGEX is first a DGS. Starting from free points, the user can create elements which is dependent on existed elements. With the mouse, the user can place points, draw lines, introduce marks, etc. In this way, the diagram is constructed step by step. Much more important is the fact that the user can explore the dynamic nature of the diagram. The user can drag part of the diagram with mouse and see immediately how the diagram changes accordingly. However, JGEX has its distinctive features comparing to the three commercial geometry drawing systems.</p>
<p><a href="src/docs/help/dynamic_geometry_software.html">See Detail &gt;&gt;&gt;</a> </p>
<p><a href="src/main/resources/docs/help/dynamic_geometry_software.html">See Detail &gt;&gt;&gt;</a> </p>
<h3>2. An Automated Geometry Theorem Prover <a name="gtp" id="gtp"></a></h3>
<p>Wu's method, the Full Angle Method and the Deductive Database Method based on Full Angle are implemented in JGEX as reasoning and proving tool.</p>
<p><a href="src/docs/help/automated_theorem_prover.html">See Detail &gt;&gt;&gt; </a></p>
<p><a href="src/main/resources/docs/help/automated_theorem_prover.html">See Detail &gt;&gt;&gt; </a></p>
<h3>3. A Tool for Visual Presentation of Proofs <a name="vpp" id="vpp"></a></h3>
<p>The part of visual presentation of proofs makes JGEX most distinctive from other geometry drawing systems on one side, and from other geometry reasoning systems, including our previous versions of GEX, on the other side. It is based on our work on automated generation of readable proofs and on our approach to geometric drawing.</p>
<p>However, as a first step, instead of automated generation of visual presentations of proofs, we implement the manual input method for creating visual presentations of proofs. This gives us first-hand experience with the approach we propose. It is also an important preparation for our future work on the proof checker. Especially, we have a collection of over 100 examples created manually with JGEX. We collect mainly those examples that do not mix algebraic expressions or computations with the geometry diagrams.</p>
<p><a href="src/docs/help/dynamic_presentation_of_proofs.html">See Detail &gt;&gt;&gt; </a></p>
<p><a href="src/main/resources/docs/help/dynamic_presentation_of_proofs.html">See Detail &gt;&gt;&gt; </a></p>
<p>&nbsp;</p>
<p><strong>See Also: </strong></p>
<ul>
<li><a title="no description" href='src/docs/help/gex_jgex.html' class='wiki'>GEX and JGEX </a></li>
<li> <a title="no description" href='src/docs/help/dynamic_geometry_software.html' class='wiki'>A Dynamic Geometry Software</a></li>
<li> <a title="no description" href='src/docs/help/automated_theorem_prover.html' class='wiki'>An Automated
<li><a title="no description" href='src/main/resources/docs/help/gex_jgex.html' class='wiki'>GEX and JGEX </a></li>
<li> <a title="no description" href='src/main/resources/docs/help/dynamic_geometry_software.html' class='wiki'>A Dynamic Geometry Software</a></li>
<li> <a title="no description" href='src/main/resources/docs/help/automated_theorem_prover.html' class='wiki'>An Automated
Geometry Theorem Prover</a></li>
<li> <a title="no description" href='src/docs/help/dynamic_presentation_of_proofs.html' class='wiki'>A Tool for Visually Dynamic
<li> <a title="no description" href='src/main/resources/docs/help/dynamic_presentation_of_proofs.html' class='wiki'>A Tool for Visually Dynamic
Presentation of Proofs</a></li>
</ul>
<p>&nbsp;</p>
Expand All @@ -53,20 +53,20 @@
</p>

<h3>5. The interface of JGEX <a name="vpp" id="vpp"></a></h3>
<p><img src="src/docs/help/images3/jgex.gif" width="802" height="645" border="1" /><br />
<p><img src="src/main/resources/docs/help/images3/jgex.gif" width="802" height="645" border="1" /><br />
</p>

<p>Some interesting animations</p>
<img src="src/docs/help/effects/st.gif" border="1" height="180" width="400" />
<img src="src/docs/help/effects/cg.gif" border="1" height="180" width="400" />
<img src="src/docs/help/effects/p3.gif" border="1" height="180" width="400" />
<img src="src/docs/help/effects/p4.gif" border="1" height="180" width="400" />
<img src="src/docs/help/effects/p5.gif" border="1" height="180" width="400" />
<img src="src/docs/help/effects/p6.gif" border="1" height="180" width="400" />
<img src="src/main/resources/docs/help/effects/st.gif" border="1" height="180" width="400" />
<img src="src/main/resources/docs/help/effects/cg.gif" border="1" height="180" width="400" />
<img src="src/main/resources/docs/help/effects/p3.gif" border="1" height="180" width="400" />
<img src="src/main/resources/docs/help/effects/p4.gif" border="1" height="180" width="400" />
<img src="src/main/resources/docs/help/effects/p5.gif" border="1" height="180" width="400" />
<img src="src/main/resources/docs/help/effects/p6.gif" border="1" height="180" width="400" />

<table width="200" border="0" align="center">
<tr>
<td><p align="center"><img src="src/docs/help/images2/pyth1.gif" width="698" height="378" border="1" /><br />
<td><p align="center"><img src="src/main/resources/docs/help/images2/pyth1.gif" width="698" height="378" border="1" /><br />
<br />
<strong>A Manually Created Proof for Pythagoras Theorem. </strong> </p></td>
</tr>
Expand All @@ -90,6 +90,7 @@ some features in this version:
<li>Jorge Cassio (Portuguese translation)
<li>Noah Dana-Picard (French and Hebrew translation)
<li>Ines Ganglmayr (German translation)
<li>Philip Hallwirth (Code cleanup, CheerpJ port)
<li>Benedek Kovács (Localization support)
<li>Zoltán Kovács (Hungarian and German translations)
<li>Predrag Janičić (Serbian translation)
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ apply plugin: 'io.github.fvarrui.javapackager.plugin'

// Global settings:
group = 'io.github.kovzol'
ext.softwareVersion = '0.86'
ext.softwareVersion = '0.87'

// These are default settings based on Gradle's standard layout:
ext.poDir = 'src/main/po'
Expand Down
41 changes: 21 additions & 20 deletions snapcraft.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: jgex
architectures:
- build-on: amd64
base: core18
version: '0.86'
base: core20
version: '0.87'
summary: Java Geometry Expert
description: |
JGEX combines dynamic geometry software,
Expand All @@ -16,11 +16,11 @@ confinement: strict
apps:
jgex:
extensions:
- gnome-3-28
command: $SNAP/bin/jgex
- gnome-3-38
command: bin/jgex
environment:
JAVA_HOME: $SNAP/usr/lib/jvm/java-11-openjdk-amd64
PATH: $JAVA_HOME/jre/bin:$PATH
PATH: $JAVA_HOME/bin:$PATH
JAVA_OPTS: -Djava.util.prefs.userRoot="$SNAP_USER_DATA"
LIBGL_DRIVERS_PATH: $SNAP/usr/lib/x86_64-linux-gnu/dri
LC_ALL: C.UTF-8
Expand All @@ -34,24 +34,24 @@ parts:
jgex:
build-packages: [gettext, openjdk-11-jdk]
source: https://github.com/kovzol/Java-Geometry-Expert.git
plugin: gradle
plugin: dump
source-type: git
override-build: |
snapcraftctl build
./gradlew installDist
mkdir -p $SNAPCRAFT_PART_INSTALL/usr/share/jgex
cp -a build/install/jgex/lib/*.jar $SNAPCRAFT_PART_INSTALL/usr/share/jgex
mkdir -p $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/examples $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/help $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/import $SNAPCRAFT_PART_INSTALL/root
cp -a build/install/jgex/bin/rules $SNAPCRAFT_PART_INSTALL/root
echo "#!/bin/bash" > $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "JGEX_WD=~/.jgex # working directory" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "test -d \$JGEX_WD || (mkdir -p \$JGEX_WD; cd \$SNAP/root; cp -a -u * \$JGEX_WD)" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "cd \$JGEX_WD" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
echo "java -cp \$SNAP/usr/share/jgex/\\* wprover.GExpert \$*" >> $SNAPCRAFT_PART_INSTALL/bin/jgex
chmod 755 $SNAPCRAFT_PART_INSTALL/bin/jgex
./gradlew installDist && \
mkdir -p ../install/usr/share/jgex && \
cp -a build/install/jgex/lib/*.jar ../install/usr/share/jgex && \
mkdir -p ../install/root && \
cp -a build/install/jgex/bin/examples ../install/root && \
cp -a build/install/jgex/bin/help ../install/root && \
cp -a build/install/jgex/bin/import ../install/root && \
cp -a build/install/jgex/bin/rules ../install/root && \
echo "#!/bin/bash" > ../install/bin/jgex && \
echo "JGEX_WD=~/.jgex # working directory" >> ../install/bin/jgex && \
echo "test -d \$JGEX_WD || (mkdir -p \$JGEX_WD; cd \$SNAP/root; cp -a -u * \$JGEX_WD)" >> ../install/bin/jgex && \
echo "cd \$JGEX_WD" >> ../install/bin/jgex && \
echo "java -cp \$SNAP/usr/share/jgex/\\* wprover.GExpert \$*" >> ../install/bin/jgex && \
chmod 755 ../install/bin/jgex

stage-packages:
- bash
Expand All @@ -72,3 +72,4 @@ parts:
snapcraftctl prime
rm -f usr/lib/jvm/java-11-openjdk-*/lib/security/blacklisted.certs
rm -fr jar

2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
(async function () {
await cheerpjInit({ version: 11 , enableDebug: true});
cheerpjCreateDisplay(1400, 800);
await cheerpjRunJar("/app/Java-Geometry-Expert-0.86.jar");
await cheerpjRunJar("/app/Java-Geometry-Expert-0.87.jar");
<!-- TODO: Change the version number by copying it from the Java source dynamically. -->
})();
</script>
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/wprover/PanelProve.java
Original file line number Diff line number Diff line change
Expand Up @@ -1669,7 +1669,7 @@ String setNode(Cond co) {
ret += ", tooltip = \" \""; // do not show any tooltip
}
// The files Rule??.jpg are located in the folder web:
String url = "https://github.com/kovzol/Java-Geometry-Expert/blob/master/src/docs/web/Rule" + rule + ".jpg?raw=true";
String url = "https://github.com/kovzol/Java-Geometry-Expert/blob/master/src/main/resources/docs/web/Rule" + rule + ".jpg?raw=true";
ret += ", style = \"" + s + "\", shape = " + f + ", fillcolor = \"" + c + "\"" +
", URL=\"" + url + "\""
+ "];\n";
Expand Down Expand Up @@ -1702,7 +1702,7 @@ Node graphvizNode(Cond co) {
// For some reason, this does not work, we get
// an error org.apache.batik.dom.util.SAXIOException: Invalid byte 1 of 1-byte UTF-8 sequence.
// FIXME.
// String url = "https://github.com/kovzol/Java-Geometry-Expert/blob/master/src/docs/web/Rule" + rule + ".jpg?raw=true";
// String url = "https://github.com/kovzol/Java-Geometry-Expert/blob/master/src/main/resources/docs/web/Rule" + rule + ".jpg?raw=true";
n = Node.builder().shape(s).table(table().border(0).bgColor(c).
cellBorder(0).cellSpacing(0).cellPadding(6).href(url).tooltip(tooltipstring).
tr(td().color(c).text(co.getNo() + ") " + co.getText())).
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/wprover/Version.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*/
public class Version {

private static String sversion = "0.86";
private static String sversion = "0.87";
private static String data = "2024-11-26";
private static String project = "Geometry Expert";

Expand Down
14 changes: 7 additions & 7 deletions src/test/import-ggb-prove-gdd-export-gv-png
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# This script runs all .ggb files from ../docs/import/ggb-benchmarks,
# proves them via the GDD method and saves the proof tree as .gv and .png in ../docs.
# This script runs all .ggb files from ../main/resources/docs/import/ggb-benchmarks,
# proves them via the GDD method and saves the proof tree as .gv and .png in ../main/resources/docs.

# Run this script with
# xvfb-run -a -s "-screen 0 1280x800x24" ./import-ggb-prove-gdd-export-gv-png
Expand All @@ -11,7 +11,7 @@
# "snap" uses the snapcraft installation and considered therefore faster.


BENCHMARKS_FOLDER=../docs/import/ggb-benchmarks # this may be changed on demand
BENCHMARKS_FOLDER=../main/resources/docs/import/ggb-benchmarks # this may be changed on demand
TIMEOUT=5 # JGEX forgets to quit sometimes, this timeout ensures proper exit

test -x $BENCHMARKS_FOLDER || {
Expand Down Expand Up @@ -61,21 +61,21 @@ for FULLNAME in `find $BENCHMARKS_FOLDER -name '*.ggb' | sort`; do
GV=$GV_DIR/$NAME.gv
rm -f $GV # remove a possible successful export from a previous run
if [ "$1" = "snap" ]; then
/bin/time -o ../docs/$NAME.txt /usr/bin/timeout -k $((TIMEOUT+1)) $TIMEOUT jgex -p gdd -o $NAME.gv -x $MYDIR/$FULLNAME > ../docs/$NAME.log 2>&1
/bin/time -o ../main/resources/docs/$NAME.txt /usr/bin/timeout -k $((TIMEOUT+1)) $TIMEOUT jgex -p gdd -o $NAME.gv -x $MYDIR/$FULLNAME > ../main/resources/docs/$NAME.log 2>&1
else
pushd ../.. >/dev/null
RUNTIME=`pwd`/build/install/jgex/bin/Java-Geometry-Expert
/bin/time -o src/docs/$NAME.txt /usr/bin/timeout -k $((TIMEOUT+1)) $TIMEOUT $RUNTIME -p gdd -o $NAME.gv -x $MYDIR/$FULLNAME > src/docs/$NAME.log 2>&1
/bin/time -o src/main/resources/docs/$NAME.txt /usr/bin/timeout -k $((TIMEOUT+1)) $TIMEOUT $RUNTIME -p gdd -o $NAME.gv -x $MYDIR/$FULLNAME > src/main/resources/docs/$NAME.log 2>&1
popd >/dev/null
fi
PROBLEM=`cat ../docs/$NAME.log | grep "Unimplemented\|Unidentified\|Unsupported\|Exception" | grep -v "org.graphper.draw.ExecuteException" | head -1`
PROBLEM=`cat ../main/resources/docs/$NAME.log | grep "Unimplemented\|Unidentified\|Unsupported\|Exception" | grep -v "org.graphper.draw.ExecuteException" | head -1`
test -s $GV && {
MD5SUM=`md5sum $GV | cut -f1 -d" "`
if [ "$MD5SUM" = "d872444bcef19cb5462bb9a4fb4e9fb3" -o "$MD5SUM" = "3c964068bf7b811e7570449adc59af0e" -o "$MD5SUM" = "dd5ece2abd55b6f9b27df4df90e66fdf" ]; then
echo -e "$WARNING_COLOR$NAME unsuccessful: empty gv tree, $PROBLEM$RESUME_COLOR"
BAD=$((BAD+1))
else
dot -Tpng $GV > ../docs/$NAME.png
dot -Tpng $GV > ../main/resources/docs/$NAME.png
LENGTH=`cat $GV | wc -l`
echo -e "$CORRECT_COLOR$NAME successful: $LENGTH lines of gv output$RESUME_COLOR"
GOOD=$((GOOD+1))
Expand Down
10 changes: 5 additions & 5 deletions src/test/prove-gdd-export-gv-svg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
# This script runs all .gex files from ../docs/examples/6_GDD_FULL,
# proves them via the GDD method and saves the proof tree as .gv and .svg in ../docs.
# This script runs all .gex files from ../main/resources/docs/examples/6_GDD_FULL,
# proves them via the GDD method and saves the proof tree as .gv and .svg in ../main/resources/docs.

# Run this script with
# xvfb-run -a -s "-screen 0 1280x800x24" ./prove-gdd-export-gv-svg
Expand All @@ -14,8 +14,8 @@ cd ../..
RUNTIME=`pwd`/build/install/jgex/bin/Java-Geometry-Expert
MYDIR=`pwd`

for FULLNAME in `find src/docs/examples/6_GDD_FULL -name '*.gex' `; do
for FULLNAME in `find src/main/resources/docs/examples/6_GDD_FULL -name '*.gex' `; do
NAME=`basename $FULLNAME .gex`
/bin/time -o src/docs/$NAME.txt /usr/bin/timeout -k $TIMEOUT $TIMEOUT $RUNTIME -p gdd -o $NAME.gv -x $MYDIR/$FULLNAME
dot -Tsvg $NAME.gv > src/docs/$NAME.svg
/bin/time -o src/main/resources/docs/$NAME.txt /usr/bin/timeout -k $TIMEOUT $TIMEOUT $RUNTIME -p gdd -o $NAME.gv -x $MYDIR/$FULLNAME
dot -Tsvg $NAME.gv > src/main/resources/docs/$NAME.svg
done