文档库 最新最全的文档下载
当前位置:文档库 › On the Specification of a Component Repository

On the Specification of a Component Repository

On the Specification of a Component Repository
On the Specification of a Component Repository

On the Speci?cation of a Component Repository

Nuno Rodrigues1and Luis Barbosa2

1Sidereus,S.A.,Porto,Portugal

nfr@sidereus.pt

https://www.wendangku.net/doc/8d2855081.html,rm′a tica,Univ.Minho,Braga,Portugal

lsb@di.uminho.pt

Abstract

The lack of a commonly accepted de?nition of a software component,the proliferation of competing‘standards’and component frameworks,is here to stay,raising the fundamental

question in component-based development of how to cope in practice with heterogeneity.

This paper reports on the design of a Component Repository aimed to give at least a partial

answer to the above question.The repository was fully speci?ed in Vdm and a working

prototype is currently being used in an industrial environment.

1Introduction

”I’m sure this problem has already been solved”and”probably,others would like to(re)use my solution”,are common concerns in the everyday life of a programmer.Concerns that the emerg-ing of component-based programming paradigm aims to transform into e?ective programming practises.Actually,all engineering disciplines rely on standard components to design and build their artifacts and development methodologies based on third-party assembly of components—software engineering should not be the exception.

Although the term software component has been around for a long time,component-based pro-gramming has become a buzzword since mid1990’s(see,e.g.,[10,15,14,9,17]).The basic motivation is to replace conventional programming by system’s construction by composition and con?guration of reusable o?-the-shelf units,often regarded as‘abstractions with plugs’.Or, quoting from[15],‘independently deployable unit of composition with contractually de?ned in-terfaces’.The paradigm is often illustrated by the visual metaphor of a palette of computational units,treated as black boxes,and a canvas into which they can be dropped and plugged together through wires,corresponding to some sort of gluing code.

However,as it happened before with object orientation,component programming has grown up to popular technologies before consensual de?nitions and principles,let alone formal foundations,

47

