tags:

views:

15

answers:

1

Hello everyone. Sorry for poor English.

I have a configuration application where an user can 'manually' select or eliminate some features of a system, other features must be automatically selected or eliminated by application using rules.

The rules are in the form:
a IMPLIES b (If feature a is selected, the feature b must be selected).
b CONFLICTS c (If feature b is selected, the feature c must be eliminated).
d AND e IMPLIES f (If feature d and feature e is selected, the feature f must be selected).
etc...

Some rules can cause conflict, for example:
1) a IMPLIES b
2) a IMPLIES c
3) b CONFLICTS c
If feature a is selected, the state (selected/eliminated) of feature c cannot be determined, and I must be able to display the involved rules to the user.

I am looking for advises about what kind of engine (solver, checker, etc) to use. n Preferably open source software I can use with .NET languages.

Thanks

Tonite

A: 

Sounds like you are looking for some logic programming solution. Maybe F# is an option for you, but if you just need it to check configuration rules, this is the overkill.

If you want to implement it yourself: For simple rules if-Statements will also do the job (no, it's not a shame to counter simple problems with simple approaches). If the checking rules are complicated, volatile or even dynamic take a look on the Specification Pattern (for more in depth information see Evans & Fowler's article in PDF). It is suitable for complicated checking routines, but does not incur the additional cost of using a third party engine or even another implementation language.

Theo Lenndorff