summaryrefslogtreecommitdiff
path: root/dat.h
AgeCommit message (Collapse)Author
2021-07-27Don't use strings to identify vars, use numbersPeter Mikkelsen
2021-07-24Reduce size of the Term struct from about 72 bytes to 48Peter Mikkelsen
2021-07-22Big commit changing the way the system is loaded at startup.Peter Mikkelsen
1) The loader and system modules are loaded by the C directly into the user module 2) The system module is then loaded with the loader from the user module 3) The loader module is then loaded with the loader from the user module 4) The repl is then loaded with the loader from the loader module 5) The user module is cleared
2021-07-20Add a bit of a hack to the parser so it can parse (a) op arg when a is an ↵Peter Mikkelsen
operator
2021-07-16Handle -d option in prologPeter Mikkelsen
2021-07-16Implement a bit more of prolog flag predicates set_prolog_flag/2 and ↵Peter Mikkelsen
current_prolog_flag/2
2021-07-16Replace the C repl with one written in prolog :)Peter Mikkelsen
2021-07-16Make operators local to each module, and implement some more correct ↵Peter Mikkelsen
prettyprint code, used by write_term
2021-07-09Add asserta/1, assertz/1, retract/1, abolish/1 (and retract_one/1, which is ↵Peter Mikkelsen
retract/1 but doesn't backtrack)
2021-07-08Add current_predicate/1 builtinPeter Mikkelsen
2021-07-08Make the repl bindings and query global so the garbage collector can know ↵Peter Mikkelsen
about them
2021-07-08Add clause/2 predicatePeter Mikkelsen
2021-07-07Add copy_term/2Peter Mikkelsen
2021-07-06Store the calling module in each goal, and fix a bug where unification could ↵Peter Mikkelsen
leave behind some bindings even though the unification failed.
2021-07-06Group clauses into predicates, and create all valid choicepoints at once. ↵Peter Mikkelsen
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.
2021-07-05Turn integers and floats into seperate term typesPeter Mikkelsen
2021-07-05First step on modules. Still very very rough.Peter Mikkelsen
2021-07-03Make the goalstack global just like the choicestackPeter Mikkelsen
2021-07-03Add one global choicestack so we don't need to pass it aroundPeter Mikkelsen
2021-07-02Remove strings, and add a (currently not changable) flag 'double_quotes' ↵Peter Mikkelsen
which defines how double quoted strings are stored.
2021-07-01Add exceptions :) implement catch/3 and throw/1Peter Mikkelsen
2021-06-30Add comparison predicatesPeter Mikkelsen
2021-06-30Add support for builtins, and implement true/0, fail/0, call/1, and !/0 builtinsPeter Mikkelsen
2021-06-30Add a basic replPeter Mikkelsen
2021-06-30Add backtracking to the evaluator. This means we have to keep track of ↵Peter Mikkelsen
choicepoints which is implemented the easy but wasteful way for now. I have also added a number which is used to differentiate variables from different application of the clauses.
2021-06-29Understand :-initialization(Goal) directivePeter Mikkelsen
2021-06-29Add a term parser.Peter Mikkelsen
2021-06-28Initial commit. Start working on a new prolog implementation for 9front, now ↵Peter Mikkelsen
that I at least have a better understanding of what goes into a compiler :)