A Generative Urban Space Design Method Based on Shape Grammar and Urban Induction Patterns

: This paper focuses on how to solve the demand of how to quickly explore more urban space design and layout in terms of the conservation and reuse of historical blocks under computer-aided design technology. Referring to urban inductive patterns, the author establishes an urban space design grammar of historical districts based on shape grammar and pattern language. It forms a complete generative urban space design method involving morphological analysis, rule-making, and scheme generation. Furthermore, taking the typical Russian-style historical block along the Chinese Eastern Railway—the historical district in front of Anda Station as an application example—this paper completed the generative urban space design process of block redevelopment and environmental reconstruction, which, using computer-aided technology, was under the premise of protecting the original historic block fabric. The ﬁnal two group results of the experimental plot and the other plots of the historical district show that this method can quickly and accurately generate lots of urban space design schemes that meet the designers’ pre-thinking, and these schemes can be modiﬁed by real-time calculation and interactive operation.


Background
Historic blocks, as the blocks that should be preserved in the process of urban development for displaying the historical traditions and ethnic characteristics, have been attracting extensive attention from scholars who have also been focusing on the proper renovation, renewal, and reuse of the traditional historic district based on protection [1]. The urban design space scheme for historic districts refers to the research on the protection, renovation, renewal, and reuse of historic districts. Each city may have a unique spatial form module, which is an important foundation and "morphological gene" for the formation of urban styles and features [2,3]. The analysis of its combination rules can avoid identical styles and features, strengthen the locality of planning and design, and exert a direct and profound influence on the final quality of urban areas.
Chinese Eastern Railway refers to the section of the Trans-Siberian Railway in China constructed by Tsarist Russia in 1896, stretching across the Heilongjiang Province, Jilin Province, Liaoning Province, and Inner Mongolia Autonomous Region [4]; it was the first railway in China connecting with a foreign country. Over the past one hundred years of operation, the towns and blocks formed along the railway have almost maintained their

Application of Shape Grammar in Historic District
Depending on the purpose of the study, the scope of the study of historic districts can be divided into the architectural level and the block/urban area level. The study at the architectural level contains the study of architectural elements, building facades, and architectural details. The research at the block/urban area level contains the study of urban, masses, and planning [18].
The application of shape grammar in the field of historical architecture originated from Stiny and Mitchell's decomposition analysis of the house shape of Villa Malcontenta, one of the villas in the Palladio series, in 1978, and the concept of prototype was developed on this basis [19]. Afterwards, scholars have conducted a series of research on this subject and gradually formed a typical research paradigm combining architectural typology and shape grammar. The research content includes the relationship between the functional layout of buildings and the shape relationship of building facades and component forms.  [20]. Jiang Wang et al., in 2021, performed shape induction and generation derivation for the functional layout and body block patterns of rural housing in China in response to user needs [21]. James Park et al., in 2019, presented a generative description of Mies van der Rohe's court design language in three-dimensional form and discussed its significance in the discourse of the courthouse building type.
The application of shape grammar in the field of block/urban area mainly focuses on the topological relationship of shapes at the levels of block, street, plot, building/courtyard, etc., and finally forms the rules of shape generation that can guide urban design. For example, Guoxin Ke, in 2017, investigated the morphological order of urban patterns in Beijing and Nanjing, China, through the use of shape grammar, which is particularly Land 2023, 12, 1167 3 of 21 helpful in revealing the complexity of urban morphology. The spatial layout of historic districts, which exhibits the stylistic features formed by the local economy, culture, politics and environment in a certain period of time, is the focus of research. However, there are still relatively few studies on shape grammar applied to historic districts with historical and cultural connotations [18]. Debora Verniz et al., in 2019, developed a parsing grammar for self-growing informal settlements in the favela Santa Marta, Brazil, including an analysis of building shapes and urban physical relationships to its later generation of an integrated grammar for planning new housing settlements to address certain local social, infrastructural, ecological, and urban issues [17]. Niloofar Zolghadarsli, in 2022, created a systematic approach to the analysis and generation of rural settlements in Iran [22]. In general, the application of shape grammar in historic districts needs to focus on combining cultural features with spatial morphological features. However, there are still relatively few studies on cultural analysis, digital transcreation, and digital management for historic districts, and their technical paths are not clear enough.

