Wednesday, April 7, 2004

How To I Prevent New Shoes From Creasing?

Declarative Logic Programming and Prolog + Schelog

Schelog is an implementation developed by D. Sitaram it possible to combine pieces of code written in a programming style similar to Prolog (including the main features of this language such as backtracking or reverse, the unification, the court, denial, meta-logical predicates , etc.). Scheme expressions in pure or conventional (Scheme is a language derived from Lisp

- see previous entry in which we referred to the latter) within the same application: Schelog is an embedding of Prolog-style logic programming in Scheme. "Embedding''Means You Do not Lose Scheme: You use Prolog-style dog and Conventional Scheme code fragments Alongside Each Other. Schelog contains the full repertoire of Prolog features, Including meta-logical and second-order ("set'') predicates, only Those Leaving out features more That Could Easily Be Done Efficiently and more with Scheme subexpressions.
In Programming in Schelog

Schelog syntax is the characteristic of Lisp / Scheme (basically consists of nested lists and indented, without commas, as indicated by parentheses, preemption of operation sign arguments, strings in quotation marks, etc..). As an example, below the portion of code needed to compute, recursively, the factorial of a number, in Prolog in the first place, and in Schelog second (recall that factorial of a natural number n is the product of all natural numbers from 1 to n ): factor (0.1): -!. factorial (X, Y): - X1 is X-1, factorial(X1,Y1),
                 Y is X*Y1.

(define %factorial
  (%rel (x y x1 y1)
    [(0 1) !]
    [(x y) (< x 0) ! %fail]
    [(x y) (%is x1 (- x 1))
           (% Factorial x1 y1) (% is and (* y1 x ))])) Schelog can be considered as a combination between styles of programming paradigms represented by one hand Prolog (logic programming

dialect of Lisp

other Scheme ( declarative programming functional). "Programming in Schelog " is an introduction in which the said D. Sitaram addresses the syntax and programming through the implementation that we are commenting. On the other hand, this same author, " Teach Yourself Scheme in Fixnum Days " is a quick guide and introduction to the language Scheme. Finally, we recommend reading a general introduction, referring to the origins of language Scheme: Scheme : small is beautiful - A programming language ideal for teaching dence ( Carlos Coello ). This article was subsequently published (PS

format compressed in a. Zip) by the author, with the same title and more extensióny deep in the journal Advanced Solutions
( numbers 39 and 43, now this publication appears to be unavailable online, although Internet Archive can find multiple copies ). This new extended version of "Scheme: small is beautiful ..." adds to the explanation of the historical and language development Scheme, an introduction, with examples, the essential features and syntax for use, major updates and extensions as well as a final consideration about its utility RESEARCH AND teaching in the field of programming languages \u200b\u200b("Scheme as a teaching tool.")

0 comments:

Post a Comment