RSS feed
2bf351a2
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 18:29
Silence warning about singleton variables in system.pl and loader.pl
9cc17961
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 18:24
Fix ; again haha, I can't just wrap variable goals in call/1 due to cuts being local in a call
48da622d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 17:54
Big commit changing the way the system is loaded at startup.
0f347162
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 15:35
Implement halt/0, halt/1, and understand the --no-repl flag
77c7fea4
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 15:18
Use addgoals to add the goal in catch/3 to the goalstack, allowing mod:pred goals too
2bda2a9d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 14:52
Understand set_prolog_flag directive
d7a4ae65
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 14:48
Understand initialization/1 directives
5fe8b986
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 14:24
Make predicates private and static by default, and make them dynamic when using the dynamic/1 predicate
fd10cf69
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 13:36
Fix singleton warnings in repl.pl
463f3b41
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 13:35
Warn about singleton variables in clauses, as it is often a sign of a mis-spelling
0cf3816c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 12:58
Actually load repl.pl with the prolog loader, and handle module directives
b1f62daf
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/22 12:37
Use the prolog loader to load the repl.
88841b19
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 20:12
Always use a fresh clausenr for read teams, and make sure to update the clausenr in call/1, so cuts are local to that call
085e3595
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 19:33
The iso standard want's call(G) to throw a type_error(callable, G), when G contains parts that cannot be called, but it is
0478e693
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 19:17
Throw errors when trying to evaluate goals that cannot be evaluated
901224d3
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 18:38
Add support for character code constants like 0'a
0c22d3d7
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 18:28
Add a bit of a hack to the parser so it can parse (a) op arg when a is an operator
42be2751
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 18:07
Support '' in tokens
24cdc7ad
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 17:58
Add a new work in progress loader to load all user defined modules
90664173
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 14:11
Add a space between printout and ; or .
e6ce8b1d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/20 14:05
Add op/3 and current_op/3
1c840d5c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/19 10:40
Update TODO
6c539b4d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/19 10:26
Try to print A = B instead of A = _X, B = _X when two variables are equal
6b3d59a3
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/19 09:12
Print errors better in the repl
1b73b6d1
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/19 08:44
More work on streams
daadb2b1
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/18 14:22
Load extra arguments as module files
18ae80ea
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/18 09:08
Install stdlib.pl and repl.pl into /sys/lib/prolog/
8a1e32e6
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/16 16:30
Handle -d option in prolog
c8867502
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/16 16:22
Handle the 'unknown' prolog flag correctly
3f316c5c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/16 16:09
Implement a bit more of prolog flag predicates set_prolog_flag/2 and current_prolog_flag/2
8ef27e2f
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/16 11:36
Pass arguments to repl/1
480de114
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/16 11:25
Replace the C repl with one written in prolog :)
ee65a81e
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/16 10:19
Add character input/output
1c878919
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/15 20:42
Make operators local to each module, and implement some more correct prettyprint code, used by write_term
2a77288e
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/15 18:04
Make read_term understand the three read options:
d4fc86d5
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/13 15:58
Add atom_concat/3
9fd0e7fc
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/13 15:57
Add atom_codes/2
6d3d4a2d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/13 14:51
Add atom_length/2
9d5c9d3f
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/13 14:36
Implement sort/2 and setof/3
9b4f1752
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/13 14:35
When binding two variables to eachother, always bind to the one with the lowest clause number
a40a18fc
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/11 14:53
Using member and then cut always picks the first element anyways, so just pick it with = instead
81fa4d4a
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/11 14:50
Try to implement bagof/3, but I am not 100% sure it is correct
48c0638c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/10 06:45
Add findall/3 implemented in prolog
a37ae2f0
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/09 16:09
Add asserta/1, assertz/1, retract/1, abolish/1 (and retract_one/1, which is retract/1 but doesn't backtrack)
d2a08281
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/08 17:54
Add current_predicate/1 builtin
e9f5f2ff
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/08 17:22
Make the repl bindings and query global so the garbage collector can know about them
6dd50f97
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/08 16:29
Add a hash table to make the garbage collection faster
28e7dd47
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/08 13:07
Add a mark-sweep garbage collector
96639193
– Peter Mikkelsen <petermikkelsen10@gmail.com>
authored
on 2021/07/08 13:53
Add license
58e0109e
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 21:40
Add clause/2 predicate
2dce50fb
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 20:49
Add arithmetic comparison predicates
3844776a
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 20:49
Update todo
7441a094
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 20:16
Implement the full arithmetic part of the ISO spec.
e6a38aa9
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 12:44
Add copy_term/2
0f958749
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 12:32
Make '=..'/2 work according to spec. Introduce types.c for functions which tells us something about term types. Should be used a lot more instead of explicitly looking into terms->tag everywhere
73b9bad8
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 11:56
Oops remove debug print
68c6243c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 11:54
Make arg/3 work according to spec
3e1e9621
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 11:42
Make functor/3 work according to spec
91f737e4
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 11:11
Fix compare/3 for variables named _. They are never equal
660d7d81
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/07 11:01
Add missing pre defined operators from iso prolog
95f874fe
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/06 17:54
Add list module
03738c67
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/06 17:23
Store the calling module in each goal, and fix a bug where unification could leave behind some bindings even though the unification failed.
a0eb2bb2
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/06 14:00
Change the output of the repl a lille bit
0c45e33c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/06 13:45
Group clauses into predicates, and create all valid choicepoints at once. This is wastefull if one branch loops forever, but it is much nicer otherwise, since we know the choicepoints only gets created as long as their head is unifiable with the goal.
bdcc02a5
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/05 12:59
Turn integers and floats into seperate term types
44ab8a33
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/05 12:27
First step on modules. Still very very rough.
3f26a0f2
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/03 17:16
Make the goalstack global just like the choicestack
66a7040d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/03 16:59
Add one global choicestack so we don't need to pass it around
7db38904
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/03 14:58
Start adding support for read_term and write_term
d8144752
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/02 18:01
Start work on input/output streams
8dd4f85c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/02 13:55
Fix Throw(What) macro
be26a1ce
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/02 13:50
Begin work on set_prolog_flag/2 and current_prolog_flag/2
2bfb79be
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/02 12:59
Remove strings, and add a (currently not changable) flag 'double_quotes' which defines how double quoted strings are stored.
855fd0a5
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/01 16:39
Add standard error predicates
e5ab41fa
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/07/01 15:55
Add exceptions :) implement catch/3 and throw/1
329c6975
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 20:52
Start implementation of is/2
2c166a14
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 20:25
Remove = from examples now that it is in stdlib
1ca36700
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 19:53
Add length/2 and member/2
d5ac4148
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 19:48
Prettyprint lists for reals
85adea62
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 19:30
Allow the repl to backtrack to give alternative results
fa83d3f1
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 18:43
Add =../2
a106f8db
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 17:38
Add arg/3
afbd5688
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 17:17
Add functor/3
ff418c79
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 16:51
Add comparison predicates
a8b1fadd
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 15:33
Add builtins for typetests
baea4aa9
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 13:48
Add a standard library with the "builtins" that doesn't really need to be actual builtins
50f83a91
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 13:03
Add support for builtins, and implement true/0, fail/0, call/1, and !/0 builtins
347e5bc5
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 10:15
Give queries another id than clauses, so variable names doesn't clash
8fde6e48
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 10:04
Commit repl.c file
ee4298a2
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/30 10:04
Add a basic repl
79d1fe1c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 22:05
Add todo
67e8b85a
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 22:01
Treat the variable _ differently, in that it doesn't introduce a new binding
2c3e688c
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 21:58
Add backtracking to the evaluator. This means we have to keep track of choicepoints which is implemented the easy but wasteful way for now.
d5ce41f0
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 20:07
Start work on an evaluator. For now it knows how to unify but doesn't know how to handle builtin predicates or how to backtrack
9799fbd9
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 14:46
Understand :-initialization(Goal) directive
a27a5c52
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 14:31
Add more operators
50768fba
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 14:21
Make parse return a list of clauses. Also pretty print the entire list of clauses.
64a411ed
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 13:58
Parse terms in parenthesis correctly
6ae2e2bb
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 13:51
Parse lists and {a,b,c} syntax (What is this even called?)
2d7f3ffa
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 12:38
Parse , and make xfy do what it should
Next