public class OsConstraintHelper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
OsConstraintHelper.UnsatisfiableOsConstraintsException |
| Constructor and Description |
|---|
OsConstraintHelper() |
| Modifier and Type | Method and Description |
|---|---|
static List<OsModel> |
commonOsList(List<OsModel> osList,
List<OsModel> otherOsList)
Computes a list of constraints which satisfies both
osList and
otherOsList. |
static List<OsModel> |
getOsList(IXMLElement element)
Extract a list of OS constraints from given element.
|
static String |
toOsContraintsString(List<OsModel> osList)
Converts list of OS constraints to a string.
|
public static List<OsModel> getOsList(IXMLElement element)
element - parent IXMLElementpublic static List<OsModel> commonOsList(List<OsModel> osList, List<OsModel> otherOsList) throws OsConstraintHelper.UnsatisfiableOsConstraintsException
osList and
otherOsList. If the combination of osList and
otherOsList is unsatisfiable, a respective exception is thrown.
The ideas of the algoritm are as follows:
OsModel is treated as a logic formula containing only
logical and operators, i.e., OS = (x64 && windows).OsModel-s is treated as a logic formula of
OsModel formulas joined by logical or operator, i.e.,
F = OS-1 || OS-2.F = F-1 && F-2 = (OS-11 || ... OS-1n) && (OS-21 || ... OS-2m).OS formulas
directly (they contain only and-s). Thus, a list of new OS
formulas is obtained that are only joined by logical or-s.osList - list of OS constraintsotherOsList - other list of OS constraintsOsModel-s which satisfies both osList and
otherOsListOsConstraintHelper.UnsatisfiableOsConstraintsException - when both osList and
otherOsList cannot be satisfiedCopyright © 2001–2025. All rights reserved.