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. 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 codice_1 predicate says that if codice_2 and codice_3 are not zero, then codice_4 is a common divisor of codice_2 and codice_3 if it lies between codice_7 and the smaller of codice_2 and codice_3 and divides both codice_2 and codice_3 exactly. The  codice_12 predicate says that codice_4 is a greatest common divisor of codice_2 and codice_3 if it is a common divisor of codice_2 and codice_3, and there is no codice_18 that is also a common divisor of codice_2 and codice_3 and is greater than codice_4.