CN103645929B - Construction costs calculates Complied executing device and the compiling implement method describing language BCL - Google Patents

Construction costs calculates Complied executing device and the compiling implement method describing language BCL Download PDF

Info

Publication number
CN103645929B
CN103645929B CN201310687744.0A CN201310687744A CN103645929B CN 103645929 B CN103645929 B CN 103645929B CN 201310687744 A CN201310687744 A CN 201310687744A CN 103645929 B CN103645929 B CN 103645929B
Authority
CN
China
Prior art keywords
bcl
node
value
data
expression formula
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201310687744.0A
Other languages
Chinese (zh)
Other versions
CN103645929A (en
Inventor
廖成慧
万慧建
欧阳强
郝海风
于雪
刘梦清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
JIANGXI BOWEI NEW TECHNOLOGY CO LTD
Original Assignee
JIANGXI BOWEI NEW TECHNOLOGY CO LTD
Filing date
Publication date
Application filed by JIANGXI BOWEI NEW TECHNOLOGY CO LTD filed Critical JIANGXI BOWEI NEW TECHNOLOGY CO LTD
Priority to CN201310687744.0A priority Critical patent/CN103645929B/en
Publication of CN103645929A publication Critical patent/CN103645929A/en
Application granted granted Critical
Publication of CN103645929B publication Critical patent/CN103645929B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

Construction costs calculates Complied executing device and the compiling implement method describing language (BCL), including: construction costs calculates and describes language BCL, algebraic expression and the extended arithmetic expression formula structure of concrete computational algorithm rule are described by design, i.e. EL expression formula and analysis project cost calculate demand, determine that other calculating logical block in addition to EL expression formula is constituted;Construction costs calculates the Complied executing device describing language (BCL), including: BCL compiler apparatus, BCL script resolver and BCL actuator apparatus;Construction costs calculates the compiling implement method describing language (BCL).The present invention can reduce really expense calculate process, it is easy to the contents such as user the generation process and the Data Source that intuitively browse expense, in addition, described BCL script resolver provides the mutual translation function between BCL object set and BCL script file, realize once generating being performed a plurality of times, thus be effectively improved execution efficiency.

Description

Construction costs calculates Complied executing device and the compiling implement method describing language BCL
Technical field
The invention belongs to construction costs and calculate field, be specifically related to a kind of construction costs and calculate the compiling describing language BCL Perform device and compiling implement method, it is achieved construction costs calculates and reduces expense calculating process and carries out visual verification.
Background technology
Calculate and describe the programming language that language is a kind of extension type expanded by standard algebra formula or algebraic expression group, It meets the requirement of certain syntax, it is possible to for solving the computational problem of various application.It is different from other field, construction costs Calculating of field proposes new demand to calculating description language.First, it is the biggest that construction costs calculates data amount, and respectively The precision of demands differs.There is born precision problem, gesture in the floating point arithmetic that existing construction costs computational methods use Error in data must be formed, cause being difficult to tackle strict expense audit.Secondly, construction costs calculating data possess level with individual Other property, determines and cannot meet demand with simple mathematical expression formula for the existing calculation guided, and design possesses certain knot The calculating logical block of structure and rule is imperative.
At present, the existing description language that calculates designs for general-purpose computations demand, it is impossible to reply construction costs calculates demand. It is as uniquely calculating logical block using expression formula, and calculation process is represented by the expression formula sequence with exact sequence.Face to face When facing the calculating demand of big data quantity or complicated algorithm, it is difficult to intuitivism apprehension calculates process, and easily causes error.Meanwhile, by In the existing Complied executing device describing language that calculates after receiving and processing computation requests, only output result of calculation value, and count Calculation process and process data cannot embody, cause user can not the correctness of visual verification data, expense auditing inconvenience.
Summary of the invention
It is desirable to provide a kind of easy to use and perform efficient construction costs calculate describe language BCL compiling Perform device and compiling implement method, it is achieved while meeting complex engineering cost calculating demand, effectively record and reduce work Journey cost calculates process, and solving result of calculation correctness cannot visual verification problem.
Described construction costs calculates and describes language BCL, and it can have development language unrelated independent of different product, project Property and platform-neutral.It realizes process and includes:
(1) design describes algebraic expression and extended arithmetic expression formula structure, i.e. the EL expression formula of concrete computational algorithm rule;
Described EL expression formula be to computational algorithm rule a complete description, using $ with } as starting and ending labelling; It is supported for comprising the condition Selecting operation that multiple expression formula selects while following tradition algebraic expression computing feature With complete the functional operation of concrete computation rule in other interior high level operations function.Different from tradition algebraic operation, described EL Expression formula comprises the operand of kind diversification, supports the types such as numerical value, character string and variable, wherein, types of variables operand Being that described EL expression formula supports that the typical case of dynamic data mounting embodies, its value can be quoting of external object, it is also possible to for holding The concrete data value of row phase sets;
Described condition select expression formula using #{ and as starting and ending labelling, comprise inside it multiple conditional branching and At most one default condition branch, the corresponding EL expression formula of each branch, whole condition selects the value of expression formula to be current The EL expression formula result of calculation that the conditional branching that is activated is corresponding, such as:
Described functional operation defines concrete computation rule, to meet construction costs specific calculation demand;Its grammer is tied Structure is compatible with C language, and supports the growth data type of BCL;In addition, calling of described function is also supported EL expression formula Input as parameter, it is possible to realize the dynamic binding specifying project data scope with EL expression formula, and then reduce expression formula Code redundancy, syntax format is:
Sum (data source labelling, data source packaging name,?EL expression formula);
(2) analysis project cost calculates demand, determines other calculating logical block in addition to EL expression formula;
By to costing engineering data and computational algorithm, the summary and induction of process, show that the construction costs of any engineering is multiple Miscellaneous computational algorithm all can be analyzed to the atom computing logical block of minimum, it may be assumed that EL expression formula, macro sheet, variable, parameter, data source And bag.Wherein, described macro sheet can completely represent one there is recurrence, multi-field, the calculating that records more, have the relation of collecting are advised Then.Described data source is for describing data and the scope of data thereof of an engineering, and it is the bonding of Burroughs Common Language and project data Agent, it is achieved the transmission of truthful data.Described variable is to comprise data source, data filtering algorithm and expense computational algorithm rule to exist In concrete expense computation structure, compare with the parameter only comprising concrete numerical value for, the calculating of variable has certain priority time Sequence, increasingly complex, but powerful.Described bag is the container of other atom computing logical block, can delimit calculating logical block Sphere of action, shield naming conflict.
Calculating based on above-mentioned construction costs and describe language BCL, for realizing the purpose of the present invention, technical solution of the present invention is:
A kind of construction costs calculates the Complied executing device describing language BCL, including: BCL compiler apparatus, BCL script Resolver and BCL actuator apparatus.
Described BCL compiler apparatus is compiled processing for the BCL element to be calculated inputted to external world, and formation comprises The BCL object of BCL syntax tree structure.Internal procedure relates to engineering reactor module, engineering-environment module, project file parsing mould Block, engineering syntax Analysis Module and analysis context module.Wherein, BCL element to be calculated is generated by project file parsing module, It is delivered to engineering syntax Analysis Module.According to the difference of BCL element type, control the compiling of BCL element, obtain the most to be calculated EL expression formula set, described EL expression formula be to computational algorithm rule a complete description, using $ with } as starting and ending Labelling;Described EL expression formula comprises the operand of kind diversification, supports the types such as numerical value, character string and variable, wherein, variable Type operations number is typical case's embodiment that described EL expression formula supports dynamic data mounting, and its value can be quoting of external object, Can also be for performing the concrete data value of phase sets;
The most hereafter under the assistance of module, it is carried out morphology and syntactic analysis, generate and be referred to as BCL syntax tree Memory object, and be associated with in corresponding BCL object.
Wherein, described BCL element is minimum unit to be calculated, and inside comprises the EL expression formula collection describing computational algorithm rule Close.Corresponding with the atom computing logical block in Burroughs Common Language system, BCL element at least should comprise BCL bag element, BCL variable Element, BCL macro sheet element, BCL record element, BCL field element, BCL param elements and BCL data source element seven kinds.Wherein, BCL bag element exists as the container of other element, does not possess value expression.And BCL variable element comprises BCL data source element Object, filter expression and value expression, by performing filter expression, can screen formation qualified from Data Source Scope of data, is applied in the middle of the calculating process of its value expression.
Described BCL script resolver contains BCL script file maker and script resolver, is used for realizing BCL pair As the mutual conversion between set and BCL script file, it is possible to BCL object is specified in effectively record or reduction, it is to avoid at same meter Repeat process of compilation under calculation demand, effectively reduce construction costs and calculate the time.
Described BCL actuator apparatus, after compiled process, explains the BCL object performing to generate, by process data and Result of calculation is respectively stored in the middle of BCL syntax tree node and BCL object.Need inside BCL actuator apparatus to comprise BCL object meter Calculate module, node computing module, run context module, function registration device module and data packaging module.Wherein, BCL object Computing module controls the explanation of BCL object and performs process, utilizes the node computing module BCL grammer to comprising inside BCL object Each node in tree calculates, and by calculating process and process data recording in the middle of each node, and then obtains and calculate knot Really data, complete execution task.
A kind of construction costs calculates the compiling implement method describing language BCL, and its step is as follows:
The first step: analyze BCL element, obtain EL expression formula set to be calculated;
Described EL expression formula be to computational algorithm rule a complete description, using $ with } as starting and ending labelling; Described EL expression formula comprises the operand of kind diversification, supports the types such as numerical value, character string and variable, wherein, types of variables Operand is typical case's embodiment that described EL expression formula supports dynamic data mounting, and its value can be quoting of external object, it is possible to Think the concrete data value performing phase sets;
While following tradition algebraic expression computing feature, EL expression formula comprises multiple condition and selects the bar of expression formula Part Selecting operation and the functional operation completing concrete computation rule;
Described condition select expression formula using #{ and as starting and ending labelling, comprise inside it multiple conditional branching and At most one default condition branch, the corresponding EL expression formula of each branch, whole condition selects the value of expression formula to be current The EL expression formula result of calculation that the conditional branching that is activated is corresponding, such as:
Described functional operation defines concrete computation rule, to meet construction costs specific calculation demand;Its grammer is tied Structure is compatible with C language, and supports the growth data type of BCL;In addition, calling of described function is also supported EL expression formula Input as parameter, it is possible to realize the dynamic binding specifying project data scope with EL expression formula, and then reduce expression formula Code redundancy, syntax format is:
Sum (data source labelling, data source packaging name,?EL expression formula);
According to the difference of BCL element type, take different analysis processes, including:
(1) if BCL bag element, execution the 4th step is the most first turned to.Again all BCL elements in this bag element are turned to and hold The row first step;Described bag is the container of other atom computing logical block, can delimit the sphere of action calculating logical block, shielding Naming conflict;
(2) if BCL macro sheet element, all BCL the most first comprised inside record element turns to the execution first step, then obtains Take the EL value expression that current macro sheet element is corresponding;Described macro sheet can completely represents that one has recurrence, multi-field, remembers more Record, have the computation rule of the relation of collecting;
(3) if BCL records element, all BCL the most first comprised inside record element and BCL field element perform the One step, then obtain the EL value expression that this record element is corresponding;
(4) if BCL field element, the EL value expression that present field element is corresponding is the most directly obtained;
(5) if BCL variable element, then from engineering reactor object, the BCL number that current variable element is corresponding is first obtained According to source element, generate corresponding BCL data source object.And be associated with in current analysis context object, then obtain variable element Corresponding filter expression and value expression;Described variable is to comprise data source, data filtering algorithm and expense computational algorithm Rule in interior concrete expense computation structure, compare with the parameter only comprising concrete numerical value for, the calculating of variable has certain Precedence, increasingly complex, but powerful;
(6) if when BCL parameter or data source element, then execution the 4th step is turned to;Described data source is for describing one The data of engineering and scope of data thereof, it is the binding agent of Burroughs Common Language and project data, it is achieved the transmission of truthful data.
Second step: EL expression formula is carried out morphological analysis, generates effective word sequence;
3rd step: engineering response data and engineering-environment data collaborative under, use special syntax analyzer, process sequence All words in row, generate corresponding BCL syntax tree node, and then form complete BCL syntax tree.If there is grammer in this process Mistake, then turn to execution the 9th step;
BCL syntax tree node comprises nodal value attribute, node types attribute, current node are quoted object address value and The relating attribute of left and right node.When word types is variable type operand, this word is passed to current point by syntax analyzer Analysis context module, carries out variable match.If mating unsuccessful, then generate known variables node;If the match is successful, then create and draw Use variable nodes.Analyze matching result type, if BCL element, be the most first compiled this BCL element processing, generate correspondence BCL object, as the external reference object of current reference to variable node.If BCL object, then directly current reference to variable is tied Point points to this BCL object.
4th step, creates corresponding BCL object, and associates the BCL syntax tree obtained after syntactic analysis;
Now, for avoiding the compiling that repeats under same calculating demand, available BCL script file maker and script resolve Device generates respectively and resolves engineering BCL script file, it is achieved record and reduce compiling result, thus is effectively improved execution efficiency.
5th step, by being analyzed the BCL object generated, obtains BCL syntax tree object to be calculated;
According to the difference of BCL object type, take different analysis mode:
(1) if BCL bag object, then all BCL objects in current bag object are performed the 5th step;
(2) if BCL macro sheet, record or field object, internal object is the most first allowed to perform the 5th step, then by its object itself Corresponding BCL syntax tree performs the 6th step, obtains the end value of existing object;
(3) if BCL variable object, the most first BCL syntax tree corresponding for filter expression is performed the 6th step, to original BCL data source filters, then BCL syntax tree object corresponding for value expression is performed the 6th step, obtains current variable object End value;
(4) if when BCL parameter or data source object, do not process.
6th step, explains and performs current BCL syntax tree, process the node in syntax tree according to the mode of postorder traversal.With Time, calculating process and process data are saved in the middle of each node of BCL syntax tree;
The process that this process relates to includes:
(1) if current node is tradition algebraic operator node, calculate the most respectively and obtain left and right nodal value, as left and right Operand, carries out algebraic operation, and using operation result value as the value of current node;
(2) if current node is reference to variable node, then using the value of external reference object corresponding for this node as currently The end value of node;
(3) if current node is function parameter EL expression formula node, then ignore this node of calculating and subtree around, wait to hold During row respective function, then calculate;
(4) if current node is function node, then utilize function registration device, mate and perform respective function;
(5) if current node is known variables node, then mate and be set to currently run the genus of data source in context Property value;
7th step, it may be judged whether there is error message, if existing, then turns to execution the 9th step;Otherwise, perform the 8th step;
8th step, using the value of the root node of BCL syntax tree object as the end value of current BCL object, and then completes to hold Row task, flow process terminates;
9th step, generates corresponding error message form, and flow process terminates.
The invention has the beneficial effects as follows: construction costs of the present invention calculates compilation device and the volume describing language BCL Translating execution method is on the basis of existing calculating describes language, designs for the feature of construction costs.Had by design The EL expression formula of high level operations function and the diversification with a fixed structure and rule calculate logical block, it is possible to meet engineering and make Valency computational algorithm multiformity, calculating data hierarchy and individual demand.Simultaneously as described compiling implement method uses limit meter Calculate the form of limit record, calculating process and process data are saved in the middle of each node of BCL syntax tree.Therefore, it can true Real reduction expense calculates process, it is simple to user intuitively browses the contents such as generation process and the Data Source of expense.In addition, Described BCL script resolver provides the mutual translation function between BCL object set and BCL script file, it is achieved one is secondary One-tenth is performed a plurality of times, thus is effectively improved execution efficiency.
Accompanying drawing explanation
Fig. 1 is the Complied executing mechanism choice of Burroughs Common Language in the embodiment of the present invention;
Fig. 2 is the Complied executing schematic flow sheet of a kind of Burroughs Common Language that the embodiment of the present invention is given;
Fig. 3 be in the embodiment of the present invention BCL object internal and and other BCL object between data structure diagram.
Detailed description of the invention
Below in conjunction with the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, Obviously, described embodiment is only a part of embodiment of the present invention rather than whole embodiments.Based on the reality in the present invention Execute example, the every other embodiment that those of ordinary skill in the art are obtained under not making creative work premise, all belong to In the scope of protection of the invention.
The embodiment of the present invention is as a example by Cost for Electric Power Engineering expense calculates, it is provided that the Complied executing of a kind of Burroughs Common Language realizes Mechanism, as shown in Figure 1.The specific implementation process of this realization mechanism includes three below step, understands with reference to Fig. 2:
Step A1: initialize engineering-environment module data, registration variable template, general purpose function, business function and data source Packaging;
Engineering-environment module provides the general service support needed for the calculating of construction costs expense, with specific construction costs file Data are unrelated.Wherein, variable template is to use the construction costs computational algorithm again write of Burroughs Common Language, and it has versatility, easily The advantages such as the property read and configurability;
Step A2: resolve construction costs file, form BCL element to be calculated allocation project reactor module data;
For the calculating demand comprised in construction costs file, generate the BCL element to be calculated of corresponding kind and quantity.With In Cost for Electric Power Engineering as a example by single item dividing, what inside comprised takes the corresponding BCL macro sheet element of expense macro sheet generation, its correspondence Quantities is stored in engineering reactor module as the configuration of BCL data source element, participates in the calculating of follow-up BCL element;
Step A3: be compiled BCL element performing, generate the BCL object comprising calculating process and process data, draw Result of calculation, is saved in construction costs file.
Use special syntax analyzer, engineering response data and engineering-environment data collaborative under, BCL to be calculated unit Element is compiled into BCL syntax tree, and then generates and have the BCL object (as shown in Figure 3) of hierarchical structure and be stored in BCL document.Now, For avoiding the repetition compiling under same calculating demand, available BCL script file maker and script resolver generate respectively and Resolve engineering BCL script file, with record and reduction compiling result.Explain and perform BCL object, according to corresponding BCL data source unit The scope of data that element is specified, associates truthful data by data source package object, calls correlation function, calculate process data And result data, it is saved in respectively in BCL syntax tree node and BCL object.Operated by persistence, generate and comprise result of calculation With calculating track at interior result of calculation file, it is stored in the middle of project file.

