Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
747 views
in Technique[技术] by (71.8m points)

prolog - Non-linearity of Wielemaker-Demoen Unification

This is a follow up to the question here about acyclic terms. I am now interested in cyclic terms, and it seems their unification is not anymore linear in the Wielemaker-Demoen unification. The test case is basically:

?- X = f(f(X)), Y = f(f(f(Y))), X = Y.
X = Y, Y = f(f(f(Y))).

But we use larger number of function symbol iteration, and we also use arity 2 of the function symbol, and not only arity 1. For n=10,30,50,70 I get this quadratic behaviour, series 1 is the measured time of (=)/2 and series 2 is n*(n+1)/2:

enter image description here

Is there some impossibility theorem that would say unification for cyclic terms cannot be linear. Or otherwise might unification for cyclic terms also fall under the Patterson-Wegman unification, and therefore could be made linear?

Open source:

Linear or Exponential III?
https://gist.github.com/jburse/279b6280ab4311de456e458a7386c1da#file-bart-pl

question from:https://stackoverflow.com/questions/65892060/non-linearity-of-wielemaker-demoen-unification

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...