Home
pure::variants Eclipse Plug-in User`s Guide
Contents
1. PV ENDCOND Close a conditional text block This macro is allowed after a PV IFCOND PV ELSEIFCOND or PV ENDCOND call These macros can occur everywhere in the text document and are directly matched i e in dependently of the surrounding text The conditions of PV IFCOND and PV ELSEIFCOND have to be valid XPath expressions and may use the pure variants XSLT extension functions see Table 7 20 XSLT extension functions Calls to these functions have to be prefixed by pv Conditional text blocks can be nested That means that a PV IFCOND block can contain another PV IFCOND block defining a nested conditional text block that is evaluated only if the surrounding text block is included in the resulting text output In the example document given below after processing with an ps condtext transformation the resulting text document only contains an introductory chapter if the corresponding fea ture WithInt roduction is selected Example 7 2 A sample conditional document for use with the ps condtext transformation PV IFCOND pv hasFeature WithIntroduction This text is in the resulting text output if feature WithIntroduction is selected PV ELSECOND This text is in the resulting text output if feature WithIntroduction is not selected PV ENDCOND This text is always in the resulting text output
2. getVariantId MID MID is unified with the unique id of the variant de scription model vdm cur rently being evaluated MIDL is unified with the list getModelList MIDL of all models currently being evaluated This gives access to ids of the feature models family models and variant description models in the current configuration space getElementMod MID is bound to the model id Expression Language pvProlog Rule Description Examples Limitations el EID MID associated with the unique element id EID If EID is getElementMod not given the context ele el MID ment is used as EID userMes Issues a problem message to userMes sage TYPE STRING be shown for example in sage error Somet RE the Eclipse problems view hing LATEDEIDS CONTEXTEIL TYPE is oneof error happened REID1 RE D warning info ID2 MYEID STRING is the text which describes the problem RE LATEDEIDS is a list of ele ments with some relation to the problem CONTEXTEID is the id of the element that caused the problem userMes Issues a problem message as sage TYPE STRING RELATEDEIDS above but automatically sets the current element to be the context element
3. Predefined Source Element Types ps flagfile Attributes dir ps directory file ps path type ps filetype flag ps string This source element type is used to generate C C Header files containing define lt flag gt lt flagValue gt statements The lt flagValue gt part of these statements is the value of the attribute Value of the parent part element The name of the flag is specified by the attribute flag See the section called Assigning values to part elements for more details The same file location can be used in more than one ps flagfile definition to include multiple define statements in a single file Example 7 3 Generated code for a ps flagfile for flag DEFAULT with value 1 ifndef _ guard DEBUG define _ guard _ DEBUG undef DEBUG define DEBUG 1 endif ps makefile Attributes dir ps directory file ps path type ps filetype variable ps string This source element type is used to generate makefile variables using a lt variable gt lt varValue gt statement The lt varValue gt part of the statement is the value of the attribute Value of the parent part element The name of the variable is specified by the at tribute variable See the section called Assigning values to part elements for more details The same file location can be used for more than one ps makefile element to in clude multiple makefile variables in a single file Example 7 4 Generated code for a
4. PARIDS is unified with the list of parents of the element specified by EID or an empty list if no parents exist ments CTXID pr ME MatchEx DS match expression is the cur rent element context see getContext unless CTX ID is used to specify a dif ferent context Match expressions are ex plained below getElement ROOTID is the root element Root EID ROOTID for the element specified by EID For elements with sev eral root elements only one is chosen getElement ENAME is unified with the Name EID ENAME unique name of the element specified with EID getElement ECLASS is unified with the The standard meta model Class EID ECLASS type model element class of uses the classes ps feature the element specified with ps component ps part and EID ps source getElement ETYPE is unified with the Type EID ETYPE type model element type of the element specified with EID getMatchingEle ME IDS is unified with a list Put all features below the ments MatchExpr MEI of all the elements which current element with unique DS comply with the specified names starting with match expression Mat ch FEA_X in a list getMatchingEle Expr The context of the getMatchingEle ments
5. Restrictions Page The Restrictions page defines element restrictions Any element that can have restrictions can have any number of them A new restriction can be created using the Add button an existing restriction can be removed using Remove The order of restrictions may be changed using the Move Up and Move Down buttons on the right side of the page Figure 5 9 Restrictions page shown in property editor Edit Part Edit Part Edit Edit Edit Restrictions Edit Restrictions General Relations Attributes Restrictions Constraints General Relations Attributes Restrictions Constraints Restriction Restriction 1 hasFeature Yoghurt asFeature i600caFfl8biivjSr ISR vekTGH2sZrusL EAA Add 2 hasFeature French Remove 7 hasFeature French 3 hasFeature Garlic hasFeature Garlic Move down Move down gt Add Remove g lt Description Description Dressing should be yoghurt Dressing should be yoghurt A restriction can be edited in place using the cell editor shown in the right side of figure Figure 5 9 Restrictions page shown in property editor Note the difference in restriction 1 in the left and right sides of the figure Unless they are being edited the element identi fiers in restrictions are shown as their respective unique names e g Garlic when avail able When the editor is opened the actual restriction is shown e g
6. cccecccceececececeeecereeeeeees 9 3s CONCEPIS se Gesieessbessg ses tuis sebecede Subs Nest Des oy xt epics ahs ov esees ey ee ens 11 Del MOdUCtION meannan aaea ea ea ae aena eiai 11 3 2 Common Concepts in pure variants models 0 0 0 0 eee eeeeeeeeeeeeeeeeeeeee 12 3 2 1 M delConstraints 2 0 1 1 nans iad aea iea 12 3 2 2 Element Restrictions snipee en aeii aaia 13 3 2 3 Element Relations iiien tonii tgi eol 13 324A Element Attributes 2 s1 g2050 Secensbivenens ET E AEE AN 13 3 3 Feature Models sis ivorcs cdeceete bee dh sis ost ate iiion dea inta e eiiean ia 16 3 31 Feature Attributes ieoor eaa eea e ee area E EKo 17 3 4 Family Models prre rrote eer iE R E E EER EE S 17 3 4 1 Structure of the family model eee ee eeeeeeeeeeeeeeeeeeees 17 3 4 2 Sample family model 0 eee eneen enner irigi 18 3 4 3 Restrictions in Family Models 0 0 0 0 eee eeeeeeeeeeeeeeeeeeeeeeeeees 20 3 4 4 Relations in Family Models 000 0 eee eeeececeeeceeeeeeeeeeeeeeeeeees 20 3 5 Model Evaluation ic cu Gentine tinted iets tienes 21 3 5 1 Evaluation Algorithm eee eeeeecececeeeceeeeeceeeeeeeeeeeeeeeeeees 22 3 5 2 Automatic Selection Problem Resolving oeer 23 3 6 Model Transformation 0 0 0 0 cece ceeecececeeececececececececeeeceeeseeeeeeeeeeeees 24 3 6 1 The Transformation Process eeeeeeeeeeeeececeeeeeeeeeeeeeeeeeees 24 3 6 2 pure variants Transformation Input 2 0 0 0 eee eeeeeeeeeeeeeee 25 3 7 Model Valid
7. Commands logging 4 4 Plug in Development Commands internal logging 5 E Run Debug c y H Team Request dumping 7 Method tracing 8 Response dumping all 9 F Variant Management Visualiser IV Clear logfile on startup Clear stored dialog decisions Restore Defaults Apply cme 8 2 User Interface Advanced Concepts 8 2 1 Console View This view is used to alter the information that is logged during program operation The amount of information to be logged is controlled via a preferences menu and this can be changed at any time by selecting the log level icon in the view s toolbar The changed log ging level is active only for the current session P Note If the preferences menu is used instead to change the logging level then this 117 Glossary applies to this session and every subsequent session 8 3 Glossary 118 Context Menu CSV DOT EBNF HTML Model Rank OCL Prolog XML XML Namespace XMLTS A menu which is customized according to the user interface item the user is currently pointing at with the mouse On Windows Linux and MacOS X with two or more mouse buttons the right mouse button is usually configured to open the context menu Under MacOS X with single button mouse the command key and then the mouse button have to be pressed while still holding the command key to open the context menu C
8. 27 ccm_copy xsl E 2 Brake Actuation a moduleconfig xml vV Electric l E Readme txt Electrohydraulic C Hydraulic Blew I Rear fv 2 Front Hv l Gear Box a d q Engine 4 2 Feature Models Family Models _ _ _ 22 0 16 3 3 6 Model Transformation pure variants supports a user specified generation of product variants using an XML based transformation component XMLTS XMLTS can process any kind of XML document by binding processing modules onto the nodes of the XML document according to a user specified module configuration These processing modules encapsulate the actions to be performed on a matching node in the XML document A set of generic modules is supplied with XMLTS e g a module to execute XSLT scripts and a module for collecting and ex ecuting transformation actions The user may create custom modules and integrate these using the XMLTS module API The transformation module configuration is part of the configuration space properties see Section 5 3 6 Configuration Space Editor 3 6 1 The Transformation Process 24 The XMLTS transformation process works by traversing the XML document tree Each node visited during this traversal is checked to see whether any processing modules should be executed on it If no module has to be executed then the node is skipped Otherwise the actions of each module are performed on the node Further modules executed on th
9. The Model Compare Editor is a special editor provided by pure variants to view and treat differences feature and family models The behaviour of this editor is very similar to that of the Eclipse text compare editor For general information about the Eclipse compare capab ilities please refer to the Eclipse Workbench User Guide The Task section contains a subsection Comparing resources which explains the compare action in detail In the following a brief description of the general layout and functionality of the Eclipse compare action is given General Eclipse Compare In general comparison of resources is divided into two different types One is to compare two resources with each other This is called a two way compare A two way compare can only reveal differences between resources but can not recognize in which resource a change was performed A two way compare in Eclipse is obtained by selecting two re sources and then choosing Compare With gt Each Other from the context menu Other two way comparisons supported by Eclipse are Compare With gt Revision and Compare With gt Local History A more comfortable compare is the so called three way compare In addition it has an an cestor resource from which is known that this is the unchanged resource In this way it can be determined which change was performed in which resource Such compare editors are opened for instance for synchronizing resources with CVS repositories which
10. However the context menu allows the exclusion of a feature this prevents the Auto Resolver from selecting the feature Each selected feature is shown with an icon indicating how the selection was made The different types of icons are documented in Table 7 19 Types of feature selections If the user selects a feature that has already been selected automatically its selection type be comes user selected and only the user can remove the selection When the E icon is shown instead of the selection icon the selection of the feature is inad visable since it will probably cause a conflict The current feature selection is evaluated by pressing button f Recognized selection Variant Description Model Editor problems are shown with problem markers on the right side of the editor window and in the Problems view On the left side only those markers are shown that point to problems in the currently visible part of the model Clicking on these markers may open a list with fixes for the corresponding problem Automatic feature selection evaluation is enabled by pressing button g This will cause a validation of the model each time the model is changed The result of validating a feature selection are the concrete variants of the models in the configuration space These concrete model variants can be saved to an XML file using the button E Figure 5 18 Variant description model editor with outline result problems and attr
11. Z 0 9 All keywords of pvSCL are also allowed to be used in lower case letters Name Symbol Association Type Description AND left OR left binary binary Logical and both op erands have to evalu ate to true Logical or at least one of the operands has to evaluate to true IMPLI ES left binary Logical implication Expression Language pvSCL Name Symbol Association Type Description if the left operand evaluates to true the right operand also has to evaluate to true Otherwise if the left operand eval uates to false the whole implication evaluates to true Table 7 13 Relational operators in pySCL Name Symbol Association Type Description REQUIRES left binary Like IMPLIES CONFLICTS RECOMM ENDS left left binary binary Like IMPLIES with negated right oper and i e if the left op erand evaluates to true the right oper and has to evaluate to false Like IMPLIES but does not cause an er ror if failed DISCOURAGES left binary Like CONFLICTS but does not cause an error if failed Table 7 14 Functions in pySCL Name Symbol Description NOT 1 EXP Evaluates to true if I EXP evaluates to false and vice versa Tab
12. ute of EN with a number as value check Max Hand Fingers MaxNumFingers check Checks if the value of attrib Examples Range EN AN Minimum ute AN of element EN is Maximum equal or greater than Min check imum and equal or less than Range Car Speed Maximum Minimum and r0 130 Maximum have to be num bers or names of attributes of check EN with a number as value Range Car Speed 0 MaxSpeed 7 5 2 Match Expression Syntax for getMatchingElements 96 The getMatchingElements rules use simple match expressions to specify the ele ments A match expression is a string Match expressions are evaluated relative to a given context or absolutely i e starting from the root element of the context element when the expression s first character is a dot The expression is broken into individual matching tokens by dots Each token is matched against all elements at the given tree position The first token is matched against all children of the context or all children of the root element in the case of absolute paths The second token is matched against children of the elements which matched the first token and so on Tokens are matched against the unique names of elements The match pattern for each token is very similar the the Unix csh pattern matcher but is case insensitive i e the pattern V matches all names starting with small v or capital V The following p
13. 8 ApplicationCore ps class NoConn ps file NoConn h psiclass WeatherData ps file WeatherData h psiclassalias PCConn S ps classaliasfile PCConn h ps project WeatherMonitor ps file weathermon cc 8 Display LY ps aspect Display 1 Oe oe Result Delta Mode The result delta mode is enabled with the plus minus button 4 in the result view s tool bar In this mode the view displays the difference between the current evaluation result and a reference result either the result of the previous evaluation default or an evaluation result set by the user as a fixed reference In the first case the reference result is updated after each evaluation to become the current evaluation result The delta is therefore always calculated from the last two evaluation results In the second case the reference result does not change All deltas show the difference between the current result and the fixed refer ence result The fixed reference can be either set to the current result or can be loaded from a previ ously saved variant result a vrm file The reference result is set from the result view menu third button from right in toolbar To set a fixed result as reference use Set current result as reference To load the reference from a file use Load reference result from file To activate the default mode use Release reference result The Switch Delta Mode sub menu allows the level of delta d
14. C 3 Manual Safety Functions O AaBs V ESP Feature Models Family Models 5 4 2 Filter View Model editors may be filtered using Named Filters The Filter view shows all currently available named filters Additional filters may be imported from a file by using a context menu To apply a filter to a model editor select the model editor and then double click on the filter name in the Filter view Filters may also be deleted renamed or exported using context menu commands Exported filters are stored in a file which can be imported into another Eclipse installation or shared in the project s team repository 5 4 3 Search View Feature and family models can be searched using the Variant Search dialog The Variant Search view shows the result of this search and is opened automatically when the search is started The search results are listed in a table or in a tree representation The tree representation structures the search results in a simple tree The first level of the tree lists the models containing matches On the second level the matched elements are lis 67 68 Search View ted The next levels finally list the matched attributes attribute values restrictions and constraints Figure 5 25 Variant Search View Tree Search 33 Be g7 mh 4 matches found in all Models For Trace Weather Station Solutions 3 matches En StreamOutputMapping 1 match hasFeature Tra
15. FEA X L IST getMatch ingAttrib A utes MatchExpr IDS RID AIDS is unified with all at tributes of the element spe cified with the unique id EID which match with the pattern in Mat chExpr The match pattern is the same as for getMatchingElements 92 Expression Language pvProlog ENAME COUNT Rule Description Examples Limitations but it must not contain dot characters Match expressions are ex plained below subno These methods count the A restriction checking de number of selected children whether three children of Count ECLASS ENAME of a given element COUNT is component X are selected COUNT bound to the number of se lected child elements subno subno Whether the element itself is de de selected is not checked Count ps component Count ECLASS ETYPE X 3 subno deCount EID COUNT subfeature COUNT is bound to the num Count FNAME COUNT ber of selected child features of feature FNAME Conveni ence method for subno de Count ps feature _ FNAME COUNT ture FNAME singleSubfea True if feature FNAME has just a single child Conveni ence method for subno de Count ps feature _ FNAME 1 93 Additional Restriction Rules for Variant Evaluation 7 5 1 Additional
16. Optional features are selected independently Alternative features are organised in groups At least one feature has to be selected from a group if the parent feature is selected although this can be changed using range expressions pure variants allows only one ps alternative group for the same parent fea ture or ps or Or features are organised in groups At least one feature has to be selected from a group if the parent feature is selected although this can be changed using range expressions pure variants allows only one ps or group for the same parent feature 7 8 Family Models 101 Predefined Source Element Types 7 8 1 Predefined Source Element Types 102 Table 7 17 Predefined source element types Source Type Description Icon ps file Maps directly to a file ps fragment Represents a file fragment to be appended to another file ps transform Describes an XSLT script transformation of a document ps condxml Maps directly to an XML document containing variation points conditional parts ps condtext Maps directly to a text document containing variation points conditional parts ps flagfile Represents a file that can hold flags such as a C C header file containing preprocessor defines ps makefile Represents a make build file such as GNU make files contain ing make file variables ps classaliasfile Represents a file containing an alias e
17. Readme txt rotocol nd Runtime System ccfm Wette I i x Trace X 0O a E Runtime System xfm Weather Station ccfm E Weather Station xfm gt input amp output K lv j 5 4 10 Variant Projects View The Variant Projects View upper left part in Figure 5 31 The Variant Projects view shows all variant management projects in the current workspace Projects and folders or models in the projects can be opened in a tree like representation Wizards available from the project s context menu allow the creation of feature models family models and config uration spaces Double clicking on an existing model opens the model editor usually shown in the upper right part of the perspective In Figure 5 31 The Variant Projects view one editor is shown for a variant description model with some features selected 73 Search Figure 5 31 The Variant Projects view ariant Management Sample Config Space with Transformation ydm Eclipse SDK lolx File Edit Navigate Search Project Run Variant Window Help es Variant Projects X E Conditional Documents Example Fragment Example W Simple Car Example QB Sample Config Space with Transfor Sample Config Space with Trani Safety Functions I Brakes l Gear Box 1 Engine gy ccm_copy xsl moduleconfig xml B R
18. The content is taken either from a file if srcdir and srcfile are given or from a string if content is given The attribute mode is used to specify the point at which this content is appended to the file i e before or after the child parts of the current node s parent part are vis ited The default value is before ps transform Attributes dir ps directory file ps path type ps filetype srcdir ps directory srcfile ps path scriptdir ps directory scriptfile ps path scriptparameters ps string The source element type is used to transform a document using an XSLT script and to save the transformation output to a file The document to transform is searched in lt ConfigSpaceInputDir gt lt srcdir gt lt srcfile gt The transformation output is written to lt ConfigSpaceOutputDir gt lt dir gt lt file gt lt ConfigSpaceInputDir gt lt scriptdir gt lt scriptfile gt specifies the location of the XSLT script to use Any other attributes are interpreted as script parameters and are accessible as global script parameters in the XSLT script initialized with the corresponding attribute values ps condxml 104 Attributes dir ps directory file ps path type ps filetype sredir ps directory srcfile ps path conditionname ps string copycondition ps boolean Predefined Source Element Types This source element type is used to copy an XML document and optionally to s
19. The following limitations can be made All Occurrences All model types are searched Family Models Only family models are searched Feature Models Only feature models are searched 5 5 4 Element Scope This group is only activated if Elements search type is selected Here it can be configured against which element name the search pattern is matched Unique Name Match against the unique name of the element Visible Name Match against the visible name of the element At least one of the options has to be choosen 5 5 5 Attribute Scope This group is only activated if Attribute Values search type is selected In this group the following refinements can be made Calculations Match against attribute value calculations Constants Match against constant attribute values 76 Scope At least one has to be selected To limit the search to values of attributes with a specific name this name can be inserted into the Attribute Name input field 5 5 6 Scope This group is used to limit the search to a certain set of models The following options are available Workspace Search in all variant projects of the workspace Selected resources Search only in the projects folders and files that are selected in the Variant Projects view Enclosing projects Search only in the enclosing projects of selected project entries in the Variant Projects view Working set Search only in projects included in the choosen working set Fo
20. Variant Description Model 59 P Problems View 69 Projects View 73 Properties View 69 pvProlog Restrictions 87 pvSCL Constraints 97 R Relations Editor 47 Feature 13 View 69 Restrictions Editor 50 Element 13 family model 19 pvProlog 87 Result View 70 S Search Dialog 74 View 67 T Tasks View 69 Transformation Variant Description Model 24 Type Attribute Value 15 V Validation Models 26 Value Attribute 15 Variant Matrix View 72 Variant Description Model Auto Resolver 23 Editor 58 Evaluation 21 Outline 59 Transformation 24 Variant Projects View 73 Variation Type Feature 101 Views Attributes 67 Feature Matrix 72 Filter 67 Outline 69 Problems 69 Properties 69 Relations 69 Result 70 Search 67 Tasks 69 Variant Projects 73 122
21. generated selecting target group user and then developer Figure 4 4 The manual for users and developers EE Mozilla Ol xi eae oi x a File Edit View Go Bookmarks Tools Window Help a File Edit View Go Bookmarks Tools Window Help gt l Developer Manual Version 1 0 Introduction Some text about the product Installation Runtime Environment Some text about installing the runtime environment SDE Some text about installing the software development kid Usage Some text about using the product Extension API Some text about extending the product User Manual Version 1 0 Introduction Some text about the product Installation Runtime Environment Some text about installing the runtime environment Usage Some text about using the product D e Of LE amp Doe G4 OF LE amp done Chapter 5 Graphical User Interface The layout and usage of the pure variants User Interface closely follows Eclipse guidelines See the Workbench User Guide provided with Eclipse Help gt Help Con tents for more information on this 5 1 Getting Started with Eclipse This section gives a short introduction to the elements of the Eclipse UI before introducing the pure variants UI Readers with Eclipse experience may skip this section Eclipse is based around the concepts of workspaces and projects Workspaces are used by Eclipse to refer to enclosed projects prefer
22. see Table 7 20 XSLT extension functions 3 7 Model Validation 26 XML Schema Model Validation In the context of pure variants model validation is the process of checking the validity of feature family and variant description models Two kinds of model validation are sup ported i e validating the XML structure of models using a corresponding XML Schema and performing a configurable set of checks using the model check framework 3 7 1 XML Schema Model Validation This model validation uses an XML Schema to check if the XML structure of a pure variants model is correct This is pure syntax check no further analyses of the model are performed The XML Schema model validation is disabled per default It can be enabled selecting op tion Validate XML structure of models on the Variant Management gt Model Handling preferences page menu Window gt Preferences If enabled all pure variants models are validated when opened Note Invalid models will not be opened correctly if the XML Schema model valida tion is enabled For more information about XML Schemas see the W3C XML Schema Documentation 3 7 2 Model Check Framework The model check framework allows the validation of models using a configurable and ex tensible set of rules called model checks There are no restrictions on the complexity of model checks Configuring the Framework The model check framework is configured on the Varia
23. selectAndStoreFromFamilyModel1s getFamModelsByRank current class ps source calculateAttributeValuesForResult checkFeatureRestrictions getSelectedFeatures checkRelations checkConstraints The algorithm has certain implications on the availability of information in restrictions constraints and attribute value calculations For simplicity we will consider for now that all feature and family models have the same model rank In the first evaluation step all feature selections stored in the VDM are matched to the structure of their feature models First all implicit features are calculated and merged with the feature selected by the user For this set it is now checked that structural rules for sub feature selections are fulfilled This means that it is checked that one alternative is selected from an alternative feature group etc Feature restrictions are not checked This set of selec ted features is now stored for later access with hasElement The next step is to select elements from the family models This is done in three iterations through the model In a first run all components are checked in a breadth first traversal through the family model element hierarchy For each component the restriction is evalu ated If the restriction evaluates to true the respective component is added to the set of se lected family model elements When all components are checked all child components of the selected
24. then the user is prompted to supply a license By selecting the Request 3 The Variant Management Per spective License button a software registration form is opened in the user s default web browser After submitting the form a license file is generated and sent to the e mail address spe cified by the user Select the Yes button and use the file dialog to specify the license file to install The specified license will be stored in the current workspace If the user has differ ent workspaces then the license file has to be installed in each of them 2 4 The Variant Management Perspective The easiest way to access the variant management functionality is to use the Variant Man agement perspective provided by the plug in Use Window gt Open Perspective gt Other and choose Variant Management to open this perspective in its default layout The Variant Management perspective should now open as shown below Figure 2 1 Initial layout of the Variant Management perspective Variant Management Eclipse SDK iof x File Edit Navigate Search Project Run Window Help 5 FEY fe variant Mana m Relations 3 N Result Y 7 E No relations available Os Outline 52 Filter You Properties 53 N Tasks Problems tu gt nll 4n outline is not available Property Value Now select the Variant Projects view in the upper left side of the Eclipse window Crea
25. user Explicitly selected by the user Auto resolver will never change i the selection state of a user feature 55 auto resolved A feature selected by the auto resolver to correct problems in the feature selection Auto resolver may change the state of an auto resolved feature but does not deselect these features when the user changes a feature selection state mapped The auto resolver detected a valid feature mapping request for this feature in a feature map and in turn selected the feature The feature mapping selection state is automatically changed rechecked when the user changes the feature selection implicit All features from the root to any selected feature and mandatory features below a selected feature are implicitly selected if not se lected otherwise excluded The user may exclude a feature from the selection process via a context menu When the selection of an excluded or any chil dren features of an excluded feature is required an error mes sage is shown non selectable For a specific feature selection the auto resolver may recognize features as non selectable This means selection of these fea Ey tures always results in an invalid feature selection For other fea ture selections these features may not non selectable 7 10 XSLT Extension Functions 112 The following extension functions are available when using the integrated XSLT processor in the pure variants XML Transf
26. veloped as a set of integrated Feature models describing the problem domain Family mod els describing the problem solution and Variant Description models specifying individual products from the product line Feature models describe the products of a product line in terms of the features that are common to those products and the features that vary between those products Each feature in a Feature model represents a property of a product that will be visible to the user of that product These models also specify relationships between features for example choices between alternative features Feature models are described in more detail in Figure 3 4 Basic structure of feature models Family models describe how the products in the product line will be assembled or gener ated from pre specified components Each component in a Family model represents one or more functional elements of the products in the product line for example software in the form of classes objects functions or variables or documentation Family models are de scribed in more detail in Section 3 4 Family Models Variant Description models describe the set of features of a single product in the product line Taking a Feature model and making choices where there is variability in the Feature model creates these models Variant Description models are described in more detail in Section 3 5 Model Evaluation In contrast to other approaches pure variants ca
27. always main tain a third ancestor resource by using Compare With gt Latest from Head and Compare With gt Another Branch or Version The compare editor is divided into an upper and a lower part The upper part shows struc tural changes in a difference tree The lower part presents two text editors located next to each other Changes are highlighted in colored lines or rectangles on both sides Those be longing to one change are connected with a line For two way comparisons the changes are always grey colored In three way comparisons outgoing local changes are grey colored incoming remote changes blue colored and changes on both sides which are conflicting are red colored A resource compare can be used to view changes for two resources In addition it provides the possibility to apply single changes to local models Therefor the compare editor provides a toolbar located between the upper and the lower part with actions which can be used to apply changes Copy All from Left to Right Copy All Non Conflicting Changes from Right to Left Copy Current Change from Left to Right Copy Current Change from Right to Left Select Next Change Select Previous Change You can step through the changes and apply them if the specific buttons are enabled As stated above refer to the Eclipse Workbench User Guide for detailed information on this The pure variants Model Compare Editor 64 In general the Eclipse text compare editor is opened for any
28. components are checked until no more child components are found The set of selected components is now stored for later access with hasElement In the next run all restrictions of child part elements of selected components are evaluated in the same way as for components The last run does this for all child parts of selected source elements This evaluation order permits part element restrictions to safely access the component configur ation since it will not change anymore The drawback is that it is not safe to reason about the component configuration in restrictions for components of the same or lower ranks Warning In pure variants calling hasElement for an element of the same class e g ps component and the same model rank will always yield false as result Make sure that family model element restrictions are safe That is they do not contain directly or indirectly references to elements for which the selection is not yet calculated e g in attribute calculations or restrictions Automatic Selection Problem Resolving The above steps are repeated for all model ranks starting with the earliest model rank and increasing to the latest model rank Note the lower the model rank of a model the earlier it is evaluated in this process e g a model of rank 1 is considered before a model of rank 2 The last four steps in the model evaluation process are performed only once First the at tribute values for
29. g for a C class that can be concurrently used in the same place in the class hierarchy e e e e e ps symlink Maps directly to a symbolic link to a file S The following sections provide detailed descriptions of the family model source element types that are relevant for the standard transformation see Section 4 1 1 Using the Stand ard Transformation All file related source element types derived from element type ps destfile specify the loca tion of a file using the two attributes dir and file Using the standard transformation the corresponding file is copied from lt ConfigSpaceInputDir gt lt dir gt lt file gt to lt ConfigSpaceOutputDir gt lt dir gt lt file gt Source element types derived from ps srcdestfile optionally can specify a different source file location using the attributes s r cdir and srcfile If one or both of these attributes are not used the values from dir and file are used instead The source file location is relative to the lt ConfigSpacelInputDir gt Every description has the following form Predefined Source Element Types aSourceElementType ps file Attributes attributeNamel typeNamel attributeName2 typeName2 The source element type aSourceElementType has one mandatory attribute named attributeNamel and an optional attribute named attributeNamez2 The option is indicated by the trailing question mark Attributes dir ps direct
30. id This must be the full feature id path modelld featureld Feature name This can be the unique name of the feature or the full fea ture id path modelld featureld 7 2 Keyboard Shortcuts Some of the following keyboard shortcuts may not be supported on all operating systems Table 7 1 Common Keyboard Shortcuts Action CTRL Z Undo CTRL Y Redo CTRL C Copy into clipboard CTRL X Cut into clipboard CTRL V Paste from clipboard 83 Element Attributes Table 7 2 Model Editor Keyboard Shortcuts Key Action ENTER Show properties dialog DEL ENTF Delete selected elements Up Down cursor keys Navigate tree Left Right cursor keys Collapse or expand subtree Table 7 3 Graph Editor Keyboard Shortcuts Key Action CTRL P Print graph CTRL Zoom in CTRL Zoom out CTRL ALT A Show relation arrows in graph CTRL ALT X Expand complete subtrees of selected elements ALT X Expand one level of selected elements ALT C Collapse selected elements ALT H Layout graph horizontal ALT V Layout graph vertical ALT DEL Hide selected elements 7 3 Element Attributes 84 Table 7 4 Supported Attribute Types Attribute Type Description Allowed Values ps string any kind of unspecified text any Element Relations Attribute Type Description Allowed Values ps path path to a file in a file system any
31. is part of the attributes new label attrname newValue The lower part of the model compare editor is realized using the usual model tree viewers also used in the model editors They are always expanded to ensure that all patches are vis ible As in the text compare editors patches are visualized by colorized highlighted rect angle areas or lines using the same colors In opposite to the text compare they are only shown if the patch is selected in the upper structure view For two way comparisons it is ambiguous which model was changed Because of this an additional button is provided in the toolbar which allows to exchange two models currently opened in the model compare editor This leads from a remove patch into an add patch and for a change the new and the old value are exchanged The model compare editor compares two model resources on the model abstraction layer Hence textual differences may exist between two models where the model compare editor shows no changes Thus conflicts that would be shown in a textual compare are not shown in the model compare editor This allows the user to apply all patches in one direction as desired and then to override into the other direction Conflicts In three way comparisons it may occur that an incoming and an outgoing patch conflict with each other In general the model compare editor distinguishes between fatal conflict ing patches and warning conflicts In the tree viewer conflicts are red
32. no further meaning other than a short description of what the constraint checks A constraint can be edited in place using the cell editor shown in the right side of figure Figure 5 10 Constraints page shown in property editor The button opens an advanced editor dialog that is more suit able for complex constraints This editor is described more detailed in the section called Advanced Expression Editor Advanced Expression Editor 50 The advanced expression editor is used everywhere in pure variants where more complex expressions may be inserted This is for instance when writing more complex restrictions constraints or calculations Currently it supports the two languages pvProlog and pvSCL Special editors are available for both languages Figure 5 11 Advanced pvSCL expression editor shows the pvSCL editor editing a constraint Common Editor Pages Figure 5 11 Advanced pvSCL expression editor Edit the constraint Select language of the constraint o Edit pyscl language conform expression Use CTRL Space to activate Constraint i Return type ps boolean Dressing REQUIRES French OR Yoghurt OR Water Water a Water liquid Water g WingCartoon material Cartoon E Wings Wings E WingsPackaging Packaging Yoghurt Yoghurt nine 9 six 6 Open Element Selection Dialog a cms This dialog supports syntax highlighting for pv CL keywords and
33. operator can be added by choosing the corresponding operator from the Add context menu entry To change an operator the context menu entry Change to is used The Neg ate button adds a NOT operator on top of the selected function or operator A selected function or operator can be removed by pressing button Remove The Move up and Move down buttons are used to move operands up or down for instance to swap operands The resulting pvProlog source code for the constructed expression is shown in the bottom half of the editor 53 Common Editor Pages Element Selection Dialog 54 The element selection dialog figure Figure 5 14 Element selection dialog is used in most cases when a single element or a set of elements has to be selected e g for choosing the relation target elements when inserting a new relation The left pane lists the potentially available elements the right pane lists the selected elements To select additional elements select them in the left pane and press the button gt Multiple selection is also suppor ted To remove elements from the selection select them in the right pane and use the but ton lt Figure 5 14 Element selection dialog O Select Element s x Select Select and or deselect elementis T Protocol weather Station Debug O O sd Weather Station X Temperature Weather Station Serial Weather Station X icp Weather Station UDPoverSLIPPr
34. ps float floating point number a valid floating point number ps boolean boolean value true and false ps url an URL or URI any ps html HTML code any ps datetime date and time e g in ISO any 8601 format ps filetype file type identifier def impl misc app undefined ps insertionmode value type of source element before and after type ps fragment ps element feature or family model ele any ment reference ps directory path to a directory in a file any system ps integer integer number a valid integer number ps feature feature reference a valid id of a feature ps class ps class source element ref a valid id of a ps class source erence element 7 4 Element Relations Table 7 5 Supported Relations between Elements I Relation Description ps requires EL At least one of the specified targets in EL has to be selected when the source is selec ted ps requiresAll EL All specified targets in EL have to be selec ted when the source is selected 85 86 Element Relations Relation ps requiredFor EL Description If at least one of the specified targets in EL is selected the source has to be selected too ps conditionalRequires EL Similar to ps requires The requires rela tion is checked only for targets whose parent is currently selected ps recommends EL Like ps requires but not treated as error only notification
35. resource after calling the ac tions described in the previous section For feature and family models the special pure variants Model Compare Editor is opened This makes it easier to recognize changes in feature and family models Typical changes are for example Element Added Attribute Removed Relation Target Changed The upper part of the editor i e the structure view displays a patch tree with a maximum depth of three Here all patches are grouped by their affiliation to elements Thus Element Added and Element Removed are shown as top level patches All other patches are grouped Model Compare Editor into categories below their elements they belong to Following categories exist General Attributes Relations Restrictions Constraints and Misc The names of the categories indicate which patches are grouped together Below the category Misc only patches are shown that are usually not displayed in the models tree viewer As in the Eclipse text com pare you can step through the patches with the specific buttons Each step down always ex pands a model patch if possible and steps into it The labels for the patch consist of a brief patch description the label of the patched model item and a concrete visualisation of the old and the new value if it makes sense Here is an example Attribute Constant Changed attrname newValue lt oldValue In this attribute patch s label a new value is not addi n tionally appended because it
36. selected Figure 3 4 Basic structure of feature models shows the principle structure of a pure variants feature model as UML class diagram A problem domain ProblemDomainModel consists of any number of feature models FeatureModel A fea ture model has at least one feature Figure 3 4 Basic structure of feature models 1 1 1 references subfeatures 1 attribute Family Models 3 3 1 Feature Attributes Some features of a domain cannot be easily or efficiently expressed by requiring a fixed description of the feature and allowing only inclusion or exclusion of the feature Although for many features this is perfectly suitable Feature attributes i e element attributes in fea ture models provide a way of associating arbitrary information with a feature This signi ficantly increases the expressive power of feature models However it should be noted that this expressive power could come at a price in some cases The main drawback is that for checking feature attribute values the simple requires conflicts recommends and discouraged statements are insufficient If value checks are ne cessary for example to determine whether a value within a given range conflicts with an other feature pvProlog level restrictions will be required 3 4 Family Models The family model or family model describes the solution family in terms of software ar chitectural elements Figure 3 5 Basic structur
37. subsection name SDK condition not pv hasFeature user gt lt par gt Some text about installing the software development kit lt par gt lt subsection gt lt section gt lt section name Usage gt lt par gt Some text about using the product lt par gt lt section gt lt section name Extension API condition pv hasFeature developer gt lt par gt Some text about extending the product lt par gt lt section gt lt document gt The manual has a title a version sections subsections and paragraphs The title and the presence of some sections and subsections are conditional on the target group The attribute condition has been added to the dependent parts of the document to decide which part s of the document are to be included These conditions test the presence of certain features in the product variant Figure 4 3 Variant project describing the manual shows the corresponding feature and family models in a variant project using the standard trans formation Figure 4 3 Variant project describing the manual amp Yariant Management Configuration vdm Eclipse Platform Loix File Edit Navigate Search Project Run Check Window Help wie lQ Jeo as amp Sad FEY TE variant Mana amp variant Projects X 3p v cO E mManual xfm 53 Oo Manual ccfm 53 o Fh Configuration sm x Configuration v dm X o Conditional Document Pa
38. the PVEP Plugins chapter if reading the Eclipse help variant of the manual with an installed Server Edition feature or in a separate PDF file The pure variants Extensibility Guide is a reference document for information about ex tending and customizing pure variants e g with customer specific user interface elements or by integrating pure variants with other tools This document is available in online help as well as in printable PDF format here Chapter 2 Getting Started 2 1 Software Requirements The following software has to be present on the user s machine in order to support the pure variants Eclipse plug in Operating System Windows 2000 Windows XP Linux or MacOS X 10 3 Eclipse Eclipse 3 0 or higher required Eclipse is available from ht tp www eclipse org Java Eclipse requires a Java Virtual Machine JVM to be installed We recommend using a Sun JDK 1 4 or 1 5 compatible JVM See http www java com for a suitable JVM 2 2 Software Installation 2 2 1 How to install the software pure variants software is distributed and installed in one of three ways e Installing from an Update Site Installation via the Eclipse update mechanism is a con venient way of installing and updating pure variants from an internet site The location of the site depends on the pure variants edition Visit the pure systems web site ht tp web pure systems com or read your registration e mail to find out which sit
39. the configuration space describing a single concrete solution drawn from the solution family See Section 3 6 2 pure variants Transformation Input for more information about the transformation input nodeset model by type string will be renamed in the next release Get all variant result models known to the transformer having the given type The res ult models are derived from the models of the configuration space describing a single concrete solution drawn from the solution family Valid types are ps vdm ps cfm and ps ccm See Section 3 6 2 pure variants Transformation Input for more information about the transformation input boolean hasFeature string Return true if the feature given by its unique name or id is in the variant boolean hasComponent string Return true if the component given by its unique name or id is in the variant boolean hasPart string Return true if the part given by its unique name or id is in the variant boolean hasSource string Return true if the source given by its unique name or id is in the variant 113 114 XSLT Extension Functions Function boolean hasElement string id Description Return true if the element given by its unique id is in the variant boolean hasElement string name string class string type Return true if the element given by its unique name cla
40. the constraints 2 6 Using Configuration Spaces In order to create Variant Description models it is first necessary to create configuration spaces These are used to combine models for configuration purposes The New Viewing and Exporting Configura tion Results gt Configuration Space menu item starts the New Configuration Space wizard Only the names of the configuration space and at least one feature model have to be specified The initially created standard project configuration space is already configured in this way A variant description model has to be created inside the configuration space for each con figuration This is done using the context menu of the configuration space The variant description model editor is used to select the desired features for the variant This editor is also used to perform configuration validation The Check Model button on the toolbar and the Variant gt Check menu item are used to perform an immediate valida tion of the feature selection The Variant gt Auto Check menu item enables or disables auto matic validation after each selection change The Variant gt Auto Resolve menu item en ables or disables automatic analysis and resolution of selection problems The problem view lower right part shows problems with the current configuration Double clicking on a problem will open the related element s in the Variant Description Model editor When used for the first time Variant Managem
41. their se lection state This view may be filtered from the views filter icon or context menu 59 Configuration Space Editor Figure 5 19 Outline view showing the list of available features in a variant description model Variant Management Sample Co File Edit Navigate Search Project Rui e 1 amp amp W amp Automatic v J BrakeActuation elfy T Brakes Biv J Car Car ESP Car_Safety Disc_Front Disc_rear Electric Engine Front Gearbox Gears Rear 444408 SEK Dan O69 O69 O89 OD 5 3 6 Configuration Space Editor The configuration space editor can be opened from the Variant Projects view by clicking on the Properties item of the Configuration Space context menu This option is only avail able in the Variant Projects view The editor is divided into three separate pages i e the Model List page the Input Output page and the Transformation Configuration page Model List Page 60 This page is used to specify the list of models to be used in the configuration space At least one model must be selected By default only models that are located in a configura tion space s project are shown Configuration Space Editor Figure 5 20 Configuration space properties Model Selection Properties for configspace xml Mel x type filter text x Configuration Space CATES Xe Info ue to open variant description models Configuration Space Sel
42. warn ingMsg STRING RELAT EDEIDS er rorMsg STRING RELAT EDEIDS in foMsg STRING RELATE DEIDS Convenience methods for userMessage sets TYP automatically CI warningMsg STRING errorMsg STRING infoMsg STRING Convenience methods for userMessage set TYPE automatically and uses empty RELATEDEIDS list errorMsg An un known error oc cured getContext EI getSelf SELF getCon text EID SELF These methods can be used to determine the restriction calculation context EID is bound to the unique id of the element that is the immediate ancestor of the restriction or calculation So inside an at tribute calculation it will be bound to the id of the ele ment containing the attribute definition SELF is the unique id of the calculation restriction itself Access the attribute X of the same element in a calcula tion getContext EID getAttrib ute EID X XValue 91 Expression Language pvProlog specified with EID or an empty list if no children ex ist Rule Description Examples Limitations getElementChil CEIDS is unified with the dren EID CEIDS list of children of the element getElementPar ents EID PARIDS
43. xmilns cm http www pure systems com consul model gt lt cm consulmodel cm type ps vdm gt lt cm consulmodel gt lt cm consulmodel cm type ps cfm gt lt cm consulmodel gt lt cm consulmodel cm type ps ccm gt lt cm consulmodel gt lt cm consulmodels gt lt variant gt The cf1 subtree of this XML structure lists the concrete elements and property values of all concrete feature models in the variant Correspondingly the cc1 subtree of this XML structure lists the concrete elements and property values of all concrete family models in the variant The i1 subtree contains a list of all inherited element attributes in all models of the variant Finally the variant description model and all result models are part of the cm consulmodels subtree This XML structure is used as input for the XMLTS transformation engine as described above pure variants provides a certain set of XSLT extension functions see Table 7 20 XSLT extension functions to simplify the navigation and evaluation of this XML struc ture in an XSLT transformation see Section 4 1 2 Using XSLT for the Transformation Tip j A copy of this XML structure can be saved using the Save Result to File but ton that is shown in the tool bar of a variant description model In an XSLT transformation access to the unmodified input models of the transformation can be gained using the pure variants XSLT extension function models
44. 2 45 Common Editor Pages The graph can be zoomed using the Zoom In and Zoom Out items of the context menu of the graph visualization page Several elements can be selected by holding down the SHIFT or STRG key while selecting further elements or by clicking somewhere in the empty space of the graph visualization page and dragging the mouse over elements A dashed line appears and all elements that are partially or wholly enclosed in it will be selected If an element has children the element can be expanded or collapsed by clicking on the tri angle in the upper right hand corner of the element s box Another way is to use the Col lapse Element Expand Element and Expand Subtree context menu items In contrast to the Expand Element action Expand Subtree expands the whole subtree of an ele ment not only the direct children To hide an element in the graph this element has to be selected and Hide Element has to be chosen from the context menu Attributes relations and the connection lines between related elements relations arrows also can be hidden by choosing one of the items in the Show In Graph submenu of the context menu Elements can be moved by clicking on an element and move the mouse while keeping the mouse button pressed This only works if the element selection tool in the tool bar is selec ted Figure 5 6 Selected Element Selection Tool Ge Feature Graph Editing Basic editing operatio
45. 6 Properties View pure variants uses the standard Eclipse Properties view This view shows important in formation about the selected element and allows editing of most property values 5 4 7 Relations View The Relations view shows the relation of the currently selected element feature component part source element to other elements Double clicking on a related element selects that element in the editor The small arrow in the lower part of the relation icon shows the direction of the relation This arrow always points from the relation source to the relation destination For some relations the default icon lt is shown The number in parentheses shown after an elements name is the count of child relations So in the figure below the element has one requires relation indicated by 1 69 Result View Figure 5 27 Relations view different layouts for feature with a ps requires to feature Main Component Big H 2 varant mana FEY lo Variant Mana Xf mif Relations X Result gt g 5 ECR h Result m Requires I Size 1 Parent Requires 1 Main Component Big b v TB fy fe variant Mana Element Parent Size 1 Size Parent Requires Main Component Big Main Component Big Requires H a Aa gt i The Relations view is available in four different layout styles two tree styles combined with two table styles These styles are accessed via icons
46. BinOp Expr UnaryOp C Expr 87 88 Expression Language pvProlog and implies or 5 UnaryOp pis not 6 Func i FuncName ce Args Y 7 Args i Argument Args Argu ment 8 Argument i String Number 9 String EJE 10 Number tis 2 0 9 J 0 9 11 FuncName i a z a 2 A Z 0 9 _ Table 7 7 Logic operators in pvProlog Name Symbol Association Type Description Xor right binary logical exclusive or equiv none binary not A xor B and left binary logical and implies left binary logical implication or left binary logical or Table 7 8 Functions in pvProlog Name Symbol Description not EXP True if EXP is false Table 7 9 Available rules for Value calculations and Restrictions Rule Description Examples Limitations alternativeCh True if the feature FN has an Only available in family ild FN FN2 alternative group and one of models Expression Language pvProlog Rule Description Examples Limitations deprecated alternat ive_child the alternative features is in the current feature selection FN2 is unified with the se lected alternative feature name isElement EID True if the element with id EID is found in a feature or family model isFamilyModelEle ment KID True if the element with id EID is found in a famil
47. FixedTime and feature Equidistant But it cannot be both implementations in the resulting system ps class Cosine Restriction hasFeature Cosine Relation ps requestsProvider Cosine ps file dir src file cosine_l cc type impl Restriction hasFeature FixedTime Relation ps exclusiveProvider Cosine ps file dir src file cosine_2 cc type impl Restriction hasFeature FixedTime and hasFeature Equidistant Relation ps exclusiveProvider Cosine Example for ps defaultProvider ps expansionProvider relation In the example given above an error message would be generated if the restrictions for both elements were valid as it would not be known which element to include Below this ex ample is extended by using the ps defaultProvider ps expansionProvider relations to define a priority for deciding which of the two conflicting elements should be included These additional relation statements are used to mark the two cosine implementations as an expansion point The source element entry for cosine_1 cc specifies that this element should only be included if no more specific element can be included ps defaultProvider In this example cosine_2 cc will be included when feature FixedTime and feature Equidistant are both selected otherwise the default implementation cosine_1 cc is in cluded If the Auto Resolver for selection problems is activated then the appropriate imple mentation will be included
48. GRE safety Functions Children 2 R Sample Config Space witl g Brakes ABS gt project H l Gear Box 3 ESP E Car xfm 9 Engine Ry Parent 1 xe ccm_copy xsl Diesel T Car i moduleconfig xml Gasoline z E Readme txt 4 gt Tree Table fo Detail A Graph Constraints B Outline 52 Fiter 2 O Properties 2 Tasks Problems ur o Label Property Value Y Brake Actuation El Feature 9 Brakes Type ps optional g Car Unique ID i5852 T Engi Unique Name Car_Safety Engine ar 7 visible Name Safety Functions 2 Front g Gear Box 1 Gears xila gt 1 22 1 The Outline view lower left corner shows configurable views of the selected feature mod el and allows fast navigation to features by double clicking the displayed entry The Properties view in the lower middle of the Eclipse window shows properties of the currently selected feature The Details tab of the feature model editor shown in the upper right part provides a dif ferent view on the current feature This view uses a layout and fields inspired by the Volere requirements specification template to record more detailed aspects of a feature The Graph tab provides a graphical representation of the feature model It also supports most of the actions available in the feature model Tree view The Constraints tab contains a table with all constraints defined in the model supporting full editing capabilities for
49. Management SDK Each example project typically comes with a Readme txt file that explains the concept and use of the example 10 Chapter 3 Concepts 3 1 Introduction pure variants provides a set of integrated tools to support each phase of the software product line development process pure variants has also been designed as an open frame work that integrates with other tools and types of data such as requirements management systems object oriented modeling tools configuration management systems bug tracking systems code generators compilers UML or SDL descriptions documentation source code etc Figure 3 1 Overview of family based software development with pure variants shows the four cornerstone activities of family based software development and the models used in pure variants as the basis for these activities When building the infrastructure for your Product Line the problem domain is represented using hierarchical Feature Models The solution domain i e the concrete design and im plementation of the software family are implemented as Family Models The two models used for Application Engineering i e the creation of product variants are complementary to the models described above The Variant Description Model containing the selected feature set and associated values represents a single problem from the problem domain The Variant Result Model describes a single concrete solution drawn from the sol
50. RE tues chi ie E ST a 67 5 4 1 Attributes View eai paa aait aaa Saaai 67 54 2 Filter VIEW tpat topaia paea ep anini erp eai 67 D413 Search VIC Wii siedevedselevehs codaees chad cnc Ee E a Ged eA heb Eek 67 5 44 Outline View osiin ne nhk Suede akd aoa a Tn 69 5 4 5 Problem View Task View 0 ccccccececcccecececececececeseeeseeeeeeeeeees 69 5 46 Properties View ecas esceceeis ccaatsae eeteveeccuatnevsners las ceuanatee dese wav ceaenanes 69 5 4 1 Relations View sas cenie itie oiae oaiae iaoa E ai A 69 5 4 8 Res lt VIEW eie rreri aee Een E EEEE ra Ean cgecass 70 5 4 9 Feature Matrix View 0 cccccceseeeececececeeceeeeeeeecececeaauaeeeeeeeeeeeeaea 72 5 4 10 Variant Projects View c cc cccccececececececececececeeeseeeeeeeeeees 73 DD OAH STEET E EESE E ET as tedeassttdeesita leek este S 74 Sid LE SCAM SWING aierua eiai a eaae ei EE i 75 5 5 2 Search Typer erine eaei e eek catty eera ae ie iea eai ont 76 5 5 3 Eit TO eei aose e aa o sap ol nds e ai erdie EE a 76 55A Element Scope niine hipd ntin aiaia iapa eni 76 9 25 Attribute SCOPE i irren reesi riren ie A EErEE a ETE E E VREE 76 SNO SCODE ia a ea i a e E cante aA RE e a 77 SSe Search ReSults ve scechesecsece Gevsochac ce sctden besedsactescssec ccsenvacttenceas betes 77 5 6 Model Export and Import 2 00 2 ce cececececececececececeeeeeeeceeeeeeeeeeeees 77 SOs EXPO jess errre e e hots e eat detain etude alt hedis eaceee deter 77 S62 MPOT Mripate iE EEE a E RE a sa ctee
51. Restriction Rules for Variant Evaluation 94 Table 7 10 Additional rules available for variant evaluation Rule Description Applicable hasElement EID has EID True if the element EID is in the variant Fails silently oth erwise If hasElement is used in side restrictions and con straints inside feature mod els the element identified by EID has to be contained in models with higher ranks If used in family models the element has to be in feature models of the same rank or in any model of higher rank hasFeature FN deprecated has_feature hasComponent CN hasPart PN hasSource SN deprecated has_component has_part has_source True if the feature FN is found in the current set of se lected features Fails silently otherwise True if the component part source xN is found in the current set of selected components in the current component configuration Fails silently otherwise see hasElement See hasElement has Part may also refer to com ponents from the same fam ily model hasSource may also refer to parts from the same model requiresFea tue FN FNL deprecated re quires_feature True if the feature FN or at least one feature of the fea tures in the list FNL is found in the current set of selected features Issues an error mes sage and fails otherwise May be used to request in clusio
52. Tree nodes can also be cut copied and pasted using the global keyboard shortcuts see Section 7 2 Keyboard Shortcuts or via a context menu Selection of a tree node causes other views to be updated for instance the Properties view Conversely some views also propagate changes in selection back to the editor e g the outline views A context menu enables the expansion or collapse of all children of a node Double clicking on a node opens a property dialog for that node Table View Editor Page The table view is available in many views and editors This view is a tabular representation of the tree nodes The visible columns and also the position and width of the columns can be customized via a context menu Table Layout gt Change Layout changes for each mod el are stored permanently in the Eclipse workspace Clicking on a column header sorts that column The sort direction may be reversed with a second click on the same column head er Tip Double clicking on a column header separator adjusts the column width to match the maximal width required to completely show all cells of that column Most cells in table views are directly editable A single click into a cell selects the row a second click opens the cell editor for the selected cell The context menu for a row permits addition of new elements or deletion of the row A double click on a row starts a property dialog for the element associated with the row Constraint
53. ains the named feature Examples of Restriction Rules Including an element only if a specific feature is present hasFeature Bar The element attribute may be included only if the current feature selection contains the fea ture with identifier Bar Or ing two restriction rules Rule 1 not hasFeature BarFoos Rule2 hasFeature FoosBar This is a logical or of two statements The element will be included if either feature Bar Foos is not in the feature selection or FoosBar is in it It is also possible to merge both rules into one by using the or keyword Rule or Rule 2 not hasFeature BarFoos or hasFeature FoosBar 3 4 4 Relations in Family Models 20 As for features each element component part and source element may have relations to other elements The supported relations are described in Section 7 4 Element Relations When a configuration is checked the configuration may be regarded as invalid if any rela tions are not satisfied Model Evaluation Example using ps exclusiveProvider ps requestsProvider rela tions In the example below the Cosine class element is given an additional ps requestsProvider relation to require that a cosine implementation must be present for a configuration to be valid ps exclusiveProvider relation statements are used in two different cosine implementations Either of which could be used in some feature configurations feature
54. all selected elements are calculated Then the restrictions and after that the relations of the selected features are checked At this point all information about selec ted features and family model elements is available Finally the model constraints are eval uated deciding if the current selection is valid or not 3 5 2 Automatic Selection Problem Resolving If a feature selection is evaluated to be invalid selection problems may be occured Such selection problems are for instance failed constraints or restrictions Certain selection prob lems are eligible to be resolved automatically e g a not yet selected feature that is required by a relation can be selected automatically pure variants provides two levels of auto resolving i e basic and extended auto resolving The pure variants basic auto resolver component provides resolving of failed relations and feature selection ranges Auto resolving of failed relations is for instance the automatic se lection of required features Auto resolving of failed feature selection ranges is for instance the automatic selection of a feature of a group of features where at least one has to be se lected The pure variants extended auto resolver component additionally provides resolving of failed restrictions and constraints For instance if only a feature A is selected and there ex ists a constraint A requires B then feature B becomes automatically selected if the exten ded auto resolver is enab
55. any over head The corresponding source element ps classaliasfile can be used to generate the required C code The unique name of the ps classalias element represents the class name to be used when creating or referencing to objects implementing this abstract inter face The values of attribute Value must evaluate to unique names of ps class elements The value calculated during evaluation is used to locate the implementation class for the abstract class alias For more information and an example see the section called ps classaliasfile ps class 110 Attributes classname ps string A class represents a class in the architecture It can be used in conjunction with ps classalias The value of the optional attribute classname represents the fully qualified name of the class e g std st ring to be used when generating code using the standard transform ation Otherwise the unique name of the element is used for this purpose For more information and an example on using ps class_ together with ps classalias see the section called ps classaliasfile Variant Description Models ps flag Attributes Value ps string A flag represents any kind of named value e g a C C preprocessor constant For the standard transformation the value of attribute Value is evaluated by ps flagfile resp ps makefile source elements to generate C C specific preprocessor definitions resp make file variables Fo
56. ara ARa Ee VERAS 40 5 4 Metrics for a mod l oesie ien wane le cegtnss ccdnenedecetbegh iair iiio cee esas 41 SD CONSLAIMUS VIEW oeer oe ie E E e E sauce S aE e E EST o ia ienaa cee 43 5 6 Selected Element Selection Tool ccc ccccccccececececececececeeeeeeeeeseeeseeeees 46 5 7 Feature Family Model Element Creation Tools cccccccceecececececeeeeeees 46 5 8 Sample attribute definitions for a feature cece ce cecececeeeteceeeteeeees 48 5 9 Restrictions page shown in property editor cece cececececeeeeeteeeeeeeees 49 5 10 Constraints page shown in property editor 22 2 cecececececeeeeeeeteteeeees 50 5 11 Advanced pvSCL expression editor cccecccccecececececececececeeeeeeeseeeeeees 51 5 12 Advanced pvProlog expression editor 0 22 eee eeeeeeecececececececececeeeeeeeeeeeeeees 52 5 13 pvProlog expression pilot sirri ceeceasetcecee be deeet einn aiaiaaeo seater 53 5 14 Element selection dialog cc cc ccecccececececececececececeeececeeeceseeeeeseeeeeees 54 5 15 Feature model editor with outline and property View s es 55 5 16 Peature property dialog icici eenn iia itera iaa Taaa EEA adcccosteddecseaeigens 56 5 17 Open family model editor with outline and property view seses 58 5 18 Variant description model editor with outline result problems and attributes VIS W gt i seeet Sv vee seveseedhands coglove oage bdcosbteva eddie A AE AE A AT 59 5 19 Outline view showing the list of available featur
57. asede aE Saaai 79 6 Additional pure variants Plug ins eeeeeeeeeeeeesssesesesrsrersrsrsrsrsrrrrrrrrrerrrrrrrereee 81 T Referente Ln vv beees hon entitled a ee aad Ashe etek del et eet 83 TAL Abbreviations 2 21 ceeehecelecccsei sb ccbeesebecduenbeccdlatebecdeashs cubcesabucduesbeeeedenats 83 7 2 Keyboard SHOrtents siirinsesi einiino cada sebecdseses 83 73 Element Attn DUtes pinra e aa E TRE Vaaa E EEEE aE n 84 7 4 Element Relations oesie inssin eriin kriisi de isikan ens 85 7 5 Expression Language pvProlog eeeeeeseeeeeeesesesesesesesesesesesesessssssssse 87 7 5 1 Additional Restriction Rules for Variant Evaluation 96 7 5 2 Match Expression Syntax for getMatchingElements 96 7135 3 Model Atttibutes 2 23 doce cid nnna eretia aana D A ieee 97 7 6 Expression Language pvSCL ou ccc ccccccecececececececececeeeeeceeeeeeeeeeeees 97 1 T Feature Models sevice n a a n E E bdash onde skegsbericen coi 100 7 1 1 Feature Variation Types eeeeeeeeeeeeeesesesesesesesesesesssssssessss 101 Re Family MOdeIS 4023 t2 00cs0iSeccaecheeeAchaetivotshstecdeesdebeecchsbyctedaetbaeceaitvencests 101 7 8 1 Predefined Source Element Types ccccceeeececececeeeeeeeees 102 7 8 2 Predefined Part Element Types ccccccceccecccecececeeeeeceeeeeees 109 7 9 Variant Description Models cccceeceeeeseeeececececeaeeeeeeeeeeeeeeeaeaaeaees 111 7 9 1 Feature Selection List Entry Type
58. ation ernen terse hee chet gu EE wt esses ete D aea 26 3 7 1 XML Schema Model Validation n se 27 3 7 2 Model Check Framework 0 eceeeeeeeeeceeeeeeeeececeeeceeeeeeeeeeeeeees 27 Al PB ASKS csi ee teach ath ect SAU ot lee caulk hs R shee i Retin MMs Tekh E 31 4 1 Generating Variants with Model Transformations cccceeeeeeeeeeees 31 4 1 1 Using the Standard Transformation c ce cceeeccececeeeceeeeeees 31 4 1 2 Using XSLT for the Transformation 0c ssseseseeeseeeeeeerenenees 33 5 Graphical User Interface 2 0 ccccccccececececececececeeececeeeeeseeeeeeeeeeeeeseeeees 37 5 1 Getting Started with Eclipse 2 0 ce cececececececececeeeeeeeeeeeeeeeeeeeees 37 5 2 Variant Management Perspective 2 0 0 0 eee eeeeeeeececececeeeeeeeeeeeeeeeeeeeees 38 PEEN ECIULOLS 6 ides Se A E soars Seale vol Oice Menta cute laek E 39 5 3 1 Common Editor Actions 0 0 ssion sy siei etii 40 5 3 2 Common Editor Pages 00 cccececececececeeecececeeececeeeeeeeeeees 41 53 3 Feature Model Editor nic sit ise vecdetiens iets deitate eiai aieeaa 55 5 3 4 Family Model Editor nen aee erinteni a aiii 57 5 3 5 Variant Description Model Editor 2 0 0 eceeececeeeeeeeeeees 58 5 3 6 Configuration Space Editor 0 2 ccccececececececeeeeeeeeeeeeeees 60 pure variants Eclipse Plug in User s Guide 5 3 7 Model Compare Editor 2 0 2 cccccececececececeeeeeeeceeeeeeeeeees 64 SA VIEWS orrn aea re E EEE E E E saxty E
59. atterns are supported Matches one arbitrary character X Matches any number of arbitrary characters Matches one of the characters specified between the brackets lt char1 gt lt char2 gt indicates a range Matches any of the patterns in the comma separated list between the braces XE If the token is the remainder of the match expression is applied recursively for all subhierarchies below Model Attributes For example path expression A BAR matches all elements named BAR below any ele ment with a two letter name whose first letter is A and which is relative to the current con text element The expression D matches all model elements whose unique name starts with D and that are in the model of the context element The context element or root element in an absolute expression itself is never included in the matching elements 7 5 3 Model Attributes Information stored as model metadata can be accessed using the pvProlog function getAt tribute The table below lists the available attributes and their meanings Use the model id from getModelList getVariantId as the EID For example to bind the name of the variant model to the variable VDMNAME in a calculation or restriction use the following pvPro log expression getVariantId VID getAttribute VID name VDMName Table 7 11 Meta Model attributes in pvProlog Attribute Name Description name The
60. auto completion for identifiers There are two forms of completion Pressing CTRL SPACE while typing in an identifier opens a list with matching model elements and pvSCL keywords as shown in the figure If the user enters lt ModelName gt or lt Modelld gt a list with the elements of the model is opened automatically There is always a special entry at the end of such a list Open Element Selection Dialog which opens the Element Selection dialog sup porting better element selection This dialog is described more detailed in the section called Element Selection Dialog Warning The pvSCL syntax is not checked in this editor A syntactically wrong expres sion will cause the model evaluation to fail Figure 5 12 Advanced pvProlog expression editor shows the pvProlog editor directly editing a constraint expression 51 Common Editor Pages Figure 5 12 Advanced pvProlog expression editor Edit Constraint xi Edit the constraint e Select language of the constraint Press ctrl space to select referenced elements Constraint prolog 7 Return type ps boolean Pilot Source Prolog hasFeature French or hasFeature Yoghurt Pressing CTRL SPACE in this editor opens the element selection dialog All element identifiers selected in this dialog are inserted into the expression as quoted strings This dialog is described more detailed in the section called Elemen
61. automatically otherwise an error message will highlight the problem ps class Cosine Restriction hasFeature Cosine Relation ps requestsProvider Cosine ps file dir src file cosine_l cc type impl Restriction hasFeature FixedTime Relation ps exclusiveProvider Cosine Relation ps defaultProvider Cosine Relation ps expansionProvider Cosine ps file dir src file cosine_2 cc type impl Restriction hasFeature FixedTime and hasFeature Equidistant Relation ps exclusiveProvider Cosine Relation ps expansionProvider Cosine 3 5 Model Evaluation In the context of pure variants model evaluation is the activity of verifying that a vari ant description model VDM complies with the feature and family models it is related to Understanding this evaluation process is the key to a successful use of restrictions and rela tions 21 Evaluation Algorithm 3 5 1 Evaluation Algorithm 22 An outline of the evaluation algorithm is given in pseudo code below Figure 3 7 Model Evaluation Algorithm Pseudo Code Figure 3 7 Model Evaluation Algorithm Pseudo Code modelEvaluation foreach current in modelRanks checkAndStoreFeatSelection getFeatModelsByRank current selectAndStoreFromFamModels getFamModelsByRank current class ps component selectAndStoreFromFamilyModel1s getFamModelsByRank current class ps part
62. ave the copy to a file Special conditional attributes on the nodes of the XML document are dy namically evaluated to decide whether this node and its subnodes are copied into the res ult document The name of the evaluated condition attribute is specified using the attribute conditionname and defaults to condition If the attribute copycondition is not set to false the condition attribute is copied into the target document as well The condi tion itself has to be a valid XPath expression and may use the pure variants XSLT exten sion functions see Table 7 20 XSLT extension functions Calls to these functions have to be prefixed by pv Note Before pure variants release 1 2 4 the attribute names pv copy_condition and pv condition_name were used These at tributes are still supported in existing models but should not be used for new models Support for these attribute names has been removed in pure variants release 1 4 In the example document given below after processing with an ps condxml transformation the resulting XML document only contains an introductory chapter if the corresponding feature WithInt roduction is selected Example 7 1 A sample conditional document for use with the ps condxml transformation lt xml version 1 0 gt lt text gt lt chapter condition pv hasFeature WithIntroduction gt This is some introductory text lt chapter gt lt chapter gt This text is always in th
63. ce fF Trace 1 match ps classalias PCConn 1 match E F value NoConn UDPConn SNGConn 1 match E NoConn 1 match hasFeature Trace or not hasFeaturel PCConnection Runtime System Solutions 1 match E S TraceSupport 1 match hasFeature TraceSupport E Behind every element in the tree that is a root element of a sub tree the number of matches in this sub tree is shown Double clicking on an item in the tree opens the corresponding model in an editor with the corresponding match selected The search results can be sorted alphabetically using the button Sort by alphabet in the tool bar of the Search view By pressing button Switch to Table the table representation of the seach results is en abled The table shows the matched model items in a flat list Double clicking on an item in the list opens the corresponding model in an editor with the corresponding match selec ted The search results can be sorted alphabetically by clicking on the Label column title Figure 5 26 Variant Search View Table a search x Yale pred 4 matches Found in all Models For Trace Label hasFeature Trace hasFeature Trace and conflictsFeature PCConnection hasFeature Trace or not hasFeature PCConnection hasFeature TraceSupport el gt A search result history is shown when the button Show Previous Searches in the to
64. ce or it may extend or provide other functionality For instance a plug in could add a new editor tab for model editors or a new view The online version of this user guide contains docu mentation for additional plug ins Printable documentation for the additional plug in is dis tributed with the plug ins and can be accessed from the online documentation via a hyper link Currently available plugins provide TWiki functionality for model elements Bugzilla in tegration synchronization with Borland CaliberRM access to version control systems such as CVS or Subversion and much more 81 82 Chapter 7 Reference 7 1 Abbreviations The following abbreviations are used in this section AID AN CID PID SID CN PN SN EN EID EL FID FN Attribute id The full id path of the attribute modelld attributeld Attribute name This can be the name of an attribute or the full id path modelld attributeld Component part source id This must be the full id path modelld ele mentld Component part source name This can be the unique name of the com ponent part source or the full id path modelId elementld Element name can point to any element type This can be the unique name of the element or the full element id path modelId elementld Element id This must be the full id path modelId elementld Element id list List of elements given as full id paths modelld ele mentld Feature
65. ceceeeeeeeeeeeeeseeeeeees 99 714 PUNCtHONS in PYSG esien iae aaaea aaaea e ta deen 99 FAS Element references e i a r a iaaieo ia iaraa e se 99 7 16 Feature variation types and its icons eeeeeeeeeeeeseeeeeeeeesersssresesssesssssssese 101 7 17 Predefined source element types eeeeeeeeseeeeeeeeesereseseseseresssssesessssssssssse 102 T18 Predefined part ty peses iicecctesccotsscstdeccss bese cdbbevegcsgcevedeohestcecehs sede danigen 109 719 Types of feature selections imonran ieni th egeedteeageces eias a thee 112 7 20 XSLT extension functions 2 0 eee cececececececececececececeeeceeeeeseeeeeeeeeees 112 List of Examples 7 1 A sample conditional document for use with the ps condxml transformation 105 7 2 A sample conditional document for use with the ps condtext transformation 106 7 3 Generated code for a ps flagfile for flag DEFAULT with value 1 107 7 4 Generated code for a ps makefile for variable CXX_OPTFLAGS with value OG sect e LCE Noh ceo S obs os Uc So ae rE cred aE A oa Sc tS Ue 107 7 5 Generated code for a ps classalias for alias io net PCConn with aliased class MNOCOMN AE eos cbsbeadst are pauscdebeans E EE E uenuutadenwens 108 X xii Chapter 1 Introduction 1 1 What is pure variants The pure variants Eclipse plug in extends the Eclipse IDE to support the development and deployment of software product lines Using pure variants a software product line is de
66. ceeeeeeeeecececeneaaeeeeeeeeees 14 3 4 Basic structure of feature models 00 0 0 eee eee eecececeeececececececeeeeeeeeeeeeeeeees 16 3 5 Basic structure of family models eee ee ceeeeeceeeeeceeeceeeeeceseeeeeeeeeeeees 17 3 6 Sample family model s lt 00 ssececgeg ses eee sisal ees ot erea sevens 19 3 7 Model Evaluation Algorithm Pseudo Code ecccecceseeeeeececeeeeeeaeeeeeeeeees 22 3 8 Automatically Resolved Feature Selections 2 0 0 0 eee eeeeceeeceeeeeeeeeeeeeeeees 24 3 9 XML Transformer serrare eea ea atin es eaa ae EEs Ee EES 25 3 10 Model Validation Preferences Page 0 ee eeeeeceeeceeececeeeeeeeeeeeeeeeeeeeens 28 3 11 New Check Configuration Dialog eee eeeececececececeeeeeeeeeseeeeeeeenees 29 3 12 Model Validation in Progress 0 0 00 eee eeeeeeceeeeeeececececececeeececeeeeeeeeeeeeeeeees 30 4 1 The Standard Transformation Type Model cccecceccececececececeeeeeeeeeeeees 31 4 2 Multiple attribute definitions for Value calculation cc cceeceeeeeeeees 32 4 3 Variant project describing the manual cscs eeeseseeeeeeeeeeeeneerenenenenenenenaees 34 4 4 The manual for users and developers cc ssseseseseeeeeeeeeeneeeeeneeeenneesneeaeaees 36 5 1 Eclipse workbench elements ee cecccecececececececececececececeeeeeeeeeseeeeeeeees 38 5 2 Variant management perspective standard layout o n 39 5 3 Filter definition dialogs eiin cessed de ccoses E anaE Aaa AEEA E
67. ch use the files time stamp to decide if a certain file changed The Save the variant option instructs the transformation framework to save the variant result model to the given location The variant result model is the input of the transforma tion framework containing the concrete variants of the models in the configuration space Figure 5 21 Configuration space properties Transformation input output paths Properties for configspace xml iof x type filter text 7 Configuration Space Sees Info Configuration Space Specify the glob od output path for all used models CyS Model Lis ransformation Configuration Input path PROJECTIISystem sss Browse Output path PROJECTA GenSystem ssSsSsS S Browse Module base path SPROJECTISystem i tti S O CS Browse V Clear transformation output directory I Ask for confirmation before clearing V Create transformation output directory Ask for confirmation before creating J Recover time stamp of unchanged files From previous transformation Save the variant result model to Restore Defaults Apply Configuration Space Editor Transformation Configuration Page This page is used to define the model transformation to be performed for the configuration space The transformation configuration is stored in an XML file If the file has been cre ated by using the wizards in pur
68. colored A fatal con flict is for example an element change on one side while this element was deleted on the other side One of these patches is strictly not executable Usually warning conflicts can be merged but it is not sure that the resulting model is patched correctly Typical misbeha viour could be that some items are order inverted To view which patch conflicts with which other path just move the mouse above one of the conflicting patches in the upper structure view This and the conflicting patch then change their background color either to red for fatal conflicts or yellow for conflict warnings In general a sophisticated algorithm tries to determine conflicts between two patches These results are very safe hints but 100 safety is not given For a conflicting or non conflicting patch it may occur that it can not be executed Conflict warning patches may be executed without problems and lead to a correct model change In general the user can try to execute any patch If there are problems then the user is informed about that If there are problems applying a non conflicting patch the editor should be closed without saving and reopened Then another order of applying patches can solve this problem The actions Ap ply All Changes do only apply incoming and non conflicting changes Other patches must be selected and patched separately 65 Views Compare Example 66 Figure 5 23 Model Compare Editor shows an e
69. cted in a valid configuration in terms of a range ex pression These range expressions can either be a number e g 2 or an inclusive number range given in square brackets e g 1 3 or a set of number ranges delimited by commas e g 1 3 5 8 The asterisk character or the letter n may be used to indicate that the upper bound is equal to the number of elements in the Or group 5 3 4 Family Model Editor The family model editor shows a tree view of the components parts and source elements of a solution space Each element in the tree is shown with an icon representing the type of the element see Table 7 18 Predefined part types The element may additionally be decorated with the restriction sign if it has associated restriction rules For more inform ation on family model concepts see Section 3 4 Family Models 57 Variant Description Model Editor Figure 5 17 Open family model editor with outline and property view Variant Management Weather Station ccfm Eclipse SDK Mie x File Edit Navigate Search Project Run Window Help Irs GoJa lwloeo sxlFPas EY c Outline x a BIL SY ims 3 Weather Station ccfm il fol E WeatherStationSolutions amp ApplicationCcore H E Applicationcore Display H E Display E Sensors 8 Documentation E WindSpeedSensor H Li T2CSupport E S PCLine E AirPressureSensor 5 Protocols TemperatureSensor ki not hasFeatu
70. d 719 8 1 The configuration dialog of pure variants cc eeeeeeeeeeeeeeereneneeeneneeeeees 117 List of Tables 3 1 Mapping between input and result model types 2 0 0 ee eeeeeeeeeeeeeeeeeee 25 5 1 Variables available for path resolution in transformations ceeeeeeeees 61 7 1 Common Keyboard Shortcuts 20 ccccececccecececececececeeeceeeeeceeeseeeeeeeeeees 83 7 2 Model Editor Keyboard Shortcuts 2 0 cccccccecececececececeeeceeeceeeeeeeeeeeeeees 84 7 3 Graph Editor Keyboard Shortcuts 2 0 2 ccccccececccececececeeeceeeeeeeeeeeeeeeeeees 84 L4 Supported Attribute Types crara aeiiae raa aT E Eaa Ear ARAE VERESS 84 7 5 Supported Relations between Elements I ceccceeecccececececececeeeeeseeeeeees 85 7 6 Supported Relations between Elements ID sseseeneneeeeeeeeeeeeeeesereseseserssessse 86 7 7 Logic operators in pvProlog eeeeeeeeeeeeseeeeeeessseresesesesesssssssssesssssssessssssses 88 1 8 Functions In pVProlo S siseses aeae a oi ea onina bipi 88 7 9 Available rules for Value calculations and Restrictions sseeeeeeeeeeeeeeeeeeeee 88 7 10 Additional rules available for variant evaluation 2 0 0 cceececeeeeeeeeeees 94 7 11 Meta Model attributes in pvProlog ooo cece cecececececececececeeeceeeeeeeeeees 97 7 12 Logic operators in PVSCL oe ecccccecececececececececeeeeeceeeceeeeeeeeeseeeeeeeees 98 7 13 Relational operators in PVSCL 0 e ec ececcccecececececececece
71. dels may be ex ported by setting the root node to any model element The Depth field is used to specify the distance below the root node beyond which no nodes are exported The Colored op tion specifies whether feature models are exported with a colored feature background in dicating the feature relation yellow ps mandatory blue ps or magenta ps option green ps alternative Figure 5 34 Directed graph export example options LR direc tion Colored shows the results of a feature model export using the Left to Right graph direction and Colored options Import Figure 5 34 Directed graph export example options LR direction Colored USB Q Seriell 5 6 2 Import An Import item is provided in the Navigator and Variants Project views context menus and in the File menu Select Variant Models or Projects and choose one of the provided import sources Currently only a generic family model import from source directories is provided This im port creates a family model or parts of a family model from an existing directory structure of Java or C C source code files Additional formats may be available if other plug ins are installed 79 80 Chapter 6 Additional pure variants Plug ins The features offered by pure variants may be further extended by the incorporation of ad ditional software plug ins A plug in may just contribute to the Graphical User Interfa
72. descriptive name of the model date The creation date of the model version An arbitrary user defined string to identify the version of the model time The creation time of the model author The user who created the model file The file name of the model without directory path see path below path The absolute path leading to the model directory 7 6 Expression Language pvSCL The pure variants expression language pvSCL is a simple language to express constraints It provides logical and relational operators to build simple but also complex boolean ex pressions The direct element reference syntax makes pvSCL expressions more compact than pvProlog expression pvProlog Logic Expressions 12 pvscl i expr 13 expr i binaryExpr 14 binaryExpr i logicalExpr bin aryOp logicalEx 97 98 Expression Language pvSCL 15 16 17 18 19 20 21 22 Table 7 12 Logic operators in pySCL binaryOp logicalExpr logicalOp unaryExpr primaryExpr elemRefExpr name id Tip pr IMPLIES REQUIRES CONFLICTS RECOM MENDS l DISCOUR AGES unaryExpr lo gicalOp unaryEx OR primaryExpr NOT expr elemRefExpr C expr id name a 2 A a 2 A a z A a Z A alg a Z A a Z A En a Z A a Z A Bay zro Z 0 9 j 24 70 98 ZO FATED ip zeo
73. e All available views are accessible via Windows gt Show View gt Other 5 2 Variant Management Perspective pure variants adds a Variant Management perspective to Eclipse to provide comprehensive support for variant management This perspective is opened using Window gt Open Per spective gt Other gt Variant Management Figure 5 2 Variant management perspective standard layout shows this perspective with a sample project 38 Editors Figure 5 2 Variant management perspective standard layout Variant Management Indoor ydm Eclipse SDK ioj x File Edit Navigate Search Project Run Variant Window Help mi 2 v oo e Ba SE FY fe Variant Mana E Variant Projects 53 o E weather Station xfm Fj Indoor vdm X 33 Result 23 Relations aL 2 Weather Station Example Jv 9 Weather Station e aba 2 ExampleConfigSpace He I Output 1 Sun Indoor vdm v l Sensors J as ther Stati IndoorData vdm O Debug 8 Vo al ii S IndoorDeluxe vdm Jw I System B A a moduleconfig xml Hw I Compiler z Outdoor v ae a by 7 ae Runtime System Solutions GuidearData var a apt on WeatherStationSolutions Ou
74. e variants it will be named moduleconfig xml and will be placed inside the configuration space However there is no restriction on where to place the configuration file it may be shared with other configuration spaces in the same project or in other projects and even with configuration spaces in different workspaces Figure 5 22 Configuration space properties Transformation Configuration Properties for Config Space cfg Info Configuration Space Configuration Space cvs Define used modules For transformation Model List Input Output Transformation Configuratio Transformation configuration file C Dokumer Browse Specify the modules used for the transformation Configured Modules Load Convert to transformer action list Execute transformer action list Add Edit Buttons on the right allow transformation modules to be added to or removed from the con figuration and to be edited When adding or editing a transformation module a wizard helps the user to enter or change the modules configuration Since many modules have depend encies on other modules they must be executed in a specific order The order of execution of the transformation modules is specified by the order in the Configured Modules list This order can be changed using the Up and Down buttons Please see Section 3 6 Model Transformation for more information on model transformation 63 Model Compare Editor 5 3 7 Model Compare Editor
75. e family model 18 An example family model is shown below Sample family model Figure 3 6 Sample family model ariant Management Family ccfm Eclipse Platform File Edit Navigate Search Project Run Window Help lala Je AHH o xlFas Be Outine 2 E 1 gt 20 Label 5 Family a system 8 System E Memory Memory psiclass VoidEconomist ERCE class VoidEconomist E ps file YoidEconomist cc ps flag Heap File voi ist E psifile VoidEconomist cc G T em ps file YoidEconomist h fl File h S ps flagfile Heap h 8 ps flag ie Heap PoP A Tree Table s Graph Constraints E Properties 3 ls gt 4 Property value H Attributes Part Class ps part Type ps class Unique ID id4668 Unique Name VoidEconomist Visible Name VoidEconomist This model exhibits a hierarchical component structure System is the top level compon ent Memory its only a sub component Inside this component are two parts a class and a flag The class is realized by two source elements Selecting an element of the family model will show its properties in the Properties view Using restrictions in Family Models A key capability that makes the family modelling language more powerful than other com ponent description languages is its support of flexible rules for
76. e is rel evant for the version of the software your are using Open the page in your browser to get additional information how to use update sites with Eclipse 3 0 e Archived Update Site pure variants uses now the format of archived update sites dis tributed as ZIP files for offline installation pure variants archived update site file names start with updatesite followed by an identification of the contents of the update site Installation is almost identical to normal update site installation Simply follow the instructions for normal update sites above But instead of using the New Remote Site button use the Archived Site button to navigate to and select the ZIP file ZIP file Some pure variants extensions may be distributed in simple ZIP files instead of as archived update site To install such extensions unpack the contents of this file into the directory where Eclipse is installed Additional Eclipse features and Eclipse plugins may also be installed during this process 2 2 2 Installation Problems If you experience problems when installing new or updated plug ins it can help to remove any previous installation of the plug in by removing all directories starting with com ps consul from the features and plug ins subdirectories of your Eclipse installation 2 3 Obtaining and Installing a License A valid license is required in order to use pure variants If pure variants is started and no license is present
77. e node can process not only the node itself but also the results produced by previously invoked modules The processing modules to be executed are defined in a module configuration file This file lists the applicable modules and includes configuration information for each module such as the types of nodes on which a module is to be invoked The transformation engine eval uates this configuration information before the transformation process is started pure variants Transformation In put Figure 3 9 XML Transformer Module Config The transformation engine initializes the available modules before any module is invoked on a node of the XML document tree This could for instance give a database module the opportunity to connect to a database The transformation engine also informs each module when traversal of the XML document tree is finished The database module could now dis connect Before a module is invoked on a node it is queried as to whether it is ready to run on the node The module must answer this query referring only on its own internal state A separately distributed XMLTS manual contains further information about the XML transformer This manual shows how the built in modules are used and how you can create and integrate your own modules 3 6 2 pure variants Transformation Input The input of the pure variants transformation are the XML representations of the models of the configuration space For each fea
78. e of family models shows the basic struc ture of family models as a UML class diagram Both models are derived from the Solution ComponentModel class The main difference between the two models is that family mod els contain variable elements guarded by restriction expressions Since component models are derived from family models and represent configured variants with resolved variabilit ies there are no restrictions used in component models Figure 3 5 Basic structure of family models child components Relation Restriction and A S Constraint notusedin 4 ConcreteComponentM odel 3 4 1 Structure of the family model The components of a family are organized into a hierarchy that can be of any depth A component with its parts and source elements is only included in a result configuration when its parent is included and any restrictions associated with it are fulfilled For top level components only their restrictions are relevant 17 Sample family model Components Parts A component is a named entity Each component is hierarchically decomposed into further components or into part elements that in turn are built from source elements Parts are named and typed entities Each part belongs to exactly one component and con sists of any number of source elements A part can be an element of a programming language such as a class or an object but it can also be any other key element of the internal o
79. e resulting xml output lt chapter gt lt text gt ps condtext Attributes dir ps directory file ps path type ps filetype sredir ps directory srcfile ps path This source element type is used to copy a text document and optionally to save the copy to a file Special statements in the text document are evaluated to decide which parts of the text document are copied into the result document The statements macro like calls that can be used in the text document are listed in the fol lowing table 105 106 Predefined Source Element Types Macro Description PV LFCOND condition Open a new conditional text block The text in the block is included in the resulting text output If the given condition evaluates to true The opened conditional text block has to be closed by a PV ENDCOND call PV ELSEIFCOND condition This macro can be used after a PV IFCOND or PV ELSEIFCOND call If the condition of the preceding PV IFCOND or PV ELSEIFCOND is failed the condition of this PV ELSEIFCOND is checked If it evaluates to true the enclosed text is in cluded in the resulting text output PV ELSECOND This macro can be used after a PV IFCOND or PV ELSEIFCOND call If the condition of the preceding PV IFCOND or PV ELSEIFCOND is failed the enclosed text is included in the resulting text output
80. e the transformation configuration page and start the transformation Example Conditional Document Parts To demonstrate how to use XSLT to generate a product variant the following example will show the generation of a manual in HTML format with different content for different target groups users developers This example uses the standard transformation and a user provided XSLT script implementing a lite version of the ps condxml source element func tionality The basic idea is to represent the manual in XML and then to use an XSLT script to generate the HTML representation Attributes on the nodes of the XML document are used to discriminate between content for different target groups The example XML document looks like this lt xml version 1 0 encoding UTF 8 gt lt document gt lt title condition pv hasFeature developer gt lt par gt Developer Manual lt par gt lt title gt lt title condition pv hasFeature user gt lt par gt User Manual lt par gt lt title gt 33 34 Using XSLT for the Transforma tion lt version gt pv getAttributeValue build ps component version lt version gt lt section name Introduction gt lt par gt Some text about the product lt par gt lt section gt lt section name Installation gt lt subsection name Runtime Environment gt lt par gt Some text about installing the runtime environment lt par gt lt subsection gt lt
81. eadme txt W Standard Transformation Example W Weather Station Example QS ExampleConfigSpace gt Readme txt Runtime System ccfm E Runtime System xFm Weather Station ccFm E Weather Station xfm Je 5 5 Search or ele lBu w E a Sample Config Space with Transformation vdm 3 an SM I Car ae Hey l Brakes v 2 Engine I Gear Box Hv P Safety Functions Feature Models Family Models Bi Problems 2 Ee lal 0 errors 0 warnings 0 infos Description Resource In Folder Feature and family models can be searched using the Variant Search dialog It supports searching for elements attributes attribute values restrictions and constraints The Variant Search dialog is opened either by choosing the Search gt Variant menu item or by clicking on the Eclipse search button and switching to the Variant Search tab 74 Search String Figure 5 32 The Variant Search Dialog EP File Search LP Variant Search a Java Search gt Plug in Search Search string any string any character whee 7 Case sensitive m Search Type Limit To Elements Attributes All Occurrences Attribute Values Restrictions Family Models Constraints Feature Models Element Scope JV Unique Name IV Visible Name Attrib
82. eature ABS Ea Edit Edit general properties o goreeeseesseeseeseeseseseg General Relations Attributes Restrictions Constraints Unique ID 15850 Unique Name Car_ABS visible Name ABS s SOSOSOCO OOOOOOOOOC ps Node C Mandatory Optional C Alternative C Or Class Type ps feature Variation Type zE I Default Feature Range 0 n Description Changing feature properties Feature properties other than a feature s Unique Identifier may be changed using the Prop erty dialog This dialog is opened by double clicking the feature or by using the context menu item Properties 56 Family Model Editor The feature properties dialog extends the standard element properties dialog see the sec tion called Element Property Dialog with the addition of the following feature specific items on the General page Variation Type The feature variation type is one of Mandatory default Optional Alternative or Or Default feature This property is used during model evaluation when the Auto Re solve option is active If a default feature s parent feature is selec ted then the default feature is also selected if no other feature from the feature group has been selected However this behaviour only applies to the Alternative and Or feature variation types Range For Or features it is possible to specify the number of features that have to be sele
83. ecks that perform whole model ana lyses Compared with All Element Checks containing all checks that perform analyses on element level The configuration All Element Checks is enabled per default if the pure variants perspective is opened the first time A model check configuration is activated by selecting it in the Available Configurations list If more than one configuration is selected the checks from all selected configurations are merged into one set that becomes activated The checks contained in a configuration are shown in the Selected Configuration list by clicking on the name of the configuration The checks are listed by its names followed by the list of model types supported by a check Additionally the icon reveals if the check is enabled for automatic model validation see the section called Performing Model Checks A brief description of a check is shown by moving the mouse pointer over the check name All but the two default configurations All Model Checks and All Element Checks can be deleted by clicking first on the name of the configuration and then on button Delete A new configuration can be created by clicking on the New button This will open the New Check Configuration dialog as shown in Figure 3 11 New Check Configuration Dialog Model Check Framework Figure 3 11 New Check Configuration Dialog New Check Configuration fe gs Configuration Name My New Configuration m A
84. ect ps project can be used as the part type for anything that does not fit into other part types ps aspect Maps directly to an aspect in an aspect oriented language e g A AspectJ or AspectC ps feature Maps directly to a feature in a feature model Ga ps value General abstraction of a value a ps method Maps directly to a method of a class in an object oriented pro gramming language ps function Describes the declaration of a function ps functionimpl Describes the implementation of a function ps link General abstraction for a link This could be for instance a www link or file system link de a amp 109 Predefined Part Element Types The following sections provide detailed descriptions of the family model part element types that are relevant for the standard transformation see Section 4 1 1 Using the Stand ard Transformation Every description has the following form aPartElementType Attributes attributeNamel typeNamel attributeName2 typeName2 The part element type aSourceElementType has one mandatory attribute named at tributeNamel and an optional attribute named attributeName2 The option is in dicated by the trailing question mark ps classalias Attributes Value ps string A class alias is an abstract place holder for variant specific type instantiations It allows to use concepts similar to interface inheritance with virtual methods in C without
85. ectmadels to be used in the config space cvs Modest D put Output Transformation Configuration System 1 ps ccfm Standard Transformation Example System ccfm E System 1 ps Fm Standard Transformation Example System xfm IV Show only models from current project Restore Defaults Apply In the second row R of the models list the rank of a model in this configuration space is specified The model rank is a positive integer that is used to control the model evaluation order Models are evaluated from higher to lower ranks i e all models with rank 1 highest are evaluated before any model with rank 2 or lower Clicking right in the models list opens a context menu providing operations for changing the model selection i e Select all Deselect all and Negate selection Input Output Page This page is used to specify certain input and output options to be used in model transform ations The page need not be used for projects with no transformations The input path is the directory where the input files for the transformation are located The output path specifies the directory where to store the transformation results The modul base path is used when looking up module parameters specifying relative paths All path definitions may use the following variables The variables are resolved by the transforma tion framework before the actual transformation is started Table 5 1 Variables available for path resolution in t
86. el evaluation A fixed attribute may have multiple value definitions assigned to it A value definition may also have a restriction In the evaluation process the value of the attribute is that of the first value definition that has a valid restriction or no restriction and successfully evaluates to true Element Attributes Attribute Value Types The list of value types supported in pure variants is defined in the pure variants meta model Currently all types except ps integer and ps float are treated as string types internally However the transformation phase and some plug ins may use the type information for an attribute value to provide special formatting etc The list of types provided by pure variants is given in the reference section in table Ta ble 7 4 Supported Attribute Types Users may define their own types by entering the de sired type name instead of choosing one of the predefined types Attribute Values Attribute values may be represented using either constant values or calculations Attribute values that are constant always have the same value However an attribute value can be calculated using a calculation expression to support complex usage scenarios The syntax of the calculation expression depends on the expression language pure variants has an in built expression language called pvProlog see Section 7 5 Expression Language pvPro log Attribute Value Calculations with pvProlog Wh
87. en using pvProlog for value calculation basic knowledge of Prolog syntax and se mantics are helpful However for many simpler cases the given examples should be suffi cient Attribute calculation in pvProlog requires the value to be bound to a variable called Value Thus to assign the value 1 to an attribute use the following calculation expression Value 1 To assign an attribute the value of a different attribute OtherAttribute of an element OtherElement use the following expression getAttribute OtherElement OtherAttribute OtherAttributeValue Value OtherAttributeValue Since getAttribute assigns the value to OtherAttributeValue a shorter version directly uses Value in the getAtt ribute statement getAttribute OtherElement OtherAttribute Value For arithmetic expressions the syntax is a little bit different To return the half of the product of the value of two attributes the following expression can be used getAttribute OtherElement OtherAttribute OAV getAttribute AnotherElement AnotherAttribute AAV Value is OAV AAV 2 On the right side of is mathematical expression can be used similar to most other pro gramming languages The left side should be the name of a Prolog variable to store the res ult Only attributes of type ps float and ps integer may be used in arithmetic expressions otherwise the evaluation aborts with an error 15 Feature Models Tip Attribute values of ty
88. ences and other kinds of meta data A user may have any number of workspaces for different purposes Outside of Eclipse workspaces are represented as a directory in the file system with a subdirectory meta data where all work space related information is stored A workspace may only be used by a single Eclipse in stance at a time Projects are structures for representing a related set of resources e g the source code of a library or application The contents and structure of a project depends on the nature of the project A project may have more than one nature For example Java projects have a Java nature in addition to any project specific natures they may have Natures are used by Eclipse to determine the type of the project and to provide specialised behaviour Project specific meta information is stored in a project file inside the project directory This directory could be located anywhere in the file system but projects are of ten placed inside a workspace directory Projects may be used in more than one workspace by importing them using File gt Import gt Import Existing Project Figure 5 1 Eclipse workbench elements shows an Eclipse workbench window A per spective determines the layout of this window A perspective is a preconfigured collec tion of menu items toolbar entries and sub windows views and editors For instance this figure shows the standard layout of the Resource perspective Perspectives a
89. ent problems may be filtered out To resolve this simply click on the filter icon 2 and select Variant Management Problems as problem item to show For some problems the Quick fix item in the con text menu of the problem may offer options for solving the problem The figure below shows an example of a problem selection Figure 2 3 Variant model with a problematic selection ariant Management Sample Config Space with Transformation vdm Eclipse Platform File Edit Navigate Search Project Run Variant Window Help Irs Ho gt e w FAD G ke eel a Se FY Z variant Projects X v 7 Ol EE teens E EENE mess o Result 3 Relations a Ea E E Simple Car Example Elf 8 Car a Blt gt adv fe Sample Config Space with Tra Ele Safety Functions 9 ba 5 5 4 E 2 Car Sample Config Space with ABS 7 tS a G 3 H Y Brakes 5 project qa ESP ia R H E Car xfm Fe g Brakes J 9 CA J H Gear Box lt e ccm_copy xsl He 5 Gear Box H i im y E 7 Safety Functions lt 0 moduleconfig xml Ee Engine E Readme txt T C16 Diesel Cl Gasoline kie pa o gt a z a S7 l 28 o Outline amp Fiter Se y Oy Feature Models Family Models Label 3 Automatic Properties Tasks 2 Problems 33 p 0 i 2 Brake Actuation 2 errors 0 warnings 0 infos v Brakes Descript
90. es in a variant description mod A SE E E E A A E NE E ee eaa dees wvceeloieenens Neeskes 60 5 20 Configuration space properties Model Selection ceseneeeeeeeeeseeeeeeeeeseeeee 61 5 21 Configuration space properties Transformation input output paths 62 5 22 Configuration space properties Transformation Configuration 63 5 23 Model Compare Editor secesie stenstess caceeet oven e cecdeseeiece geese cevecdbanceecd 66 5 24 Attributes view right showing the attribute Count for feature Gears 67 5 25 Variant Search View Tree Jernia aan iia A O a aa 68 5 26 Variant Search View Table rerus ai aeie EEA OE EA O 68 5 27 Relations view different layouts for feature with a ps requires to feature Main Component B18 sgrechair aree e eE E EE EEE E EEN ENEE aP NS 70 vii Vili pure variants Eclipse Plug in User s Guide S28 Result View morania cel ease shige erii e ro VE ie ETA EE e o aee p EE ie en Eaa k 71 5 29 Result View in Delta Mode o ec ne eesriie geas ia ed 72 5 30 Feature Matrix view of a configuration Space eeecceceeececeeeeeceeeeeees 73 5 31 The Variant Projects View eeeeeeeecececcececececececececececeeececeeeeeeeeeeeseeeeeees 74 5 32 The Variant Search Dialog yino ik ieee ie ieee a 75 5 33 Directed Graph Export Output Configuration Dialog eens 78 5 34 Directed graph export example options LR direction Colore
91. etails shown to be set by the user 71 5 4 9 72 Feature Matrix View Figure 5 29 Result View in Delta Mode Relations Se TT lamb a Weather Station a Sensors Temperature RW wind QB Weather Station Solutions 2CSupport 8 Sensors 8 TemperatureSensor psiclass D51621 ps class Sensor Temperature 4 WindSpeedSensor psiclass Sensor Wind SB ps file WindSensor cc dir wm src file WindSensor cc a type imp ps file WindSensor h D dir wm src amp file WindSensor h type def psiclassalias Temperature Value VoidSensor lt Sensor Temperature ps classalias Wind value Sensor Wind lt YoidSensor 8 WeatherStationOSMapping wa WindSensorMapping Icons are used to indicate if an element attribute or relation was changed added or re moved A plus sign indicates that the marked item is only present in the current result A minus sign indicates that the item is only present in the reference result A dot sign indic ates that the item contains changes in its properties or its child elements Both old and new values are shown for changed attribute values left hand side is new right hand side is old Feature Matrix View The feature matrix view gives an overview of feature selections and attribute values across the variants in a configuration space The view is opened by double clicking on the config urat
92. g Microsoft Excel or OpenOffice CSV export respects the filters set in the editor of the model to export i e only the matching elements are exported The export wizard permits the columns to be generated in the output file to be selected 77 78 Export Figure 5 33 Directed Graph Export Output Configuration Dialog Variant Export Export to Portable Network Graphics Format PNG Specify the parameters for the directed graph export o Graph Limits Root Node Output Select Depth 3 Graph Layout Page Size A4 v V Colored Quality T Compact Orientation Direction Portrait C Landscape Left to Right Top to Bottor Output File eclipse ui doc pics py_export_dot_example png Browse Restore Defaults lt Back Cancel The directed graph export format generates a graph in the DOT language This can be used for generation of images for use in documentation or for printing If the DOT language in terpreter from the GraphViz package http www graphviz org is installed in the com puters executable path or the packages location is provided as a_ preference Windows gt Preferences gt Variant Management gt Directed Graph Export many image formats can be generated directly The dialog shown in Figure 5 33 Directed Graph Ex port Output Configuration Dialog permits many details of the output such as paper size or the layout direction for the model graph to be specified Graphs for sub mo
93. g the name of the element and an associated icon Feature model elements are represented as shown in the next figure 1 mandatory feature optional feature alternative feature x or feature The representation of family model elements slightly differs for part and source elements root component E component 4 class part S type source Parent child relations are visualized by arrows between the parent and child elements T exe Fa Other relations are visualized using colored connection lines between the related elements The color of the connection line depends on the relation and matches the color that is used for this relation on the tree editing page E F1 Requires F2 Recommends F2 Conflicts F2 Discourages F2 Influences F2 Conditional Requires F2 Requests Provider F2 If an element has children a triangle is shown in the upper right hand corner of the element box Depending on whether the element is collapsed or expanded a red or white corner is shown Y collapsed expanded Graph Layout The layout of the graph can be changed in several ways Graph elements can be moved ex panded collapsed hidden and automatically aligned The graph can be zoomed and the layout of the connections between the elements of the graph can be changed Two automatic graph layouts are supported i e horizontal aligned and vertical aligned Choosing Layou
94. hanged newconflictingname lt conflicting Relations wc Relation Added Requires c visible Relations r elation Removed Requires b Attributes CA Attribute Constant Changed attribute newvalue lt value b Restrictions Script Code Changed newrestrictionvalue newrestrictionvalue lt arestriction E pure variants Model Compare Local File 1 1 Remote File 1 3 I demo3way I demo3way J visible J visible attribute newvalue a gt Requires b N b pi gi i haay attribute value newrestrictionvalue EF Attributes View 5 4 Views 5 4 1 Attributes View The attributes view for a Variant Description model shows the available attributes of the associated feature models The user can set the value of non fixed attributes in this view This view may also be filtered to show only the attributes of selected features and or where no value has been set Figure 5 24 Attributes view right showing the attribute Count for feature Gears Variant Management Sample Config Space with Transformation vdm BR File Edit Navigate Search Project Run Check Window Help ale 7 MMM lle ee Sample Config Space with Transformation X lt sev I Rear Al attribute Disc Drum Y Engine Diesel Gasoline Gear Box v Gears 9 Automatic
95. he attribute given by its name and the unique name class and optionally type of the element it belongs to Return true if the given attribute has a value boolean hasAttribute Value string id Return true if the attribute given by its unique id has a value boolean hasAttribute Return true if the attribute given by its XSLT Extension Functions Function Value nodeset element string name Description name and the element it belongs to has a value boolean hasAttribute Value string eid string name Return true if the attribute given by its name and the id of the element it belongs to has a value boolean hasAttribute Value string ename string eclass string etype string name Return true if the attribute given by its name and the unique name class and optionally type of the element it belongs to has a value string getAttribute Value nodeset attribute Return the value of the given attribute string getAttribute Value string id Return the value of the attribute given by its unique id string getAttribute nodeset element string name Valu Return the value of the attribute given by its name and the element it belongs to string getAttribute Value string eid string name Return the value of the attribute given by its name and the id of the element it belongs to string getAt
96. heir unique identifier Unique names are required for each feature but not for other model elements The Unique name is displayed by de fault in brackets if the visible name is also displayed An informal name for the model element This name is displayed in views by default This name can be composed of any characters and doesn t have to be unique The class and type of the model element In feature models elements can only have class ps feature Thus the element class for features can not be changed Elements in family models can have one the following classes ps component ps part or ps source The root element of a family model always has the class ps family The type of a model ele ment is freely selectable A description of the model element This page allows definition of additional relations between an element and other elements such as features or components Typical relations between features such as requires or conflicts can be expressed using a number of built in relationship types The user may also extend the available relationship types More information on element relations can be found in Section 3 2 3 Element Relations Attributes Page Every element may have an unlimited number of associated attributes name value pairs The attributes page uses a table of trees to visualize the attribute declaration root row and optional attribute value definitions child rows Each attribute has an associated Ty
97. her a check is performed during automatic model valida tion see the section called Performing Model Checks The same dialog appears for editing and copying check configurations using the Edit and Copy buttons Only non default configurations can be edited Performing Model Checks A model can be checked using the selected model check configurations by opening the model in a corresponding model editor and pressing button in the tool bar This will start a single model validation cycle The progress of the model validation is shown in the Pro gress view 29 30 Model Check Framework Figure 3 12 Model Validation in Progress Variant Management Runtime System ccfm Eclipse SDK Isl x File Edit Navigate Search Project Run Window Help PESEE m kS E a variant Proj XA Emi T Runtime System ccim X E e a Y Button aj fo EE Weather Station Example i k ap Button LJ pS ExampleConfigSpace a x 4 7 psiclassalias Button Runtime System ccfm S ps classaliasfile Button h Runtime System xfm CANPortal Weather Station ccfm Weather Station xfm H CGAScreen xl s ft re Tree O Table ad Graph Constraints 2 Probleme 53 a7 7 7 1 error 0 warnings 0 infos Description The element Button of type ps classalias needs attribute va
98. i60 cusL and no element identifier substitution takes place The button opens an advanced editor that is more suitable for complex restrictions This editor is described more detailed in the section called Advanced Expression Editor Constraints Page The Constraints page defines model constraints Any element that can have constraints can have any number of them A new constraint can be created using the Add button An exist ing constraint can be removed using Remove The order of constraints may be changed us ing the Move Up and Move Down buttons on the right side of the page This has no effect on whether a constraint is evaluated or not constraints are always evaluated 49 Common Editor Pages Figure 5 10 Constraints page shown in property editor Edit Feature Dressing Edit Feature Dressing x Edit Edit i e Edit Constraints fe Edit Constraints oj General Relations Attributes Restrictions Constraints General Relations Attributes Restrictions Constraints Name Constraints Name Constraints Add 5 Add fi Limit Dressing Dressing REQUIRES French OR Yoghurt 1 Limit Dressing Dressing REQUIRES Garlic OR Yoghurt Remove Remove 4 Description Description Ensure that only French or yoghurt dressing is allowed a Ensure that only french or yoghurt dressing is allowed a For each constraint a descriptive name can be specified It has
99. ibutes view shows a sample Variant Description model Note the different icons for implicit and user selection of features and the problems indicated in the right sidebar Figure 5 18 Variant description model editor with outline result problems and attributes view Yariant Management Sample Config Space with Transformation vdm Eclipse SDK File Edit Navigate Search Project Run Variant Window Help a B J w lec Xl eee a SF FY B outline 22 Sp YF Oe ene O 5 Result 53 S at S debe E m E cr B AET v Safety Functions Hev Brakes 0 Car v l Rear Sv a Engine S 1 Brakes v Gears a Je i E 9 Engine v T Gear Box bev 3 Ja al H I Gear Box v Y Front T 3 SAOR F Gl Safety Functions A Esp av F Safety Functions 9 ESP ABS vi Engine a oe ESP Electric Requires ABS WV Disc v Disc v I Car v Brakes z m A Feature Models Family Models v Brake Actuation Cs Automatic EL Problems 3 H Y an attributes XN a 2 errors 0 warnings 0 infos pid ose C a xg 1 Description Resourc Attribute Value ESP requires ABS Sample 8 lternatives are Diesel Gasoline Sample Elcears open 2 p Count 5 U E i 22 0 14 5 Feature Selection Outline View The outline view of the variant description model shows the selected features with
100. ictions can not only be defined for elements but also for element attributes attribute values and relations Detailed information about using restrictions is given in Section 3 5 Model Evaluation 3 2 3 Element Relations pure variants allows arbitrary 1 n relations between model elements feature family model elements to be expressed The graphical user interface provides access to the most com monly used relations The extension interface allows additional relations to be accessed Examples of the currently supported relations are requires required_for conflicts recom mends discourages cond_requires and influences Use the Relations page in the property dialog of a feature to specify feature relations Table 7 5 Supported Relations between Elements I documents the supported relations and their meanings 3 2 4 Element Attributes pure variants uses attributes to specify additional information associated with an element An attribute is a typed and named model element that can represent any kind of informa tion according to the values allowed by the type An element may have any number of as sociated attributes The attributes of a selected model element are evaluated and their val ues calculated during the model evaluation process A simplified version of the element at tribute meta model is shown below 13 14 Element Attributes Figure 3 3 Simplified element attribute meta model Res
101. in task view ps recommendedFor EL Like ps requiredFor but not treated as error only notification in task view ps conflicts EL If all specified targets are selected the source must not be member of the selection ps conflictsAny EL If any of the specified targets is selected the source must not be member of the selection ps discourages EL ps influences EL Like ps conflicts but not treated as error only notification in task view The features in FL are influenced in some way by the selection of the feature The in terpretation of the influence is up to the user Table 7 6 Supported Relations between Elements ID Relation Description Use for Partner relation lps exclusiveProvider id In a valid configura tion at most one ex clusiveProvider for a given id is allowed Thus the relation defines a mutual ex clusion relation between elements Concurrent imple mentations for an ab stract concept ps requestsProvider ps requestsProvider i d In a valid configura tion for each request sProvider with the given id there must be an exclusivePro vider with the same id There may be any Request existence of ps exclusiveProvider an abstract concept Expression Language pvProlog Relation Description number of ps requestsProvider relations for the same id Use for Partner relation ps expansionP
102. in this column activates the Restrictions editor To restrict the complete attribute definition use the restriction cell in the attribute declaration root row To restrict an attribute value expand the attribute tree and click into the restriction cell of the value Restrictions can either be entered directly into a cell or by using the Restrictions editor Clicking on the button marked which appears in the cell when it is being edited also opens this editor See the section called Restrictions Page for detailed information During model evaluation attribute values are calculated in the listed order The Move Up and Move Down buttons on the right side of the page can be used to change this order The first definition with a valid restriction if any and a constant or a valid calculation result defines the resulting attribute value Common Editor Pages Values can be entered directly into a cell or by using the Value editor Clicking on the but ton marked which appears in the cell when it is being edited opens this editor The edit or also allows the value definition type to be switched between constant and calculation The calculation type can use the pvProlog language to provide more complex value defini tions More information on calculating attribute values is given in the section called Attribute Value Calculations with pvProlog The use of attributes is covered further in Section 3 2 3 Element Relations
103. ing an attribute Value For example it is possible to use a ps value part with ps flagfile and ps makefile source elements to generate the same value into both a makefile and a prepro cessor define in some header file Calculation of the value of a ps flag or ps variable part element is based on the value of attribute Value The value may be a constant or calculation There may be more than one attribute Value defined on a part with maybe more than one value guarded by re strictions The attributes and its values are evaluated in the order in which they are listed in the Attributes page of the element s Properties dialog The first attribute resp attribute value with a valid restriction that evaluates to true or without a restriction is used Figure 4 2 Multiple attribute definitions for Value calculation shows typical Value at tribute definitions The value 1 is restricted and only set under certain conditions Other wise the unrestricted value 0 is used Figure 4 2 Multiple attribute definitions for Value calculation Edit Feature System xi Edit Edit Attributes o General Relations Attributes Restrictions Constraints a ne Add Remove Add value Remove value Move up Move down coe Using XSLT for the Transforma tion Setting up the Standard Transformation The transformation configuration for the standard transformation is either created when a configuration space
104. ion Resource In Folder Loc MY car O ESP require s ABS Sample Confi Simple Car Example Samp v Disc open alternatives are Diesel Gasoline Sample Confi Simple Car Example Samp v Disc MV Electric v Engine JT E wf rrr i 22 0 146 The Outline view shows a configurable list of features from all feature models in the con figuration space Eclipse 3 0 The task view has been divided into tasks and problems view Please open the problem view to see evaluation problems Transforming Configuration Res ults 2 7 Viewing and Exporting Configuration Results Results of a configuration can be accessed in a number of ways The Result view Window gt Show View gt Other gt Variant Management gt Result allows graphical review of the variant result models that have been derived from the corresponding models in the con figuration space The context menu of the Variant Project view provides an Export operation As shown in the figure below configuration results features and components can be exported as HTML XML and CSV formats The XML data format is the same as for importing mod els but contains only the configured elements The Export dialog asks the user for a path and name and the export data formats for the generated files and the model types to export Figure 2 4 Variant model export wizard HTML export of all models selected gt ariant Export Eg Choose Forma
105. ion space icon in the Variant projects view see Figure 5 30 Feature Matrix view of a configuration space The view may be filtered based on the selection states of fea tures in the individual Variant Description models one filter shows the features that have not been selected in any model one filter shows the features that have been selected in all models and one filter shows the features that have been selected in at least one model The filters are accessed via the context menu for the view Show elements The general filter ing mechanism can also be used to further specify which features are visible also access ible from the context menu Variant Projects View Figure 5 30 Feature Matrix view of a configuration space Variant Management ExampleConfigSpace Eclipse Platform File Edit Navigate Search Project XMLtools Run Check Window Help r E m SS e laa Gis Variant PARK Navigator O l SE EEEa E Weather Station xfm R Indoor vdm 2p v Bj Readme txt Weather ka bom xsl F Output Weather Station Example UDPo amp S project PC Da X Ouna M aa G Indoor vdm Sensors 2 v R IndoorData vdm Synch amp O IndoorDataUSB vdm Lo X 7 z IndoorDeluxe vdm Wind X go oO Ww oreda Debug IE z al a Outdoareka v n E Z i Temp X v Vv v a ee Pressure 3 A O M kos moduleconfig xml rs 7 oO 7 E
106. is created using the wizard or can be re created using the following instructions e Open the Transformation Configuration page in the configuration space properties e Add the module Standard transformation using the Add button Name it for instance Generate Standard Transformation Actionlist e Add an Actionlist module Leave the include pattern as variant and all other para meters empty Name it for instance Execute Actionlist In normal circumstances there should be only one Actionlist module for an include pattern otherwise the action list gets executed twice on a tree node for each action list module matching the same node 4 1 2 Using XSLT for the Transformation A highly flexible way of generating product variants is to use XSLT in conjunction with the pure variants XSLT extension functions No special requirements are placed on the transformation you have to perform and using the extension functions is quite straightfor ward e Open the transformation configuration page in the configuration space properties e Add the XSLT script execution module using the Add button Name it for instance Execute XSLT script e Change the module parameters page by pressing Next and enter the name of the XSLT script file you want to execute as value of the in parameter e An optional output file can be specified using the out parameter e Press Finish to clos
107. itor for more information Figure 2 5 Transformation configuration in configuration space properties Properties for Config Space cfg Info Configuration Space Configuration Space cys Define used modules For transformation Model List Input Output lransformation Configuratio Transformation configuration File C Dokumer Browse Specify the modules used for the transformation Configured Modules load Convert to transformer action list Execute transformer action list Add l gt Apply The toolbar transformation button is used to initiate a transformation see Figure 2 6 Transformation button in Eclipse toolbar For more information on the XML transform ation engine see the document XMLTS Transformation Engine The distributed examples include some sample transformations Exploring Documentation and Ex amples Figure 2 6 Transformation button in Eclipse toolbar 4 CS Oy amp 4 SS Result Name 2 9 Exploring Documentation and Examples Installing the pure variants User Documentation and Examples feature gives access to online help and examples of pure variants usage Online documentation is accessed using Help gt Help Contents Examples can be installed as projects in the user s workspace by using File gt New gt Example The available example projects are listed in the dialog below the items Variant Management and Variant
108. ives and cre ation of other C C language constructs The standard transformation is based on a type model describing the available element types for family models see Figure 4 1 The Standard Transformation Type Model First a corresponding transformation module converts the variant result model containing standard transformation elements into an action list In a second transformation step this action list is executed by the action list processor also a transformation module Figure 4 1 The Standard Transformation Type Model class genericcomponent component Q family operator method Glink feature o fid feature object o Value string vsproject option SProjectOption operation VSProjectOptionOp o config SProjectConfig QO condtext conditionname string copyconditon boolean QO classaliasfile alias string ccfmelement class class genericpart genericsource O part source functionimpl function O class Q aspect O project flag G classalias value variable o Value string Value string Value string o Value string O destfile o file path dir directory o type filetype flagfile makefile O sredestiile symlink flag string yariable string srcfile path o linktarget path set boolean srcdir directory QO condxml Q file fragment Q transform conditionname string copyc
109. lculations Editor 50 Compare Models 64 Configuration Spacel Editor 60 Constraints Editor 50 Editor Pages 42 Model 12 pvSCL 97 D Dialog Element Selection 54 E Editor Attributes 47 Calculations 50 Common actions 40 Common pages 41 Configuration Space 60 Constraints 50 Family Model 57 Feature Model 55 Filter 40 Metrics 40 Relations 47 Restrictions 50 Variant Description Model 58 Editor Pages Constraints 42 Graph 43 Table 42 Tree 42 Element Attribute 13 Calculation 15 Constraints 12 Restrictions 13 Selection Dialog 54 Element Properties Attributes Page 47 Constraints Page 49 Dialog 47 General Page 47 Relations Page 47 Restrictions Page 49 Evaluation Variant Description Model 21 Export Model 77 Expression Editor 50 F Family Model 17 Editor 57 Element Types ps class 110 ps classalias 110 ps feature 111 ps flag 111 ps variable 111 Family model Restrictions 19 Feature Attributes 17 Constraints 12 Relations 13 Restrictions 13 Type 101 Variation Type 101 Feature Model 16 Editor 55 Feature Variation Types 101 Features Matrix View 72 Filter View 67 G Graph Visualization Editor Pages 43 Import Model 79 M Metrics Model 40 Model Compare 64 121 Constraints 12 Export 77 Family 17 Feature 16 Import 79 Meta Attributes 97 Metrics 40 Search 74 Validation 26 O Outline View 69 Outline View
110. le 7 15 Element references 99 Feature Models Syntax Description ElementName Evaluates to true if the element with the unique name ElementName is in the cur rent selection The element is first searched in the model containing the pySCL expres sion then in all other models of the config uration space ModelName ElementName Evaluates to true if the element with the unique name Element Name of the model with the name Mode1Name is in the current selection If there is more than one model with the name ModelName in the configur ation space all are searched for the element Elementid Evaluates to true if the element with the unique id Element Id is in the current se lection The element is first searched in the model containing the pvSCL expression then in all other models of the configuration space ModeliId ElementIid Evaluates to true if the element with the unique id Element Id of the model with the id Model1Td is in the current selection 7 7 Feature Models 100 Feature Variation Types 7 7 1 Feature Variation Types Table 7 16 Feature variation types and its icons Short name Variation Type Description Icon mandatory ps mandatory Mandatory features are selected if the parent feature is selected oe optional alternative ps optional ps alternative
111. led Note The auto resolver does not change the selection state of user selected or ex cluded features The auto resolving components are configured on the Auto Resolver tab of the Variant Management gt Model Handling preferences page menu Window gt Preferences Auto resolving for a variant description model is enabled by pressing button in the tool bar In Figure 3 8 Automatically Resolved Feature Selections a selection was auto re solved The feature ABS was automatically selected due to the Requires relation on the user selected feature ESP The feature Electric was automatically selected because it is the default feature of the alternative feature group Electric Electrohydraulic Hydraulic The icons for the different selection types are described in Section 7 9 1 Feature Selection List Entry Types 23 Model Transformation Figure 3 8 Automatically Resolved Feature Selections amp ariant Management Sample Config Space with Transformation vdm Eclipse Platform il Eg File Edit Navigate Search Project Run Yariant Window Help jri G O m Qa v oo x e Cd Ba amp amp EY C3 Variant Projects pas Nee g l r Sample Config Space with Transformation vdm X mi gt y D d Eev g a l gi e E E Simple Car Example a P py Aaii aE 2 Sample Config Space with Tr EA Gn B ma ee Requires ABS m y E Car xfm Eev S wae
112. lue Progress 53 Y O Model alidation ERRRERRRED a Perform check 20519 of 25701 CheckAttributeName i 1977 i Model validation 20 If no model check configuration is selected a dialog is opened inviting the user to choose a non empty check configuration This dialog can be disabled by enabling the Do not show again check box of the dialog The button is used to enable automatic model checking i e after every change on the model a new check cycle is started automatically In contrast to the single model validation cycle only those checks are performed that are enabled for automatic model validation The result of a model check cycle is a list of problems found in the model These problems are shown in the Problems view and as markers on the model A list of quick fixes for a problem can be shown either by choosing Quick Fix from the context menu of the prob lem in the Problems view or by clicking on the corresponding marker on the model For some problems special quick fixes are provided fixing all problems of the same kind Chapter 4 Tasks 4 1 Generating Variants with Model Transformations 4 1 1 Using the Standard Transformation The standard transformation is suitable for many projects such as those with mostly file related actions for creating a product variant This transformation also includes some spe cial support for C C related variability mechanisms like preprocessor direct
113. n of specific features in the set see hasElement requiresCompon ent CN CNL deprecated re quires_component True if the component CN or at least one component from the list CNL is found in the current set of selected com ponents Issues an error mes sage and fails otherwise May be used to request in clusion of specific compon ents see hasComponent Additional Restriction Rules for Variant Evaluation Rule Description Applicable CoO nflictsFea ture FN FNL deprecated con flicts feature True if the feature FN or at least one feature from the list FNL is not found in the cur rent set of selected features Issues an error message and fails otherwise May be used to prevent inclusion of spe cific feature see hasElement conflictsCompon e nt CN CNL deprecated con flicts_component True if the component CN or at least one component from the list CNL is not found in the current set of selected components Issues an error message and fails if compon ent is found May be used to prevent inclusion of specific components getAllSelectedChil dr en EID IDL Binds IDL to contain all se lected children and children of children below and not in cluding EID see hasComponent EID must be an element of a model with the same or high er rank when this rule is used in attribu
114. ng the new name in the opened cell editor Double clicking into the Defining Element column of a con straint opens an element selection dialog allowing the user to change the defining element Clicking on a constraint shows the constraint expression in the editor in the bottom half of the page The kind of editor depends on the language in which the constraint is formulated see the section called Advanced Expression Editor for more information about the edit or The language for the constraint expression can be changed by choosing a different lan guage from the Language list button Changes to constraints are applied using the Apply button and discarded using the Re store button Graph Visualization Page The graph visualization page is primarily intended for the graphical representation and printing of models Although the usual model editing operations like copy cut and paste and the addition editing and deletion of model elements also are supported 43 Common Editor Pages Note The graph visualization is only available if the Graphical Editing Framework GEF is installed in the Eclipse running pure variants More information about GEF are available on the GEF Home Page For nearly all actions on a graph that are explained in the next sections keyboard shortcuts are available listed in Section 7 2 Keyboard Shortcuts Graph Elements Model elements are represented in the graph as boxes containin
115. ns are available for the graph The elements shown in the graph can be edited by choosing Properties from the context menu of an element Elements can be copied cut pasted and deleted using the corresponding context menu items New elements can be created either by choosing one of the items below the New context menu entry or by using the element creation tool provided in the tool bar of the graph visu alization page Figure 5 7 Feature Family Model Element Creation Tools l Select l Select Bai Element ie Feature Graph Printing 46 Printing of a graph is performed by choosing the File gt Print menu item The graph is prin ted in the current layout Common Editor Pages Note Printing is only available on Windows operating systems Element Property Dialog The property dialog for an element contains a General Relations Attributes Restrictions and Constraints page General Page Unique ID Unique Name Visible Name Class Type Description Relations Page A unique identifier for the model element This identifier is generated automatically and cannot be changed Every feature model element has to have a unique identifier A unique name for the model element The name must not begin with a numeric character and must not contain spaces The uniqueness of the name is automatically checked against other elements of the same model The unique name can be used to identify elements instead of t
116. nt Management gt Model Validation preference page menu Window gt Preferences In this page model check configurations can be managed and activated see Figure 3 10 Model Validation Preferences Page 27 28 Model Check Framework Figure 3 10 Model Validation Preferences Page type filter text 7 Model Validation eos E General H Ant Available Configurations 1 Help OAA model checks aa Install Update Mall Element Checks H Java Edit Plug in Development Run Debug Delete Team E Yariant Management Coy Directed Graph Expor Metrics r Selected Configuration Model Handling Model validation Element Checks pure variants License amp CheckAttributeType Feature Model Family Model Synchronizer For DOC IB CheckRelationTarget Feature Model Family Model Visualisation Cat CheckFixedattributeValue Feature Model Family Model amp CheckSamedttributeValues Feature Model Family Model IB CheckMandatoryElementProperties Feature Model Family M Cat CheckDifferentRelations Feature Model Family Model ce CheckRelationPoints Feature Model Family Model gt Ot m Lern i e nt te ee tie 48 4 gt Restore Defaults Apply cme The two default configurations All Model Checks and All Element Checks are always available All Model Checks contains all model ch
117. ode body gt lt p gt lt xsl value of select gt lt p gt lt xsl template gt lt xsl stylesheet gt The script takes XML as input and produces HTML as output It has several transformation parts one for every manual element where the condition attributes are dynamically evalu ated Note that these condition attributes are expected to be valid XPath expressions In the XML description of the manual these expressions contain calls to the pure variants XSLT extension function hasFeature this expects the unique name of a feature as an argu ment and returns true if this feature is in the product variant see Table 7 20 XSLT exten sion functions If a node of the XML document has such a condition and this condition fails the node and all of its child nodes are ignored and are not transformed into HTML For example if a lt section gt node has the condition hasFeature user and the feature user is not selected in the product variant then this section and all its subsections will be ignored In the XML description of the manual a second pure variants XSLT extension function is called getAttributeValue This function is used to get the manual version from the family model It reads the value of the version attribute of the component build and returns it as string 35 36 Using XSLT for the Transforma tion Figure 4 4 The manual for users and developers shows the two variants of the manual HTML
118. ogic eXtensible Markup Language A simple standardized language for representing structured information See http www w3 org To provide support for independent development of XML markup elements DTD XML Schema without name clashes XML has a concept to provide several independent namespaces in a single XML document See http www w3 org XML Transformation System The name _ for the Glossary XPath XSLT UML URL pure variants specific transformation system for generating variants from XML based models XPath is part of the XML standard family and is used to describe loc ations in XML documents but also contains additional functions e g for string manipulation XPath is heavily used in XSLT XML Stylesheet Language Transformations A standardized lan guage for describing XML document transformation rules See ht tp www w3 org Unified Modeling Language A standardized language for expressing software architectures and similar information See ht tp www omg org Uniform Resource Locator A standardized format for expressing the type and location of a resource i e a file or service access point Most commonly used for refering to HTML pages on an HTTP web server e g http my server org index html 119 120 Index A Attribute Calculation 15 Element 13 Feature 17 Value 15 Value Types 15 Attributes Editor 47 View 67 Auto Resolver Variant Description Model 23 C Ca
119. ol bar of the search view is pressed With this history previous search results can be easily re stored The history can be cleared by choosing Clear History from the Show Previous Searches drop down menu Single history entries can be removed using the Remove button in the Previous Searches dialog a Note The history for many consecutive searches with a lot of results may lead to high memory consumption In this case clear the whole history or remove single history entries using the Previous Searches dialog Outline View A new search can be started by clicking on button Start new Search For more information about how to search in models using the Variant Search see Sec tion 5 5 Search 5 4 4 Outline View The Outline view shows information about a model and allows navigation around a model The outline view for some models has additional capabilities These are documented in the section for the associated model editor 5 4 5 Problem View Task View pure variants uses the standard Eclipse Tasks Eclipse 2 1 x or Problems Eclipse 3 0 view to indicate problems in models If more than one element is causing a problem clicking on the problem selects the first element in the editor For some problems a Quick fix see context menu of task list entry may be available Eclipse 3 0 users must open the Problems view manually Window gt Open View gt Other gt Basic gt Problems view 5 4
120. omma Separated Value list A simple text format often used to ex change spreadsheet data Each line represents a table row columns are separated with a comma character or other special characters e g if the comma in the user s locale is used in floating point numbers like in Germany The name of a tool and its input format for automatic graph layout ing The tool is part of the GraphViz package available as open source from www graphviz org Extended Backus Naur Form A common way to describe program ming language grammars The Backus Naur Form BNF is a con venient means for writing down the grammar of a context free lan guage The Extended Backus Naur Form EBNF adds the regular expression syntax of regular languages to the BNF notatation in or der to allow very compact specifications The ISO 14977 standard defines a common uniform precise EBNF syntaxt Hyper Text Markup Language Model rank is a positive integer that is used to control the model evaluation order Models are evaluated from higher to lower ranks i e all models with rank 1 highest are evaluated before any model with rank 2 or lower The rank of a model is configuration space specific and can be set in the configuration space properties The de fault rank is 1 Object Constraint Language A standardized declarative language for specifying constraints on UML models See http www omg org PROgramming in LOGic A programming language based on predic ate l
121. onditon boolean content string mode insertionmode scriptfile path scriptdir directory The standard transformation supports a rich set of source elements for file oriented variant generation Source elements can be combined with any part element and also with part types which are not from the set of standard transformation part types unless otherwise noted For a detailed description of the standard transformation relevant source element types see Section 7 8 1 Predefined Source Element Types 31 Using the Standard Transforma tion The supported part element types are intended to capture the typical logical structure of procedural ps function ps functionimpl and object oriented programs ps class ps object ps method ps operator ps classalias Some general purpose types like Ds project ps link ps aspect ps flag ps variable ps value or ps feature are also available For a detailed description of the standard transformation relevant part element types see Section 7 8 2 Predefined Part Element Types Assigning values to part elements 32 Some of the part element types have a mandatory attribute Value The value of this attrib ute is used by child source elements of the part for example to determine the value of a C preprocessor define generated by a ps flagfile source element Unless noted otherwise any part element with an attribute Value can be combined with any source element us
122. or a menu on the Relations view toolbar The relations view supports filtering based on relation types To filter the view use the Fil ter Types menu item from the menu accessible by clicking on the down arrow icon in the view s toolbar 5 4 8 Result View 70 The result view shows the results of model evaluation after a selection check has been per formed It lists all selected feature and family model elements representing the given vari ant The result view also provides a special operation mode where instead of a result the dif ference delta between two results are shown similar to the model compare capability for feature and family models Toolbar icons allow the view to be shown as a tree or table amp allow the sort direction to be changed 3 and control activation deactivation of the result delta mode amp Filtering is available for the linear table like view 3 The Model Visibility item in Result View the result view menu third button from right in toolbar permits selection of the models to be shown in the result view The result view displays a result corresponding to the currently selected VDM If no VDM is selected the result view will be empty The result view is automatically updated whenever a VDM is evaluated Figure 5 28 Result View Result X System Weather Station Y Output X LCD Sensors X Pressure X Temperature Runtime System Solutions
123. ormation System for model transformations and model exports The extension functions are defined in the namespace ht tp www pure systems com purevariants Table 7 20 XSLT extension functions Function Description nodeset models Get all input models known to the trans former i e the opened variant description will be renamed in the next release model and all feature and family models of the configuration space without any modi XSLT Extension Functions Function Description fications See Section 3 6 2 pure variants Transformation Input for more information about the transformation input Note In the pure variants Server Edition this function returns an empty set Access to the input models of the transformation is not supported in the pure variants Server Edi tion nodeset model by id string will be renamed in the next release Get all variant result models known to the transformer having the given id The result models are derived from the models of the configuration space describing a single con crete solution drawn from the solution fam ily See Section 3 6 2 pure variants Trans formation Input for more information about the transformation input nodeset model by name string will be renamed in the next release Get all variant result models known to the transformer having the given name The res ult models are derived from the models of
124. ormation on table views 5 3 3 Feature Model Editor Every open Feature model is shown in a separate Feature model editor tab in Eclipse This editor is used to add new features to change features or to remove features Variant con figuration is not possible using this editor Instead this is done in a variant description model editor see Section 5 3 5 Variant Description Model Editor and Section 2 6 Using Configuration Spaces for more information The default page of a feature model editor is the tree editing page The root feature is shown as the root of the tree and child nodes in the tree denote sub features The icon asso ciated with a feature shows the relation of that feature to its parent feature see Table 7 16 Feature variation types and its icons Figure 5 15 Feature model editor with outline and property view Variant Management Car xfm Eclipse SDK Eie x File Edit Navigate Search Project Run Window Help gt fae fee x Fa es FY fo Variant Mana DE Outline 3 gt Y 9 8 i Carm TAE Label 9 Car a ABS I Brakes X Automatic T Engine T Brake Actuation bed say 1 Brakes f asoline U Car 2 Gear Box Safety Functions Diesel y Disc Disc i5850 Drum Car_ABS ABS Drum ps feature Electric ps Node Electrohydraulic Tree J Engine ESP Ed Proper
125. ory file ps path type ps filetype srcdir ps directory srcfile ps path This source element type is used for files that are used without modification The source file is copied from the source location to the destination location The optional attributes srcdir and srcfile are used for files that are located in a different place in the source hierarchy and or have a different source file name The value of attribute type should be def or imp1 when the file contains definitions e g a C C Header or implementations For most other files the type misc is appropri ate Type Description impl This type is used for files containing an im plementation e g cc or cpp files def This type is used for files containing declar ations e g C header files In the context of ps classalias calculations this information is used to determine the include files re quired for a given class misc This type is used for any file that does not fit into the other categories app This type is used for the main application file undefined This type is for files for which no special meaning and or action is defined 103 Predefined Source Element Types ps fragment Attributes dir ps directory file ps path type ps filetype srcdir ps directory srcfile ps path mode ps insertionmode content ps string This source element type is used to append text or another file to a file
126. ota Weather Station USB Weather Station D X Pc Data transfer weather Station J Sensors weather Station SyncNGoProto Weather Station L Damcla sk wa Win akhaw Ch abimi Fa J Case sensitive Define Clear m Info s on visible columns Label Unique Name and Visible Name any string any character or press Define for additional Filter Runtime System Unique Name DebuggingSupport EEn visible Name Debug eather Station Description Model Name Weather Station Model File Weather Station xfm Scope Current Project Workspace cme The model selection and filter fields in the lower part of the dialog control the elements that are shown in the left Label field By default all elements for all models within the cur rent project are shown If a filter is selected then only those elements matching the filter are shown If one or more models are selected then only elements of the selected models are visible If the scope is set to Workspace then all models from the current workspace are listed The model selection is stored so for subsequent element selections the previous configuration is used Tip The element information shown in the left and right Label fields is configur able Use column properties from the context menu to select and arrange the Feature Model Editor visible columns See the section called Table View Editor Page for addition al inf
127. pe and may have any number of Value definitions asso ciated with it The values must be of the specified Type The number of attribute value 47 48 Common Editor Pages definitions is shown in the column In the example in Figure 5 8 Sample attribute definitions for a feature the attribute DemoAttribute has two value definitions 1 and 0 Figure 5 8 Sample attribute definitions for a feature O Edit Feature DemoFeature Ed Edit Edit Attributes o General Relations Attributes Restrictions Constraints Remove value Moye up Move down Attributes can be inherited from parent elements Checking the inheritable cell column icon in the parent elements Attribute page does this An inherited attribute may be over ridden in a child element by defining a new attribute with the same name as the inherited attribute The new attribute may or may not be inheritable as required Attributes can be fixed by checking the cell in the F column Fixed attributes are calcu lated from value definitions in the model in which they are declared in contrast to non fixed attributes for which the value is specified in a variant description model Default val ues can be optionally defined here for non fixed attributes These are used if no value is specified in the variant description model An attribute may have a restricted availability This is indicated by a check mark in the column Clicking on a cell
128. pe ps boolean are represented as string constants true and false They cannot be used in direct comparisions with pv Prolog fail andtrue 3 3 Feature Models 16 Feature models are used to express commonalities and variabilities efficiently A feature model captures features and their relations A feature is a property of the problem domain that is relevant with respect to commonalities of and variation between problems from this domain The term relevant indicates that there is a stakeholder who is interested in an explicit representation of the given feature property What is relevant thus depends on the stakeholders Different stakeholders may describe the same problem domain using differ ent features Feature relations can be used to define valid selections of combinations of features for a domain The main representation of these relations is a feature tree In this tree the nodes are features and the connections between features indicate whether they are optional al ternative or mandatory Table 7 16 Feature variation types and its icons gives an explan ation on these terms and shows how they are represented in feature diagrams Additional constraints can be expressed as restrictions element relations and or model constraints Possible restrictions could allow the inclusion of a feature only if two of three other features are selected as well or disallow the inclusion of a feature if one of a specific set of features is
129. ps makefile for variable CXX_OPTFLAGS with value 06 CXX_OPTFLAGS 06 107 Predefined Part Element Types ps classaliasfile Attributes dir ps directory file ps path type ps filetype alias ps string This source element type is used to support different classes with different names that are concurrently used in the same place in the class hierarchy This transformation is C C specific and can be used as an efficient replacement for templates in some cases This definition is only used in conjunction with the part type ps classalias A typedef ali asValue alias statement is generated by the standard transformation for this element type aliasValue is the value of the attribute Value of the parent part element Fur thermore in the standard transformation the variant result model is searched for a class with name aliasValue and include statements are generated for each of its ps file source elements that have a type attribute with the value def If the alias name contains a namespace prefix corresponding namespace blocks are generated around the typedef statement Example 7 5 Generated code for a ps classalias for alias io net PCConn with aliased class NoConn ifndef _ PCConn_include__ define _ PCConn_include__ include C Weather Station Example output usr wm src NoConn h namespace io namespace net typedef NoConn PCConn endif PCConn_include__ ps symlink Att
130. ptures the Feature model problem do main and the Family model problem solution separately and independently This separa tion of concerns makes it simpler to address the common problem of reusing a Feature model or a Family model in other projects Figure 1 1 pure variants transformation process gives an overview of the basic process of creating variants with pure variants Figure 1 1 pure variants transformation process Feature Selection Module 1 Pe Concrete Product Feature A Component Module 2 Variant Model Jt Model Module 3 i Transformation GH Protocol XML based Module N Transformator Family Model Other related documents The product line is built by creating Feature and Family models Once these models have been created individual products may be built by creating Variant Description models Re sponsibility for creation of product line models and creation of product models is usually divided between different groups of users 1 2 Other related documents The Workbench User Guide Help gt Help Contents is a good starting point for fa miliarising yourself with the Eclipse user interface The pure variants XML transformation system is described in detail in the XML Trans formation System Manual see Eclipse online help for a HTML version Features specific to the pure variants Server Edition are described in a separate section in this document in
131. pure variants Eclipse Plug in User s Guide Version 2 0 for pure variants 2 2 pure variants Eclipse Plug in User s Guide Version 2 0 for pure variants 2 2 Published 2006 Copyright 2003 2006 pure systems GmbH Table of Contents De Introd ction niron siren bebecdssteceesdebeesscscabdolele betes shandeecasupeodeste 1 Le What 18 pure variants cc cn araire an E E NE EA EANES 1 1 2 Other related documents eee ce cececececececececececececeeeceeeeeeeeeeeeeees 2 D2 Getting Started oenen eee scents EEE EE E EEEE teks EAE EERE AE CED EE EEE REER CENE 3 2 1 Software Requirement ecoscore iere isnin riiiierni iinne eiia 3 2 2 Sottware Install om seee eiieeii iiai eieaa i Daia ana e 3 2 2 1 How to install the software cece cecececececeeeceeeeeeeeeeeeeees 3 2 2 2 Installation Problems ceccceececececececececececececeeeseeeeeeeeeees 3 2 3 Obtaining and Installing a License 0 0 cece cecececececececeeeeeeeeeeeees 3 2 4 The Variant Management Perspective cc cccccececececececeeeeeeeeeeeees 4 2 5 Using Feature Models 0 cccisisscchstaesadonagsdoacshebves dag lbceteasevendaagabtecckeseeeidees 4 2 6 Using Configuration Spaces cccccccccececececececececeeeeeeeceeeeeeeeeeeeeees 5 2 7 Viewing and Exporting Configuration Results 2 0 00 ceeeeeeeeeeeeeees 7 2 8 Transforming Configuration Results 22 0 cccecccececececececeeeceeeeeeeees 7 2 9 Exploring Documentation and Examples
132. r external structure of a component for example an interface description pure variants provides a number of predefined part types such as ps class ps object ps flag ps classalias and ps variable The family model is open for extension and so new part types may be introduced depending on the needs of the users Source elements Since parts are logical elements they need a corresponding physical representation or rep resentations Source elements realise this physical representation A source element is an unnamed but typed element The type of a source element is used to determine how the source code for the specified element is generated Different types of source elements are supported such as ps file that simply copies a file from one place to a specified destination Some source elements are more sophisticated for example ps classaliasfile which allows different classes with different aliases to be used at the same place in the class hierarchy The actual interpretation of source elements is the responsibility of the pure variants trans formation engine To allow the introduction of custom source elements and generator rules pure variants is able to host plug ins for different transformation modules that interpret the generated variant result model and produce a physical system representation from it The semantics of source element definitions are project programming language and or transformation specific 3 4 2 Sampl
133. r more information about the ps flagfile and ps makefile source element types see the section called ps flagfile and the section called ps makefile ps variable Attributes Value ps string A variable represents any kind of named value e g a make file or programming language variable For the standard transformation the value of attribute Value is evaluated by ps flagfile resp ps makefile source elements to generate C C specific prepro cessor definitions resp make file variables For more information about the ps flagfile and ps makefile source element types see the section called ps flagfile and the section called ps makefile ps feature Attributes fid ps feature This special part type is used to define features which have to be present if the part element is selected If pure variants detects a selected part of type ps feature the current fea ture selection must contain the feature with the id given as value of the attribute fid Oth erwise the result is not considered to be valid The selection problem Auto Resolver if ac tivated tries to satisfy feature selections expected by ps feature part elements This functionality does not depend on the use of any specific transformation modules 7 9 Variant Description Models 111 Feature Selection List Entry Types 7 9 1 Feature Selection List Entry Types Table 7 19 Types of feature selections Type Description Icon
134. r more information about working sets please consult the Workbench User Guide provided with Eclipse Help gt Help Contents section Con cepts gt Workbench gt Working sets 5 5 7 Search Results The results of the search are listed in the Variant Search view supporting a tree and table representation and a search result history For more information about the Variant Search view see Section 5 4 3 Search View After the search is finished blue markers are created on the right side of models containing matches These markers visualize the matches in the model and provide an easy way to navigate to the matched model items simply by clicking on a marker 5 6 Model Export and Import 5 6 1 Export Models may be exported from pure variants in a variety of formats An Export item is provided in the Navigator and Variants Project views context menus and in the File menu Select Variant Resources and choose one of the provided export formats Currently supported export data formats are HTML XML CSV and Directed Graph The Directed Graph format is only supported for some models Additional formats may be available if other plug ins have been installed HTML export format is a hierarchical representation of the model XML export format is an XML file containing the corresponding model unchanged CSV character separated values export format results in a text file that can be opened with most spreadsheet programs e
135. ransformations Variable Name Variable Content WORKSPACI GI The absolute path to the Eclipse workspace directory PROJECT The absolute path to the project directory INPUT The absolute path defined by the Input path option OUTPUT The absolute path defined by the Output path option 61 62 Configuration Space Editor Variable Name Variable Content S MODULEBASE The absolute path defined by the Module base path option S VARIANT The name of the variant model used for the transformation The Clear transformation output directory checkbox controls whether pure variants re moves all files and directories in the Output path before a transformation is started The Ask for confirmation before clearing checkbox controls whether the user is asked for confirmation before this clearing takes place The remaining checkboxes work in a similar manner and control what happens if the Output path does not exist when a transformation is started The Recover time stamp option instructs the transformation framework to recover the time stamp values for output files whose contents has not been changed during the current transformation Le even if the output directory is cleared before transformation a newly generated or copied file with the same contents retains its old time stamp Enable this op tion if you use tools like make whi
136. re Trace 12csupport psiclass SLIP E Protocols S E PcLine file SLIP cc E Trace H psiclassalias PCLine f WeatherStationOSMapping E Sensors zi cid StreamOutputMapping Tree Table Graph Constraints E windSensorMapping E Documentation E Properties 3 _ E gt x ma s aspect Displa pee Foe n z ps aspect intSync E Source ps aspect Trace Class ps source ps aspect WMTrace Type ps file ps class WeatherData Unique ID id90 ps class NoConn Unique Name ps class Measurement Visible Name ps class VoidSensor f netclace Sencar Mind zl 4 The Properties dialog is similar to that for Feature models See Section 3 4 3 Restrictions in Family Models for more information on that topic 5 3 5 Variant Description Model Editor 58 The variant description model editor is used to specify the configuration of an individual product variant This editor allows the user to make and validate feature selections to set attribute values and to exclude model elements from the configuration In this editor a tree view shows all feature models in the configuration space A specific feature can be included in the configuration by marking the check box next to the feature Additional editing options are available in a context menu Features may also be selected automatically e g by the Auto Resolver enabled by pressing button
137. re designed for performing a specific set of tasks e g the Java perspective is used for developing Java pro grams Users may change the layout of a perspective according to their needs by placing views or editors in different locations by adding or closing views or editors menu items and so on These custom layouts may be saved as new perspectives and reopened later The standard layout of a perspective may be restored using Window gt Reset Perspective Editors represent resources such as files that are in the process of being changed by the user A single resource cannot be open in more than one editor at a time A resource is nor mally opened by double clicking on it in a Navigator view or by using a context menu When there are several suitable editors for a given resource type the context menu allows the desired one to be chosen The figure below shows some of the main User Interface ele ments 37 Variant Management Perspective Figure 5 1 Eclipse workbench elements Resource Eclipse Platform DER file Edt Navigate Search Project Run Window Help 4 Cs FR Resource Navigator View Name of current perspective Outline View E Outline 52 outline is not available Eclipse uses Views to represent any kind of information Despite their name data in some types of view may be changed Only one instance of a specific type of view such as the Outline view may be shown in the workbench at a tim
138. refixes pv dyn gt lt generate text gt lt xsl output method html gt lt match document root node gt lt xsl template match document gt lt html gt lt title gt lt title gt lt body gt lt xsl apply templates mode body gt lt body gt lt html gt lt xsl template gt lt match title gt lt xsl template match title mode body gt lt xsl if test not condition or dyn evaluate condition gt lt hl gt lt xsl apply templates mode body gt lt h1 gt lt xsl if gt lt xsl template gt lt match version gt lt xsl template match version mode body gt lt p gt lt b gt lt xsl value of select concat Version dyn evaluate gt lt b gt lt p gt lt xsl template gt lt match section gt lt xsl template match section mode body gt lt xsl if test not condition or dyn evaluate condition gt lt h2 gt lt xsl value of select name gt lt h2 gt lt xsl apply templates mode body gt lt xsl if gt lt xsl template gt lt match subsection gt lt xsl template match subsection mode body gt lt xsl if test not condition or dyn evaluate condition gt lt h4 gt lt xsl value of select name gt lt h4 gt lt xsl apply templates mode body gt lt xsl if gt lt xsl template gt lt match paragraphs gt lt xsl template match par m
139. ributes dir ps directory file ps path type ps filetype linktarget ps string This source element type is used to create a symbolic link to a file or directory named lt linktarget gt a Note Symbolic links are not supported under Microsoft Windows operating systems Instead files and directories are copied 108 Predefined Part Element Types 7 8 2 Predefined Part Element Types Table 7 18 Predefined part types Part type Description Icon ps class Maps directly to a class in an object oriented programming lan guage ps classalias Different classes may be mapped to a single class name Value restrictions must ensure that in every possible configuration only one class is assigned to the alias ps object ps variable Maps directly to an object in an object oriented programming language Describes a configuration variable name usually evaluated in make files The variable can have a value assigned Ps operator Maps directly to a programming language operator or operator function ps flag A synonym for ps variable This part type maps to a source code flag A flag can be undefined or can have an associated value that is calculated at configuration time ps flag is usually used in conjunction with the flagfile source element which gen erates a C preprocessor define lt flagName gt lt flagValue gt statement in the specified file ps proj
140. rovide r id In a valid configura tion at most one ex pansionProvider for a given id is allowed Thus the relation defines a mutual ex clusion relation between elements Provides mechanism for implementing variation points with a default solution ps defaultProvider ps defaultProvider id If an element marked as ps expansionProvide r is additionally marked as ps defaultProvider for the same given id and there is more than one possible ele ment claiming to be an expansionPro vider for this id then the defaultProvider is excluded ps expansionProvide r 7 5 Expression Language pvProlog The pure variants expression language pvProlog is a dialect of the Prolog programming language However pvProlog expressions more closely resemble those in languages such as OCL and Xpath than expressions in Prolog do In most cases the provided logical oper ators and functions are sufficient to specify restrictions If more complicated computations have to be done the full power of the underlying Prolog engine can be used This however will require a manual expression conversion when switching between OCL and Prolog in future versions of pure variants See http www swi prolog org for more in formation on SWI Prolog syntax and semantics pvProlog Logic E 1 xpressions Expr OpExpr UnaryOpExpr BinOp Func UnaryOpExpr OpExpr x Expr y y 1 xor equiv Expr
141. rts E f Manual Root _ Gi Manual Gee Manual Root 5 3 project E 2 Target Group target_group E S Build Manual Eh 2 Target Group target_group B Configuration Developer developer version 1 0 Vv gt Dev per Configuration vdm 4 User user B E ps document Manual 6 User user B moduleconfig xml B fs ps transform Manual xml Eh Input a gt srefile Manual xm B Manual xml gt file Manual html AQ build xs o gt scriptfile build xsl E Manual ccfm E Manual xfrn B S Output Manual html E Tree H Table fo Detail fp Tree Table l E Feature Models f Family Models The feature model describes the different target groups that the manual s content depends on The family model describes how to build the HTML document i e which XSLT script is to be used to transform which XML document into HTML For this purpose the standard transformation source element ps transform has been used see Section 7 8 1 Predefined Source Element Types This source element refers to the XSLT script build xsl shown below lt xml version 1 0 encoding UTF 8 gt lt xsl stylesheet version 1 0 xmins xsl http www w3 org 1999 XSL Transform Using XSLT for the Transforma tion xmins pv http www pure systems com purevariants xmins cm http www pure systems com consul model xmlns dyn http exslt org dynamic xtension element p
142. s 112 7 10 XSLT Extension Functions 2 0 cccccccecececececececececeeeeeeeseeeeeees 112 S Appendices oen iieis etnea E e e iter sab eeu AE EEE desta eee 117 8 1 Software Configuration esssseserererererererererererrerrereeeeereeeeeeeeeeresereee 117 8 2 User Interface Advanced Concepts esesserrrrrrrrrrrrrrrerrerrerrrerreeereee 117 8 2 1 Console View cesses ead etal as desu daa AEE E a 117 83 GlOSSaryss siscdidet iotsusveisciestenisdousannsadie a aea y aeaa aa eepe 118 DEAT LES REENE E TE AR E EA I AASE EAR SEES E AT TELE EOT E E EET 121 List of Figures 1 1 pure variants transformation process cecceceeececececececececececeeeceeeeeeeeeeeeeees 1 2 1 Initial layout of the Variant Management perspective o e 4 2 2 A simple feature model Of a CAL oo cece ce cececececececececeeeeeeeeeeeeeeeseeeeeees 5 2 3 Variant model with a problematic selection 2 0 ceecececececececeeeeeeeeeeeees 6 2 4 Variant model export wizard HTML export of all models selected 7 2 5 Transformation configuration in configuration space properties eee 8 2 6 Transformation button in Eclipse toolbar cc cccececececececeeeeeeeeeeeeeees 9 3 1 Overview of family based software development with pure variants 11 3 2 simplified element meta model cece eeeeeeeecececececeaeeeeeeececeeeaeaaeaeeeteeees 12 3 3 Simplified element attribute meta model ccc
143. s Editing Page 42 The Constraints page is available in the feature and family model editor and shows all con straints in the current model Constraints can be edited or new created on this page It also supports to change the element defining a constraint Figure 5 5 Constraints view shows the Constraints page containing two constraints for mulated in pvSCL The first column in the table of the page contains the name of the con straint The constraint expression is shown in the second column In column three the type of the element defining the constraint is shown The defining element itself is shown in the last column Common Editor Pages Figure 5 5 Constraints view ariant Management BurgerQueen xfm Eclipse SDK Eifel xi Fie Edit Navigate Search Project Run Window Help Itt Ja Sl la lel or lox Sie 3 BurgerQueen xfm X Constraints Defining Element Limit Dressing Dressing REQUIRES French OR Yoghurt hd Dressing Limit Sauce Sauce CONFLICTS Ketchup Sauce fo Sauce CONFLICTS Ketchup Language pvsel 7 New Apply Tree Table fo Detail 28 Graph Constraints f Tasks Properties Console Error Log R Problems 53 EE oe ma 0 errors 0 warnings 0 infos Description Resource New constraints can be added by pressing button New The name of a constraint can be changed by double clicking into the name field of the constraint and enteri
144. ss and optionally type is in the variant nodeset getElement string id Return the element given by its unique id nodeset getElement string name string class string type Return the element given by its unique name class and optionally type boolean hasAttribute string id Return true if the attribute given by its unique id is in the variant boolean hasAttribute nodeset element string name Return true if the attribute given by its name and the element it belongs to is in the variant boolean hasAttribute string eid string name Return true if the attribute given by its name and the id of the element it belongs to is in the variant boolean hasAttribute string ename string eclass string etype string name Return true if the attribute given by its name and the unique name class and optionally type of the element it belongs to is in the variant nodeset getAttribute string id Return the attribute given by its unique id nodeset getAttribute nodeset element string name Return the attribute given by its name and the element it belongs to nodeset getAttribute string eid string name Return the attribute given by its name and the id of the element it belongs to nodeset getAttribute string ename string eclass string etype string name boolean hasAttribute Value nodeset attribute Return t
145. t Exports consul models to html o Select an export type CS Export ORHTML Export variant Description Models to CaliberRM Fi variant Description Models to DOORS R XML Export Eil pure variants 1 4 x to 1 2 x Model Export lt Back Finish Cancel 2 8 Transforming Configuration Results The last step in the automatic production of configured product variants is the transforma tion of the configuration results into the desired artefacts A modular XML based transformation engine is used to control this process see Sec tion 3 6 Model Transformation The transformation process has access to all models and additional parameters such as the input and output paths that have been specified in the configuration space properties dialog The transformation file could be a single XSLT file which is in turn executed with the configuration result as input or a complete transforma tion module configuration The transformation configuration for a configuration space is specified in its properties dia log The Transformation Configuration page Figure 2 5 Transformation configuration in configuration space properties of this dialog allows the creation and modification of Transforming Configuration Res ults transformation configurations A default configuration for the standard transformation is created when the configuration space is created See Section 5 3 6 Configuration Space Ed
146. t Horizontal from the context menu of the graph visualization page auto matically layouts the elements of the graph from left to right The elements are layouted from top to bottom choosing Layout Vertical from the context menu Common Editor Pages Depending on the complexity of a graph the default positioning of the connection lines between the elements of the graph may not be optimal e g the lines overlap or elements are covered by lines This may be changed by choosing one of three available docking rules for connection lines from the submenu Select Node Orientation of the context menu No Docking Rule The connection lines point to the center of connected elements Thus connection lines can appear every where around an element 9 childs child 3 ye 7 J R childs child 2 qa I child 3 Pl m J J I child 1 J childs child 4 AS I childs child 1 Dock Connections on Left or Right The connection lines are positioned in the middle of the left or right side of connected elements This is especially useful for horizontally layouted graphs E chita 2 2 2 childs chia 3 child 3 childs E chitas chia 4 4 E chiias chia 2 child 2 chia S Dock Connections on Top or Bot The connection lines are positioned in the middle of tom the top or bottom side of connected elements This is especially useful for vertically layouted graphs T childs child 4 childs child 3 I child 1 T childs child 1 T childs child
147. t Selection Dialog Warning The pvProlog syntax is not checked in this editor A syntactically wrong ex pression will cause the model evaluation to fail Figure 5 13 pvProlog expression pilot shows the pvProlog editor editing a constraint in the expression pilot In constrast to the pvProlog source editor the pilot always produces syntactically correct pvProlog code 52 Common Editor Pages Figure 5 13 pvProlog expression pilot Edit Constraint xi Edit the constraint o Select language of the constraint o Press ctrl space to select referenced elements Constraint prolog 7 Return type ps boolean Pilot Source Prolog Define condition Operator Value hasFeature x French nie r Use Unique Name lt lt more New hasFeature French hasFeature Yoghurt Remove Negate Move up Move down hasFeature French or hasFeature Yoghurt Aste Kil A pvProlog function can be inserted into the expression by pressing on button New or choosing Add gt New from the context menu The inserted function can be changed by choosing another function in field Operator The argument of the function is added by pressing on button next to field Value If the check button Use Unique Name is checked the unique name of the selected element is inserted as argument Otherwise the id of the selected element is inserted An
148. tdoorDeluxe vdm C FileSystems it i malic Thermometer vdm w Interfaces 2 Display Runtime System ccfm C Interrupt 2 H Documentation E Runtime System xfm C Memory i 12CSupport g Weather Station ccfm C Signalling Sensors E Weather Station xfm Streams H E WeatherStationoSMapping Synchronisation Thread C TraceSupport Feature Models Family Models B Outline 33 Properties Tasks Problems 22 Label 1 error 0 warnings 0 infos v T Weather Station Description Resource In Folder Location V amp Temperature open alternatives are GCC Indoor vdm Weather Station Example M y System v stk300 vy g Sensors 2 Pressure i 433 2080 298 3 5 3 Editors pure variants provides specialized editors for each type of model Each editor can have several pages representing different model visualizations e g tree based or table based Selecting the desired page tab within the editor window changes between these pages 39 Common Editor Actions 5 3 1 Common Editor Actions Filtering 40 Most views and editors support filtering Depending on the type of view the filtered ele ments are either not shown table like views or shown in a different style tree views Fil ters can be defined or cleared from the context menu of the respective view editor page When the view editor has several pages the filter is acti
149. te an initial standard project using the context menu of this view and choose New gt Variant Project or use the File gt New gt Project wizard from the main menu The view will now show a new project with the given name Once the standard project has been created three editor windows will be opened automat ically one for the Feature model one for the Family model and one for the Variant De scription model 2 5 Using Feature Models When a new Variant project is created a new feature model is also created with a root fea ture of the same name as the project s name This name can be changed using the Proper Using Configuration Spaces ties dialog of the feature To create child features use the New entry of the context menu of the intended parent feature A New Feature wizard allows a unique name a visible name and the type of the feature and other properties to be specified All properties of a feature can be changed later using the Properties dialog The figure below shows a small example feature model for a car Figure 2 2 A simple feature model of a car Yariant Management Car xfm Eclipse Platform File Edit Navigate Search Project Run Window Help ut a lE la Je JAAA e o Rl Fag E Z variant Projects X 2 O MERAA n O Relations XA 70 dn B we Simple Car Example El 2 Car a s i v oy E G Sample Config Space with Tr
150. te calculations EID must be an element of a model with higher rank when used in restrictions In family model restrictions EID can also be an element of a mod el with the same rank getMatchin ments getMatchin tedE MatchExpr MEI gSelec tedEle MatchExpr MEI DS gSelec ments CTXID DS le sumSelectedSub Similar to get MatchingElement de scribed above but the list is unified only with the ele ments which are in the cur rent configuration Calculates the numerical sum see getAllSelected treeAttrib of all attributes with the Children utes EID AN Value name AN for all selected ele ments below element with id EID not including the ele ments attributes itself check Checks if the value of attrib Examples Min EN AN Minimum ute AN of element EN is equal or greater than Min check imum Minimum has to bea Min Car Wheels number or the name of an at 4 tribute of EN with a number check 95 Match Expression Syntax for get MatchingElements Rule Description Applicable as value Min Car Wheels MinNumWheels check Checks if the value of attrib Examples Max EN AN Maximum ute AN of element EN is equal or less than Maximum check Maximum has to be a num Max Hand Fingers ber or the name of an attrib 10
151. the inclusion of compon ents parts and source elements This is achieved by placing restrictions on each of these elements Each element may have any number of restrictions An element is included if its parent is included and either there are no restrictions on it or at least one of its restrictions evaluates to true For example assigning the restriction not hasFeature Heap to the class VoidEconomist in Figure 3 6 Sample family model will cause the class and its child elements to be included when the feature Heap is not in the feature set of the variant See Section 3 4 3 Restrictions in Family Models for more information 19 Restrictions in Family Models 3 4 3 Restrictions in Family Models By default every element component part or source element is included in a variant if its parent element is included or if it has no parent element Restrictions specify conditions under which a configuration element may be excluded from a configuration It is possible to put restrictions on any element and on element properties and relations An arbitrary number of restrictions are allowed Restrictions are evaluated in the order in which they are listed If a restriction rule evaluates to true the restricted element will be in cluded A restriction rule may contain arbitrary Prolog statements The most useful rule is has Feature lt feature name id gt which evaluates to true if the feature selection con t
152. this sub tree has to be selected before the context menu is opened Figure 5 4 Metrics for a model Numbers of your current selection For more information select the metric of your o interest variation count 360 Attributes 9 Element count 22 e Model structure Average children per element 0 95 Maximum children per element 4 Maximum tree depth 3 Relations 1 Restriction count 0 Description This metric calculates the maximum depth of the model and the average and maximum number of children per element The available metrics are listed in a tree showing the name and overall results of the met rics on top level Partial results and detailed information provided by a metric are listed in the corresponding subtree An explaining description of a metric is displayed in the De scription field if the name of the metric is marked On the Variant Management gt Metrics preferences page menu Window gt Preferences the set of metrics to apply can be configured 5 3 2 Common Editor Pages Since most models are represented as hierarchical tree structures different model editors share a common set of pages and dialogs 41 Common Editor Pages Tree Editing Page The tree editing page shows the model in a tree like fashion like Windows Explorer This page allows multiple selection of elements and supports drag and drop
153. ties 23 9 Front Property Value Gasoline Feature Y Gear Box Type ps optional Y Gears Unique ID i5850 Hydraulic Unique Name Car_ABS KR Manual Visible Name ABS n Rear Safety Functions gt Some keyboard shortcuts are supported in addition to mouse gestures see Section 7 2 Keyboard Shortcuts 55 Feature Model Editor Creating and Changing Features Whenever a new feature model is created a root feature of the same name is automatically created and associated with the model Additional sub features may be added to an existing feature using the New context menu item This opens the New Feature wizard see Figure 5 16 Feature property dialog where the user must enter a unique name for the feature and may enter other information such as a visible name or some feature relations All feature properties can be changed later using the Property dialog Context menu entry Properties A detailed description of fea ture properties is given in the section called Changing feature properties A feature may be deleted from the model using the context menu entry Delete This also deletes all of the feature s child features Cut copy and paste commands are supported to manipulate sub trees of the model These commands are available on the Edit menu the context menu of an element and as key board shortcuts see Section 7 2 Keyboard Shortcuts Figure 5 16 Feature property dialog Edit F
154. tribute Value string ename string eclass string etype string name Return the value of the attribute given by its name and the unique name class and optionally type of the element it belongs to Further XSLT extension functions are described in the external document XMLTS Trans formation Engine 115 116 Chapter 8 Appendices 8 1 Software Configuration pure variants may be configured from the configuration page located in Window gt Preferences gt Variant Management Preferences The available configuration options al low the license status to be checked the plug in logging options to be specified and the configuration of some aspects of the internal operations of the plug in to be specified pure systems support staff may ask you to configure the software with specific logging options in order to help identify any problems you may experience Figure 8 1 The configuration dialog of pure variants Preferences OF x type filter text x Variant Management 4 a SG General Ant General settings ANTLR Editor Local Logfile location C Temp Browse Aspect E Log level E Enerjy Help Standard information 0 Install Update Error logging 1 BI Java Client connection and session handling logging 2 Jigloo GUI Builder opendrchitectureWare Modeling evaluate and transform logging 3 oxygen
155. trictedObject expression String true id String name String isPermitted boolean i fixed boolean true type String ps string getValued any gt 0 1 1 valueList 10 1 fixed false defaultValue y fixed true AttibuteValue type String ps string getl aiued any A V AttributeCalculation language String pyProlog script String AttributeConstant value String getValued any cies getValued any Element attributes may be fixed indicated with the checked F column in the UD or non fixed The difference between a fixed and a non fixed attribute is the location of the attrib ute value The values of fixed attributes are stored together with the model element and are considered to be part of the model A non fixed element attribute value is stored in a vari ant description model so the value may be different in other variant description models A non fixed attribute may have a list of values that are used by default when the element is selected and no valid value has been specified in the variant description model Default values are stored in the model Guarding restrictions control the availability of attributes to the model evaluation process If the restrictions associated with an attribute evaluate to false the attribute is considered to be unavailable and may not be accessed during mod
156. ture and family model of the configuration space a concrete variant is calculated during the model evaluation called result model Restrictions and constraints are evaluated and removed from result models Attribute value calculations are replaced by their calculated values Corresponding to these modifications the type of the models is changed to signal that a model is a concrete variant see Table 3 1 Mapping between input and result model types Table 3 1 Mapping between input and result model types Input Model Type Result Model Type ps fm Feature Model ps cfm Concrete Feature Model ps ccfm Family Model ps ccm Concrete Family Model ps vdm Variant Description Model ps vdm Variant Description Model identic al to the input model 25 Model Validation For the transformation the result models and additional variant information are collected in the following XML structure lt variant gt lt cfl gt lt element idref element id gt lt novalue idref property id gt lt value idref property id vid property value id eid element id gt lt value gt lt cfl gt lt ccl gt lt element idref element id gt lt novalue idref property id gt lt value idref property id vid property value id eid element id gt lt value gt lt ccl gt lt il gt lt inherited eid element id pid property id gt lt il gt lt cm consulmodels
157. ures in feature models components parts and source ele ments in family models in a hierarchical tree structure Elements Figure 3 2 simplified element meta model have an associated type and may have any number of associated at tributes An element may also have any number of associated relations Additionally re strictions and constraints can be assigned to an element Figure 3 2 simplified element meta model expression String true expression String true uniqueName String elementClass String elementType String 0 7 RelationGroup relationClass String Relation relationType String getTargets List 3 2 1 Model Constraints Model constraints are used to check the integrity of the configuration result model during a model evaluation They can be assigned to model elements for clarity only i e they have no effect on the assigned elements All defined constraints have to be fulfilled for a result ing configuration to be valid Detailed information about using constraints is given in Sec tion 3 5 Model Evaluation 12 Element Relations 3 2 2 Element Restrictions Element restrictions are used to decide if an element is part of the resulting configuration During model evaluation an element cannot become part of a resulting configuration un less one of the restrictions defined on the element evaluates to true Restr
158. ute Scope Attribute Names file I Constant F calculation Workspace Selected resources Enclosing projects k ni i working set Choose Customize Cancel The dialog is divided into the following sections 5 5 1 Search String The search string input field specifies the match pattern for the search This pattern sup ports the wildcards and Wildcard Description match any character ok match any sequence of characters Case sensitive search can be enabled by checking the Case sensitive check box The set tings for previous searches can be restored by choosing a previous search pattern from the list displayed when pressing the down arrow button of the Search String input field 75 Search Type 5 5 2 Search Type In this group it is specified what kind of model elements is considered for the search Elements Search element names matching the pattern Attributes Search element attribute names matching the pattern Attribute Values Search element attribute values matching the pattern Restrictions Search restrictions matching the pattern Constraints Search constraints matching the pattern For refining the search the Element Scope group is activated for search type Elements and the Attribute Scope group is activated for search type Attribute Values 5 5 3 Limit To This group is used to limit the search to a specific model type
159. ution family Figure 3 1 Overview of family based software development with pure variants 8 Problem Domain Solution Family Domain Feature Models Family Models EN Application Problem H Concrete Solution Domain Domain C Variant O Result Model Description Model pure variants manages the knowledge captured in these models and provides tool support for co operation between the different roles within a family based software development process e The domain analyst uses a feature model editor to build and maintain the problem do main model containing the commonalities and variabilities in the given domain e The domain designer uses a family model editor to describe the variable family architec ture and to connect it via appropriate rules to the feature models 11 Common Concepts in pure variants models The application analyst uses a variant description model to explore the problem domain and to express the problems to be solved in terms of selected features and additional configuration information This information is used to derive a variant result model from the family model s e The application developer generates a member of the solution family from the variant result model by using the transformation engine 3 2 Common Concepts in pure variants models This section describes the common generic structure on which both feature and family models are based Both models store elements feat
160. vailable Checks amp Model Checks OY CheckChildren Feature Model Family Model MA amp Element Checks oO CheckaAttributeType Feature Model Family Model Oe CheckRelationTarget Feature Model Family Model Maz CheckFixedattributevalue Feature Model Family Model We CheckSameAttributeValues Feature Model Family Model We CheckMandatoryElementProperties Feature Model Family Model Oe CheckDifferentRelations Feature Model Family Model gt FLR Chaclnalstiannainke fCastiwe Badal Carsi Madal m Check Details Model Types Feature Model Family Model Checks if all mandatory element properties exist on an element Description V Enable check for automatic model validation For a new check configuration a unique name for the configuration has to be entered The available checks are shown in the Available Checks tree and can be selected for the new configuration by clicking on the check boxes of the checks Clicking on the root of a sub tree selects deselects all checks of this sub tree Detailed information about a check are displayed in the Check Details area of the dialog if the name of a check is selected The Model Types field shows the list of model types for which the corresponding check is applicable The Description field shows the description of the check And with the Enable check for button or clicking on the icon of a check it can be configured whet
161. ve for all pages Figure 5 3 Filter definition dialog Filter Properties Ea Define Filter Define conditions and add them to the boolean filter expression Named Filters Show ps flag and ps flagfile elements only Define condition Field Operator Value Type 7 7 ps flag Case sensitive lt lt More OR New Type ps flag Type ps flagfile Remove Negate Move up Move down I Realtime Apply Cancel Arbitrarily complex filters based on comparison operations between feature element prop erties name attribute values etc and logical expressions and or not are supported Comparison operations include conditions like equality and containment regular expres sions matches and checks for the existence of an attribute for a given element empty not empty Filters can be named for later reuse using the Named Filter field The drop down box al lows access to previously defined filters Fast access to named filters is provided by the Filter view which can be activated using the Windows gt Views gt Other gt Variant Manage ment gt Filter item Common Editor Pages Metrics All pure variants model editors provide an extensible set of metrics for the opened models These metrics can be displayed by choosing Show Metrics from the context menu of a model editor If metrics shall be displayed only for a sub tree of a model the root of
162. xample how a model compare editor could look like for a model that is synchronized with CVS The upper part shows the struc ture view with all patches visible and expanded representing the model differences A CVS synchronize is always a three way compare There are incoming changes made in the re mote CVS model and outgoing local changes As to see in the figure the incoming changes have a blue left arrow as icon while outgoing changes have a grey right arrow as icon Added or removed items have a plus or a minus composed to the icon Conflicting changes are marked with a red arrow in both directions displayed only at the element as the patches toplevel change In this example a conflict arises at the element conflicting In CVS its unique name changed and a relation was added while this element was deleted loc ally Two patches show a red background because the mouse hovered above one of these patches which is not visible in the figure Note that the tree viewers in the lower part show only the patches which are selected above The colors correspond to the patch direction Figure 5 23 Model Compare Editor Variant Management demo3way xfm Eclipse Platform OF x File Edit Navigate Search Project Run Window Help jm M lB HLG Q vl o demo3way xfm X gt 8 Tac Constraints A Element Constraint Changed constraintvalue lt NONE Element Removed conflicting General 9 Element Unique Name C
163. y model GI bh isFeatureModel l ment EID True if the element with id EID is found in a feature model hasAttribute AID hasAttribute EN AN hasAttrib ute ET EN AN hasAttrib ute EC ET EN AN These methods check the ex istence of a definition for the specified attribute Attribute is identified by its id AID by the symbolic name of its associated element and its symbolic name EN AN or similarly by additionally spe cifying the element type ET To ensure correct operation of hasAttribute variants using symbolic names sym bolic element names EN must be unique inside the configuration space or inside the element space of the con figuration space ET EN EC ET EN and the sym bolic attribute name AN must be unique inside the attribute space of the element getAttrib ute AID VALUE I _ getAttrib ute EN AN VALUI CI getAttrib ute ET EN AN VALU GI getAttrib ute EC ET EN AN VAL E G ea These methods get or check the existence and value of the specified attribute At tribute is identified by its id AID by the symbolic name of its associated element and its symbolic name EN AN or similar by additionally specifying the element t
164. ype ET When VALUE is a con stant getAttribute checks that the attribute has the specified value If VALUE is a variable then 89 90 Expression Language pvProlog Rule Description Examples Limitations subsequent rules can access the attribute s value using the specified variable name To ensure correct operation of hasAttribute variants using symbolic names symbolic element names EN must be unique inside the configura tion space or inside the ele ment space of the configura tion space ET EN EC ET EN and the symbolic attribute name AN must be unique inside the attribute space of the element getAttribute Name AID ANAMI GI ANAME is unified with the at tribute name of the attribute specified with AID getAttribute Type AID ATYP CI ATYPE is unified with the meta model attribute type of the attribute specified with AID isTrue VALUI CI isFalse VALUI GI If VALUE is equal to the in ternal representation of the true value for an attribute of type ps boolean it will evaluate to true If VALUE is not equal to the internal representation of the true value for an attribute of type ps boolean it will evaluate to true Example usage in a restric tion getContext EID and getAttrib ute EID ABoolean BV and isTrue BV
Download Pdf Manuals
Related Search
Related Contents
Manuel de l`utilisateur 取扱説明書 保管用 一 Manual de usuario 394 Manual de Usuario Tiger User Manual "取扱説明書" GeoGebra Help Official Manual 3.2 SS2-108/124 セキュアスイッチ トラブルシューティング Copyright © All rights reserved.
Failed to retrieve file