Changes between Version 22 and Version 23 of Specification/RSF2DIMACS


Ignore:
Timestamp:
Mar 10, 2015, 12:09:57 PM (9 years ago)
Author:
krafczy
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Specification/RSF2DIMACS

    v22 v23  
    3939||1||1||Illegal state|| 
    4040 
    41 == Translation of ''depends'' Constraints == 
     41== Translation of ''Depends'' Constraints == 
    4242A depends statement specifies the maximum possible selection for a variable. The constraint is evaluated in "integer logic", with "or" being "max", "and" being "min" and "not" being "2-". 
    4343 
     
    8080If Condition contains variables that are neither boolean nor tristate (i.e. integer, hex, string or unknown) they are treated as false (i.e. 'n'). 
    8181 
    82 == Translation of ''!ItemSelects'' Constraints == 
    83 TODO: review 
    84 The [https://www.kernel.org/doc/Documentation/kbuild/kconfig-language.txt KConfig specification] defines select statements as follows: 
    85 > reverse dependencies: "select" <symbol> !["if" <expr>] 
    86 >  While normal dependencies reduce the upper limit of a symbol (see 
    87 >  below), reverse dependencies can be used to force a lower limit of 
    88 >  another symbol. The value of the current menu symbol is used as the 
    89 >  minimal value <symbol> can be set to. If <symbol> is selected multiple 
    90 >  times, the limit is set to the largest selection. 
    91 >  Reverse dependencies can only be used with boolean or tristate 
    92 >  symbols. 
    93 1. Translation of Boolean !ItemSelect statements: 
     82== Translation of ''ItemSelects'' Constraints == 
     83The ItemSelects statement specifies the minimum possible selection for a variable, if the specified condition is true. The constraint is evaluated in "integer logic", with "or" being "max", "and" being "min" and "not" being "2-". 
     84 
    9485 * In RSF: 
    9586{{{ 
    96 ItemSelects BOOLEAN_VAR OTHER_VAR CONDITION 
    97 }}} 
    98  * In Boolean formula: 
    99 {{{ 
    100 (BOOLEAN_VAR and CONDITION) implies OTHER_VAR 
    101 }}} 
    102  * In DIMACS: 
    103 {{{ 
    104 Not(BOOLEAN_VAR) or Not(CONDITION) or OTHER_VAR 
    105 }}} 
    106 2. Translation of Tristate !ItemSelect statements: 
    107  * In RSF: 
    108 {{{ 
    109 ItemSelects TRISTATE_VAR OTHER_VAR CONDITION 
    110 }}} 
    111  * In Boolean formula: 
    112 {{{ 
    113 (TRISTATE_VAR and CONDITION) implies OTHER_VAR 
    114 (TRISTATE_VAR_MODULE and CONDITION) implies OTHER_VAR_MODULE 
    115 }}} 
    116  * In DIMACS: 
    117 {{{ 
    118 Not(TRISTATE_VAR) or Not(CONDITION) or OTHER_VAR 
    119 Not(TRISTATE_VAR_MODULE) or Not(CONDITION) or OTHER_VAR_MODULE 
    120 }}} 
     87ItemSelects Variable OtherVariable Condition 
     88}}} 
     89 
     90=== Variable is Boolean === 
     91 * In Boolean formula: 
     92{{{ 
     93(Variable  and Condition) implies OtherVariable 
     94}}} 
     95 * In DIMACS: 
     96{{{ 
     97Not(Variable) or Not(Condition) or OtherVariable 
     98}}} 
     99 
     100If the Condition is true and Variable is true (i.e. 'y'), then OtherVariable must be true (i.e. 'y'). If OtherVariable is a tristate, 'y' means "permanently selected". 
     101 
     102=== Variable is Tristate === 
     103 * In Boolean formula: 
     104{{{ 
     105(Variable  and Condition) implies OtherVariable 
     106(Variable_MODULE  and Condition) implies (OtherVariable or OtherVariable_MODULE) 
     107}}} 
     108 * In DIMACS: 
     109{{{ 
     110Not(Variable) or Not(Condition) or OtherVariable 
     111Not(Variable_MODULE) or Not(Condition) or (OtherVariable or OtherVariable_MODULE) 
     112}}} 
     113 
     114If the Condition is true and Variable is true (i.e. 'y'), then OtherVariable must be true (i.e. 'y'). 
     115 
     116If the Condition is true and Variable is selected as module (i.e. 'm'), then OtherVariable must be selected as module ('m') or permanently selected ('y'). Thus, if OtherVariable boolean, it can only be permanently selected; the " or OtherVariable_MODULE" part is omitted in this case. 
    121117 
    122118== Translation of Choices ==