File: ReleaseNotes760.md

package info (click to toggle)
swi-prolog 9.0.4%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 82,408 kB
  • sloc: ansic: 387,503; perl: 359,326; cpp: 6,613; lisp: 6,247; java: 5,540; sh: 3,147; javascript: 2,668; python: 1,900; ruby: 1,594; yacc: 845; makefile: 428; xml: 317; sed: 12; sql: 6
file content (27 lines) | stat: -rw-r--r-- 1,660 bytes parent folder | download | duplicates (3)
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
# Release Notes - 7.6.0

Uses Java source 1.7.

- New `org.jpl7.Rational` type to handle [SWI rationals](https://www.swi-prolog.org/pldoc/man?section=rational).
- Refactored several methods dealing with JPL terms, from `org.jpl7.Util` to `org.jpl7.Term`:
    - `Term textToTerm(String text)`
    - `String[] atomListToStringArray(Term t)` 
    - `static Term intArrayArrayToList(int[][] a)`
    - `Term intArrayToList(int[] a)`
    - `boolean isList(Term term)`
    - `int listToLength(Term term)`
    - `Term[] listToTermArray(Term t)`
    - `Term stringArrayToList(String[] a)`
    - `Term termArrayToList(Term[] terms)`
- Added a textual mode for `Term.toString()` to convert non-empty lists in Prolog textual style `[e2, e2, ..., en]` instead of the pre-fix functor-based style `'[|]'(e1, '[|]'(e2, '[|]'(...,'[|]'(en,'[]')..)`.
    - This textual mode is used when `JPL.LIST_TOSTRING_TEXTUAL` is True (default is True); otherwise default pre-fix style is used.
- Added specific section for lists in documentation.
        
## Internal

- More direct and simpler `Term.textToTerm(String text)` without using 
`getSolutionWithVarNames` and by renaming anonymous Variable terms to give them the textual name.
- Migrated unit testing from JUnit3 to JUnit4. 
    - Refactored the unit testing test suite; all test files subclass of `org.jpl7.java.test.junit.JPLTest`.
- Modified init arguments and CMAKE configuration for SWI embeded engine unit testing to fix issue with engine not loading libraries. No more use of `libswipl.dll` as first argument; all packages available in unit tetsing now.
- Added some static versions of instance methods in class `Term`.