Gdel Programming Language

Gdel 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 Gdel.

Features

Gdel has a module system, and it supports infinite precision integers, infinite 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. Gdel's meta-logical facilities provide support for meta-programs that do analysis, transformation, compilation, verification, and debugging, among other tasks.

Sample code

The following Gdel module is a specification of the greatest common divisor (GCD) of two numbers. It is intended to demonstrate the declarative nature of Gdel, 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

 

<< PreviousWord BrowserNext >>
latin peoples
earl of desart
groundshaker
earl of clonmell
pit of carcoon
new zealand olympic medallists
charles lilley
port knocking
ringelnatz
harbourlynx
international appalachian trail
battle of berlin (air)
wapw
abc1
alcelaphinae
food fight
casino (disambiguation)
digital root
joanna newsom
kirara
fillmore!
minnesota state highway 1
roma sub rosa
gordianus the finder
bas jan ader
capcom cps changer
trip
sydney penny
golden hill state park
high level bridge
uss ellen (1861)
minnesota state highway 3
double teamed
list of current dc comics publications
minnesota state highway 61
brigadeiro
ping (disambiguation)
ol' rip the horned toad
guadalupe peak
sage gateshead
obd ii
thirty second united states congress
cello sonata
piano sonata