Improvement of Shape Grammar by Pattern Language and Urban Inducing Patterns
Pattern language, proposed by Alexander et al. in the late 1970s in combination with linguistics, typology, and architecture, is a unique architectural scene analysis method full of humanistic concern. In A Pattern Language: Towns, Buildings, Construction, Alexander summarized 253 architectural pattern languages involving towns, houses, and construction components [23]. For each pattern language, its structure is definite, but the semantics and editing ideas are open and highly extended without a unified model [24]. It means that each pattern is composed of a conditional judgment; when the judgment condition is met, the corresponding subsequent operations can be performed until they enter into the next pattern and judgment condition. In the field of urban space design. These judgment conditions can correspond to more complex semantic conditions and increase the structure and diversity of the entire algorithm for shape grammar during the generation process from a set of peculiar shapes.
Urban induction patterns (UIPs) is an urban design grammar developed by Duarte and Beirão in 2012 [15]. It's basic idea is that following contextual analysis, certain patterns would be triggered, forming a program for urban intervention, and then such patterns could be formalized in a flexible urban plan using shape grammar. Through different combinations of UIPs, urban space design schemes that meet different design requirements can be generated. In other words, the computer grammar of urban space design schemes can mirror the concept of the algorithm structure of pattern language, establishes a group of pattern language algorithm structures conforming to the ontology in the urban space design field, and edit each pattern with shape grammar, thus achieving the goal of a complete set of urban space design grammar.

Our Study
According to the above background, previous research, and relying on urban morphology and combining with actual project cases, this paper intends to establish an urban space design grammar based on shape grammar and pattern language to form a complete set of generative urban space design methods involving morphological analysis, rule-making, and scheme generation. The novelty of the proposed grammar is that it describes the redevelopment rules of the typical Russian-style historical blocks of the Chinese Eastern Railway and explains the idea of rebuilding the architectural environment from the surrounding urban environment and the original block texture. This is an innovative study in the urban space design of historical districts based on the classic urban morphology theory and computer programming-aided design technology.

Study Area
Anda Station, one of the eight initially set third-class stations of the Chinese Eastern Railway, was a major transportation center in the Heilongjiang Province at that time, from which, the grains were transported to Russia, Japan, and European countries; it also attracted a large number of Russians to settle here, and the distinctive Russian style was formed. There are many cultural relic protection units in the historic district in front of the station determined by the Anda Municipal Government, including 2 provincial and 62 municipal cultural preservation buildings in a Russian style (Figure 1) [4]. At present, the slums have been removed and cleared, and the block has ushered in a new opportunity for development and reusing. This study intends to renovate and reuse the buildings while protecting the cultural preservation buildings and road pattern of the original historic block, thus constructing a multifunctional Russian-style block integrating dining, shopping, entertainment, and accommodation. study in the urban space design of historical districts based on the classic urban morph ogy theory and computer programming-aided design technology.

Study Area
Anda Station, one of the eight initially set third-class stations of the Chinese Easte Railway, was a major transportation center in the Heilongjiang Province at that time, fro which, the grains were transported to Russia, Japan, and European countries; it also tracted a large number of Russians to settle here, and the distinctive Russian style w formed. There are many cultural relic protection units in the historic district in front of station determined by the Anda Municipal Government, including 2 provincial and municipal cultural preservation buildings in a Russian style (Figure 1) [4]. At present, slums have been removed and cleared, and the block has ushered in a new opportun for development and reusing. This study intends to renovate and reuse the buildin while protecting the cultural preservation buildings and road pattern of the original h toric block, thus constructing a multifunctional Russian-style block integrating dini shopping, entertainment, and accommodation. This study is conducted at three levels of the historic district, research base, and perimental plot ( Figure 2). Referring to the master planning, the range of the historic d trict in front of the station in Anda City is determined as about 215 hectares. Consideri the completeness of the historic district and surrounding urban areas, and combining w the layout of the primary and secondary trunk roads, two blocks at the east side of block concentrated with historic buildings (defined by the primary trunks) are expand as the range of this research base, with an area of about 310 hectares. According to evaluation of the development potential of the current land and the requirements for la use stipulated in the master planning, the core plot of the historic block covering an a of about 13 hectares is selected as the experimental plot. This study is conducted at three levels of the historic district, research base, and experimental plot ( Figure 2). Referring to the master planning, the range of the historic district in front of the station in Anda City is determined as about 215 hectares. Considering the completeness of the historic district and surrounding urban areas, and combining with the layout of the primary and secondary trunk roads, two blocks at the east side of the block concentrated with historic buildings (defined by the primary trunks) are expanded as the range of this research base, with an area of about 310 hectares. According to the evaluation of the development potential of the current land and the requirements for land use stipulated in the master planning, the core plot of the historic block covering an area of about 13 hectares is selected as the experimental plot.

Urban Space Design Grammar of Historic Districts
The urban space design grammar of historic districts is a specific computer language. It is designed for a specific urban space design ontology of the historical district, combined with the design goals-using the design rules of the shape elements of the ontology as the generating elements, through the grammar structure sequence that conforms to the design idea, the combination of UIPs, and the control parameters setting that meets the specification requirements and design principles-to generate the computer language of the urban space design scheme of the historical block that meets the set design goals ( Figure 3). Firstly, through describing the ontology for the urban space design of the historical district, the correctly defined field of urban space design of the historical district is used to clearly identify the objects of design, and correctly classify them by types, parts, and relationship, which is beneficial for performing structured research on the form and topological relationship of the design field, and creating the rules acting on these objects and relationships [25].
Design rule-making of shape elements is used to determine the object generation rules for the urban space design ontology through combining with the urban design

