Logical relation: Difference between revisions
Created page with 'An expression whose value is TRUE or FALSE is a '''logical expression'''. Such expressions may contain boolean variables. If A,B, and laminar are boolean, then the following is a…' |
No edit summary |
||
| Line 29: | Line 29: | ||
''Note: the [[LRSlv]] solver is an implementation of a logical relation solver, although it has some limitations on what it can/cannot acheive.'' | ''Note: the [[LRSlv]] solver is an implementation of a logical relation solver, although it has some limitations on what it can/cannot acheive.'' | ||
See also [[SATISFIED]], [[Conditional modelling]]. | |||
[[Category:Syntax]] | |||
Latest revision as of 23:33, 26 January 2011
An expression whose value is TRUE or FALSE is a logical expression. Such expressions may contain boolean variables. If A,B, and laminar are boolean, then the following is a logical expression:
A + (B * laminar)
as is (and probably more clearly)
A OR (B AND laminar)
The plus operator acts like an OR among the terms while the times operator acts like an AND. Think of TRUE being equal to 1 and FALSE being equal to 0 with the rules
- 1+1 = 0+1 = 1+0 = 1
- 0+0 = 0
- 1*1 = 1 and
- 0*1 = 1*0 = 0*0 = 0.
If A is FALSE, B is TRUE and laminar is TRUE, the above expression has the value
- FALSE OR (TRUE AND TRUE) -->TRUE
or in terms of ones and zeros
- 0 + (1 * 1) --> 1.
Logical relations are then made by putting together logical expressions with the boolean relational operators == and !=. Since we have no logical solving engine we have not pushed the implementation of logical relations very hard yet.
Note: the LRSlv solver is an implementation of a logical relation solver, although it has some limitations on what it can/cannot acheive.
See also SATISFIED, Conditional modelling.