# Generic Language for Partial Model Extraction from an IFC Model Based on Selection Set
## 3 Concept of the Selection Set  
During the process of partial model extraction, the software tool firstly identifies the extraction requirements defined by users, then extracts information which meets the requirements, and finally forms a valid data model based on the extracted information. Therefore, the extraction requirements can be regarded as input parameters. In this study, user-defined extraction requirements are integrated into the Selection Set, which can be assumed as some basic sets with specific semantic to extract partial models. The Selection Set is an information set that is formed based on the requirements, such as object types, attributes, relations, and mixed ones. Elements in the Selection Set are used as input parameters of the proposed method. According to referencing relations between IFC data, the proposed method queries IFC data based on input parameters and then exports the required IFC model data, that is, a partial model or sub-model. Extraction requirements can be classified as different semantics and relationships, such as object types, properties, relations, and mixed cases. In terms of data representation in the IFC schema, the entities and rules can be used to describe these extraction requirements. Hence, the first condition for the Selection Set is defined as follows:  
**Condition 1:**_A Selection Set includes a set of Entities and Rules, and has at least one Entity._  
\[\exists e\exists\forall S[[e\in E\wedge r\in R\wedge S=\{E,R]\}\rightarrow|S| \geq 1] \tag{1}\]  
_where \(e\) is ENTITY; \(r\) is Rule; \(S\) is Selection Set; \(E\) is a non-null set of Entities; and \(R\) is a set of Rules._  
In an IFC model, every IFC instance represents a specific meaning, and it is illegal to have an abstract IFC entity in the IFC model. The proposed method is to query and extract IFC instances from the IFC model according to the Selection Set, so the abstract IFC entities should not be included in the Selection Set. The Condition 2 for Selection Set is listed as follows. This condition is similar to the rule BR02 defined by [PERSON] and [PERSON] [28]. **Condition 2:**_A Selection Set cannot include an abstract entity._  
\[\forall e[e\in S\to e\
otin A_{\text{als}}] \tag{2}\]  
_where \(A_{\text{als}}\) is a set of Abstract entity data types._  
Business tasks require diverse information, so a set of exchange requirements may need to be defined for partial model extraction. In some cases, the partial model may only need to meet one of many Selection Sets, while other cases require to meet many Selection Sets. In conclusion, the former relation among Selection Sets is 'union', and the latter one is 'intersection'. Hence, the theorem for forming new Selection Sets is defined as follows:  
**Theorem 1:**_Forming new Selection Sets__The union of many Selection Sets is still a Selection Set, and the intersection of many Selection Sets is also a Selection Set. Let \(s_{i}\) denote a Selection Set:_  
\[(1)\ \forall s_{i}[[s_{i}\subset S\land\underset{i\geq 1}{\cup}s_{i}=s]\to s \subset S];\text{ and }\]  
\[(2)\ \forall s_{i}[[s_{i}\subset S\land\underset{i\geq 1}{\cap}s_{i}=s]\to s \subset S].\]  
**Proof:**  
(1) Let \(a\) be an element of \(s=\underset{i\geq 1}{\cup}s_{i}\), that is, \(a\in s\). There is at least one \(s_{i}\), so that \(a\) belongs to \(s_{i}\). Because \(a\in s_{i}\subset S\) and \(\forall a\in s,s\subset S\); (2) Let \(b\) be an element of \(s=\underset{i\geq 1}{\cap}s_{i}\), that is, \(b\in s\). For any \(s_{i}\), \(b\) belongs to \(s_{i}\). Because \(b\in s_{i}\subset S\) and \(\forall b\in s,s\subset S\). **4. Rules for Partial Model Extraction**  
The output of the partial model extraction method is the IFC file, so the file must comply with the IFC schema. During the extraction process, the proposed method is to process the original IFC model depending on rules for partial model extraction and then export the partial IFC model by integrating required model data.