Urban Space Design Grammar of Historic Districts
The urban space design grammar of historic districts is a specific computer language. It is designed for a specific urban space design ontology of the historical district, combined with the design goals-using the design rules of the shape elements of the ontology as the generating elements, through the grammar structure sequence that conforms to the design idea, the combination of UIPs, and the control parameters setting that meets the specification requirements and design principles-to generate the computer language of the urban space design scheme of the historical block that meets the set design goals ( Figure 3).

Urban Space Design Grammar of Historic Districts
The urban space design grammar of historic districts is a specific computer language. It is designed for a specific urban space design ontology of the historical district, combined with the design goals-using the design rules of the shape elements of the ontology as the generating elements, through the grammar structure sequence that conforms to the design idea, the combination of UIPs, and the control parameters setting that meets the specification requirements and design principles-to generate the computer language of the urban space design scheme of the historical block that meets the set design goals ( Figure 3). Firstly, through describing the ontology for the urban space design of the historical district, the correctly defined field of urban space design of the historical district is used to clearly identify the objects of design, and correctly classify them by types, parts, and relationship, which is beneficial for performing structured research on the form and topological relationship of the design field, and creating the rules acting on these objects and relationships [25].
Design rule-making of shape elements is used to determine the object generation rules for the urban space design ontology through combining with the urban design Firstly, through describing the ontology for the urban space design of the historical district, the correctly defined field of urban space design of the historical district is used to clearly identify the objects of design, and correctly classify them by types, parts, and relationship, which is beneficial for performing structured research on the form and topological relationship of the design field, and creating the rules acting on these objects and relationships [25].
Design rule-making of shape elements is used to determine the object generation rules for the urban space design ontology through combining with the urban design ontology definition, the original shape element features of the ontology, and the design goals. In the editing of the urban space design grammar, the UIPs are taken as the specific editing algorithm of urban space design grammar. By mirroring the concept of pattern language algorithm structure, a group of pattern language algorithm structures conforming to the ontology of urban space design is built, and each pattern is edited in detail through shape grammar. The whole urban space design grammar consists of UIPs, which can be combined in different ways to generate different design schemes [26].
Parameters of urban space design grammar are mainly determined by shape induction of urban space design ontology, urban design principles, and design specification requirements. By determining the value and level of each type of parameter, the scheme is regulated and observed.
The structural sequences of the grammar can be determined based on the design idea, and the typical processes and decision-making sequence of urban space planning by the designers should be followed. Considering the spatial layout of the planning features of the historical district in front of the station in Anda City-such as the square block, the garden single-family style, and the symmetrical linear layout of the historic buildings ( Figure 4)-the "top-down" design idea is adopted in this paper. Figure 5 depicts the designer's decision-making process: (1) Whether to divide the road network; (2) Where to divide new urban roads; (3) Where are the visual focal points of the block? (4) Where is the main pedestrian path generated? (5) Where is the square generated? (6) How to divide the building plots; (7) How to generate the building base; (8) How to determine the building height; and (9) How to calculate the main economic indicators. ontology definition, the original shape element features of the ontology, and the desi goals.
In the editing of the urban space design grammar, the UIPs are taken as the speci editing algorithm of urban space design grammar. By mirroring the concept of patte language algorithm structure, a group of pattern language algorithm structures confor ing to the ontology of urban space design is built, and each pattern is edited in det through shape grammar. The whole urban space design grammar consists of UIPs, whi can be combined in different ways to generate different design schemes [26].
Parameters of urban space design grammar are mainly determined by shape indu tion of urban space design ontology, urban design principles, and design specificati requirements. By determining the value and level of each type of parameter, the schem is regulated and observed.
The structural sequences of the grammar can be determined based on the design id and the typical processes and decision-making sequence of urban space planning by t designers should be followed. Considering the spatial layout of the planning features the historical district in front of the station in Anda City-such as the square block, t garden single-family style, and the symmetrical linear layout of the historic buildings (F ure 4)-the "top-down" design idea is adopted in this paper. Figure 5 depicts the d signer's decision-making process: (1) Whether to divide the road network; (2) Where divide new urban roads; (3) Where are the visual focal points of the block? (4) Where the main pedestrian path generated? (5) Where is the square generated? (6) How to divi the building plots; (7) How to generate the building base; (8) How to determine the bui ing height; and (9) How to calculate the main economic indicators.

Workflow and Steps
Except for pre-analysis and design goals with strong subjectivity that cannot be r placed, other tasks can be assisted by urban space design grammar. Therefore, this stud is divided into four steps: (1) Data analysis and determination of design goals: Sorting out and analyzing the ori inal data of the block as the thought organizing before determining the desig scheme, and determining the design goal of the case in combination with the mast planning and case reference; (2) Determination of the urban space design ontology of the historic district: Structural defining the objects, types, parts, and relationships in the urban space design field

