Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7534183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T05:56:37+00:00 2026-05-30T05:56:37+00:00

I am working on prolog and faced this scenario – In my query, I

  • 0

I am working on prolog and faced this scenario –
In my query, I pass something like this:

?- query( 2*X + 3*Y >= 3*Z )

Now, what I would like to do is have the prolog program capture the inequality expression so that I can have the above inequality in variables like below:

variable ‘Lhs‘ will have 2*X + 3*Y
variable ‘Rhs‘ will have 3*Z
Now I want the inequality involved to be also assigned somewhere (in a variable called Opr??), so that saying something like Lhs Opr Rhs would mean exactly like saying “2*X + 3*Y >= 3*Z“..

This is a general form of the scenario that I am working on. I somehow want the “inequality” involved to be identified, so that I can use it later in my code.

I am working on Eclipse-CLP with IC library.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T05:56:38+00:00Added an answer on May 30, 2026 at 5:56 am

    You can use univ to disassemble your inequaliy:

    Eq =.. [Op,Lhs,Rhs],
    

    This works in both directions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have Prolog statements like this verb('part_of-8'). noun('doctor_investigation_system-2'). noun('dis-4'). berelation('be-6'). verb('be-6'). noun('hospital_information_system-11'). noun('his-13'). rel('part_of-8',
Working with TCL and I'd like to implement something like the Strategy Pattern .
well i'm having a hard time working with prolog (gprolog). My problem is this,
Working with a Lucene index, I have a standard document format that looks something
I am working on a scenario in Prolog (eclipse) wherein I need a list
I would like to represent a mutable graph in Prolog in an efficient manner.
I'm working on this this wonderful Prolog project and I'm stuck at this situation
I don't have so much a question about how to program something, but rather
I was trying this palindrome program in prolog, the logic works but write operation
I'm currently working on a very short project on Prolog, and just got stuck

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.