Show simple item record

dc.contributor.advisorGilmore, Stephenen
dc.contributor.authorCook, Jonathan Jen
dc.date.accessioned2005-03-17T10:14:36Z
dc.date.available2005-03-17T10:14:36Z
dc.date.issued2005-06
dc.identifier.urihttp://hdl.handle.net/1842/725
dc.description.abstractWe discuss P#, our implementation of a tool which allows interoperation between a concurrent superset of the Prolog programming language and C#. This enables Prolog to be used as a native implementation language for Microsoft's .NET platform. P# compiles a linear logic extension of Prolog to C# source code. We can thus create C# objects from Prolog and use C#'s graphical, networking and other libraries. P# was developed from a modified port of the Prolog to Java translator, Prolog Cafe. We add language constructs on the Prolog side which allow concurrent Prolog code to be written. We add a primitive predicate which evaluates a Prolog structure on a newly forked thread. Communication between threads is based on the unification of variables contained in such a structure. It is also possible for threads to communicate through a globally accessible table. All of the new features are available to the programmer through new built-in Prolog predicates. We present three case studies. The first is an application which allows several users to modify a database. The users are able to disconnect from the database and to modify their own copies of the data before reconnecting. On reconnecting, conflicts must be resolved. The second is an object-oriented assistant, which allows the user to query the contents of a C# namespace or Java package. The third is a tool which allows a user to interact with a graphical display of the inheritance tree. Finally, we optimize P#'s runtime speed by translating some Prolog predicates into more idiomatic C# code than is produced by a naive port of Prolog Cafe. This is achieved by observing that semi-deterministic predicates (being those which always either fail or succeed with exactly one solution) that only call other semi-deterministic predicates enjoy relatively simple control flow. We make use of the fact that Prolog programs often contain predicates which operate as functions, and that such predicates are usually semi-deterministic.en
dc.contributor.sponsorEngineering and Physical Sciences Research Council (EPSRC)en
dc.format.extent1037427 bytesen
dc.format.mimetypeapplication/pdfen
dc.language.isoen
dc.publisherUniversity of Edinburgh. College of Science and Engineering. School of Informatics.en
dc.relation.hasversionJonathan J. Cook. P#: a concurrent Prolog for the .NET framework. Software: Practice and Experience, 34(9):815-845, 2004en
dc.relation.hasversionJonathan J. Cook. Optimizing P#: Translating Prolog to more Idiomatic C#. In Proceedings of CICLOPS 2004, pages 59-70, 2004en
dc.subject.otherlogic programmingen
dc.titleLanguage Interoperability and Logic Programming Languagesen
dc.typeThesis or Dissertationen
dc.type.qualificationlevelDoctoralen
dc.type.qualificationnamePhD Doctor of Philosophyen


Files in this item

This item appears in the following Collection(s)

Show simple item record