P#: a concurrent prolog for the .NET framework

  • Authors:
  • Jonathan J. Cook

  • Affiliations:
  • Laboratory for Foundations of Computer Science, University of Edinburgh, Edinburgh EH9 3JZ, U.K.

  • Venue:
  • Software—Practice & Experience
  • Year:
  • 2004

Quantified Score

Hi-index 0.00

Visualization

Abstract

We discuss P#, our implementation of a tool that 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. We add language constructs on the Prolog side that allow concurrent Prolog code to be written. A primitive predicate is provided that 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 discuss two software engineering tools implemented using P#.