[PATCH] Logical expressions in capability attributes

Aaron Ballman aaron at aaronballman.com
Fri May 9 11:33:54 PDT 2014


On Fri, May 9, 2014 at 1:59 PM, Delesley Hutchins <delesley at google.com> wrote:
> LGTM.

Thanks! Committed in r208439.

~Aaron
>
>
>
> On Wed, May 7, 2014 at 11:47 AM, Aaron Ballman <aaron at aaronballman.com> wrote:
>> This patch adds the ability to use logical expressions for capability
>> attributes. This is to allow requirements to be expressed not just in
>> terms of lists, but in terms of logical expressions. Eg)
>>
>> void foo(void) __attribute__((requires_capability((FlightControl ||
>> Worker) && !Logger)));
>>
>> This functionality is lowered from an Expr into an LExpr (logical
>> expression) which we can then perform Boolean implication on to
>> determine whether the capability context satisfies the logical
>> expression.
>>
>> It does not hook this functionality into the existing capability
>> analyses because that is a considerably larger chunk of code to be
>> implemented in a subsequent patch. Like ThreadSafetyTIL.cpp/h, this is
>> WIP code.
>>
>> ~Aaron
>
>
>
> --
> DeLesley Hutchins | Software Engineer | delesley at google.com | 505-206-0315



More information about the cfe-commits mailing list