have been put forward.In particular,it has given rise to a number of increasingly popular technologies designed around speci?c interaction paradigms—e.g.,Corba and JavaBeans based on object-like composition,JavaSpaces and TSpaces on top of shared data space models, typical of classical coordination languages,and channel based techniques inherited from process languages,as in IWIM/Manifold or Drawin.Such technologies also di?er at the application level—e.g.acting as source-level languages extensions(such as Corba or JavaSpaces),or as connector frameworks for dynamic(binary-level)units(as in e.g.,Com https://www.wendangku.net/doc/8d2855081.html,).

From an engineering point of view a key issue to the success of the component paradigm is integration.In fact,unless one restricts himself to a particular framework or,even worse,to a speci?c tool within a framework,it is no easy task to identify,select,re-use and compose heterogeneous software components from a virtual‘global market’(as represented,for example, by the Internet).The lack of a commonly accepted de?nition of‘component’,the proliferation of competing‘standards’and component frameworks,is here to stay,raising the question of how to cope in practice with heterogeneity.

This paper reports on a concrete approach to a component integration problem found in the context of an european-wide industrial software development project(the Ikf Eureka E!2235 consortium).The challenge was to build a component repository(of both source code and interface information)able to register and marketing all the components produced by di?erent teams in the project.The repository was also supposed to act as an exchange market:each user being able not only to register its own components,but also to announce its plans to issue speci?c components and even to publicise its needs and associated requirements in the form of collections of APIs.Although such component marketplaces are emerging in the Web,the underlying description techniques remain rather informal,mainly textual,plus an additional, limited,classi?cation in terms the intended business areas.

In a sense API,the acronym for Application Program Interface,emerged as a keyword.But what is in an API,when the component technology used ranges from Java and Corba code to Haskell or Wsdl?Coming back to Szyperski’s de?nition above,what seems crucial to handle is the de?nition of what an interface is.

Initial prospects of implementing the repository as an API database and resorting to text-based retrieve methods for querying,soon reveal impractical given the heterogeneity of the APIs supplied by the di?erent project teams.As the complexity of the individual components and the size of the repository increases,higher levels of abstraction are required,and,for all practical purposes,going abstract means going formal.The Vdm meta-language[5,4]was chosen as the common language to which di?erent sorts of APIs were mapped.A complete,working prototype of the repository,named CompSrc to express the idea of a‘component source indexing space’, has been developed in the Vdm ToolBox complemented with a dedicated web interface for easier access.

The paper is organised as follows:the CompSrc architecture and the generic component model underlying the whole system are described in the following two sections.Section4discusses some of the composition patterns automatically detected by CompSrc;an example is brie?y

discussed in section5.We conclude with some prospect of future work in section6.

2The CompSrc Architecture

The CompSrc repository is built around a broad characterisation of what an interface to com-ponent source code is,speci?ed in the Vdm meta-language in the early project stages.This is called,in the context of this system,the abstract API.The component source code database is indexed by such abstract APIs which are‘extracted’from the actual component APIs.This is done by extractor functions speci?ed for the typical target languages used in the project.Such extractors correspond to the incoming arrows in Figure1.

In the centre of the structure diagram is the interface repository indexing the actual component source data base.The repository supports the usual management operations—e.g.,registering, removing,updating,etc.The most relevant feature,however,is the support of a component calculator which makes it possible to compute new services based on the automatic composition of old functionality,according to more or less strict interaction patterns,and,then,to build new APIs and new components which would act as if the actual source code has been merged.The interaction patterns available are di?erent kinds of pipelining(linear,?attened or monadic,as described below)as well as multiplicative and additive aggregation,corresponding to component parallel composition and choice,respectively.The underlying component calculus is described in detail in[2,1].Once a new component is built,by the calculator,the new abstract API is registered in the system and the component‘combined’code is supplied,in the form of a conditional compiling script in https://www.wendangku.net/doc/8d2855081.html, notation.This corresponds to the outgoing arrows in the diagram.

3Abstract Interfaces

The‘quest’for a common abstract API format started from a reverse speci?cation of the(static information part of)di?erent sorts of component APIs used in the project.These ranged from the‘object-oriented?avour’,emphasising hierarchical class structures,to‘functional modules’described by service signatures and,eventually,datatype constraints.The formal analysis of typical API examples in Java,Corba,Microsoft Visual Basic,Haskell and Wsdl,which is documented in[11],lead to the description of a component as an indexed collection of services (referred to as modules in the sequel)and mirroring the overall component architecture described in Figure2.

Each module is,then,de?ned as an ordered tuple of information including the following aspects:

1.Desc-a text description of the current module

Figure1:Component Space Architecture

2.INH-a set of imported modules

3.Ex-a map enumerating examples concerning the module usage

4.Func-the set of functions(?ne-grain services)de?ned in the module

5.State-the implementation state of the module which is one of:

?Implemented-the module is implemented and ready to use

?In Implementation-the module is currently in implementation process

?Requested-someone is interested in this module and is willing to pay for it

?To Convert-the module is speci?ed in a language but needs to be implemented in

a di?erent platform

?Generated-generated by the‘component calculator’in CompSrc

6.Platform-the target implementation platform

7.StatDep-the static dependencies set,i.e.,environment variables,runtime environments,

...

8.Protocols-a brief description of the communication protocols that the module imple-

ments

9.SpecAPI-speci?c(platform-dependent)module data for each kind of API,basically

distinguishing purely functional interfaces from state-based ones(as found in object-orientation)

Figure2:Structure of a Component

Figure3:Component DataType

4Component Assembly

For each API submitted to CompSrc a corresponding abstract API(i.e.,a value of the respec-tive Vdm datatype)is built by the(language-dependent)interface extractors mentioned above. Such abstract APIs provide the basis for classifying,locating and retrieving components from the underlying repository.Furthermore they become the‘raw material’used by the component calculator to generate new components.

Such generation is done in two di?erent,but complementary,ways:aggregation and wiring. Component aggregation is achieved by the application of a small set of operators acting on the abstract interfaces as a whole1.In particular,they model:

?Interface restriction to a set of modules or even,within a particular module,to a set of 1see[2]for an overview of the corresponding calculus partially implemented in CompSrc.

Figure4:Module DataType

services.

?Additive aggregation,in which di?erent modules coming from two di?erent interfaces are selected and packaged into a new one.If both interfaces are indexing actual code written in compatible implementation languages(i.e.,related by an embedding)the code generation process is activated.

?Multiplicative aggregation,corresponding to the synchronous execution of modules in two di?erent components.

The wiring process,on the other hand,is based on the search for composition possibilities among the collections of functions of a speci?ed set of components.Such search can be systematic, exposing all possible connections arising from a given set of components,or user-oriented in which each possible composition is validated or discarded by the user.In any case the problem is to identify pairs of functions,in di?erent components,whose range and domain match,according to some matching criteria detailed below.Note that the collection of functions in a component abstract API models the available?ne-grain services.

As shown above in the respective speci?cation(Fig.4),a module records interface information for each function in its function set.Such information amounts basically to the signature,i.e., a type declaration of its arguments and result.It becomes clear that a uniform speci?cation of the datatypes used in all components registered in CompSrc is a key issue in the design of the repository.Therefore,when an abstract API for a submitted component is built,each extractor engine analysis the available type information to build a correspondent abstract representation in the form of(instances of)polynomial functors.A brief explanation is now in order.

A function

f:I?→O

models a computational process as a transformation rule between two structures I and O,i.e., as a recipe(a tool,a technology)to build‘gnus’from‘gnats’.

Types I and O may be‘primitive’(i.e.,de?ned as such at the programming language level). Often,however,such is not the case.For example,one may know how to produce‘gnus’from ‘gnats’but not in all cases.This is expressed by observing the output of f in a more re?ned context:O is replaced by1+O and f is said to be a partial function.In other situations one may recognise that there is some environmental(or context)information about‘gnats’that,for some reason,should be hidden from input.It may be the case that such information is too extensive to be supplied to f by its user,or that it is shared by other functions as well.It might also be the case that building gnus would eventually modify the environment,thus in?uencing latter production of more‘gnus’.For U a denotation of such context information,the signature of f becomes

f:I?→(O×U)U

In both cases f can be typed as

f:I?→F O

for F X=X+1and F X=(X×U)U,https://www.wendangku.net/doc/8d2855081.html,rmally,F can be thought of as a type transformer providing a shape for the output of f.Technically,F is a functor2The notation used above(exponentiation and+)stand for some basic datatype(and functor)constructors which express the ways in which‘types’(information,in general)can be composed.Such basic constructors are

?Cartesian product(A×B)for aggregation in the spatial axis;

?sum(A+B),for choice(i.e.,aggregation in the temporal axis);

?exponentiation,or function space,(A B)for functional dependence;

?constants,like the exception type1or,in general,any primitive type;and

?powerset(P A)and sequences(A?)related to non deterministic and deterministic collec-tions of data,respectively.

These constructors can be found almost directly in high-level languages(such as,e.g.,Haskell or the Vdm meta-language)and inferred in a systematic way from other programming nota-tions.Functors built from(and closed by)such constructors plus functor composition are called (extended)polynomial and extensively used in the repository to record functions’signatures. In general,each function in the abstract API is speci?ed as

F I→

G O

2A concept borrowed from category theory(see e.g.,[7,8]or[3]for a computer science perspective)capturing a uniform transformation of both‘types’and‘type-preserving’operations.

where I and O are the import(respectively,export)datatypes embedded in a behavioural context F(respectively,G)represented as a polynomial functor.For example a non deterministic service may be modelled by a function serv:I?→P O,where P stands for the(?nite)powerset functor.Similarly a service in the form of a partial transducer may take the form of machine: I?→1+(O×I)K.

This sort of embedding through a functor entails the need to equip CompSrc with the ability to compare functors involved in the datatypes of function signature’s.Functor(structural)equality and functor instantiation order are achieved by the comparison functions listed in appendices A and B.

Based on such functions the repository is able to perform di?erent types of‘functional’compo-sition,besides the obvious one between functions sharing the domain of one with the codomain of the other.In particular the following‘extra’pipelining composition patterns are considered:?Curry insensitive,which allows to perform curry or uncurry on a pair of otherwise no composable services.

?Monadic,whenever the context information is captured by a monad(which,as shown in

[1]is often the case)3.Monadic composition includes both the usual Kleisli composition

of monadic functions used in functional programming,and a simpler scheme amounting to the monadic embedding of a‘plain’function.Both cases are illustrated in Figure5.

Kleisli composition of functions f and g is achieved by?attening(with the corresponding multiplicationμ)the result of the top line composition scheme.The bottom line scheme represents monadic embedding.

The speci?cation of the wiring process is based on the structural comparison functions mentioned above to relate,up to the intended composition pattern,functions input/output contexts.

5An Example

The example shown in this section illustrates the identi?cation of composable functions in two rather di?erent components,developed in the context of the Ikf project,by di?erent groups and using di?erent technologies.This example is fully documented in[12],to which the interested reader is referred to.

The?rst component is a Vdm-SL speci?cation of a robot which manages box storing inside a generic warehouse.The component provides functionality to,e.g.,?nd the best?t of a box

3A monad is also a concept borrowed from category https://www.wendangku.net/doc/8d2855081.html,putationally,it stands for a functor,repre-senting some sort of‘computational e?ect’,equipped with an embedding function(η:X?→F X)to‘see’simple values as F-computations and a multiplication(μ:FF X?→F X)to‘?atten’computational e?ects(see,eg,[16])

Figure5:Monadic Composition

inside the warehouse storing space,remove a box,rearrange the warehouse in order to get the biggest amount of free space,etc.

The second component is a web-publisher generator from any sort of information organised as a leaf tree(i.e.,a binary tree with all information stored on the leafs),developed in Haskell. This component provides,in particular,a function y2html to generate the Html representation of a leaf tree value.

In appendix C part of the abstract interfaces generated for CompSrc from the sources of these two components are shown.As a remark note the type information derived,in the second component,from the following Haskell declaration:

data Y a b i=Leaf(Unit a b)|Node(Mode i,(Y a b i,Y a b i))

deriving Show

data Mode i=Hr i|Hl i|Vt i|Vb i deriving Show

data Frame i=Frame i i deriving Show

data Sheet a b i=Rect(Frame i)(Y a b i)deriving Show

Applying some of the composition test suites de?ned in the CompSrc leads to the identi?cation of several possible compositions between(the abstract interfaces of)these two distinct modules.The repository is able,in particular,to determine,in an automatic way,that the functors underlying type Space in the robot component and type Y in the web-publisher one are structurally identical.This fact opens the possibility of composing function y2html in the latter component with any function returning values of type Space in the former.Such is the case,e.g.,of functions freeSpace,defragment and whichBoxes.The composition of y2html with any of these functions provides,for free,generators of Html interfaces for the warehouse Vdm prototype.

Such wiring possibility is detected by the application of function compareFunctor(in appendix B)whose result in the Vdm ToolBox syntax,is

{mk_("y2html",{"freeSpace","defragment","whichBoxes"})}

This identi?es a functional wiring scheme between y2html,on one hand,and functions freeSpace,de-fragment and whichBoxes,on the other.It also tells that the order of application for this interaction is y2html following freeSpace,defragment or whichBoxes.

6Conclusions and Further Work

Software development by component assembly is most likely to become the main stream in software engineering in the near future.This will lead to a broader understanding of what a software component is(virtually any sort of content can be encapsulated in a reusable entity with well-de?ned interfaces and able to be connected at runtime)and to the emergence of standardised component frameworks able to integrate heterogeneous components and deal with other such systems in a cooperative manner.The ability to deal with‘non native’components has been recognised as the hallmark of the so-called‘second-generation’component systems[13],a step ahead of what is currently achieved in Corba,JavaBeans or Objectspace Voyager.

The basic lesson learnt from the development of CompSrc is the potential of formal,model-oriented, methods in guiding the design of such platforms.We believe this exercise can be further extended to cope with some issues not covered in the present version,namely,dynamic instantiation of components, location and mobility.Those are fundamental issues for modelling distributed component frameworks.

The CompSrc prototype has been used,not only in the context of the project in which it was originally developed,but also to organise software components arising from a massive re-engineering e?ort of legacy code undertaken by the software company to which the?rst author is a?liated.

Such an architectural re-engineering e?ort aimed to identify service components orthogonal to the basic development layers considered in the design practice(i.e.,database de?nition,middleware and GUI). For each identi?ed component an abstract interface,as described above,has been written and directly submitted to CompSrc together with https://www.wendangku.net/doc/8d2855081.html, script to navigate in the(monolithic)legacy code(which remains unchanged)and generate the actual executable code corresponding to the new abstract API.In a subsequent stage new software products incorporating the recovered components have been generated within CompSrc.

Future work on the the CompSrc prototype is foreseen in two main directions:

?The scaling up CompSrc to act over the web in a transparent way,instead of relying on a localised component source database,as well as making it able to produce new component connection at runtime,is a main challenge from a technological point of view.

?Conceptually more demanding is the addition of facilities to cope with heterogeneity not only at the‘linguistic’and component-style levels(e.g.,the integration of object and functional models),

but also at the level of the interaction style(aiming at the integration of,e.g.,method invocation, data?ow stream processing and event-based interaction).Some preliminary work on a similar topic is documented in[6].

Acknowledgements.

The work reported in this paper was supported by the Ikf project(Information and Knowledge Fusion), IKF-IPTG-CW(ComponentWare)under contract E!2235.

References

[1]L.S.Barbosa.Towards a calculus of state-based software components.In Selected Papers from the

7th Brazilian Symposium on Programming Languages(to appear in the Jour.of Universal Computer Science),Ouro Preto,Brasil,June2003.

[2]L.S.Barbosa and J.N.Oliveira.State-based components made generic.In H.Peter Gumm,editor,

Elect.Notes in https://www.wendangku.net/doc/8d2855081.html,p.Sci.(CMCS’03-Workshop on Coalgebraic Methods in Computer Science),volume82.1,Warsaw,April2003.

[3]R.Bird and O.Moor.The Algebra of Programming.Series in Computer Science.Prentice-Hall

International,1997.

[4]J.Fitzgerald and https://www.wendangku.net/doc/8d2855081.html,rsen.Modelling Systems:Pratical Tools and Techniques in Software

Development.Cambridge University Press,1998.

[5]Cli?B.Jones.Systematic Software Development Using Vdm.Series in Computer Science.Prentice-

Hall International,1986.

[6]K.-P.Lohr.Towards automatic mediation between heterogeneous software components.volume

65.4.Elect.Notes in https://www.wendangku.net/doc/8d2855081.html,p.Sci.,Elsevier,2002.

[7]S.Mac Lane.Categories for the Working Mathematician,volume5of Graduate Texts in Mathemat-

ics.Springer-Verlag,1971.

[8] C.McLarty.Elementary Categories,Elementary Toposes,volume21of Oxford Logic Guides.Claren-

don Press,1992.

[9] B.Meyer and https://www.wendangku.net/doc/8d2855081.html,ponent-based development:From buzz to spark.IEEE Computer,

32(7):35–37,1999.

[10]O.Nierstrasz and https://www.wendangku.net/doc/8d2855081.html,ponent-oriented software technology.In O.Nierstrasz and

D.Tsichritzis,editors,Object-Oriented Software Composition,pages3–28.Prentice-Hall Interna-

tional,1995.

[11]N.Rodrigues.Abstract interfaces.Technical report,Sidereus and DI(U.Minho),2003.

[12]N.Rodrigues.Formal methods laboratory:the component repository speci?cation.Technical report,

Univ.Minho,DI(document and repository prototype available from nunorodrigues@di.uminho.pt), 2003.

[13]K.Schmaranz.On second generation distributed component systems.Journal of Universal Com-

puter Science,8(1):97–116,January2002.

[14]J.-G.Schneider and https://www.wendangku.net/doc/8d2855081.html,ponents,scripts,glue.In L.Barroca,J.Hall,and P.Hall,

editors,Software Architectures-Advances and Applications,pages13–25.Springer-Verlag,1999.

[15] https://www.wendangku.net/doc/8d2855081.html,ponent Software,Beyond Object-Oriented Programming.Addison-Wesley,1998.

[16]P.Wadler.Monads for functional programming.In J.Jeuring and E.Meijer,editors,Advanced

Functional Programming.Springer Lect.Notes Comp.Sci.(925),1995.

[17]P.Wadler and https://www.wendangku.net/doc/8d2855081.html,ponent-based programming under di?erent paradigms.Technical

report,Report on the Dagstuhl Seminar99081,February1999.

A CompareFunctor Function

B EqualsLessFunctor Function

C Component Source Values

Figure6:VDM-SL Warehouse Storing Robot DataTypes

Figure7:Warehouse Storing Robot

Figure8:Web-publisher Generator

on the contrary的解析

On the contrary Onthecontrary, I have not yet begun. 正好相反,我还没有开始。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, the instructions have been damaged. 反之,则说明已经损坏。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, I understand all too well. 恰恰相反,我很清楚 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, I think this is good. ⑴我反而觉得这是好事。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, I have tons of things to do 正相反,我有一大堆事要做 Provided by jukuu Is likely onthecontrary I in works for you 反倒像是我在为你们工作 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, or to buy the first good. 反之还是先买的好。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, it is typically american. 相反,这正是典型的美国风格。 222.35.143.196 Onthecontrary, very exciting.

恰恰相反,非常刺激。 https://www.wendangku.net/doc/8d2855081.html, But onthecontrary, lazy. 却恰恰相反,懒洋洋的。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, I hate it! 恰恰相反,我不喜欢! https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, the club gathers every month. 相反,俱乐部每个月都聚会。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, I'm going to work harder. 我反而将更努力工作。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, his demeanor is easy and nonchalant. 相反,他的举止轻松而无动于衷。 https://www.wendangku.net/doc/8d2855081.html, Too much nutrition onthecontrary can not be absorbed through skin. 太过营养了反而皮肤吸收不了. https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, I would wish for it no other way. 正相反,我正希望这样 Provided by jukuu Onthecontrary most likely pathological. 反之很有可能是病理性的。 https://www.wendangku.net/doc/8d2855081.html, Onthecontrary, it will appear clumsy. 反之,就会显得粗笨。 https://www.wendangku.net/doc/8d2855081.html,

英语造句

一般过去式 时间状语:yesterday just now (刚刚) the day before three days ag0 a week ago in 1880 last month last year 1. I was in the classroom yesterday. I was not in the classroom yesterday. Were you in the classroom yesterday. 2. They went to see the film the day before. Did they go to see the film the day before. They did go to see the film the day before. 3. The man beat his wife yesterday. The man didn’t beat his wife yesterday. 4. I was a high student three years ago. 5. She became a teacher in 2009. 6. They began to study english a week ago 7. My mother brought a book from Canada last year. 8.My parents build a house to me four years ago . 9.He was husband ago. She was a cooker last mouth. My father was in the Xinjiang half a year ago. 10.My grandfather was a famer six years ago. 11.He burned in 1991

学生造句--Unit 1

●I wonder if it’s because I have been at school for so long that I’ve grown so crazy about going home. ●It is because she wasn’t well that she fell far behind her classmates this semester. ●I can well remember that there was a time when I took it for granted that friends should do everything for me. ●In order to make a difference to society, they spent almost all of their spare time in raising money for the charity. ●It’s no pleasure eating at school any longer because the food is not so tasty as that at home. ●He happened to be hit by a new idea when he was walking along the riverbank. ●I wonder if I can cope with stressful situations in life independently. ●It is because I take things for granted that I make so many mistakes. ●The treasure is so rare that a growing number of people are looking for it. ●He picks on the weak mn in order that we may pay attention to him. ●It’s no pleasure being disturbed whena I settle down to my work. ●I can well remember that when I was a child, I always made mistakes on purpose for fun. ●It’s no pleasure accompany her hanging out on the street on such a rainy day. ●I can well remember that there was a time when I threw my whole self into study in order to live up to my parents’ expectation and enter my dream university. ●I can well remember that she stuck with me all the time and helped me regain my confidence during my tough time five years ago. ●It is because he makes it a priority to study that he always gets good grades. ●I wonder if we should abandon this idea because there is no point in doing so. ●I wonder if it was because I ate ice-cream that I had an upset student this morning. ●It is because she refused to die that she became incredibly successful. ●She is so considerate that many of us turn to her for comfort. ●I can well remember that once I underestimated the power of words and hurt my friend. ●He works extremely hard in order to live up to his expectations. ●I happened to see a butterfly settle on the beautiful flower. ●It’s no pleasure making fun of others. ●It was the first time in the new semester that I had burned the midnight oil to study. ●It’s no pleasure taking everything into account when you long to have the relaxing life. ●I wonder if it was because he abandoned himself to despair that he was killed in a car accident when he was driving. ●Jack is always picking on younger children in order to show off his power. ●It is because he always burns the midnight oil that he oversleeps sometimes. ●I happened to find some pictures to do with my grandfather when I was going through the drawer. ●It was because I didn’t dare look at the failure face to face that I failed again. ●I tell my friend that failure is not scary in order that she can rebound from failure. ●I throw my whole self to study in order to pass the final exam. ●It was the first time that I had made a speech in public and enjoyed the thunder of applause. ●Alice happened to be on the street when a UFO landed right in front of her. ●It was the first time that I had kept myself open and talked sincerely with my parents. ●It was a beautiful sunny day. The weather was so comfortable that I settled myself into the

英语句子结构和造句

高中英语~词性~句子成分~语法构成 第一章节:英语句子中的词性 1.名词:n. 名词是指事物的名称,在句子中主要作主语.宾语.表语.同位语。 2.形容词;adj. 形容词是指对名词进行修饰~限定~描述~的成份,主要作定语.表语.。形容词在汉语中是(的).其标志是: ous. Al .ful .ive。. 3.动词:vt. 动词是指主语发出的一个动作,一般用来作谓语。 4.副词:adv. 副词是指表示动作发生的地点. 时间. 条件. 方式. 原因. 目的. 结果.伴随让步. 一般用来修饰动词. 形容词。副词在汉语中是(地).其标志是:ly。 5.代词:pron. 代词是指用来代替名词的词,名词所能担任的作用,代词也同样.代词主要用来作主语. 宾语. 表语. 同位语。 6.介词:prep.介词是指表示动词和名次关系的词,例如:in on at of about with for to。其特征:

介词后的动词要用—ing形式。介词加代词时,代词要用宾格。例如:give up her(him)这种形式是正确的,而give up she(he)这种形式是错误的。 7.冠词:冠词是指修饰名词,表名词泛指或特指。冠词有a an the 。 8.叹词:叹词表示一种语气。例如:OH. Ya 等 9.连词:连词是指连接两个并列的成分,这两个并列的成分可以是两个词也可以是两个句子。例如:and but or so 。 10.数词:数词是指表示数量关系词,一般分为基数词和序数词 第二章节:英语句子成分 主语:动作的发出者,一般放在动词前或句首。由名词. 代词. 数词. 不定时. 动名词. 或从句充当。 谓语:指主语发出来的动作,只能由动词充当,一般紧跟在主语后面。 宾语:指动作的承受着,一般由代词. 名词. 数词. 不定时. 动名词. 或从句充当. 介词后面的成分也叫介词宾语。 定语:只对名词起限定修饰的成分,一般由形容

六级单词解析造句记忆MNO

M A: Has the case been closed yet? B: No, the magistrate still needs to decide the outcome. magistrate n.地方行政官,地方法官,治安官 A: I am unable to read the small print in the book. B: It seems you need to magnify it. magnify vt.1.放大,扩大;2.夸大,夸张 A: That was a terrible storm. B: Indeed, but it is too early to determine the magnitude of the damage. magnitude n.1.重要性,重大;2.巨大,广大 A: A young fair maiden like you shouldn’t be single. B: That is because I am a young fair independent maiden. maiden n.少女,年轻姑娘,未婚女子 a.首次的,初次的 A: You look majestic sitting on that high chair. B: Yes, I am pretending to be the king! majestic a.雄伟的,壮丽的,庄严的,高贵的 A: Please cook me dinner now. B: Yes, your majesty, I’m at your service. majesty n.1.[M-]陛下(对帝王,王后的尊称);2.雄伟,壮丽,庄严 A: Doctor, I traveled to Africa and I think I caught malaria. B: Did you take any medicine as a precaution? malaria n.疟疾 A: I hate you! B: Why are you so full of malice? malice n.恶意,怨恨 A: I’m afraid that the test results have come back and your lump is malignant. B: That means it’s serious, doesn’t it, doctor? malignant a.1.恶性的,致命的;2.恶意的,恶毒的 A: I’m going shopping in the mall this afternoon, want to join me? B: No, thanks, I have plans already. mall n.(由许多商店组成的)购物中心 A: That child looks very unhealthy. B: Yes, he does not have enough to eat. He is suffering from malnutrition.

base on的例句

意见应以事实为根据. 3 来自辞典例句 192. The bombers swooped ( down ) onthe air base. 轰炸机 突袭 空军基地. 来自辞典例句 193. He mounted their engines on a rubber base. 他把他们的发动机装在一个橡胶垫座上. 14 来自辞典例句 194. The column stands on a narrow base. 柱子竖立在狭窄的地基上. 14 来自辞典例句 195. When one stretched it, it looked like grey flakes on the carvas base. 你要是把它摊直, 看上去就象好一些灰色的粉片落在帆布底子上. 18 来自辞典例句 196. Economic growth and human well - being depend on the natural resource base that supports all living systems. 经济增长和人类的福利依赖于支持所有生命系统的自然资源. 12 1 来自辞典例句 197. The base was just a smudge onthe untouched hundred - mile coast of Manila Bay. 那基地只是马尼拉湾一百英里长安然无恙的海岸线上一个硝烟滚滚的污点. 6 来自辞典例句 198. You can't base an operation on the presumption that miracles are going to happen. 你不能把行动计划建筑在可能出现奇迹的假想基础上.

英语造句大全

英语造句大全English sentence 在句子中,更好的记忆单词! 1、(1)、able adj. 能 句子:We are able to live under the sea in the future. (2)、ability n. 能力 句子:Most school care for children of different abilities. (3)、enable v. 使。。。能句子:This pass enables me to travel half-price on trains. 2、(1)、accurate adj. 精确的句子:We must have the accurate calculation. (2)、accurately adv. 精确地 句子:His calculation is accurately. 3、(1)、act v. 扮演 句子:He act the interesting character. (2)、actor n. 演员 句子:He was a famous actor. (3)、actress n. 女演员 句子:She was a famous actress. (4)、active adj. 积极的 句子:He is an active boy. 4、add v. 加 句子:He adds a little sugar in the milk. 5、advantage n. 优势 句子:His advantage is fight. 6、age 年龄n. 句子:His age is 15. 7、amusing 娱人的adj. 句子:This story is amusing. 8、angry 生气的adj. 句子:He is angry. 9、America 美国n.

(完整版)主谓造句

主语+谓语 1. 理解主谓结构 1) The students arrived. The students arrived at the park. 2) They are listening. They are listening to the music. 3) The disaster happened. 2.体会状语的位置 1) Tom always works hard. 2) Sometimes I go to the park at weekends.. 3) The girl cries very often. 4) We seldom come here. The disaster happened to the poor family. 3. 多个状语的排列次序 1) He works. 2) He works hard. 3) He always works hard. 4) He always works hard in the company. 5) He always works hard in the company recently. 6) He always works hard in the company recently because he wants to get promoted. 4. 写作常用不及物动词 1. ache My head aches. I’m aching all over. 2. agree agree with sb. about sth. agree to do sth. 3. apologize to sb. for sth. 4. appear (at the meeting, on the screen) 5. arrive at / in 6. belong to 7. chat with sb. about sth. 8. come (to …) 9. cry 10. dance 11. depend on /upon 12. die 13. fall 14. go to … 15. graduate from 16. … happen 17. laugh 18. listen to... 19. live 20. rise 21. sit 22. smile 23. swim 24. stay (at home / in a hotel) 25. work 26. wait for 汉译英: 1.昨天我去了电影院。 2.我能用英语跟外国人自由交谈。 3.晚上7点我们到达了机场。 4.暑假就要到了。 5.现在很多老人独自居住。 6.老师同意了。 7.刚才发生了一场车祸。 8.课上我们应该认真听讲。9. 我们的态度很重要。 10. 能否成功取决于你的态度。 11. 能取得多大进步取决于你付出多少努力。 12. 这个木桶能盛多少水取决于最短的一块板子的长度。