Workflow and Steps
Except for pre-analysis and design goals with strong subjectivity that cannot be replaced, other tasks can be assisted by urban space design grammar. Therefore, this study is divided into four steps: (1) Data analysis and determination of design goals: Sorting out and analyzing the original data of the block as the thought organizing before determining the design scheme, and determining the design goal of the case in combination with the master planning and case reference; (2) Determination of the urban space design ontology of the historic district: Structurally defining the objects, types, parts, and relationships in the urban space design field of the case historical district; (3) Feature extraction of original shape elements of the urban space design ontology of the historic district: extracting morphological and topological relationships of each object and between objects according to the definition of the urban space design ontology of the case historic district; (4) Editing and application of the urban space design grammar of the historic district: Determining new shape design rules as the generation elements in combination with the characteristics of ontology shape elements and design principles for completing grammar editing and scheme generation assisted based on grammatical structure sequence conforming to the design idea, combination of multiple UIPs, and setting of control parameters.

Operating Software Selection
Furthermore, City Engine and Rhino are the most widely used operating software based on Shape Grammar; compared with City Engine with weaker capabilities of processing curve models and a higher threshold for the corresponding CGA (computer generated architecture) language tool, Rhino has a stronger model processing capability and the corresponding Grasshopper visual language tool is more friendly to general designers. In this paper, therefore, Rhino and its parametric plug-in program Grasshopper are used as the software platforms for the implementation of the entire grammar.

Preprocessing Information
Organized are the current environmental elements around the experimental plot and the current environmental elements preserved inside the experimental plot. The current environmental elements of the curb line, road red line, road center line, railway line, railway wall, current buildings, and historical buildings were imported into the Rhino platform in layers. At the same time, the scope of the street outline of the experimental plot and the current historical buildings reserved within the historical district were input into the Grasshopper platform as preconditions.
Through sorting out the conditions of land and facilities, topography, and historic buildings, the designability indicators were quantified and converted into initial design conditions. The positions of certain entrances and exits along the pedestrian path in the experimental plot were determined according to the conditions of land and facilities; the site construction conditions were identified according to the topography, and this experimental plot had minor changes in elevation, slope, and inclination. Therefore, the topographic factors were not included in this design; the functions after renovation and reuse were determined based on the conditions of the historic buildings, such as their distribution, functions, and protection situation.

Ontology for Urban Space Design of the Historical District
Referring to the definition of urban space design ontology proposed by Beirão [26], the classification structure of the development of urban space design in the historical district of this case is determined, which is divided into eight main systems ( Figure 6), including: street network system, built system, property system, natural system, focal points system, public space system, activity system, and charming system. Each system was composed of object classes, which were organized according to their relationship.  Figure 6. The improved ontology for urban space design of the historical district [26] (represents primary relationships between objects of a class. Represents the secondary relationships betw objects of a class).
Refined and adjusted, the system objects of the urban space design ontology p posed by Beirão are according to the characteristics, design objectives, and specific dev opment strategies of the case historic district. These include: (1) according to the distri tion and development requirements of historic buildings in the block, in the "prope system", the "building plots" were subdivided into two types of plots-"historic comm cial building plot", which contains historic buildings, and "independent commer building plot", which does not contain historical buildings. (2) Combined with the ch acteristics of the linear and symmetrical layout of single-family buildings in the origi Russian style blocks, in the "natural system", the "spatial layout of historic commer Figure 6. The improved ontology for urban space design of the historical district [26] (represents the primary relationships between objects of a class. Represents the secondary relationships between objects of a class).
Refined and adjusted, the system objects of the urban space design ontology proposed by Beirão are according to the characteristics, design objectives, and specific development strategies of the case historic district. These include: (1) according to the distribution and development requirements of historic buildings in the block, in the "property system", the "building plots" were subdivided into two types of plots-"historic commercial building plot", which contains historic buildings, and "independent commercial building plot", which does not contain historical buildings. (2) Combined with the characteristics of the linear and symmetrical layout of single-family buildings in the original Russian style blocks, in the "natural system", the "spatial layout of historic commercial buildings" under the "site morphology" was subdivided into "single-family" architectural spatial layout that continues the single-family linear layout, and the "combined" architectural spatial form layout of small plots of infill development around the historic buildings. Combined with the spatial layout characteristics of grouped architectural forms of modern typical Russian commercial development blocks, the "spatial layout of independent commercial building blocks" under the "site morphology" was subdivided into larger blocks and groups of "courtyard" architectural spatial layout. (3) According to the principle of pedestrian attraction of the theme block, in the "public space system" the "square" was further subdivided into "entrance square", "node square", and "central square". (4) Paid attention to the reasonable update of the existing use functions of historical buildings; in the "activity system", added "function conversion" and "composite use" object classes under "building use", in addition to "building density". This paper mainly focuses on the issues related to the early space organization of urban space design, so it did not involve the details of "building facade constraints" and "materials" proposed by Beirão for "city charisma system".

