Closed s-webber closed 9 years ago
Reviewed solutions to "1. Prolog Lists" section - required functionality currently missing from Projog are:
append/3
- raised #23 CLOSEDensure_loaded/1
(a synonym for the existing consult/1
predicate) - raised #22 CLOSEDis_list/1
- raised #18 CLOSEDsubtract/3
- raised #19 CLOSEDkeysort/2
- raised #21 CLOSEDflatten/2
- raised #27 CLOSEDrandom
(an arithmetic function that takes one argument) - raised #20 CLOSEDReviewed solutions to "2. Arithmetic" section - required functionality currently missing from Projog are:
arithmetic_function/1
- raised #30 CLOSEDwritef/2
- raised #41 CLOSEDtime/1
(a synonym for the existing call/1
predicate) - raised #53 CLOSED//
(an arithmetic function for integer division) - raised #25 CLOSEDReviewed solutions to "3. Logic and Codes" section - required functionality currently missing from Projog are:
not/1
(a synonym for the existing \+
predicate) - raised #29 CLOSEDsort/2
- raised #42 CLOSEDReviewed solutions to "4. Binary Trees" section - required functionality currently missing from Projog are:
between/3
- raised #43 CLOSEDnth/3
- raised #44 CLOSEDchar_type/2
- raised #70 CLOSED**
("to the power of" arithmetic function) - raised #47 CLOSED>>
(bit shift right arithmetic function) - raised #51 CLOSED/\
(bitwise "and" arithmetic function) - raised #52 CLOSEDmax
- raised #98 CLOSEDReviewed solutions to "5. Multiway Trees" - no new functionality required.
Reviewed solutions to "6. Graphs" section - required functionality currently missing from Projog are:
delete/3
- raised #46 CLOSEDselect/3
- raised #48 CLOSEDsubset/2
- raised #49 CLOSEDsublist/3
- raised #97 CLOSEDcompare/3
- raised #45 CLOSEDpredsort/3
- raised #61 CLOSEDseen
- raised #65 CLOSEDretractall/1
- raised #81 CLOSEDrecorded/3
- raised #75 CLOSEDrecorded/2
- raised #77 CLOSEDerase/1
- raised #79 CLOSEDrecorda/2
- raised #109 CLOSEDrecordz/2
- raised #78 CLOSEDtell/1
- raised #101 CLOSEDtold
- raised #104 CLOSED assert/1
- raised #100 CLOSED statistics/2
- raised #103 WON'T FIXmaplist/3
- raised #105 CLOSED(A number of these missing features are to do with the adding and removal of items in the knowledge base.)
Reviewed solutions to "7. Miscellaneous" section - required functionality currently missing from Projog are:
flag/3
- raised #55 CLOSEDchecklist/2
- raised #96 CLOSEDsee/1
- raised #66 CLOSEDseeing/1
(a synonym for the existing current_input/1
predicate) - raised #54 CLOSEDget_time/1
- raised #56 CLOSEDconvert_time/2
- raised #57 CLOSEDOutput from running some of the example solutions:
p7_07.pl - Sudoku puzzle solver
> projog-console p7_07.pl
[20060653] INFO Reading prolog source in: projog-bootstrap.pl from classpath
Projog Console
www.projog.org
[20060653] INFO Reading prolog source in: tmp\99problems\p7_07.pl from file system
?- test(1).
. . 4 | 8 . . | . 1 7
| |
6 7 . | 9 . . | . . .
| |
5 . 8 | . 3 . | . . 4
--------+---------+--------
3 . . | 7 4 . | 1 . .
| |
. 6 9 | . . . | 7 8 .
| |
. . 1 | . 6 9 | . . 5
--------+---------+--------
1 . . | . 8 . | 3 . 6
| |
. . . | . . 6 | . 9 1
| |
2 4 . | . . 1 | 5 . .
9 3 4 | 8 2 5 | 6 1 7
| |
6 7 2 | 9 1 4 | 8 5 3
| |
5 1 8 | 6 3 7 | 9 2 4
--------+---------+--------
3 2 5 | 7 4 8 | 1 6 9
| |
4 6 9 | 1 5 3 | 7 8 2
| |
7 8 1 | 2 6 9 | 4 3 5
--------+---------+--------
1 9 7 | 5 8 2 | 3 4 6
| |
8 5 3 | 4 7 6 | 2 9 1
| |
2 4 6 | 3 9 1 | 5 7 8
1 solution
yes ;
no
?- test(2).
3 . . | . 7 1 | . . .
| |
. 5 . | . . . | 1 8 .
| |
. 4 . | 8 . . | . . .
--------+---------+--------
. . 6 | 2 . . | 3 . .
| |
. . 1 | . 5 . | 8 . .
| |
. . 3 | . . 8 | 2 . .
--------+---------+--------
. . . | . . 3 | . 4 .
| |
. 6 4 | . . . | . 7 .
| |
. . . | 9 6 . | . . 1
3 8 9 | 5 7 1 | 4 6 2
| |
6 5 7 | 4 3 2 | 1 8 9
| |
1 4 2 | 8 9 6 | 7 3 5
--------+---------+--------
8 7 6 | 2 1 9 | 3 5 4
| |
4 2 1 | 3 5 7 | 8 9 6
| |
5 9 3 | 6 4 8 | 2 1 7
--------+---------+--------
9 1 5 | 7 2 3 | 6 4 8
| |
2 6 4 | 1 8 5 | 9 7 3
| |
7 3 8 | 9 6 4 | 5 2 1
1 solution
yes ;
no
p7_08.pl - Nonogram puzzle solver
> projog-console p7_08.pl
[20060653] INFO Reading prolog source in: projog-bootstrap.pl from classpath
Projog Console
www.projog.org
[20060653] INFO Reading prolog source in: p7_08.pl from file system
?- test('Hen',1).
* * * 3
* * * 2 1
* * * * * 3 2
* * * * 2 2
* * * * * * 6
* * * * * * 1 5
* * * * * * 6
* 1
* * 2
1 3 1 7 5 3 4 3
2 1 5 1
yes ;
no
p7_09.pl - Wordfit puzzle solver
>projog-console p7_09.pl
[20060653] INFO Reading prolog source in: projog-bootstrap.pl from classpath
Projog Console
www.projog.org
[20060653] INFO Reading prolog source in: p7_09.pl from file system
[20060653] INFO Reading prolog source in: p7_09-readfile.pl from file system
[15061333] WARN Not defined: crossword
[20060653] INFO Reading prolog source in: p1_28.pl from file system
?- crossword('p7_09b.dat',2).
|P TUEBINGEN TRAUBENZUCKER|
|R A E A R I|
|O TEMPERAMENT FORTUNA V|
|T T F E N I|
|EGERIA ZEUS T SAMPAN K E|
|K R E T U E R|
|T S WALZER LIANE MADONNA|
|O A A A TAL N U K |
|RELIGION R N R TIARA|
|A L G K U I S I S |
|T O E STOIKER L S |
| GRANAT F L E OSTEN |
| E S F L I C|
| G TURKMENEN VENDETTA H|
| I B N R L T T R|
| ISEL T U H STETTIN T O|
|S T A E P I T DER N|
|E E S R E BRIEFTAUBE A O|
|KARRE T L T A I K G|
|U A E AAL M T T R|
|N ALLENSTEIN N I A I A|
|D L T K S L O P|
|EOSIN USAMBARA SERBIEN H|
| E H R R E I|
|HANNIBAL MELASSE NONNE|
yes ;
no
Note: did not implement statistics/2
- but #103 describes workaround.
There are a collection of 99 Prolog Problems hosted at:
https://sites.google.com/site/prologsite/prolog-problems
What is required to make the provided solutions to these problems work with Projog?
i.e. What functionality required by the solutions is not already provided by the built-in predicates and arithmetic functions of Projog?