初中英语造句

【it's time to和it's time for】 ——————这其实是一个句型,只不过后面要跟不同的东西. ——————It's time to跟的是不定式(to do).也就是说,要跟一个动词,意思是“到做某事的时候了”.如: It's time to go home. It's time to tell him the truth. ——————It's time for 跟的是名词.也就是说,不能跟动词.如: It's time for lunch.(没必要说It's time to have lunch) It's time for class.(没必要说It's time to begin the class.) They can't wait to see you Please ask liming to study tonight. Please ask liming not to play computer games tonight. Don’t make/let me to smoke I can hear/see you dance at the stage You had better go to bed early. You had better not watch tv It’s better to go to bed early It’s best to run in the morning I am enjoy running with music. With 表伴随听音乐 I already finish studying You should keep working. You should keep on studying English Keep calm and carry on 保持冷静继续前行二战开始前英国皇家政府制造的海报名字 I have to go on studying I feel like I am flying I have to stop playing computer games and stop to go home now I forget/remember to finish my homework. I forget/remember cleaning the classroom We keep/percent/stop him from eating more chips I prefer orange to apple I prefer to walk rather than run I used to sing when I was young What’s wrong with you There have nothing to do with you I am so busy studying You are too young to na?ve I am so tired that I have to go to bed early

