Skip to content

Commit

Permalink
Improve and fix parts of doc
Browse files Browse the repository at this point in the history
  • Loading branch information
ssardina committed Jun 17, 2020
1 parent 62b783c commit a490b51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -51,3 +51,4 @@ packages-jpl.iml
SWIJPL-development.md
scratch/
docs/javadoc-new/
notes.txt
8 changes: 4 additions & 4 deletions docs/DeploymentLinux.md
Expand Up @@ -12,7 +12,7 @@ To use JPL under Linux one must have the following in place (here showing the lo
* The Java API JAR file `jpl.jar` in `$SWI_HOME_DIR/lib/jpl.jar`.
* The Prolog API as an SWIPL source module `jpl.pl` at `$SWI_HOME_DIR/library`.

**_What does an embedded application ned to find?_**
**_What does an embedded application need to find?_**

* The Java API via `jpl.jar`. This needs to be in the `CLASSPATH`.
* All Prolog `.pl` core libraries, including `jpl.pl`. These are found relative to SWIPL's home: `$SWI_HOME_DIR/library`
Expand Down Expand Up @@ -42,7 +42,7 @@ However, if your embedded application must use an SWIPL & JPL version that is _n

To use the SWIPL install in the **standard distribution** install location:

```shell script
```bash
SWI_HOME_DIR=/usr/lib/swi-prolog/ # if default binary not pointing to this version
LD_LIBRARY_PATH=/usr/lib/swi-prolog/lib/x86_64-linux/ # to find all .so, including libjpl.so
CLASSPATH=/usr/lib/swi-prolog/lib/jpl.jar # Java API
Expand All @@ -53,7 +53,7 @@ LD_PRELOAD=/usr/lib/libswipl.so # core SWIPL

Alternatively, if you have **compiled and installed** an SWIPL system, say, under directory `/usr/local/swipl-git/`, then:

```shell script
```bash
SWI_HOME_DIR=/usr/local/swipl-git/lib/swipl/ # if binary exec not pointing to this SWIPL
LD_LIBRARY_PATH=/usr/local/swipl-git/lib/swipl/lib/x86_64-linux/ # to find all .so, including libjpl.so
CLASSPATH=/usr/local/swipl-git/lib/swipl/lib/jpl.jar
Expand All @@ -62,7 +62,7 @@ LD_PRELOAD=/usr/local/swipl-git/lib/swipl/lib/x86_64-linux/libswipl.so # see be

or in one line (for IDE Run configurations, for example):

```shell script
```bash
CLASSPATH=/usr/local/swipl-git/lib/swipl/lib/jpl.jar;LD_LIBRARY_PATH=/usr/local/swipl-git/lib/swipl/lib/x86_64-linux/;LD_PRELOAD=/usr/local/swipl-git/lib/swipl/lib/x86_64-linux/libswipl.so;SWI_HOME_DIR=/usr/local/swipl-git/lib/swipl/
```

Expand Down
16 changes: 8 additions & 8 deletions docs/JavaApiOverview.md
Expand Up @@ -218,14 +218,14 @@ As the [new Variable semantics from](https://jpl7.org/ReleaseNotes3000 section)
In the following example, even though two Variables instances are different and use in different queries, they are equal under `.equals()`:

```java
Variable v1 = new Variable("X");
Variable v2 = new Variable("X");

Term s1 = new Query("? = 5", v1).oneSolution().get("X");
Term s2 = new Query("? = 15", v2).oneSolution().get("X");
boolean same_var = v1.equals(s2); // evaluates to True
boolean same_bindings = s1.equals(s2); // evaluates to False
Variable v1 = new Variable("X");
Variable v2 = new Variable("X");

Term s1 = new Query("? = 5", v1).oneSolution().get("X");
Term s2 = new Query("? = 15", v2).oneSolution().get("X");

boolean same_var = v1.equals(s2); // evaluates to True
boolean same_bindings = s1.equals(s2); // evaluates to False
```

The anonymous variable "`_`" is not equal to any other variable (including itself!), as it cannot be interchangeably used (every of its use is different).
Expand Down

0 comments on commit a490b51

Please sign in to comment.