Extraction of Original Shape Elements Features
According to the urban space design ontology of the historical district determined above (Figure 1), the shape element features of the street system, built system, property system, natural system, focal points system, public space system, activity system, and charming system were extracted and taken as the basic considerations of the urban space design rules.
As shown in Figure 7, based on the shape type definition of the "street system" in the urban space design ontology of the historical block specified in Figure 6, relevant shape element features were extracted. Firstly, according to the "street nomenclature", streets were divided into three levels: main road, secondary truck road, and branch road. Secondly, the quantitative data of shape features, such as "number of street nodes", "nodes density", "crossroad types", and "interval", for different levels of roads under the "street axis network" object were clarified. Thirdly, the quantitative data of shape features, such as "street section mode", "street width", and "street section composition", for different levels of roads under the "transport network" object were clarified. larger blocks and groups of "courtyard" architectural spatial layout. (3) According to the principle of pedestrian attraction of the theme block, in the "public space system" the "square" was further subdivided into "entrance square", "node square", and "central square". (4) Paid attention to the reasonable update of the existing use functions of historical buildings; in the "activity system", added "function conversion" and "composite use" object classes under "building use", in addition to "building density". This paper mainly focuses on the issues related to the early space organization of urban space design, so it did not involve the details of "building facade constraints" and "materials" proposed by Beirão for "city charisma system".

Extraction of Original Shape Elements Features
According to the urban space design ontology of the historical district determined above (Figure 1), the shape element features of the street system, built system, property system, natural system, focal points system, public space system, activity system, and charming system were extracted and taken as the basic considerations of the urban space design rules.
As shown in Figure 7, based on the shape type definition of the "street system" in the urban space design ontology of the historical block specified in Figure 6, relevant shape element features were extracted. Firstly, according to the "street nomenclature", streets were divided into three levels: main road, secondary truck road, and branch road. Secondly, the quantitative data of shape features, such as "number of street nodes", "nodes density", "crossroad types", and "interval", for different levels of roads under the "street axis network" object were clarified. Thirdly, the quantitative data of shape features, such as "street section mode", "street width", and "street section composition", for different levels of roads under the "transport network" object were clarified.

Setting of Control Parameters
The parameters of the urban space design grammar of the historical districts were generally set based on the generalization of the shape elements of the urban space design ontology, and the design requirements and regulations ( Table 1). The parameters derived from the requirements in the regulations were hard parameters, which cannot be modified; while the parameters derived from the generalization of shape elements of the urban space design ontology and the design requirements were soft parameters, which can be modified. Furthermore, the value range and selection of fixed values were determined for  The parameters of the urban space design grammar of the historical districts were generally set based on the generalization of the shape elements of the urban space design ontology, and the design requirements and regulations ( Table 1). The parameters derived from the requirements in the regulations were hard parameters, which cannot be modified; while the parameters derived from the generalization of shape elements of the urban space design ontology and the design requirements were soft parameters, which can be modified. Furthermore, the value range and selection of fixed values were determined for each type of parameter. Finally, the parameter level was set according to the principle of operability, and the concise and specific parameters were selected as the primary parameters for facilitating other designers or non-professionals to control and observe the schemes; other parameters were set as secondary or tertiary parameters according to the requirements of programming ( Table 2).

Development of Design Grammar Rules of New Shape Element
According to the object definition of the urban space design ontology and the design requirements and regulations, from the object classification of the network, built, property, nature, focal points, public space, activity, charisma, and other systems, different objects and the form generation rules between objects were defined ( Figure 6).
Similarly, as shown in Table 3, based on the shape type definition of the "street system" in the urban space design ontology of the historical block specified in Figure 6, the control parameters, and the design requirements and regulations, relevant design grammar rules of new shape elements were developed. Firstly, according to the "Street nomenclature", streets were divided into three levels: main road, secondary truck road, and branch road. Secondly, the shape grammar rules of "axis interval" and "axis intersection" were formulated. Among them, "axis interval" included "transverse interval" and "longitudinal interval", and "axis crossing" included "T-shape acrossing" and "X-shape acrossing". Thirdly, shape grammar rules for "street description", "street components", and "street intersection" were established. Among them, "street description" included "A slab road section form", "two slab road section form", "three slab road section form", and "four slab road section form". "Street components" implemented specific quantitative parameters according to the provisions of "street description". "Street intersection" included "red line intersection", "curb line intersection" under "x-shaped intersection" and "T-shaped intersection". Table 3. Grammar rules of the street system for the urban space design of the historical district in front of the station in Anda City (part).

T-Shape Acrossing X-Shape Acrossing
Main road        Table 3. Grammar rules of the street system for the urban space design of the historical district in front of the station in Anda City (part).

Street Nomenclature
Axial Network

Interval (m) Axial Intersection T-Shape Acrossing X-Shape Acrossing
Main road

Secondary trunk road
Branch road

Main road
A slab road section form Two slab road section form Three slab road section form Table 3. Grammar rules of the street system for the urban space design of the historical district in front of the station in Anda City (part).

Street Nomenclature
Axial Network

