Unification: Matching a query against facts/rules by binding variables so both sides become identical. Unification is the matching process at the heart of logic programming. To answer a query, the engine tries to make the query and a fact or rule identical by assigning values to variables. Matching parent(alice, X) with the fact parent(alice, bob) succeeds by binding X to bob. If no binding makes both sides the same, unification fails and the engine backtracks to try something else.
The same idea appears outside Prolog. Type inference in languages like Haskell, TypeScript and Rust uses unification to work out types you did not write. Pattern matching in modern languages, such as match in Rust or destructuring in JavaScript, is a simpler cousin: you describe a shape, and the language checks the value against it and extracts the parts.
Implement proven backend architecture patterns including Clean Architecture, Hexagonal Architecture, and Domain-Driven Design. Use this skill when designing clean architecture for a new microservice, when refactoring a monolith to use bounded contexts, when implementing hexagonal or onion architecture patterns, or when debugging dependency cycles between application layers.