Claims (2)

1. construction costs calculates the Complied executing device describing language BCL, it is characterised in that: described device includes BCL compiler Device, BCL script resolver and BCL actuator apparatus;
Described BCL compiler apparatus is compiled processing for the BCL element to be calculated inputted to external world, is formed and comprises BCL language The BCL object of method tree construction;Internal procedure relates to engineering reactor module, engineering-environment module, project file parsing module, work Journey syntax Analysis Module and analysis context module;
Wherein, BCL element to be calculated is generated by project file parsing module, is delivered to engineering syntax Analysis Module;According to BCL The difference of element type, controls the compiling of BCL element, obtains corresponding EL expression formula set to be calculated, and described EL expression formula is to meter Calculate algorithmic rule a complete description, using $ with } as starting and ending labelling;Described EL expression formula comprises kind diversification Operand, support the types such as numerical value, character string and variable, wherein, types of variables operand is that described EL expression formula support is moved Typical case's embodiment of state data mounting, its value can be quoting of external object, it is also possible to for performing the concrete data of phase sets Value;
The most hereafter under the assistance of module, it is carried out morphology and syntactic analysis, generate and be referred to as the interior of BCL syntax tree Deposit object, and be associated with in corresponding BCL object;
Wherein, described BCL element is minimum unit to be calculated, and inside comprises the EL expression formula set describing computational algorithm rule; Corresponding with the atom computing logical block in Burroughs Common Language system, BCL element at least should comprise BCL bag element, BCL variable unit Element, BCL macro sheet element, BCL record element, BCL field element, BCL param elements and BCL data source element seven kinds;Wherein, BCL bag element exists as the container of other element, does not possess value expression;
And BCL variable element comprises BCL data source element object, filter expression and value expression, express by performing to filter Formula, can screen the qualified scope of data of formation from Data Source, be applied in the middle of the calculating process of its value expression;
Described BCL script resolver contains BCL script file maker and script resolver, is used for realizing BCL object set Close the mutual conversion between BCL script file, it is possible to BCL object is specified in effectively record or reduction;
Described BCL actuator apparatus, after compiled process, explains the BCL object performing to generate, by process data and calculating Result is respectively stored in the middle of BCL syntax tree node and BCL object;
Comprise BCL calculation and object module, node computing module inside BCL actuator apparatus, run context module, function registration Device module and data packaging module;Wherein, BCL calculation and object module controls the explanation of BCL object and performs process, utilizes node meter The each node calculated in the module BCL syntax tree to comprising inside BCL object calculates, and by calculating process and process data Record is in the middle of each node, and then obtains calculation result data, completes execution task.
2. construction costs calculates the compiling implement method describing language BCL, and its step is as follows:
The first step: analyze BCL element, obtain EL expression formula set to be calculated;
Described EL expression formula be to computational algorithm rule a complete description, using $ with } as starting and ending labelling;Described EL expression formula comprises the operand of kind diversification, supports the types such as numerical value, character string and variable, and wherein, types of variables operates Number is typical case's embodiment that described EL expression formula supports dynamic data mounting, and its value can be quoting of external object, it is also possible to for Perform the concrete data value of phase sets;
While following tradition algebraic expression computing feature, EL expression formula comprises multiple condition and selects the condition choosing of expression formula Select computing and complete the functional operation of concrete computation rule;
Described condition select expression formula using #{ and as starting and ending labelling, inside it, comprise multiple conditional branching and at most One default condition branch, the corresponding EL expression formula of each branch, whole condition selects the value of expression formula for currently to be swashed The EL expression formula result of calculation that conditional branching of living is corresponding, such as:
Described functional operation defines concrete computation rule, to meet construction costs specific calculation demand;Its grammatical structure and C Language is compatible, and supports the growth data type of BCL;In addition, described function call also support using EL expression formula as Parameter inputs, it is possible to realizes the dynamic binding specifying project data scope with EL expression formula, and then reduces expression formula code Redundancy, syntax format is:
Sum (data source labelling, data source packaging name,?EL expression formula);
According to the difference of BCL element type, take different analysis processes, including:
(1) if BCL bag element, execution the 4th step is the most first turned to;Described bag is the container of other atom computing logical block, energy Delimit the sphere of action calculating logical block, shield naming conflict;The all BCL elements in this bag element are turned to execution again One step;
(2) if BCL macro sheet element, all BCL the most first comprised inside record element turns to the execution first step, then acquisition is worked as The EL value expression that front macro sheet element is corresponding;Described macro sheet can completely represents that one has recurrence, multi-field, records more, has Collect the computation rule of relation;
(3) if BCL records element, all BCL the most first comprised inside record element and BCL field element perform first Step, then obtain the EL value expression that this record element is corresponding;
(4) if BCL field element, the EL value expression that present field element is corresponding is the most directly obtained;
(5) if BCL variable element, then from engineering reactor object, the BCL data source that current variable element is corresponding is first obtained Element, generates corresponding BCL data source object;And be associated with in current analysis context object, then obtain variable element corresponding Filter expression and value expression;Described variable is to comprise data source, data filtering algorithm and expense computational algorithm rule In interior concrete expense computation structure, compare with the parameter only comprising concrete numerical value for, the calculating of variable has certain priority Order, increasingly complex, but powerful;
(6) if when BCL parameter or data source element, then execution the 4th step is turned to;Described data source is for describing an engineering Data and scope of data, it is the binding agent of Burroughs Common Language and project data, it is achieved the transmission of truthful data;
Second step: EL expression formula is carried out morphological analysis, generates effective word sequence;
3rd step: engineering response data and engineering-environment data collaborative under, use syntax analyzer, process the institute in sequence There is word, generate corresponding BCL syntax tree node, and then form complete BCL syntax tree;If there is syntax error in this process, then Turn to execution the 9th step;
BCL syntax tree node comprises nodal value attribute, node types attribute, current node are quoted object address value and left and right The relating attribute of node;When word types is variable type operand, this word is passed on present analysis by syntax analyzer Hereafter module, carries out variable match;
If mating unsuccessful, then generate known variables node;If the match is successful, then create reference to variable node;Analyze coupling knot Fruit type, if BCL element, is the most first compiled this BCL element processing, generates corresponding BCL object, as currently quoting change The external reference object of amount node;
If BCL object, then directly current reference to variable node is pointed to this BCL object;
4th step, creates corresponding BCL object, and associates the BCL syntax tree obtained after syntactic analysis;
Utilize BCL script file maker and script resolver generate respectively and resolve engineering BCL script file, it is achieved record and Reduction compiling result;
5th step, by being analyzed the BCL object generated, obtains BCL syntax tree object to be calculated;
According to the difference of BCL object type, take different analysis mode:
(1) if BCL bag object, then all BCL objects in current bag object are performed the 5th step;
(2) if BCL macro sheet, record or field object, internal object is the most first allowed to perform the 5th step, then its object itself is corresponding BCL syntax tree perform the 6th step, obtain the end value of existing object;
(3) if BCL variable object, the most first BCL syntax tree corresponding for filter expression is performed the 6th step, to original BCL number Filter according to source, then BCL syntax tree object corresponding for value expression is performed the 6th step, obtain the result of current variable object Value;
(4) if when BCL parameter or data source object, do not process;
6th step, explains and performs current BCL syntax tree, process the node in syntax tree according to the mode of postorder traversal;
Meanwhile, calculating process and process data are saved in the middle of each node of BCL syntax tree;
The process that this process relates to includes:
(1) if current node is tradition algebraic operator node, calculate the most respectively and obtain left and right nodal value, operating as left and right Number, carries out algebraic operation, and using operation result value as the value of current node;
(2) if current node is reference to variable node, then using the value of external reference object corresponding for this node as current node End value;
(3) if current node is function parameter EL expression formula node, then this node of calculating and subtree, pending phase around are ignored When answering function, then calculate;
(4) if current node is function node, then utilize function registration device, mate and perform respective function;
(5) if current node is known variables node, then mate and be set to currently run the property value of data source in context;
7th step, it may be judged whether there is error message, if existing, then turns to execution the 9th step;Otherwise, perform the 8th step;
8th step, using the value of the root node of BCL syntax tree object as the end value of current BCL object, and then completes to perform to appoint Business, flow process terminates;
9th step, generates corresponding error message form, and flow process terminates.
CN201310687744.0A 2013-12-17 Construction costs calculates Complied executing device and the compiling implement method describing language BCL Active CN103645929B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310687744.0A CN103645929B (en) 2013-12-17 Construction costs calculates Complied executing device and the compiling implement method describing language BCL

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310687744.0A CN103645929B (en) 2013-12-17 Construction costs calculates Complied executing device and the compiling implement method describing language BCL