Interval (m) Axial Intersection T-Shape Acrossing X-Shape Acrossing
Main road

Secondary trunk road
Branch road

Main road
A slab road section form Two slab road section form Three slab road section form Table 3. Grammar rules of the street system for the urban space design of the historical district in front of the station in Anda City (part).

Street Nomenclature
Axial Network

Determination of Grammatical Structure Sequence
According to the previous introduction, a "top-down" design sequence was adopted to organize the grammar of the urban space design for this historical block, which specifically included five steps: road generation, public space generation, plots subdivision, building base generation, and mass analysis control.

Formulation of Urban Induction Patterns
Based on the rules of shape generation, 11 types of UIPs grammar were formed in line with the designer's "top-down" decision-making ideas. It included "Geographic information import patterns, Main composition patterns, Grid Patterns, Filter-based patterns, Site subdivision patterns, Pedestrian path patterns, Square patterns, Building setback patterns, Building combination patterns, Planning control patterns, Basic analysis patterns ", and so on.
"Geographic information import patterns" were mainly used to import the information and geometry available in the geographic database, including a building information import (ImportBuildings), a road centerline import (ImportStreetCenterLines), a road composition information import (ImportStreetSurfaces), corresponding data import (ImportStatisticSub Sections), and other sub-patterns.
"Main composition patterns" were mainly used to assist the designer to manually define the specific location of key elements of the subjective judgment of important streets, visual focal points, landmarks, etc.
"Grid Patterns" were mainly used to generates grid street centerlines and components. It included: generating orthogonal grids in a given area (OrthogonalGrid), merging grids that make two street grids intersect (MergeGrids), generating street components (StreetComponents), and other sub-patterns.
"Filter-based patterns" were mainly used to filter the shape and area conditions of a given street grid or plot, including SquareBlock, such as rectangles, squares, and squar blocks with regular polygon blocks were obtained after the screening. Exceptionalblocks with triangles and blocks with very small acute angles were obtained after the screening. IgnoreS-mallBlocks whose area was less than a certain threshold was selected, and ScaleLevelBlocks whose area was in different interval values was selected.
"Site subdivision patterns" were mainly used to further subdivide a given block into smaller plots. It included: VerticalLongestEdge Subdivision, which was subdivided perpendicular to the longest edge of the input block; ParallelDirection Subdivision, which was subdivided according to the parallel direction of the specified direction; and VerticalDirection Subdivision, which was subdivided based on the vertical direction of a specified direction.
"Pedestrian path patterns" were mainly used to generate the main pedestrian path within a given block. It included DirectPath, which was a straight path that connected a point to a destination, and MergePath, which was an intersection grid that made two pedestrian paths intersect and other sub-patterns.
"Square patterns" were mainly used to generate squares at designated generation points and connect them spatially with the main pedestrian paths. It included SquareGeneration OfStartingPointOfBoundary, SquareGeneration OfStartingPointOfAxis, SquareGeneration OfKneePointOfBoundary, SquareGeneration OfCrossingPointOfAxis, IntersectionSpaceConnection, DifferenceSpaceConnection, and other sub-patterns.
"Building setback patterns" were mainly used to generate the corresponding building setback control line for a given block or plot according to the building setback requirements of the adjacent urban road level, plot, public space, etc.
"Building Combination Patterns" were mainly used to generate the corresponding building combination results according to the building combination rule settings. It included: directly generating the corresponding building profile through regressive generation (RegressiveGeneration), generating the linear generation of linear arrangement building profile (BackwardPermutation Generation), generating the L-shaped building composite profile segmentation generation (SegmentationGeneration), and generating the courtyard enclosed building composite profile segmentation generation (CircumscribedGeneration).
"Planning Control Patterns" were mainly used to plan and control a specific grid, block, or building elements according to the set conditions. It included HeightBasedDistribution, HeightWidthDistribution, CoverageBasedDistribution, PlotRatioControl, and BuildingMixedUse-FunctionControl.
"Basic Analysis Patterns" were mainly used to provide real-time performance information and economic indicators for generating design.
For example, Figure 8 shows the grammatical structure of OrthogonalGrid for the main road in Grid Patterns. This UIPs grammar pattern was used to generate a set of orthogonal red line grids that conform to the requirements for setting the red line of the main road. The left side of the figure shows the input criteria for the UIPs: original road red lines and intersections; in the middle, it shows the syntactical organization structure conforming to the design semantics, which is controlled by the design rules of the different new shape elements mentioned above (Rules 1-6) and different generation conditions (interval, generation direction, intersection type and intersection angle of the newly generated road red line). The right side shows a diagram of some of the shape elements that can be generated by changing the OrthogonalGrid grammar pattern. profile segmentation generation (SegmentationGeneration), and generating the courtyard enclosed building composite profile segmentation generation (CircumscribedGeneration). "Planning Control Patterns" were mainly used to plan and control a specific grid, block, or building elements according to the set conditions. It included HeightBasedDistribution, HeightWidthDistribution, CoverageBasedDistribution, PlotRatioControl, and Building-MixedUseFunctionControl.
"Basic Analysis Patterns" were mainly used to provide real-time performance information and economic indicators for generating design.
For example, Figure 8 shows the grammatical structure of OrthogonalGrid for the main road in Grid Patterns. This UIPs grammar pattern was used to generate a set of orthogonal red line grids that conform to the requirements for setting the red line of the main road. The left side of the figure shows the input criteria for the UIPs: original road red lines and intersections; in the middle, it shows the syntactical organization structure conforming to the design semantics, which is controlled by the design rules of the different new shape elements mentioned above (Rules 1-6) and different generation conditions (interval, generation direction, intersection type and intersection angle of the newly generated road red line). The right side shows a diagram of some of the shape elements that can be generated by changing the OrthogonalGrid grammar pattern.  Figure 9 shows the process of generating a road axis grid using different combinations of UIPs for the experimental plot in the historic district. Firstly, the shape element conditions for generating the road grids were extracted and input. Secondly, the generation conditions were judged by fiter-based patterns to determine whether further grid generation was performed, and which road class grid was generated. Thirdly, the road grid axis generation was performed by the combination of Main composition patterns and automatic Grid Patterns. In particular, Main composition patterns were used to generate road axis grids by specifying new grid axis intersections, and different results were obtained by adjusting the intersection angle control parameters. Automatic Grid Patterns were used to  Figure 9 shows the process of generating a road axis grid using different combinations of UIPs for the experimental plot in the historic district. Firstly, the shape element conditions for generating the road grids were extracted and input. Secondly, the generation conditions were judged by fiter-based patterns to determine whether further grid generation was performed, and which road class grid was generated. Thirdly, the road grid axis generation was performed by the combination of Main composition patterns and automatic Grid Patterns. In particular, Main composition patterns were used to generate road axis grids by specifying new grid axis intersections, and different results were obtained by adjusting the intersection angle control parameters. Automatic Grid Patterns were used to generate road axis grids by determining new grid axis intersections with built-in shape rule requirements. The result generated by the combination of Main composition patterns and automatic Grid Patterns was the result generated by the road axis grid of the experimental plots of the historic blocks. generate road axis grids by determining new grid axis intersections with built-in shape rule requirements. The result generated by the combination of Main composition patterns and automatic Grid Patterns was the result generated by the road axis grid of the experimental plots of the historic blocks.

