| FazBrowse Wikipedia Viewer | Main Page | | |
| Viewing: https://en.wikipedia.org/wiki/Declarative_programming_language |
| Contents |
|---|
| Constraint programming |
| Modeling |
| Answer set programming |
| See also |
| References |
| External links |
In a pure functional language, such as Haskell, all functions are without side effects, and state changes are only represented as functions that transform the state, which is explicitly represented as a first-class object in the program. Although pure functional languages are non-imperative, they often provide a facility for describing the effect of a function as a series of steps.
Logic programming languages are characterized by a mostly declarative programming style. In logic programming, programs consist of sentences expressed in logical form, and computation uses those sentences to solve problems, which are also expressed in logical form.
Logic programming languages, such as Prolog, Datalog and answer set programming, compute by proving that a goal is a logical consequence of the program, or by showing that the goal is true in a model defined by the program. Prolog computes by reducing goals to subgoals, top-down using backward reasoning, whereas most Datalog systems compute bottom-up using forward reasoning. Answer set programs typically use SAT solvers to generate a model of the program.
Given this program, the query eat(X,jerry) succeeds with the answer substitution big(X) holds and then of showing that
Datalog has been applied to such problems as data integration, information extraction, networking, security, cloud computing and machine learning.
Answer set programming (ASP) evolved in the late 1990s, based on the stable model (answer set) semantics of logic programming. Like Datalog, it is a subset of Prolog; and, because it lacks compound terms, it is not Turing-complete.
Most implementations of ASP execute a program by first grounding the program, replacing all variables in rules by constants in all possible ways, and then using a propositional SAT solver, such as the DPLL algorithm to generate one or more models of the program.
Its applications are oriented towards solving difficult search problems and knowledge representation.
| Structured | |
|---|---|
| Object-oriented |
| View original on Wikipedia | Back | FazBrowse Home |