Go! (programming language)

This is an old revision of this page, as edited by UncleDouggie (talk | contribs) at 15:14, 14 November 2009 (Disambiguate Erlang to Erlang (programming language) using popups). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Go! is a concurrent programming language, first publicly documented by Keith Clark and Francis McCabe in 2003[1] and included as part of the Network Agents project at Sourceforge[2]. It is oriented to the needs of programming secure, production quality, agent based applications. It is multithreaded, strongly typed and higher order (in the functional programming sense). It has relation, function, and action procedure definitions. Threads execute action procedures, calling functions and querying relations as need be. Threads in different agents communicate and coordinate using asynchronous messages. Threads within the same agent can also use shared dynamic relations acting as memory stores.

Go!
ParadigmMulti-paradigm: concurrent, logic, functional, object-oriented, imperative
Designed byFrancis McCabe, Keith Clark
First appeared2003
Preview release
9-30-07 / September 30, 2007 (2007-09-30)
Typing disciplinestrong
OSUnix-like
LicenseGPLv2
Influenced by
Prolog, April

Its nature as a multi-paradigm programming language, integrating logic, functional, object-oriented, and imperative programming styles,[3] is particularly applied to ontology-based modeling, as exploited for the Semantic Web in allowing a type system where OWL classes can be represented in the type system.[4] The design of Go!, according to Bordini et al.'s survey,[3] also took into consideration critical issues such as security, transparency, and integrity, in regards to the adoption of logic programming technology. Agents in Go! contain both reactive and deliberative aspects, and coordinate using BDI structures,[5] and their style of expression has influenced the modeling of agent systems in Erlang.[6]

Google's programming language Go (note lack of exclamation point) has, since its 2009 release, been the subject of an as yet unresolved naming controversy with Go! due to its very similar name.[7][8]

Communication model

Threads within a single Go! process, hence in the same agent, can also communicate by manipulating dynamic relation objects, comparable with Linda tuple stores,[3] used to coordinate their activities. A related combination of tuple-based shared stores and Semantics has been taken up as the communication mechanism in the approaches of TripCom[9] and SOA4All.[10]

Example

The following example illustrates the 'ontology-oriented' type and declarations style of Go!.

Gender::= male | female.
person <˜ {dayOfBirth:[]=>day. age:[]=>integer.
gender:[]=>Gender. name:[]=>string.
home:[]=>string. lives:[string]{}}.
person:[string,day,Gender,string]$=person.
person(Nm,Born,Sx,Hm)..{
dayOfBirth()=>Born.
age() => yearsBetween(now(),Born).
gender()=>Sx.
name()=>Nm.
home()=>Hm.
lives(Pl) :- Pl=home().
yearsBetween:[integer,day]=>integer.
yearsBetween(...) => ..
}.
newPerson:[string,day,Gender,string]=>person.
newPerson(Nm,Born,Sx,Hm)=>$person(Nm,Born,Sx,Hm).

The ::= rule defines a new algebraic data type, a data type with only data constructors.

The rule defines an interface type - it indicates what properties are characteristic of a person and also gives type constraints on these properties. It documents that age is a functional property with an integer value, that lives is a unary relation over strings, and that dayOfBirth is a functional property with a value that is an object of type day.

The $= type rule indicates that there is also a theory label, with the functor "person", for a theory that defines the characteristic properties of the person type - implements the person interface - in terms of four given parameters of types string, day, Gender, and string.

Footnotes

  1. ^ Clark and McCabe, AAMAS'03, 2003
  2. ^ "Network Agents". Sourceforge.net. Retrieved 2009-11-14.
  3. ^ a b c Bordini et al., Informatica, 2006
  4. ^ Clark and McCabe, Applied Intelligence, 2006
  5. ^ Fisher et al., Computational Intelligence, 2007
  6. ^ Varela et al., Erlang Workshop'04
  7. ^ Claburn, Thomas (2009-11-11). "Google 'Go' Name Brings Accusations Of 'Evil'". InformationWeek. Retrieved 2009-11-14.
  8. ^ "Issue 9 - go - I have already used the name for *MY* programming language". code.google.com. 2009-11-10. Retrieved 2009-11-14.
  9. ^ http://www.tripcom.org/docs/del/D6.5v2.pdf
  10. ^ http://www.soa4all.eu/file-upload.html?func=startdown&id=77

References