Re: Decision Tables
- From: Ben Bacarisse <ben.usenet@xxxxxxxxx>
- Date: Wed, 30 Jan 2008 02:20:01 +0000
"Bartc" <bc@xxxxxxxxxx> writes:
"Ben Bacarisse" <ben.usenet@xxxxxxxxx> wrote in message<snip>
news:87abmo9n9b.fsf@xxxxxxxxxxxx
What you a showing, I think, is a language that can index record
(or structure) members. In the posted C++, this is done by using
pointers to member functions. Both are key to one part of the OP's
problem but neither really gets to the heart of the OP's question --
how to represent (or denote) compound match predicates.
You mean how to specify which fields are to be compared and to what?
Yes -- the tests (not the results!) computed from run-time data. The
key point (and this was not explicit so I may have missed the real
intent) was that the functions were indexed in a table so that
run-time data could be used to say what gets matched. The classic
general example would be a network packet filter -- command line
arguments specify what constitutes a match (e.g. one can type "match
src.addr = 129.168.1.1 & dst.port > 1024").
The posted example just listed all the combinations of exact
comparisons between all possible fields represented as bits in a
mask. I took Malcolm's suggestion that the solution was rather
under-engineered to suggest a more general solution where a general
predicate could be stored in the program. The obvious method being to
use first-class function values if the language supports them.
--
Ben.
.
- References:
- Decision Tables
- From: Leslie Sanford
- Re: Decision Tables
- From: Ben Bacarisse
- Re: Decision Tables
- From: kwikius
- Re: Decision Tables
- From: Bartc
- Re: Decision Tables
- From: Ben Bacarisse
- Re: Decision Tables
- From: Bartc
- Decision Tables
- Prev by Date: Re: What makes a CD-ROM bootable?
- Next by Date: Re: help!
- Previous by thread: Re: Decision Tables
- Next by thread: General tree assignment in C
- Index(es):