The Kite Runner-美句摘抄及造句

《The Kite Runner》追风筝的人--------------------------------美句摘抄 1.I can still see Hassan up on that tree, sunlight flickering through the leaves on his almost perfectly round face, a face like a Chinese doll chiseled from hardwood: his flat, broad nose and slanting, narrow eyes like bamboo leaves, eyes that looked, depending on the light, gold, green even sapphire 翻译:我依然能记得哈桑坐在树上的样子,阳光穿过叶子,照着他那浑圆的脸庞。他的脸很像木头刻成的中国娃娃,鼻子大而扁平,双眼眯斜如同竹叶,在不同光线下会显现出金色、绿色,甚至是宝石蓝。 E.g.: A shadow of disquiet flickering over his face. 2.Never told that the mirror, like shooting walnuts at the neighbor's dog, was always my idea. 翻译:从来不提镜子、用胡桃射狗其实都是我的鬼主意。E.g.:His secret died with him, for he never told anyone. 3.We would sit across from each other on a pair of high

翻译加造句

一、翻译 1. The idea of consciously seeking out a special title was new to me., but not without appeal. 让我自己挑选自己最喜欢的书籍这个有意思的想法真的对我具有吸引力。 2.I was plunged into the aching tragedy of the Holocaust, the extraordinary clash of good, represented by the one decent man, and evil. 我陷入到大屠杀悲剧的痛苦之中,一个体面的人所代表的善与恶的猛烈冲击之中。 3.I was astonished by the the great power a novel could contain. I lacked the vocabulary to translate my feelings into words. 我被这部小说所包含的巨大能量感到震惊。我无法用语言来表达我的感情(心情)。 4,make sth. long to short长话短说 5.I learned that summer that reading was not the innocent(简单的) pastime(消遣) I have assumed it to be., not a breezy, instantly forgettable escape in the hammock(吊床),( though I’ ve enjoyed many of those too ). I discovered that a book, if it arrives at the right moment, in the proper season, will change the course of all that follows. 那年夏天,我懂得了读书不是我认为的简单的娱乐消遣,也不只是躺在吊床上,一阵风吹过就忘记的消遣。我发现如果在适宜的时间、合适的季节读一本书的话,他将能改变一个人以后的人生道路。 二、词组造句 1. on purpose 特意,故意 This is especially true here, and it was ~. (这一点在这里尤其准确,并且他是故意的) 2.think up 虚构,编造,想出 She has thought up a good idea. 她想出了一个好的主意。 His story was thought up. 他的故事是编出来的。 3. in the meantime 与此同时 助记:in advance 事前in the meantime 与此同时in place 适当地... In the meantime, what can you do? 在这期间您能做什么呢? In the meantime, we may not know how it works, but we know that it works. 在此期间,我们不知道它是如何工作的,但我们知道,它的确在发挥作用。 4.as though 好像,仿佛 It sounds as though you enjoyed Great wall. 这听起来好像你喜欢长城。 5. plunge into 使陷入 He plunged the room into darkness by switching off the light. 他把灯一关,房