Model Generation
Generally speaking, the urban design scheme can be generated by combining the 11 types of UIPs grammar. According to the specific conditions, the blocks can be divided into the historical commercial blocks (including historical buildings) and independent commercial blocks (excluding historical buildings); the UIPs grammars can be edited and combined according to the design goals of each plot, thus controlling the generation of the respective site planning schemes ( Figure 10).

Model Generation
Generally speaking, the urban design scheme can be generated by combining the 11 types of UIPs grammar. According to the specific conditions, the blocks can be divided into the historical commercial blocks (including historical buildings) and independent commercial blocks (excluding historical buildings); the UIPs grammars can be edited and combined according to the design goals of each plot, thus controlling the generation of the respective site planning schemes ( Figure 10).

Scheme Comparison
By editing the Grasshopper indicators generation grammar module with the generation model, the users can realize real-time monitoring of the overall indicator or specific indicators at the interfaces of Rhino and Grasshopper (Figure 11). The linkage setting of the variable control parameters and control random numbers at the Grasshopper interface can facilitate the users to adjust control parameters and generate different schemes. Mean- Figure 10. The schemes generation of the urban space design grammar for the historical district in front of the station in Anda City [4].

Scheme Comparison
By editing the Grasshopper indicators generation grammar module with the generation model, the users can realize real-time monitoring of the overall indicator or specific indicators at the interfaces of Rhino and Grasshopper ( Figure 11). The linkage setting of the variable control parameters and control random numbers at the Grasshopper interface can facilitate the users to adjust control parameters and generate different schemes. Meanwhile, the users can change the original design parameters according to the obtained results, thus modifying the urban space design schemes. At the initial stage of design, the designers can intuitively note the relationship tween indicators and architectural forms and set different initial conditions under same one or several control random numbers to generate schemes for different archit tural forms and indicators ( Figure 12). For example, the designers can select an approp ate scheme from those generated in the same pedestrian public space with different p subdivisions, building combination methods, and building heights by observing changes in indicators; or, they can further observe the subtle changes in the indicators a the rationality of the scheme in the same pedestrian public space, under the same p subdivision, and with different building combination methods and building heights. At the initial stage of design, the designers can intuitively note the relationship between indicators and architectural forms and set different initial conditions under the same one or several control random numbers to generate schemes for different architectural forms and indicators ( Figure 12). For example, the designers can select an appropriate scheme from those generated in the same pedestrian public space with different plot subdivisions, building combination methods, and building heights by observing the changes in indicators; or, they can further observe the subtle changes in the indicators and the rationality of the scheme in the same pedestrian public space, under the same plot subdivision, and with different building combination methods and building heights.
In such a process, the designers can better adjust the indicators and scheme details under general design estimates without repeated design and calculation, which is generally important for actual projects. The final results can also be taken as a reference for further design and rendering. tural forms and indicators ( Figure 12). For example, the designers can select an approp ate scheme from those generated in the same pedestrian public space with different p subdivisions, building combination methods, and building heights by observing changes in indicators; or, they can further observe the subtle changes in the indicators a the rationality of the scheme in the same pedestrian public space, under the same p subdivision, and with different building combination methods and building heights. In such a process, the designers can better adjust the indicators and scheme deta under general design estimates without repeated design and calculation, which

