Control Constructs |
true/0 |
* |
Always succeeds. |
|
fail/0 |
* |
Always fails. |
|
false/0 |
|
Synonym for fail/0 . |
|
call/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Call |
|
!/0 |
* |
Cut. |
|
(,)/2 |
* |
Conjunction. |
|
(;)/2 |
* |
Not only disjunction but also If->Then;Else is supported. |
|
(->)/2 |
* |
If->Then. |
|
catch/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Catch |
|
throw/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Throw |
|
(\+)/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Negation |
|
once/1 |
* |
|
|
repeat/0 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Repeat |
|
halt/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Halt |
|
halt/0 |
* |
Equivalent to halt(0) . |
Unification |
(=)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Unify |
|
unify_with_occurs_check/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#UnifyWithOccursCheck |
|
(\=)/2 |
* |
Not unifiable. |
Type Testing |
var/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#TypeVar |
|
atom/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#TypeAtom |
|
integer/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#TypeInteger |
|
float/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#TypeFloat |
|
atomic/1 |
* |
|
|
compound/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#TypeCompound |
|
nonvar/1 |
* |
|
|
number/1 |
* |
number(N) if eitherinteger(N) or float(N) . |
Term Processing |
functor/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Functor |
|
arg/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Arg |
|
(=..)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Univ |
|
copy_term/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#CopyTerm |
|
compare/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#Compare |
|
(@=<)/2 |
* |
|
|
(==)/2 |
* |
|
|
(\==)/2 |
* |
|
|
(@<)/2 |
* |
|
|
(@>)/2 |
* |
|
|
(@>=)/2 |
* |
|
Arithmetic |
is/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.Is |
|
(=:=)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.Equal |
|
(=\=)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.NotEqual |
|
(<)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.LessThan |
|
(=<)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.LessThanOrEqual |
|
(>)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.LessThanOrEqual |
|
(>=)/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#FunctionSet.GreaterThanOrEqual |
Clause |
dynamic/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Dynamic |
|
built_in/1 |
|
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.BuiltIn |
|
clause/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Clause |
|
current_predicate/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CurrentPredicate |
|
asserta/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Asserta |
|
assertz/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Assertz |
|
retract/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Retract |
|
abolish/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Abolish |
All Solutions |
findall/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.FindAll |
|
bagof/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.BagOf |
|
setof/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.SetOf |
Stream |
current_input/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CurrentInput |
|
current_output/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CurrentOutput |
|
set_input/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.SetInput |
|
set_output/1 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.SetOutput |
|
open/4 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Open |
|
open/3 |
* |
open/4 without options. |
|
close/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Open |
|
close/1 |
* |
close/2 without options. |
|
stream_property/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.StreamProperty |
|
at_end_of_stream/1 |
* |
|
|
at_end_of_stream/0 |
* |
|
|
set_stream_position/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.SetStreamPosition |
Character I/O |
get_char/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.GetChar |
|
get_char/1 |
* |
|
|
get_code/2 |
* |
|
|
get_code/1 |
* |
|
|
peek_char/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.PeekChar |
|
peek_char/1 |
* |
|
|
peek_code/2 |
* |
|
|
peek_code/1 |
* |
|
|
put_char/2 |
* |
|
|
put_char/1 |
* |
|
|
put_code/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.PutCode |
|
put_code/1 |
* |
|
|
nl/1 |
* |
|
|
nl/0 |
* |
|
Binary I/O |
get_byte/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.GetByte |
|
get_byte/1 |
* |
|
|
peek_byte/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.PeekByte |
|
peek_byte/1 |
* |
|
|
put_byte/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.PutByte |
|
put_byte/1 |
* |
|
Term I/O |
read_term/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.ReadTerm |
|
read_term/2 |
* |
|
|
read/2 |
* |
|
|
read/1 |
* |
|
|
write_term/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.WriteTerm |
|
write_term/2 |
* |
|
|
write/2 |
* |
|
|
write/1 |
* |
|
|
writeq/2 |
* |
|
|
writeq/1 |
* |
|
|
write_canonical/2 |
* |
|
|
write_canonical/1 |
* |
|
Operator |
op/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.Op |
|
current_op/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CurrentOp |
Char Conversion |
char_conversion/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CharConversion |
|
current_char_conversion/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CurrentCharConversion |
Atom Processing |
atom_length/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#AtomLength |
|
atom_concat/3 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#AtomLength |
|
sub_atom/5 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#SubAtom |
|
atom_chars/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#AtomChars |
|
atom_codes/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#AtomCodes |
|
char_code/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#AtomCodes |
|
number_chars/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#NumberChars |
|
number_codes/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#NumberCodes |
Flag |
set_prolog_flag/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.SetPrologFlag |
|
current_prolog_flag/2 |
* |
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.CurrentPrologFlag |
Program |
consult/1 |
|
Load files or libraries. |
|
(.)/1 |
|
[foo, bar] is equivalent to consult([foo, bar]) . |
List Processing |
append/3 |
|
append(ListA, ListB, ListAB) means ListAB is the concatination of ListA and ListB . |
|
member/2 |
|
member(Elem, List) means Elem is a member of List . |
|
length/2 |
|
length(List, N) means N is the length of List . |
Term Expansion |
expand_term/2 |
|
https://pkg.go.dev/github.com/ichiban/prolog/engine#State.ExpandTerm |