改写句子练习2标准答案

The effective sentences:(improve the sentences!) 1.She hopes to spend this holiday either in Shanghai or in Suzhou. 2.Showing/to show sincerity and to keep/keeping promises are the basic requirements of a real friend. 3.I want to know the space of this house and when it was built. I want to know how big this house is and when it was built. I want to know the space of this house and the building time of the house. 4.In the past ten years,Mr.Smith has been a waiter,a tour guide,and taught English. In the past ten years,Mr.Smith has been a waiter,a tour guide,and an English teacher. 5.They are sweeping the floor wearing masks. They are sweeping the floor by wearing masks. wearing masks,They are sweeping the floor. 6.the drivers are told to drive carefully on the radio. the drivers are told on the radio to drive carefully 7.I almost spent two hours on this exercises. I spent almost two hours on this exercises. 8.Checking carefully,a serious mistake was found in the design. Checking carefully,I found a serious mistake in the design.

用以下短语造句

M1 U1 一. 把下列短语填入每个句子的空白处(注意所填短语的形式变化): add up (to) be concerned about go through set down a series of on purpose in order to according to get along with fall in love (with) join in have got to hide away face to face 1 We’ve chatted online for some time but we have never met ___________. 2 It is nearly 11 o’clock yet he is not back. His mother ____________ him. 3 The Lius ___________ hard times before liberation. 4 ____________ get a good mark I worked very hard before the exam. 5 I think the window was broken ___________ by someone. 6 You should ___________ the language points on the blackboard. They are useful. 7 They met at Tom’s party and later on ____________ with each other. 8 You can find ____________ English reading materials in the school library. 9 I am easy to be with and _____________my classmates pretty well. 10 They __________ in a small village so that they might not be found. 11 Which of the following statements is not right ____________ the above passage? 12 It’s getting dark. I ___________ be off now. 13 More than 1,000 workers ___________ the general strike last week. 14 All her earnings _____________ about 3,000 yuan per month. 二.用以下短语造句: 1.go through 2. no longer/ not… any longer 3. on purpose 4. calm… down 5. happen to 6. set down 7. wonder if 三. 翻译: 1.曾经有段时间,我对学习丧失了兴趣。(there was a time when…) 2. 这是我第一次和她交流。(It is/was the first time that …注意时态) 3.他昨天公园里遇到的是他的一个老朋友。(强调句) 4. 他是在知道真相之后才意识到错怪女儿了。(强调句) M 1 U 2 一. 把下列短语填入每个句子的空白处(注意所填短语的形式变化): play a …role (in) because of come up such as even if play a …part (in) 1 Dujiangyan(都江堰) is still ___________in irrigation(灌溉) today. 2 That question ___________ at yesterday’s meeting. 3 Karl Marx could speak a few foreign languages, _________Russian and English. 4 You must ask for leave first __________ you have something very important. 5 The media _________ major ________ in influencing people’s opinion s. 6 _________ years of hard work she looked like a woman in her fifties. 二.用以下短语造句: 1.make (good/full) use of 2. play a(n) important role in 3. even if 4. believe it or not 5. such as 6. because of

