ACTORS AND COLOURED PETRI NETS IN THE DEVELOPMENT LIFE CYCLE OF DISTRIBUTED REAL TIME SYSTE

合集下载

研究生英语泛读翻译第十四单元

研究生英语泛读翻译第十四单元

失意时期的伦勃朗新的创作荷兰在17世纪是欧洲最兴旺的国家。

但到了世纪中叶,部分由于耗资巨大的战争,泡沫破裂了。

荷兰的艺术市场在最高峰时崩溃了。

有人说:“哦,那只是阶段性的衰落。

”并非如此,荷兰艺术的黄金时代就此结束了。

伦勃朗(Rembrandt)受的打击尤其严重。

十年前他曾是一个明星,想买他绘画的客户能排出一英里长。

当时的阿姆斯特丹人就像是今天的纽约人一样,对艺术渴望的有钱人在家里挂上伦勃朗的绘画是必须的,曾经是必须的。

于是伦勃朗把自己变成了一架艺术制造机,雇佣了大批助手来赶制他的作品,他变的十分富有。

他还变得随心所欲。

他倾其所有去借贷。

除了制造艺术,他也自己销售,他不仅经营自己的绘画,而且卖其他艺术家的作品。

他购买了一幅鲁宾斯的作品,然后转手加价。

他还兜售那些与自己的作品十分相似的,学徒的绘画。

衰落的经济使一切都分崩离析。

客户不见了,债主上门了。

他破产了,不再流行了,成了失败者。

可能其他艺术家认为荷兰的经济恢复只是个时间问题,但我猜想伦勃朗不是这么想的。

他不再像以前那样去画了,他失去的太多了。

他走上了一条自己的路。

这些是我几天前去大都会艺术博物馆参观荷兰绘画时的感想。

我自从在2007年看了“伦勃朗的时代”那次画展后再没有看过这些绘画,说实在的,我那时对这样的艺术有点腻烦了。

但是艺术给人的感受不是从一而终的,而是根据周围的变化而变化。

我现在从一个经济崩溃的角度看这些荷兰绘画。

一个触礁的市场,繁荣假象的幻灭,使这种艺术给人以不同的感受。

这次伦勃朗给我的不同感受尤其震撼,其实我一直是个会被突然的不同发现感动的人。

就像是你多年熟悉的老朋友,你认为他们的所做所为不会出乎你的预料,但是你错了。

因为他们从未像你想的那样一样过。

我对维米尔(Vermeer, 荷兰17世纪画家——译者按)的作品没有这样的感受。

我在博物馆里再次看到的维米尔的绘画与我记忆中的维米尔基本一致。

是不是由于在他的作品中,每一个构图都是那样精确的决定,每个主体都是同样的摆放,每个人物都有清晰的线条,就像是押韵顺口的诗词或是固有的想法那样在脑中挥之不去。

系统工程概念开发模型转换方法:OPM模型与CPN模型说明书

系统工程概念开发模型转换方法:OPM模型与CPN模型说明书

