1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="html.css" />
<title>JAS Download</title>
</head>
<body class="main">
<h1>Download, installation and unit tests</h1>
<h2>Download jar-files or clone repository</h2>
<ul>
<li><p>This is JAS version: <strong>@VERSION@</strong>,
subversion revision: <strong>@SVNREV@</strong> (export at @SVNDATE@).
</p>
</li>
<li><p>The JAS classes jar-file
<a href="../@VERSION@.@SVNREV@-bin.jar">@VERSION@.@SVNREV@-bin.jar</a>
can be used the same way as any other Java archive during
compilation and execution of your Java programs.
It is compiled using Java 11 from OpenJDK.
The bytecode is dual licenced also under the Apache 2.0 licence
to allow usage in Android projects.
<br />
The source code is in
<a href="../@VERSION@.@SVNREV@-src.zip">@VERSION@.@SVNREV@-src.zip</a>
current version should compile on Java 8 and 11 (aka Java 1.8 and 1.11).
(right click on the link and chose "save link as")
<br />
The Javadoc API documentation is in
<a href="../@VERSION@.@SVNREV@-doc.zip">@VERSION@.@SVNREV@-doc.zip</a>
for current version.
</p>
</li>
<li><p>A JAS Maven compatible repository is at
<a href="http://krum.rz.uni-mannheim.de/maven-repository/" target="new"
>http://krum.rz.uni-mannheim.de/maven-repository/</a> and at
<a href="https://repo1.maven.org/maven2/de/uni-mannheim/rz/krum/" target="new"
>https://repo1.maven.org/maven2/de/uni-mannheim/rz/krum/</a>. <br />
groupId: <code>de.uni-mannheim.rz.krum</code>, artifactId: <code>jas</code>,
version (for example): <code>2.7.@SVNREV@</code>.
</p>
<!--
http://krum.rz.uni-mannheim.de/maven-repository/de/uni-mannheim/rz/krum/jas/
http://central.maven.org/maven2/de/uni-mannheim/rz/krum/jas/
-->
</li>
<li><p>The JAS Git repository is available with
</p>
<pre>
git clone http://krum.rz.uni-mannheim.de/jas.git jas
</pre>
<p>or from GitHub</p>
<pre>
git clone https://github.com/kredel/java-algebra-system jas
</pre>
</li>
<li><p>Required libraries:
<br />
<a href="../../lib/log4j-api.jar">lib/log4j-api.jar</a>,
<a href="../../lib/log4j-core.jar">lib/log4j-core.jar</a>
(from Apache Log4j version 2.17.1),
<br />
<a href="../../lib/junit-4.12.jar">lib/junit-4.12.jar</a>,
<a href="../../lib/hamcrest-core-1.3.jar">lib/hamcrest-core-1.3.jar</a>
(from Junit 4),
<br />
In case you already have these jars, just ensure they are in the
correct location (e.g. <code>../lib/</code>) or in the class path or accessible via Maven.
</p>
<p>
The jar libraries can be downloaded from the above links or
with the Ivy "resolve" target of ant, or the Maven dependencies,
when installing the JAS source code.
</p>
</li>
<li><p>Optional libraries and files:
</p>
<ul>
<li>There is a <a href="http://www.docker.com" target="deb">docker</a> specification to create
a docker image containing a runnable JAS in <a href="Dockerfile">Dockerfile</a>.
</li>
<li>A Debian package <a href="http://packages.debian.org/de/sid/libjas-java" target="deb">libjas-java</a>,
<br />
an inofficial Debian package which can be used with MathLibre
<a href="../@DEBVERSION@.@SVNREV@-all.deb" target="deb">@DEBVERSION@.@SVNREV@-all.deb</a>,
<br />
and an Ubuntu package
<a href="http://packages.ubuntu.com/search?keywords=libjas-java" target="deb">libjas-java</a>
are also avalilable.
</li>
<li><a href="../jas-mpj.jar">jas-mpj.jar</a> <br /> This JAR contains
implementations of distributed Gröbner bases using the
MPJ middle-ware (MPI Java). It requires an MPJ implementation such as
<a href="http://mpj-express.org/" target="mpj" >MPJ Express</a> or
<a href="http://fastmpj.com/" target="mpj" >FastMPJ</a>.
<br />
The Javadocs can be found <a href="../mpj/index.html" target="api">here</a>.
</li>
<li><a href="../jas-mpi.jar">jas-mpi.jar</a> <br /> This JAR contains
implementations of distributed Gröbner bases using the
Open-MPI middle-ware (with Java support). It requires an MPI implementation
such as <a href="http://www.open-mpi.org/" target="mpi" >Open-MPI</a>.
<br />
The Javadocs can be found <a href="mpi/index.html" target="api">here</a>.
</li>
<li><a href="../jas-meditor.jar">jas-meditor.jar</a>
<br />
This JAR contains the interface for JAS as an meditor engine,
see <a href="http://jscl-meditor.sourceforge.net/" target="rela">jscl-meditor</a>.
<br />
Sample script to call meditor with the JAS engine
<a href="../meditor/meditor">meditor</a>.
</li>
<li><a href="../jlinalg_adapter.jar">jlinalg_adapter.jar</a>
<br />
This JAR contains an adapter for JAS to the linear algebra library
<a href="http://jlinalg.sourceforge.net/" target="rela">JLinAlg</a> version 0.6.
<br />
The Javadocs can be found <a href="../jlinalg_adapter/index.html" target="api">here</a>.
</li>
<li><a href="../commons-math_adapter-bin.jar">commons-math_adapter-bin.jar</a>
<br />
This JAR contains an adapter for JAS to the Apache Commons Math 3.3
linear algebra library
<a href="http://commons.apache.org/math/" target="rela">Commons-Math</a>
version 3.3.
</li>
<li><a href="../jas-jython.jar">jas-jython.jar</a>
<br />
This JAR contains a scripting interface to use the
<a href="http://www.jython.org/" target="rela">jython</a>
interpreter with JAS.
</li>
<li>Android JAS App
<a href="http://krum.rz.uni-mannheim.de/ruboto-irb-jas-release.apk">Ruboto-IRB_with_JAS</a>.
<br />
You must allow "installation from untrusted sources".
<br />
The JAS App uses its JRuby scripting interface and runs within the Ruby IRB Android App
<a href="http://ruboto.org/">Ruboto</a>.
</li>
</ul>
<p> </p>
</li>
<li><p>For latest developments see <a href="jas-log.html">JAS Weblog</a>
and the <a href="git_change.log" target="top">Git change log</a>.
</p>
</li>
</ul>
<h2>Installation</h2>
<ul>
<li><p>Add the JAS jar-file and the other required jar-files
to the classpath. Start using it in your applications.
For example
</p>
<pre>
javac -classpath log4j-api-2.17.1.jar:log4j-core-2.17.1.jar:junit.jar:jas.jar:. -d . src/edu/jas/application/Examples.java
java -classpath log4j-api-2.17.1.jar:log4j-core-2.17.1.jar:junit.jar:jas.jar:. edu.jas.application.Examples
</pre>
<p>Make sure that you use the actual jars as described above, for example
<code>log4j-api-2.17.1.jar:log4j-core-2.17.1.jar:junit-4.12.jar:hamcrest-core-1.3.jar</code>
</p>
</li>
<li><p>If you want to develop with JAS, then extract the
jar-file in a new directory
<code>jar -xvf jas-[version]-src.jar</code>
</p>
</li>
<li><p>JAS is currently developed for Java 11 (OpenJDK).
It may eventually not compile under Java 8 (OpenJDK 1.8).
It will <b>no more</b> compile under Java 6 (OpenJDK 1.6)
or older versions.
</p>
</li>
<li><p>Among the extracted files, there is an Ant build script
<code>build.xml</code>
and also a Gnu make file
<code>Makefile</code>.
<br />
To use Ant, you must edit the <code>build.xml</code> file and
adjust the <code>lib</code> property to point to the directory
where you downloaded the jar files.
Also be sure to use the correct JDK version, e.g. via setting the
<code>JAVA_HOME</code> environment variable.
<br />
To use the Gnu make file, you must edit the <code>Makefile</code>
and adjust the <code>JDK</code> and the <code>LIBPATH</code> variables.
</p>
</li>
<li><p>Most useful Ant targets:
<br />
<code>ant resolve</code> fetch the required libraries (log4j2, junit) with Ivy,
<br />
<code>ant compile</code> changed Java files are compiled,
<br />
<code>ant recompile</code> all Java files are compiled,
<br />
<code>ant test</code> run all JUnit tests,
<br />
<code>ant run -Dclass=edu.jas.'package'.'class'</code> run the respective class,
<br />
<code>ant clean</code> remove backup files,
<br />
<code>ant distclean</code> remove all class files,
<br />
<code>ant doc</code> create the Javadocs.
</p>
</li>
<li><p>Most useful make-file targets:
<br />
<code>make "class"</code> run the <code>main()</code> method of the class,
<br />
e.g. <code>make edu.jas.poly.Examples</code> run
the class <code>Examples</code>.
</p>
</li>
</ul>
<h2>Unit tests with JUnit</h2>
<ul>
<li><p>Unit tests can be run with the "test" target for ant, e.g.
<code>ant test</code>
</p>
</li>
<li><p>The output of the unit tests is collected in the directory
<code>test</code> for inspection.
</p>
</li>
<li><p>The test units work mainly with generated random polynomials.
The parameters are choosen such that the resulting Groebner bases
are not to hard to compute.
However some random polynomials may be to big and the running time
may occasionally be several minutes (but not hours).
<br />
On the other hand random polynomials may sometimes be zero or one.
If such input does not make sense the test will fail. I.e. some
tests will fail from time to time, but not for repeated execution
of the test. So if a test fails rerun the test a few times.
</p>
</li>
</ul>
<h2><a name="docu">Documentation</a></h2>
<ul>
<li><p>The JAS documentation is contained in the jar files
<code>jas-[version]-src.jar</code> and <code>jas-[version]-doc.jar</code>.
Extract the jar files and start exploring with any browser
from the <code>index.html</code> file in the main directory.
</p>
</li>
<li><p>The JAS javadoc API documents and the jython documents
can also be browsed online:
<a href="api/index.html" target="api">API Javadocs</a>,
<a href="jython/index.html" target="jython">Epydoc of jas.py</a> and
<a href="jruby/index.html" target="jruby">Rdoc of jas.rb</a>.
</p>
</li>
<li><p><a href="../README" target="main" >README</a> and licencing:
<a href="COPYING.jas" target="gpl" >COPYING.jas</a> (GPL)
or
<a href="COPYING.lgpl.jas" target="gpl" >COPYING.lgpl.jas</a> (LGPL)
</p>
</li>
</ul>
<h2><a name="log">Logging</a></h2>
<ul>
<li><p>JAS uses <a href="https://en.wikipedia.org/wiki/Log4j">Apache Log4j</a>
to track progress in computations and
inform about problematic or erroneous program states.
Since JAS 2.6 it uses <b>Log4j 2.x</b>.
</p>
</li>
<li><p>The configuration is in file <code>log4j2.properties</code>.
Per deault the logging level is at <b>ERROR</b> so that only minimal
logs are produced.
To obtain more detailed information or store the logs to files,
please configure the desired properties in the above file.
</p>
<p>This configuration file is no more contained in the binary jars
<code>jas-bin.jar</code> or <code>jas-[version].jar</code> to allow
usage of other compatible logging frameworks.
</p>
<p>The old configuration of Log4j version 1 via
<code>BasicConfigurator.configure()</code> is no more supported.
</p>
</li>
<!--li><p>In case you can not use Apache log4j for some reason, there is an
adaptor package <a href="../mylog.jar">mylog.jar</a>
which delegates all logging calls to native Java logging.
</p>
<p>For Android there is the adaptor package <a href="../droidlog.jar">droidlog.jar</a>
which delegates all logging calls to native Android logging.
</p>
</li-->
</ul>
<h2><a name="eclipse">Usage</a> with the Eclipse IDE</h2>
<p>The JAS source distribution can also be compiled and used from the
Eclipse integrated development environment.
</p>
<p>Instructions to install the JAS source:</p>
<ol>
<li>Download the JAS source jar and unpack to some directory,
or git clone the repository to some directory
</li>
<li>Download the Log4j2 and the Junit jar files
</li>
<li>Start eclipse
</li>
<li>Create a new project from "existing source"
</li>
<li>Specify the source directory <code>src</code> contained the directory from 1.
</li>
<li>Add the jars from 2. to the project libraries as "external JARs"
</li>
<li>Create a new project or use your default project
</li>
<li>In the project properties add as "required project"
the JAS project from 4.
</li>
</ol>
<p>Instructions to install the JAS binary:</p>
<ol>
<li>Download the JAS binary jar file
</li>
<li>Download the Log4j2 and the Junit jar files
</li>
<li>Start eclipse
</li>
<li>In your projects properties add the jar files
from 1. and 2. to the project libraries as "external JARs"
</li>
</ol>
<p>Create and edit a sample java programm which uses the JAS API.
E.g. the following sample computes the first ten Legendre polynomials.
</p>
<pre>
import java.util.List;
import java.util.ArrayList;
import edu.jas.arith.BigRational;
import edu.jas.poly.GenPolynomial;
import edu.jas.poly.GenPolynomialRing;
public class mytests {
public static void main(String[] args) {
BigRational fac = new BigRational();
String[] var = new String[]{ "x" };
GenPolynomialRing<BigRational> ring
= new GenPolynomialRing<BigRational>(fac,1,var);
int n = 10;
List<GenPolynomial<BigRational>> P
= new ArrayList<GenPolynomial<BigRational>>(n);
GenPolynomial<BigRational> t, one, x, xc;
BigRational n21, nn;
one = ring.getONE();
x = ring.univariate(0);
P.add( one );
P.add( x );
for ( int i = 2; i < n; i++ ) {
n21 = new BigRational( 2*i-1 );
xc = x.multiply( n21 );
t = xc.multiply( P.get(i-1) ); // (2n-1) x P[n-1]
nn = new BigRational( i-1 );
xc = P.get(i-2).multiply( nn ); // (n-1) P[n-2]
t = t.subtract( xc );
nn = new BigRational(1,i);
t = t.multiply( nn ); // 1/n t
P.add( t );
}
for ( int i = 0; i < n; i++ ) {
System.out.println("P["+i+"] = " + P.get(i) );
}
}
}
</pre>
<h2>Using the <a name="jython">Jython</a> interpreter</h2>
<ul>
<!--li><p>Set up your <code>.jythonrc</code> file, e.g. see the sample code in
<a href="../sample.jythonrc" target="py">sample.jythonrc</a>.
</p>
</li-->
<li><p>Be sure you have downloaded the above libraries
<code>log4j-api.jar, log4j-core.jar, junit-4.12.jar, hamcrest-core-1.3.jar</code>,
and <code>jas*-bin.jar</code>.
JAS-@VERSION@ is using and has been tested with Jython 2.7.0.
</p>
</li>
<li><p>The main file to interface to the JAS library is
<a href="../examples/jas.py" target="py">jas.py</a>.
It must be imported by other Python files.
HTML documents of the interface can be found
<a href="jython/index.html" target="jython">here</a>.
</p>
</li>
<!--li><p>If jython cannot find the JAS classes, try to put the jas.jar also
into the CLASSPATH or unpack the jar into the directory you are
starting jython (also to get the correct version of .py files).
</p>
</li-->
<li><p>Start using JAS, e.g.
</p>
<pre>
jython -J-cp log4j-api.jar:log4j-core.jar:junit-4.12.jar:hamcrest-core-1.3.jar:. examples/trinks.py
</pre>
<p>The
<a href="../examples/trinks.py" target="py">examples/trinks.py</a>
contains an Groebner base example named after its proposer Mr. Trinks.
The file runs a sequential, a parallel and a distributed version
of the Groebner base algorithms.
</p>
</li>
<li><p>For further discussion of the JAS jython interface
see
<a href="guide.html" target="main">User guide</a>.
</p>
</li>
</ul>
<h2>Using the <a name="jruby">JRuby</a> interpreter</h2>
<ul>
<li><p>Be sure you have downloaded the above libraries
<code>log4j-api.jar, log4j-core.jar, junit-4.12.jar, hamcrest-core-1.3.jar</code>,
and <code>jas*-bin.jar</code>.
JAS-@VERSION@ is using and has been tested with JRuby 1.7.23 (Ruby 1.9.3 compatible)
</p>
</li>
<li><p>The main file to interface to the JAS library is
<a href="../examples/jas.rb" target="rb">jas.rb</a>.
It must be required by other Ruby files.
HTML documents of the interface can be found
<a href="jruby/index.html" target="jruby">here</a>.
</p>
</li>
<li><p>Start using JAS, e.g.
</p>
<pre>
jruby -J-cp log4j-api.jar:log4j-core.jar:junit-4.12.jar:hamcrest-core-1.3.jar:. examples/trinks.rb
</pre>
<p>The
<a href="../examples/trinks.rb" target="rb">examples/trinks.rb</a>
contains an Groebner base example named after its proposer Mr. Trinks.
The file runs a sequential, a parallel and a distributed version
of the Groebner base algorithms.
</p>
</li>
<li><p>For further discussion of the JAS scripting interface
see
<a href="guide.html" target="main">User guide</a>.
</p>
</li>
</ul>
<h2>Using the <a name="ruboto-irb-jas">Ruboto-IRB-JAS</a> Android application</h2>
<p style="color: red">
The App has been developed for JAS version 2.5 on Android 5 and is
not working on current Android versions (since 2019).
</p>
<ul>
<li><p>Be sure you have installed the above Android application package
<code>ruboto-irb-jas-release.apk</code>.
It contains all required libraries and scripts.
JAS-2.5 has been tested with Android 2.3 and 4.1 and is using
JRuby 1.6.4 (Ruby 1.8.7 & 1.9.2 compatible)
</p>
</li>
<li><p>The JAS app uses the Ruby IRB <a href="http://ruboto.org/">Ruboto</a> for Android.
This is just a Ruby interpreter running on Android together with a text editor.
So all JAS JRuby scripts can be run in this environment.
The JAS Java programs are included in compiled and transformed Dalvik "dex" format.
Up to now, no functional problems have been encountered, i.e. all JAS Java code runs.
However, due to limitations in CPU speed and memory on mobile phones or tablets
eventually not all examples and problems will execute.
In 2012, comparison of a two year old Android tablet (1 GHz, 0.5 GB)
and a three year old PC (3 GHz, 4 GB) show that the examples run
about 5 times slower than on the PC.
</p>
</li>
<li><p>The main Ruboto screen with the "trinks.rb" example and its output looks as follows.
Also the arbitrary precision numbers arithmetic works on Android.
</p>
<p><a href="../images/device-2012-11-18-jas-trinks.png" ><img src="../images/device-2012-11-18-jas-trinks-thumb.png" alt="screen shot" /></a>
<a href="../images/device-2012-11-18-jas-trinks-out.png" ><img src="../images/device-2012-11-18-jas-trinks-out-thumb.png" alt="screen shot"/></a>
<a href="../images/device-2012-11-18-jas-trinks-out-big.png" ><img src="../images/device-2012-11-18-jas-trinks-out-big-thumb.png" alt="screen shot"/></a>
</p>
<p>The list of examples can be accessed via the "scripts" button.
</p>
<p><a href="../images/device-2012-11-18-jas-examples.png" ><img src="../images/device-2012-11-18-jas-examples-thumb.png" alt="screen shot"/></a>
</p>
</li>
<li><p>For further discussion of the JAS scripting interface
see
<a href="guide.html" target="main">User guide</a>.
</p>
</li>
</ul>
<hr />
<address><a name="contact"
href="mailto:kredel@at@rz.uni-mannheim.de">Heinz Kredel</a>
</address>
<p>
<!-- Created: Sat Mar 19 21:44:14 CET 2005 -->
<!-- hhmts start -->
Last modified: Mon May 30 10:33:32 CEST 2022
<!-- hhmts end -->
</p>
<!--p align="right" >
$Id$
</p-->
</body>
</html>
|