Questions tagged [unification]

Unification, in computer science and logic, is an algorithmic process by which one attempts to solve the satisfiability problem. The goal of unification is to find a substitution which demonstrates that two seemingly different terms are in fact either identical or just equal.

Unification, in computer science and logic, is an algorithmic process by which one attempts to solve the satisfiability problem. The goal of unification is to find a substitution which demonstrates that two seemingly different terms are in fact either identical or just equal.

Unification is widely used in automated reasoning, logic programming and programming language type system implementation. In particular, it is widely used in type deduction for example in C++ templates type deduction or in functional language such as Scala/Ocaml/Haskell type synthesis.

Several kinds of unification are commonly studied: syntactic unification (for theories without any equations) and semantic unification (for non-empty equational theories).

See also

228 questions
0
votes
1 answer

Unification engine sharing with instagram giving execution error

When I am using code as per unification engine then its working fine but I am getting this error in our end Requests_Exception in cURL.php line 422: cURL error 28: Operation timed out after 10000 milliseconds with 0 bytes received But when I am…
user7633958
0
votes
1 answer

Unificationegine not working with instagarm sharing

I am getting this error when using unificationegine in php and in CURL $app = new UEApp("590f402bd2a043f98823eb1964230b2ab","a62c855ae17b5c7acb2345fabfbcc3a93"); $user = new UEUser("039c8b4b-58f6-46f6-b872-fsdc71e57eda",…
0
votes
1 answer

Unificationengine giving error when I am sharing message on intagram

When I am sending posting a message by unificationegine then I am getting this error.But my password is correct Exception in UEUser.php line 74: The password you entered is incorrect. Please try again. I am using whole API by this format Instagram…
Kuldeep Raj
  • 791
  • 1
  • 7
  • 29
0
votes
1 answer

Unificationengine not working with instagram

When I am sharing a message on instagram by UnificationEngine then I am getting this error: Exception in UEUser.php line 74: The password you entered is incorrect. Please try again in UEUser.php line 74 at UEUser->add_connection('instagramBoard',…
Kuldeep Raj
  • 791
  • 1
  • 7
  • 29
0
votes
0 answers

Swi Prolog Editor only shows false, not true

Assume my knowledge base contains one fact: fact(fact1). If I know submit a query fact(fact1). 39 ?- fact(fact1). 40 ?- it says nothing, which is the equivalent to true. B/c if it's wrong, Prolog responds with false: 38 ?-…
InDaPond
  • 574
  • 3
  • 6
  • 23
0
votes
1 answer

Weird unification in Prolog

I have the following program: %% adjacent((Xs, Ys), (Xa, Ya)) - is adjacent to . adjacent((Xs, Ys), (Right, Ys)) :- Right is Xs + 1. adjacent((Xs, Ys), (Left, Ys)) :- Left is Xs - 1. adjacent((Xs, Ys), (Xs, Up)) :- Up is Ys +…
0
votes
2 answers

How does Prolog answer this query?

likes(alice, sports). likes(alice, music). likes(carol, music). likes(david,animals). likes(david,X) :- likes(X,sports). likes(alice,X) :- likes(david,X). ?- likes(alice,X). I've been trying to learn prolog an few days now, and when I attempted…
FutureSci
  • 1,750
  • 1
  • 19
  • 27
0
votes
1 answer

GHC do not resolve correctly constraint in typeclass methods (ghc bug / limitation ?)

GHC do not resolve / propagate constraint in the default implementation of some of my class members. The behaviour is really strange and it seems to me like it's a bug. Can someone help me / explain to me what's wrong ? How can I tell GHC to unify…
Rvion
  • 124
  • 5
0
votes
2 answers

An apply that doesn't seem like it should unify is allowed

I'm running into what I believe could be a bug in Coq 8.4pl5. Given this proof state: 1 subgoal st : state a : sinstr a0 : list sinstr b : list sinstr IHa : forall stack : list nat, s_execute st stack (a0 ++ b) = s_execute st (s_execute st…
David Young
  • 10,713
  • 2
  • 33
  • 47
0
votes
2 answers

Idris - Can't evaluate function application in type

I'm getting a problem where I have a value with type fun a, with fun being a function and a a value which doesn't get computed at type-checking and throws an unification error when I force it to be the result of that function application. The…
gonzaw
  • 771
  • 4
  • 17
0
votes
2 answers

The most general type of "product" of two functions in Haskell

I must find the most general type from given functions in Haskell, or rather find the most general type of the "product" of two functions, if it exists. I am not sure but maybe I should use Robinson unification algorithm, but I can't understand it.…
Vucicasena
  • 69
  • 5
0
votes
2 answers

Prolog list unification

I am trying to further my understanding of Prolog, and how it handles list unification. So I am stuck with this example, that I know the answer as I execute the code, but I cannot understand how it works. [X,a,X,f(X,a)|Y] = [Z,Z|Y] The answer…
badm
  • 15
  • 4
0
votes
0 answers

How to unify variables in SMT-LIB

I am trying to do this in SMT-LIB, running z3 -smt2 script.smt2 on the script containing these expressions: (set-logic AUFLIA) (declare-fun a () Int) (declare-fun b () Int) (declare-fun c () Int) (declare-fun d () Int) (declare-fun e ()…
ndb
  • 127
  • 1
  • 10
0
votes
0 answers

Prolog | Unification

I have the follow terms : 3 p(X) 3 p(x, X) 3 p(x,_) My question is regarding unification. For example: would "3" unify with "p(X)" [Some p, doesn't matter atm] Now, my gut feeling is this : First term will unify (X = 3) Second term will unify (…
Aviad
  • 3,424
  • 3
  • 14
  • 21
0
votes
0 answers

Type-level unification and Value-level pattern-matching with Encapsulated types

I'm trying to simplify a composite data type, but don't know the best way. Here is my code so far: data Init a b c d = Init a b c d data Wrap a = WNil (Init a b c d) | WCons a (Wrap a) The issue I keep seeing is probably obvious - I…
Athan Clark
  • 3,886
  • 2
  • 21
  • 39