Publications (2)

Publication Number Publication Date
CN103645929A CN103645929A (en) 2014-03-19
CN103645929B true CN103645929B (en) 2016-11-30

Family

ID=

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1265488A (en) * 2000-03-06 2000-09-06 周大凯 Program executing method
US6138269A (en) * 1998-05-20 2000-10-24 Sun Microsystems, Inc. Determining the actual class of an object at run time
CN102053994A (en) * 2009-11-10 2011-05-11 阿里巴巴集团控股有限公司 Language parser and parsing method using same
CN102207949A (en) * 2010-07-15 2011-10-05 优视科技有限公司 Browser script resolving method and device for mobile communication equipment terminal
CN102375826A (en) * 2010-08-13 2012-03-14 中国移动通信集团公司 Structured query language script analysis method, device and system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6138269A (en) * 1998-05-20 2000-10-24 Sun Microsystems, Inc. Determining the actual class of an object at run time
CN1265488A (en) * 2000-03-06 2000-09-06 周大凯 Program executing method
CN102053994A (en) * 2009-11-10 2011-05-11 阿里巴巴集团控股有限公司 Language parser and parsing method using same
CN102207949A (en) * 2010-07-15 2011-10-05 优视科技有限公司 Browser script resolving method and device for mobile communication equipment terminal
CN102375826A (en) * 2010-08-13 2012-03-14 中国移动通信集团公司 Structured query language script analysis method, device and system

