Elxlog v0.1.6 Prove View Source
Prove Horn clause with SLD resolution
Link to this section Summary
Functions
for predicate ask/0 ask prints variables of goal
eval/2 is for is builtin predicate evaluate formula formula e.g. [:formula,[:+,x,y]]
for builtin elixir predicate add prefix "Elxfunc"
for builtin predicate "elixir" change from elxlog data to string
for builtin listing/0 /1
make list [:,:,...] size n
help function for parallel/n
Return value is tuple. {val,env,def} prove([predicate, y, env, def, n) y is succeeding predicate(s) env is environment. It is keyword-list n is nest level. Alpha conversion uses n to generate new variable.
prove_all/4 work with prove/5
evaluate native Elixir function change from function of elxlog to string. and eval as Elixir function
prove_pred/6 is for predicate x is goal to prove d is set of difinition y is succeeding goals env is environment for variables n is nest lebel
for builtin reconsult/1 parse file text and add difinition
when trace is true in def print trace data n is nest lebel action [try,succ,fail]
unificate x and y env is environment. e.g. [[{:X,1},{:Y,2}],[{:Y,2},3] old variable is always left side in each environment element
Link to this section Functions
for predicate ask/0 ask prints variables of goal
eval/2 is for is builtin predicate evaluate formula formula e.g. [:formula,[:+,x,y]]
for builtin elixir predicate add prefix "Elxfunc"
for builtin predicate "elixir" change from elxlog data to string
for builtin listing/0 /1
make list [:,:,...] size n
help function for parallel/n
Return value is tuple. {val,env,def} prove([predicate, y, env, def, n) y is succeeding predicate(s) env is environment. It is keyword-list n is nest level. Alpha conversion uses n to generate new variable.
example
iex>Prove.prove([:builtin,[:true]],[],[],[],0) {true,[],[]} iex>Prove.prove([:builtin,[:fail]],[],[],[],0) {false,[],[]}
prove_all/4 work with prove/5
evaluate native Elixir function change from function of elxlog to string. and eval as Elixir function
prove_pred/6 is for predicate x is goal to prove d is set of difinition y is succeeding goals env is environment for variables n is nest lebel
for builtin reconsult/1 parse file text and add difinition
when trace is true in def print trace data n is nest lebel action [try,succ,fail]
unificate x and y env is environment. e.g. [[{:X,1},{:Y,2}],[{:Y,2},3] old variable is always left side in each environment element