473,513 Members | 3,076 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

evaluating rules, resolving conflicts.

ian
Imagine a system where you could say:
"blue cars have white seats"
"Cars with white seats have black stitching"
"Red cars have white seats"
"Red cars cannot have black stitching"
"Red cars with four seats can have black stitching"

I've a solution which will cope with the above, but I can't help feeling
it's a bit lumpy.
The reason I'm posting here is that I'm looking for an OO solution using
..net2 which can cope with me dropping the odd van in there that has
black stitching. I think I've mapped out the majority in my head, but
I'm sure this is one of those problems that comes up daily that someone
smarter than me has solved with an elegant pattern.

Ta
Ian


*** Sent via Developersdex http://www.developersdex.com ***
May 22 '06 #1
2 1124
As much as I like .NET, the right tool for this job is Prolog. (I don't
think that there is a .NET implementation for Prolog).

This sort of problem is exactly what Prolog was invented for.

Always use the right tool for the job
--
Jeffrey Hornby
Hornby Consulting, Inc.

"ian" wrote:
Imagine a system where you could say:
"blue cars have white seats"
"Cars with white seats have black stitching"
"Red cars have white seats"
"Red cars cannot have black stitching"
"Red cars with four seats can have black stitching"

I've a solution which will cope with the above, but I can't help feeling
it's a bit lumpy.
The reason I'm posting here is that I'm looking for an OO solution using
.net2 which can cope with me dropping the odd van in there that has
black stitching. I think I've mapped out the majority in my head, but
I'm sure this is one of those problems that comes up daily that someone
smarter than me has solved with an elegant pattern.

Ta
Ian


*** Sent via Developersdex http://www.developersdex.com ***

May 22 '06 #2
ian <no****@devdex.com> wrote:
Imagine a system where you could say:
"blue cars have white seats"
"Cars with white seats have black stitching"
"Red cars have white seats"
"Red cars cannot have black stitching"
"Red cars with four seats can have black stitching" I've a solution which will cope with the above, but I can't help feeling
it's a bit lumpy.
The reason I'm posting here is that I'm looking for an OO solution using
net2 which can cope with me dropping the odd van in there that has
black stitching. I think I've mapped out the majority in my head, but
I'm sure this is one of those problems that comes up daily that someone
smarter than me has solved with an elegant pattern.


Sounds like Prolog.

-- Barry

--
http://barrkel.blogspot.com/
May 23 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
1810
by: Michael L. Labbe | last post by:
Hello. I'm an experienced programmer who is evaluating learning Python if it is applicable to a few projects. The programs I am going to list are production software - they are not throwaway toy projects, but will actually have real world application. I've spent years writing C++ and Perl code, but I would like to try "this Python language"...
25
2948
by: Jason | last post by:
Hi, below is example code which demonstrates a problem I have encountered. When passing a number to a function I compare it with a string's size and then take certain actions, unfortunately during the testing of it I discovered that negative numbers were being treated as if they were > 0. I compiled the following on mingw compiler/dev...
12
1772
by: christopherlmarshall | last post by:
Suppose you want to write a subclass of some existing class you are importing from a module you didn't write and that you don't want to study the internals of, and you want to define a data member i in your constructor. As in the following: from module1 import A class B(A):
0
3051
by: Boulent Mustafa | last post by:
Using Microsoft Access 2000, I am defining a bunch of fields all with default values. The reason for this is that I have 5 text fields, each of which can have 5 permutations depending on the value entered in the associated integer field. I have been able to define the 5 text fields for integers 1 to 4. However when I try to define the...
0
1508
by: John | last post by:
Hi Access 200. I have a replica and its associated master. When I try to open any of these dbs, I get the message "This member of the replica set has conflicts from synchronizing changes with other members. Do you want to resolve these conflicts now?". When I select 'Yes', I get the below message. Basically the conflict revolver is not...
5
3168
by: Jeremy | last post by:
I have a vb .net 2003 app that uses access 2k as a backend. The main table has some validation rules (legacy stuff brought forward inadvertantly, and now we're stuck with 'em). The problem is, I do a dataadaptor.update, and an exception is thrown. I would prefer to validate before the update & tell the user to fix the data....
5
3546
by: Eric | last post by:
After attempting to build a solution, I receive the error message; "One or more dependent assemblies have version conflicts" "Do you want to fix these conflicts by adding binding redirect records in the app.config file?" I received this after changing the assembly version in two of the solution's projects to What does this error mean?
2
2605
by: ethandbrown | last post by:
Hi All-- I'm a bit stymied here. I need to display arbitrary HTML obtained through AJAX. The problem is when a <script> block is encountered one can't use innerHTML to set the content, because the <script> block won't be evaluated. Googling around, a found the createContextualFragment() solution which does execute script code. The...
7
2241
by: temp34k45k | last post by:
I need to evaluate two strings for their order. The strings contain Letters (A thru Z upper case only) and Numbers (0-9) and the decimal point (.). I need an order like the list that follows: ( it's just an example of the order ) 0 1
0
1704
by: WJoe | last post by:
This database (Access 2003, Windows XP) has been operational for 2 months now. We enter data into the database using a form. Recently we have been unable to add new records to the database and get this error message each time we try to save a new record: "Error 'Error evaluating CHECK constraint. 'in the validation rule". This is a multi-user...
0
7269
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7177
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7394
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7559
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7123
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
5701
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5100
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4756
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3237
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.