Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Clausal Form?

Clausal Form?

Clausal Form?

Does anyone know how to convert prolog databases to clausal form? I have an assignment where I need to do an SLDNF proof, but before I can do that I need to convert some facts and rules from a prolog program into clausal form. My teacher gave us a 4 step process to do it but in the example he gives he doesn't use a statement from prolog.

So for example:

How would you convert "sibling(X, Y) :- parent(P, X), parent(P, Y), X \== Y" to clausal form?

RE: Clausal Form?

This rule sibling(X, Y) :- parent(P, X), parent(P, Y), X \== Y. means that you have sibling(X, Y) if you have parent(P, X), parent(P, Y), X \== Y.
sibling(X, Y) :- parent(P, X), parent(P, Y), X \== Y is like
(parent(P, X), parent(P, Y), X \== Y) => sibling(X, Y)
which is translated as
(parent(P, X)/\ parent(P, Y) /\ not(X == Y)) => sibling(X, Y)
and knowing (a => b) is like (not(a) \/ b)
not((parent(P, X)/\ parent(P, Y) /\ not(X == Y))) \/ sibling(X, Y)
not(parent(P, X)) \/ not(parent(P, Y)) \/ (X == Y) \/ sibling(X, Y)

RE: Clausal Form?

Thank you that makes sense

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close