Expand Application
As for the grammar itself, benefiting from the plot characteristics and regional features of the case blocks, the overall methodology can be applied to other similar plots of local and similar historic blocks along the Chinese Eastern Railway. Figure 13 represents the results of the expanded application of this methodology in the entire historical district in front of Anda Station. From the results of other plots in the historical district, satisfactory results can still be achieved. Similarly, the designer can get the index result intuitively and obtain the results of more detailed generated schemes by comparing the schemes under the same one or several control parameters. generally important for actual projects. The final results can also be taken as a reference for further design and rendering.

Expand Application
As for the grammar itself, benefiting from the plot characteristics and regional features of the case blocks, the overall methodology can be applied to other similar plots of local and similar historic blocks along the Chinese Eastern Railway. Figure 13 represents the results of the expanded application of this methodology in the entire historical district in front of Anda Station. From the results of other plots in the historical district, satisfactory results can still be achieved. Similarly, the designer can get the index result intuitively and obtain the results of more detailed generated schemes by comparing the schemes under the same one or several control parameters.

Discussion and Conclusions
Referring to the mode of UIPs, this paper establishes an urban space design grammar of historical districts based on shape grammar and pattern language. It forms a complete set of generative urban space design methods involving morphological analysis, rulemaking, and scheme generation. The methods have been applied to the typical historical district along the Chinese Eastern Railway-the historical district in front of Anda Station.

Discussion and Conclusions
Referring to the mode of UIPs, this paper establishes an urban space design grammar of historical districts based on shape grammar and pattern language. It forms a complete set of generative urban space design methods involving morphological analysis, rulemaking, and scheme generation. The methods have been applied to the typical historical district along the Chinese Eastern Railway-the historical district in front of Anda Station. Through verification, it can be confirmed that with the assistance of urban space design grammar of historical districts, a large number of solutions complying with the expected goals can be generated in a short time and an intuitive 3D model effect can be obtained. Furthermore, with the real-time interactive operation interface, the designers can adjust the morphological details of each scheme by monitoring the index. This operation is also convenient for non-professionals.
The main contributions of this work are: (1) using morphological and statistical methods, geometric parameters, and topological rules of spatial shape elements based on a typical Russian historic district of the Chinese Eastern Railway were analyzed. (2) Using formal methods, a grammar program library is established based on the redevelopment of the architectural environment under the surrounding urban environment and the original historical block texture. (3) Referring to the typical thinking mode of designers, an application and decision-making workflow is established in line with the core demands of historical block protection and reuse. (4) Through practical case application, important strategies for preserving regional characteristics and reusing typical Russian historic districts in the Chinese Eastern Railway were provided.
In the process of formulating grammar rules, precision control and data simplification are carried out for the selection of specific values of control parameters in order to reduce the total amount of program calculation. It can obtain the result of approximately varying urban space design scheme generation results. According to the generated results under the simplified control parameter values, the generated scheme is still comparable to the traditional manual scheme in terms of detail level, geometric accuracy, and spatial quality. These are visualization results that greatly improve planning efficiency. In addition, they can facilitate effective early decision-making discussions among the government, the design team, and local citizens.
At the same time, based on the characteristics of the original blocks and different redevelopment themes, more possibilities of building layouts are expanded. This paper, respectively, provides a "single-family" building layout that combines the layout of the original historic buildings, a "combined" architectural space layout pattern around the small infill development plot of historic buildings, and a grouped "courtyard" architectural space layout pattern of independent commercial building blocks. This gives designers more choice and flexibility.
In this paper, the results of preliminary research on the generative historic district urban space design method are presented. Given the large number of schemes generated under parameter control, it is necessary to focus on analysis and selection in future work. This future work will take the currently developed grammar as the basis. The comparison and screening of such schemes can provide a set or several sets of schemes complying with the expected goals for the designers or local governments. At the same time, the generative design process of urban space reflected in this paper does not consider cost, safety, or environmental impact for the time being, which can also be integrated into the subsequent program analysis and selection. The overall research method relies heavily on software tools such as Rhino and Grasshopper. Although there are specially designed operation interfaces, there is still a certain threshold for non-professionals to further improve the program. In addition, the application scope of the program developed in this paper is limited and only applicable to historic districts, but other types of urban spatial generative design can still use its research ideas for reference.