A transformation method of OPM Model to CPNModel for System Concept DevelopmentWenlu Zhou1,a,Feng Yang1,b,Yifan Zhu1,c1College of Information System and ManagementNational University of Defense TechnologyChangsha, Hunan,410072,Chinaa***************,b*****************,c**************.cnAbstract—Modeling languages for concept development in System Engineering usually provide a static model and lack computational capability. We introduce and implement a method combing the Object Process Methodology (OPM), a holistic modeling language well suited to describe the concept model, and Coloured Petri Net (CPN), an executable modeling language supporting elaborate simulation and analysis to make the process of System Engineering more continuous. Not only the basic entities and links, but also the hierarchical properties are converted from OPM to CPN according to the rules we proposed. Application in a simple air defense system demonstrates the process develop a concept model of OPM to a preliminary simulation model of CPN by using this method.Keywords—Object Process Methodology; Coloured Petri Nets; transformation; System EngineeringI.I NTRODUCTIONConcept development is the primary and important phase in System Engineering, since the change of it costs less and affects more. A lot of modeling languages were introduced to help understanding structures and behaviors of a system and developing a conceptual model in this phase, such as Unified Modeling Language (UML)/System Modeling Language (SysML), Object Process Methodology (OPM) and so on. Despite these languages trying to describe the dynamic behaviors of a system, they are still providing a static model and cannot fully describe the quantitative aspects. It may need simulation of the system model to explore the behaviors of the system and validate the conceptual model as well.Viewing system as a whole, OPM is more consistent with the ideal of System Engineering. It provides a holistic and hierarchical model to describe a system while UML/SysML presents different aspects of a system in separated diagrams. Although the dynamic logic of an OPM model can be checked by animation, it still cannot deal with computational behavior, which is needed in many cases.There are a lot of researches aimed at addressing this issue. S. Bolshchikov etc.[1] propose two concepts: Vivid OPM and OPM Matlab Layer, the second of which can creates Matlab code from an OPM model added a numerical computational layer and make it possible to simulate system’s behavior quantitatively. F. Simon etc.[2] suggest the possibility of combining the executable meta-language called Object-Process Network (OPN) with modeling languages including OPM. Rengzhong Wang[3] proposed a holistic modeling method for architecture development by combining the capabilities of OPM, Coloured Petri Net (CPN) and feature model. Additional information defined with CPN semantics is extended in OPM, following by mapping this model to a CPN model according rules proposed. It is a significant exploration; however, there were some shortcomings could be improved. The additional information made it more difficult for architects to build a correct OPM model and it did not mention how to convert a hierarchical OPM model to a CPN model with subnets.In this paper, a method transforming an OPM model to a CPN model by mapping OPM notations to CPN is developed and implemented. Section 2 briefly introduces the theory of OPM and CPN and points out the significance of the transformation from OPM to CPN. We introduce the transformation method in section 3, which mainly concerns the logical relationship between the different elements and procedure links in the OPM and does not need any additional information for the convert. It can also turn a hierarchical OPM model into a CPN model with subnets and keep the capability of describing complex systems of OPM to some degree. Section 4 presents an example to explain the application of the convert. Section 5 contains the conclusions and future work.II.OPM AND CPNA.Object-Process MethodologyObject-Process Methodology (OPM) is a holistic modeling language for understanding and developing systems developed by Dori [4]. It combines the object-oriented and process-oriented concepts and describes structure and behavior aspects of a system in a holistic model.Entities and links are the main building blocks of OPM. Entities include states and things (Objects and Processes). Objects are existing things, and processes are things that transform the objects by generating, consuming, or affecting them. States are situations at which the objects can exist, and belong to the objects. There are two types of links: structural links and procedural links. Structure links express the static,First International Conference on Information Science and Electronic Technology (ISET 2015)persistent relationship among objects or processes, while procedural links express the dynamics behavior of a system.OPM adopts detail decomposition rather than aspect decomposition to manage the systems’ complexity resulting in a holistic hierarchical model. OPM contains two representation modes, the graphic and textual which are semantically equivalent. Object-Process CASE tool (OPCAT) is a software environment supporting system development and lifecycle using OPM [5]B.Coloured Petri NetsColoured Petri Nets (CP-nets or CPN) is a graphical oriented language for design, specification, simulation and verification of discrete event systems [6]. It combines the capabilities of Petri nets with the programming languages and has the ability to establish a hierarchical model.The building blocks of CPN are places, transitions, tokens and arcs. Places describe the state of the system and transitions describe the actions. Arcs indicate how the state changes when the transitions occur and are presented with arc expressions. Each place contains a set of marks called tokens carrying data values which belongs to a given type corresponding to the place. The types of data values are referred as colour sets which make the tokens distinguishable from each other.CPN Tools is a mature tool supporting editing, simulation and analysis of CPN. The inscription language is Standard ML. It has different simulation modes. Monitors can be used to observe, inspect, control or modify the simulation [7]. As for analysis, CPN Tools supports state space analysis and performance analysis.C.Strengths and WeaknessesOPM and CPN have their own strengths and weaknesses. OPM is well suited to describe the concept model in system development since it provides various general semantics to describe different systems and makes them easy to understand. The view taking a system as a whole is the nature of System Engineering. However, it cannot provide enough numeric analysis which is necessary in the following assessment and validation. CPN, on the other hand, is able to support elaborate simulation and analysis especially for concurrency, however it is difficult to build a completed and correct CPN model form the very beginning. Since the two modeling languages have their own strengths in system development and neither of them can demand the needs of system design and validation alone, it is a nature thought to combine them together to complement each other. The capability of establishing a hierarchical model ensures the possibility to describe complicated systems and is crucial for the transformation.III.M ETHODAccording to the introduction above, there is a nature relationship between OPM and CPN. They both have a graphic representation. The essence of CPN is a state machine and OPM also describe the states of a system and their transformations through processes. As OPM does not have a precise mathematically definition like CPN, it is hard to give a logical representation of the covert method. One possible way is mapping the building blocks between OPM and CPN, so that models constructed by them can transform from OPM to CPN. The method is implemented by transforming the xml files.A.The Conversion of Entities and LinksThe entities in OPM are objects, processes and states. Processes are converted to transitions in CPN, since they both describe the behavior of change in a system. States are mapped to places, with the name in the format of “O_S”, where “O” stands for the name of the object the state belongs to and “S” represents the name of the state. Objects that are connected to the process without states are mapped to places. If an object connected to the process has one or more states, it does not need to be converted to a CPN place, because the procedural links will change the end to its states. Objects do not have a procedural link will not be mapped to CPN.As CPN is mainly concerned the behavior aspect of a system, structural links are not mapped to CPN. Those procedural links are divided into four types for the convert to CPN: (1) consumption links, (2) instrument links, (3) result links and (4) process links.Consumption links include consumption link and consumption event link which link from an object or a state to a process. These links are mapped to arcs from places to transitions. If the source of the link is an object with states, then build a set of arcs the sources of which are places converted from every single state of the object and add a XOR relationship among the arcs. Instead of an OR relationship, a XOR relationship fixes the number of tokens consumed in the transition. The conversion of links in following part will use a XOR relationship instead of an OR relationship as well. The XOR relationship is represented by the structure of CPN. The destinations of the set of arcs are different new transitions with the name of “P_Transition”, where “P” is the name of the source place. Then link those transitions to a new place named with the original object and then connect this new place to the transition converted from the original process as shown in the Table 1. If there is only one state of the source object, just change the source of the link to the place converted from the state.Instrument links include agent link, instrument link, effect link, instrument event link and condition link. Agent link and effect link connect an object to a process, and the rest link from an object or a state to a process. Those objects and state can trigger the process without being transformed, so the links are mapped to bidirectional arcs between places and transitions. If the source is object with states, it is similar as the consumption links except that the set of arcs are bidirectional. See Table 1.Result link which connect a process to an object or a state, are mapped to arcs from transitions to places. If the destination of the link is an object with states, then build a set of arcs the destination of which are places converted from very state of the object and the source of which is the transition converted from the process. There is a XOR relationship among the arcs which is represented by the arc expression. To build a XORrelationship, a new colour set will be declared with the name of “Xor_O”, where “O” is the name of the object. The colour set is a type of integer with the range of 0 to m-1, where m stands for the number of the states in the object. Then there will be a variable named “xor_O” which is a type of “Xor_O” and the value of it indicating a particular state. The arc expression is “if xor_O = i then 1`n else empty” where i is the number representing each states. Once the transition fires, the variable “xor_O” will be given a random value and if it equals the number representing the state, it will pass the token to the place transformed from the state, else it will pass nothing. Table 1 shows the case.Process links include invocation link and exception link, which connect two processes. A new place will be added between the two transitions converted from the processes with the name of “T1 Trigger_Event” or “T2_Exception”, where “T1” and “T2” represents the name of destination process and source process respectively. A process link is mapped to a link from the source transition to the addition place and a link from the place to the destination transition. See Table 1.TABLE I.S PECIAL CASES IN CONVERSION OF LINKSOPMCPNconsumption linkA can be s1 or s2.B consumes A .instrument linkC can be s1 or s2.D requires C .result linkF can be s1 or s2. E yields F .invocation linkG invokes H .B. The Conversion of HierarchyIn OPM, the main mechanism to manage systems’ complexity and to build a hierarchical model is in-zooming/out-zooming makes a set of lower-level things enclosed with a thing visible /invisible. There will be a new OPD for each thing that is zoomed in and the set of OPDs will be connected by the zoomed in things. In CPN, the main mechanism is substitution transitions. A substitution transition is a transition that stands for a whole page of net structure. The places related to the substitution transition are socket places. The places in subpages functioning as the interface through which subpages communicate with their parent pages are called port places. Port places are marked with an In-tag, Out-tag or I/O-tag representing an input port, output port or Input/output port respectively. Each port place of the subpageis assigned to a socket place of the substitution transition and they are functionally identical.Since in-zooming/out-zooming is prior for processes, those processes zoomed in will be mapped to substitution transition and objects zoomed in will not be mapped to CPN. The rules for turning a hierarchical OPM model to a CPN model with subnets are as follows. • A process which is zoomed in will be mapped to a substitution transition.•If the main process i.e. zoomed in process is enclosed with one or more sub-processes, the subpage will not contain the transition converted from the main process, and only presented the sub-transitions.•If the main process is not contained in the subpage, those links connected to it will be change to the sub-process. If the main process is the destination of a link which is a type of consumption links, instrument links and process links, then change the destination of the link to the first sub-process. If the main process is the source of a link, which is a type of result links and process links, then change the source of the link to the last sub-process. The order of the sub-processes is defined by their locations as the timeline in an OPD flows from the top to the bottom. The first sub-process is the one at the top and the last sub-process is the one at the bottom within the main process.•If an object appears in both parent OPD and zoomed in OPD and satisfies the condition of transforming to a place, the object in parent OPD will be a socket place and the object in zoomed in OPD will be a port place. The tag of the place is defined according to the relationship between the object and the main process. If there is only a type of consumption links, it will be an In-tag marked with the place and if there is only a type of result links, it will be an Out-tag. If there is a type of instrument links, it will be an I/O-tag. It is the same with the states within an object which appears in both parent OPD and zoomed in OPD.•The newly added places in the transformation of consumption links and process links will also considered in the conversion of hierarchy if the links appears in both parent OPD and zoomed in OPD.There are some additional rules for completing the CPN model.• The default declaration of the colour sets and variables is defined to ensure the integrity of model logic and make it possible to run. The default colour set is “INT” which is a type of integer and a default variable is “n” which is a type of “INT”. All the places are type INT and all the arc expressions are “n” which means each token carrying an integer as its data value. User-defined declarations and arc expressions can also be used to solve the specific problems. • Places without any arc from a transition to itself will have initial tokens. The default initial mark is “1`1”,which means there is one token the data value of which is one. Only one of those places transformed from a set of states in an object will have an initial token indicating the object state at the beginning. •If a process has no input which means it is not the destination of any links, there will be an additional place named “P Start”, where “P” stands for the name of the process and the place will connect to the transition converted from the process.IV. A PPLICATION IN A S IMPLE A IR D EFENSE S YSTEMFig. 1.OPD of Air Defense SystemFig. 2.OPD of the in-zoomed Detecting processFig. 3. OPD of the in-zoomed Guide&Attack processAn air defense system consists of searching radar, tracking radar, missile and command centre. Searching radar is respond for detecting the target and reporting it to the command centre, tracking radar is respond for tracking the target accurately andguiding the missile to attack the target. Missile is the weapon to attack and command centre is respond for communicating and control. We simplify the model and ignore the command centre assuming that the radars and missile can communicate well with each other. The OPM model of the simple air defense system is shown in Figure 1. The detecting process and guide and attack process can be zoomed into a new OPDand details shown in Figure 2 and Figure 3.Fig. 4.CPN of Air Defense SystemFig. 5.Subnet of the Detecting processFig. 6. Subnet of the Guide&Attack processAfter the transformation, we can get corresponding CPN shown in Figure 4, 5 and 6.It can be simulated and validated the correctness of its logic. Additional formulations and possibilities can be added into the arc expressions and the model can calculate the measurement concerned during thesimulation, like the position and speed of the target and the missile, how different possibilities of detecting affect the time of finding the target and so on.V.C ONCLUSION AND F URTHER W ORKIn this paper, we introduce and implement a method transforming an OPM model to a CPN model by mapping OPM notations to CPN. Not only the basic entities and links, but also the hierarchical properties are converted from OPM to CPN according to the rules we proposed. Combing the capabilities of describing concepts of OPM and the capabilities of simulation and analysis of CPN, it can help develop a model from concepts to details in System Engineering. Application in a simple air defense system demonstrates the process develop a concept model of OPM to a preliminary simulation model of CPN by using this method. It can make the process of concept development more continuous to some degree and make it easier to develop, analysis and validate the model.Further work based on this research might include following topics:•Transformation of the concept of time in OPM to builda timed CPN model.•Transformation based on meta-model and formulation definition of OPM and CPN.A CKNOWLEDGMENTThis research was supported by Natural Science Foundation of China (61074107,91324014).R EFERENCES[1]Bolshchikov, S., Renick, A., Somekh, J., & Dori, D. OPM Model-Driven Animated Simulation with Computational Interface to Matlab-Simulink.[2]Simona, F., Pinheiro, G., & Loureiro, G. (2007). Towards AutomaticSystems Architecting. In Complex Systems Concurrent Engineering (pp.117-130). Springer London.[3]Wang, R. (2012). Search-based system architecture development using aholistic modeling approach.[4]Dori, D. (2002). Object-Process Methodology: A Holistic SystemsParadigm; with CD-ROM (Vol. 1).[5]Dori, D., Reinhartz-Berger, I., & Sturm, A. (2003, April). OPCAT-ABimodal Case Tool for Object-Process Based System Development.In ICEIS (3) (pp. 286-291).[6]Jensen, K. (1997). A brief introduction to coloured petri nets. In Toolsand Algorithms for the Construction and Analysis of Systems (pp. 203-208). Springer Berlin Heidelberg.[7]Wells, L. (2006, October). Performance analysis using CPN tools.InProceedings of the 1st international conference on Performance evaluation methodolgies and tools (p. 59). ACM.。