英语造句

English sentence 1、(1)、able adj. 能 句子:We are able to live under the sea in the future. (2)、ability n. 能力 句子:Most school care for children of different abilities. (3)、enable v. 使。。。能 句子:This pass enables me to travel half-price on trains. 2、(1)、accurate adj. 精确的 句子:We must have the accurate calculation. (2)、accurately adv. 精确地 句子:His calculation is accurately. 3、(1)、act v. 扮演 句子:He act the interesting character.(2)、actor n. 演员 句子:He was a famous actor. (3)、actress n. 女演员 句子:She was a famous actress. (4)、active adj. 积极的 句子:He is an active boy. 4、add v. 加 句子:He adds a little sugar in the milk. 5、advantage n. 优势 句子:His advantage is fight. 6、age 年龄n. 句子:His age is 15. 7、amusing 娱人的adj. 句子:This story is amusing. 8、angry 生气的adj. 句子:He is angry. 9、America 美国n. 句子:He is in America. 10、appear 出现v. He appears in this place. 11. artist 艺术家n. He is an artist. 12. attract 吸引 He attracts the dog. 13. Australia 澳大利亚 He is in Australia. 14.base 基地 She is in the base now. 15.basket 篮子 His basket is nice. 16.beautiful 美丽的 She is very beautiful. 17.begin 开始 He begins writing. 18.black 黑色的 He is black. 19.bright 明亮的 His eyes are bright. 20.good 好的 He is good at basketball. 21.British 英国人 He is British. 22.building 建造物 The building is highest in this city 23.busy 忙的 He is busy now. 24.calculate 计算 He calculates this test well. 25.Canada 加拿大 He borns in Canada. 26.care 照顾 He cared she yesterday. 27.certain 无疑的 They are certain to succeed. 28.change 改变 He changes the system. 29.chemical 化学药品

相关文档