HOME



picture info

Syntax And Semantics Of Logic Programming
Logic programming is a programming paradigm that includes languages based on formal logic, including Datalog and Prolog. This article describes the syntax and semantics of the purely declarative subset of these languages. Confusingly, the name "logic programming" also refers to a programming language that roughly corresponds to the declarative subset of Prolog. Unfortunately, the term must be used in both senses in this article. Declarative logic programs consist entirely of ''rules'' of the form H :- B1, ..., BN. Each such rule can be read as an implication: :B_1\land\ldots\land B_n\rightarrow H meaning "If each B_i is true, then H is true". Logic programs compute the set of facts that are implied by their rules. Many implementations of Datalog, Prolog, and related languages add procedural features such as Prolog's Cut (logic programming), cut operator or extra-logical features such as a foreign function interface. The formal semantics of such extensions are beyond the ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Logic Programming
Logic programming is a programming, database and knowledge representation paradigm based on formal logic. A logic program is a set of sentences in logical form, representing knowledge about some problem domain. Computation is performed by applying logical reasoning to that knowledge, to solve problems in the domain. Major logic programming language families include Prolog, Answer Set Programming (ASP) and Datalog. In all of these languages, rules are written in the form of ''clauses'': :A :- B1, ..., Bn. and are read as declarative sentences in logical form: :A if B1 and ... and Bn. A is called the ''head'' of the rule, B1, ..., Bn is called the ''body'', and the Bi are called '' literals'' or conditions. When n = 0, the rule is called a ''fact'' and is written in the simplified form: :A. Queries (or goals) have the same syntax as the bodies of rules and are commonly written in the form: :?- B1, ..., Bn. In the simplest case of Horn clauses (or "definite" clauses), all ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Ground Atom
In mathematical logic, a ground term of a formal system is a term that does not contain any variables. Similarly, a ground formula is a formula that does not contain any variables. In first-order logic with identity with constant symbols a and b, the sentence Q(a) \lor P(b) is a ground formula. A ground expression is a ground term or ground formula. Examples Consider the following expressions in first order logic over a signature containing the constant symbols 0 and 1 for the numbers 0 and 1, respectively, a unary function symbol s for the successor function and a binary function symbol + for addition. * s(0), s(s(0)), s(s(s(0))), \ldots are ground terms; * 0 + 1, \; 0 + 1 + 1, \ldots are ground terms; * 0+s(0), \; s(0)+ s(0), \; s(0)+s(s(0))+0 are ground terms; * x + s(1) and s(x) are terms, but not ground terms; * s(0) = 1 and 0 + 0 = 0 are ground formulae. Formal definitions What follows is a formal definition for first-order languages. Let a first-order language be giv ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Tree (data Structure)
In computer science, a tree is a widely used abstract data type that represents a hierarchical tree structure with a set of connected nodes. Each node in the tree can be connected to many children (depending on the type of tree), but must be connected to exactly one parent, except for the ''root'' node, which has no parent (i.e., the root node as the top-most node in the tree hierarchy). These constraints mean there are no cycles or "loops" (no node can be its own ancestor), and also that each child can be treated like the root node of its own subtree, making recursion a useful technique for tree traversal. In contrast to linear data structures, many trees cannot be represented by relationships between neighboring nodes (parent and children nodes of a node under consideration, if they exist) in a single straight line (called edge or link between two adjacent nodes). Binary trees are a commonly used type, which constrain the number of children for each parent to at most two. Whe ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Proof Tree For Datalog Transitive Closure Computation
Proof most often refers to: * Proof (truth), argument or sufficient evidence for the truth of a proposition * Alcohol proof, a measure of an alcoholic drink's strength Proof may also refer to: Mathematics and formal logic * Formal proof, a construct in proof theory * Mathematical proof, a convincing demonstration that some mathematical statement is necessarily true * Proof complexity, computational resources required to prove statements * Proof procedure, method for producing proofs in proof theory * Proof theory, a branch of mathematical logic that represents proofs as formal mathematical objects * Statistical proof, demonstration of degree of certainty for a hypothesis Law and philosophy * Evidence, information which tends to determine or demonstrate the truth of a proposition * Evidence (law), tested evidence or a legal proof * Legal burden of proof, duty to establish the truth of facts in a trial * Philosophic burden of proof, obligation on a party in a dispute to provide s ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Fixpoint
In mathematics, a fixed point (sometimes shortened to fixpoint), also known as an invariant point, is a value that does not change under a given transformation. Specifically, for functions, a fixed point is an element that is mapped to itself by the function. Any set of fixed points of a transformation is also an invariant set. Fixed point of a function Formally, is a fixed point of a function if belongs to both the domain and the codomain of , and . In particular, cannot have any fixed point if its domain is disjoint from its codomain. If is defined on the real numbers, it corresponds, in graphical terms, to a curve in the Euclidean plane, and each fixed-point corresponds to an intersection of the curve with the line , cf. picture. For example, if is defined on the real numbers by f(x) = x^2 - 3 x + 4, then 2 is a fixed point of , because . Not all functions have fixed points: for example, has no fixed points because is never equal to for any real number. ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Supremum
In mathematics, the infimum (abbreviated inf; : infima) of a subset S of a partially ordered set P is the greatest element in P that is less than or equal to each element of S, if such an element exists. If the infimum of S exists, it is unique, and if ''b'' is a lower bound of S, then ''b'' is less than or equal to the infimum of S. Consequently, the term ''greatest lower bound'' (abbreviated as ) is also commonly used. The supremum (abbreviated sup; : suprema) of a subset S of a partially ordered set P is the least element in P that is greater than or equal to each element of S, if such an element exists. If the supremum of S exists, it is unique, and if ''b'' is an upper bound of S, then the supremum of S is less than or equal to ''b''. Consequently, the supremum is also referred to as the ''least upper bound'' (or ). The infimum is, in a precise sense, dual to the concept of a supremum. Infima and suprema of real numbers are common special cases that are important in analy ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Kleene Fixed-point Theorem
In the mathematical areas of order and lattice theory, the Kleene fixed-point theorem, named after American mathematician Stephen Cole Kleene, states the following: :Kleene Fixed-Point Theorem. Suppose (L, \sqsubseteq) is a directed-complete partial order (dcpo) with a least element, and let f: L \to L be a Scott-continuous (and therefore monotone) function. Then f has a least fixed point, which is the supremum of the ascending Kleene chain of f. The ascending Kleene chain of ''f'' is the chain :\bot \sqsubseteq f(\bot) \sqsubseteq f(f(\bot)) \sqsubseteq \cdots \sqsubseteq f^n(\bot) \sqsubseteq \cdots obtained by iterating ''f'' on the least element ⊥ of ''L''. Expressed in a formula, the theorem states that :\textrm(f) = \sup \left(\left\\right) where \textrm denotes the least fixed point. Although Tarski's fixed point theorem does not consider how fixed points can be computed by iterating ''f'' from some seed (also, it pertains to monotone functions on complete ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Knaster–Tarski Theorem
In the mathematical areas of order and lattice theory, the Knaster–Tarski theorem, named after Bronisław Knaster and Alfred Tarski, states the following: :''Let'' (''L'', ≤) ''be a complete lattice and let f : L → L be an order-preserving (monotonic) function w.r.t. ≤. Then the set of fixed points of f in L forms a complete lattice under ≤.'' It was Tarski who stated the result in its most general form, and so the theorem is often known as Tarski's fixed-point theorem. Some time earlier, Knaster and Tarski established the result for the special case where ''L'' is the lattice of subsets of a set, the power set lattice. The theorem has important applications in formal semantics of programming languages and abstract interpretation, as well as in game theory. A kind of converse of this theorem was proved by Anne C. Davis: If every order-preserving function ''f'' : ''L'' → ''L'' on a lattice ''L'' has a fixed point, then ''L'' is a complete lattice. Consequences: ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Partially Ordered Set
In mathematics, especially order theory, a partial order on a Set (mathematics), set is an arrangement such that, for certain pairs of elements, one precedes the other. The word ''partial'' is used to indicate that not every pair of elements needs to be comparable; that is, there may be pairs for which neither element precedes the other. Partial orders thus generalize total orders, in which every pair is comparable. Formally, a partial order is a homogeneous binary relation that is Reflexive relation, reflexive, antisymmetric relation, antisymmetric, and Transitive relation, transitive. A partially ordered set (poset for short) is an ordered pair P=(X,\leq) consisting of a set X (called the ''ground set'' of P) and a partial order \leq on X. When the meaning is clear from context and there is no ambiguity about the partial order, the set X itself is sometimes called a poset. Partial order relations The term ''partial order'' usually refers to the reflexive partial order relatio ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Monotonic Function
In mathematics, a monotonic function (or monotone function) is a function between ordered sets that preserves or reverses the given order. This concept first arose in calculus, and was later generalized to the more abstract setting of order theory. In calculus and analysis In calculus, a function f defined on a subset of the real numbers with real values is called ''monotonic'' if it is either entirely non-decreasing, or entirely non-increasing. That is, as per Fig. 1, a function that increases monotonically does not exclusively have to increase, it simply must not decrease. A function is termed ''monotonically increasing'' (also ''increasing'' or ''non-decreasing'') if for all x and y such that x \leq y one has f\!\left(x\right) \leq f\!\left(y\right), so f preserves the order (see Figure 1). Likewise, a function is called ''monotonically decreasing'' (also ''decreasing'' or ''non-increasing'') if, whenever x \leq y, then f\!\left(x\right) \geq f\!\left(y\right), ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Power Set
In mathematics, the power set (or powerset) of a set is the set of all subsets of , including the empty set and itself. In axiomatic set theory (as developed, for example, in the ZFC axioms), the existence of the power set of any set is postulated by the axiom of power set. The powerset of is variously denoted as , , , \mathbb(S), or . Any subset of is called a ''family of sets'' over . Example If is the set , then all the subsets of are * (also denoted \varnothing or \empty, the empty set or the null set) * * * * * * * and hence the power set of is . Properties If is a finite set with the cardinality (i.e., the number of all elements in the set is ), then the number of all the subsets of is . This fact as well as the reason of the notation denoting the power set are demonstrated in the below. : An indicator function or a characteristic function of a subset of a set with the cardinality is a function from to the two-element set , denoted as , ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Model-theoretic
In mathematical logic, model theory is the study of the relationship between formal theories (a collection of sentences in a formal language expressing statements about a mathematical structure), and their models (those structures in which the statements of the theory hold). The aspects investigated include the number and size of models of a theory, the relationship of different models to each other, and their interaction with the formal language itself. In particular, model theorists also investigate the sets that can be defined in a model of a theory, and the relationship of such definable sets to each other. As a separate discipline, model theory goes back to Alfred Tarski, who first used the term "Theory of Models" in publication in 1954. Since the 1970s, the subject has been shaped decisively by Saharon Shelah's stability theory. Compared to other areas of mathematical logic such as proof theory, model theory is often less concerned with formal rigour and closer in spirit t ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]