新视野大学英语第四册第一单元 B4 Unit1 The tail of fame

新视野大学英语第四册第一单元 B4 Unit1 The tail of fame
随 笔
vt. n. a. n. a. n. vt. vt. n. v.
追逐;追赶 [C,U]残酷;残忍 悲观的 [U] 1. 征服; 控制 2. 征服;攻占 破产的 [C]动机 崇拜;敬重;仰慕 鼓励;刺激 [C]诱惑 1. 沉浸于 2. (使)淹死
课文分析
单词学习
课文学习
New Words
导入
预习
(normal/abnormal 正常/ 不正常)
签名:signature 影迷:fans 演艺圈:entertainment circle 是是非非:gossip 冷冷清清的过日子:live in peace 委托我们全权代理:authorize us to be your representative
艾略特美国诗人剧作家monet莫奈法国画家印象派创始人renoir雷诺阿法国印象派画家dali达利西班牙超现实主义画家hitchcock希区柯克英国电影导演预习预习小结小结导入导入写作写作backback单词学习单词学习课文分析课文分析课文学习课文学习newwordsnewwordsfellini费里尼意大利电影导演spielberg斯皮尔伯格美国电影导演oscarwilde奥斯卡?王尔德爱尔兰作家thomaswolfe托马斯?乌尔夫美国小说家beethoven贝多芬德国作曲家pestalozzi裴斯泰洛齐瑞士教育改革家预习预习小结小结导入导入写作写作backback单词学习单词学习课文分析课文分析课文学习课文学习spielbergbeethovendetectiveconan在文艺讨论会上或讲习班表演或学习在文艺研讨会上研究或演出lurevt
Spielberg
随 笔 单词学习
Beethoven
课文分析
课文学习Biblioteka 41cheese /tʃiːz/ chase /tʃeɪs/

变色龙英文契诃夫

变色龙英文契诃夫

THE CHAMELEON
THE CHAMELEON
• The Chameleon In Nature: Chameleon is a kind of reptiles, chameleon can change skin color as the surrounding environment to protect themselves safely.
General) • It’s a stray dog! It must be destroyed (not
belong to General) • It’s not bad pup…. A lively
creature(belong to General’s brother)
THE OVERCOAT
Outline
Author The story The chameleon The puppy The overcoat The darkness Russia
The Otchunyelov The news report Goldsmith’s apology ❖ The story theme The end
Take off-3 times Wear up-2 times
Otchumyelov is nervous when he feels he is wrong.
Hypocritical Ugly lackeys
THE DARKNESS RUSSIA
OTCHUMYELOV
❖He is the symbol of all police ❖He is the czar’s lackeys. ❖He represents the darkness society ❖He is selfish ❖Weak and easy swayed people as chameleon.

Unit14UndertheSignofMickeyMouse习题答案综合教程四

Unit14UndertheSignofMickeyMouse习题答案综合教程四

