RSS feed
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
8fdf0bc6
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 12:28
Fix some parser errors, and accept clauses without a body
02145f06
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/29 11:51
Add a term parser.
0b36426d
– Peter Mikkelsen <peter@pmikkelsen.com>
authored
on 2021/06/28 18:31
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 :)