Complex type containing both OR and AND

How do I construct a complex type which has two features, one of type logical-or and the other of type logical-and (so that I could use both AND and OR operations, depending on what I need)?

I am doing something wrong on the basic level I think, in terms of the hierarchy. The feature which I want to contain these two logical features lives in CAT. Previously it just had the type logical-or but I suppose I need to create some kind of new type in order to be able to declare two features inside it, of different logical types?

I tried:

or-and := avm & 
[ LOGICAL-OR logical-or,
  LOGICAL-AND logical-and ].

cat := cat-min &
  [ HEAD head-min,
    WH or-and ].

…but this gives me an error "Unification with constraint of LOGICAL-OR failed at path (SYNSEM LOCAL CAT WH) - in what looks like all phrases. Or does this indicate something is wrong in the customized grammar (not in matrix.tdl)?

Update: I found a few obvious problems myself for now (in the rest of the grammar).

I think I’ve resolved the issues. So, the type as I suggested it is technically correct (in the sense that it is working as I wanted it to).

Sorry for the slow reply. If you just want to specify that there’s a boolean, without specifying what operation will be used, use a bool-wrapper. Subtypes can then specialise this to logical-and or logical-or as necessary.

1 Like