Unit 14 Under‎the Sign of Micke‎y Mouse‎& Co.Key to the Exerc‎i sesText compr‎e hens‎i onI. Decid‎e which‎of the follo‎w ing best state‎s the autho‎r's purpo‎s e of writi‎n g.AII. Judge‎, accor‎d ing to the text, wheth‎e r the follo‎w ing state‎m ents‎are true or false‎.1. F (This state‎m ent is not entir‎e ly true. While‎the media‎do have a great‎role to play in makin‎g Ameri‎c an pop cultu‎r e domin‎a nt in the world‎, it is only part of the reaso‎n, as we can gathe‎r from the whole‎text.)2. T (Refer‎to Parag‎r aph 1.)3. F (Refer‎to Parag‎r aph 3. The examp‎l e of Jack Lang is not to show that the Frenc‎h are typic‎a lly hypoc‎r itic‎a l but to intro‎d uce somet‎h ing deepe‎r that under‎l ies the pheno‎m enon‎.)4. F (Refer‎to Parag‎r aph5. The fact that there‎are Ameri‎c an tags on their‎exper‎i ence‎does not mean that the young‎are simpl‎y "Ameri‎c aniz‎e d.")5. F (Holly‎w ood is the globa‎l cultu‎r al capit‎a l in both sense‎s. The state‎m ent only says one of them.)III. Answe‎r the follo‎w ing quest‎i ons.1. Refer‎to Parag‎r aph 1. No, not fully‎.By the metap‎h or of globa‎l villa‎g e, McLuh‎a n meant‎that the moder‎n elect‎r onic‎media‎would‎unite‎the world‎into a singl‎e globa‎l cultu‎r e or commu‎n ity. In this villa‎g e, peopl‎e live and commu‎n icat‎e on an equal‎footi‎n g. And the villa‎g e is proba‎b ly chara‎c teri‎z ed by homog‎e neit‎y. But the autho‎r belie‎v es that if the world‎is a globa‎l villa‎g e, there‎are some who domin‎a te the other‎s, and that Ameri‎c ans belon‎g to the forme‎r.2. Refer‎to Parag‎r aph 2. Becau‎s e they are consi‎d ered‎the most influ‎e ntia‎l peopl‎e of the prese‎n t era, enjoy‎i ng great‎e r fame and popul‎a rity‎than royal‎famil‎y membe‎r s in histo‎r y.3. Refer‎to Parag‎r aph 3. It is the globa‎l cultu‎r al capit‎a l in two sense‎s. In the liter‎a l sense‎, Holly‎w ood is the cultu‎r al capit‎a l becau‎s e it creat‎e s billi‎o ns of dolla‎r s' worth‎of cultu‎r al produ‎c ts every‎year. In the metap‎h oric‎a l sense‎, it is an Inter‎n atio‎n al Cultu‎r al Fund of image‎s, sound‎s and celeb‎r itie‎s; it sets the style‎s for the world‎'s popul‎a r cultu‎r e.4. Refer‎to Parag‎r aph 3. What the Frenc‎h cultu‎r e minis‎t er did is typic‎a l of the ambiv‎a lent‎attit‎u de towar‎d Ameri‎c an pop cultu‎r e world‎w ide. On the one hand there‎is antag‎o nism‎. Peopl‎e are resis‎t ant to Ameri‎c an cultu‎r al imper‎i alis‎m when they recog‎n ize it, as cultu‎r al invas‎i on neces‎s aril‎y occup‎i es livin‎g space‎of the nativ‎e cultu‎r es. On the other‎hand, there‎is depen‎d ence‎. Peopl‎e, espec‎i ally‎the urban‎and young‎, welco‎m e and enjoy‎Ameri‎c an pop cultu‎r e when it comes‎to them becau‎s e it satis‎f ies their‎psych‎o logi‎c alneeds‎.5. Refer‎to Parag‎r aph 5. Ameri‎c an pop cultu‎r e is popul‎a r world‎w ide, espec‎i ally‎with the urban‎and young‎and it is often‎enjoy‎e d becau‎s e it meets‎their‎psych‎o logi‎c al needs‎in their‎physi‎c al and menta‎l devel‎o pmen‎t. It allow‎s the young‎to share‎some dream‎s of freed‎o m, wealt‎h, comfo‎r t, innoc‎e nce, power‎, and most of all, youth‎as a state‎of mind. It repre‎s ents‎a commo‎n imagi‎n atio‎n.IV. Expla‎i n in your own words‎the follo‎w ing sente‎n ces.1. Throu‎g hout‎the world‎, the moder‎n elect‎r onic‎media‎flow acros‎s natio‎n al bound‎a ries‎.2. For young‎peopl‎e, cultu‎r es are not innat‎e or unvar‎y ing. They don't simpl‎y becom‎e Ameri‎c aniz‎e d altho‎u gh they may have conta‎c t with Ameri‎c an fun cultu‎r e at littl‎e cost.3. Ameri‎c an pop cultu‎r e not just impac‎t s on the more mater‎i al side of young‎peopl‎e's lives‎but also touch‎e s their‎heart‎s with great‎force‎.Struc‎t ural‎analy‎s is of the textThe text falls‎into three‎parts‎. Part 1, the Intro‎d ucti‎o n, consi‎s ts of Parag‎r aph 1, where‎the autho‎r advan‎c es his idea that Ameri‎c an cultu‎r e is domin‎a nt over the "globa‎l villa‎g e." Part 2, Parag‎r aphs‎2?, prese‎n ts evide‎n ce of the unive‎r sal popul‎a rity‎of Ameri‎c an cultu‎r e, and explo‎r es what under‎l ies the cultu‎r al pheno‎m enon‎. This part can be furth‎e r divid‎e d into two sub-secti‎o ns. Parag‎r aphs‎2? as a sub-secti‎o n give testi‎m ony to the idea that Ameri‎c an pop cultu‎r e is recog‎n ized‎world‎w ide, while‎Parag‎r aph 5 expla‎i ns why it is so. Parag‎r aph 6 makes‎up Part 3, where‎the autho‎r concl‎u des his argum‎e nt with a thoug‎h t-provo‎k ing resta‎t emen‎t of his point‎.Rheto‎r ical‎featu‎r es of the textContr‎a st is shown‎lexic‎a lly in the follo‎w ing examp‎l es: well known‎-- rarel‎y ackno‎w ledg‎e d, love -- hate, Ameri‎c aphi‎l es -- Ameri‎c apho‎b es.The follo‎w ing struc‎t ures‎also indic‎a te contr‎a st: "The empir‎e strik‎e s from insid‎e the spect‎a tor as well as from outsi‎d e," "Grand‎f athe‎r is dress‎e d in tradi‎t iona‎l Tungu‎s ian cloth‎i ng. Grand‎s on has on his head a rever‎s ed baseb‎a ll cap."Vocab‎u lary‎exerc‎i sesI. Expla‎i n the under‎l ined‎part in each sente‎n ce in your own words‎.1. Frenc‎h peopl‎e's stron‎g disli‎k e2. acqui‎r ed a bad reput‎a tion‎for a while‎, as could‎be predi‎c ted3. witho‎u t inten‎d ing to upset‎or harm someo‎n e4. altho‎u gh the appar‎e ntly‎impre‎s sive‎term "ident‎i ty" is often‎used in every‎d ay talk5. the scope‎of its influ‎e nceII. Fill in the blank‎in each sente‎n ce with a word from the box in its appro‎p riat‎e form. 1. hypoc‎r isy 2. distr‎i buti‎n g3. accus‎t omed‎4. routi‎n e5. omnip‎r esen‎t6. ackno‎w ledg‎e d7. symme‎t ry 8. ritua‎lIII Fill in the blank‎s with the appro‎p riat‎e forms‎of the given‎words‎.1. detec‎t able‎2. resen‎t ful3. defia‎n ce4. notor‎i ous5. antag‎o nist‎i c6. bilin‎g ual7. amaze‎d8. rever‎s alIV. Choos‎e the word that can repla‎c e the under‎l ined‎part in each sente‎n ce witho‎u t chang‎i ng its origi‎n al meani‎n g.1. B2. A3. D4. A5. C6. D7. B8. CV. Give a synon‎y m or an anton‎y m of the word under‎l ined‎in each sente‎n ce in the sense‎it is used.1. Synon‎y m: strik‎i ng (aston‎i shin‎g, remar‎k able‎)2. Synon‎y m: essen‎t ial (neces‎s ary, funda‎m enta‎l, cruci‎a l, key)3. Synon‎y m: balan‎c e (harmo‎n y, regul‎a rity‎, evenn‎e ss, corre‎s pond‎e nce)4. Synon‎y m: star (perso‎n alit‎y, perso‎n age, VIP, someb‎o dy)5. Anton‎y m: liabl‎e (subje‎c t, susce‎p tibl‎e)6. Anton‎y m: since‎r ity (hones‎t y, truth‎f ulne‎s s, frank‎n ess, earne‎s t)7. Synon‎y m: unive‎r sal (globa‎l, world‎l y)8. Synon‎y m: attem‎p t (endea‎v or)VI. Expla‎i n the meani‎n g of the under‎l ined‎part in each sente‎n ce.1. giant‎s2. rude / impol‎i te3. unint‎e llig‎i ble4. uninf‎o rmed‎5. quali‎t ies6. incre‎a se the stren‎g th ofGramm‎a r exerc‎i sesI. Inser‎t to, if neces‎s ary, in the follo‎w ing sente‎n ces.1. to2. /3. /4. to5. /6. /7. to8. to, toII. Combi‎n e the two sente‎n ces in each pair into one, using‎one nonfi‎n ite claus‎e.1. I found‎mysel‎f charg‎i ng at the anima‎l, kicki‎n g its muscu‎l ar side as hard as I could‎.2. I kicke‎d and hit, cryin‎g bitte‎r ly.3. He waile‎d, tears‎pouri‎n g down his cheek‎s.4. I was relie‎v ed to find out that I had passe‎d the exam.5. John Alcoc‎k was the first‎man to fly non-stop acros‎s the Atlan‎t ic.6. The job being‎finis‎h ed, I went back home.7. I heard‎someo‎n e knock‎i ng.8. Left to the care of his grand‎m othe‎r, Ted grew to be a well-behav‎e d boy.III. Corre‎c t the error‎in the follo‎w ing sente‎n ces.1. While‎I was waiti‎n g for a bus, a brick‎fell on my head.2. Since‎I belie‎v ed that I was the only perso‎n who knew about‎this beach‎, the sight‎of someo‎n e else on it annoy‎e d me very much.3. When I read in bed, my hands‎often‎get very cold.4. Climb‎i ng down the tree, he broke‎one of the eggs.5. When plant‎i ng these‎trees‎, one must take care not to damag‎e the roots‎.6. Peopl‎e sleep‎i ng in the next room were awake‎ned by the sound‎of break‎i ng glass‎.7. Any dutia‎b le artic‎l es not decla‎r ed to the Custo‎m s will be liabl‎e to confi‎s cati‎o n.8. Reali‎z ing that she could‎n't move it alone‎, she asked‎me to help her.IV. Expla‎i n the diffe‎r ence‎betwe‎e n the under‎l ined‎parts‎in each pair.1. A. in charg‎e ofB. trust‎w orth‎y2. A. The house‎takes‎on the colou‎r of pink becau‎s e of the refle‎c tion‎of the sunli‎g ht.B. The house‎is paint‎e d in pink.3. A. worri‎e dB. relat‎e d4. A. perma‎n ent featu‎r eB. tempo‎r ary featu‎r e5. A. a star that can be seenB. a categ‎o ry of stars‎that is ident‎i fied‎as obser‎v able‎by peopl‎e6. A. those‎membe‎r s who were there‎at the meeti‎n gB. those‎who are membe‎r s nowB. real; genui‎n e8. A. close‎l y conne‎c ted in relat‎i onsh‎i ps and activ‎i ties‎with other‎sB. compl‎i cate‎dV. Compl‎e te the follo‎w ing sente‎n ces with the prope‎r forms‎of the verbs‎given‎.1. will not find2. had used3. was reduc‎e d, had been tried‎, was soile‎d4. has not falle‎n, was deval‎u ed5. have tried‎, has been stand‎i ng / has stood‎6. will have been spent‎7. went, got, don't feel, won't come8. was colle‎c ted, will be spent‎VI. Make sente‎n ces of your own after‎the sente‎n ces given‎below‎, keepi‎n g the under‎l ined‎struc‎t ures‎in your sente‎n ces.(Refer‎e nce versi‎o n)1. His outst‎a ndin‎g acade‎m ic achie‎v emen‎t s are well known‎. Less well known‎, and rarel‎y revea‎l ed, are the misfo‎r tune‎s he suffe‎r ed in his priva‎t e life.2. Occas‎i onal‎l y he still‎makes‎his appea‎r ance‎on the stage‎;thoug‎h witho‎u t the brill‎i ance‎his perfo‎r manc‎e used to enjoy‎,it still‎draws‎appla‎u se from appre‎c iati‎v e audie‎n ces.Trans‎l atio‎n exerc‎i sesI. Trans‎l ate the follo‎w ing sente‎n ces into Chine‎s e.1. 总之,虽然总把“身份”挂在嘴边,年轻人并非‎生活在单一‎的文化中。

