The IFAD nitiative for Mainstreaming InnovationIMI
- 格式:ppt
- 大小:799.50 KB
- 文档页数:20
绝密★考试终止前全国2021年4月高等教育自学考试英美文学选读试题课程代码:00604请考生按规定用笔将所有试题的答案涂、写在答题纸上。
全数题目用英文作答。
选择题部份注意事项:1.答题前,考生务必将自己的考试课程名称、姓名、准考证号用黑色笔迹的签字笔或钢笔填写在答题纸规定的位置上。
2.每题选出答案后,用2 B铅笔把答题纸上对应题目的答案标号涂黑。
如需改动,用橡皮擦干净后,再选涂其他答案标号。
不能答在试题卷上。
I. Multiple Choice(40 points in all, 1 for each)Select from the four choices of each item the one that best answers the question or completes the statement. Mark your choice by blackening the corresponding letter A, B, C or D on the answer sheet.1. Shakespeare has established his giant position in world literature with his ______ plays, 154 sonnets and 2 longA. 27B. 38D. 522. john Milton’s literary achievement can be divided into three groups: the early poetic works, the middle prose pamphlets and the lastA. romancesB. dramasC. great poemsD. ballads3. The novels of ______ are the first literary works devoted to the study of problems of the lower—classA. John MiltonB. Daniel DefoeC. Henry FieldingD. Jonathan Swift4. The work ra nked by many critics as William Wordswoth’s greatest work wasA. Lyrical BalladsB. The PreludeC. Poems in Two VolumesD. The Excursion5. The author of The History of Tom Jones, a Foundling isA. Daniel DefoeB. Johathan SwiftC. Henry FieldingD. William Blake6. The works of ______ are famous for the depiction of the life of the middle —class women, particularly governess.*BA. Charlotte BronteB. . LawrenceC. Thomas HardyD. Jane Austen7. All of the following writings are created by William Wordsworth EXCEPTA. “I Wandered Lonely as a Cloud. ”B. “Composed upon Westminster Bridge, Septemer 3, 1802. ”C. “The Solitary Reaper. ”D. “The Chimney Sweeper. ”8. The most important representative work by Jonathan Swift isA. A Tale of a TubB. The Battle of the BooksC. A Modest ProposalD. Gulliver's Travels9 “If winter comes, can Spring be far behind?”comes from Shelly’sA. “To a Skylark”B. “Adonais”C. “Ode to Liberty”D. “Ode to the West Wind”10. In Jane Austen' s first novel ______, she tells a story about two sisters and their loveA. Pride and PrejudiceB. Sense and SensibilityC. EmmaD. Persuasion11. Charles Dickens is one of the greatest ______ writers of the VictorianA. romanticB. modernistC. socialistD. critical realist12. Charlotte Bronte' s most autobiographical work, ______ is largely based on her experience inA. Jane EyreB. ShirleyC. VilletteD. The Professor13. William Wordsworth' s theory of poetry is calling for simple themes drawn from humble life expressed in the language of ordinary people. The preface to the second edition of ______ acts as a manifesto for the new school and sets forth his own criticalA. Lyrical BalladsB. The PreludeC. Poems in Two VolumsD. The Excursion14. George Bernard Shaw' s play ______ established his position as the leading playwright of his time.*CA. Widowers’HousesB. Too True to Be GoodC. Mrs. Warren' s ProfessionD. Candida15. Eliot' s most important single poem ______, has been hailed as a landmark and a model of the 20th-century EnglishA. The Hollow MenB. The Waste LandC. Prurrock and Other ObservationsD. Poems 1909-2516. D. ’s autobiographical novel, ______ shows the conflict between the earthy, coarse, energetic but often drunken father and the refined, strong — willed and up — climbingA. Sons and LoversB. The White PeacockC. The TrespasserD. The Rainbow17. “To be, or not to be — that is the question; /Whether 'tis nobler in the mind to suffer./The slings and arrows of outrageous fortune,/ Or to take arms against a sea of troubles,/And by opposing end them?” These words are fromA. King LearB. RomeoC. AntonioD. Hamlet18. John Milton’s last important work, ______ is the most powerful dramatic poem on the GreekA. Paradise LostB. Paradise RegainedC. Samson AgonistesD. Lydidas19. The author of Moll Flanders and Captain Singleton isA. John MiltonB. Daniel DefoeC. Henry FieldingD. Jonathan Swift20. Drapier is the pseudonym ofA. Jonathan SwiftB. Daniel DefoeC. Henry FieldingD. William Blake21. One of Dickens' later works, ______ in which he presents a criticism of the governmental branches which run an indefinite procedure of management of affairs and keep the innocent in prison forA. Bleak HouseB. Little DorritC. Hard TimesD. A Tale of Two Cities22. In the second part of Gulliver's Travels, Gulliver told his experience inA. BrobdingnagB. LilliputC. Flying IslandD. Houyhnhnm23. Faulkner used the narrative techniques to construct his stories, which include ______ and mythological and biblicalA. symbolismB. free indirect speechC. contrastD. dialogue24. Ernest Hemingway, had been trying to demonstrate in his works an unvarying code, known as “______,” which is actually an attitude towardsA. facing the realityB. grace under pressureC. honesty with benevolenceD. security coming first25. The Blithedale Romance is a novel written by Hawthorne to reveal his own experience on the Brook Farm and his own methods as a ______A. naturalistB. imagistC. psychologicalD. feminist26. Theodore Dreiser' s focus shifted from the pathos of the helpless protagonists at the bottom of the society to the power of the American financial tycoons in the late 19th century in his workA. The GeniusB. An American TragedyC. Dreiser Looks a t RussiaD. “Trilogy of Desire”27. Emily Dickinson frequently uses personae to render the tone more familiar to the reader, and ______ to vivify some abstractA. imagesB. metaphorC. symbolsD. personification28. In his later works, Melville becomes more reconciled with the ______, in which he admits, one must live byA. womenB. world of manC. familyD. politicians29. Walt Whitman' s ______ has always been considered a monumental work which commands great attention inA. The Pilgrim’s ProgressB. Leaves of GrassC. A Passage to IndiaD. Rip Van Winkle30. Mark Twain’s full literary career began to blossom in 1869 with a travel book ______, an account of American tourists inA. Innocents AbroadB. The Portrait of A LadyC. The Grapes of WrathD. The Great Gatsby31. With the development of the modern novel and the common acceptance of the ______ approach, Henry James' s importance, as well as his wide influence as a novelist and critic, has been all the moreA. deconstructionB. romanticC. FreudianD. analytic32. Emily Dickinson addresses the issues that concern the whole human beings in her poems, which include religion, death, ______, love, andA. immortalityB. wealthC. powerD. politics33. In Sister Carrie Theodore Dreiser expressed his ______ pursuit by expounding the purposelessness of life and attacking the conventional moralA. romanticB. realisticC. naturalisticD. modernistic34. Profound ideas in Robert Frost's poems are delivered under the disguise ofA. the plain language and the simple formB. the vivid descriptionsC. metaphorsD. the complicated narration35. In ______ Hemingway presents his philosophy about life and death through the depiction of the bullfight as a kind of microcosmicA. The Green Hills of AfricaB. Death in the AfternoonC. The Snows of KilimanjaroD. To Have and Have Not36 Of Faulkner’s literary works, four novels are masterpieces by any standards: The Sound and the Fury, Light in August, Absalom, Absalom ! andA. Go Down, MosesB. The FableC. The Snows of KilimanjaroD. To Have and Have Not37. As Whitman saw it, ______ could play a vital part in the process of creating a newA. musicB. fictionC. poetryD. painting38. In many of Hawthorne' s stories and novels, the Puritan concept of life is condemned, especially in his The house of the Seven Gables andA. Go Down, MosesB. The Scarlet LetterC. As I Lay DyingD. Song of Myself39. Henry James is generally regarded as the forerunner of the ______ and the founder of psychologicalA. “stream-of-consciousness” novelsB. metaphysical poemsC. short storiesD. literary criticism40. Generally considered to be Henry James’s masterpiece, ______ incarnates the clash between the Old World and the New in the life journey of an American girl in a Europe an culturalA. The AmbassadorsB. Daisy MillerC. The AmericanD. The Portrait of A Lady非选择题部份注意事项:用黑色笔迹的签字笔或钢笔将答案写在答题纸上,不能答在试题卷上。
In the pursuit of excellence, the concept of hard work is paramount. It is the driving force that propels individuals to achieve their goals and overcome obstacles. Here is an essay on the importance of hard work, particularly in the context of learning English. The Significance of Hard Work in Learning EnglishEnglish has become a global language, essential for communication, business, and education. As such, mastering it is no small feat, but rather a journey that requires dedication, patience, and above all, hard work. The process of learning English is akin to climbing a mountain it is arduous, yet the view from the summit is worth every step.Firstly, hard work is the foundation of language acquisition. It is through consistent practice that one hones their listening, speaking, reading, and writing skills. For instance, immersing oneself in English mediasuch as films, music, and literatureprovides a rich environment for vocabulary expansion and idiomatic expression. This immersion is not a passive activity but requires active engagement and the willingness to learn from every encounter with the language.Secondly, hard work in learning English is characterized by setting and achieving milestones. Whether its passing an English proficiency test, delivering a presentation in English, or simply conversing fluently, each goal requires a structured plan and unwavering commitment. Setting realistic targets and breaking them down into manageable tasks can make the learning process more organized and less overwhelming. Moreover, the role of hard work extends to overcoming setbacks. Language learning is fraught with challenges, such as understanding complex grammar rules or grappling with pronunciation difficulties. It is through persistent effort and the courage to make mistakes that learners refine their skills. Embracing failure as a stepping stone to success is a testament to the power of hard work.In addition, hard work in the context of English learning often involves seeking out resources and opportunities for improvement. This could mean enrolling in language courses, joining conversation clubs, or utilizing language learning apps. The initiative to explore various avenues of learning is a clear demonstration of ones commitment to hard work.Lastly, the benefits of hard work in learning English are manifold. It not only enhances ones ability to communicate effectively but also broadens cultural horizons, opens up jobopportunities, and fosters cognitive development. The sense of accomplishment that comes from mastering a new language is a reward in itself, reinforcing the value of hard work.In conclusion, hard work is the cornerstone of successfully learning English. It demands time, effort, and resilience but offers a world of opportunities in return. As with any worthwhile endeavor, the journey is as important as the destination, and the process of learning English is a testament to the power of perseverance and dedication.。
第一部分:基础篇(该部分共有试题8题,为必答题,每位应聘者按自己对问题的理解去回答,尽可能多回答你所知道的内容。
若不清楚就写不清楚)。
1、我们公司的产品是集成电路,请描述一下你对集成电路的认识,列举一些与集成电路相关的内容(如讲清楚模拟、数字、双极型、CMOS、MCU、RISC、CISC、DSP、ASIC、FPGA等的概念)。
数字集成电路是将元器件和连线集成于同一半导体芯片上而制成的数字逻辑电路或系统。
模拟信号,是指幅度随时间连续变化的信号。
例如,人对着话筒讲话,话筒输出的音频电信号就是模拟信号,收音机、收录机、音响设备及电视机中接收、放大的音频信号、电视信号,也是模拟信号。
数字信号,是指在时间上和幅度上离散取值的信号,例如,电报电码信号,按一下电键,产生一个电信号,而产生的电信号是不连续的。
这种不连续的电信号,一般叫做电脉冲或脉冲信号,计算机中运行的信号是脉冲信号,但这些脉冲信号均代表着确切的数字,因而又叫做数字信号。
在电子技术中,通常又把模拟信号以外的非连续变化的信号,统称为数字信号。
FPGA是英文Field-Programmable Gate Array的缩写,即现场可编程门阵列,它是在PAL、GAL、EPLD 等可编程器件的基础上进一步发展的产物。
它是作为专用集成电路(ASIC)领域中的一种半定制电路而出现的,既解决了定制电路的不足,又克服了原有可编程器件门电路数有限的缺点。
2、你认为你从事研发工作有哪些特点?3、基尔霍夫定理的内容是什么?基尔霍夫电流定律:流入一个节点的电流总和等于流出节点的电流总和。
基尔霍夫电压定律:环路电压的总和为零。
<BR> 欧姆定律: 电阻两端的电压等于电阻阻值和流过电阻的电流的乘积。
4、描述你对集成电路设计流程的认识。
5、描述你对集成电路工艺的认识。
把电路所需要的晶体管、二极管、电阻器和电容器等元件用一定工艺方式制作在一小块硅片、玻璃或陶瓷衬底上,再用适当的工艺进行互连,然后封装在一个管壳内,使整个电路的体积大大缩小,引出线和焊接点的数目也大为减少。
See the code below, Exactly how many times is the operation sum++ performed? (5 points) for ( i= 0; i < 100; i++ )for ( j = 100; j > 100 - i; j--)sum++;(99 * 100)/2 = 4950The sum++ is performed 4950 times.Convert a binary string to decimal number (5 points)// binary: is binary string//size: is size of the binary string bufferint bin2dec(unsigned char *binary, int size){int i, result = 0;for (i = 0; i < size; i ++){result += (binary [i ] - '0' ) << (size - i - 1) ;}return result;}Detect a loop in single linked list (15 points)Node *detectloop(Node *list){Node *n1, *n2;//prev indicates loop started at this point Node *prev=NULL ;for (n1=list, n2=list; (n1!=NULL ) && (n2!=NULL ) ; ) {if (prev && (n1 == n2)){return prev;}prev = n1;n1=n1->next;n2=n2->next;if (n2){n2=n2->next;}}}Please insert a node to binary tree (25 points)//Insert i into the tree t, duplicate will be discarded //Return a pointer to the resulting tree. Tree * insert(int value, Tree * t){Tree * new_node;if (t == NULL ){new_node = (Tree *) malloc (sizeof (Tree )) ;if (new_node == NULL ){return t;}new_node->element = value;new_node->left = new_node->right = NULL ;return new_node;}if (value < t->element){t->left = insert(value, t->left) ;}else if (value > t->element){t->right = insert(value, t->right) ;}else{//duplicate, ignore itreturn t;}return t;}How do you test a hospital elevator? (25 points) (可以用中文描述 , 请注意应用多种测试用例 ) 逻辑推理 (50 points)有 A 、 B 、 C 、 D 、 E 五个人。
BULLETIN(New Series)OF THEAMERICAN MATHEMATICAL SOCIETYVolume36,Number1,January1999,Pages99–101S0273-0979(99)00768-5Finitefields,by Rudolf Lidl and Harald Niederreiter,Second edition,Cambridge University Press,1997,xiv+755pp.,$95.00,ISBN0-521-39231-4Finitefields arefields that have only afinite number of elements.The simplest examples are the rings of integers modulo a prime number p.The origins and history offinitefields can be traced back to the17th and18th centuries,but there, thesefields played only a minor role in the mathematics of the day.In more recent times,however,finitefields have assumed a much more fundamental role and in fact are of rapidly increasing importance because of practical applications in a wide variety of areas including information science.More generally,finitefields play vital roles in computer science,coding theory,cryptography,algebraic geometry,number theory and group theory as well as in a variety of areas of discrete mathematics.It unfortunately does not seem to be widely known in the mathematical commu-nity how importantfinitefields really are.They provide a truly beautiful meeting ground for good theoretical problems as well as very practical applications.Because of this interaction between theory and application,finitefields offer a fertile area where mathematicians,engineers and computer scientists can all work,each to the benefit of the others.The initial edition of this book was published by Addison-Wesley in1983and was thefirst book devoted solely tofinitefields;however,that edition was never reviewed in the Bulletin of the American Mathematical Society.Considering the immense impact of the original volume,which has often been called the Bible on finitefields,it is indeed important that a full review be written at this time.One point of clarification is that this current volume was listed by the new pub-lisher,Cambridge University Press,as a second edition unbeknown to the authors. This is misleading,as the current volume is just a reprint of the original version with some minor corrections.Since the publication of the original volume in1983,there has been an explosion offinitefield publications in both theoretical and applied aspects.Mathematical Reviews lists as appearing since1983more than700papers with the words“finite fields”in their titles,and since that time there have also been more than20books as well as5conference proceedings on the subject(see also D.Wan’s review in the A.M.S.Bulletin30(1994),284-290,of severalfinitefield related books).In addition,there is now an international conference on the theory and application of finitefields which has been held every two years since1991.In1995Academic Press began publication of a new research journal Finite Fields and Their Applications. These observations should help convince the reader thatfinitefields are indeed very important mathematical structures and that interest in them is growing rapidly.The authors have done a masterful job infirst digesting an enormous amount of material and then organizing it in an efficient way to make for a clear and readable treatise onfinitefields.There were very few errors or typos in the original edition and I suspect almost none in this second corrected edition.1991Mathematics Subject Classification.Primary11Txx;Secondary05Bxx,11B37,94A55, 94Bxx.c 1999American Mathematical Society99100BOOK REVIEWSWe very briefly summarize each of the chapter contents: 1.“Algebraic Foun-dations”is a review of some basic algebraic material with an emphasis on rings andfields;2.“Structure of Finite Fields”discusses bases,primitive elements,trace and norm functions,cyclotomic polynomials and Wedderburn’s theorem;3.“Poly-nomials over Finite Fields”considers the concept of order(or exponent)of poly-nomials,irreducible and primitive polynomials,linearized polynomials as well as various properties of binomials and trinomials;4.“Factorization of Polynomials”considers algorithms(Berlekamp’s for example)for the factorization of polynomi-als in a single indeterminate over smallfields,algorithms for factorization over largefields(where large means that the number of elements in thefield is sub-stantially larger than the degree of the polynomial to be factored)and methods of rootfinding;5.“Exponential Sums”provides a careful and detailed treatment of various kinds of exponential sums including Gauss,Jacobi and Kloosterman sums and gives proofs of Weil’s theorems for polynomial arguments;6.“Equations over Finite Fields”deals with the number of solutions to various types of equations overfinitefields,including quadratic and diagonal equations,and also discusses the elementary method of Stepanov;7.“Permutation Polynomials”provides criteria for and classes of permutation polynomials in one and several variables and dis-cusses groups of permutation polynomials;8.“Linear Recurring Sequences”givesa thorough discussion of the theory of linear recurring sequences overfinitefields;9.“Applications of Finite Fields”provides an introduction to coding theory and combinatorics including projective and affine planes and geometries,mutually or-thogonal latin squares,Hadamard matrices,block designs,difference sets and linear modular systems;10.“Tables”provides tables of logarithms and exponentials for hand calculations in smallfinitefields and lists of irreducible polynomials of small degrees over small primefields and a primitive polynomial of each degree n over thefield of p elements where p n<109with p<50.The Bibliography consists of160pages and approximately2,500references.This is a very complete bibliography through1983(the date of publication of thefirst edition)and as such it is one of the most valuable parts of the book.There is also an author index,a list of symbols,and a subject index.Other very valuable parts of the book are the detailed Notes given at the end of each chapter.In these notes the authors describe historical perspectives as well as provide a quick review of the literature related to that chapter’s material.In particular,they give brief statements of the main results of most of the references referred to in that chapter.In an effort to enhance the attractiveness of their monograph as a textbook, the authors have included numerous worked-out examples.Additionally,each of thefirst nine chapters contains a set of exercises that either illustrate the theory or provide extensions and alternative proofs of some of the results within that chapter. These exercises are well chosen and as such they could provide excellent homework problems.(For a more textbook-oriented version of this book,I refer to the related book by the authors entitled Introduction tofinitefields and their applications, Revised edition,Cambridge University Press,1994.)One could argue that various additional topics should have been included in the original volume.In his Mathematical Review86c:11106of the original volume, S.D.Cohen mentions several such omissions including functionfield theory,non-Desarguesian geometry,and cryptography.Another missing topic which is veryBOOK REVIEWS101 important for computational work is that offinitefield algorithms and their com-plexities.Of course,entire volumes could be written about each of these topics; thus the inclusion of all or even any of these topics would have made the current volume unmanageably large.This monograph has already become the standard reference onfinitefields;in-deed,it is referenced in nearly every paper related tofinitefields.The book is extremely valuable for the nonspecialist or the practitioner wanting to learn and work in the general area offinitefields and their applications.Moreover,because of its very extensive bibliography,it is also an excellent starting point for a literature search by someone well-versed infinitefield theory.Every college,university,and institute library needs a copy,and since,in my experience,the library copy is likely to be signed out when the book is needed,individuals should consider buying a personal copy.I predict it will be used many times.Gary L.MullenThe Pennsylvania State UniversityE-mail address:mullen@。
A COMPILER DESIGN FOR THE AGENT-BASED PROGRAMMING LANGUAGEWei ZhaoDepartment of Computer ScienceUniversity of North DakotaGrand Forks, ND 58203, USA zhao@Chang-Hyun Jo Department of Computer Science California State University Fullerton Fullerton, CA 92834-6870, USAjo@AbstractIn this paper, we introduce a prototype compiler for the Agent-based Programming Language (APL) using the Belief-Desire-Intention (BDI) model. The compiler we developed can translate an agent-based program written in APL into the Java byte code, which is executable on the Java Virtual Machine (JVM).This paper proposes a simple syntax for Agent-based Programming Language (APL). APL is designed based on the BDI model, which is a natural way to describe the behaviors of an intelligent agent. By using the associated database and reflection concepts, the APL can use different intentions intelligently and dynamically. This work shows how nicely and naturally the APL programming language can represent intelligent software agents and how we can translate the APL program into the Java byte code. In this work, we use the Belief-Plan mapping table and Java reflection feature to implement dynamic linking which makes it possible for APL to link to different code fragments at runtime without recompiling the APL source code. This feature of APL makes the language unique and it may change the way of programming.KeywordsAgents, Agent-based Computing, Agent-based Programming Language, Agent-based Software Engineering1. IntroductionAgent-based computing has emerged as a new computing paradigm. There have been many research results in this area [2, 3, 4, 5, 7, 8, 10, 13]. The BDI model [1] is one of the most powerful techniques to describe autonomous intelligent agents. However, there are still no proper programming languages and software engineering methodologies that can naturally support the agent-based computing. In this paper we present the Agent-based Programming Language (APL) and a prototype compiler for the APL we developed.The idea of the APL language was first introduced in the work of Jo and Arnold [11]. The previous work includes the noble concept brought in the APL language design and a prototype interpreter (preprocessing) for it. This paper reports its continuing work, and shows a real compiler implementation with a realistic application example. The compiler implementation of APL allows us to design and implement realistic agent-based applications. It also supports both a realization of the BDI agent concept and a certain degree of learning and adaptation, which might be a very valuable scheme for the agent-based programming. This paper describes the basic structure of the APL system. A sample source program has been developed based on the Agent-based Stock Trader (AST) system [6]. The APL sample program defines a stock recommendation agent that has its own Belief (environment), Desire (goals to achieve) and Intention (the actions it will perform to achieve the goals). By analyzing the environment the agent can give clients some useful recommendation and help clients to make the right decisions. The agent has own knowledge base. It can continually learn new knowledge and keep updating its knowledge base at runtime. The agent has the ability to choose different plans and give different recommendations at runtime if the belief stored in the knowledge base is changed. The main purpose of this work is to show how simply and naturally the APL language can describe the agent-based programming. To simulate a real time stock market, we use an example database.APL is a new programming language designed to describe the behaviors of the intelligent software agents. It has a different programming paradigm from the previous ones. In order to make our APL programming language work, we need a compiler and a runtime system. Since we do not have its own runtime system for the APL right now, the Java Virtual Machine (JVM) is chosen to be the supporting runtime system for the APL at this time. Our APL compiler translates the APL source program into the Java byte code, which can be executable on the JVM with a database to manipulate the BDI knowledge base. We use special tools such as LEX and YACC to develop the APL compiler.2. Background of BDI-AgentsA few research have been done in agent-based programming languages [2, 3, 4, 5, 7, 8, 10, 13]. The BDI model [1] is one of the most powerful techniques. BDI is the abbreviation of Belief, Desire, and Intention. The Belief of an agent represents the knowledge about itself and the world (outside environment). The Desire of an agent describes the goals that the agent can achieve. The Intention is a set of plans used to achieve the predefined goal based on a specific situation. It defines the action that the agent performs. Since BDI can describe the behavior of a software agent naturally, we developed our APL programming language based on this concept.There have been several research and experimental works based on the BDI model extending the Java programming language, and some of them are going for commercial. BDIM (Belief, Desire, Intention, Message) Agent Toolkit is implemented as a Java package to provide a prototype of runtime architecture [2, 3]. JACK Intelligent Agent is an environment for building, running and integrating commercial-grade multi-agent systems using a component-based approach [9]. JAM (Java Agent Model) is an implementation of the BDI agent model in Java [8]. All of these works are based on Java. But they are not natural enough to describe the agent behavior. JACK can manipulate the belief as a database as well. But it cannot support dynamic manipulation of desire and intention. JAM and BDIM provide a way to manipulate--ISCA CATA-2003March 26-28, 2003, Honolulu, HawaiiBDIs somewhat. But they are not powerful enough to describe the BDI. Since they are Java extensions, they can only describe an agent program in Java classes. They are not really agent-based programming languages. They have their own syntax. Users have to spend a lot of time to understand them before they can use them to develop the software agents. Our APL is a new language that is developed specially for agent-based computing. It describes the program on the agent level. BDIs and agents can be defined as reusable components just like classes. BDIs can be declared in agent definitions. APL can dynamically manipulate the BDIs at runtime. The programmer can change the Belief, the Desire and the Intention at runtime without recompiling the program. The agent can execute a better plan if there is one at runtime. The dynamic linking technique of APL makes the agent more intelligent.3. Implementation of BDI-Agents in APLThe APL has been designed based on the BDI concept. The APL program is composed of four parts: the Agent, the Belief, the Desire and the Intention. Each agent may have separate BDIs or may share some of them [11]. In order to make our APL easier to read and learn, we defined the APL language in a Java-like syntax. The Java Virtual Machine (JVM) is a powerful tool to develop cross-platform programs. We use the JVM as our runtime system at this time. We translate our APL source programs into the Java byte codes that can be executable on the JVM.We develop the Stock Recommendation Agent (SRA) system in the APL language based on the AST system that was previously developed in Java [6]. This program is composed of 5 parts: a client agent mainAgent who sends a request of goal to a server agent stockAgent, a Belief stockBelief, a Desire recomDesire and an Intention stockIntention for the stockAgent. The database serving for the SRA system is similar to the database of the AST system [6]. Two tables are necessary to support the SRA system. The table, Knowledge, stores the knowledge of the agent. Another table, BPmap, stores the information about mapping from belief to plans that the agent executes.The agent defined in our SRA system gives the client agent certain recommendations on stock trading. This software agent works in the same way as a real stock agent does. After evaluating all the environmental information carefully, the stock agent suggests that the customer would better buy, sell or hold the stocks. The SRA can simulate this intelligent work. The server agent defines a recommendation desire, so that the server agent can give the client agent a recommendation on stocks by achieving this goal. The server agent can only give out valuable decisions based on the right belief (environment). In order to maintain the correctness of the database, only agents who have the access privilege can access and modify the knowledge base.There is another knowledge in the SRA system called Bpmap. BPmap contains the plan information that the agent needs to perform in order to achieve the goal. When a user wants to ask for a suggestion on a stock such as YHOO (the stock name for Yahoo), he gives the stock name to the client agent named mainAgent. Then the mainAgent invokes the server agent in the format “stockAgent.recomDesire(YHOO)” which is defined as a desire of the server agent. The server agent stockAgent is activated by this request. It calls the desire recomDesire, accesses the knowledge base and gets the belief (which are important factors). After calculating this belief in a certain way, the server agent refers to the mapping table (BPmap) that shows which plan is suitable at this time. Once a chosen plan returns a recommendation result, then the server agent returns a recommendation to the client agent based on the execution result of the plans. We assume that there can be a supporting agent that is designated to update the knowledge base when those factors are changed. The administrator or the agent designated to maintain the mapping table updates the BPmap if there is a better plan available. These changes do not affect the stockAgent itself. The server agent can always be kept alive without stopping and recompiling the source code.The Knowledge table contains 8 columns in this example: stock symbol, six belief values, and belief value. The stock name “symbol” is the goal that we want to get recommendations on. For example, it can be YHOO (Yahoo), IBM (IBM), MS (Microsoft) and so on [14]. Six components of knowledge A through F represent beliefs related to the stock. In our SRA system, we let the system administrator update the knowledge table. But in the real applications, we can designate other agents to update the knowledge. The beliefs the agent gets from the knowledge can be calculated in different ways depending on the algorithm used in a particular application. The last field holds the value after the agent analyzes the belief A to F. The server agent will choose the plans based on this value. The purpose to have this example application is just showing how APL handles the BDIs. Therefore, the algorithm we chose to analyze the belief values is just trivial in this example. Here we just add up all belief values from A to F. However, in the real application, appropriate mathematical functions and stochastic methods for the stock market forecasting can be used.4. Translation of APL Code to Java Byte Code Here we will show the real code for the SRA system written in the APL language, and we will show how to translate it to the Java byte codes. The APL compiler translates the APL source program into the ASCII format Java byte code. Then we use Jasmin [12] to assemble the Java byte code into the binary executable class file that is directly executable on the Java Virtual Machine.The Belief part of APL is translated into a class as a reusable component, and each plan defined in the Belief is translated into a Java method in the Java byte code. The APL system involves a lot of database manipulation. But this is hidden from the programmers. A programmer only needs to concentrate on how to implement the BDIs and leaves the database manipulations to the runtime system. This makes the APL language easy to read, and it describes the BDI more naturally.The following is the Belief definition of the SRA system in APL. It is a fairly simple program that only contains one belief definition, one constructor and two member plans.Belief stockBelief {belief<database> db;public stockBelief(){db = "SRAdb";}public void setBelief (belief<database> dbName,belief<String> tableName,belief<String> columName,belief<String> symbol,belief<String> goal, belief<int> value){set columName = value where symbol = goal;}public int getBelief (belief<database> dbName1,belief<String> tableName1,belief<String> columName1,belief<String> symbol1,belief<String> goal1){belief<int> i;i = get columName1 from tableName1where symbol1=goal1;return i;}}In APL, all variables are the belief type. A belief has its definition: “belief<data type> variable name”. The “data type” can be any primary data type or “database”. If the date type is “database”, then we translate it into the Connection object in Java. Most of the APL statements in the APL plan level are just like Java; we can translate them into the Java byte code easily. But there are some new statements that are especially invented for APL. We give special treatment to these statements.With the Belief definition, we have three special statements such as the knowledge base connection statement, the knowledge base access statement and the knowledge base update statement. The first special statement is the APL knowledge base connection statement that is used in the constructor of Belief definition. It is “db = “SRAdb”;”. At first glance, it looks like an assignment statement. But what it actually does is to connect to the database for the APL knowledge and store the reference of the database connection object in the local variable db. The compiler first checks if the type of left side of this construct is the Connection type. Then it checks if the right side is a String (name of the database). If either of them is not true, then the compiler will treat it as a regular assignment statement. Otherwise the compiler will give it a special treatment. The following code shows how the above database connection statement is translated to the Java byte code.:.catch java/lang/ClassNotFoundExceptionfrom Label1 to Label2 using handler1Label1:ldc "sun.jdbc.odbc.JdbcOdbcDriver"invokestaticjava/lang/Class/forName(Ljava/lang/String;)Ljava/lang/Class;popLabel2:goto Label3handler1:popgetstatic java/lang/System/err Ljava/io/PrintStream;ldc "no such a driver exists!"invokevirtual java/io/PrintStream/println(Ljava/lang/String;)Viconst_1invokestatic java/lang/System/exit(I)VLabel3:.catch java/sql/SQLException from Label4 to Label5 using handler2Label4:aload_0ldc "jdbc:odbc:SRAdb"invokestaticjava/sql/DriverManager/getConnection(Ljava/lang/String;)Ljava/sql/Connection;putfield stockBelief/db Ljava/sql/Connection;Label5:goto Label6handler2:popgetstatic java/lang/System/err Ljava/io/PrintStream;ldc "cannot connect to database!"invokevirtual java/io/PrintStream/println(Ljava/lang/String;)Viconst_1invokestatic java/lang/System/exit(I)VLabel6::The above Java byte code is generated from the knowledge connection statement by the APL compiler. The code is in a special format that the Jasmin assembler can assemble it to binary code. After the compiler finds out that the statement db = “SRAdb” is a knowledge base connection statement instead of assignment, it uses the string “SRAdb” to form the URL of the database “jdbc:odbc:SRAdb”. Then the compiler generates the code that is needed to connect to the database and stores the reference to the connection. The compiler automatically generates the exception handling code that is necessary for database manipulation.We can see that only programmers concern in APL is to decide which APL knowledge base is to be used. After the programmer specifies the database name, the runtime system will be responsible for connecting to the actual database. The programmer does not need to write a code to load the database driver, connect to the database and catch an exception. This feature makes APL a convenient language for BDI manipulation.The translation rules are very similar for these two other statements – knowledge base access and update. The code for the belief access statement is defined in the getBelief(…) plans of Belief stockBelief. It is:i = get columName1 from tableName1 where symbol1=goal1; This statement contains the information we need to construct a SQL statement. SQL is an embedded programming language that can be embedded in a lot of other languages. In this statement, “columName1” is the name of the field that we want to query from a database. “tableName1” is the name of the table in the database, “symbol1” is the name of the field in the database, which stores the stock symbol name, and “goal” is a string that stores the stock name that the user wants to get suggestions on. From this statement, the compiler can construct a SQL statement “select A from Knowledge where symbol = ‘YHOO’”. Then the compiler generates a code to invoke the executeQuery method, which is defined in the Java Data Base Connectivity (JDBC) API. Using this SQL statement to query the database, the agent gets the belief and stores the belief in the local variable “i”.We allow an APL agent has a certain level of intelligence that can make it act like a real intelligent agent. This is done in the definition of the Desire. The following code is the source of the desire component of the SRA system.Desire recomDesire {belief<database> db1;belief<String> stockId;stockIntention stockIn;stockBelief stockB;public recomDesire (belief<String> g, stockBelief Bi,stockIntention Ii) {db1=Bi.db;stockB=Bi;stockId = g;stockIn = Ii;}public void run(){belief<int> result;belief<String> maptable;belief<int>b1=stockB.getBelief(db1,"knowledge","A","Symbol",stockId); :result = b1 + b2 + b3 + b4 + b5 + b6;maptable = "BPmap";reason {db1.maptable.belief(result)}using {db1.maptable.stockIn()};}}The Desire is translated to a Java class as a reusable component. However, since we want the desire running with its own thread, the desire is translated to inherit the Java Thread. In the Desire definition, at least one plan named “run (…)” needs to be created. This plan will be automatically invoked when the Desire is called. The reasoning action is defined in the Desire definition. It is the reasoning procedure that makes agents intelligent. The BPmap table plays a very important role during the reasoning process. By using the BPmap table, the agent can dynamically link to different plans at runtime. With the help of dynamic linking, we can modifythe plans or even add new plans, without halting the agent and recompiling the source program. We can ask an agent to achieve the goal in a better way by changing the links that is stored in the BPmap to the alternative plans. The dynamic linking makes APL a unique language among many agent-based languages.The Desire first declares the belief that it needs to evaluate the goals and the Intention it might need to achieve the goal. Then it calls the database access plan that is defined in the Belief to retrieve the beliefs from the table Knowledge. After calculating the beliefs (by add them all), the desire uses the result to get the plan names that are stored in the table BPmap. The program executes these plans and returns something to the caller if necessary. The reasoning statement defines this process. In our SRA system, the reasoning statement is defined in the “run ()” plan in the Desire recomDesire. The reasoning statement in the SRA system is:reason {db1.maptable.belief(result)}using {db1.maptable.stockIn()};This statement means by reasoning the value “result” in the table maptable (BPmap), it invokes the plans specified in the intention field in the BPmap table. These plans are predefined in the Intention. In the SRA system, Intention stockIntention defines several plans such as planA, planB, planC, planD and planE. The BPmap table contains links to these plans. Mapping is done through the BPmap table at runtime. The compiler generates a SQL statement that looks like “select intention from BPmap where result >LowLimit and result <=HighLimit”. The compiled code will connect to database and use this SQL statement to get the plan name stored in “intention” field.Even though we have the plan name at this point, the execution of the plan is a little bit different. Since the program will not know which plan will be executed until an agent is really invoked, we will use a special mechanism called the Java reflection to execute it. Reflection allows JVM to load a class and execute the method at runtime. So with the help of reflection we can finally execute the corresponding plan and achieve the goal.The intention is a set of plans that the agent may execute. A plan can be written in the similar syntax to the method in the Java.A plan has been translated to the Java byte code similar to the Java method. However, intention itself is translated into the reusable class. Plans are translated into the method level. The following is the source code of an intention that has one plan defined in it. Intention stockIntention {public void planA (){System.out.println("recommand using plan A: Strong Sell");}:}We also need both a sever agent and a client agent to run the SRA system. The prototype compiler works well enough for this application. We may add more features for APL in the future work.5. ConclusionsAgent-based computing is emerged as a new computing paradigm. The BDI model is one of the most powerful techniques to describe intelligent agents. In this paper we have introduced a new agent-based programming language, APL, and its compiler we built based on the BDI agent concept. This work shows how naturally APL can describe the behaviors of intelligent software agents. By constructing the compiler, we have a really executable APL program that can run on the Java Virtual Machine. APL provides an easy Java-like syntax which makes it easy to learn and more efficient to define software agent. APL will use database to store the knowledge. But access to the database is hidden from programmers. So programmers can focus on defining agents instead of writing codes accessing the database and catching the exception. This feature makes APL more natural than other languages to describe intelligent agents. The use of BPmap and dynamic link technique enables APL to execute different plans at runtime without recompiling the source program. It makes APL agents more flexible and more intelligent.In the future work, we need to improve the dynamic link technique. So the agent can automatically find parameters for the new plan and execute it right. We can add more learning techniques such as the Belief-Desire table, so that the agent can change its goal at runtime. We also need to develop a new runtime system solely for APL that can support BDI agent-based programming more naturally.An updated research with source codes is located at our web page at /~jo.6. References[1] Bratman, Michael E., Intention, Plans, and Practical Reason, HarvardUniv. Press, 1987 (also by CSLI Publication, 1999).[2] Busetta, Paolo and Ramamohanarao, Kotagiri. The BDIM AgentToolkit Design, Technical Report 97/15, Department of computerScience, The University of Melbourne, Australia, 1997.http://www.cs.mu.oz.au/publications/tr_db/TR.html.[3] Busetta, Paolo and Ramamohanarao, Kotagiri. An architecture forMobile BDI Agent, ACM SAC ’98, 7-8, 1998.[4] DeLoach, Scott A. Multiagent Systems Engineering: A Methodologyand Languages for Designing Agent Systems,/ai/publications/Conference/aois-99/MaSE-AOIS99.htm, 1999.[5] Einhorn, Jeffrey M. and Jo, Chang-Hyun. A BDI Agent SoftwareDevelopment Process, University of North Dakota, 2002.[6] Feng, Xin and Jo, Chang-Hyun. Design and Simulation of an Agent-based Stock Trader, University of North Dakota, 2001.[7] Franklin, Stan and Graesser, Art. Is it an Agent, or just a Program? :A Taxonomy for Autonomous Agents,/~franklin/AgentProg.html, Also in theProc. of the 3 International Workshop on Agent Theories,Architectures, and Languages, Springer-Verlag, 2-7, 1996.[8] Huber, Marcus J. JAM: A BDI-theoretic Mobile Agent Architecture,Proc. Of the Autonomous Agents ’99, Seattle, USA, 236-243, 1999. [9] JACK, Agent Oriented Software Pty. Ltd., JACK Intelligent AgentsUser Guide, .au, 1999.[10] Jo, Chang-Hyun, A Seamless Approach to the Agent Development,ACM SAC 2001 Conference, Las Vegas, 641-647, March 2001. [11] Jo, Chang-Hyun and Arnold, Allen J., Agent-based ProgrammingLanguage: APL, ACM SAC 2002 Conference, Madrid, Spain, 27-31,March 2002.[12] Meyer, J. and T. Downing, Java Virtual Machine, O’Reilly, 1997.[13] Petrie, Charles J. Agent-Based Engineering, the Web, andIntelligence, /NextLink/Expert.html, alsoappeared in the IEEE Expert, (December 1996).[14] Yahoo Stock Quotes, , 2000.。
Chapter 1I. Fill in the following blanks.1. Application software2. -128 1273.System software4. hardware system software system5. microcomputers, minicomputers, mainframe computers, supercomputersII. True or False.1.F2. F3. F4.T5. TIII. Matching terms.1. (2)2. (3)3. (1)4.(4)IV. Translating Terms.1. 编码技术2. 应用软件3. 浮点数据4. 分时,分时技术5. 存储容量V. Fill in the blanks with the words given below. Change the form where necessary.1. He _____ from the accident unharmed.emerged2. This material is _____ to be pure silk.warranted3. He changed his pounds for the _____ amount of dollars.equivalent4. The regulations _____ that you may use a dictionary in the examination.specify5. _____ mathematics has become popular in recent decades because of its applications to computer science.Discrete6. The _____ 0.61 stands for 61 hundredths.decimal7. The electrically charged gas particles are affected by _____ forces.magnetic8. Bessie has _____ her life to caring for others.dedicatedVI.1. awareness2. efficiency3. interaction4. command5. confidence6. speedVII. Choose the best one of the four answers given to fill in each blank.1. A2. B3. A4. B5. C6. C7. A8. D9. D 10.CVIII. Translate the following into English.1.通过应用各种编码技术。