λProlog
   HOME





λProlog
λProlog, also written lambda Prolog, is a logic programming language featuring polymorphic typing, modular programming, and higher-order programming. These extensions to Prolog are derived from the higher-order hereditary Harrop formulas used to justify the foundations of λProlog. Higher-order logic, Higher-order quantification, Typed lambda calculus, simply typed λ-terms, and Unification (computing)#Higher-order unification, higher-order unification gives λProlog the basic supports needed to capture the λ-tree syntax approach to ''higher-order abstract syntax'', an approach to representing syntax that maps object-level bindings to programming language bindings. Programmers in λProlog need not deal with bound variable names: instead various declarative devices are available to deal with binder scopes and their instantiations. History Since 1986, λProlog has received numerous implementations. As of 2023, the language and its implementations are still actively being devel ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Higher-order Abstract Syntax
In computer science, higher-order abstract syntax (abbreviated HOAS) is a technique for the representation of abstract syntax trees for languages with variable name binding, binders. Relation to first-order abstract syntax An abstract syntax is ''abstract'' because it is represented by mathematical objects that have certain structure by their very nature. For instance, in ''first-order abstract syntax'' (''FOAS'') trees, as commonly used in compilers, the tree structure implies the subexpression relation, meaning that no parentheses are required to disambiguate programs (as they are, in the concrete syntax). HOAS exposes additional structure: the relationship between variables and their binding sites. In FOAS representations, a variable is typically represented with an identifier, with the relation between binding site and use being indicated by using the ''same'' identifier. With HOAS, there is no name for the variable; each use of the variable refers directly to the binding site. ...
[...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]  


picture info