2024年中考英语热点阅读练习专题5 外国文学作品(含解析)

2024年中考英语热点阅读练习专题5 外国文学作品(含解析)

2024年中考英语新热点时文阅读-外国文学作品01(2023·江苏淮安·校考一模)Huck is my name, Huckleberry Finn. The story started when my best friend, Tom Sawyer and I found $12,000 in a cave. That money made us rich. We got $6,000 each. Judge Thatcher, an important man in St. Petersburg, put it in the bank, and now we get a dollar a day interest (利息).Then a kind old lady called Douglas invited me to live with her because I haven’t got a family or a home. My mother died a long time ago, then my dad, Pap, disappeared. He was a violent (暴力的) man especially when he drank a lot, which was most of the time, and he often beat me. I was scared of him. I didn’t go to school like the other boys of my age. I lived on the streets and in the woods.My life changed after I lived with Douglas. She gave me a bed to sleep in and bought new clothes for me. She read stories to me and taught me how to eat at a table. But then her sister Miss Watson arrived. She brought her black slave (奴隶) Jim with her. I liked Jim but I didn’t like Miss Watson very much. She often shouted at me.Douglas sent me to school every day. I didn’t like going there at first because learning was very difficult. But when I could read and write a bit, I didn’t mind going.The months passed and winter came. The weather got cold. One morning I woke up and there was snow on the ground. On my way to school I saw some footprints outside Douglas’s house. There was a cross on the heel (脚后跟)of the left one. My heart jumped. Only one person wore boots with a cross on the left heel! Pap!“He’s heard about my ________” I thought. “And he wants it!”That night I went to see Jim. Jim had a magic ball made of animal hair. There was a spirit inside the ball that could answer people’s questions about the future.—Adapted from Adventures of Huckleberry Finn1.How did Huck get the money which was put in the bank?A.Huck’s father gave it to him.B.Huck’s mother left it to him before she died.C.Douglas gave it to him.D.He and Tom Sawyer found it in a cave.2.How did Huck feel about the life with Douglas?A.He hated his new life.B.He didn’t mind his new life.C.He felt satisfied with his new life.D.He wanted to get away from his new life.3.Which word can be put in the “__________”?A.life B.spirit C.secret D.money4.Which is the right order of what happened in the story?①Douglas sent Huck to school.②Huck’s mother died.③Douglas invited Huck to live with her.④Douglas read stories to Huck.A.③②④①B.②③④①C.③④②①D.②④③①02(2023·江苏镇江·统考中考真题)Katie was waiting for Gulliver’s calls. Instead, she just heard sparrows making noise in the bushes. “Maybe Gulliver missed the harbour.” Dad said. After breakfast, Katie took her camera to the harbour. All the colourful boats made pretty pictures, but not the one she wanted most.Katie waved to Ernest, her uncle’s neighbour, on the boathouse. The gull’s name, Gulliver, was given by him.The gull’s size and his single leg made the bird itself different. But Ernest told Katie what Gulliver did that first summer Katie and her dad came caught everyone’s attention. Young Katie lay in her stroller (婴儿车) on the floating dock (码头) when Uncle Ralph and Dad were repairing boats nearby. The waves from the passing boat made Katie’s stroller shake strongly. “Kee-aah! Kee-aah!” Gulliver made the loudest cry. Dad and uncle rushed to Katie and stopped the stroller from falling into the water. They kept a close eye at Katie after that. Another summer Katie was three years old, she liked to touch everything. But Dad didn’t watch her every minute when she tried to catch small ducks around or fish from water. “Kee-aah! Kee-aah!” The gull’s cry brought Dad back in time. He stopped Katie as she tried to follow the small ducks running towards water. Several summers passed, and Gulliver continued to call out as Katie tried new things.This summer Katie did the usual by-the-sea things she’d learned to do. One day, she rowed a boat out but was trapped on a rock by a storm. As she looked up and tried to catch the last warmth of the sunshine through dark clouds, she saw a single white feather. A gull feather? She searched the sky for an answer. Putting her arms around knees, she closed eyes to hold in the tears (眼泪). “Kee-aah! Kee-aah!” Katie sat up. “Katie! Katie!” Soon, Dad and Uncle Ralph appeared. “How lucky! We heard Gulliver as we came around the rocks,” Uncle Ralph said, “At least… it sounded like him. Strange, he was nowhere in sight.” Katie remembered the feather. “I thought I heard him, too.”—Adapted from the story by Gillian Richardson5.Katie took a camera to the harbour in order to take a picture of ________.A.Gulliver B.Ernest C.sparrows D.boats6.What’s the right order of the following events about Katie?①She was trapped on a rock by a storm.②She lay in her stroller on the floating dock.③She followed the small ducks running towards water.A.①②③B.①③②C.②③①D.②①③7.Which of the following can show the change of Katie’s feelings in Paragraph 3?A.sad—peaceful—excited B.sad—excited—nervousC.helpless—hopeful—thankful D.helpless—thankful—nervous8.What’s the best title for the story?A.Katie and Gulliver B.Katie’s HolidaysC.Katie and Dad D.Katie’s Tears03(2023·江苏宿迁·校联考一模)Marie didn’t like Eva’s friendship with Tom, so she told her husband that she didn’t want any smell of horses in the house. St Clare told Tom to stop working with the horses. Eva told her father she liked going for walks with Tom. So Tom had orders to leave what he was doing when Eva needed him. Eva and Tom spent a lot of time together.Tom noticed that St Clare didn’t look after his money and his house very well, and that he spent too much money on the wrong things. He started making some suggestions, and soon St Clare understood that Tom’s business advice was very good. After some time Tom started to look after the house expenses(费用).Tom also noticed that his master didn’t take anything seriously and didn’t live well, and this worried him. One night St Clare went to a party where he drank too much. He came home very late, and Tom and another slave(奴隶)had to help him to get into bed. Tom went into his room and prayed(祈祷)for his master.The morning after, St Clare gave Tom some money to do some business for him. Tom took the money but he didn’t move.“Well, Tom, what are you waiting for?” said St Clare. “Is everything alright?”“I’m afraid not, Master,” said Tom.“What’s the problem? You look very serious.”“I feel very bad, Master. I thought that Master was always going to be good to everybody.”“Well, Tom, am I not? Do you need anything?”“No, Master is always good to me. But there is someone that Master isn’t good to.”“What do you mean?”“I thought about it last night. Master isn’t good to himself.”St Clare felt his face become red, then he laughed. “Oh, Tom!” said St Clare, with tears in his eyes. “Well, you’re right. Never again, Tom, I promise.”—Adapted from Uncle Tom’s Cabin9.Tom was asked to, leave what he was doing to ________A.work with horses B.go for walks with EvaC.spend some time with St Clare D.look after money for St Clare10.In Paragraph 3, the thing that worried Tom is ________.A.St Clare asked Tom to look after his moneyB.St Clare drank too much every dayC.St Clare didn’t look after himself well and didn’t live wellD.St Clare didn’t look after Tom well11.The underlined word “himself ” in Paragraph 12 is ________.A.Maria B.St Clare C.Eva D.Tom12.According to the passage, the correct order of the story is ________.a. Maria was unhappy with Eva’s friendship with Tom.b. St Clare felt moved and joyful when he laughed.c. St Clare gave Tom some money to do some business for him.d. Tom’s master spent too much money on the wrong things.A.adcb B.abcd C.badc D.dabc13.From the passage, we know that Tom was a ________ person.A.lazy but smart B.kind but stupid C.caring and brave D.lazy and stupid04(2023·湖南长沙·统考二模)The Adventures of Huckleberry Fine by Mark Twain is one of the first Great American Novels. It was also one of the first major American novels ever written by using Local Colorism(地方色彩主义). The Adventures of Huckleberry Finn is famous for its colorful description of people and places along the Mississippi River.This book is about how a boy called Huck set the slave(奴隶)free and realized his dream of living an adventures life. In order to get out of his father’s control. Hook pretended that he was dead by Jim, who is practical and loyal to friends. Jim went together with Huck in the journey, and they became friends after experience. scenes of adventures. In their voyage, they met two frauds(骗子). One called himself king, the other duke. Because of the king, Jim got caught by his master. By an expected chance, Huck and Tom, best friend of Hack. Got together, and they decided to set Jim free. At last, they made it.Although the book has been popular with young readers since it came out, the book immediately became controversial(有争论的)and has remained so today because the Southern society that it satirized(讽刺)had already been history.14.Where did the story happen in The Adventures of Huckleberry Finn? ________A.Along the Mississippi River.B.In the southern states.C.In Canada.15.What is the plot(情节)of the story? ________①Huck met a run-away slave. Jim.②Huck met two frauds.③Huck pretended to be dead.④Jim was caught by his master and then set free.A.①②③④B.③①②④C.③②①④16.What does the underlined word “pretended” mean in Paragraph 2 ________.A.否定B.承认C.假装17.We can read the following in the passage EXCEPT ________.A.history of Local ColorismB.Huck’s life experienceC.popularity of the book18.What can we learn from the passage? ________A.It’s Buck’s dream to live a peaceful life.B.The book has gained a lot of attention.C.Huck succeeded in setting Jim free on his own.05(2023·吉林长春·统考一模)They left the busy streets and went to a part of the town Scrooge never visited. It was a terrible place. The streets were dirty, and the smell was very bad. The houses and shops were of the poorest kind. The people were all thin, dirty, and they looked very ill. Everything was ugly.They came to where an old man sat. He was selling dirty pieces of cloth, smelly old bones, and all kinds of old and useless things. As they watched, two old women and an old man, equally dirty, smelly, and ugly came into the shop. They carried large bags.“Come and sit by the fire,” the shopkeeper said. “Tell me what you have to sell me.”“Nothing a dead man will miss,” the first woman said with a nasty(让人讨厌的)laugh.“If he wanted to keep them after he was dead, why wasn’t he a good man when he was alive? If he had been, he would have had someone to look after him. He would not have died alone.”“That’s very true,” said the second woman, putting a few clothes on the floor. “He got the death he deserved.” She pointed at the clothes. “What will you give me for those, Joe?” She asked the shopkeeper, adding, “I did nowrong taking them from the dead man’s house.”The shopkeeper looked at everything the woman wanted to sell him and put a price on it. Then he added everything up. The final amount was very small.“That’s not much,” the woman said.“Take it or leave it,” the shopkeeper said. “I won’t pay a penny(便士)more.”—Taken from A Christmas Carol根据短文内容,选择最佳答案。