Similar Documents

Publication Publication Date Title
CN106648662B (en) Report generation device and method based on project cost calculation description language BCL
Staines Intuitive mapping of UML 2 activity diagrams into fundamental modeling concept Petri net diagrams and colored Petri nets
CN103164249B (en) Extension mechanism for script compiler
CN106371887B (en) A kind of compiling system and method for MSVL language
CN104156313A (en) Method for automatically generating Web service testing case
Kasyanov Sisal 3.2: functional language for scientific parallel programming
JP7350923B2 (en) Deep learning framework operator registration method, equipment, device and storage medium
CN103019742A (en) Method for generating automatic codes on multiple DSP (Digital Signal Processor) platform
CN106383701A (en) Common multi-protocol data access interface technology-based data service system
Grønmo et al. Comparison of three model transformation languages
CN101458633B (en) Method for accessing host program by script program, and system and apparatus thereof
CN109885584A (en) The implementation method and terminal device of distributed data analyzing platform
CN110196720A (en) A kind of Simulink generates the optimization method of dynamic link library
CN111880784A (en) SIMSCRIPT language-oriented discrete event simulation graphical modeling method
Boström et al. Contract-based verification of discrete-time multi-rate Simulink models
Mendling et al. Yet another event-driven process chain
CN110333867B (en) Multiparty secure computing data processing method, device and system
Nogueira et al. Test case generation, selection and coverage from natural language
Dillon et al. Inference graphs: A computational structure supporting generation of customizable and correct analysis components
CN106681781A (en) Implementation method and system for real-time computing service
CN106874000A (en) Data analysis set-up and generation method based on construction costs computer description language BCL
CN103645929B (en) Construction costs calculates Complied executing device and the compiling implement method describing language BCL
Palviainen et al. A semi-automatic end-user programming approach for smart space application development
Bouabana-Tebibel et al. An interleaving semantics for UML 2 interactions using Petri nets
CN109324838A (en) Execution method, executive device and the terminal of SCM program

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
GR01 Patent grant