Gödel (programming language): Difference between revisions

Content deleted Content added
misc. fixes
Line 37:
Obviously, [[higher-order logic]] exists where, typically, predicates have other predicates or functions as arguments, or in which one or both of predicate quantifiers or function quantifiers are permitted. In first-order theories, predicates are often associated with sets. In interpreted higher-order theories, predicates may be interpreted as sets of sets. No first-order theory, however, can fully and categorically describe structures with an infinite ___domain, such as the natural numbers or the real numbers. Categorical axiom systems for these structures can be obtained in stronger logic such as second-order logic.
 
Once the intended interpretation is established, a program itself can be written. Program consists of two components: a logic component and a control component. The logic component is a particular kind of (polymorphic many-sorted) first-order theory which is usually suitably restricted so that an efficient theorem proving procedure can be admitted. Typically, in logic programming languages, the logic component of a program is the theory obtained by completing the collection of program statements. In other approaches to [[declarative programming]] different logics are used. For example, in functional programming, the logical component of a program can be understood to be a collection of formulas in the [[λ-calculus]].
 
The control component of the program is concerned with the construction and [[pruning]] of search trees. Typically, the computation rule (which selects a subformula in a goal for an extension step) is partially specified by control declarations and the pruning of a search tree is specified by pruning operator. An important requirement of the control declarations and pruning operators of a program is that they can be deleted and what remains is a correct logic component of the program.
Line 45:
Declarative programming is much more concerned with expressing the logic of a computation without describing its control, i.e. describing what the program should do, rather than describing how (that is the control part) it should be computed. Logical sentences can also be understood procedurally as goal-reduction procedures (also known as routines, subroutines, methods, or functions) with well set series of computational steps to be carried out. The Gödel programming language is not a procedural language. Although, the main advantage of the procedural semantics is portability, so that one could port a program from one implementation to another and be confident of identical behaviour of the program in the two systems, Gödel's procedural open semantics gives more freedom to handle it by programmers and adapt resulting programs to special project requirements; the programmer can use the known behaviour of the program executor to develop a procedural understanding of his program. This may be helpful when seeking better execution speed.
 
[[Prolog]], [[HTML]], [[SQL]] together with Gödel rank among [[declarative programming languages]] languages, while [[C/C++]], [[Fortran]] and [[Pascal]] are examples of [[procedural programming languages]].
 
== Gödel specifications ==