Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Gödel (programming language)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
{{Infobox programming language | name =Gödel | logo = | paradigm = [[Declarative programming|declarative]], [[Logic programming|logic]] | year = 1992 | designer =John Lloyd & Patricia Hill | developer = John Lloyd & Patricia Hill | latest_release_version = 1.5 | latest release date ={{release date|1995|8|11}} | typing = [[strong typing|strong]] | implementations = | dialects = [https://web.archive.org/web/20091207092823/http://www.scs.leeds.ac.uk/hill/GOEDEL/expgoedel.html Gödel with Generic (Parametrised) Modules] | influenced_by = | influenced = | operating_system = [[Unix-like]] | license = Non-commercial research/educational use only | website = https://www.cs.unipr.it/~hill/GOEDEL/expgoedel.html | file_ext = }} '''Gödel''' is a [[Declarative programming|declarative]], general-purpose [[programming language]] that adheres to the [[Logic programming|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 arithmetic|arbitrary precision]] integers, arbitrary precision rationals, and also floating-point numbers. It can solve [[constraint (mathematics)|constraints]] over finite domains of integers and also linear rational constraints. It supports processing of [[finite set]]s. 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-logic]]al facilities provide support for meta-programs that do analysis, [[program transformation|transformation]], compilation, verification, and debugging, among other tasks. ==Sample 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 <code>CommonDivisor</code> predicate says that if <code>i</code> and <code>j</code> are not zero, then <code>d</code> is a common divisor of <code>i</code> and <code>j</code> if it lies between <code>1</code> and the smaller of <code>i</code> and <code>j</code> and divides both <code>i</code> and <code>j</code> exactly. The <code>Gcd</code> predicate says that <code>d</code> is a greatest common divisor of <code>i</code> and <code>j</code> if it is a common divisor of <code>i</code> and <code>j</code>, and there is no <code>e</code> that is also a common divisor of <code>i</code> and <code>j</code> and is greater than <code>d</code>. 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== * https://web.archive.org/web/20091207092823/http://www.scs.leeds.ac.uk/hill/GOEDEL/expgoedel.html * https://mitpress.mit.edu/9780262519151/the-godel-programming-language/ {{Authority control}} {{DEFAULTSORT:Godel (programming language)}} [[Category:Logic programming languages|Godel]] [[Category:Programming languages created in 1992]] [[Category:Programming languages created by women]]
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)
Pages transcluded onto the current version of this page
(
help
)
:
Template:Authority control
(
edit
)
Template:Infobox programming language
(
edit
)