Prolog
Prolog is a logic programming language that has its origins in artificial intelligence, automated theorem proving, and computational linguistics. Prolog has its roots in first-order logic, a formal logic. Unlike many other programming languages, Prolog is intended primarily as a declarative programming language: the program is a set of facts and Horn clause, rules, which define Finitary relation, relations. A computation is initiated by running a ''query'' over the program. Prolog was one of the first logic programming languages and remains the most popular such language today, with several free and commercial implementations available. The language has been used for automated theorem proving, theorem proving, expert systems, term rewriting, type systems, and automated planning, as well as its original intended field of use, natural language processing. See also Watson (computer). Prolog is a Turing-complete, general-purpose programming language, which is well-suited for inte ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Logic Programming Language
Logic programming is a programming paradigm, 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, Answer Set Programming (ASP) and Datalog. In all of these languages, rules are written in the form of ''Clause (logic), 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 ''Literal (mathematical logic), 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 ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Harrop Formula
In intuitionistic logic, the Harrop formulae, named after Ronald Harrop, are the class of formulae inductively defined as follows: * Atomic formulae are Harrop, including falsity (⊥); * A \wedge B is Harrop provided A and B are; * \neg F is Harrop for any well-formed formula F; * F \rightarrow A is Harrop provided A is, and F is any well-formed formula; * \forall x. A is Harrop provided A is. By excluding disjunction and existential quantification (except in the antecedent of implication), non-constructive predicates are avoided, which has benefits for computer implementation. Discussion Harrop formulae are "well-behaved" also in a constructive context. For example, in Heyting arithmetic , Harrop formulae satisfy a classical equivalence not generally satisfied in constructive logic: :\neg \neg A \leftrightarrow A. There are however \Pi_1-statements that are -independent, meaning these are simple \forall x. A statements for which excluded middle is not -provable. Ind ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Unification (computing)
In logic and computer science, specifically automated reasoning, unification is an algorithmic process of solving equations between symbolic expression (mathematics), expressions, each of the form ''Left-hand side = Right-hand side''. For example, using ''x'',''y'',''z'' as variables, and taking ''f'' to be an uninterpreted function, the Singleton (mathematics), singleton equation set is a syntactic first-order unification problem that has the substitution as its only solution. Conventions differ on what values variables may assume and which expressions are considered equivalent. In first-order syntactic unification, variables range over first-order terms and equivalence is syntactic. This version of unification has a unique "best" answer and is used in logic programming and programming language type system implementation, especially in Hindley–Milner based type inference algorithms. In higher-order unification, possibly restricted to higher-order pattern unification, terms may ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Modular Programming
Modular programming is a software design technique that emphasizes separating the functionality of a program into independent, interchangeable modules, such that each contains everything necessary to execute only one aspect or "concern" of the desired functionality. A module interface expresses the elements that are provided and required by the module. The elements defined in the interface are detectable by other modules. The implementation contains the working code that corresponds to the elements declared in the interface. Modular programming is closely related to structured programming and object-oriented programming, all having the same goal of facilitating construction of large software programs and systems by decomposition into smaller pieces, and all originating around the 1960s. While the historical usage of these terms has been inconsistent, "modular programming" now refers to the high-level decomposition of the code of an entire program into pieces: structured progra ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Higher-order Programming
Higher-order programming is a style of computer programming that uses software components, like functions, modules or objects, as values. It is usually instantiated with, or borrowed from, models of computation such as lambda calculus which make heavy use of higher-order functions. A programming language can be considered higher-order if components, such as procedures or labels, can be used just like data. For example, these elements could be used in the same way as arguments or values. For example, in higher-order programming, one can pass functions as arguments to other functions and functions can be the return value of other functions (such as in macros or for interpreting). This style of programming is mostly used in functional programming, but it can also be very useful in object-oriented programming. A slightly different interpretation of higher-order programming in the context of object-oriented programming are higher order messages, which let messages have other mess ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Higher-order Logic
In mathematics and logic, a higher-order logic (abbreviated HOL) is a form of logic that is distinguished from first-order logic by additional quantifiers and, sometimes, stronger semantics. Higher-order logics with their standard semantics are more expressive, but their model-theoretic properties are less well-behaved than those of first-order logic. The term "higher-order logic" is commonly used to mean higher-order simple predicate logic. Here "simple" indicates that the underlying type theory is the ''theory of simple types'', also called the ''simple theory of types''. Leon Chwistek and Frank P. Ramsey proposed this as a simplification of ''ramified theory of types'' specified in the '' Principia Mathematica'' by Alfred North Whitehead and Bertrand Russell. ''Simple types'' is sometimes also meant to exclude polymorphic and dependent types. Quantification scope First-order logic quantifies only variables that range over individuals; '' second-order logic'', also qua ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Typed Lambda Calculus
A typed lambda calculus is a typed formalism that uses the lambda symbol (\lambda) to denote anonymous function abstraction. In this context, types are usually objects of a syntactic nature that are assigned to lambda terms; the exact nature of a type depends on the calculus considered (see kinds below). From a certain point of view, typed lambda calculi can be seen as refinements of the untyped lambda calculus, but from another point of view, they can also be considered the more fundamental theory and ''untyped lambda calculus'' a special case with only one type. Typed lambda calculi are foundational programming languages and are the base of typed functional programming languages such as ML and Haskell and, more indirectly, typed imperative programming languages. Typed lambda calculi play an important role in the design of type systems for programming languages; here, typability usually captures desirable properties of the program (e.g., the program will not cause a memory acce ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Polymorphic Typing
In programming language theory and type theory, polymorphism is the use of one symbol to represent multiple different types.: "Polymorphic types are types whose operations are applicable to values of more than one type." In object-oriented programming, polymorphism is the provision of one interface to entities of different data types. The concept is borrowed from a principle in biology where an organism or species can have many different forms or stages. The most commonly recognized major forms of polymorphism are: * ''Ad hoc polymorphism'': defines a common interface for an arbitrary set of individually specified types. * ''Parametric polymorphism'': not specifying concrete types and instead use abstract symbols that can substitute for any type. * ''Subtyping'' (also called ''subtype polymorphism'' or ''inclusion polymorphism''): when a name denotes instances of many different classes related by some common superclass. History Interest in polymorphic type systems developed sig ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]