[ECOS] CDL help wanted
Andrew Lunn
andrew.lunn@ascom.ch
Sun Nov 4 07:42:00 GMT 2001
On Tue, Nov 13, 2001 at 06:26:08PM +0100, Andrew Lunn wrote:
> Hi Folks
>
> Please could someone help me with some CDL.
>
> I have a big package which has lots of options which enable/disable
> compiling various functions. Associated with each compilable option
> there is a test program. My problem is how to get the test programs
> compiled.
This inference engine is great fun to play with. Reminds me of the
prolog i learn at University. Anyway, im looking at another way of
solving my problem. I have
cdl_option CYGDAT_MYPKG_ACTIVE_TESTS {
display "List off all active tests"
flavor data
default_value {" "}
}
cdl_option CYGDAT_MYPKG_ACTIVE_TESTS_BUILD {
display "List off all active tests"
flavor data
requires is_substr(CYGDAT_MYPKG_ACTIVE_TESTS,CYGPKG_MYPKG_OP1_TESTS) == is_enabled(CYGPKG_MYPKG_OP1);
requires is_substr(CYGDAT_MYPKG_ACTIVE_TESTS,CYGPKG_MYPKG_OP2_TESTS) == is_enabled(CYGPKG_MYPKG_OP2);
requires is_substr(CYGDAT_MYPKG_ACTIVE_TESTS,CYGPKG_MYPKG_OP2_TESTS) == is_enabled(CYGPKG_MYPKG_OP3);
}
So, what i want it to do is if CYGPKG_MYPKG_OP1 is active, make sure
that the list of tests for that package is a substring of
CYGDAT_MYPKG_ACTIVE_TESTS.
This works 50% of the time. Problem is the other 50% of the time,
rather than fiddling with the substrings, it enables/disables my
subpackage! Is there anyway to tell the inference engine that variable
X is fixed, but variable Y its free to change?
Andrew
More information about the Ecos-discuss
mailing list