Print errors better in the repl
Load extra arguments as module files
Install stdlib.pl and repl.pl into /sys/lib/prolog/
Handle -d option in prolog
Handle the 'unknown' prolog flag correctly
Implement a bit more of prolog flag predicates set_prolog_flag/2 and current_prolog_flag/2
Pass arguments to repl/1
Replace the C repl with one written in prolog :)
Add character input/output
Make operators local to each module, and implement some more correct prettyprint code, used by write_term
Make read_term understand the three read options:
Implement sort/2 and setof/3
When binding two variables to eachother, always bind to the one with the lowest clause number
Using member and then cut always picks the first element anyways, so just pick it with = instead
Try to implement bagof/3, but I am not 100% sure it is correct
Add findall/3 implemented in prolog
Add asserta/1, assertz/1, retract/1, abolish/1 (and retract_one/1, which is retract/1 but doesn't backtrack)
Add current_predicate/1 builtin
Make the repl bindings and query global so the garbage collector can know about them
Add a hash table to make the garbage collection faster
Add a mark-sweep garbage collector
Add arithmetic comparison predicates
Implement the full arithmetic part of the ISO spec.
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
Make arg/3 work according to spec
Make functor/3 work according to spec
Fix compare/3 for variables named _. They are never equal
Add missing pre defined operators from iso prolog
Store the calling module in each goal, and fix a bug where unification could leave behind some bindings even though the unification failed.
Change the output of the repl a lille bit
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.
Turn integers and floats into seperate term types
First step on modules. Still very very rough.
Make the goalstack global just like the choicestack
Add one global choicestack so we don't need to pass it around
Start adding support for read_term and write_term
Start work on input/output streams
Begin work on set_prolog_flag/2 and current_prolog_flag/2
Remove strings, and add a (currently not changable) flag 'double_quotes' which defines how double quoted strings are stored.
Add standard error predicates
Add exceptions :) implement catch/3 and throw/1
Start implementation of is/2
Remove = from examples now that it is in stdlib
Add length/2 and member/2
Prettyprint lists for reals
Allow the repl to backtrack to give alternative results
Add comparison predicates
Add builtins for typetests
Add a standard library with the "builtins" that doesn't really need to be actual builtins
Add support for builtins, and implement true/0, fail/0, call/1, and !/0 builtins
Give queries another id than clauses, so variable names doesn't clash
Treat the variable _ differently, in that it doesn't introduce a new binding
Add backtracking to the evaluator. This means we have to keep track of choicepoints which is implemented the easy but wasteful way for now.
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
Understand :-initialization(Goal) directive
Make parse return a list of clauses. Also pretty print the entire list of clauses.
Parse terms in parenthesis correctly
Parse lists and {a,b,c} syntax (What is this even called?)
Parse , and make xfy do what it should
Fix some parser errors, and accept clauses without a body
Initial commit. Start working on a new prolog implementation for 9front, now that I at least have a better understanding of what goes into a compiler :)