A number of other common definitions attempt to define it by simply contrasting it with imperative programming.
DSLs have the advantage of being useful while not necessarily needing to be Turing-complete, which makes it easier for a language to be purely declarative.
Such systems, typically using a domain-specific XML namespace, may include abstractions of SQL database syntax or parameterized calls to web services using representational state transfer (REST) and SOAP.
Instead, computations are characterised by various kinds of recursive higher-order function application and composition, and as such can be regarded simply as a set of mappings between domains and codomains.
Makefiles, for example, specify dependencies in a declarative fashion,[7] but include an imperative list of actions to take as well.
Similarly, yacc specifies a context free grammar declaratively, but includes code snippets from a host language, which is usually imperative (such as C).
Models, or mathematical representations, of physical systems may be implemented in computer code that is declarative.
The code contains a number of equations, not imperative assignments, that describe ("declare") the behavioral relationships.
When a model is expressed in this formalism, a computer is able to perform algebraic manipulations to best formulate the solution algorithm.
[8] Lisp is a family of programming languages loosely inspired by mathematical notation and Alonzo Church's lambda calculus.
Some dialects, such as Common Lisp, are primarily imperative but support functional programming.
[10] ML is not as bracket-centric as Lisp, and instead uses a wider variety of syntax to codify the relationship between code elements, rather than appealing to list ordering and nesting to express everything.
Prolog executes programs top-down, using SLD resolution to reason backwards, reducing goals to subgoals.
The origins of Datalog date back to the beginning of logic programming, but it was identified as a separate area around 1977.
It would then terminate, both because no new, additional facts can be derived, and because the newly derived fact unifies with the query Datalog has been applied to such problems as data integration, information extraction, networking, security, cloud computing and machine learning.