Gödel (programming language)

Gödel (programming language)

Gödel is a declarative, general-purpose programming language that adheres to the logic programming paradigm. It is a strongly typed language, the type system being based on many-sorted logic with parametric polymorphism. It is named after logician Kurt Gödel.

Features

Gödel has a module system, and it supports arbitrary precision integers, arbitrary precision rationals, and also floating-point numbers. It can solve constraints over finite domains of integers and also linear rational constraints. It supports processing of finite sets. It also has a flexible computation rule and a pruning operator which generalises the commit of the concurrent logic programming languages.

Gödel's meta-logical facilities provide support for meta-programs that do analysis, transformation, compilation, verification, and debugging, among other tasks.

ample code

The following Gödel module is a specification of the greatest common divisor (GCD) of two numbers. It is intended to demonstrate the declarative nature of Gödel, not to be particularly efficient.The CommonDivisor predicate says that if i and j are not zero, then d is a common divisor of i and j if it lies between 1 and the smaller of i and j and divides both i and j exactly.The Gcd predicate says that d is a greatest common divisor of i and j if it is a common divisor of i and j, and there is no e that is also a common divisor of i and j and is greater than d.

MODULE GCD. IMPORT Integers. PREDICATE Gcd : Integer * Integer * Integer. Gcd(i,j,d) <- CommonDivisor(i,j,d) & ~ SOME [e] (CommonDivisor(i,j,e) & e > d). PREDICATE CommonDivisor : Integer * Integer * Integer. CommonDivisor(i,j,d) <- IF (i = 0 / j = 0) THEN d = Max(Abs(i),Abs(j)) ELSE 1 =< d =< Min(Abs(i),Abs(j)) & i Mod d = 0 & j Mod d = 0.

External links

* [http://www.cs.bris.ac.uk/~bowers/goedel.html Bristol Gödel site]


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Lisp (programming language) — Infobox programming language name = Lisp paradigm = multi paradigm: functional, procedural, reflective generation = 3GL year = 1958 designer = John McCarthy developer = Steve Russell, Timothy P. Hart, and Mike Levin latest release version =… …   Wikipedia

  • Gödel numbering for sequences — A Gödel numbering for sequences provides us an effective way to represent each finite sequence of natural numbers as a single natural number. Of course, the embedding is surely possible set theoretically, but the emphasis is on the effectiveness… …   Wikipedia

  • Kurt Gödel — ] . These rotating universes would allow time travel and caused Einstein to have doubts about his own theory. His solutions are known as the Gödel metric.During his many years at the Institute, Gödel s interests turned to philosophy and physics.… …   Wikipedia

  • Gödel, Escher, Bach — Gödel, Escher, Bach: an Eternal Golden Braid   …   Wikipedia

  • List of programming languages — Programming language lists Alphabetical Categorical Chronological Generational The aim of this list of programming languages is to include all notable programming languages in existence, both those in current use and historical ones, in… …   Wikipedia

  • Gödel–Gentzen negative translation — In proof theory, the Gödel–Gentzen negative translation is a method for embedding classical first order logic into intuitionistic first order logic. It is one of a number of double negation translations that are of importance to the metatheory of …   Wikipedia

  • Logic programming — is, in its broadest sense, the use of mathematical logic for computer programming. In this view of logic programming, which can be traced at least as far back as John McCarthy s [1958] advice taker proposal, logic is used as a purely declarative… …   Wikipedia

  • Acceptable programming system — In the theory of computation in computer science, a programming system is a Gödel numbering of the set mathcal{T} of all Turing computable functions from mathbb{N} to mathbb{N}. The name derives from the numbering of mathcal{T} induced by a… …   Wikipedia

  • Ontology language — In computer science and artificial intelligence, ontology languages are formal languages used to construct ontologies. They allow the encoding of knowledge about specific domains and often include reasoning rules that support the processing of… …   Wikipedia

  • Natural language user interface — Natural Language User Interfaces (LUI) are a type of computer human interface where linguistic phenomena such as verbs, phrases and clauses act as UI controls for creating, selecting and modifying data in software applications. In interface… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”