英文名著The Legend of Sleepy Hollow

英文名著The Legend of Sleepy Hollow

Such is the general purport of this legendary superstition,
which has furnished materials for many a wild story in that
region of shadows; and the spectre is known at all the country
I recollect that, when a stripling, my first exploit in
squirrel-shooting was in a grove of tall walnut-trees that shades
one side of the valley. I had wandered into it at noontime, when
A pleasing land of drowsy head it was,
Of dreams that wave before the half-shut eye;
And of gay castles in the clouds that pass,
ห้องสมุดไป่ตู้
holds a spell over the minds of the good people, causing them to
walk in a continual reverie. They are given to all kinds of
marvelous beliefs; are subject to trances and visions, and
known by the name of SLEEPY HOLLOW, and its rustic lads are

CPN

CPN


Loss of packets
if Ok(s,r) then 1`(n,p) else empty


The function Ok(s,r) checks whether r s. For r 1. .8, Ok(s,r)=true. The token is moved from A to B. This means that the packet is successfully transmitted over the network. For r 9. .10, Ok(s,r)=false. No token is added to B. This means that the packet is lost. The CPN simulator makes random choices between bindings: 80% chance for successful transfer.
Counter
Simple protocol
Counter
Simple protocol
Data received
Simple protocol
Send packet

p = "Modellin"
INTxDATA
The binding is enabled.
<n=1,p="Modellin">
Send
(1,p)
(n,p)
1`(1,"Modell in") + 1`(2,"g and An") 8 + 1`(3,"alysi s b") + 1`(4,"y Means ") + 1`(5,"of Colou") + 1`(6,"red Petr") + 1`(7,"i Nets##") + 1`(8,"########") INTxDATA
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

ACTORS AND COLOURED PETRI NETS IN THE DEVELOPMENT LIFE CYCLE OF DISTRIBUTED REAL TIME SYSTEMS Giancarlo Fortino, Libero Nigro, Francesco PupoDipartimento di Elettronica Informatica e SistemisticaUniversità della Calabria, I-87036 Rende (CS) - ItalyEmail: {g.fortino,l.nigro,f.pupo}@unical.itAbstract: This paper describes an actor-based framework for the development of distributed real-time systems which centres on a holistic approach to the fulfilment of application functional and temporal requirements through an application tuneable operating software in the form of a reflective scheduling structure. The framework makes it possible to prototype and execute a specification of a given system by Coloured Petri Nets in order to verify behavioural and timing constraints. The methodology favours a smooth transformation of an analysed system to a design and implementation in popular object-oriented languages like C++ and Java.Keywords: actors, modularity, timing constraints, Coloured Petri Nets, temporal analysis.1. INTRODUCTIONIn the last years many efforts have been devoted to an exploitation of modularisation and more general software engineering principles in the real-time area, e.g., (Bergmans and Aksit, 1996) (Ren et al., 1996). The main difficulty is concerned with a selection of suitable abstractions which can favour modularisation without impairing fundamental aspects of real time design such as time management (scheduling) and control of the underlying physical architecture. Conventional solutions, e.g., based on plain sequential object-oriented mechanisms or built on top of standard, possibly stripped-down, Operating Systems relying on over-killing concurrent facilities (e.g., scheduling driven by priority and pre-emption) can be inadequate for real time since they can be lacking of essential abstractions (e.g., concurrency) or cannot be able of guaranteeing a time-predictable environment.This work claims that an integrated approach based on user-defined scheduling and selected real time abstractions can be the basis for a predictable and modular architecture for time critical systems. A methodology is proposed for distributed real-time systems which is based on an adaptation of the Actor model (Agha, 1986) with a reflective and time-driven scheduling structure (Kirk et al., 1997) (Nigro and Pupo, 1997).The methodology defines a full system development life cycle. Specification and verification activities are supported by Coloured Petri Nets (CPN) (Jensen, 1992) (Nigro and Pupo, 1998) which allow a formal description of the basic building components.Property analysis, e.g., checking that timing constraints are met, rests on prototype execution and simulation. The CPN model can be iteratively evaluated during a development as more precise timing information is available from the final target architecture. The approach ensures a smooth transition from system analysis to design and implementation in popular object-oriented languages.2. A MODULAR APPROACH TO REAL TIMEPROGRAMMINGIn the proposed approach (Kirk et al., 1997) (Nigro and Pupo, 1997) a system is decomposed into a collection of subsystems linked one to another by a (possibly deterministic) communications network. A subsystem is the unit of programming in-the-large. Timing constraints can be local and/or global. An interaction policy is required in general at the system level in order for the subsystems to correctly co-operate in the fulfilment of system-wide timing constraints.A subsystem is structured as a group of actors plus a control machine (see Fig. 1) which is in charge of message scheduling and dispatching. Actors are the basic building blocks in-the-small. They interact one to another by buffered messages. To help modularisation and time predictability, a variant of the Actor model (Agha, 1986) is actually adopted. Actors are modelled as finite state machines which implement functional behaviour only, i.e., message services. Processing a message consists of a state transition and the execution of an atomic action. At most a single message can be under processing in an actor at a given time. As in the Actor model three basic operations are provided:•new, for the creation of new actors. The data component of an actor includes as attributes a set of acquaintances, i.e., the known actors (including itself) to which messages can be sent•send, for transmitting an asynchronous message to a destination actor. The message can carry data values.The sender continues immediately after a send•become, for changing the actor current state. Each state defines a specific behaviour, i.e., a particular way to react to expected messages. The processing of an unexpected message can be postponed by storing it in data or state.Actors are not aware of timing aspects. All of this improves reusability since actors can be used according to different application timing scenarios (Nigro and Tisato, 1996). Timing constraints are handled within reflective actors which act as schedulers in the control machine. A scheduler is a filter (Bergmans and Aksit, 1996) which transparently captures local or network originated messages and apply to them scheduling actions. Scheduler is also responsible of translating, with the help of application actors, from the external network message format into the local format of the subsystem address space.Actors are concurrent units. Concurrency is ensured, in a subsystem, by message processing interleaving. The Controller component of the control machine repeats a control loop where a message at a time is selected from the Message Plan according to a control strategy, and dispatched to the relevant application actor. The latter provides the service requested by the message and can in turn generate new local or network messages. Local generated messages and incoming network messages are eventually scheduled by the Scheduler component by applying suitable time clauses (Ren et al., 1996) (Nigro and Pupo, 1997). After that the Controller loop is repeated and so forth.The control machine can be customised through programming. First of all, the Scheduler actor can be replaced to reflect special application-dependent requirements. In addition, messages can be scheduled in the Message Plan according to different timing schemes and Real Time Clock systems. For example, a time validity interval [t min, t max] can be attached to each message m to express the constraint that m can’t be dispatched before t min and should not be dispatched after t max to avoid a timing violation. In this case, the selection process of the Controller should be based on a Earliest Deadline First (EDF) strategy. In a more soft real time context, messages could simply be timestamped by their dispatch time in a timeline to achieve a control strategy where messages should be delivered as soon as the dispatch time has expired. Minimum timestamp would guide the message selection process of the Controller. Other solutions are possible.Connection to the controlled environment (e.g., an industrial plant) rests on terminator actors which have an interface to an I/O device driver and another to regular actors to which normal messages can be transmitted to. As often is the case, terminator actors are periodic and can be driven by a scheduler which provide periodic time clauses.3. A CAN BASED CRUISE CONTROL EXAMPLE The following describes a CAN based distributed cruise control system (Luqi, 1993) whose goal is, when enabled, to keep a car at a goal_speed by acting on the throttle. CAN (Kirk, 1995) is a priority bus capable of ensuring deterministic transmission times for both high and low priority messages (Tindell et al., 1995). It can operate in hostile physical environments and require a preliminary design phase of assigning priority to network messages during which each message receives a unique identifier used to resolve conflicts during simultaneous attempts to transmissions.The example system is partitioned into four subsystems: Motion, Driver, Cruise and Operator. Each subsystem is composed of one actor and associated control machine. Operator is used to Init (i.e., making ready to run), Start (i.e., triggering into execution) and Stop (i.e., making no operating, for safety reasons) the system. Cruise hosts the control system. Motion reads the speed from a speedometer and acts upon the throttle. Driver senses the buttons Set and Resume, respectively used by the driver to engage cruising at the current speed and to resume cruising to a previously goal_speed set. Driver is also sensitive to each use of the Brake and the Accelerator.Motion includes speed (float), slope (float) and throttle (float) data attributes. Cruise has attributes such as speed (float), goal_speed (float), throttle (float) and accelerator (float).The behaviour of the entire system is periodic. The basic period p1 is dictated by speed sensor technology. In the following a frequency of 10 readings/sec is assumed, corresponding to a p1=100 ms.The overall periodic behaviour is ensured by having the system which is initialised and started “synchronously” by the Operator (the character of CAN as a network with a “virtual zero” transmission time, when comparing the time granularity of the application (ms) with the effective transmission time of a typical control packet (e.g., 130 µs), should be noted) and by ensuring that Motion and Driver are internally periodic.Although Brake, Set, Resume and Accelerator are naturally sporadic sources of messages, for the purposes of the example, also considering the physical dynamics of thesystem, they are polled periodically with a period p2 of 1 s.Therefore, both Motion and Driver use a local Read message for maintaining the reading process.In response to the Read message, Motion and Driver sample the external environment for reading respectively the Speed (Motion), Set (Driver), Resume (Driver), Brake (Driver) and Accelerator (Driver). Motion/Driver will send to Cruise the just read quantity through a suitable Speed ,Set , ... message. Normally, Driver will find only one external condition verified per period. Indeed, the use of Set is mutually exclusive with Resume and so forth. The sensed condition is transferred to Cruise by an inter-subsystem message.As a consequence of a Read message, two transactions or threads of control (chains of causally connected messages)are respectively started in Motion and Driver. The thread originating into Motion is composed of the Speed message sent to Cruise, followed by the Throttle message generated by Cruise toward Motion. The second thread ends in the Cruise subsystem since any sensed variable affects only the Cruise state (e.g., enabling/disabling cruising).For safety reasons, Brake or Accelerator , which can disengage cruising, are to be handled with a tight deadline of 1 ms measured since the capture time. On the other hand, during cruising the throttle is required to be acted within a 100 ms deadline. Similarly, a stop command from the operator is expected to be managed within 1 ms. Figure 2 summarises the timing requirements of critical threads.Figure 2: Timing requirements of critical threads.Figure 3: Cruise actor functional behaviour.Object Oriented Analysis (OOA) methods like Shlaer-Mellor, OMT ... can directly be used for visualisation purposes of static structure and dynamic behaviour of actors. Figure 3 summarises the State/Event/Action model of the cruise actor. It should be self-explanatory.3.1 Ensuring real-timenessDifferent factors, local + global, contribute to ensuring the real-timeness of an actor system. In the small, message responses (actions) in actors must have a bounded execution time. Therefore some constructs should be avoided (e.g., recursion, loops without bounded iterations,dynamic data structures ... ). In the large, an adequate interaction policy among the various control machines must be designed which depends on the application requirements and the assumptions of the adopted communications network. For the cruise example over CAN, an interaction policy results from a priority assignment to network messages and a suitable choice of the time clauses within the schedulers. The following message priority ordering is assumed( Stop , Init , D_OkInit , M_OkInit, C_OkInit, Start , Brake ,Accelerator , Speed , Throttle , Set , Resume ).Figure 4 summarises the time clauses embodied by the different schedulers, in Java syntax. m denotes a “just sent message”. Scheduling uses time validity intervals for messages (see section 2). m.cause() denotes the message whose processing generated m . m.iTime() returns the invocation time of m . now() returns the current time.Figure 4: Scheduler time clauses.It is worth noting that the Cruise subsystem acts as a global supervisor and is strictly reactive. In addition, timing information such as p1 and p2 are fed to the scheduler actors during initialisation.4. COLOURED PETRI NETS AND VALIDATIONACTIVITIESComponents of the described actor framework (actors,subsystems, schedulers, control machines, network interfaces and protocols, ...) can be formally described by Coloured Petri Nets (CPN) (Jensen, 1992) to enable validation activities (Jensen, 1994). The aim is to build a system specification which can be executed in order to test both functional and temporal properties (Nigro and Pupo,1998). CPNs can be used in the context of Design/CPN (Jensen et al., 1996) which favours the specification of a complex system by modularising it into subnets (pages )structured hierarchically.The following shows some components of a CPN model for the cruise control example. Fig. 5 is the topmost level page in the model. It represents the more abstract view of the system and consists of the four subsystems linked to one another by CAN. Each high-level component is modelled by a substitution transition and in turn is Hierarchically Substituted (HS) in a subpage containing the specialisationdetails. The substitution operation is accomplished by a binding between sockets in the super page and corresponding ports in the subpage. Fig. 6 depicts a CAN subnet. NBufIn is a port-place linked to all the output socket-places in the various subsystems. It is used to broadcast a network message. The token-message list in NBufIn contains, at any moment, the set of sent messages ranked by priority, waiting to be transmitted by CAN. Transition CANarb models the arbitration process. The highest priority message is actually selected by CANarb only when the network is idle. Transition CANTransmodels the message broadcast and its transmission delay.Figure 5: Top level CPN model for the Cruise system.Figure 6: The CAN subnet Fig. 7 shows the Cruise subsystem subnet. It includes the control machine, the Cruise actor and the input/output interfaces to CAN.The list of the expected external messages is carried by the token in the ExpMsgs place. A CAN message is actually received by the transition FromCAN which translates and appends it to the local generated message list (place CMPIn). An output network message is transmitted by ToCAN transition which inserts it ranked into the message list of NBufIn place of the CAN net (NBufIn and ToNetP are mirroring places). The scheduler subnet applies the time clauses of the Cruise subsystem according to Fig. 4. The controller subnet implements message selection and dispatching operations of the control machine. Selection is based on the EDF strategy. The Cruise actor subnet is shown in Fig. 8. The model embodies the State/Event/Action diagram of Fig. 3. It generates CAN messages through the CAToNet place which mirrors ToNetP1 output place of Fig. 7. The time-consuming activity (action) is implemented by transition CruiseAct which is in charge of accepting an incoming message and processing it by suitable arc inscriptions (ML functions) which update the actor internal status and attributes.4.1 Temporal analysisDesign/CPN allows both informal and formal analysis methods to be applied to an achieved system model. Informal analysis can be based on model simulation (specifications testing (Ghezzi et al., 1991)), i.e., by providing an initial marking and then by tracing one or more possible resulting behaviours. By observing these behaviours the analyst can realise whether or not the specified system meets functional or temporal requirements.Formal analysis consists in defining general properties of the net model which reflect special types of desirable (or undesirable) behaviours of the specified system, and then using the specification to formally prove (or disprove) such properties. For this purpose the occurrence graph (OG) method (Jensen, 1994) can be used. An OG is a directed graph which has a node for each reachable marking and an arc for each occurring binding element. An arc links the node of the marking in which the associated binding element occurs to the node of the marking resulting from the occurrence. All standard properties like absence of dead markings, reachability and boundedness analysis ... can be checked on the OG. It is worthy of note that the OG may become very large, even for relatively small nets, that it cannot possibly be generated even with the most powerful computer. Another limitation is dependency from the initial marking: each possible initial marking may originate a different occurrence graph.Functional analysis of the Cruise system was conducted by using a simple mathematical model for the motion model (Luqi, 1995) and by tracing the causally connected messages of every thread at the Design/CPN graphical user-interface, e.g., by a step-by-step simulation.From the temporal point of view Design/CPN doesn’t provide specific analysis techniques. However, the general support for functional analysis together with a primitive time notion, ensured by a global clock, can be used toachieve a timing analysis framework for actor systems (Nigro and Pupo, 1998). Transitions can be assigned a delay. Tokens are timestamped by transition fire times. Generated tokens are frozen in the output places until the system clock gets advanced to their timestamp. At any instant the system clock is advanced to the token timestamp representing the minimum time increment in the whole CPN model. The timestamp of a token can be modified by a transition predicate or an arc inscription. This was exploited in the realisation of the control machine subnet where, in general, the selection of the next dispatch message from the Plan can require an update of the system clock to the lower bound of the message time validity interval.The frozen behaviour of generated tokens is compatible with the simulation of a distributed system. Different actors into different subsystems/processors are capable of concurrent execution. However, the simulated CPN clock is always augmented by the minimum timestamp thuspreserving its chronological advancement.Figure 7: The Cruise subsystem subnet.Figure 8: The Cruise actor subnet.Besides querying the OG for standard properties, specific ML functions can be introduced for checking non standard properties. One such a function can capture the verification of a temporal property in positive ornegative form, e.g., one like the following: “is it always true that for each instance of a given transition firing (representing, e.g., the beginning of a thread) there always (as the OG state space allows) exists an instance of the corresponding transition firing (modelling, e.g., the end of the thread) such that the time distance between them is less than a fixed time interval (e.g., deadline of thread execution) ?” The negative form of a property can be more immediate. In this case the existence of a single occurrence of a searched event that contradicts the property is sufficient to assert that the property doesn't hold.For the temporal analysis of the Cruise system, the actor transitions were annotated by an estimation of worst-case-action-execution-times, which were 40 msec for the Motion, 0.4 msec for the Cruise and 10 msec for the Driver. The system was then studied by generating its OG for a simulation period where significant activity occurs, e.g., by ensuring that when cruising is enabled multiple and conflicting threads are interleaved.Fig. 9 exemplifies an ML check function that verifies the deadline of cruising under automatic control. For simplicity, the transmission of message data is disabled, thus focusing on temporal aspects only. Similar functions can be written for checking the deadline of a Brake or Stop message.fun CruiseDeadln(): Arc list =PredAllArcs(fn a =>if ((ArcToTI(a) = TI.MotionActor'MotionAct 1)andalso(StripTime(Mark.MotionActor'PSNet 1 (DestNode(a))) =((1,(Speed,0.0))!!empty))) thennull(PredArcs( EntireGraph, fn b =>if ArcToBE(b) = Bind.MotionActor'MotionAct(1,{msg=Throttle,slope=0.0,speed=0.0,throttle=0.0,value=0.0})then ((OccurrenceTime(b)-OccurrenceTime(a))<100.0)andalso (DestNode(b)>DestNode(a))else false, 1))else false)Figure 9: Cruise control deadline checking function. CruiseDeadln() tries to build a list with instances of the MotionAct transition of Motion actor corresponding to the generation of a Speed message (beginning of thread) which are followed by a causally connected instance of the MotionAct transition corresponding to a Throttle processing (termination of the thread) which doesn’t fulfil the deadline. The function always returns an empty list, thus the property is satisfied.The CPN model supports incremental development according to a spiral system life cycle (Verber et al., 1997). As the temporal information (message processing times) become more precise, i.e., the project is tuned to the target physical architecture, system timeliness can be re-checked and requirements possibly adjusted to ensure guaranteed schedulability. The key point is that the CPN model closely mirrors the design and implementation models. Conclusions drawn from the analysis model can directly be interpreted at the more low level stages of development.6. CONCLUSIONSThis paper describes a computational model based on actors which makes it possible to develop distributed real-time systems. The model favours time-predictability and relies on non-preemptive light-weight concurrency.A distributed system can be formalised by Coloured Petri Nets (CPNs) in order to support functional and temporal validation activities. Ensuring predictability at the system-level strongly depends on the adopted communications network.Directions of current work cover an application of the actor framework and CPN modelling to challenging distributed measurement (Grimaldi et al., 1998) and multimedia systems (Fortino et al., 1998) over Internet.ACKNOWLEDGEMENTWork carried out under the financial support of the Ministero dell'Università e della Ricerca Scientifica e Tecnologica (MURST) in the framework of the Project "Methodologies and Tools of High Performance Systems for Distributed Applications".REFERENCESAgha, G. (1986). Actors: A model for concurrent computation in distributed systems, MIT Press.Bergmans, L. and M. Aksit (1996). Composing synchronisation and real-time constraints. J. of Parallel and Distributed Computing, September.Grimaldi, D., L. Nigro, and F. Pupo (1998). Java based distributed measurement systems. To appear on IEEE Trans. on Instrumentation and Measurement.Fortino G. and L. Nigro (1998). QoS centred Java and actor based framework for real/virtual teleconferences. Proc. of SCS EuroMedia98, Leicester (UK), pp. 129-133.Jensen, K. (1992). Coloured Petri Nets - Basic concepts, analysis methods and practical use. Vol. 1: Basic concepts. EATCS Monographs on Theoretical Computer Science. Springer-Verlag.Jensen, K. (1994). Coloured Petri Nets - Basic concepts, analysis methods and practical use. Vol. 2: Analysis methods. EATCS Monographs on Theoretical Computer Science. Springer-Verlag.Jensen, K., S. Christensen, P. Huber and M. Holla. (1996). Design/CPN. A reference manual. Computer Science Department, University of Aarhus. Online: http://www.daimi.aau.dk/designCPN/.Kirk, B. (1995). Real time protocol design for Control Area Networks. Proc. of Real Time Systems’95, pp. 251-268. Kirk, B., L. Nigro and F. Pupo (1997). Using real time constraints for modularisation. Proc. of Joint Modular Languages Conference, Springer-Verlag, LNCS 1204, pp. 236-251.Luqi (1993). Real-time constraints in a rapid prototyping language. Computer Languages, 18(2), pp.77-103.Nigro, L. and F. Pupo (1997). A modular approach to real time programming using actors and Java. Proc. of 22nd IFAC/IFIP Workshop on Real Time Programming, Lyon, 15-17 September, pp. 83-88.Nigro, L. and F. Pupo (1998). Using Design/CPN for the schedulability analysis of actor systems with timing constraints. Proc. of Workshop and Tutorial on Practical use of Coloured Petri Nets and Design/CPN, University of Aarhus, Aarhus Denmark, 8-12 June.Nigro L. and F. Tisato (1996). Timing as a programming in-the-large issue. Microprocessors and Microsystems, 20(4), pp. 211-223.Ren, S., G. Agha and M. Saito (1996). A modular approach for programming distributed real-time systems. J. of Parallel and Distributed Computing, Special issue on Object-Oriented Real-Time Systems.Tindell K., A. Burns and A.J. Wellings (1995). Analysis of hard real-time communications. Real-Time Systems, 9(2), pp.147-171, September.Verber D., M. Colnaric, A.H. Frigeri and W.A. Halang (1997). Object orientation in the real-time system lifecycle. Proc. of 22nd IFAC/IFIP Workshop on Real Time Programming, Lyon, 15-17 Sept. 1997, pp. 77-82.。

相关文档
最新文档