Abstract Activity and Context for Mobile and Ubiquitous Computing Users

合集下载

abstract_executive_summary

abstract_executive_summary

Abstract and executive summaryThe abstract•Most research articles and reports are prefaced by an abstract.•An abstract is an overview of the entire text.•It is sometimes called a synopsis.•Unlike the introduction, which leads the audience to the body of the text, the abstract isa text about a text – it provides a commentary on the text that follows from beginningto end.•It is a short, half- to one-page summary where each new sentence introduces new information so that a concise summary is achieved without paragraphing.•It is usually written impersonally.•Check that your abstract has at least one sentence about each section of the report, in the same order.•It should be written after the report is completed, when you have an overview of the whole text, and placed on the first page of the report.The executive summary•An executive summary is derived from the business practice of giving executives a concise outline of the main points in a report, indicating where in the report to locate more detailed information.•The summary may consist of several pages for a long report, and may include headings and dot points or numbered points.•It must be concise and without fine detail, providing a commentary on the main points only and following the sequence of the report itself.•Like the abstract, it should be written after the report is completed, when you have an overview of the whole text, and placed on the first page of the report.2Adapted from the following source:Morley-Warner, T. 2009, Academic writing is… A guide to writing in a university context, Association for Academic Language and Learning, Sydney.。

con97

con97

In: Proceedings of the 2nd European Conference on Cognitive Science, Manchester, UK, April 9-11, 1997A Dynamic Theory of Implicit ContextBoicho KokinovInstitute of Mathematics and Cognitive Science DepartmentBulgarian Academy of Sciences New Bulgarian UniversityBl.8, Acad. G. Bonchev Str.21 Montevideo Str.,Sofia 1113, BULGARIA Sofia 1635, BULGARIAe-mail: KOKINOV@BGEARN.ACAD.BG e-mail: KOKINOV@COGS.NBU.ACAD.BGAbstractSeveral distinctions between various concepts of context are discussed: internal vs. external,intrinsic vs. model-based, and implicit vs. explicit. Finally, a dynamic theory of implicit,intrinsic, internal context is briefly discussed and its application to a context-sensitive generalcognitive architecture DUAL and a context-sensitive model of human reasoning, AMBR, arebriefly outlined.Keywords: implicit context, intrinsic context, internal context, dynamic approachCONTEXT EFFECTSPsychologists have demonstrated context effects on virtually all cognitive processes. Thus, for example, context effects on perception have been demonstrated by Gestalt psychologists in various forms: different interpretations of ambiguous figures; visual illusions depending on the background elements or on the presence of other stimuli. In language comprehension context effects can be exemplified by lexical, syntax, semantic, inference, thematic and other types of context effects (Tiberghien, 1988). In memory studies various effects of context have been demonstrated – context-dependence of recall and even recognition, memory illusions in false recognition, context-based interference, priming effects, etc. (Davies & Thomson, 1988a, Levandowsky, Kirsner, & Bainbridge, 1989). In problem solving various forms of context effects have been demonstrated: functional fixedness (Maier, 1931, Dunker, 1945), set effects (Luchins, 1942), lack of transfer from previous problem solving experience (Gick & Holyoak, 1980), priming effects (Kokinov, 1990, Schunn & Dunbar, 1996), effects of casual elements of the environment (Maier, 1931, Kokinov & Yoveva, 1996). In decision-making various context effects have been demonstrated: framing effects – the effects of alternative descriptions, e.g. percentage died or saved; effects of alternative methods of elicitation; and effects of added alternatives (Shafir, Simonson, & Tversky, 1993). Barsalou (1993) demonstrated context effects on concepts characterisation.Thus every change in the experimental conditions that proved to change the behaviour of the subject is called a context effect. In the case of perception, language comprehension, problem-solving, and decision-making most often context effects can be described as a change to the external environment which causes a change to the cognitive performance or subjects’ response; in the case of learning, memory, and problem solving transfer (like in analogical problem solving) context effects typically demonstrated are due to the change of the external environment between the initial learning stage and the later memory or problem solving test.According to the dynamic theory of context (Kokinov, 1995) context is the set of entities that influence human (or system’s) behaviour on a particular occasion, i.e. the set of elements that produce context effects. INTERNAL VS. EXTERNAL CONTEXTTwo different notions of context have been used in the literature which will be called here external and internal context. External context refers to the physical and social environment or the setting within which the subject’s behaviour is generated (Davies & Thomson, 1988a, Roediger & Srinivas, 1993). Internal context refers to subject’s current mental state (Sperber & Wilson, 1986, Kintsch, 1988, Giunchiglia &Bouquet, in press) withinwhich the subject’s behaviour is generated.1 Obviously there is a relation between the external and internal contexts – the external context is being perceived and this changes the mental state of the subject, i.e. his/her internal context. However, what part of the external context will be perceived and reflected is purely subjective and depends on subject’s current state (incl. goals, currently used social and common sense schemas, currently active concepts, etc.), i.e. on subject’s internal context.Psychological experiments are typically manipulating external context and very rarely the internal context (exceptions are mood-dependence studies and priming effects), however, what we are really interested in are the mechanisms of context influence, i.e. how the internal context is being formed and how it is used.The dynamic theory of context (Kokinov, 1995) accepts that the internal context is being formed by the interaction between at least three processes: perception of the environment or building new representations; accessing memory traces or reactivating and possibly modifying old representations; and reasoning or constructing new representations. It also assumes that it is the internal context which on its turn influences perception, memory, and reasoning processes.INTRINSIC CONTEXT VS. MODEL-BASED CONTEXTThe currently dominating view on context is model-based, i.e. it assumes the existence of a model of the cognitive process according to which some factors (e.g. the instructions, the stimuli, the goals of the subject) are variable and important for the process and are called inputs to the model while others are supposed to be either constant or irrelevant to the process and therefore they are not included in the model’s inputs (they are “hardwired” in the model and can be considered as constants or parameters that rarely change). Thus if such a supposedly irrelevant factor turns out to influence subject’s behaviour then this is called context effect and model’s failure to predict the outcome of the experiment is explained by “interaction effect”. This view has been expressed very clearly by Bernard Amy (1989): “Context effects are interactive effects, in the physical sense of the term. The course of an ongoing central process is modified by interaction with other ongoing processes. Contexts act not on the inputs of the central process but on the function itself”. Similar views have been expressed by Davies & Thomson (1988b): “All distinctions of context assume a distinction between stimulus and setting, figure and ground”; and Lockhart (1988): “The vary phrase context effects assumes that it is both possible and useful to distinguish a core stimulus from other aspects of the total stimulus configuration and that core and context can be varied independently”.This view implies that the observer (external or internal) focuses on a specific part of the system’s behaviour considering it as central and modelling it, and allows other contextual factors to influence or modify this central process, to redirect its focusing on different input data. This view has been expressed also by Cristiano Castelfranchi in the electronic discussion prior to the workshop, he has insisted on the relational nature of the notion of context (“context of” a process). Then, of course, the problem arises which factors to include in the model and which to leave out for the context. In my opinion such notion of context has not a high theoretical value, as it becomes equivalent to explanatory “trash” – everything which we cannot explain so far is context.The dynamic theory of context assumes that the cognitive system is continuously changing and there is no clear difference between changing the input and changing the system itself. It assumes also that there is one global cognitive process described as the evolution of the system over time and that all more specific or partial processes that we are considering and modelling are only abstractions which allow us to simplify our scientific endeavour. Having this in mind then there is only one single global context for all these “abstract” processes –the state of the dynamic system. This is called intrinsic context of the cognitive system and is the focus of research of the dynamic theory of context. The intrinsic context includes what others characterise as “figure”, i.e. subject’s current goals and focus of attention are part of the context and might be considered as its core or central part. The problem is how to describe this global state of the system. Before we try to answer this question we shall make another useful distinction.IMPLICIT CONTEXT, EXPLICIT CONTEXT, AND META-CONTEXTThere are at least two different meanings of explicit/implicit used in the literature and both are relevant. The first one concerns the content of the memory traces – whether they include a representation of contextual features. For example, whether subjects encode information about some specific feature of the room setting, of the experimenter, etc. when asked to remember a list of words.2 The traces may even include a meta-representation –1 In the situated approach context is considered to be the interaction between the environment and subject’s mind/body, thus there is no such separation between internal and external context (Shanon, 1990).2 This reading of explicit/implicit assumes model-based notion of context: the model assumes that room setting and experimenter’s face are irrelevant to the task of list memorising and therefore are contextual factors. However, it might well be the case that for some subjects the vary experience of participating in the experimenta representation of the context itself (i.e. to represent the context as an object) – e.g. “This law is true only in the domain of micro-particles, but not in the macro world”. This type of meta-representation is needed when subjects use several contexts within a short period of time and have to control the process of switching from one context to another. AI models tend to use the notion of context in this meta-representation meaning (McCarthy, 1991, Giunchiglia, 1993). Contextual features might also be implicitly represented, i.e. they could be inferred (reconstructed) from the content of other traces, e.g. the fact that there were a lot of broken glasses during the car crash last week might be inferred from our schema for a car crash (and might even be false in that particular case).The second reading of implicit/explicit distinction (which is more relevant to the dynamic theory of context) concerns the subject’s level of awareness of the very fact of existence of some memory trace. According to the dynamic theory of context the level of awareness is a graded (continuous) and dynamic characteristic of every memory element, i.e. there are various degrees of awareness measured by the amount of processing capacity currently associated with this particular element. In other words accessibility is a key measure of explicitness. At the lowest end a memory trace could be completely inaccessible (neither consciously, nor unconsciously) at a particular moment, then it could be only unconsciously (implicitly) available (demonstrated by priming effects, but failing to be recognised in an explicit memory task, for example), then it could be consciously available (demonstrated by a standard recall or recognition task), and finally the very fact of existence of the memory trace might be consciously available (demonstrated in a meta-cognitive “feeling of knowing” experiment). Both isolated contextual features and the context as a whole might be implicitly or explicitly available. While explicit availability allows for controlled use of contextual information, implicit availability serves a very important role in human cognition – it is a fast and cheap way of automatic control of resource allocation. If resource allocation control was performed by conscious information processing strategies only, then human cognition would be very slow and inflexible.DYNAMIC THEORY OF IMPLICIT CONTEXTAccording to the dynamic theory (Kokinov, 1995) the implicit intrinsic internal context is considered as the dynamic fuzzy set of all memory elements (mental representations or operations) accessible for mental processing at a particular instant of time. Accessibility of a memory element is modelled by the degree of its activation which is supposed to reflect its estimated relevance (the better the element is connected to the other currently active elements the more relevant it is supposed to be). Thus context is implicitly represented by the distribution of activation over the set of all memory elements. Each pattern of activation represents a specific context. As activation is graded the membership of a memory element to this context is also graded and therefore its relevance is graded as well. This results in different amount of processing resources being made available to different memory elements (in DUAL cognitive architecture (Kokinov, 1994b this is modelled by varying the speed of working of the mental operations and by varying the degree of accessibility of mental representations).This does not exclude to have explicit meta-context representations in addition. The implicit intrinsic internal context (i.e. the mental state of the cognitive system) can be self-observed and part of it (which is consciously accessible) can be explicitly represented in a local structure and afterwards referred to. However, this is always a partial representation of the actual mental state.The dynamic theory of context is being tested in two ways: (a) by psychological experiments on context effects on problem solving which have demonstrated that subjects are influenced in their problem solving activity even by seemingly irrelevant casual stimuli from the environment without always being aware of this influence (Kokinov, Yoveva, 1996, Kokinov, Hadjiilieva, Yoveva, to appear); and (b) by computer simulations of analogical problem solving (Kokinov, 1994a) replicating the priming effects shown earlier and predicting some of the data in the later conducted psychological experiments.(characterised by the experimenter, the room, the instructions, etc.) to be subjectively more important than the artificial list of words and therefore to encode this “contextual” information even in more details than the “target”. And because this subjective importance varies from person to person and from experiment to experiment, psychologists obtain controversial data on context effects (Davies & Thomson, 1988a).ACKNOWLEDGMENTSThe ideas presented here have been inspired by the extensive discussions the author had with Cristiano Castelfranchi during his stay at the Institute of Psychology at CNR in Rome, with Fausto Giunchiglia and Paolo Bouquet during the Cognitive Science Summer School in Sofia as well as by the electronic discussion in the context discussion group. This research has been partially supported by grant OHN406 “Context and Priming Effects on High-Level Cognitive Processes” from the Bulgarian National Science Foundation. REFERENCESAmy, B. (1989). Contextual Cognitive Machines. In: Tiberghien, G. (ed.) Advances in Cognitive Science, vol.2: Theory and Applications. Ellis Horwood, Chichester.Barsalou, L. (1993). Flexibility, Structure, and Linguistic Vagary in Concepts: Manifestations of a Compositional System of Perceptual Symbols. In: Collins, A., Gathercole, S., Conway, M., & Morris, P.(eds.) Theories of Memory. Erlbaum, Hillsdale, NJ.Dunker, K. (1945). On Problem Solving. Psychological Monographs, 58:5, (Whole No. 270).Gick, M. & Holyoak, K. (1980). Analogical Problem Solving. Cognitive Psychology, 12, 306-355. Giunchiglia, F. (1993). Contextual Reasoning. In: Epistemologia - Special Issue on I Linguaggi e le Machine, 16, 345-364.Giunchiglia, F. & Bouquet, P. (in press). Introduction to Contextual Reasoning. In: Kokinov. B. (ed.) Perspectives on Cognitive Science, vol. 3, NBU Press, Sofia.Davies, G. & Thomson, D. (1988a). Memory in Context: Context in Memory. John Wiley, Chichester. Davies, G. & Thomson, D. (1988b). Context in Context. In: Davies, G. & Thomson, D. (eds.) Memory in Context: Context in Memory. John Wiley, Chichester.Kintsch, W. (1988). The Role of Knowledge in Discourse Comprehension: A Construction-Integration Model.Psychological Review, 95(2), 163-182Kokinov, B. (1990). Associative Memory-Based Reasoning: Some Experimental Results. In: Proceedings of the 12th Annual Conference of the Cognitive Science Society, Hillsdale, NJ: Lawrence Erlbaum Associates. Kokinov, B. (1994a) A Hybrid Model of Reasoning by Analogy. Chapter 5. in: K. Holyoak & J. Barnden (eds.) Analogical Connections, Advances in Connectionist and Neural Computation Theory, vol.2, Ablex Publ. Corp.Kokinov, B. (1994b) The Context-Sensitive Cognitive Architecture DUAL. In: Proceedings of the 16th Annual Conference of the Cognitive Science Society. Erlbaum, Hillsdale, NJ.Kokinov, B. (1995). A Dynamic Approach to Context Modeling. In: Brezillon, P. Abu-Hakima, S. (eds.) Working Notes of the IJCAI’95 Workshop on Modelling Context in Knowledge Representation and Reasoning. IBP, LAFORIA 95/11.Kokinov, B., Yoveva, M. (1996). Context Effects on Problem Solving. In: Proceedings of the 18th Annual Conference of the Cognitive Science Society. Erlbaum, Hillsdale, NJ.Kokinov, B., Hadjiilieva, K., & Yoveva, M. (to appear). Is a Hint Always Useful in Problem Solving? The Influence of Pragmatic Distance on Context Effects.Levandowsky, S., Kirsner, K., & Bainbridge, V. (1989). Context Effects in Implicit Memory: A Sense-Specific Account. In: Lewandowsky, S., Dunn, J., & Kirsner, K. (eds.) Implicit Memory: Theoretical Issues.Erlbaum, Hillsdale, NJ.Lockhart, R. (1988). Conceptual Specificity in Thinking and Remembering. In: Davies, G. & Thomson, D.(eds.) Memory in Context: Context in Memory. John Wiley, Chichester.Luchins, A. (1942). Mechanization in Problem Solving: The Effect of Einstellung. Psychological Monographs, 54:6, (Whole No. 248).Maier, N. (1931). Reasoning in Humans II: The Solution of a Problem and it Appearance in Consciousness.Journal of Comparative Psychology, 12, 181-194.McCarthy, J. (1991). Notes on Formalizing Context. unpublished, 1991Roediger, H. & Srinivas, K. (1993). Specificity of Operations in Perceptual Priming. In: Graf, P. & Masson, M. (eds.) Implicit Memory: New Directions in Cognition, Development, and Neuropsychology. Erlbaum, Hillsdale.Schunn, C. & Dunbar, K. (1996). Priming, Analogy, and Awareness in Complex Reasoning. Memory and Cognition, 24, 271-284.Shafir, E., Simonson, I. & Tversky, A. (1993). Reason-Based Choice. Cognition, 49, 11-36.Shanon, B. (1990). What is Context? J. for the Theory of Social Behavior, 20, 157-166.Sperber, D. & Wislon, D. (1986). Relevance. Communication and Cognition. Harvard University Press, Cambridge, MA.Tiberghien, G. (1988). Language Context and Context Language. In: Davies, G. & Thomson, D. (eds.) Memory in Context: Context in Memory. John Wiley, Chichester.。

先进网络感知和特征管理

先进网络感知和特征管理

先进网络感知和特征管理Now,network is very common all over the field in human life. It is not only asimple media for communication but also roles a very important effect in thedevelopment of our human society. People pay more and more attention to informationand network then before, and with the development of mobilc communication devices,they have higher request for intellectualized and mobile network,so we need tointroduce the context-aware concept to satisfy the demands.Future 3G nctwork will provide services of context-aware which were producedby cooperating with contcxt information and context managcmcnt. It is very importantthat context-aware can improve system cfficiency and support network. We import theconcept of context-aware to a new network-Ambicnt network, which can make somenew applications and scrvices. I believe that this technology will be gradually used inour lives to make them convenient and comfortable in the future.Either Ambient network or context-awarc technology is a new topic for us.soexlensive research and applications have not becn devcloped. Thus,the author of thispaper realized their concepts,frameworks and system processing through studying.Also, it can be an introduction of this field for the rescarch to more and more peoplc,and it will be useful for thc rapid development of the context-aware technology inambient network.Based on the studying composing or corrclative literature by Raffaele Giaffreda,Matthias Baldauf,Schahram Dustdar and Forian Roscnberg etc,the author mainlymakes her own comprehensions and chicfs about context-aware technology in Ambientnetwork.The work l do as follows:1. Importing the concepts of Ambient network and context-aware and introducingcorrelative background knowledge mainly oncontext-aware.2.Analyzing contcxt-aware system and describing the basic context-aware technologyin Ambient network.3.Lucubrating context-aware frameworks and its key technology,and based on theframework, I construct a new simple context model.4. Putting forward new challenging for future scicntific rcsearch of context-aware.。

Abstract

Abstract
(f (lambda (v) (creg-set ! k) v))tinuation is the abstract concept represented by the control stack, or dynamic chain of activation records, in a typical programming language implementation. Continuations correspond to contexts in Smalltalk-80m. In languages such as Scheme and Smalltalk-80, continuations may become first class objects with unlimited extent (lifetime) [Rees 861 [Goldberg 831. This means that a purely stack-based implementation of recursive procedure calls, which suffices for most languages, is inadequate.
Permissionto copy without fee all or part of this materilalis granted provided that the copies are not made or distributed for direct
commercial advantage, the ACM copyright notice and the title of the publication and its date appear, and notice is given that copying is by permission of the Association for Computing Machinery. To copy otherwise, or to republish, requires a fee and/or specfic permission.

OSHA现场作业手册说明书

OSHA现场作业手册说明书

DIRECTIVE NUMBER: CPL 02-00-150 EFFECTIVE DATE: April 22, 2011 SUBJECT: Field Operations Manual (FOM)ABSTRACTPurpose: This instruction cancels and replaces OSHA Instruction CPL 02-00-148,Field Operations Manual (FOM), issued November 9, 2009, whichreplaced the September 26, 1994 Instruction that implemented the FieldInspection Reference Manual (FIRM). The FOM is a revision of OSHA’senforcement policies and procedures manual that provides the field officesa reference document for identifying the responsibilities associated withthe majority of their inspection duties. This Instruction also cancels OSHAInstruction FAP 01-00-003 Federal Agency Safety and Health Programs,May 17, 1996 and Chapter 13 of OSHA Instruction CPL 02-00-045,Revised Field Operations Manual, June 15, 1989.Scope: OSHA-wide.References: Title 29 Code of Federal Regulations §1903.6, Advance Notice ofInspections; 29 Code of Federal Regulations §1903.14, Policy RegardingEmployee Rescue Activities; 29 Code of Federal Regulations §1903.19,Abatement Verification; 29 Code of Federal Regulations §1904.39,Reporting Fatalities and Multiple Hospitalizations to OSHA; and Housingfor Agricultural Workers: Final Rule, Federal Register, March 4, 1980 (45FR 14180).Cancellations: OSHA Instruction CPL 02-00-148, Field Operations Manual, November9, 2009.OSHA Instruction FAP 01-00-003, Federal Agency Safety and HealthPrograms, May 17, 1996.Chapter 13 of OSHA Instruction CPL 02-00-045, Revised FieldOperations Manual, June 15, 1989.State Impact: Notice of Intent and Adoption required. See paragraph VI.Action Offices: National, Regional, and Area OfficesOriginating Office: Directorate of Enforcement Programs Contact: Directorate of Enforcement ProgramsOffice of General Industry Enforcement200 Constitution Avenue, NW, N3 119Washington, DC 20210202-693-1850By and Under the Authority ofDavid Michaels, PhD, MPHAssistant SecretaryExecutive SummaryThis instruction cancels and replaces OSHA Instruction CPL 02-00-148, Field Operations Manual (FOM), issued November 9, 2009. The one remaining part of the prior Field Operations Manual, the chapter on Disclosure, will be added at a later date. This Instruction also cancels OSHA Instruction FAP 01-00-003 Federal Agency Safety and Health Programs, May 17, 1996 and Chapter 13 of OSHA Instruction CPL 02-00-045, Revised Field Operations Manual, June 15, 1989. This Instruction constitutes OSHA’s general enforcement policies and procedures manual for use by the field offices in conducting inspections, issuing citations and proposing penalties.Significant Changes∙A new Table of Contents for the entire FOM is added.∙ A new References section for the entire FOM is added∙ A new Cancellations section for the entire FOM is added.∙Adds a Maritime Industry Sector to Section III of Chapter 10, Industry Sectors.∙Revises sections referring to the Enhanced Enforcement Program (EEP) replacing the information with the Severe Violator Enforcement Program (SVEP).∙Adds Chapter 13, Federal Agency Field Activities.∙Cancels OSHA Instruction FAP 01-00-003, Federal Agency Safety and Health Programs, May 17, 1996.DisclaimerThis manual is intended to provide instruction regarding some of the internal operations of the Occupational Safety and Health Administration (OSHA), and is solely for the benefit of the Government. No duties, rights, or benefits, substantive or procedural, are created or implied by this manual. The contents of this manual are not enforceable by any person or entity against the Department of Labor or the United States. Statements which reflect current Occupational Safety and Health Review Commission or court precedents do not necessarily indicate acquiescence with those precedents.Table of ContentsCHAPTER 1INTRODUCTIONI.PURPOSE. ........................................................................................................... 1-1 II.SCOPE. ................................................................................................................ 1-1 III.REFERENCES .................................................................................................... 1-1 IV.CANCELLATIONS............................................................................................. 1-8 V. ACTION INFORMATION ................................................................................. 1-8A.R ESPONSIBLE O FFICE.......................................................................................................................................... 1-8B.A CTION O FFICES. .................................................................................................................... 1-8C. I NFORMATION O FFICES............................................................................................................ 1-8 VI. STATE IMPACT. ................................................................................................ 1-8 VII.SIGNIFICANT CHANGES. ............................................................................... 1-9 VIII.BACKGROUND. ................................................................................................. 1-9 IX. DEFINITIONS AND TERMINOLOGY. ........................................................ 1-10A.T HE A CT................................................................................................................................................................. 1-10B. C OMPLIANCE S AFETY AND H EALTH O FFICER (CSHO). ...........................................................1-10B.H E/S HE AND H IS/H ERS ..................................................................................................................................... 1-10C.P ROFESSIONAL J UDGMENT............................................................................................................................... 1-10E. W ORKPLACE AND W ORKSITE ......................................................................................................................... 1-10CHAPTER 2PROGRAM PLANNINGI.INTRODUCTION ............................................................................................... 2-1 II.AREA OFFICE RESPONSIBILITIES. .............................................................. 2-1A.P ROVIDING A SSISTANCE TO S MALL E MPLOYERS. ...................................................................................... 2-1B.A REA O FFICE O UTREACH P ROGRAM. ............................................................................................................. 2-1C. R ESPONDING TO R EQUESTS FOR A SSISTANCE. ............................................................................................ 2-2 III. OSHA COOPERATIVE PROGRAMS OVERVIEW. ...................................... 2-2A.V OLUNTARY P ROTECTION P ROGRAM (VPP). ........................................................................... 2-2B.O NSITE C ONSULTATION P ROGRAM. ................................................................................................................ 2-2C.S TRATEGIC P ARTNERSHIPS................................................................................................................................. 2-3D.A LLIANCE P ROGRAM ........................................................................................................................................... 2-3 IV. ENFORCEMENT PROGRAM SCHEDULING. ................................................ 2-4A.G ENERAL ................................................................................................................................................................. 2-4B.I NSPECTION P RIORITY C RITERIA. ..................................................................................................................... 2-4C.E FFECT OF C ONTEST ............................................................................................................................................ 2-5D.E NFORCEMENT E XEMPTIONS AND L IMITATIONS. ....................................................................................... 2-6E.P REEMPTION BY A NOTHER F EDERAL A GENCY ........................................................................................... 2-6F.U NITED S TATES P OSTAL S ERVICE. .................................................................................................................. 2-7G.H OME-B ASED W ORKSITES. ................................................................................................................................ 2-8H.I NSPECTION/I NVESTIGATION T YPES. ............................................................................................................... 2-8 V.UNPROGRAMMED ACTIVITY – HAZARD EVALUATION AND INSPECTION SCHEDULING ............................................................................ 2-9 VI.PROGRAMMED INSPECTIONS. ................................................................... 2-10A.S ITE-S PECIFIC T ARGETING (SST) P ROGRAM. ............................................................................................. 2-10B.S CHEDULING FOR C ONSTRUCTION I NSPECTIONS. ..................................................................................... 2-10C.S CHEDULING FOR M ARITIME I NSPECTIONS. ............................................................................. 2-11D.S PECIAL E MPHASIS P ROGRAMS (SEP S). ................................................................................... 2-12E.N ATIONAL E MPHASIS P ROGRAMS (NEP S) ............................................................................... 2-13F.L OCAL E MPHASIS P ROGRAMS (LEP S) AND R EGIONAL E MPHASIS P ROGRAMS (REP S) ............ 2-13G.O THER S PECIAL P ROGRAMS. ............................................................................................................................ 2-13H.I NSPECTION S CHEDULING AND I NTERFACE WITH C OOPERATIVE P ROGRAM P ARTICIPANTS ....... 2-13CHAPTER 3INSPECTION PROCEDURESI.INSPECTION PREPARATION. .......................................................................... 3-1 II.INSPECTION PLANNING. .................................................................................. 3-1A.R EVIEW OF I NSPECTION H ISTORY .................................................................................................................... 3-1B.R EVIEW OF C OOPERATIVE P ROGRAM P ARTICIPATION .............................................................................. 3-1C.OSHA D ATA I NITIATIVE (ODI) D ATA R EVIEW .......................................................................................... 3-2D.S AFETY AND H EALTH I SSUES R ELATING TO CSHO S.................................................................. 3-2E.A DVANCE N OTICE. ................................................................................................................................................ 3-3F.P RE-I NSPECTION C OMPULSORY P ROCESS ...................................................................................................... 3-5G.P ERSONAL S ECURITY C LEARANCE. ................................................................................................................. 3-5H.E XPERT A SSISTANCE. ........................................................................................................................................... 3-5 III. INSPECTION SCOPE. ......................................................................................... 3-6A.C OMPREHENSIVE ................................................................................................................................................... 3-6B.P ARTIAL. ................................................................................................................................................................... 3-6 IV. CONDUCT OF INSPECTION .............................................................................. 3-6A.T IME OF I NSPECTION............................................................................................................................................. 3-6B.P RESENTING C REDENTIALS. ............................................................................................................................... 3-6C.R EFUSAL TO P ERMIT I NSPECTION AND I NTERFERENCE ............................................................................. 3-7D.E MPLOYEE P ARTICIPATION. ............................................................................................................................... 3-9E.R ELEASE FOR E NTRY ............................................................................................................................................ 3-9F.B ANKRUPT OR O UT OF B USINESS. .................................................................................................................... 3-9G.E MPLOYEE R ESPONSIBILITIES. ................................................................................................. 3-10H.S TRIKE OR L ABOR D ISPUTE ............................................................................................................................. 3-10I. V ARIANCES. .......................................................................................................................................................... 3-11 V. OPENING CONFERENCE. ................................................................................ 3-11A.G ENERAL ................................................................................................................................................................ 3-11B.R EVIEW OF A PPROPRIATION A CT E XEMPTIONS AND L IMITATION. ..................................................... 3-13C.R EVIEW S CREENING FOR P ROCESS S AFETY M ANAGEMENT (PSM) C OVERAGE............................. 3-13D.R EVIEW OF V OLUNTARY C OMPLIANCE P ROGRAMS. ................................................................................ 3-14E.D ISRUPTIVE C ONDUCT. ...................................................................................................................................... 3-15F.C LASSIFIED A REAS ............................................................................................................................................. 3-16VI. REVIEW OF RECORDS. ................................................................................... 3-16A.I NJURY AND I LLNESS R ECORDS...................................................................................................................... 3-16B.R ECORDING C RITERIA. ...................................................................................................................................... 3-18C. R ECORDKEEPING D EFICIENCIES. .................................................................................................................. 3-18 VII. WALKAROUND INSPECTION. ....................................................................... 3-19A.W ALKAROUND R EPRESENTATIVES ............................................................................................................... 3-19B.E VALUATION OF S AFETY AND H EALTH M ANAGEMENT S YSTEM. ....................................................... 3-20C.R ECORD A LL F ACTS P ERTINENT TO A V IOLATION. ................................................................................. 3-20D.T ESTIFYING IN H EARINGS ................................................................................................................................ 3-21E.T RADE S ECRETS. ................................................................................................................................................. 3-21F.C OLLECTING S AMPLES. ..................................................................................................................................... 3-22G.P HOTOGRAPHS AND V IDEOTAPES.................................................................................................................. 3-22H.V IOLATIONS OF O THER L AWS. ....................................................................................................................... 3-23I.I NTERVIEWS OF N ON-M ANAGERIAL E MPLOYEES .................................................................................... 3-23J.M ULTI-E MPLOYER W ORKSITES ..................................................................................................................... 3-27 K.A DMINISTRATIVE S UBPOENA.......................................................................................................................... 3-27 L.E MPLOYER A BATEMENT A SSISTANCE. ........................................................................................................ 3-27 VIII. CLOSING CONFERENCE. .............................................................................. 3-28A.P ARTICIPANTS. ..................................................................................................................................................... 3-28B.D ISCUSSION I TEMS. ............................................................................................................................................ 3-28C.A DVICE TO A TTENDEES .................................................................................................................................... 3-29D.P ENALTIES............................................................................................................................................................. 3-30E.F EASIBLE A DMINISTRATIVE, W ORK P RACTICE AND E NGINEERING C ONTROLS. ............................ 3-30F.R EDUCING E MPLOYEE E XPOSURE. ................................................................................................................ 3-32G.A BATEMENT V ERIFICATION. ........................................................................................................................... 3-32H.E MPLOYEE D ISCRIMINATION .......................................................................................................................... 3-33 IX. SPECIAL INSPECTION PROCEDURES. ...................................................... 3-33A.F OLLOW-UP AND M ONITORING I NSPECTIONS............................................................................................ 3-33B.C ONSTRUCTION I NSPECTIONS ......................................................................................................................... 3-34C. F EDERAL A GENCY I NSPECTIONS. ................................................................................................................. 3-35CHAPTER 4VIOLATIONSI. BASIS OF VIOLATIONS ..................................................................................... 4-1A.S TANDARDS AND R EGULATIONS. .................................................................................................................... 4-1B.E MPLOYEE E XPOSURE. ........................................................................................................................................ 4-3C.R EGULATORY R EQUIREMENTS. ........................................................................................................................ 4-6D.H AZARD C OMMUNICATION. .............................................................................................................................. 4-6E. E MPLOYER/E MPLOYEE R ESPONSIBILITIES ................................................................................................... 4-6 II. SERIOUS VIOLATIONS. .................................................................................... 4-8A.S ECTION 17(K). ......................................................................................................................... 4-8B.E STABLISHING S ERIOUS V IOLATIONS ............................................................................................................ 4-8C. F OUR S TEPS TO BE D OCUMENTED. ................................................................................................................... 4-8 III. GENERAL DUTY REQUIREMENTS ............................................................. 4-14A.E VALUATION OF G ENERAL D UTY R EQUIREMENTS ................................................................................. 4-14B.E LEMENTS OF A G ENERAL D UTY R EQUIREMENT V IOLATION.............................................................. 4-14C. U SE OF THE G ENERAL D UTY C LAUSE ........................................................................................................ 4-23D.L IMITATIONS OF U SE OF THE G ENERAL D UTY C LAUSE. ..............................................................E.C LASSIFICATION OF V IOLATIONS C ITED U NDER THE G ENERAL D UTY C LAUSE. ..................F. P ROCEDURES FOR I MPLEMENTATION OF S ECTION 5(A)(1) E NFORCEMENT ............................ 4-25 4-27 4-27IV.OTHER-THAN-SERIOUS VIOLATIONS ............................................... 4-28 V.WILLFUL VIOLATIONS. ......................................................................... 4-28A.I NTENTIONAL D ISREGARD V IOLATIONS. ..........................................................................................4-28B.P LAIN I NDIFFERENCE V IOLATIONS. ...................................................................................................4-29 VI. CRIMINAL/WILLFUL VIOLATIONS. ................................................... 4-30A.A REA D IRECTOR C OORDINATION ....................................................................................................... 4-31B.C RITERIA FOR I NVESTIGATING P OSSIBLE C RIMINAL/W ILLFUL V IOLATIONS ........................ 4-31C. W ILLFUL V IOLATIONS R ELATED TO A F ATALITY .......................................................................... 4-32 VII. REPEATED VIOLATIONS. ...................................................................... 4-32A.F EDERAL AND S TATE P LAN V IOLATIONS. ........................................................................................4-32B.I DENTICAL S TANDARDS. .......................................................................................................................4-32C.D IFFERENT S TANDARDS. .......................................................................................................................4-33D.O BTAINING I NSPECTION H ISTORY. .....................................................................................................4-33E.T IME L IMITATIONS..................................................................................................................................4-34F.R EPEATED V. F AILURE TO A BATE....................................................................................................... 4-34G. A REA D IRECTOR R ESPONSIBILITIES. .............................................................................. 4-35 VIII. DE MINIMIS CONDITIONS. ................................................................... 4-36A.C RITERIA ................................................................................................................................................... 4-36B.P ROFESSIONAL J UDGMENT. ..................................................................................................................4-37C. A REA D IRECTOR R ESPONSIBILITIES. .............................................................................. 4-37 IX. CITING IN THE ALTERNATIVE ............................................................ 4-37 X. COMBINING AND GROUPING VIOLATIONS. ................................... 4-37A.C OMBINING. ..............................................................................................................................................4-37B.G ROUPING. ................................................................................................................................................4-38C. W HEN N OT TO G ROUP OR C OMBINE. ................................................................................................4-38 XI. HEALTH STANDARD VIOLATIONS ....................................................... 4-39A.C ITATION OF V ENTILATION S TANDARDS ......................................................................................... 4-39B.V IOLATIONS OF THE N OISE S TANDARD. ...........................................................................................4-40 XII. VIOLATIONS OF THE RESPIRATORY PROTECTION STANDARD(§1910.134). ....................................................................................................... XIII. VIOLATIONS OF AIR CONTAMINANT STANDARDS (§1910.1000) ... 4-43 4-43A.R EQUIREMENTS UNDER THE STANDARD: .................................................................................................. 4-43B.C LASSIFICATION OF V IOLATIONS OF A IR C ONTAMINANT S TANDARDS. ......................................... 4-43 XIV. CITING IMPROPER PERSONAL HYGIENE PRACTICES. ................... 4-45A.I NGESTION H AZARDS. .................................................................................................................................... 4-45B.A BSORPTION H AZARDS. ................................................................................................................................ 4-46C.W IPE S AMPLING. ............................................................................................................................................. 4-46D.C ITATION P OLICY ............................................................................................................................................ 4-46 XV. BIOLOGICAL MONITORING. ...................................................................... 4-47CHAPTER 5CASE FILE PREPARATION AND DOCUMENTATIONI.INTRODUCTION ............................................................................................... 5-1 II.INSPECTION CONDUCTED, CITATIONS BEING ISSUED. .................... 5-1A.OSHA-1 ................................................................................................................................... 5-1B.OSHA-1A. ............................................................................................................................... 5-1C. OSHA-1B. ................................................................................................................................ 5-2 III.INSPECTION CONDUCTED BUT NO CITATIONS ISSUED .................... 5-5 IV.NO INSPECTION ............................................................................................... 5-5 V. HEALTH INSPECTIONS. ................................................................................. 5-6A.D OCUMENT P OTENTIAL E XPOSURE. ............................................................................................................... 5-6B.E MPLOYER’S O CCUPATIONAL S AFETY AND H EALTH S YSTEM. ............................................................. 5-6 VI. AFFIRMATIVE DEFENSES............................................................................. 5-8A.B URDEN OF P ROOF. .............................................................................................................................................. 5-8B.E XPLANATIONS. ..................................................................................................................................................... 5-8 VII. INTERVIEW STATEMENTS. ........................................................................ 5-10A.G ENERALLY. ......................................................................................................................................................... 5-10B.CSHO S SHALL OBTAIN WRITTEN STATEMENTS WHEN: .......................................................................... 5-10C.L ANGUAGE AND W ORDING OF S TATEMENT. ............................................................................................. 5-11D.R EFUSAL TO S IGN S TATEMENT ...................................................................................................................... 5-11E.V IDEO AND A UDIOTAPED S TATEMENTS. ..................................................................................................... 5-11F.A DMINISTRATIVE D EPOSITIONS. .............................................................................................5-11 VIII. PAPERWORK AND WRITTEN PROGRAM REQUIREMENTS. .......... 5-12 IX.GUIDELINES FOR CASE FILE DOCUMENTATION FOR USE WITH VIDEOTAPES AND AUDIOTAPES .............................................................. 5-12 X.CASE FILE ACTIVITY DIARY SHEET. ..................................................... 5-12 XI. CITATIONS. ..................................................................................................... 5-12A.S TATUTE OF L IMITATIONS. .............................................................................................................................. 5-13B.I SSUING C ITATIONS. ........................................................................................................................................... 5-13C.A MENDING/W ITHDRAWING C ITATIONS AND N OTIFICATION OF P ENALTIES. .................................. 5-13D.P ROCEDURES FOR A MENDING OR W ITHDRAWING C ITATIONS ............................................................ 5-14 XII. INSPECTION RECORDS. ............................................................................... 5-15A.G ENERALLY. ......................................................................................................................................................... 5-15B.R ELEASE OF I NSPECTION I NFORMATION ..................................................................................................... 5-15C. C LASSIFIED AND T RADE S ECRET I NFORMATION ...................................................................................... 5-16。

英语抽象类作文模板范文

英语抽象类作文模板范文

英语抽象类作文模板范文Abstract Class Essay Template。

An abstract class is a concept in object-oriented programming that serves as a blueprint for other classes. It cannot be instantiated on its own and is meant to be extended by other classes. In this essay, we will discuss the characteristics of an abstract class, its purpose, and its role in the development of software applications.An abstract class is a class that cannot be instantiated, meaning you cannot create an object of the abstract class itself. Instead, it serves as a base for other classes to inherit from. It can contain both abstract and non-abstract methods. An abstract method is a method that is declared but not implemented in the abstract class. It is meant to be implemented by the subclasses that inherit from the abstract class. On the other hand, a non-abstract method is a method that has an implementation in the abstract class itself.The purpose of an abstract class is to provide a common interface for its subclasses. It allows you to define a set of methods that must be implemented by all the subclasses, ensuring that they have a consistent behavior. This is useful when you have a group of classes that share some common characteristics but also have their own unique behavior. By using an abstract class, you can define the common methods in the abstract class and leave the specific implementation to the subclasses.Another important role of an abstract class is to provide a level of abstraction in the design of a software application. Abstraction is a fundamental concept in object-oriented programming that allows you to focus on the essential features of an object while hiding the unnecessary details. By using an abstract class, you can define the essential methods and properties that are common to a group of related classes, while hiding the implementation details from the outside world. This makes the design of the software application more modular and easier to maintain.In addition, an abstract class can also be used to enforce a specific contract on its subclasses. By defining abstract methods in the abstract class, you can require that all thesubclasses provide an implementation for those methods. This ensures that the subclasses adhere to a certain set of rules and guarantees a consistent behavior across the different subclasses.To create an abstract class in a programming language such as Java or C#, you use the "abstract" keyword in the class definition. For example, in Java, you would declare an abstract class like this:```java。

火星生命探测中一种潜在的生物标志物磷酸盐

火星生命探测中一种潜在的生物标志物磷酸盐

0254-6124/2021/41(1)-129-04 Chin. J. Space Sci.空间科学学报ZHAO Yufen. LIU Yan, HUANG Biling, GAO Xinchang. A potential biomarker phosphate for life exploration on Mars (in Chinese). Chin. J. Space Sci, 2021, 41(1): 129-132. D01:10.11728/cjss2021.01.129火星生命探测中一种潜在的生物标志物磷酸盐赵玉芬1>2’3刘艳2黄碧玲1高新昌31(宁波大学新药技术研究院天体化学与空间生命#学森空间科学协同研究中心宁波315211)门大学化学化工学院ffl门361005)3(清华大学化学系北京100084)f商要地外生命探索是国际上广泛关注的深空探测重要目标之一.中国第一个火星探测器天问-号成功发射,开启了对火星表面形貌、生命迹象等进行科学探索的旅程.作为太阳系中与地球最为相似的星球.火星带给人类无 穷的遐想.火星上是否存在生命,未来人类是否可以移民火星,磷作为重要的生命元素,在生命的整个进化过程具t不可替代的作用.磷酸盐可以作为-种潜在的生命标志物,为火星生命探测提供新的思路和线索.关键词火星,磷酸盐,生命探索中图分类号V476A P oten tial Biom arker P h osp h ate for Life E xplorationon M ars Biom arker for LifeZHAO Yufen1’2,3LIU Yan2HUANG Biling1GAO Xinchang3\[Instit,ute of Drug Discovery Technology, Qian Xuesen Collaborative Research Center of Astrochemistryand Space Life Science, Ningbo University, Ningbo315211)2(College of Chemistry and Chemical Engineering, Xiamen University, Xiamen361005)^(Department of Chemistry, Tsinghua University, Beijing100084)Abstract T h e e x p l o r a t i o n f o r e x t r a t e r r e s t r i a l life is o n e o f t h e m o s t i m p o r t a n t t a r g e t s o f d e e ps p a c e e x p l o r a t i o n.T h e s u c c e s s f u l l a u n c h o f C h i n a’s first M a r s p r o b e“T i a n w e n-1”h a s s t a r t e d t h e s c i e n t i f i c e x p l o r a t i o n a b o u t t h e s u r f a c e m o r p h o l o g y a n d life s i g n s o f M a r s.A s t h e m o s t s i m i l a r p l a n e t t o t h e e a r t h i n t h e s o l a r s y s t e m,M a r s b r i n g s h u m a n b e i n g e n d l e s s r e v e r i e.I s t h e r e life o n M a r s?C a n h u m a n b e i n g s i m m i g r a t e t o M a r s i n t h e f u t u r e?P h o s p h o r u s,o n e o f t h e i m p o r t a n t e l e m e n t s f o rlife, p l a y s a n i r r e p l a c e a b l e r o l e i n t h e w h o l e e v o l u t i o n o f life. P h o s p h a t e c a n b e u s e d a s a p o t e n t i a lb i o m a r k e r t o p r o v i d e n e w i d e a s a n dc l u e s f o r life e x p l o r a t i o n o n M a r s.Key words M a r s,P h o s p h a t e,L i f e e x p l o r a t i o n2020-11-06收到原稿E-mail: *****************.cn;**************.cn;*******************.cnDNARNABaseOHBaseOH OH〇引言2020年7月23日12时41分,在中国文昌航天 发射场,长征五号遥四运载火箭将中国第一个火星探 测器天问一号成功发射.随着天问一号直刺苍穹,中 国开启了对火星表面形貌、物质成分、生命迹象等进 行科学探索的旅程.1火星上是否存在生命2019年度诺贝尔物理学奖授予了吉姆■皮布尔 斯(Jam es P eeb les )、米歇尔.麦耶(M ichel M a y o r)和 迪迪埃.奎洛兹(D idier Q u e lo z )三位科学家,以表彰 他们在宇宙物理学和太阳系外行星领域做出的贡献. 迄今在银河系中已发现了 4000多颗系外行星,这些 系外行星的发现改变了地球在宇宙中的地位.这些 行星中有类似地球的岩石行星,地球在宇宙中是否独 一无二,其他行星中是否也存在生命尚未可知.火星上是否有生命存在对于人类未来在火星建 立基地,进行火星移民有着非常重要的意义.据中国 古籍中记载,火星被古人称为“荧惑”,意为不详之星, 而西方则认为火星是罗马战神,通常被称为红色星 球.火星是离太阳第四近的行星,是太阳系四颗类地 行星之一.科学家们发现在太阳系中火星是与地球 最为相似的星球.首先,火星所处轨道接近太阳系的 宜居地带,尽管现在的火星是一个干燥、寒冷、贫瘠 的星球,却可能在以前或者现在正孕育着生命;其次, 火星的地表环境砾石遍布,北部是平原而南部是布 满陨石坑的高地,其地表环境特征与地球极为相似; 第三,目前发现火星上存在少量水,并在火星盖尔陨 石坑内发现富含矿物盐的沉积物;第四,火星大气层130中存在甲烷,构成甲烷的碳、氢元素是地球生命出现 的基础.因此,火星上具备了与生命存在相关的基本 条件.但是,科学家们尚未发现火星上生命存在的标 记物,无法确认火星上是否有生命存在.2磷是遗传物质不可替代的基本元素生命由核酸、蛋白质等物质组成.遗传信息的传 递遵循遗传学中心法则,即遗传物质贮存于脱氧核糖 核酸(D NA ), D NA进行自我复制.将遗传信息传递给子代D N A ,子代D NA 经转录过程将遗传信息传递给核糖核酸(R N A ), R NA在核糖体中经翻译过程形成生命活动的主要承担者——蛋白质,从而将遗传 信息传递给了蛋白质.磷酸二酯键是构成DN A 和R N A的基本骨架(见图1),磷在核酸中的含量为9%. D N A作为遗传物质,要求其有足够的稳定性,遗传信息才能长期保存并代代传递.而磷在保证D N A稳定性方面起到了关键性作用.1987年W e s t h e i m e r W研究提出:DN A的半衰期为1〇5年;当由硫替代磷酸二酯键中的磷时,其 半衰期为2.7h ;当由硅或砷替代磷时其半衰期则仅 为1〜2 m i n ;而由矾替代磷时极其不稳定,几乎立即 水解.另外,磷酸二酯键及其负电荷性质保护了D N A不被水解,并且使其保留于细胞内而不会穿过磷脂细胞膜.由此可见,遗传物质DN A中的磷是不可替代的.因此,磷元素的存在也应是行星生命探索的必要 条件之一.地球上最古老的蛋白是37亿年前产生的AT P结合蛋白其次是磷转移蛋白.二者在地球上出现氧气之前便已存在.在地球早期海洋中,金属F e , Mn,Chin . J . Space Sci .空间科学学报 2021,41(1)〇|o LV O—=p -—o -io .i-〇l p —〇二〇〇图1D N A 与R N A 结构片段F ig. 1D N A a n d R N A s tru c tu r a l fra g m e ntsC o, Ni含量较高.这些金属可以催化偏三磷酸钠与腺苷反应,将腺苷转化为A T P l '而A T P可以诱导A T P 结合蛋白的产生.生物体的生命活动都必须 有AT P的参与.人体每天可以产生并消耗的AT P量与自身体重相当ATP结合盒转运体(A T P-b i n d i n gc a s s e t t e t r a n s p o r t e r , A B C转运体)是一类A T P结合蛋白,其利用AT P水解释放的能量执行转运细胞内外物质的功能.保证细胞营养物质的充 足与代谢产物的清除.A B C转运体若发生功能障碍,将V 某些疾病的发生密切相关,如阿尔兹海默症、谷固醇血症等【5】.由此可见,磷元素是生命体必不可少的基本元 素.是不可替代的生命元素.在原始生命的形成过程 中具有重要作用.3地球上的磷矿生物沉集中国主要磷矿形成于距今6.5亿至5.5亿年的震 旦纪晚期及寒武纪成矿年代,当时中国长江流域的四 川、陕西、贵州、云南、湖北等省还是一片汪洋大海. 古称扬子古海.气候温和、阳光充足.繁殖有大量的 藻类.扬子古海的磷矿源于海洋中的生物遗骸.经 过1亿年,蓝绿藻在海洋中沉积了超过105亿吨的 胶磷矿(平均每年沉积约100吨),占中国磷资源总量 的75%.因此.磷酸盐可能是生物的遗骸,应该是很 好的生命标志物.4火星上_的探测基丁-磷元素对生命的重要意义.1957年度的诺 贝尔化学奖获得者L o r d (A l e x a n d e r R ) To d d教授于1981年在日本大阪召开的一次国际会议上做了 一个主旨为:“哪里有生命,哪里就有憐”的精彩报 告,并提出••我猜想,如果宇宙的其他地方有生命存 在的话,那么极有可能是发生在具有充足磷元素的星球上”161.因此.磷酸盐是生命探索的一种潜在标志 物.对地外生命的探索.也需探究地外星球上是否有 憐的存在.2〇13 年 A^u r e G e o s c i e n c e发表了 A d c o c k 等丨的研究成果.他们认为.通过勇气号火星探测车的a 粒子X 射线光谱法测到火星表面有磷.火星上的磷赵玉芬等:火星生命探测中一种潜在的生物标志物磷醆盐不同于地球.地球上的磷矿石主要存在形式是氟磷 灰石C a 5(P 04)3F ,而氣离子对生物体是有毒性的.因 此,炼磷矿过程中需将氟离子去除,不含氟离子的磷 肥才可用尹促进农作物的生长.而火星磷矿石的主 要存在形式是氯磷灰石C a 5(P 04)3C I ,氯离子是与生 命体共存的.是生物体可以利用的基本元素.通过对 矿石的溶解速率与溶解度分别进行比较分析,发现氯 磷灰石释放磷的速率远快于氟磷灰石.火星上水-岩 相互作用时.磷酸盐的释放速率是地球上的45倍.早 期火星上潮湿环境中的磷酸盐浓度可能是早期地球 上的2倍这些都表明火星上的磷酸盐可利用性 高于地球.5火星上的磷是否来自生物氧存在三种稳定同位素:160. 170, 180.三者在 地球圈的含量分别为99.759%, 0.037%和0.204%.磷 酸根P〇i 广中的氧原子16〇对非生物过程的同位素交换有很强的抵抗力,即在没有生物或酶参与下.p〇r与其他物质发生氧同位素交换很慢.实验证据表明,羟基磷灰石来自骨骼和牙齿的磷酸根,其180 含量高,说明同位素可以快速交换.而非生物的磷矿 石和花岗石18〇含量低[8,91.生物几乎参与了磷循环的每个过程.酶是细胞活 性的指示物.酶催化的磷酸盐与水分子之间的氧同位 素交换表明生命的存在.L i a n g 等11U 1和B l a k e等I 11)提出,P 18〇疒的<518〇p 值可能提供了存在地外生命的重要生物特征.如果将火星上的磷矿石带回地球, 那么磷酸根P 18〇〗_的<518O p 值可以作为火星生命 探索的标志物.<518〇p 的定义I 11]为Q x 1_.(1)\ "VSMOWf18〇式中,"R sample 为样品中的比值,尺VSMOW 为维也纳标准平均海水(V i e n n a S t a n d a r d Me a nO c e a n18〇W a t e r, VS M O W)中元石的比值.因此,若能知道宇宙样品中磷酸盐中氧同位素f 8〇P 原始值,将样品的测量值W 该原始值进行 比较,即可获知该样品中的磷是否曾被生物利用,便 可探测生命是否存在.1316火星上的磷可否被生物利用火星上的磷水溶性很好,但是火星上的盐为高氯酸盐,地球上的生物不能直接利用,必须将高氯酸盐 还原分解为氯离子才能实现生物利用.例如,可以利 用耐辐射的特殊微生物将其还原分解为氯离子,并进 一步利用多种功能微生物将火星上的磷、氮及钾解 离出来.氮及钾对地球上的植物仍是必须的.可以设 想将多种极端生物,如地衣、水熊虫、嗜冷菌、嗜压 菌等有机结合成一个小型生态圈,实现对火星土壤及 磷资源的有效利用.虽然上面的描述仅仅是设想,但 是理论上是可行的,值得潜心尝试研究,以期为今后 的“火星移民”提供重要的理论支撑及实验验证.7展望由于火星与地球相似并具备一些适宜的条件,其可能是一个潜在的可居住环境.人类若考虑对外星 球进行移民,火星将是人类的首选星球.但是,火星 对人类来说充满了未知,火星过去是否有生命存在. 磷是否来自火星生物遗骸,地球上的生命能否利用火 星上的磷及其他原位资源来生存,这些重要课题亟待 人类去研究探索,并激发人类为之不懈努力.天问一 号的成功发射,必将为中国的火星探测乃至深空探测 的研究带来前所未有的惊喜和收获.参考文献[1] WESTHEIMER F H. Why nature chose phosphates [J].Science, 1987, 235:1173-1178132[2] KIM K M, QIN T, JIANG Y Y, et al. Protein domainstructure uncovers the origin of aerobic metabolism and the rise of planetary oxygen [J ].2012,20:67-76[3] CHENG C, FAN C, WAN R, et al. Phosphorylation of adenosine with trimetaphosphate under simulated pre- biotic conditions [J]. Orig. Life Evol. Biosph., 2002, 32:219-224[4] TORNROTH-HORSEFIELD S, NEUTZE R. Opening and closing the metabolite gate [J]. Proc. Natl. Acad. Sci., 2008, 105:19565-19566[5] TARLING E J, DE AGUIAR VALLIM T Q, EDWA­RDS P A. Role of ABC transporters in lipid transport and human disease [J]. Trends Endocrinol. Metab.^ 2013, 24:342-350[6] TODD L. Where There's Life, There's Phosphorus [M ]. Tokyo: Japan Sciencs Society Press, 1981:275-279[7] ADCOCK C T, HAUSRATH E M, FORSTER P M. Readily available phosphate from minerals in early aque­ous environments on Mars[J]. Nat. Geosci., 2013. 6:824- 827[8] SCHWARTZ A W. Phosphorus in prebiotic chemistry [J].Philos. Trans. R. Soc. Lond. B. Biol. Sci., 2006, 361: 1743-1749[9] LECUYER C, GRANDJEAN P, SHEPPARD S M F. Oxygen isotope exchange between dissolved phosphate and water at temperatures ( 135°C: inorganic versus biological fractionations [J]. Geochim. Cosmochim. Ac., 1999, 63:855-862[10] LIANG Y, BLAKE R E. Oxygen isotope fractionation be­tween apatite and aqueous-phase phosphate: 20~45°C [J]. Chem. Geol, 2007, 238: 121-133[11] BLAKE R E, ALT J C, MARTINI A M. Oxygen isotoperatios of PO 4: an inorganic indicator of enzymatic activi­ty and P metabolism and a new biomarker in the search for life[J]. Proc. Natl. Acad. Sci., 2001. 98:2148-2153Chin . J . Space Sci .空间科学学报 2021, 41(1)。

Antoine Mine

Antoine Mine

The ASTR´EE AnalyzerPatrick Cousot2,Radhia Cousot1,3,Jerˆo me Feret2,Laurent Mauborgne2, Antoine Min´e2,David Monniaux1,2&Xavier Rival21CNRS2´Ecole Normale Sup´e rieure,Paris,France(stname@ens.fr)3´Ecole Polytechnique,Palaiseau,France(stname@polytechnique.fr)http://www.astree.ens.fr/Abstract.ASTR´EE is an abstract interpretation-based static programanalyzer aiming at proving automatically the absence of run time errorsin programs written in the C programming language.It has been appliedwith success to large embedded control-command safety critical real-time software generated automatically from synchronous specifications,producing a correctness proof for complex software without any falsealarm in a few hours of computation.1IntroductionSoftware development,testing,use,and evolution is nowadays a major concern in many machine-driven human activities.Despite progress in the science of computing and the engineering of software aiming at developing larger and more complex systems,incorrect software is not so uncommon and sometimes quite problematic.Hence,the design of sound and efficient formal program verifiers, which has been a long-standing problem,is a grand challenge for the forthcoming decades.All automatic proof methods involve some form of approximation of program execution,as formalized by abstract interpretation.They are sound but incom-plete whence subject to false alarms,that is desired properties that cannot be proved to hold,hence must be signaled as potential problems,even though they do hold at runtime.Although ASTR´EE addresses only part of the challenge,that of proving the absence of runtime errors in large embedded control-command safety critical real-time software generated automatically from synchronous specifications[1–3],it is a promisingfirst step,in that it was able to make the correctness proof for large and complex software by abstract-interpretation based static analysis [4,5]in a few hours of computations,without any false alarm.This work was supported in part by the French exploratory project ASTR´EE of the R´e seau National de recherche et d’innovation en Technologies Logicielles(RNTL).2P.Cousot,R.Cousot,J.Feret,L.Mauborgne,A.Min´e,D.Monniaux,X.Rival 2Domain of Application of ASTR´EESynchronous C Programs.ASTR´EE can analyze C programs with pointers (including to functions),structures and arrays,integer andfloating point com-putations,tests,loops,function calls,and branching(limited to forward goto, switch,break,continue).It excludes union types,dynamic memory alloca-tion,unbounded recursive function calls,backward branching,conflicting side effects and the use of C libraries.This corresponds to a clean memory model and semantics as recommended for safety critical embedded real-time synchro-nous software for non-linear control of very complex control/command systems. Semantics.The concrete operational semantics for the considered subset is that of the international C norm(ISO/IEC9899:1999)instanced by imple-mentation-specific behaviors depending upon the machine and compiler(e.g., representation and size of integers,IEEE754-1985norm forfloats and dou-bles),restricted by user-defined programming guidelines(e.g.,whether static variables can or cannot be assumed to be initialized to0)andfinally restricted by program-specific user requirements(such as static assertions).Programs may have a volatile environment where inputs are assumed to be safe(e.g.,volatile floats cannot be NaN)and may be specified by a trusted configurationfile(e.g., specifying physical restrictions on captor values or the maximum number of clock ticks,i.e.,of calls to a wait for clock()function specific to synchronous systems).The collecting semantics is the set of partial traces for the concrete operational semantics starting from initial states.The abstract semantics is an abstraction of a trace-based refinement of the reachable states.Specification.The absence of runtime errors is the implicit specification that there is no violation of the C norm(e.g.,array index out of bounds),no imple-mentation-specific undefined behaviors(e.g.,floating-point division by zero),no violation of the programming guidelines(e.g.,arithmetics operators on short variables should not overflow the range[−32768,32767]although,on the specific platform,the result can be well-defined through modular arithmetics),and no violation of the programmer-supplied assertions(which must all be statically verified).It follows that the only possible interrupts are clock ticks,an essential requirement of synchronous programs.3Characteristics of ASTR´EEASTR´EE is a program analyzer(it analyzes directly the program source and not some external specification or program model)which is static(the verifica-tion is performed before execution),entirely automatic(no end-user intervention is needed after parameterization by specialists for adaptation to a category of programs),semantic-based(unlike syntactic feature detectors in the spirit of lint),sound(it covers the whole state space and,contrarily to mere debuggers or bounded-trace software verifiers,never omits a potential error),terminating (there is no possibility of non-termination of the analysis),and,in practice,hasASTR´EE3 shown to be efficient(a few hours of computations for hundreds of thousandslines of code).ASTR´EE is multi-abstraction in that it does not use a canonical abstraction but instead uses an approximate reduced cardinal product[5]of many numer-ical and symbolic abstract domains.The analyses performed by each abstract domain closely interact to perform mutual reductions.The abstraction is spe-cializable in that new abstract domains can be easily included or useless onesexcluded to adapt the analysis to a given category of programs.The design of ASTR´EE in Ocaml is modular.An instance of ASTR´EE is built by selecting Ocaml modules from a collection,each implementing an abstract domain.Most abstract domains are infinitary and infinite-height.We use widening/narrowing to enforce convergence.ASTR´EE is specialized to a safe programming style butis also domain-aware in that it knows about control/command(e.g.,digitalfil-ters).Each abstract domain is parametric so that the precision/cost ratio canbe tailored to user needs by options and/or directives in the code.The auto-matic parameterization enables the generation of parametric directives in the code to be programmed.ASTR´EE can therefore be specialized to perform fullyautomatically for each specific application domain.This design structure makesASTR´EE both fast and very precise:there are very few or no false alarms when conveniently adapted to an application domain.It follows that ASTR´EE is aformal verifier that scales up.4Design of ASTR´EE by RefinementASTR´EE was designed starting from a simple memory model(with references to abstract variables representing either a single or multiple concrete memorylocations)and an interval abstraction(a≤X≤b where X is a variable and a,b are constants to be determined by the analysis),which is precise enough to express the absence of runtime errors.The widening uses thresholds[1].Thisis extremely fast(if sufficient care has been taken to use good data structures) but quite imprecise.Then,numerous abstract domains were designed and ex-perimented until an acceptable cost/precision ratio was obtained.Sometimes,a more precise domain results in an improvement in both analysis precision and time(most often because the number of iterations is reduced).5The ASTR´EE Fixpoint IteratorThefixpoint computation of the invariant post-fixpoint[4]is by structural in-duction on the program abstract syntax,keeping a minimal number of abstract invariants.Functions are handled by semantic expansion of the body(thus ex-cluding unbounded recursion)while convergence is accelerated by non-monotonic widening/narrowing for loops[4,2].It follows that the abstractfixpoint trans-former is non-monotonic,which is not an issue as it abstracts monotonic con-cretefixpoints[6].Because abstract domains are themselves implemented using floats,possible rounding errors may produce instabilities in the post-fixpoint4P.Cousot,R.Cousot,J.Feret,L.Mauborgne,A.Min´e ,D.Monniaux,X.Rival check which can be solved thanks to perturbations [2,7,8].Finally,the speci-fication checking is performed by a forward propagation of the stable abstract post-fixpoint invariant.6Examples of Numerical Abstractions in ASTR ´EEThe Domain of Octagons.An example of numerical abstract domain is the weakly relational domain of octagons [9,10,7](±X ±Y ≤a where X ,Y are variables and a is a constant to be determined by the analysis).volatile int vD,vX;void main (){int D,X,Y =0,R,S;while (1){X =vX;D =vD;S =Y;R =X -S;Y =X;if (R <=-D){Y =S -D;}else if (D <=R){Y =S +D;}}}__ASTREE_volatile_input((vD [0,16]));__ASTREE_volatile_input((vX [-128,128]));Fig.1.Rate limiter and configuration file.For instance [7],at each loop iteration of the rate limiter of Fig.1,a new value for the entry X is fetched within [−128,128]and a new maximum rate D is chosen in [0,16].The program then computes an output Y that tries to follow X but is compelled to change slowly:the difference between Y and its value in the preceding iteration is bounded,in absolute value,by the current value of D .The state variable S is used to remember the value of Y at the last iteration while R is a temporary variable used to avoid computing the difference X −S twice.A relational domain is necessary to prove that the output Y is bounded by the range[−128,128]of X ,which requires the discovery of the invariant R =X −S .The octagon abstract domain will discover a weaker property,R +S ∈[−128,128],which is precise enough to prove that Y ∈[−M,M ]is stable whenever M ≥144.So,by widening,M will be set to the least threshold greater than 144which is loose but precise enough to prove the absence of runtime errors (indeed ASTR ´EE finds Y ∈[−261,261]).This example is out of the scope of the interval domain.Heterogeneous Structural Abstraction.The use of the domain of octagons in ASTR ´EEis an example of heterogeneous abstraction which depends upon the program structure and is not the same at each program point.Indeed,the octagonal abstraction would be too costly to handle,e.g.,thousands of global variables at each program point.The domain of octagons is therefore parame-terized by packs of variables attached to blocks/functions by way of directives.These packs specify which variables should be candidate for octagonal analysis in the given block/function.The determination of accurate packs would requireASTR ´EE 5a huge amount of work,if done by hand.Therefore the packing parameterization is automatized using context-sensitive syntactic criteria.Experimentations show that the average pack size is usually of order of 3or 4variables while the number of packs grows linearly with the program size.It follows that precise abstractions are performed only when needed,which is necessary to scale up.Floating-Point Interval Linear Form Abstraction.A general problem with relational numerical domains is that of floating point numbers.Considering them as reals (as usually done with theorem provers)or fixed point numbers (as in CBMC [11])would not conform to the norm whence would be ing rationals or other symbolic reals in the abstract domains would be too costly.The general approach [7,8]has been to define the concrete semantics of floating point computations in the reals (taking the worst possible rounding errors explicitly into account),to abstract with real numbers but to implement,thanks to a further sound over-approximation,using floats.For example the float expression (x +y )+z is evaluated as in the reals as x +y +z +ε1+ε2where |ε1|≤ rel .|x +y |+ abs and |ε2|≤ rel .|x +y +ε1+z |+ abs .The real ε1encodes rounding errors in the atomic computation (x +y ),and the real ε2encodes rounding errors in the atomic computation (x +y +ε1)+z .The parameters rel and abs depends on the floating-point type being used in the analyzed program.This linearization [7,8]of arbitrary expressions is a correct abstraction of the floating point semantics into interval linear forms [a 0,b 0]+ n k =1[a k ,b k ]X k .This approach separates the treatment of rounding errors from that of the numerical abstract domains.Fig.2.Filter trace Ellipsoid abstraction Octagon abstraction Interval abstraction The Simplified Filter Abstract Domains.The simplified filter abstract domains [13]provide examples of domain-aware abstractions.A typical example of simplified filter behavior is traced in Fig.2(tracing the sequence D1in Fig.3).Interval and octagonal envelops are unstable because they are rotated and shrunk a little at each iteration so that some corner always sticks out of the envelop.However,the ellipsoid of Fig.2is stable.First,filter domains use dynamical linear properties that are captured by the other domains such as the range of input variables (x1and y1for the example of Fig.3)and symbolic affine equalities with interval coefficients (to model rounding errors)such as t1∈[1−ε1,1+ε1].x1+[b 1[0]−ε2,b 1[0]+ε2].D1[0]−[b 1[1]−ε3,b 1[1]+ε3].D1[1]+[−ε,ε]for the example of Fig.3(where ε1,ε2,and ε3describe relative error contributions and εdescribes an absolute error contribution).These symbolic equalities are captured either by linearization (see Sect.6),or by symbolic constant propagation (see6P.Cousot,R.Cousot,J.Feret,L.Mauborgne,A.Min´e,D.Monniaux,X.Rival float A1[3]={1,0.5179422053046, 1.0};float b1[2]={1.470767736573,0.5522073405779};float A2[3]={1,1.633101801841, 1.0};float b2[2]={1.742319554830,0.820939679242};float D1[2],D2[2];float P,X;volatile float E;void iir4(float*x,float*y){float x1,y1,t1,t2;x1=0.0117749388721091**x;t1=x1+b1[0]*D1[0]-b1[1]*D1[1];y1=A1[0]*t1-A1[1]*D1[0]+A1[2]*D1[1];D1[1]=D1[0];D1[0]=t1;t2=y1+b2[0]*D2[0]-b2[1]*D2[1];*y=A2[0]*t2-A2[1]*D2[0]+A2[2]*D2[1];D2[1]=D2[0];D2[0]=t2; __ASTREE_log_vars((P,y1,x1,t2;ellipse))}int main(){while(1){X=E;iir4(&X,&P);__ASTREE_log_vars((P));}} Fig.3.Fourth order Infinite Impulse Response(IIR)filter[12].Sect.7).Then,simplifiedfilter domains infer non linear properties and compute bounds on the range of output variables(t1and t2in Fig.2).For the example of Fig.3,ASTR´EE over-approximates the interval of variation of D2[0]by [−6890.23,6890.23],which is precise enough to prove the absence of overflow. On the Limits of User-Provided Assertions.Thefilter ellipsoidal abstrac-tion illustrates the limits of user provided assertions.Even if the user injects the correct bounds,as an interval information,for allfilter outputs,the interval domain cannot exploit them as they are not stable.To reach zero false alarm, the abstract domains should be able to express a loop invariant which is strong enough to be inductive and to imply the absence of runtime er asser-tions are therefore useful only when they refer to assertions expressible in the abstract domains of a static analyzer.They are mainly useful to provide widen-ing/narrowing limits but techniques such as widenings with thresholds are even more convenient.On the Limits of Automatic Refinement.Thefilter ellipsoidal abstraction shows the limits of automatic refinement strategies based on counter-examples. From afinite series of counter-examples to the stability of intervals or octagons, the refinement procedure would have to automatically discover the ellipsoidal abstraction and infer the corresponding sophisticated data representations and algorithms.The Arithmetic-Geometric Progression Abstract Domain.In synchro-nous programs,the arithmetic-geometric progression abstract domain[14]can be used to estimate ranges offloating point computations that may diverge in the long run due to rounding errors(although they may be stable in the reals) thanks to a relation with the clock,which,for physical systems that cannot run for ever,must be bounded.In the example of Fig.4,the bound of B is: |B|≤a∗((20.+b/(a−1))∗(a)clock−b/(a−1))+b≤30.7191369175 where a=1.00000011921and b=5.87747175411e−39.ASTR´EE7volatile float E,T;float A,B,X;int main(){while(1){if(T>0){X=E;}else{X=B;}B=B-(((2.0*B)-A-X)*0.005); A=X;__ASTREE_wait_for_clock(()); }}__ASTREE_volatile_input((T[-1.0,1.0])); __ASTREE_volatile_input((E[-20.0,20.0])); __ASTREE_max_clock((3600000));Fig.4.Geometric progression and configurationfile.Relative Precision of Abstract Domains.The arithmetic-geometric pro-gression abstract domain provides an example of sophisticated domain that can advantageously replace a simpler domain,specifically the clock domain[1],for-merly used in ASTR´EE,relating each variable X to the bounded clock C(in-cremented on clock ticks)as intervals for X−C and X+C to indirectly bound X from the user-provided bound on the clock C.7Examples of Symbolic Abstractions in ASTR´EE Memory Abstraction.Afirst example of symbolic domain in ASTR´EE is the memory abstraction model shortly described in[2].The Symbolic Constant Domain.The symbolic constant domain[7,8]is reminiscent of Kildall’s constant propagation abstract domain,that is the smash product of infinitely many domains of the form⊥<e< ,but memorizes sym-bolic expressions e instead of numerical constants.It keeps track of symbolic relations between variables and performs simplifications(such as simplifying Z=X;Y=X-Z into Z=X;Y=0,which does appear in mechanically generated pro-grams).Such relational information is essential for the interval abstract domain (e.g.,to derive that Y=0).Again the abstract domain is parameterized(e.g., by simplification strategies).The Boolean Relation Domain.The Boolean relation domain[2]copes with the use of booleans in the control of synchronous programs.It is a reduced cardinal power[5]with boolean base implemented as a decision tree with sharing (`a la BDD)and exponents at the leaves.It is parametric in the maximum number of boolean variables and in the packs of variables which are involved at the leaves.The maximum number3was determined experimentally and the packing is automatized.The Expanded Filter Abstract Domains.The expandedfilter abstract do-mains associate recursive sequence definitions to tuples of numerical variables automatically detected by the analysis[13].For instance,a second orderfil-ter is encoded by a recursive definition of the form S n+2=a.S n+1+b.S n+8P.Cousot,R.Cousot,J.Feret,L.Mauborgne,A.Min´e,D.Monniaux,X.Rival c.E n+2+d.E n+1+e.E n((E n)denotes an input stream and(S n)denotes an output stream).The second orderfilter domain relates abstract values M to the quadruples of variables(V,W,X,Y)detected by the analysis.This symbolic property means that there exists a positive integer p and a recursive sequence satisfying S n+2=a.S n+1+b.S n+c.E n+2+d.E n+1+e.E n,for any positive integer n,such that:–V=S p+1,W=S p,X=E p+1,and Y=E p;–the abstract value M gives an abstraction of the values S0and S1and of the sequence(E n).We compute a bound on the value of V,by unfolding the recursive definition several times(so that we describe the contribution of the last inputs very accu-rately).The contributions of rounding errors and of previous inputs are bounded by using a simplifiedfilter domain(the ellipsoid domain[13]in our example). Trace Partitioning.Trace partitioning[15]is a local parametric symbolic abstraction of sets of traces,which is a local refinement of reachable states.By relative completeness of Floyd’s proof method,it is useless to reason on traces and sets of states should be precise enough.However,this greatly simplifies the abstraction which would otherwise require to establish more relations among variables.Examples are loop unrolling,case analysis for tests,etc.8Performances of ASTR´EE.ASTR´EE has been applied with success to large embedded control-command safety critical real-time software generated automatically from synchronous spec-ifications,producing a correctness proof for complex software without any false alarm in a few hours of computations(see Fig.5).Nb of lines70000226000400000Number of iterations325188Memory599Mb 1.3Gb 2.2GbTime46mn3h57mn11h48mnFalse alarms000Fig.5.Performance of ASTR´EE(64bits monoprocessor).9ASTR´EE VisualisatorAccording to the desired information,it is possible to serialize the invariants and alarms attached by ASTR´EE to program points,blocks,loops or functions and to vizualize them,per abstract domain,using a graphical vizualisator to navigate in the program invariants as shown on Fig.6.ASTR´EE9Fig.6.Vizualisator.10Conclusion and Future WorkAbstract interpretation-based static analyzers have recently shown to scale-up for different programming languages and different areas of application[16,17]. ASTR´EE is certainly thefirst static analyzer able to fully prove automatically the absence of runtime errors in real-life large industrial synchronous programs. It is therefore a verifier(as opposed to a debugger or testing aid).In case of erroneous source programs,an assistance to error source localization is presently being incorporated in ASTR´EE thanks to backward analyses.By extension of the abstract domains,ASTR´EE can be extended beyond synchronous programs.To go beyond and generalize to more complex memory models and asyn-chronous programs will necessitate a complete redesign of the basic memory abstraction andfixpoint iterators.This will be the object of ASTR´EE successors. Acknowledgements We warmly thank Bruno Blanchet for his contribution to ASTR´EE.Bibliography1.Blanchet,B.,Cousot,P.,Cousot,R.,Feret,J.,Mauborgne,L.,Min´e,A.,Monniaux,D.,Rival,X.:Design and implementation of a special-purpose static program ana-lyzer for safety-critical real-time embedded software,invited chapter.In Mogensen,10P.Cousot,R.Cousot,J.Feret,L.Mauborgne,A.Min´e,D.Monniaux,X.Rival T.,Schmidt,D.,Sudborough,I.,eds.:The Essence of Computation:Complexity, Analysis,Transformation.Essays Dedicated to Neil D.Jones.LNCS2566.Springer (2002)85–1082.Blanchet,B.,Cousot,P.,Cousot,R.,Feret,J.,Mauborgne,L.,Min´e,A.,Monniaux,D.,Rival,X.:A static analyzer for large safety-critical software.In:Proc.ACMSIGPLAN’2003Conf.PLDI,San Diego,ACM Press(2003)196–2073.Mauborgne,L.:ASTR´EE:Verification of absence of run-time error.In Jacquart,P.,ed.:Building the Information Society.Kluwer Academic Publishers(2004) 385–3924.Cousot,P.,Cousot,R.:Abstract interpretation:a unified lattice model for staticanalysis of programs by construction or approximation offixpoints.In:4th ACM POPL.(1977)238–2525.Cousot,P.,Cousot,R.:Systematic design of program analysis frameworks.In:6thACM POPL.(1979)269–2826.Cousot,P.,Cousot,R.:Abstract interpretation frameworks.J.of Logic and Com-put.2(1992)511–5477.Min´e,A.:Weakly Relational Numerical Abstract Domains.Th`e se de doctorat eninformatique,´Ecole polytechnique,Palaiseau,France(2004)8.Min´e,A.:Relational abstract domains for the detection offloating-point run-time errors.In Schmidt,D.,ed.:Proc.30th ESOP’2004,Barcelona.LNCS2986, Springer(2004)3–179.Min´e,A.:A new numerical abstract domain based on difference-bound matrices.In Danvy,O.,Filinski,A.,eds.:Proc.2nd Symp.PADO’2001.˚A rhus,21–23May 2001,LNCS2053,Springer(2001)155–17210.Min´e,A.:The octagon abstract domain.In:AST2001in WCRE2001.IEEE,IEEE CS Press(2001)310–31911.Clarke,E.,Kroening,D.,Lerda,F.:A tool for checking ANSI-C programs.InJensen,K.,Podelski,A.,eds.:Proc.10th Int.Conf.TACAS’2004,Barcelona.LNCS 2988,Springer(2004)168–17612.Aamodt,T.,Chow,P.:Numerical error minimizingfloating-point tofixed-pointANSI C compilation.In:1st Workshop on Media Processors and DSPs.(1999) 3–1213.Feret,J.:Static analysis of digitalfilters.In Schmidt, D.,ed.:Proc.30thESOP’2004,Barcelona.LNCS2986,Springer(2004)33–4814.Feret,J.:The arithmetic-geometric progression abstract domain.In Cousot,R.,ed.:Proc.6th VMCAI’2005,Paris.LNCS3385,Springer(2004)2–5815.Mauborgne,L.,Rival,X.:Trace partitioning in abstract interpretation based staticanalyzers.In Sagiv,M.,ed.:Proc.31th ESOP’2005,Edinbugh.This volume of LNCS.,Springer(2005)16.Alt,M.,C.,F.,Martin,F.,Wilhelm,R.:Cache behavior prediction by abstractinterpretation.In Cousot,R.,Schmidt,D.,eds.:Proc.3rd Int.Symp.SAS’96.Aachen,24–26sept.1996,LNCS1145.Springer(1996)52–6617.Venet,A.,Brat,G.:Precise and efficient static array bound checking for largeembedded C programs.In:Proc.ACM SIGPLAN’2004Conf.PLDI,Washington DC,ACM Press(2004)231–242In Proceedings of Programming Languages and Systems, 14th European Symposium on Programming, ESOP 2005, Shmuel Sagiv (Ed.), Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2005, April 4—8, 2005, Edinburgh, UK. Lecture Notes in Computer Science 3444, pp. 21—30, © Springer, ISBN 3-540- 25435-8.。

毕业设计(论文)Android手机电子书阅读器的设计与实现

毕业设计(论文)Android手机电子书阅读器的设计与实现

毕业设计(论文)Android手机电子书阅读器的设计与实现毕业设计(论文)Android手机电子书阅读器的设计与实现UNIVERSITY OF TECHNOLOGY毕业设计题目 Android手机电子书阅读器的设计与实现学生姓名学号 00101106专业班级通信工程指导教师学院通信学院答辩日期 2012年10月11日Android手机电子书阅读器的设计与实现The design and Implementation of the Android mobile phone e-book readerXxx摘要在这个信息化的时代计算机越来越精致手机也越来越智能化所以一个较好的应用软件在很大程度上能提升一个手机的品牌而在智能手机上安装一个拥有丰富功能支持的电子书阅读器更是我们刻不容缓的事情本设计采用Android平台根据对手机电子书阅读器的客户需求分析和技术可行性分析经过总体设计和详细设计编码测试等阶段完成了电子书阅读器软件的设计不仅实现了电子书阅读器最基本的阅读功能而且还为用户提供了丰富的功能支持包括找书书签自动翻页以及阅读界面设置的操作而本次设计最大的特点则是通过屏幕触控实现了移动时的翻页特效经过不断的测试与完善电子书阅读器功能稳定并且在真机上对其进行了测试与验证基本上达到了用户的需求标准关键词 Android电子书阅读器屏幕触控翻页AbstractIn the time of information technology with the increasingly sophisticated of computers and more and more intelligent of mobile phones a better application software can enhance a brand of the phone to large extent It is our urgent for us that installed on the smart-phone has a rich functionality to support the e-book readerBased on the needs analysis of customers and technical feasibility analysis I use the Android platform to achieve the design of mobile phones e-book reader After completing the overall design and detailed design coding testing stage I achieved the design of the e-book reader softwareNot only can the soft achieve the basic function of E-book readerbut also offer many other functions for users including books and bookmarks flipping pages automatically and designing the reader The significant character of the design achieve the flipping page of mobile by touching screen Through continuous testing and improvement E-book reader is stable The testing and verification in real device has carried out to meet the customers requirements which have reached the standards of the customers requirementsKey words Android e-book Reader Touch Screen Flip目录第1章前言 111 课题提出的背景目的及意义 1com 课题提出的背景 1com 课题提出的目的 1com 课题提出的意义 112 设计思路及研究方法 2com 设计思路 2com 研究方法 2第2章需求分析 321 软件的基本功能要求 322系统架构 423 开发环境 4第3章软件设计 6 31 总体软件结构设计 6 32 接口设计 7com 外部接口 7com 内部接口 833 数据库设计 8com 数据模式设计 8 com 数据表格设计 8 com 表的具体设计 9 com 数据字典 1034 软件设计模型 10 35 代码设计 1236 软件维护设计 12 第4 章系统功能模块的设计与实现 1341 关键技术 13com android平台及java语言 13com 中介软件 13com 四大组件 14com sqlite3 数据库 14 com Tomcat服务器 14 42 欢迎界面的实现 15 43 主控制类的实现 1544工具类的设计 1645 阅读界面的实现 1646 找书功能的实现 1847 书签功能的实现 1948 设置字体大小功能的实现 20 49 更换背景图片以及设置字体颜色功能的实现 21410 音乐播放功能的实现 21 第5章系统测试 2251 欢迎界面 2252 用户阅读界面 23毕业设计总结 32参考文献 33附录一核心代码 34附录二毕业设计外文翻译英文 36 附录三毕业设计外文翻译中文 44 致谢51第1章前言11 课题提出的背景目的及意义com 课题提出的背景在这个信息化的时代 IT业已经成为世界发展的主流我们对信息技术的依赖远远超过了对我们自己的依赖计算机和手机已经成为我们日常生活中不可缺少的获得信息的渠道正因为如此各种各样的软件层出不穷我们的生活也因为各种各样的软件变的更有滋有味不缺乏娱乐性也不缺乏教育意义让我们从这些软件中受益匪浅使我们看到了相比以前的巨大进步同时随着科技的发展计算机越来越精致手机也越来越智能化所以我们的依赖性也越来越大越来越离不开这些给我们提供日常信息的工具手机也已不再仅仅是简单的人与人通话的工具而是在很大程度上成为了我们获取信息的一个更好的渠道一个好的软件能够标志一个手机品牌的地位所以开发一款好的手机软件是相当必要的以前我们看看杂志小说都要去图书馆借阅而且时间有限很不方便而现在是在电脑上或者手机上看杂志看小说文档以此看来一个好的手机阅读器软件的开发是相当有必要的com 课题提出的目的此次设计的目的很明显就是给予阅读者更大的便利性阅读者不用再到处拿着一本厚厚的书籍大大减少了读者的负担只需要下载一本txt格式的电子书放在sd卡里边就是人们的生活百科当然有些下载不来的资料还是需要翻阅书籍的com 课题提出的意义计算机改变了人类的工作方式互联网创造着全新的生活空间我们接受信息的方式也正在发生深刻的质变由于现在阅读器的越来越普及我们每天清晨读报的习惯也在面对大资讯量的新闻网站时渐渐淡化面对印刷出版物我们仍视之为文化传承的载体但不可抵挡的是无纸化电子阅读时代的悄然临近我们现在信息化的生活充斥着信息的传递但是越来越多的人依赖于几乎朝夕相伴的手机虽然现在也出现了供人们阅读使用的电子书但是这些电子书的功能很少很简单仅仅是简简单单的供人们一行一行的阅览文字信息或者是仅仅添加一个添加书签的小功能根本远远不能满足人们的需求于是一个功能良好的全面的电子书阅读器越来越成为广大用户的追求本软件是基于android系统智能手机开发的一款电子书阅读器软件它有一个阅读主界面主要用来阅读文档其优越性表现在实现了从SD卡读取文档或从服务器端下载文档自动翻页添加书签选择书签清空书签设置背景音乐设置背景图片设置字体颜色设置字体大小等功能此外给用户更清晰方便的界面也是本软件的出发点之一12 设计思路及研究方法com 设计思路阅读器的设计流程主要是按照软件设计的一般流程需求分析概要设计详细设计测试与维护的基本流程来设计开发的首先从整体分析软件功能将功能模块化然后对每个模块进行调试最后对各个模块进行系统集成通过几个月的观察发现几乎所有的人都有手机而且几乎有一半以上的人用手机来阅读资料可是这些阅读软件不尽人意而且一个好的阅读软件也还没有安装在智能手机上本系统针对这一点进行了较仔细的分析在老版的阅读软件基础之上进行改进最后对系统进行了实现和维护com 研究方法本系统在整体框架研究方法采用的是问卷调查法和观察研究法而在总体设计上采用的是结构化方法在局部底层开发上为便于交流采用快速原型法问卷调查法也称问卷法它是调查者运用统一设计的问卷向被选取的调查对象了解情况或征询意见的调查方法观察研究法指根据既定的研究目的对现象或行为做有计划与有系统的观察并依观察的记录对现象或行为做客观性的描述和解释结构化系统的设计方法是在结构化程序设计思想基础上发展起来的它的基本涵义是一个系统由层次化的程序模块构成每一个模块只有一个入口和一个出口每一个模块只归其上一级模块调用并有模块连接的准则和构造模块的标准而且用系统结构图来表达系统的结构尽可能用最优的方式将系统内各部分组织起来第2章需求分析21 软件的基本功能要求经过以上问卷调查和观察研究方法在现行业务流程和数据分析的基础上基本上确定了系统的功能设计也基本上达到了目标根据软件设计的步骤需求分析是软件设计成功的基础也是必不可少的步骤同时也对软件的设计提出了具体的要求在做足了充分的调查研究之后基本可以确定软件的功能界面如下1刚打开软件时的欢迎动画界面2在没有阅读记录情况下打开软件时进入的软件说明界面3在主界面下单击菜单按钮后弹出的欢迎主菜单界面4找书选择界面用来选择找书的途径5网络下载列表界面用来列出服务器端可供下载的文档6下载完成提示界面用户从服务器端完成指定文档下载任务时显示的界面7已存在要下载文件提示界面当用户指定要下载的文档在SD卡中已存在时显示的界面8SD卡文件列表界面列出SD卡中存在的所有资料9阅读界面用来阅读文档的主界面是整个阅读器设计核心部分10书签功能界面用来选择与书签相关的具体操作11添加书签功能界面将当前阅读到的位置以书签名和书页号的形式存至书签表方便下次阅读12选择书签功能界面通过选择书签记录跳转至想要阅读的位置13删除书签功能界面再不想要该条书签记录的情况下实现删除操作14自动翻页功能界面实现不同时间间隔自动翻页的效果15设置界面用来选择对阅读界面不同的设置16背景音乐界面可在阅读的同时欣赏音乐更大限度的提升17背景图片界面用来设置不同的阅读界面风格使阅读更为个性化18字体颜色界面用来设置不同的阅读字体颜色提升用户的视觉体验19字体大小界面通过设置字体大小来满足实际应用中的多重需求基本说明如下本系统是一个电子书阅读器主要包含一个主界面用来实现阅读的功能在阅读界面时点击menu手机底部会出现四个选项找书书签自动翻页设置点击找书选项会有两种操作可供选择分别是在SD卡中找书和通过网络下载点击书签选项会有三种操作可供选择分别为添加书签选择书签和清空书签其中长按选择书签列表中的某条书签记录也可达到删除该条记录的目的点击自动翻页选项会有四种操作可供选择分别为每隔30秒40秒50秒自动翻页和停止自动翻页点击设置选项会有四种操作可供选择分别为设置背景音乐设置背景图片设置字体颜色和设置字体大小为此用户可通过自己的喜好来设置不同阅读界面的风格并且可以选择自己喜爱的音乐作为背景音乐在阅读的同时欣赏22系统架构本设计总体逻辑结构层次划分如图21所示图21 功能结构图23 开发环境数据库由于本设计和数据库密切相关但是对数据库的要求不高因此可用Android系统本身自带的Sqlite数据库Android SDK与Eclipse开发的插件ADT由于本设计是基于Android系统的而Android开发环境的搭建是基于Eclipse 的因此需要下载Android SDK与Eclipse开发的插件ADT服务器由于本设计需要用服务器来为其提供下载服务而且对服务器的要求不高因此在设计时用Tomcat作服务器软件设计31 总体软件结构设计打开电子书阅读器之后软件会先查看上次阅读的最后记录以此作为根据来进行判断从而跳转至相应的阅读界面然后用户就可在阅读界面下通过选择menu来执行想要的操作找书书签自动翻页设置点击找书选项会有两种操作可供选择分别是在SD卡中找书和通过网络下载点击书签选项会有三种操作可供选择分别为添加书签选择书签和清空书签其中长按选择书签列表中的某条书签记录也可达到删除该条记录的目的点击自动翻页选项会有四种操作可供选择分别为每隔30秒40秒50秒自动翻页和停止自动翻页点击设置选项会有四种操作可供选择分别为设置背景音乐设置背景图片设置字体颜色和设置字体大小为此用户可通过自己的喜好来设置不同阅读界面的风格并且可以选择自己喜爱的音乐作为背景音乐在阅读的同时欣赏根据各个模块的不同功能对本设计进行了层次结构的划分在Eclipse下创建了一个名为Test的工程工程的结构图如图31图31 软件工程结构图该功能包是通过Android SDK自动生成的主要包括以下内容1src源代码目录该目录存放Android应用程序所有的源代码该目录项有不同的包包中对应开发的源代码开发过程中的主要精力都集中在开发src目录下内容2gen文件夹目录该目录存放了Eclipse的ADT插件自动生成的Rjava文件实际上Rjava定义了一个R类它包含了应用中用户界面图像字符串等各种资源与之相对应的资源编号id这些资源编号都是系统自动生成的即有一资源对象系统就为此在R类中生成相应资源编号好比一本字典3Res资源目录该目录定义了drawablelayout及values 3个目录a drawable目录该目录下有drawable-hdpidrawable-ldpidrawable-mdpi3个文件夹分别用来存放不同分辨率的图片资源用于不同分辨率的手机的开发可以通过ResourcegetDrawable id 获得该资源b layout目录该目录下包含了所有使用XML格式的界面描述文件主要用于表述应用程序的用户界面布局也用于描述用户界面和接口组件c values目录该目录包含了使用XML格式的参数描述文件也可以在此添加一些额外的资源如字符串颜色样式和数组等主要用于在代码中通过R类来调用它们而不直接使用这样可将代码和资源分开管理便于维护除了以上文件夹外还用一个AndroidManifestxml文件该文件是系统的控制文件告诉系统如何处理创建的所有顶层项目尤其是Activity凡是需要用到的组件都要在此注册同时该文件也是所有Android应用程序都需要的文件其描述了程序包的全局变量包括公开的应用程序组件和每个组件的实现类什么样的数据可以操作在什么地方可以运行等在这个文件中最重要的一个内容就是Intent过滤器这些过滤器描述了何时何种情况下让Activity启动当一个Activity或操作系统想要执行一个动作它将创建一个Intent对象该对象包含了很多描述符描述了想做的操作像处理数据数据的类型以及一些其他的信息Android将Intent对象中的所有公开的Intent过滤器比较找到一个最能恰当处理请求的数据和动作的Activity32 接口设计com 外部接口在用户界面部分根据需求分析结果用户需要一个友善界面在界面设计上应做到简单明了易于操作并且要注意到界面的布局应突出的显示重要以及出错信息在界面设计部分本系统按照Microsoft公司的用户界面设计标准为用户提供友好方便直观简洁的操作环境本系统采用了窗口继承的方式使窗口有统一的界面风格同时对错误信息提示信息进行标准化尽量做到清晰明了com 内部接口系统在功能模块的设计上以高内聚低耦合为设计目标内部接口方面各模块之间采用函数调用参数传递返回值的方式进行信息传递具体参数的结构将在下面数据结构设计的内容中说明接口传递的信息将是以数据结构封装的数据参数传递或返回值的形式在各模块间传递33 数据库设计com 数据模式设计一共设计了3张表是1阅读记录表阅读记录的ID书的路径阅读记录数据2书签表书签的ID书签对应的阅读记录的ID书签名书页3上次阅读记录表上次阅读记录的ID书的路径上次阅读到的书页上次阅读时的字体数据库表的设计如下图32 数据库结构图com 数据表格设计本数据库用的是一个小型数据库sqlite3在数据库中创建了三个表格即BookRecordBookMark和LastTimePage分别用来存放阅读记录的数据书签的数据和上次的阅读记录数据具体内容如表3-1表3-2和表3-3所示表3-1 阅读记录表字段名称数据类型字段大小是否主键说明 rid Integer8 是阅读记录的ID path 文本 50 否书的路径 data字节数组不定否预读记录数据表3-2 书签表字段名称数据类型字段大小是否主键说明 mid Integer8 是书签的ID ridfk Integer 8 否书签对应的阅读记录的ID bmname 文本50 否书签名 page Integer 8 否书页表3-3 上次阅读记录表字段名称数据类型字段大小是否主键说明 lid Integer8 是上次阅读的记录ID path 文本 50 否书的路径page Integer 8 否上次阅读到的页数 fontsize Integer8 否上次阅读的字体大小 com 表的具体设计表名BookRecord表中字段名称rid path data说明用varchar类型存储pathblob类型存储相应的路径下的阅读过程并规定rid为阅读记录表的主键表名BookMark表中字段名称mid ridfk bmname page说明创建书签mid为integer类型主键定义书签名字bmname为varchar类型书页号page为integer类型的书签表表名LastTimePage表中字段名称lid path page fontsize说明创建书签lid为integer型主键定义路径path为varchar类型书页号page为integer类型字体大小为integer类型的上次阅读记录表com 数据字典数据字典是物理数据库的具体体现表3-4 BookRecord数据字典字段名类型阅读记录的ID 整型书的路径文本阅读记录数据字节数组表3-5 BookMark数据字典字段名类型书签的ID 整型书签对应的阅读记录的ID 整型书签名文本书页整型表3-6 LastTimePage数据字典字段名类型上次阅读记录的ID 整型书的路径文本上次阅读到的页数整型上次阅读时字体大小整型 34 软件设计模型建立系统数据模型的主要工具是实体关联图即E-R图E-R图的图形符号约定如下表表3-7 E-R图图形符号图33 存储阅读记录的E-R图图34 存储书签的E-R图图 35 存储上次阅读记录的E-R图35 代码设计代码是按使用的目的表示识别分类排序数据的数字文字或符号识别是将文件中存储数据区别开或将文件中的数据按组区别开识别主要用数据更新与查找分类是根据数据编码中的定义对数据分类用于检索数据或统计分析排序是根据编码规则按代码中规定的次序排序用于输出与生成报表36 软件维护设计采用MVC设计模式将UI层和业务逻辑层分离开来采用针对接口编程的方式降低了代码之间的耦合度便于软件的升级和程序性能的优化第4 章系统功能模块的设计与实现41 关键技术com android平台及java语言以下图表展示了Android操作系统的主要组成部分图41 Android系统架构图本系统是以java为编程语言从接口到功能灵活多变主要运用的是Activity之间的相互跳转然后利用Intent实现多个程序同时运行的效果运行中如果某个Activity的画面被另一个Activity所取代则这个Activity停止本系统通过把View类与XML可扩展标记语言将用户界面放置在视图窗口然后注册事件来完成相应的功能例如当视图要处理用户的点击事件的时候android就要向框架注册一个OnClickListener等本系统中触发事件都是通过这种来实现的 Java语言是一种简单易用面向对象的可移植的语言它具有很多的优越性和特点比如平台无关性安全性面向对象健壮性等等本系统就是在android平台上使用java语言完成的系统com 中介软件中介软件是android操作系统应用程序的桥梁主要分为函数和虚拟机Android 的数据存储采用sqlite3数据库系统用户可以用ContentProvider类获取数据android中数据存储技术主要有文件存储preferencesqliteContentProvider和网络存储在本软件中主要使用到了文件存储sqlite和ContentProvider文件存储是以流的形式读写文件可以以文格的格式也可以以二进制的形式在java语言中要使用流则写入文件的对象必须进行序列化sqlite是嵌入式移动设备中常用的轻量级数据库可看作计算机上使用的sql serveroracle数据库本软件中用户生词本中的数据都存在sqlite数据库中而进行数据备份和恢复时则是用文件作为介质保存数据com 四大组件Android的四大组件是支持android应用程序显示跳转服务和事件的重要工具它们主要是Activity活动Intent意图Service服务ContentProvider内容提供器Activity是一个用户的界面基类属于UI一个Activity就是一个类每个Activity 类都需要继承Activity基类并与其他控件结合使用Intent实现Activityservice等之间的跳转和数据传输Service是后台服务为用户提供数据支持ContentProvider负责数据的存储和读取在android中软件UI通常使用xml技术设计而xml中控年的位置和状态则离不开布局的使用android中常用的布局有5种分别是AbsoluteLayoutLinearLayoutRelativeLayoutFrameLayoutTableLayout由于布局的使用并且布局之间可以互相嵌套使得android软件UI的设计变得非常灵活即使是一些非常复杂的界面设计只要合理的使用布局也会使开发变得很容易com sqlite3 数据库Sqlite3是建立在android平台上的一个数据库除了支持varcharn可变字符charn定长字符等数据特性外还支持空NULL整型INTEGER文本类型TEXT等数据类型它的特点入下轻量级只需带上很小的动态库就能享受它的全部功能独立性使用不需要安装在部署的时候能省去很多麻烦隔离性数据库中所有的信息都包含在一个文件内方便管理和维护和安全性可以同时读取数据但同时只有一个能够写入数据等特性com Tomcat服务器服务器的架设在httptocom下载合适版本的Tomcat在apache-tomcat-comwebapps目录下新建文件夹txt在txt文件夹下创建文本文件txt_listtxt在txt_listtxt下写入内容根据txt_listtxt的内容创建文本打开pache-tomcat-combin目录打开pache-tomcat-combin目录下的startupbat8打开浏览器在地址栏输入httplocalhost8088效果如图42所示图42 bin目录图42 欢迎界面的实现本模块主要完成阅读器欢迎界面的渐变效果显示在进入程序界面时首先调用该功能的实现主要是通过绘制黑色矩形然后对其进行平面贴图并通过不断的更改图片的透明值来实现的43 主控制类的实现ReaderActivity类是主要控制程序运行的类实现了各个界面的有序切换各个按钮和对话框的监听事件加载了程序中用到的相关资源有效地控制了程序的运行1onCreate方法是程序运行时进入主界面前调用的方法在此方法中对程序中用到的相关变量进行赋值并为相关类创建对象以方便调用2onKeyDownf方法是重写父类的onKeyDown方法当按下不同的键时此方法设计返回键4号键和Menu键82号键并且本设计中支持屏幕触控事件和键盘监听事件3onCreateOptionsMenu方法表示的是程序运行时用户按下键盘上的Menu键后显示的找书书签自动翻页和设置的按钮选项当用户按下不同的键后弹出相应的对话框4sendMessage方法表示各个界面相互跳转时调用的方法和不同线程之间传递消息的方法5isWhichTime方法用以判断是否为第一次打开程序如果是则程序中的变量值为默认值若不是第一次打开则获取上一次打开时设置的值saveCurrentData和savePreference方法表示当程序退出换书和第一次打开一本书时都要想数据库中BookRecord表中插入数据第一次打开一本书时向数据库中插入数据是因为如果表中不存在当前书的信息则无法存书签44工具类的设计。

Abstract

Abstract

A competitive Texas Hold’em poker player via automatedabstraction and real-time equilibrium computationAndrew Gilpin Computer Science Department Carnegie Mellon Universitygilpin@Tuomas Sandholm Computer Science Department Carnegie Mellon University sandholm@March31,2006AbstractWe present our game theory-based heads-up Texas Hold’em poker player.To overcome the computational ob-stacles stemming from Texas Hold’em’s gigantic game tree,our player employs automated abstraction techniques toreduce the complexity of the strategy computations.In addition to this state-space abstraction,our player uses round-based abstraction in conjunction with both offline and real-time equilibrium approximation.Texas Hold’em consistsof four betting rounds.Our player solves a large linear program(offline)to compute strategies for the abstractedfirstand second rounds.After the second betting round,our player updates the probability of each possible hand based onthe observed betting actions in thefirst two rounds as well as the revealed ing these updated probabilities,our player computes in real-time an equilibrium approximation for the last two abstracted rounds.We demonstratethat our player,which does not directly incorporate any poker-specific expert knowledge,is competitive with lead-ing poker-playing programs which do incorporate such domain-specific knowledge,as well as with advanced humanplayers.1IntroductionIn environments with more than one agent,the outcome of one agent may depend on the actions of the other agents. Consequently,in determining what action to take,an agent must consider the possible actions of the other agents. Game theory provides the mathematical foundation for explaining how rational agents should behave in such settings. Unfortunately,even in settings where game theory provides definitive guidance of an agent’s optimal behavior,the computational problem of determining these strategies remains difficult.In this paper,we develop computational methods for applying game theory-based solutions to a large real-world game of imperfect information.For sequential games with imperfect information,one could try tofind an equilibrium using the normal(matrix) form,where every contingency plan of the agent is a pure strategy for the agent.Unfortunately(even if equivalent strategies are replaced by a single strategy[13])this representation is generally exponential in the size of the game tree[24].The sequence form is an alternative that results in a more compact representation[18,11,24].For two-player zero-sum games,there is a polynomial-sized(in the size of the game tree)linear programming formulation based on the sequence form such that strategies for players1and2correspond to primal and dual variables.Thus,a minimax solution1for reasonably-sized two-player zero-sum games can be computed using this method[24,11,12].2 That approach alone scales to games with around a million nodes[7],but Texas Hold’em with its1018nodes is way beyond the reach of that method.In this paper,we present techniques that allow us to approach the problem from a game-theoretic point of view,while mitigating the computational problems faced.1Minimax solutions are robust in that there is no equilibrium selection problem:an agent’s minimax strategy guarantees at least the agent’s minimax value even if the opponent fails to play his minimax strategy.Throughout this paper,we are referring to a minimax solution when we use the term equilibrium.2Recently this approach was extended to handle computing sequential equilibria as well[16].11.1Prior research on pokerPoker is an enormously popular card game played around the world.The2005World Series of Poker had over$103 million in total prize money,including$56million for the main event.Increasingly,poker players compete in online casinos,and television stations regularly broadcast poker tournaments.Poker has been identified as an important research area in AI due to the uncertainty stemming from opponents’cards,opponents’future actions,and chance moves,among other reasons[5].In this paper,we develop new techniques for constructing a poker-playing program.Almost since thefield’s founding,game theory has been used to analyze different aspects of poker[14,17,1,23,pp. 186–219].However,this work was limited to tiny games that could be solved by hand.More recently,AI researchers have been applying the computational power of modern hardware to computing game theory-based strategies for larger games.Koller and Pfeffer(1997)determined solutions to poker games with up to140,000nodes using the sequence form and linear programming.For a medium-sized(3.1billion nodes)variant of poker called Rhode Island Hold’em, game theory-based solutions have been developed using a lossy abstraction followed by linear programming[20], and recently optimal strategies for this game were determined using lossless automated abstraction followed by linear programming[7].The problem of developing strong players for Texas Hold’em is much more challenging.The most notable game theory-based player for Texas Hold’em used expert-designed manual abstractions and is competitive with advanced human players[4].It is available in the commercial product Poker Academy Pro as Sparbot.In addition to game theory-based research,there has also been recent work in the area of opponent modelling in which a poker-playing program attempts to identify and exploit weaknesses in the opponents[22,9,3].The most successful Texas Hold’em program from that line of research is Vexbot,also available in Poker Academy Pro.Our player differs from the above in two important aspects.First,it does not directly incorporate any poker-specific domain knowledge.Instead,it analyzes the structure of the game tree and automatically determines appropriate ab-stractions.Unlike the prior approaches,ours1)does not require expert effort,2)does not suffer from errors that might stem from experts’biases and inability to accurately express their knowledge(of course,the algorithmically generated abstractions are not perfect either),and3)yields better and better poker players as computing speed increases over time(becausefiner abstractions are automatically found and used;in the prior approaches an expert would have to be enlisted again to developfiner abstractions).Second,our player performs both offline and real-time equilibrium com-putation.Sparbot only performs offline computation,and Vexbot primarily performs real-time computation.Detailed offline computation allows our player to accurately evaluate strategic situations early in the game,while the real-time computation enables our player to perform computations that are focused on specific portions of the game tree,based on observed events,and thus allows more refined abstractions to be used in the later stages than if offline computation were used for the later stages(where the game tree has exploded to be enormously wide).In our experimental results section,we present evidence to show that our player,which does not directly use any poker-specific domain knowledge,and which does not attempt to identify and exploit weaknesses in opponents, performs competitively against Sparbot,Vexbot,and advanced human players.2Rules of Texas Hold’em pokerThere are many different variations of Texas Hold’em.One parameter is the number of players.As most prior work on poker,we focus on the setting with two players,called heads-up.Another difference between variations is the betting structure.Again,as most prior research,we focus on low-limit poker,in which the betting amounts adhere to a restricted format.(Other popular variants include no-limit,in which players may bet any amount up to their current bankroll,and pot-limit,in which players may bet any amount up to the current size of the pot.) Before any cards are dealt,thefirst player,called the small blind,contributes one chip to the pot;the second player (big blind)contributes two chips.3Each player is dealt two hole cards from a randomly shuffled standard deck of52 cards.Following the deal,the players participate in thefirst of four betting rounds,called the pre-flop.The small blind actsfirst;she may either call the big blind(contribute one chip),raise(three chips),or fold(zero chips).The players then alternate either calling the current bet,raising the bet by two chips,or folding.In the event of a fold,the folding 3The exact monetary value of a chip is irrelevant to our player and so we refer only to the quantity of chips.2player forfeits the game and the other player wins all of the chips in the pot.Once a player calls a bet,the bettingroundfinishes.The number of raises allowed is limited to four in each round.The second round is called theflop.Three community cards are dealt face-up,and a betting round takes place withbets equal to two chips.The big blind player is thefirst to act,and there are no blind bets placed in this round.The third and fourth rounds are called the turn and the river.In each round,a single card is dealt face-up,and abetting round similar to theflop betting round takes place,but with bets equal to four chips.If the betting in the river round ends with neither player folding,then the showdown takes place.Each player usesthe seven cards available(their two hole cards along with thefive community cards)to form the bestfive-card pokerhand,where the hands are ranked in the usual order.The player with the best hand wins the pot;in the event of a tie,the players split the pot.3Strategy computation for the pre-flop andflopOur player computes the strategies for the pre-flop andflop offline.There are two distinct phases to the computa-tion:the automated abstraction and the equilibrium approximation.We discuss these in the following subsections,respectively.3.1Automated abstraction for the pre-flop andflopFor automatically computing a state-space abstraction for thefirst and second rounds,we use the GameShrink algo-rithm[7]which is designed for situations where the game tree is much too large for an equilibrium-finding algorithmto handle.GameShrink takes as input a description of the game,and outputs a smaller representation that approxi-mates the original game.By computing an equilibrium for the smaller,abstracted game,one obtains an equilibriumapproximation for the original game.We control the coarseness of the abstraction that GameShrink computes by a threshold parameter.The abstractioncan range from lossless(threshold=0),which results in an equilibrium for the original game,to complete abstraction(threshold=∞),which treats all nodes of the game as the same.The original method for using a threshold inGameShrink required a weighted bipartite matching computation(for heuristically determining whether two nodes arestrategically similar)in an inner loop.To avoid that computational overhead,we use a faster heuristic.Letting w1,l1 and w2,l2be the expected numbers of wins and losses(against a roll-out of every combination of remaining cards)for the two hands,we define two nodes to be in the same abstraction class if|w1−w2|+|l1−l2|≤threshold.We vary the abstraction threshold in order tofind thefinest-grained abstraction for which we are able to compute an equilibrium.In thefirst betting round,there are 522 =1,326distinct possible hands.However,there are only169strategically different hands.For example,holding A♠A♣is no different(in the pre-flop phase)than holding A♦A♥.Thus,anypair of Aces may be treated similarly.4GameShrink automatically discovers these abstractions.In the second round,there are 522 503 =25,989,600distinct possible hands.Again,many of these hands are strategically similar.However,applying GameShrink with the threshold set to zero results in a game which is still too large for an equilibrium-finding(LP)algorithm to handle.Thus we use a positive threshold that yields an abstraction that has2,465distinct hands.5Thefinest abstraction that we are able to handle depends on the available hardware.As hardware advances becomeavailable,our algorithm will be able to immediately take advantage of the new computing power simply by specifyinga different abstraction threshold as input to GameShrink.(In contrast,expert-designed abstractions have to be manuallyredesigned to getfiner abstractions.)To speed-up GameShrink,we precomputed several databases.First,a handval database was constructed.It has 527 =133,784,560entries.Each entry corresponds to seven cards and stores an encoding of the hand’s rank,enabling 4This observation is well-known in poker,and in fact optimal strategies for pre-flop(1-round)Texas Hold’em have been computed using this observation[19].5In order for our player to be able to consider such a wide range of hands in theflop round,we limit(in our players model,but not in the evaluation)the number of raises in theflop round to three instead of four.For a given abstraction,this results in a smaller linear program.Thus,we are able to use an abstraction with a larger number of distinctflop hands.This restriction was also used in the Sparbot player and has been justified by the observation that four raises rarely occurs in practice[4].3rapid comparisons to determine which of any two hands is better(ties are also possible).These comparisons are used in many places by our algorithms.To compute an index into the handval database,we need a way of mapping7integers between0and51to a unique integer between0and 527 −1.We do this using the colexicographical ordering of subsets of afixed size[6] as follows.Let{c1,...,c7},c i∈{0,...,51},denote the7cards and assume that c i<c i+1.We compute a uniqueindex for this set of cards as follows:index(c1,...,c7)=7 i=1 c i i .We use similar techniques for computing unique indices in the other databases.Another database,db5,stores the expected number of wins and losses forfive-card hands(the number of draws is inferred from this).This database has 522 503 =25,989,600entries,each corresponding to a pair of hole cards along with a triple offlop cards.In computing the db5database,our algorithm makes heavy use of the handval database. The db5database is used to quickly compare how strategically similar a given pair offlop hands are.This enables GameShrink to run much faster,which allows us to compute and evaluate several different levels of abstraction.By using the above precomputed databases,we are able to run GameShrink in about four hours for a given ab-straction threshold.Being able to quickly run the abstraction computation allowed us to evaluate several different abstraction levels before settling on the most accurate abstraction for which we could compute an equilibrium approx-imation.After evaluating several abstraction thresholds,we settled on one that yielded an abstraction that kept all the 169pre-flop hands distinct and had2,465classes offlop hands.3.2Equilibrium computation for the pre-flop andflopOnce we have computed an abstraction,we are ready to perform the equilibrium computation for that abstracted game. Two-person zero-sum games can be solved via linear programming using the sequence form representation of games. Building the linear program itself,however,is a non-trivial computation.It is desirable to be able to quickly perform this operation so that we can apply it to several different abstractions(as described above)in order to evaluate the capability of each abstraction,as well as to determine how difficult each of the resulting linear programs are to solve.The difficulty in constructing the linear program lies primarily in computing the expected payoffs at the leaf nodes. Each leaf corresponds to two pairs of hole cards,threeflop cards,as well as the betting history.Considering only the card history(the betting history is irrelevant for the purposes of computing the expected number of wins and losses), there are 522 502 483 ≈2.8·1010different histories.Evaluating each leaf requires rolling out the 452 =990possible turn and river cards.Thus,we would have to examine about2.7·1013different combinations,which would make the LP construction slow(a projected36days on a1.65GHz CPU).To speed up this LP creation,we precomputed a database,db223,that stores for each pair of hole cards,and for eachflop,the expected number of wins for each player(losses and draws can be inferred from this).This databasethus has 522 5022 483 =14,047,378,800entries.The compressed size of db223is8.4GB and it took about a month to compute.We store the database in onefile perflop combination,and we only load into memory onefile at a time,as needed.By using this database,our player can quickly and exactly determine the payoffs at each leaf for any abstraction.Once the abstraction is computed (as described in the previous subsection),we can build the LP itself in about an hour.This approach determines the payoffs exactly,and does not rely on any randomized sampling.Using the abstraction described above yields a linear program with243,938rows,244,107columns,and101,000,490 non-zeros.We solved the LP using the barrier method of ILOG CPLEX.This computation used18.8GB RAM and took7days,3hours.Our player uses the strategy computed in this way for the pre-flop andflop betting rounds. (Because our approximation does not involve any lossy abstraction on the pre-flop cards,we expect the resulting pre-flop strategies to be almost optimal,and certainly a better approximation than what has been provided in previous computations that only consider pre-flop actions[19].)44Strategy computation for the turn and riverOnce the turn card is revealed,there are two betting rounds remaining.At this point,there are a wide number ofhistories that could have occurred in thefirst two rounds.There are7possible betting sequences that could haveoccurred in the pre-flop betting round,and9possible betting sequences that could have occurred in theflop bettinground.In addition to the different betting histories,there are a number of different card histories that could haveoccurred.In particular,there are 524 =270,725different possibilities for the four community cards(three from the flop and one from the turn).The large number of histories makes computing an accurate equilibrium approximation forthefinal two rounds for every possiblefirst and second round history prohibitively hard.Instead,our player computesin real-time an equilibrium approximation for thefinal two rounds based on the observed history for the current hand.This enables our player to perform computations that are focused on the specific remaining portion of the game tree,and thus allows more refined abstractions to be used in the later stages than if offline computation were used for thelater stages(where the game tree has exploded to be enormously wide).There are two parts to this real-time computation.First,our player must compute an abstraction to be used in theequilibrium approximation.Second,our player must actually compute the equilibrium approximation.These stepsare similar to the two steps taken in the offline computation of the pre-flop andflop strategies,but the real-time natureof this computation poses additional challenges.We address each of these computations and how we overcame thechallenges in the following two subsections.4.1Automated abstraction for the turn and riverThe problem of computing abstractions for each of the possible histories is made easier by the following two obser-vations:(1)the appropriate abstraction(even a theoretical lossless one)does not depend on the betting history(butdoes depend on the card history,of course);and(2)many of the community card histories are equivalent due to suitisomorphisms.For example,having2♠3♠4♠5♠on the board is equivalent to having2♣3♣4♣5♣as long as wesimply relabel the suits of the hole cards and the(as of yet unknown)river card.Observation2reduces the number ofabstractions that we need to compute(in principle,one for each of the 524 flop and turn card histories,but reduced to 135,408).Although GameShrink can compute one of these abstractions for a given abstraction threshold in just a few sec-onds,we perform these abstraction computations off-line for two reasons.First,since we are going to be playing inreal-time,we want the strategy computation to be as fast as possible.Given a smallfixed limit on deliberation time(say,15seconds),saving even a few seconds could lead to a major relative improvement in strategy quality.Second,we can set the abstraction threshold differently for each combination of community cards in order to capitalize on thefinest abstraction for which the equilibrium can still be solved within a reasonable amount of time.One abstractionthreshold may lead to a very coarse abstraction for one combination of community cards,while leading to a veryfineabstraction for another combination.Thus,for each of the135,408cases,we perform several abstraction computationswith different abstraction parameters in order tofind an abstraction close to a target size(which we experimentallyknow the real-time equilibrium solver(LP solver)can solve(exactly or approximately)within a reasonable amountof time).Specifically,our algorithmfirst conducts binary search on the abstraction threshold for round3(the turn)until GameShrink yields an abstracted game with about25distinct hands for round3.Our algorithm then conductsbinary search on the abstraction threshold for round4(the river)until GameShrink yields an abstracted game withabout125distinct hands for round4.Given faster hardware,or more deliberation time,we could easily increase thesetwo targets.Using this procedure,we computed all135,408abstractions in about one month using six general-purpose CPUs.4.2Real-time equilibrium computation for the turn and riverBefore we can construct the linear program for the turn and river betting rounds,we need to determine the probabilitiesof holding certain hands.At this point in the game the players have observed each other’s actions leading up to thispoint.Each player action reveals some information about the type of hand the player might have.Based on the strategies computed for the pre-flop andflop rounds,and based on the observed history,we applyBayes’rule to estimate the probabilities of the different pairs of hole cards that the players might be holding.Letting5h denote the history,Θdenote the set of possible pairs of hole cards,and s i denote the strategy of player i,we can derive the probability that player i holds hole card pairθi as follows:Pr[θi|h,s i]=Pr[h|θi,s i]Pr[θi]Pr[h|s i]=Pr[h|θi,s i]Pr[θi] θ i∈ΘPr[h|θ i,s i]Since we already know Pr[h|θi,s i](we can simply look at the strategies,s i,computed for thefirst two rounds),we can compute the probabilities above.(Of course,the resulting probabilities might not be exact because the strategies for the pre-flop andflop rounds might not constitute an exact equilibrium since,as discussed above,they were computed without considering a fourth possible raise on theflop or any betting in rounds3and4,and abstraction was used.) Once the turn card is dealt out,our program creates a separate thread to construct and solve the linear problem corresponding to the abstraction of the rest of that game.When it is time for our player to act,the LP solve is interrupted,and the current solution is accessed to get the strategy to use at the current time.When the algorithm is interrupted,we save the current basis which allows us to continue the LP solve from the point at which we were interrupted.The solve then continues in the separate thread(if it has not already found the optimal solution).In this way,our strategy(vector of probabilities)keeps improving in preparation for making future betting actions in rounds 3and4.There are two different versions of the simplex algorithm for solving an LP:primal simplex and dual simplex. The primal simplex maintains primal feasibility,and searches for dual feasibility.(Once the primal and dual are both feasible,the solution is optimal.)Similarly,dual simplex maintains dual feasibility,and searches for primal feasibility. (Dual simplex can be thought of as running primal simplex on the dual LP.)When our player is playing as player1, the dual variables correspond to our strategies.Thus,to ensure that at any point in the execution of the algorithm we have a feasible solution,our player uses dual simplex to perform the equilibrium approximation when she is player 1.Similarly,she uses the primal simplex algorithm when she is player2.If the player is given an arbitrarily long time to deliberate,it would not matter which algorithm was used since at optimality both primal and dual solutions are feasible.But since we are also interested in interim solutions,it is important to always have feasibility for the solution vector in which we are interested.Our conditional choice of the primal or dual simplex method ensures exactly this.One subtle issue is that our player occasionally runs off the equilibrium path.For example,suppose it is our player’s turn to act,and the current LP solution indicates that she should bet;thus our player bets,and the LP solve continues.It is possible that as the LP solve continues,it determines that the best thing to have done would have been to check instead of betting.If the other player re-raises,then our player is in a precarious situation:the current LP solution is stating that she should not have bet in thefirst place,and consequently is not able to offer any guidance to the player since she is in an information set that is reached with probability zero.It is also possible for our player to determine during a hand whether the opponent has gone off of the equilibrium path,but this rarely happens because their cards are hidden.In these situations,our player simply calls the bet.5Experimental resultsWe tested our player against two of the strongest prior poker-playing programs,as well as against a range of humans.5.1Computer opponentsThefirst computer opponent we tested our player against was Sparbot[4].Sparbot is also based on game theory.The main difference is that Sparbot considers three betting rounds at once(we consider two),but requires a much coarser abstraction.Also,all of Sparbot’s computations are performed offline and it is hard-wired to never fold in the pre-flop betting round.Our results against Sparbot are illustrated in Figure1(left).When tested on10,000hands,we won0.007small bets per hand on average.A well-known challenge is that comparing poker strategies requires a large number of hands in order to mitigate the role of luck.The variance of heads-up Texas Hold’em has been empirically observed to be±6/√small bets per hand when N hands are played[2].6So,our victory over Sparbot is within the estimated variance of±0.06.6One way to reduce the variance would be to play each hand twice(while swapping the players in between),and tofix the cards that are dealt.6-100 0100 200 300 400 5000 2500 50007500 10000S m a l l b e t s w o n Hands playedOur player vs Sparbot-100 0 100 200 300 400 500 0 1250 2500 3750 5000Hands playedOur player vs Vexbot Figure 1:Our program versus Sparbot (left)and Vexbot (right).The second computer opponent we played was Vexbot [3].It searches the game tree,using a model of the opponent to estimate the probabilities of certain actions as well as the expected value of leaf nodes.It is designed to adapt to the particular weaknesses of the opponent,and thus,when facing a fixed strategy such as the one used by our player,it should gradually improve its strategy.Figure 1(right)indicates that our player wins initially,but ends up in a tie after 5,000hands.It is possible that Vexbot is learning an effective counter strategy to our player,although the learning process appears to take a few thousand hands.When playing against computer opponents,our player was limited to 60seconds of deliberation time,though it only used about 9seconds on average.The results presented are what we had collected at submission time.We are continually running experiments to get more statistically meaningful results.5.2Human opponentsWe also conducted experiments against human players,each of whom has considerable poker-playing experience.Each participant was asked to describe themselves as either “intermediate”or “expert”.The experts play regularly and have significantly positive winnings in competitive play,mainly in online casinos.(In poker,unlike other competitive games such as chess,there is no ranking system for players.)Our player was competitive with the humans (Table 1).However,due to the large variance present in poker,there does not appear to be strong evidence declaring it to be an overall winner or an overall loser.With human opponents it is difficult to play a large enough number of hands to make any definitive statements.Although our player ended up losing an average of 0.02small bets per hand,this is well within the variance (±0.15small bets per hand when 1,576hands are played).Interestingly,our player won 0.01small bets per hand on average against the expert players.When playing against human opponents,our player was limited to 15seconds of deliberation time,though it only used about 4seconds on average.6Other related research on abstractionAbstraction techniques have been used in artificial intelligence research before.In contrast to our work,most (but not all)research involving abstraction has been for single-agent problems (e.g.[10,15]).One of the first pieces of This functionality is not available in Poker Academy Pro ,and the opponent players are available only via that product,so we have as yet been unable to perform these experiments.Even controlling for the deal of cards would not result in an entirely fair experiment for several reasons.First,the strategies used by the players are randomized,so even when the cards are held fixed,the outcome could possibly be different.Second,in the case where one of the opponents is doing opponent modeling,it may be the case that certain deals early in the experiment lend themselves to much better learning,while cards later in the experiment lend themselves to much better exploitation.Thus,the order in which the fixed hands are dealt matters.Third,controlling for cards would not help in experiments against humans,because they would know the cards that will be coming in the second repetition of a card sequence.7。

需求获取模型-参考文献

需求获取模型-参考文献

参考文献:[1]KWOK R. Phoning in data [J]. Nature, 2009, 458(7241):959-61.[2]CHIU PH, KAO GYM, LO CC. Personalized blogcontent recommender system for mobile phone users [J].Int’l Journal of Human-Computer Studies, 2010: 496-507.[3]Tuzhilin A. Personalization: the state of the art and futuredirections [J]. Business Computing, 2009: 3-44.[4]RICH E. User modeling via stereotypes [J]. CognitiveScience, 1979, 3(4): 329-354.[5]杜一,田丰,戴国忠,王锋,王宏安.一种移动环境下的用户模型[J].软件学报,2011, 22(2): 120-128.DU Y, TIAN F, DAI GZ, WANG F, WANG HA.A user model based on mobile environment [J].Journal of Software, 22(2): 120-128.[6]SHINTARO O. Exploring gender effects in a mobileadvertising context: on the evaluation of trust, attitudes, and recall [J]. Sex Roles, 2007, 57: 897-908.[7]Gokul C, Jan B, Daniel GP. Mining large-scalesmartphone data for personality studies [J]. Personal And Ubiquitous Computing, 2011: 1-18.[8]LI XY, MI ZC, ZHAN ZM. A location-awarerecommender system for mobile shopping environments[A]. In: Proc. of the 2nd Int’l Conf. Infor mation Scienceand Engineering (ICISE) [C]. Hangzhou, China, 2010: 1709-1711.[9]CHEN N, CHEN A. Integrating context-aware computingin decision support system [J]. Lecture Notes in Engineering and Computer Science, 2010, 2180(1): 359-364.[10]QUSAY HM, EYHAB AM, WANG ZX. Design andimplementation of a smart system for personalization and accurate selection of mobile services [J]. Requirements Engineering, 2007, 12(4): 221-230.[11]YAO XL, SHU HY. Study on value-added service inmobile telecom based on association rules [A]. In: Proc.of the 10th ACIS Int’l Conf. on Software Engineering, Artificial Intelligences, Networking and Parallel/Distributed Computing [C]. 2009: 116-119. [12]EAGLE N, PENTLAND A, LAZER D. Inferring socialnetwork structure using mobile phone data [C]. In: Proc.of the National Academy of Sciences (PNAS), 2009, 106(36): 15274-15278. [13]NIKO K, JAN B, OLIVIER D, DANIEL GP, JUHA L.Towards rich mobile phone datasets: lausanne data collection campaign [A]. In: ACM Int. Conf. on Pervasive Services (ICPS) [C]. 2010.[14]CESAR A H, SICKERT CR. The dynamics of a mobilephone network [J]. Physica A: Statistical Mechanics and its Applications, 2008, 387(12): 3017-3024.[15]DO TMT, DANIEL GP. By their apps you shallunderstand them: mining large-scale patterns of mobile phone usage [A]. In: Proc. of the 9th Int’l Conf. on Mobile and Ubiquitous Multimedia [C]. Limassol: IEEE, 2010.[16]王立才,孟祥武,张玉洁.移动网络服务中基于认知心理学的用户偏好提取方法[J].电子学报, 2011, 39(11): 2548-2553.WANG LC, MENG XW, ZHANG YJ. A cognitive psychology-based approach to user preferences elicitation for mobile network services [J]. Acta Electronica Sinica, 2011, 39(11): 2548-2553.[17]EYHAB AM, QUSAY HM. A context-aware servicediscovery and selection mechanism using artificial neural networks [J]. Int’l Journal of Intelligent Systems Technologies and Applications, 2009, 6(1): 144-156. [18]TOON DP, TOM D, LUC M. Extending the bayesianclassifier to a context-aware recommender system for mobile devices [A]. In: Proc. of the 2010 5th International Conference on Internet and Web Applications and Services [C]. 2010: 242-247.[19]MALLIKHARJUNA RN, NAIDU PMM, SEETHARAMP. An intelligent location management approaches in GSM mobile network [J]. eprint arXiv, 2012, 1596. [20]Yan TX, Chu D, Ganesan D, Kansal A, Liu J. Fast Applaunching for mobile devices using predictive user context [A]. In: Proc. of the 10th international conference on MobiSys [C]. 2012.[21]LAM D, COX DC, WIDOM J. Teletraffic modeling forpersonal communications services [J]. IEEE Communications Magazine, 1997, 53(2): 79-87.[22]KARATZOGLOU A, AMA TRIAIN X, BALTRUNAS L,OLIVER N. Multiverse recommendation: N-dimensional tensor factorization for context-aware collaborative filtering [A]. In: Proc. of the Recsys [C]. 2010: 79-86. [23]SU J, YEH H, YU P, TSENG V. Music recommendationusing content and context information mining [J]. IEEEIntelligent Systems, 2010, 25(1):16-26.[24]LINAS B. Context-Aware Collaborative FilteringRecommender Systems [D]. Italy: Free University of Bozen, 2011.[25]王玉祥,乔秀全,李晓峰.上下文感知移动社交网络服务选择机制研究[J].计算机学报,2010, 33(11): 2126-2135.WANG YX, QIAO XQ, LI XF. Research on context awareness mobile SNS service selection mechanism [J].Chinese Journal of Computers, 2010, 33(11):2126-2135.[26]HONG JY, SUH EH, KIM JY. Context-aware system forproactive personalized service based on context history [J]. ACM: Expert Systems with Applications, 2009, 36(4): 7448-7457.[27]JEMBERE E, ADIGUN MO, XULU SS. Miningcontext-based user preferences for m-Services applications [A]. In: Proc. of the IEEE/WIC/ACM International Conference on Web Intelligence [C]. 2007: 757-763.[28]KUO MH, CHEN LC, LIANG CW. Building andevaluating a location-based service recommendation system with a preference adjustment mechanism [J].Expert Systems with Applications, 2009, 36(2): 3543-3554.[29]王立才,孟祥武,张玉洁.上下文感知推荐系统研究[J].软件学报, 2012, 23(1): 1-20.WANG LC, MENG XW, ZHANG YJ. Context-aware recommender systems: A survey of the state-of-the-art and possible extensions [J]. Chinese Journal of Software, 2011: 2012, 23(1): 1-20.[30]STEFANIDIS K, PITOURA E, V ASSILIADIS P. Addingcontext to preferences [C]. In: Proc. of the IEEE 23rd Int’l Conf. on Data Engineering, 2007: 846-855.[31]WU W, JU YC, LI X. Paraphrase detection on SMSmessages in automobiles [A]. In Proc. of the IEEEInternational Conference on acoustics Speech and SignalProcessing (ICASSP) [C]. 2010: 5326-5329.[32]KENTA O, SHINSUKE N, JUN M. Context-awareSVM for context-dependent informationrecommendation [A]. In: Proc. of the Int’l Conf. onMobile Data Management [C]. 2006: 109-112.[33]GUI F, MALEK A, NAPHTALI R. A contextualized andpersonalized approach for mobile search [A]. In: Proc. of the 2009 International Conference on AdvancedInformation Networking and Applications Workshops[C]. 2009: 966-971.[34]GOENKA K, ARPINAR IB, NURAL M. Mobile websearch personalization using ontological user profile [A].In: Proc. of the 48th Annual Southeast Regional Conference [C]. Oxford: MS, USA, 2010.[35]刘栋,孟祥武,陈俊亮.上下文感知系统中的规则生成与匹配算法[J].软件学报, 2009, 20(10): 2655-2666.LIU D, MENG XW, CHEN JL. Algorithms for rule generation and matchmaking in context-aware system [J].Journal of Software, 2009, 20(10): 2655-2666.[36]NIAZI R, QUSAY HM. An ontology-based frameworkfor discovering mobile services [A]. In: Proc. of the 7th Annual Research Conf. on Communication Networks and Services, CNSR'09 [C]. Moncton: IEEE computer society, 2009:178-184.[37]XU JJ, LIAO SY, LI QD. Combining empiricalexperimentation and modeling techniques: a design research approach for personalized mobile advertising applications [J]. Decision Support Systems, 2007, 44(3): 710-724.[38]LINAS B, BERND L, STEFAN P. Context-aware placesof interest recommendations for mobile users [J]. Lecture Notes in Computer Science, 2011, 6769: 531-540. [39]INDRANIL B, CHEN X. Hybrid models usingunsupervised clustering for prediction of customer churn[A]. In: Proc. of the International MultiConference ofEngineers and Computer Scientists [C]. 2009: 133-151.[40]SUYKENS JAK, VANDEWALLE J. Least squaressupport vector machine classifiers [J]. Neural Processing Letters.1999: 293-300.[41]SARAH M, ELIZA P, NICK T. Adapting pervasiveenvironments through machine learning and dynamic personalization [A]. In: Proc. of the International Symposium on Parallel and Distributed Processing with Applications [C]. 2008: 395-402.[42]PAZZANI M, BILLSUS D. Learning and revising userprofiles: the identification of interesting web sites [J].Machine Learning, 1997, 27: 313-331.[43]OURDIA B, LYNDA TL, MOHAND B. Dynamicallypersonalizing search results for mobile users [J]. Lecture Notes in Computer Science, 2009, 5822/2009: 99-110. [44]SARAH M, ELIZABETH P, NICK T, M.HOWARD W.Implicit adaptation of user preferences in pervasivesystems [A]. 2009 Fourth International Conference on Systems [C]. 2009: 56-62.[45]WANG LC, MENG XW, ZHANG YJ. New approachesto mood-based hybrid collaborative filtering [A]. ACM CAMRa’10 [C]. 2010: 28-33.[46]SHI YC, MENG XW, WANG LC. A heuristic approachto identifying the specific household member for a given rating [A]. In: Proc. of the 2nd Challenge onContext-Aware Movie Recommendation [C]. 2011: 47-52.[47]刘建国,周涛,郭强.个性化推荐系统评价方法综述[J].复杂系统与复杂性科学.2009, 6(3): 1-9.LIU JQ, ZHOU T, GUO Q. Overview of the evaluated algorithms for the personal recommendation systems [J].Complex Systems and Complexity Science, 2009, 6(3): 1-9.。

基于Android开发的外文文献

基于Android开发的外文文献

AndroidAndroid, as a system, is a Java-based operating system that runs on the Linux 2.6 kernel. The system is very lightweight and full featured. Android applications are developed using Java and can be ported rather easily to the new platform. If you have not yet downloaded Java or are unsure about which version you need, I detail the installation of the development environment in Chapter 2. Other features of Android include an accelerated 3-D graphics engine based on hardware support, database support powered by SQLite, and an integrated web browser.If you are familiar with Java programming or are an OOP developer of any sort, you are likely used to programmatic user interface UI development—that is, UI placement which is handled directly within the program code. Android, while recognizing and allowing for programmatic UI development, also supports the newer, XML-based UI layout. XML UI layout is a fairly new concept to the average desktop developer. I will cover both the XML UI layout and the programmatic UI development in the supporting chapters of this book.One of the more exciting and compelling features of Android is that, because of its architecture, third-party applications—including those that are “home grown”—are executed with the same system priority as those that are bundled with the core system. This is a major departure from most systems, which give embedded system apps a greater execution priority than the thread priority available to apps created by third-party developers. Also, each application is executed within its own thread using a very lightweight virtual machine.Aside from the very generous SDK and the well-formed libraries that are available to us to develop with, the most exciting feature for Androiddevelopers is that we now have access to anything the operating system has access to. In other words, if you want to create an application that dials the phone, you have access to the phone’s dialer; if you want to create an application that utilizes the phone’s internal GPS if equipped, you have access to it. The potential for developers to create dynamic and intriguing applications is now wide open.On top of all the features that are available from the Android side of the equation, Google has thrown in some very tantalizing features of its own. Developers of Android applications will be able to tie their applications into existing Google offerings such as Google Maps and the omnipresent Google Search. Suppose you want to write an application that pulls up a Google map of where an incoming call is emanating from, or you want to be able to store common search results with your contacts; the doors of possibility have been flung wide open with Android.Chapter 2 begins your journey to Android development. You will learn the how’s and why’s of usin g specific development environments or integrated development environments IDE, and you will download and install the Java IDE Eclipse.Application ComponentsA central feature of Android is that one application can make use of elements of other applications provided those applications permit it. For example, if your application needs to display a scrolling list of images and another application has developed a suitable scroller and made it available to others, you can call upon that scroller to do the work, rather than develop your own. Your application doesn't incorporate the code of the other application or link to it. Rather, it simply starts up that piece of the other application when the need arises.For this to work, the system must be able to start an application process when any part of it is needed, and instantiate the Java objects for that part. Therefore, unlike applications on most other systems, Android applications don't have a single entry point for everything in the application no main function, for example. Rather, they have essential components that the system can instantiate and run as needed. There are four types of components:ActivitiesAn activity presents a visual user interface for one focused endeavor the user can undertake. For example, an activity might present a list of menu items users can choose from or it might display photographs along with their captions. A text messaging application might have one activity that shows a list of contacts to send messages to, a second activity to write the message to the chosen contact, and other activities to review old messages or change settings. Though they work together to form a cohesive user interface, each activity is independent of the others. Each one is implemented as a subclass of the Activity base class.An application might consist of just one activity or, like the text messaging application just mentioned, it may contain several. What the activities are, and how many there are depends, of course, on the application and its design. Typically, one of the activities is marked as the first one that should be presented to the user when the application is launched. Moving from one activity to another is accomplished by having the current activity start the next one.Each activity is given a default window to draw in. Typically, the window fills the screen, but it might be smaller than the screen and float on top of other windows. An activity can also make use of additional windows — for example, a pop-up dialog that calls for a user responsein the midst of the activity, or a window that presents users with vital information when they select a particular item on-screen.The visual content of the window is provided by a hierarchy of views —objects derived from the base View class. Each view controls a particular rectangular space within the window. Parent views contain and organize the layout of their children. Leaf views those at the bottom of the hierarchy draw in the rectangles they control and respond to user actions directed at that space. Thus, views are where the activity's interaction with the user takes place.For example, a view might display a small image and initiate an action when the user taps that image. Android has a number of ready-made views that you can use —including buttons, text fields, scroll bars, menu items, check boxes, and more.A view hierarchy is placed within an activity's window by the Activity.setContentView method. The content view is the View object at the root of the hierarchy. See the separate User Interface document for more information on views and the hierarchy.ServicesA service doesn't have a visual user interface, but rather runs in the background for an indefinite period of time. For example, a service might play background music as the user attends to other matters, or it might fetch data over the network or calculate something and provide the result to activities that need it. Each service extends the Service base class.A prime example is a media player playing songs from a play list. The player application would probably have one or more activities that allow the user to choose songs and start playing them. However, the musicplayback itself would not be handled by an activity because users will expect the music to keep playing even after they leave the player and begin something different. To keep the music going, the media player activity could start a service to run in the background. The system would then keep the music playback service running even after the activity that started it leaves the screen.It's possible to connect to bind to an ongoing service and start the service if it's not already running. While connected, you can communicate with the service through an interface that the service exposes. For the music service, this interface might allow users to pause, rewind, stop, and restart the playback.Like activities and the other components, services run in the main thread of the application process. So that they won't block other components or the user interface, they often spawn another thread for time-consuming tasks like music playback. See Processes and Threads, later.Broadcast receiversA broadcast receiver is a component that does nothing but receive and react to broadcast announcements. Many broadcasts originate in system code — for example, announcements that the timezone has changed, that the battery is low, that a picture has been taken, or that the user changed a language preference. Applications can also initiate broadcasts — for example, to let other applications know that some data has been downloaded to the device and is available for them to use.An application can have any number of broadcast receivers to respond to any announcements it considers important. All receivers extend the BroadcastReceiver base class.Broadcast receivers do not display a user interface. However, they may start an activity in response to the information they receive, or they may use the NotificationManager to alert the user. Notifications can get the user's attention in various ways —flashing the backlight, vibrating the device, playing a sound, and so on. They typically place a persistent icon in the status bar, which users can open to get the message.Content providersA content provider makes a specific set of the application's data available to other applications. The data can be stored in the file system, in an SQLite database, or in any other manner that makes sense. The content provider extends the ContentProvider base class to implement a standard set of methods that enable other applications to retrieve and store data of the type it controls. However, applications do not call these methods directly. Rather they use a ContentResolver object and call its methods instead. A ContentResolver can talk to any content provider; it cooperates with the provider to manage any interprocess communication that's involved.See the separate Content Providers document for more information on using content providers.Whenever there's a request that should be handled by a particular component, Android makes sure that the application process of the component is running, starting it if necessary, and that an appropriate instance of the component is available, creating the instance if necessary.Key Skills & Concepts● Creating new Android projects● Working with Views● Using a TextView● Modifying the main.xml fileCreating Your First Android Project in EclipseTo start your first Android project, open Eclipse. When you open Eclipse for the first time, it opens to an empty development environment see Figure 5-1, which is where you want to begin. Your first task is to set up and name the workspace for your application. Choose File | New | Android Project, which will launch the New Android Project wizard.CAUTION Do not select Java Project from the New menu. While Android applications are written in Java, and you are doing all of your development in Java projects, this option will create a standard Java application. Selecting Android Project enables you to create Android-specific applications.If you do not see the option for Android Project, this indicates that the Android plugin for Eclipse was not fully or correctly installed. Review the procedure in Chapter 3 for installing the Android plugin for Eclipse to correct this.The New Android Project wizard creates two things for youA shell application that ties into the Android SDK, using the android.jar file, and ties the project into the Android Emulator. This allows you to code using all of the Android libraries and packages, and also lets you debug your applications in the proper environment.Your first shell files for the new project. These shell files contain some of the vital application blocks upon which you will be building your programs. In much the same way as creating a Microsoft application in Visual Studio generates some Windows-created program code in your files, using the Android Project wizard in Eclipse generates your initial program files and some Android-created code. In addition, the New Android Projectwizard contains a few options, shown next, that you must set to initiate your Android project. For the Project Name field, for purposes of this example, use the title HelloWorldText. This name sufficiently distinguishes this Hello World project from the others that you will be creating in this chapter.In the Contents area, keep the default selections: the Create New Project in Workspace radio button should be selected and the Use Default Location check box should be checked. This will allow Eclipse to create your project in your default workspace directory. The advantage of keeping the default options is that your projects are kept in a central location, which makes ordering, managing, and finding these projects quite easy. For example, if you are working in a Unix-based environment, this path points to your $HOME directory.If you are working in a Microsoft Windows environment, the workspace path will be C:/Users/<username>/workspace, as shown in the previous illustration. However, for any number of reasons, you may want to uncheck the Use Default Location check box and select a different location for your project. One reason you may want to specify a different location here is simply if you want to choose a location for this specific project that is separate from other Android projects. For example, you may want to keep the projects that you create in this book in a different location from projects that you create in the future on your own. If so, simply override the Location option to specify your own custom location directory for this project.。

关于手机看书的作文英语

关于手机看书的作文英语

Reading on a mobile phone has become an increasingly popular activity in recent years,thanks to the convenience and accessibility of smartphones.Here are some points to consider when discussing the topic of reading on mobile phones in an essay:1.Convenience:Mobile phones offer the convenience of carrying a vast library in your pocket.You can access books,articles,and other reading materials anytime,anywhere, without the need for a physical book.2.Accessibility:With the advent of ebooks and various reading apps,a wide range of literature is available at our fingertips.This includes classic literature,contemporary works,and even academic texts.3.CostEffectiveness:Reading on a mobile phone can be more costeffective than purchasing physical books.Many ebooks are cheaper than their printed counterparts,and there are numerous free resources available online.4.Customization:Mobile reading apps allow users to customize their reading experience. This includes adjusting font size,background color,and even the brightness of the screen to reduce eye strain.5.Multitasking:Mobile phones enable readers to multitask.For instance,one can listen to music,take notes,or look up definitions without leaving the reading app.6.Environmental Impact:Ereading can be considered more environmentally friendly as it reduces the need for paper,ink,and the resources required to produce physical books.7.Health Concerns:Prolonged use of mobile phones for reading can lead to eye strain and discomfort due to the blue light emitted by screens.However,many devices now offer night mode or blue light filters to mitigate these issues.8.Impact on Reading Habits:The ease of accessing information on mobile phones can lead to a more fragmented reading experience,with users skimming through texts rather than engaging in deep reading.9.Social Aspects:Reading on a mobile phone can be a solitary activity,which contrasts with the social aspects of traditional reading,such as book clubs or shared reading experiences.10.Diversity of Content:Mobile phones provide access to a diverse range of content, including selfpublished works that may not be available in traditional bookstores,thussupporting a wider range of authors and ideas.11.Portability:Unlike carrying multiple books,a mobile phone is lightweight and easy to transport,making it ideal for long commutes or travel.12.Technological Advancements:The development of eink technology in devices like ereaders has made reading on screens more comfortable and similar to reading from paper.In conclusion,while reading on a mobile phone offers numerous advantages such as convenience,accessibility,and costeffectiveness,it also presents challenges related to health and the quality of the reading experience.As technology continues to evolve,it is likely that the mobile reading experience will improve,offering an even more seamless way to engage with literature and information.。

engagement in

engagement in

Using context awareness to enhance visitor engagement in a gallery spacePeter Lonsdale1, Russell Beale2, Will Byrne11School of Engineering and 2School of Computer Science,University of Birmingham, Edgbaston, Birmingham B15 2TTEmail: {p.lonsdale@, r.beale@cs., w.f.byrne@}Context-awareness can greatly enhance the usability of mobile devices by making it possible for users to continue with other activities without having to pay too much attention to the device. At the same time context-aware applications can provide timely support for user activities by responding to changes in the user’s state and acting accordingly. We describe our work on developing a generic context awareness architecture that is being deployed in a gallery space to enhance learner engagement with the gallery exhibits. Our system makes use of contextual information to determine what content should be displayed on the device. Users can also navigate this content by explicitly changing their context in the dimensions of physical location and dwell time.Visitors have the opportunity to physically interact with the abstract information layer that is overlaid on the gallery space. The system also actively encourages movement in the gallery by identifying links between paintings. We describe our architecture, implementation, and the design challenges faced in deploying this system within a gallery.Keywords: context awareness, mobile learning, museum, mobile usability, PDAs, location awareness.1 IntroductionContext awareness is a relatively nascent field of research that centres on the use of information pertaining to the user and their environment to drive the behaviour of a device or system (for reviews of context-awareness applications and research perspectives, see Chen and Kotz [2000] and Dourish [2004]. By taking account of contextual information, systems can be made easier to use, and can provide more appropriate responses, than if they respond passively to user requests. There is currently considerable interest in the use of context awareness to provide enhanced2Lonsdale, Beale, Byrne usability in this way, and in particular developers of mobile applications are looking to context awareness to provide solutions to the specific problems posedby the design limitations of mobile computing devices.Context awareness is especially important for mobile devices because it allows us to overcome the usability problems associated with small, handheld devices[Sharples, M. and Beale, R. (2003) Journal of Computer Assisted Learning,19,392-395.], and also to makeeffective use of the user’s physical and social surroundings to provide timelysupport to their activities. We can provide enhanced user support by using contextual information to drive mobile applications, and simultaneously we can exploit physical context as a means to interact with the application. For example, a user’s location can drive delivery of content on a device, and at the same the user can utilize the system’s sensitivity to their location as a navigation tool, selecting different items of content by altering their physical location.1.1 Context awareness for mobile learningMobile learning is too often conceived of as simply the mobile equivalent of e-learning. The assumption is that learning can be delivered through content displayed on mobile devices in the same way as it is displayed on other systems such as desktop PCs. However, the use of mobile computing devices is qualitatively different to the use of other computing devices, and we must take account of this when developing m-learning applications. We must also consider that a user with a mobile device is often much more influenced by their surroundings than a user of a desktop PC might be.Mobile devices such as phones and PDAs are used in a huge variety of settings and environments, and we cannot rely on having the user’s full attention. Mobile learning is not something that can be delivered, it is something that might happen, given the right combination of learner, surroundings, content, and activity. This serendipitous nature of mobile learning is further enforced by the very informal way in which people use things like mobile phones and PDAs. They are not setting out to learn something, they are often engaged in something else entirely, and we must make the best use we can of the devices they have to hand to support their activities [Rogers ref]. We can do this using context awareness to ensure that the device is always ready with relevant information, but does not need to distract the user in order to achieve this readiness.The EU IST Project MOBIlearn [Bormida ref] has focused on the development of a large scale platform for delivering learning content to learners with mobile devices, including mobile phones, tablet PCs, and PDAs. As part of this work, the University of Birmingham has developed an architecture for context awareness that is currently being deployed at the Nottingham Castle Museum gallery to provide an enhanced and more engaging experience for visitors to the gallery.Context aware gallery space3 Our aims have been:1.To provide timely support to the user2.To allow the user to maintain their attention on the world3.To allow the user to inspect, understand, and alter the current contextmodel for their own purposesWe describe our approach to implementing a generic context awareness architecture for mobile learning applications, and discuss its use in deploying a system to enhance visitor experiences at Nottingham Castle Museum gallery.1.2 Context awareness for museum and galleriesMuseums, galleries, and heritage sites seek engage visitors in the artefacts they exhibit, as well as encourage participation in the learning space provided. The use of computer technologies in museums is not a new concept, and kiosk-based content presentation and interactive exhibits are a common sight. Mobile devices offer opportunities to provide technological means to engage visitors whilst they are situated within the gallery space itself. Moreover, the small size and portability of these devices means that we can seek to engage the user without distracting their attention from the exhibits they are trying to enjoy.Context-aware mobile applications have been used effectively to deliver supporting information to tourists in the form of location-aware tourist guides, for example the CyberGuide project [Abowd et al., 1997]. Similarly, location-aware applications have been used to deliver content that is appropriate to a visitor’s particular location within a gallery space – notable examples include Tate Modern’s multimedia pilot study [Proctor & Burton, 2003], the CAERUS system at the Winterbourne Botanic Gardens in Birmingham [Naismith & Smith, 2004] Wearable and mobile computers have also been used to provide augmented experiences that go beyond basic location awareness. Baber et al [2001] describe a system that combines location-dependent content delivery with profiling of visitor needs, to provide a visit tailored to individual requirements. Oppermann et al [1999] describe a system that uses contextual information as the basis for supporting the user but not distracting them, whilst MacColl et al [MacColl 2002] describe their experiences of combining context and virtual presence.Location remains the primary feature of context that is exploited in most context-aware applications[dix 2000, chen 2000, selker 2000, Bristow 2002]. To provide effective support for visitors to museums and galleries it is crucial to know where they are. Knowing what area a visitor is in means we can offer appropriate content and suggest possible activities. Knowing exactly which artefact a visitor is currently looking at means we can offer content and activities specifically for that artefact.1.3 Uses of contextA visit to a museum is not just a series of stops in front of artefacts. The experience has a beginning, a middle, and an end. It is a process. We have sought4Lonsdale, Beale, Byrne to address this by considering visitor movement within the gallery. We began by designing our system to use location and timing information to provide appropriate content to users with mobile devices in a gallery space. What became clear was that the delivery of content in this way allowed us to encourage visitors to interact with the artefacts in a different way. A review of the content supplied to us by the gallery indicated that many of the paintings on display shared interesting histories or were linked in some way that was never made visible to visitors. By flagging these connections to the visitors we are able to encourage greater movement between the paintings on display, beyond the basic linear path that most people follow in the gallery. This physical engagement with the learning space is an often neglected facet of learning. [??Mumford 2003?]In our preliminary trials of our prototype, we discovered that because the system relies on context to deliver content, changes in that context can be exploited by the user themselves to deliberately trigger content changes and hence move to another item of content when desired. In other words, context becomes not just a mechanism for the system to select content, but also a tool with which the user themselves can navigate the information space. These two aspects of context aware gallery exploration, context as content selector and context as navigation tool, have driven our subsequent development of a system to support visitors to the gallery. The concept is that an information space that is overlaid on the existing physical space of the gallery can be navigated through physical means, engendered by the implementation of a context-sensitive application. Mobile devices are hard to use, because they have small screens, and the user is usually trying to do something else at the same time as navigate the onscreen menus. By using physical movement as an interaction method, we can give people a new way to interact with the information space that we have overlaid onto the physical gallery space.2 Context Awareness ArchitectureContext aware applications typically involve the use of rulesets or some other kind of matching system to generate appropriate system responses (e.g. content display or option selection) from appropriate stimuli (e.g. changes in location, orientation, lighting levels, user input etc). This approach requires the definition of fairly rigid rules (or their equivalent) and an exhaustive set of possible responses that the system can make. Our approach has been driven by the need to support the process of learners moving through a learning space, and hence our model and architecture for context awareness is much more process centred.Another motivating factor in moving away from programmatically defined rules is the desire to support content developers and experience designers who wish to make use of context aware applications without wanting to engage in software development.We have devised an architecture (described in detail in [Beale & Lonsdale, 2004]) for context awareness that involves the definition (in textual form) of a set of software objects called Context Feature Objects. Each of these Context Feature Objects responds to a specific stimulus from actual context data, and responds by searching for matching metadata tags on the available content that the system canContext aware gallery space5 currently deliver. Any match results in the current score for that item of content or action being increased. When all available content and actions have been scored, those with higher scores are deemed to be of more relevance to the current context than those with lower scores. This scoring or ranking process occurs every time the context changes, e.g. whenever the user moves to another location.The context awareness system is configured by specifying a set of context feature objects and link objects using a structured syntax that the system parses at runtime to generate actual software objects that perform the context awareness processing. In specifying context feature objects, it is necessary only to know the name of the metadata tag that is appropriate and the range of values that a context feature object should respond to. Links between context feature objects are similarly defined. In this way we have provided a non-programmatic interface to the context awareness system, and one that could easily be translated into even more usable tools such a graphical user interface for the configuring of context aware applications.Contextual data itself is assumed to be gathered by separate systems, and is input into the context awareness architecture in a generic fashion by specifying simply a name for the data and then supplying its value. Context Feature Objects that are able to respond to the type of information passed in will do so. In this way the context awareness architecture is only loosely coupled to the technical infrastructure which provides the actual context data, and different sources of context data may easily be substituted at any time. From a technical perspective, this functionality is further enhanced by the use of a web services architecture to deploy the system. This means that communication with the context awareness architecture is easily achieved through standard protocols and data formats.2.1 Conceptual context modelThe easiest way to understand the contextual approach we have taken is through the metaphor of a movie. The movie itself has a main theme, and a variety of subplots and threads running through it. This is equivalent to the overall context. It is dynamic, changing over time and with the interactions of the participants, where history is important. A scene in the movie corresponds to a context state: a specific set of themes and characters are to the fore and have primary importance.A scene from the movie has these key characters in it, plus some props – this corresponds to what we call the context substate. Thus, as in a movie, the whole movie is needed for a full understanding, but a lot of information does exist in a single frame.2.2 Context Feature ObjectsOur software architecture comprises a set of software objects called context feature objects (CFOs) that correspond to real-world context features relating to the learner’s setting, activity, device capabilities and so on to derive a context substate, as described above. Data can be acquired through either automated means (for example sensors or other software subsystems) or can be input directly by the user.6Lonsdale, Beale, ByrneThis context substate is used to perform first exclusion of any unsuitable content (for example high-resolution web pages that cannot be displayed on a PDA) and then ranking of the remaining content to determine the best n options. This ranked set of options is then output to the content delivery subsystem.2.2.1 Types of context featuresContext feature objects are either excluders or rankers. Items of content that are deemed entirely inappropriate for the current context are excluded. That is to say they are removed from the list of recommended content and not subject to any further consideration – items that match a single exclusion criterion will not receive any further rankings and will not be recommended no matter how high a score they receive, and so exclusion is qualitatively different to simply receiving a low or zero ranking. Content remaining in the list after the exclusion process is then ranked according to how well it matches the current context. The ranking process simply increments the score of each item of content that has metadata matching the stimulus values of any particular context feature. The size of the increment depends on the salience value of the context feature doing the ranking. Individual CFOs can have their salience values changed so that they exert more influence on the ranking process. Any individual CFO can be de-activated at any time so that it has no effect on the exclusion or ranking processes.A CFO has a set of possible values, and an indicator of which value is currently selected. It is also possible for CFOs to have multiple sets of possible values, with the current active set being determined by the current value of another linked context feature. Whilst this has no bearing on the recommendation process, it is important in terms of providing an inspectable model of the context state to the user, who can observe the influence of one context feature on another. For example, options relating to current activity can change depending on the user’s current location.2.2.2 Linked context featuresEach context feature object responds to only one metadata tag and performs either an exclusion or ranking function. To achieve more complex filtering of content, CFOs can be linked together so that their function can depend on the state of other context feature objects. Link objects are used to send either the values of context features or the time they have held that value to other context features. Criteria on that link determine whether action should be taken.For example, we might have a context feature that responds directly to input from a sensor network specifying the location of the user. Another context feature infers the level of interest of the user by taking input from a link that acts on the time the location feature has had its current value. A user dwelling in one place for a longer period implies a higher level of interest in that location. A third context feature may respond to user input that can over-ride the inferred level of interest –this uses a link object that acts on the value input by the user. Conflicts between links and context features are resolved using salience values which specify the relative importance of each. These salience values are at present specified by theContext aware gallery space7 designer(s) of the context-aware experience, but more automated methods of conflict resolution could be employed in future iterations.2.4 OutputThe ordered list of ranked items of content is passed to delivery subsystems for use in determining exactly what content should be made available to the user. In this way, the context-awareness sub-system has no way of specifying exactly what is made available – the system is intended only to make recommendations to the system and to the user. This method of recommendation is preferred so that should the system make a mistake, and make inappropriate recommendations, its output does not override selections made elsewhere in the system (for example, the user might specify a particular page of content and then not want that item to be replaced by another).It should be clearly understood that the recommendations made are not only done on content – recommendations can also determine new navigational strategies through the virtual or real space. We are not concerned with only filtering content, but in the more general question of providing appropriate support, which may be re-ordering information, offering it in a different order, or directing the user to another part of the physical space – which will in turn affect the context system [lonsdale et al 2004??].3 In the galleryWe have deployed our context awareness architecture in the gallery space at Nottingham Castle. Our intention is to provide visitors to the gallery with an enhanced experience through the utilisation of contextual information to drive the behaviour of their mobile device. Content and options displayed on the screen will be tailored according to the user’s current context, and users are also able to make explicit use of the context sensitivity to drive the behaviour of the device themselves.3.1 Designing the experienceWe have consulted with the curators at Nottingham Castle Museum to ensure that our system will deliver appropriate support to visitors in the gallery space. Several issues arose during our consultation, of which two are immediately relevant to the design of the context aware visitor experience:ck of focused attention: visitors will usually enter the gallery space viaone door, move through the space in a linear way, and then exit withoutreally paying much attention to what they see on the way2.Deadspots:certain artefacts within the gallery are often overlooked byvisitors, for a variety of reasons; positioning, lighting, or other factors.8Lonsdale, Beale, Byrne We wanted initially to use our context awareness system to attempt to overcome these issues, and thus provide a more engaging experience for the visitors whilst at the same time addressing these areas that concern the gallery staff.A crucial part of the design centres on the fact that visitors move through a physical space. This movement was determined to be the primary context feature for our system to use. In addition, movement itself is not constrained to two or even three dimensions – visitors’ movements can be described also in terms of the fourth dimension, time. The particular path a visitor takes through the gallery, the time they spend at individual paintings, and whether or not they retrace their steps can all be used to drive a context aware application. Our system has been set-up to deliver appropriate content using the following principles:1.Which painting is the user currently closest to? This is determined fromour positioning system as described below. The system is able to provideaccurate data about which painting the user is currently closest to.2.How long has the user been in their current position? An increased dwelltime at a specific painting is assumed to indicate a higher level of interestin that painting.3.Has the user been in this position before? If the user has been to apainting before, the content they viewed on their previous visit can beused to determine the appropriate level of content to display this time.Previous content can also be offered for review.As well as using context awareness to determine what the device does, we are also exploring the use of context awareness as a means to physically engage the learner in the learning space, and to encourage movement within that space.3.1.1 Encouraging movement within the spaceMobile devices are often deployed in museums and similar locations as a means to deliver content or provide some other element of interactivity to the exhibits. But delivering content means that we are in danger of replacing hands on interaction with ‘heads down one-way transmission of information’ [Hsi, 2003]. Instead, what we can do is to use the device and the content it can display to cause the visitor to see the artefacts in a different way, and to expose the links between paintings that were not visible without the use of the technology to point them out.This functionality has been implemented through structuring the audio content provided by the device to highlight links with other paintings in the gallery space. Users are expected to navigate to the other paintings without additional assistance, which is in part the reason we have seen the use of the context sensitivity as a navigation tool.3.1.2 Enabling navigation through physical movementWe have observed that users wanted to navigate the information space by physically changing their context so that they were effectively driving the system through physical actions. Our application already supported this through being sensitive to context changes, but to further enhance usability in this area we have explored the use of salient contextual information on the user interface so thatContext aware gallery space9users can monitor the state of the context system and determine whether they have achieved the state they are aiming for. In this case, it became necessary to indicate to the user the exact location the device was currently registering for them, whether it thought they were moving or stationary, and how long it thought they had been in that location.3.2 Deploying the experienceTo provide the functionality described above within our context awareness architecture, it is necessary to define two Context Feature Objects to monitor Painting and Interest. The Painting CFO responds directly to which painting is closest to the user, and scores all items of content that are relevant to that painting. The Interest CFO also responds indirectly to location. A Link is defined between Painting and Interest which specifies a number of possible values for Interest, depending on the time that Painting has held its current value. The longer that Painting holds its value, the higher the value of Interest.If a visitor retraces their steps, the context architecture is able to determine the last known value of Interest, by consulting an internal database that stores sets of values of the CFOs. Using Painting as the search key for this database, the context system can determine what level of interest was reached last time the visitor was at this painting.The functionality described here could be achieved using a far less involved set of rules. However, our implementation offers a high degree of flexibility and also the chance for non-programmers to easily create context aware experiences without having to worry about the specifics of the code behind the system. The gallery experience is just one example of a relatively simple application that can be deployed using our architecture. The architecture itself is designed to be flexible and extensible, to allow for much greater complexity than was used for these initial gallery trials.We are using a bespoke ultrasound tracking system to determine the location of users as they move around the gallery space. This system has been developed at the University of Birmingham as part of another project [Cross, Wooley, Baber, & Gaffney, 2002], and has been successfully adapted to provide input to our context awareness system.The ultrasound system comprises a set of transmitters placed at known points on the walls of the gallery, and a receiver which connects to a PocketPC device. The receiver is able to triangulate its position from the signals received from the fixed transmitters.4 Results of user trialsFrom December 2004 to April 2005, we conducted user trials of our context aware system at Nottingham Castle Museum gallery. At time of writing, our results are at a preliminary stage, and we have not yet analysed data gathered from our questionnaires or audio/video recordings.10Lonsdale, Beale, ByrneAll participants were visitors to the Nottingham Castle Gallery who were approached and asked if they wished to take part in our study. All were given a brief introduction to the system and its aims. All participants (except the control condition) were asked to complete a pre- and post-task questionnaire so that we could assess what they had learned from their visit.We gather data from several sources for our trials:•pre- and post-task questionnaire data, to determine what visitors have learned from their visit•video recordings: of visitors’ movements in the gallery•audio recordings: of visitors’ conversations whilst using the system•system logs: of content delivered, movement between paintings, options selected on the PDAWe used an independent measures experimental design to determine the impact of the use of our handheld guide (experimental condition) in comparison with traditional guide materials (baseline condition: a printed booklet) and no provision of guide materials at all (control condition).Preliminary results aredrawn from informal observations taken by the experimenters during the trials.We found that visitors using the paper guide tended to follow a more ‘rigid’pattern of movement around the gallery, visiting paintings in a specific order, then stopping to consult the guide book. In contrast, visitors with the PDA were more likely to move around the gallery according to what interested them, after scanning the room for paintings that caught their eye. It seemed that because the handheld guide had no inherent structure, this structure was not imposed on the visitors’behaviour.A number of specific problems were observed when people were using the system. People quickly developed high expectations of the system based on previous experience, often remarking on paintings that did not offer the same depth of content as the others. Content availability was apparent from the screen display, but this seemed non-intuitive for many users. Even the basic system was perceived as overly complex by many users, emphasising the need for content delivery systems such as this to remain as simple as possible. Despite perceiving the system as complex, most users seemed to find the system useful once they had discovered what it could provideHowever, few users made use of the content navigation options on the device, and were content to simply have content delivered in the order the system dictated5 Conclusions and Next StepsThe system described here has been deployed in Nottingham Castle Museum gallery and is currently undergoing user trials. Preliminary testing of our prototypes has indicated that are important research issues surrounding the use of context sensitive architectures both to drive applications and to provide alternative means of content navigation for users. The main challenges in this area are those。

O A

O A

Abstract— This paper describes our Java Performance Monitoring Tool (JPMT), which is developed for detailed analysis of the behavior and performance of Java applications. JPMT represents internal execution behavior of Java applications by event traces, where each event represents the occurrence of some activity, such as thread creation, method invocation, and locking contention. JPMT supports event filtering during and after application execution. Each event is annotated by high-resolution performance attributes, e.g., duration of locking contention and CPU time usage by method invocations. JPMT is an open toolkit, its event trace API can be used to develop custom performance analysis applications. JPMT comes with an event trace visualizer and a command-line event trace query tool for shell scripting purposes. The instrumentation required for monitoring the application is added transparently to the user during run-time. Overhead is minimized by only instrumenting for events the user is interested in and by careful implementation of the instrumentation itself.Index Terms—Measurement, Software performance.I.I NTRODUCTIONVER the past few years Java [1] has evolved into a mature programming platform. Its portability makes Java a popular choice for implementing enterprise applications and off-the-shelf components, such as middleware and business logic. The performance of this software is of particular importance when it is used by businesses to implement services to their customers: software performance can have an immediate impact on the quality of service that the customers perceive, and thus also on revenue.There are many approaches to address performance, such as load/stress testing of components and applications, performance monitoring of deployed components and applications, performance prediction using models or rules of thumb, etcetera [8]. We developed the tool to aid us in constructing performance models of Java applications. However, we’d like to emphasize that the tool is also usable for performance testing, and such.The construction of performance models requires insight in Marcel Harkema is a computer science PhD student at the University of Twente, Enschede, The Netherlands (e-mail: harkema@cs.utwente.nl).Dick Quartel is with the Department of Computer Science, University of Twente, Enschede, The Netherlands (e-mail: quartel@cs.utwente.nl).Rob van der Mei is with TNO Telecom, Center of Excellence Quality of Service, Leidschendam, The Netherlands, and with the Free University, Faculty of Exact Sciences, Amsterdam, The Netherlands (e-mail: r.d.vandermei@telecom.tno.nl).Bart Gijsen is with TNO Telecom, Center of Excellence Quality of Service, Leidschendam, The Netherlands (e-mail: b.m.m.gijsen@telecom.tno.nl). the application execution behavior (how does the application work) and good-quality performance measurements (how fast is the application performing its work) [17]. The insight in application execution behavior can be used to develop the structure of the performance model. The performance measurements can be used to identify the parts of the execution behavior that need modeling, the model parameters, the values for the model parameters, and to validate performance models. For Java, the relevant aspects of execution behavior are threading, synchronization and cooperation between threads, method invocation, dynamic object allocation, and garbage collection.In this paper we present our tool for monitoring these execution behavior aspects in Java applications. We developed this tool because we found that existing tools did not provide us with the functionality we require, which is: (1) monitoring results of the aforementioned aspects of execution behavior, (2) precise timestamps and CPU usage measurements, (3) an open data format for the monitoring results, so that custom post-processing scripts can be developed, and (4) automated instrumentation at run-time based on a user-provided configuration file, which defines the execution behavior the user is interested in.Profiler tools, such as IBM Jinsight [5], Compuware NuMega DevPartner TrueTime [10], Sitraka Jprobe [14], OptimizeIt [16] and Intel VTune [6], do not provide complete traces of events that have occurred in the virtual machine; they employ call stack sampling (observing the state of the system at certain time intervals) to inform the user of execution hot spots, i.e., parts of the code that use the most execution time. These profiler tools are used to find performance problems and to optimize programs. Our goal is different; we want to measure the performance of user specified methods and provide the user with a complete method invocation trace. Therefore JPMT instruments the software to log events, such as method invocations, as they happen.Most profiler tools restrict the user to a GUI that provides a fixed view on the performance. Instead of providing fixed views, JPMT logs event traces in an open data format, allowing users to build custom tools to execute the performance queries they require. Rational Quantify [13] and IBM Jinsight [5] allow exporting of data to, e.g., spreadsheets or scripts.Often, profilers only support filtering after program execution. An exception is Rational Quantify [13], which allows the user to indicate which data is to be collected and reported, and the level of detail of the data. JPMT supports both online and offline filtering of interesting events (i.e., atA Java Performance Monitoring ToolMarcel Harkema, Dick Quartel, Rob van der Mei, Bart GijsenOrun-time and during event trace post-processing).The remainder of this paper is structured as follows. Section 2 presents an overview of the main features of the tool. Section 3 illustrates the use of the tool by applying it to a simple example. Section 4 contains some concluding remarks.II.F EATURESThe Java Performance Monitoring Tool (JPMT) is based on event-driven monitoring. JPMT represents the execution behavior of applications by event traces, in which each event represents the occurrence of some activity, such as a method invocation or the creation of a new thread of execution. These vent traces are similar to call-trees, but in addition to method invocations they also contain other event types. Our monitoring tool implements the event-driven monitoring approach, since we require complete behavioral information (not just snapshots of the system, like tools using the sampling technique provide).The core of JPMT is an agent that is inserted into the Java virtual machine using the Java Virtual Machine Profiler Interface (JVMPI). JVMPI agents are implemented as dynamically linked libraries written in C++. The agent uses JVMPI to subscribe to events that occur inside the virtual machine, collecting information on what happens inside the virtual machine on behalf of the tool. An important feature of JVMPI is its portability - Java implementations by Sun and IBM support JVMPI out-of-the-box in production virtual machines.JPMT does not use Java or JVMPI to obtain timing information. The timestamps provided by Java and JVMPI are too coarse, they have a granularity of 10 milliseconds on most systems. Also, Java and JVMPI do not provide information on the CPU usage. Instead of using Java or JVMPI, JPMT uses native operating system APIs. For instance, on the Linux operating system (and other UNIX systems) gettimeofday(2)can be used to obtain wall-clock timestamps with microsecond resolution (around 7 usec on an Intel Pentium Pro 180 MHz and 1 usec on an AMD Athlon XP 2000+). The perfctr API [12], a kernel add-on for Linux, can be used to obtain detailed information on CPU usage. On the Windows platform similar APIs are available, such as the QueryPerformance(Win32) API.The following elements of Java’s execution behavior can be monitored:Threading: Java applications can have multiple threads of execution. The creation and destruction of these threads is monitored. Each thread has its own event trace.Thread synchronization and cooperation: Java uses monitors[3] to implement thread synchronization (Java’s synchronized primitive) and cooperation (Java’s wait(), notify(), notifyAll() methods in the Object class). JPMT can report how long a thread has contended for a monitor, how long it held a monitor, how long it spend waiting for a signal from another thread (cooperation), etc.Method invocation: The sequence of method invocations is represented in a call-tree notation for each thread. A method invocation event includes the timestamp of when it occurred, the used wall-clock time in microseconds, the used CPU time in microseconds, and whether or not the method was compiled from byte-code into native code by the Java virtual machine. The wall-clock and CPU time event parameters of the caller method include the wall-clock and CPU time of callee methods. Mutual exclusion, cooperation, garbage collection, process scheduling events, and such, are shown within the method in which they occurred. While JVMPI does have the ability to monitor method invocations, it does not have the ability to select which methods are to be monitored and which methods not. When subscribed to JVMPI method invocation events, events are generated for every method invocation (including the ones the user may not be interested in), which can add significant monitoring overhead. Because we wanted to keep the monitoring overhead down to a minimum, we chose to develop our own method invocation monitoring mechanism. We have implemented a library written in C++ that can rewrite Java byte-code(the compiled form of Java source code). Using the library Java methods can be instrumented to trigger the method invocation event handlers present in our JVMPI agent. The library is linked with the JVMPI agent, and rewriting the byte-code occurs at run-time. Dynamic object allocation: Object allocation and release monitoring can be used to track down excessive object allocation and release, which can cause performance problems, not only because of the allocation and release cost, but also because it may trigger garbage collection cycles. Garbage collection: Garbage collection cycles can have a significant impact on the performance of applications, since execution is suspended during garbage collection. JPMT can report when and where garbage collection cycles occur, and how long they take.Process scheduling information (Linux specific): This provides information on the operating system process scheduling changes involving the monitored thread. There are two events that represent process scheduling changes in JPMT: thread-in and thread-out. Together they describe when a thread was actually running and when other processes where running. Currently, these events are not supported on other platforms than Linux. The Linux Trace Toolkit [18], a kernel tracing toolkit, is used to obtain this monitoring information.JPMT is configured using a configuration file for each application it monitors. This configuration file is read by the JPMT when the Java virtual machine that will run the Java application is started. The configuration file allows the user to choose an output file to log events to, whether or not object allocation, garbage collection, method invocation, use of Java monitors are to be logged (that implement synchronization and cooperation mechanisms), whether or not to use byte-code instrumentation to monitor method invocations (instead of using JVMPI’s method invocation monitoring mechanism),and whether or not to monitor operating system process scheduling. Using the method and thread filters the user can specify which methods and threads should be monitored, and which should not be monitored. JPMT applies these filters in the same order as they are specified in the configuration file (from top to bottom). By default all threads are monitored and no method invocations are monitored, i.e. include_thread *and exclude_method * *are the default thread and method filter settings. All ‘yes/no’ configuration directives (Object_Allocation, Garbage_Collection, Monitor_Waiting, Monitor_Contention, Method_Invocation, Bytecode_Rewriting, and LTT_Process_Scheduling) default to ‘no’.The following configuration file example logs events to log/mylogfile.bin, tells JPMT to monitor all method invocations in the net.qahwah.jpmt.test package using byte-code rewriting, and excludes all other method invocations from monitoring.Output log/mylogfile.binMethod_Invocation yesBytecode_Rewriting yesInclude_Method net.qahwah.jpmt.test.* *Exclude_Method * *During run-time our JVMPI agent collects the events of interest. The JVMPI agent instruments the software to be monitored when the software is loaded into the Java virtual for execution. The collected events are stored into a binary memory-mapped [15] file. After monitoring this binary file with the collected events can be analyzed. First, event traces are generated from the event collection. These event traces can be inspected using the event trace API, available for C++ and Ruby (a scripting language). Using the C++ event trace API we have implemented an event trace visualizer GUI for browsing event traces. The event trace API for Ruby is useful for implementing custom event trace post-processing scripts. We have tried to keep the overhead as low as possible by allowing the user to specify what is to be monitored, implementing a fast event logging mechanism, and by instrumenting methods to be monitored using Java byte-code rewriting. The overhead depends on how many events the user wishes to monitor. The cost of monitoring and logging one method invocation (using byte-code rewriting) on an AMD Athlon XP 2000+ system (running at 1.67 GHz) is 5 microseconds CPU time. To put this into perspective, on the same machine we measured the CPU time of the method invocation System.out.println(“monitoring information”)to be 19 microseconds (after being compiled into native code by the Java HotSpot VM).More information on the implementation (of an older version) of our tool is available from [2].III.A N E XAMPLEIn this section we briefly illustrate how JPMT has been used to study performance behavior of Java software. In this example we look at the CPU processing overhead of marshaling and un-marshaling a sequence of floating point numbers in a CORBA object middleware implementation. The Common Object Request Broker Architecture (CORBA) [11] [4] is the de-facto object middleware standard. CORBA mediates between application objects that may reside on different machines, by implementing an object-oriented RPC mechanism. CORBA provides programming language, operating system, and machine architecture transparency. For instance, it allows C++ objects to talk to Java objects that run on a remote host. To support this transparency a common data representation (CDR) is needed. Marshaling is a process that translates programming language, operating system, and machine architecture specific data types to a common data representation (CDR). Un-marshaling does the reverse. Marshaling and un-marshaling are used in every CORBA method invocation (although some CORBA implementations do not use marshaling/un-marshaling for local method invocations, to optimize these).Our test-bed consists of 2 machines interconnected using a local network. The server machine is a Pentium IV 1.7 GHz with 512MB RAM, the client machine is a Pentium III 550 MHz with 256 MB RAM. Both machines run the Linux operating system and the Java 2 standard edition v1.4. The CORBA implementation we use in this example is ORBacus/Java 4.1 [7].We have configured our CORBA workload generator to send requests consecutively (i.e. there is at most one active CORBA method invocation). We have performed 21 runs of 250 requests. With each run we increase the size of the sequence of floating point numbers with 5120 elements. In our experiment the float sequence is an inout parameter, i.e. it is sent to the server as a request parameter, and the server sends the (possibly modified) float sequence back to the client in its reply. The method that is invoked does nothing. The following is the CORBA IDL representation of our method: interface PerformanceTest{typedef sequence<float> FloatSeqTypevoid ping_inout_floatSeq(inoutFloatSeqType floatSeq);};Figure 1 presents our findings: the CPU cost of marshaling and un-marshaling is a significant part of the total CPU time used by the CORBA server while processing the request. In figure 1 the top line represents the mean CPU time used for server-side processing of the CORBA request. The line below represents the sum of the mean CPU times used for reading the CORBA request from the network, un-marshaling the float sequence (of the request), and marshaling the float sequence again (for the reply). The bottom three lines represent the individual mean CPU times of marshaling the float sequence for the reply, reading the float sequence from the network, and un-marshaling the float sequence, respectively. The input data for figure 1 is obtained from the generated event traces of the CORBA server application. We can conclude that marshalingand un-marshaling is an important performance issue in CORBA, and thus needs modeling. From figure 1 we can conclude that the CPU time of marshaling and un-marshaling float sequences can be effectively modeled as a linear function of the size of the float sequence.In figure 2 we show an example plot of one of the methods involved in the server-side request processing. The top line represents the wall-clock completion time, the line below represents the time spent garbage collecting, the third line from the top represents the CPU time used, and the ‘cloud’ of dots in the bottom of the plot represents the parts of the completion time where another thread was running (involuntary context switches). We found that particular method interesting since it shows a great gap between CPU time and wall-clock completion time. According to figure 2 the difference is caused by garbage collection occurring sometime during that method invocation. The garbage collection cycles are caused by the large amount of dynamic object allocation and release to store the float sequences. From figure 2 we can conclude that garbage collection can be a significant influence on the wall-clock completion time of a CORBA method invocation. JPMT can be used to determine when garbage collection needs to be considered for performance modeling.IV.C ONCLUDING R EMARKSIn this paper we presented our Java Performance Monitoring Tool (JPMT) for monitoring the performance of Java applications. JPMT represents Java’s execution behavior, such as threading, method invocation, and mutual exclusion, by event traces with high-resolution timestamps and CPU usage information.Our tool is under active development. We are currently implementing the second version, adding new capabilities to the event trace API and the event trace visualizer. The tool is to be released as open source software.R EFERENCES[1]J. Gosling, B. Joy, G. Steele, The Java Language Specification,Addison-Wesley, 1996.[2]M. Harkema, D. Quartel, B.M.M. Gijsen, R.D. van der Mei,Performance monitoring of Java applications, Proc. of the 3rd Workshop on Software and Performance (WOSP), 2002.[3] C.A.R. Hoare, Monitors: An Operating System Structuring Concept,Comm. ACM 17, 10:549-557 (October), 1974.[4]M. Henning, S. Vinoski, Advanced CORBA Programming with C++,ISBN 020*******, Addison-Wesley, 1999.[5]IBM Research, Jinsight project, /jinsight/,2001.[6]Intel, VTune Performance Analyzer,/software/products/vtune/, 2001.[7]IONA Technologies, Object Oriented Concepts Inc., ORBacus 4 forJava, 2000.[8]R, Jain, The Art of Computer Systems Performance Analysis: Techniquesfor Experimental Design, Measurement, Simulation, and Modeling, John Wiley & Sons, 1991.[9]S. Liang, D. Viswanathan, Comprehensive Profiling Support in the JavaVirtual Machine, 5th USENIX Conference on Object-OrientedTechnologies and Systems, May 1999.[10]Compuware NuMega, DevPartner TrueTime Java Edition,/products/numega/dps/java/tt_java.htm,2001.[11]Object Management Group, The Common Object Request Broker:Architecture and Specification, revision 2.5, OMG documentformal/2001-09-01, 2001.[12]M. Pettersson, Linux perfctr OS extensions (sofware), 2001.http://www.csd.uu.se/~mikpe/linux/perfctr/[13]Rational Software Corporation, Rational Quantify,/products/quantify_nt/index.jsp, 2001.[14]Sitraka Inc., Jprobe Suite, /software/jprobe/, 2001.[15]Vahalia, UNIX Internals – The New Frontiers, Prentice Hall, 1996.[16]VMGear, OptimizeIt, /, 2001.[17]M. Woodside, Software Performance Evaluation by Models, InPerformance Evaluation, LNCS 1769, 2000.[18]K. Yaghmour, M. R. Dagenais, Measuring and Characterizing SystemBehavior Using Kernel-Level Event Logging, 2000 USENIX AnnualTechnical Conference, June 18-23 2000.Fig. 1. The overhead of marshaling a sequence of floating point numbers in ORBacus/Java.Fig. 2. Plot of the CPU time used by the skeleton of our CORBA object (includes un-marshaling and marshaling overhead). The size of the float sequence is 50*1024 elements in this plot.。

Android外文文献翻译

Android外文文献翻译

Android Application FundamentalsAndroid applications are written in the Java programming language. The Android SDK tools compile the code—along with any data and resource files—into an Android package, an archive file with . All the code in a is considered to be one application and is the file that Android-powered devices use to install the application.Once installed on a device, each Android application lives in its own security sandbox:The Android operating system is a multi-user Linux system in which each application is a different user.By default, the system assigns each application a unique Linux user ID the ID is used only by the system and is unknown to the application. The system sets permissions for all the files in an application so that only the user ID assigned to that application can access them.Each process has its own virtual machine VM, so an application's code runs in isolation from other applications.By default, every application runs in its own Linux process. Android starts the process when any of the application's components need to be executed, then shuts down the process when it's no longer needed or when the system must recover memory for other applications.In this way, the Android system implements the principle of least privilege. That is, each application, by default, has access only to the components that it requires to do its work and no more. This creates a very secure environment in which an application cannot access parts of the system for which it is not given permission.However, there are ways for an application to share data with other applications and for an application to access system services:It's possible to arrange for two applications to share the same Linux user ID, in which case they are able to access each other's files. To conserve system resources, applications with the same user ID can also arrange to run in the same Linux process and share the same VM the applications must also be signed with the same certificate.An application can request permission to access device data such as the user's contacts, SMS messages, the mountable storage SD card, camera, Bluetooth, and more. All application permissions must be granted by the user at install time.That covers the basics regarding how an Android application exists within the system. The rest of this document introduces you to:1、The core framework components that define your application.2、The manifest file in which you declare components and required device features for your application.3、Resources that are separate from the application code and allow your application to gracefully optimize its behavior for a variety of device configurations.Application ComponentsApplication components are the essential building blocks of an Android application. Each component is a different point through which the system can enter your application. Not all components are actual entry points for the user and some depend on each other, but each one exists as its own entity and plays a specific role—each one is a unique building block that helps define your application's overall behavior.There are four different types of application components. Each type serves a distinct purpose and has a distinct lifecycle that defines how the component is created and destroyed.Here are the four types of application components:ActivitiesAn activity represents a single screen with a user interface. For example, an email application might have one activity that shows a list of new emails, another activity to compose an email, and another activity for reading emails. Although the activities work together to form a cohesive user experience in the email application, each one is independent of the others. As such, a different application can start any one of these activities if the email application allows it. For example, a camera application can start the activity in the email application that composes new mail, in order for the user to share a picture.An activity is implemented as a subclass ofand you can learn more about it in thedeveloper guide.ServicesA service is a component that runs in the background to perform long-running operations or to perform work for remote processes. A service does not provide a user interface. For example, a service might play music in the background while the user is in a different application, or it might fetch data over the network without blocking user interaction with an activity. Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it.A service is implemented as a subclass of and you can learn more about it in thedeveloper guide.Content providersA content provider manages a shared set of application data. You can store the data in the file system, an SQLite database, on the web, or any other persistent storage location your application can access. Through the content provider, other applications can query or even modify the data if the content provider allows it. For example, the Android system provides a content provider that manages the user's contact information. As such, anyapplication with the proper permissions can query part of the content provider such as to read and write information about a particular person.Content providers are also useful for reading and writing data that is private to your application and not shared. For example, the sample application uses a content provider to save notes.A content provider is implemented as a subclass ofand must implement a standard set of APIs that enable other applications to perform transactions. For more information, see the developer guide.Broadcast receiversAbroadcast receiveris a component that responds to system-wide broadcast announcements. Many broadcasts originate from the system—for example, a broadcast announcing that the screen has turned off, the battery is low, or a picture was captured. Applications can also initiate broadcasts—for example, to let other applications know that some data has been downloaded to the device and is available for them to use. Although broadcast receivers don't display a user interface, they mayto alert the user when a broadcast event occurs. More commonly, though, a broadcast receiver is just a "gateway" to other components and is intended to do a very minimal amount of work. For instance, it might initiate a service to perform some work based on the event.A broadcast receiver is implemented as a subclass of and each broadcast is delivered as an object. For more information, see the class.A unique aspect of the Android system design is that any application can start another application’s component. For example, if you want the user to capture a photo with the device camera, there's probably another application that does that and your application can use it, instead of developing an activity to capture a photo yourself. You don't need to incorporate or even link to the code from the camera application. Instead, you can simply start the activity in the camera application that captures a photo. Whencomplete, the photo is even returned to your application so you can use it. To the user, it seems as if the camera is actually a part of your application.When the system starts a component, it starts the process for that application if it's not already running and instantiates the classes needed for the component. For example, if your application starts the activity in the camera application that captures a photo, that activity runs in the process that belongs to the camera application, not in your application's process. Therefore, unlike applications on most other systems, Android applications don't have a single entry point there's nomainfunction, for example.Because the system runs each application in a separate process with file permissions that restrict access to other applications, your application cannot directly activate a component from another application. The Android system, however, can. So, to activate a component in another application, you must deliver a message to the system that specifies your intent to start a particular component. The system then activates the component for you.Activating ComponentsThree of the four component types—activities, services, and broadcast receivers—are activated by an asynchronous message called an intent. Intents bind individual components to each other at runtime you can think of them as the messengers that request an action from other components, whether the component belongs to your application or another.An intent is created with an object, which defines a message to activate either a specific component or a specific type of component—an intent can be either explicit or implicit, respectively.For activities and services, an intent defines the action to perform for example, to "view" or "send" something and may specify the URI of the data to act on among other things that the component being started might need to know. For example, an intent might convey a request for an activity to show an image or to open a web page. In some cases, you can start an activity to receive a result, in which case, the activity also returns the result in anfor example, you can issue an intent to let the user pick a personal contactand have it returned to you—the return intent includes a URI pointing to the chosen contact.For broadcast receivers, the intent simply defines the announcement being broadcast for example, a broadcast to indicate the device battery is low includes only a known action string that indicates "battery is low".The other component type, content provider, is not activated by intents. Rather, it is activated when targeted by a request from a. T he content resolver handles all direct transactions with the content provider so that the component that's performing transactions with the provider doesn't need to and instead calls methods on the object. This leaves a layer of abstraction between the content provider and the component requesting information for security.There are separate methods for activating each type of component:You can start an activity or give it something new to do by passing antoorwhen you want the activity to return a result.You can start a service or give new instructions to an ongoing service by passing anto. Or you can bind to the service by passing an to.You can initiate a broadcast by passing anto methods like,, or.You can perform a query to a content provider by calling on a.For more information about using intents, see the document. More information about activating specific components is also provided in the following documents:,,and.Declaring componentsThe primary task of the manifest is to inform the system about the application's components. For example, a manifest file can declare an activity as follows:In the element, the android:icon attribute points to resources for an icon that identifies the application.In theelement, theandroid:name at tribute specifies the fu lly qualified class name of the subclass and theandroid:label attributes specifies a string to use as the user-visible label for the activity.You must declare all application components this way:1、elements for activities2、elements for services3、elements for broadcast receivers4、elements for content providersActivities, services, and content providers that you include in your source but do not declare in the manifest are not visible to the system and, consequently, can never run. However, broadcast receivers can be either declared in the manifest or created dynamically in code as objects and registered with the system by calling.Declaring component capabilitiesAs discussed above, in, you can use anto start activities, services, and broadcast receivers. You can do so by explicitly naming the target component using the component class name in the intent. However, the real power of intents lies in the concept of intent actions. With intent actions, you simply describe the type of action you want to perform and optionally, the data upon which you’d like to perform the action and allow the system to find a component on the device that can perform the action and start it. If there are multiple components that can perform the action described by the intent, then the user selects which one to use.The way the system identifies the components that can respond to an intent is by comparing the intent received to the intent filters provided in the manifest file of other applications on the device.When you declare a component in your application's manifest, you can optionally include intent filters that declare the capabilities of the component so it can respond to intents from other applications. You can declare an intent filter for your component by adding an element as a child of the component's declaration element.For example, an email application with an activity for composing a new email might declare an intent filter in its manifest entry to respond to "send" intents in order to send email. An activity in your application can then create an intent with the “send” action, which the system matches to the email application’s “send” activity and launches it when you invoke the intent with.For more about creating intent filters, see thedocument.Declaring application requirementsThere are a variety of devices powered by Android and not all of them provide the same features and capabilities. In order to prevent your application from being installed on devices that lack features needed by your application, it's important that you clearly define a profile for the types of devices your application supports by declaring device and software requirements in your manifest file. Most of these declarations are informational only and the system does not read them, but external services such as Google Play do read them in order to provide filtering for users when they search for applications from their device.For example, if your application requires a camera and uses APIs introduced in Android7, you should declare these as requirements in your manifest file. That way, devices that do not have a camera and have an Android version lower than cannot install your application from Google Play.However, you can also declare that your application uses the camera, but doesnot require it. In that case, your application must perform a check at runtime to determineif the device has a camera and disable any features that use the camera if one is not available.Here are some of the important device characteristics that you should consider as you design and develop your application:Screen size and densityIn order to categorize devices by their screen type, Android defines two characteristics for each device: screen size the physical dimensions of the screen and screen density the physical density of the pixels on the screen, or dpi—dots per inch. To simplify all the different types of screen configurations, the Android system generalizes them into select groups that make them easier to target.The screen sizes are: small, normal, large, and extra large.The screen densities are: low density, medium density, high density, and extra high density.By default, your application is compatible with all screen sizes and densities, because the Android system makes the appropriate adjustments to your UI layout and image resources. However, you should create specialized layouts for certain screen sizes and provide specialized images for certain densities, using alternative layout resources, and by declaring in your manifest exactly which screen sizes your application supports with the element.For more information, see the document.Input configurationsMany devices provide a different type of user input mechanism, such as a hardware keyboard, a trackball, or a five-way navigation pad. If your application requires a particular kind of input hardware, then you should declare it in your manifest with the element. However, it is rare that an application should require a certain input configuration.Device featuresThere are many hardware and software features that may or may not existon a given Android-powered device, such as a camera, a light sensor, bluetooth, a certain version of OpenGL, or the fidelity of the touchscreen. You should never assume that a certain feature is available on all Android-powered devices other than the availability of the standard Android library, so you should declare any features used by your application with theelement.Platform VersionDifferent Android-powered devices often run different versions of the Android platform, such as Android or Android . Each successive version often includes additional APIs not available in the previous version. In order to indicate which set of APIs are available, each platform version specifies anfor example, Android is API Level 1 and Android is API Level 9. If you use any APIs that were added to the platform after version , you should declare the minimum API Level in which those APIs were introduced using theelement.It's important that you declare all such requirements for your application, because, when you distribute your application on Google Play, the store uses these declarations to filter which applications are available on each device. As such, your application should be available only to devices that meet all your application requirements.For more information about how Google Play filters applications based on these and other requirements, see the document.Application ResourcesAn Android application is composed of more than just code—it requires resources that are separate from the source code, such as images, audio files, and anything relating to the visual presentation of the application. For example, you should define animations, menus, styles, colors, and the layout of activity user interfaces with XML files. Using application resources makes it easy to update various characteristics of your applicationwithout modifying code and—by providing sets of alternative resources—enables you to optimize your application for a variety of device configurations such as different languages and screen sizes.For every resource that you include in your Android project, the SDK build tools define a unique integer ID, which you can use to reference the resource from your application code or from other resources defined in XML. For example, if your application c ontains an image file named saved in the res/drawable/ directory, the SDK tools generate a resource IDOne of the most important aspects of providing resources separate from your source code is the ability for you to provide alternative resources for different device configurations. For example, by defining UI strings in XML, you can translate the strings into other languages and save those strings in separate files. Then, based on a language qualifier that you append to the resource directory's name such as res/values-fr/ for French string values and the user's language setting, the Android system applies the appropriate language strings to your UI.Android supports many different qualifiers for your alternative resources. The qualifier is a short string that you include in the name of your resource directories in order to define the device configuration for which those resources should be used. As another example, you should often create different layouts for your activities, depending on the device's screen orientation and size. For example, when the device screen is in portrait orientation tall, you might want a layout with buttons to be vertical, but when the screen is in landscape orientation wide, the buttons should be aligned horizontally. To change the layout depending on the orientation, you can define two different layouts and apply the appropriate qualifier to each layout's directory name. Then, the system automatically applies the appropriate layout depending on the current device orientation.For more about the different kinds of resources you can include in your application and how to create alternative resources for various device configurations, see thedeveloper guide.安卓应用基础在Java编程语言编写的Android应用程序的Android的SDK工具编译代码以及与任何数据和到一个Android的包,一个归档文件档案资源的.apk后缀,所有的在一个单一的代码.apk文件被认为是一个应用程序,是Android的文件,供电设备来安装应用程序;一旦安装在设备上,每个Android应用程序的生命在它自己的安全沙箱:而Android操作系统是一个多用户Linux系统中,每个应用程序是一个不同的用户;默认情况下,每个应用程序的系统分配一个唯一的Linux用户ID该ID仅用于由系统是未知的应用程序,系统设置所有的应用程序中的文件权限,以便只有用户ID分配给该应用程序可以访问它们;每个进程都有它自己的虚拟机VM,因此应用程序的代码在从其他应用程序隔离运行;默认情况下,每个应用程序运行在它自己的Linux进程;Android的启动过程时,应用程序的任何组件需要被执行,然后关闭该进程时,它不再需要或恢复时,系统必须为其他应用程序的内存;这样一来,Android系统实现了最小特权原则,也就是说,每个应用程序,默认情况下,只能访问的组件,它需要做的工作,没有更多,这将创建一个非常安全的环境,使应用程序无法访问的,这就是它没有给予许可制度的部分;但是,有一个应用程序的方法与其他应用程序和应用程序访问系统服务的数据:这有可能为两个应用程序安排共享相同的Linux用户ID,在这种情况下,它们能够相互访问的文件;为了节约使用相同的用户ID系统资源,应用程序还可以安排运行在相同的Linux进程和共享同一个VM应用也必须使用相同的证书签名;应用程序可以请求访问权限,如用户的联系人,短信,可安装存储SD卡,摄像头,蓝牙等设备的数据,所有应用程序的权限必须由用户在安装时授予;这涵盖了基本就如何Android应用程序在系统中存在这个文件的其余部分向您介绍:1、框架的核心组件定义应用程序;2、清单文件中声明组件和应用程序所需的设备功能;3、资源是从应用程序代码分开,并允许您的应用程序正常优化的设备配置各种其行为;应用程序组件Application ComponentsAndroid的核心功能之一就是一个应用程序可以使用其它应用程序的元素如果那个应用程序允许的话;比如说,如果你的应用程序需要一个图片卷动列表,而另一个应用程序已经开发了一个合用的而又允许别人使用的话,你可以直接调用那个卷动列表来完成工作,而不用自己再开发一个;你的应用程序并没有吸纳或链接其它应用程序的代码,它只是在有需求的时候启动了其它应用程序的那个功能部分;为达到这个目的,系统必须在一个应用程序的一部分被需要时启动这个应用程序,并将那个部分的Java对象实例化;与在其它系统上的应用程序不同,Android应用程序没有为应用准备一个单独的程序入口比如说,没有main方法,而是为系统依照需求实例化提供了基本的组件;共有四种组件类型:活动Activities一个activity代表用户界面的一个独立屏幕;例如,一个邮件应用程序应该有一个activity 用于显示新邮件列表,另一个activity 用于撰写一封邮件,还有一个activity 用于读取邮件;尽管所有activitie 协同工作以构成邮件应用程序的用户体验,但彼此之间相对独立;应次,不同的应用程序能够从任何一个activity 启动只要邮件应用程序允许;例如,用户需要分享一张照片,一个拍照应用程序能够启动邮件应用程序的activity ;activity 是一个实现了的子类,你可以在开发者指导部分了解更多;服务Servicesservice是在后台运行,执行长时间操作或者执行远程操作; service 不提供用户界面;例如,当用户在另一个应用程序时,一个service 可在后台播放音乐,或者是从网络上获取数据,而不阻断用户与当前activity 的交互;其他组件,比如一个activity ,为了与该service 互动,可以启动或者绑定它;service是一个实现了的子类,你可以在开发者指导部分了解更多;广播接收器Broadcast receivers广播接收器是一个专注于接收广播通知信息,并做出对应处理的组件;很多广播是源自于系统代码的──比如,通知时区改变、电池电量低、拍摄了一张照片或者用户改变了语言选项;应用程序也可以进行广播──比如说,通知其它应用程序一些数据下载完成并处于可用状态;应用程序可以拥有任意数量的广播接收器以对所有它感兴趣的通知信息予以响应;所有的接收器均继承自基类;广播接收器没有用户界面;然而,它们可以启动一个activity来响应它们收到的信息,或者用来通知用户;通知可以用很多种方式来吸引用户的注意力──闪动背灯、震动、播放声音等等;一般来说是在状态栏上放一个持久的图标,用户可以打开它并获取消息;内容提供者Content providers内容提供者将一些特定的应用程序数据供给其它应用程序使用;数据可以存储于文件系统、SQLite数据库或其它方式;内容提供者继承于基类,为其它应用程序取用和存储它管理的数据实现了一套标准方法;然而,应用程序并不直接调用这些方法,而是使用一个对象,调用它的方法作为替代;ContentResolver可以与任意内容提供者进行会话,与其合作来对所有相关交互通讯进行管理;参阅独立的章节获得更多关于使用内容提供者的内容;每当出现一个需要被特定组件处理的请求时,Android会确保那个组件的应用程序进程处于运行状态,或在必要的时候启动它;并确保那个相应组件的实例的存在,必要时会创建那个实例;Android系统设计的一个独特方面是任何的一个程序都可以启动另一程序的组件;比如,你想让你的程序可以使用照相机拍照,如果已经有了实现这种功能的程序并且你你的程序能使用它有权限,那么你就没有再要再写一个新的Activity来实现这个功能;你的程序不需要包含或者链接这个拍照程序;相反,你只需要在你的程序中打开这个拍照程序中的实现拍照功能的Activity;当拍完之后,拍好的照片甚至会自动返回给你的程序;者对于用户来说,就好像是想拍照功能的程序就是你的这个程序的一部分一样;当系统启动一个组件之后,如果这个组件所在的程序之前没有运行的话,系统会自动开始这个程序的进程,并初始化这个组件所需要的相关类;比如,你的程序开启了一个拍照功能程序的Activity,这时系统会启动这个Activity所在的程序,所以这个Activity运行在拍照功能的程序当中,而不是在你的程序中;所以,不像其他操作系统的中的程序一样,Android程序没有一个单独的入口点比如没有我们常见的main函数;因为系统中的程序运行在自己的独立进程中,并且程序中的文件都有自己的限制其他程序访问的权限,所以,你的程序不能直接激活其他程序中的组件;但是Android系统就可以;具体是这样的实现的,为了激活activate其他程序中的组件,你必须向系统发送一个消息来详细说明你要启动其他组件的意图,这样系统才会为你激活这个组件;激活组件Activating Components四大组件中的三个组件——activities、services和broadcast receiver——是由一种叫intent的异步消息来激活的;这些intents在运行时runtime将这些属于你的程序或不同程序的单独的组件绑定在一起bind,你可以把这些intents看作是需要其他组件的action的messengers;一个intent就是一个Intent对象,这个intent定义了一种可以激活activate某个特定组件或者某种特定类型的组件,这两种情况分别对应两种intent的定义方式或者显示的或者隐式的;对于activities和services,一个intent定义了要执行的操作action比如,要“view”或者“send”什么和要操作的数据的URI;比如,一个intent可能会为一个activity传递一个请求来展示一张图片或者打开一个网页;有时,你可以启动一个activity来得到返回的结果,在这个例子中这个activity的返回的结果也是一个Intent比如,你可以发送一个intent让用户选择一个personal contact并返回给你——这个返回的intent就包含了一个指向用户选择的联系人的URI;关于activity和service的启动方式,下面将介绍;对于广播接收者来说,intent只是简单的定义了要广播的内容比如,一个用以表明电池电量很低的广播仅包含了一个表明电池电量很低的字符串;最后一种组件类型content provider并不是由intent来激活的activate;而是由接收到ContentResolver的请求时激活的;它们都各自有自己的方法来激活相应的组件:你可以通过传递一个Intent给startActivity或startActivityForResult启动一个activity或者给他一些新的要做的内容;使用startActivityForResult你将得到一个返回结果;你可以通过传递一个Intent给startService来start一个service或者给一个正在运行的service一些新的指令instructions;或者你可以通过把一个Intent传递给bindService来绑定一个service;你可以通过传递一个Intent给诸如sendBroadcast、sendOrderedBroadcast或者sendStickyBroadcast等方法来初始化一个广播;你可以通过调用ContentResolver的query方法来执行一次content provider的查询操作;更多的关于intent的内容,可以参看文档中的IntentsandIntentFilters;更多的关于激活特定组件的内容可以参看文档中的:Activities、Services、BroadcastReceiver、ContentProviders;关于Manifest文件在Android系统可以启动一个应用程序组件之前,Android系统必须通过读取这个程序的即manifest文件文件来确定要启动的组件存在;你的程序必须在这个manifest文件声明用到的所有的组件,并且这个manifest文件必须在项目的根目录下;另外,这个manifest文件还声明一些其他的东西,比如:确定这个程序需要的所有权限,比如Internet访问权限或者读取用户联系人权限;声明这个运行这个程序所需要的最低API版本,这个可以根据开发该程序所使用的API版本;声明该程序所需要的硬件或软件特征features,比如照相机、蓝牙服务或者多点触屏;声明该程序需要链接linkagainst的API库不是Andorid的frameworkAPIs,比如GoogleMapslibrary;组件声明Manifest文件的首要任务就是通知系统关于程序中要使用的组件;比如,一个manifest文件可以用如下的方式来声明一个activity:java1.<xml version=""2.encoding="utf-8">3.<manifest...>4.<application android:icon="drawable/"...>5.android:label="string/example_label"...>6.</activity>7....8.</application>9.</manifest>在<application>元素中,android:icon属性用于指定一个用于标示该程序的icon;在<activity>元素中,android:name属性用于确定这个扩展自Activity的子类的全路径名,android:label属性用于标示这个activity的对于用户可见的label;你必须要用以下方式来声明你的程序组件:1、activities:<activity>标签2、services:<service>标签3、broadcast receiver:<receiver>标签4、content providers:<provider>标签如果程序中用到activities、services和content providers,你没有在manifest文件中声明,那么这些组件将不会被系统知道,结果就是你的程序不能运行;然而,broadcast receiver既可以在manifest文件中声明也可以在代码中动态创建BroadcastReceiver,并通过调用registerReceiver在系统中注册;更多关于怎样为你的程序构建manifest文件,请参看文档The 文件;声明组件的能力正如在上面ActivatingComponents中讨论的那样,你可以使用一个Intent来启动activities、services和broadcastreceiver;你可以通过在intent中注明目标组件的名字使用的是组件的类名来显示的启动组件;然而,intents真正强大的地方在与关于intent 的actions的概念;通过intent的actions,你可以简单的描述你要执行的操作的类型并且可以有选择的描述你要处理的数据,可以允许系统在device中找到这个组件并启动它;如果有多个组件可以执行intent中描述的action,这时用户就可以选择一个来执行;系统可以识别能对某intent做出反应的方式是通过将接收到的intent和设备中其他程序的manifest文件的intent filters进行比较实现的;当你在程序的manifest文件中声明一个组件之后,你可以有选择包含intentfilters,这些intentfilters表明了组件对接收自其他程序的intent做出反应的能力capabilities;你可以通过添加一个<intent-filter>元素作为achildofthecomponent'sdeclarationelement 来为你的程序声明一个intentfilter;比如,在一个邮件程序中的一个activity可以编写新的邮件,这样的话你就需要在manifest文件中来声明一个intent filter来对“发送”intent响应为了发送邮件;这样,在你的程序中,一个activity就可以创建一个发送intentACTION_SEND,这样当你调用startaActivity时,系统就会匹配邮件程序中的发送activity并启动它;更多关于创建intentfilters的内容,可以参看IntentsandIntentFilter文档;声明运行程序所需的条件Andorid系统可以支持很多不同的设备,并且这些设备的性能特征并不相同;为了防止你的程序被安装在不能正常运行你的程序的较低android系统版本上,通过在manifest文件中声明你的程序支持的设备和软件,便变得尤其重要起来;大多数的这些声明仅是一些信息,而系统并不会读取它们,但是其他的服务比如Android Market 却会阅读这些声明来帮助通过通过自己的设备搜索软件的用户过滤软件;比如,你的程序需要照相机,并且使用的的APIs,那么你就必须在你的manifest文件中声明这些需要;这样的话,在Android Market上,没有照相机或者Android系统版本低于将不能安装你的程序;然而,如果你的程序不需要照相机,你仍可以声明你需要照相机;这种情况下,你的程序必须在运行时做一下检查,来检查这个设备是否含有照相机,如果没有照相机可用,则系统将会使使用照相机的相关程序不能用;下面是一些你在设计和开发你的程序时,必须要考虑的关于设备的一些重要方面:屏幕大小和分辨率:为了根据屏幕的类型进行分类,Android定义了两个特征:屏幕大小和分辨率;屏幕尺寸有:小,中,大,超大;屏幕分辨率类型:低分辨率,中分辨率,高分辨率,超高分辨率;默认情况下,你的程序可以兼容所有的屏幕尺寸和分辨率,因为Android系统对你的程序的UI布局和image资源做了适当的调整;输入方式:。

Context and Translation

Context and Translation

- 241 -校园英语 / 翻译研究Context and TranslationDalian Ocean University/Wang Jiajia Zhang Yonggang【Abstract 】Language is an indispensable part in our life. It is a tool for transmitting and a social phenomenon which used in certain environment. The relationship between translation and context are inseparable.【Key words 】context; translation; situational context; cultural context1. The Definition of ContextAs we all know, context plays an important role which refers to the status and condition when people talk to othersincluding time, place and situation. To a same word, it might be different if the word is said by different man in some occasions. Generally speaking. A single word or sentence has no specific meaning, only when it is used in a concrete context can express an accurate meaning.2. Classification and FunctionThere are various opinions for classification. Widely speaking, it can be divided into macro and micro context; From the perspective of linguistics, it can be divided into linguistic context and illocutionary context; From the perspective of sociology, it can be divided into subjective context and objective context; From the angle of literature, the context can be divided into discourse, situational context and cultural language. There are six functions below, Absolute Function, Restrictive Function, Explanation Function, Derived Function, Filtering Function, Compensation Function.3. Pay Attention to Original ContextCulture is the survival and development soil of language. The language rooted in different cultural soil has the culture of the society inevitably. Cultural context is the cultural and social background which a discourse involved. Original discourse is produced and propagated under the primitive society and cultural background, but its translation would propagate in the needed society or background of cultural communication. Language is the carrier of information, but also the carrier of culture and a reflection of the culture. Therefore, we should translate not only the surface of translation but also deep cultural meaning because language reflects the culture and subject to the constraints of culture. The same words can have different cultural meanings indifferent cultures.4. Cultural ContextDifferent nations have a different reflect to the world because of the geography, history, cultural environment they are in. All kinds of backgrounds make nations produce coverall cultural words.As the developed of society and cultural spreading, every nations ’ words change newer and newer. Due to nations ’ special cultural contents, traditions and psychology, two languages may express the same meanings although the form expressed widely different. The social and historical development of different nationalities, dynasties, historical allusions plays an important role in language development to the nations. So there are many language of words that contain a lot of specific characters and events to reflect the national history culture.5. Situational ContextSituational context refers to the language environment which discourse produced. There are three factors that affect language using in one situational context, namely field, tenor and mode. Translators must stick to the context, correctly understanding the source language message, adopt feasible translation strategy, and then language communication behavior can be completed smoothly.6. ConclusionIn English-Chinese translation, translator should understand the language situation, also need to grasp the different national cultural connotation of social culture to have an accurate understanding to adopt appropriate translation methods.References:[1]Bassnett-McGuire,S.Translation Studies[M].London and New York:Routledge,1991:26-30.[2]Nida,nguage,Culture and Translating[J].Shanghai: Shanghai Foreign Language Education Press,1993:58-60.[3]Nida,nguage,Culture and Translating[J].Shanghai: Shanghai Foreign Language Education Press,1993:152-160.[4]Malinowski,Bronislaw.Argonauts of the Western Pacific[M].London:Routledge,1923:96-99.Copyright©博看网 . All Rights Reserved.。

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Activity and Context for Mobile and Ubiquitous Computing UsersManasawee Kaenampornpan and Eamonn O’Neill Department of Computer Science University of Bath Bath BA2 7AY England {cspmk,eamonn}@ Abstract In order to have a principled approach to mobile and ubiquitous systems design, we need to understand the context in which the systems will be used. We discuss the impact of mobile and ubiquitous computing on users’ activities. We introduce Activity Theory as a tool to help us understand users’ activities in their context. We refine our framework by extending Activity Theory to capture history, which allows us better to understand users’ activities. 1. Introduction According to the Siemens Mobile Phones’ December 2003 Asian mobile lifestyle Mobile and ubiquitous computing is not limited to the use of small devices but also includes computing devices and services embedded in the environment. Thereforemobile and ubiquitous users are able to access different devices, both personal and public. For example, in the mobile and ubiquitous office, Malee can use her PDA to access client data in the office database while she is rushing off to meet a client. She requests a hard copy of the data to be printed at the nearest printer in the office so she can grab it on her way out. Several examples of a mobile and ubiquitous computing environment have been described in the past [Hopper et al., 1997; Selker and Yan, 2000]. However, there is a lack of a well established design method for developing mobile and ubiquitoussurvey, 52% of Thais perceive mobile phones as their “personality’s technology extension” [Eskola, 2004]. Mobile phones have become an integral part of our lives. This is notcomputing systems.A key factor inlimited to the use of mobile phones; small computer devices such as laptops and personal digital assistants (PDAs) have become very popular too. With newdeveloping a principled approach to mobile and ubiquitous systems design is tounderstand and design for the context in which the systems will be used. However, the research area of context [Chen and Kotz, 2000; Dey, 2001; Kaenampornpan andtechnology such as small computer devices and a wireless network, users are able to use computing devices anywhere and anytime – users are now living in a mobile and ubiquitous computing environment.O'Neill, 2004] is itself quite undeveloped and does not have well established methods and techniques. We propose Activity Theory[Engeström et al., 1999] as a framework for 1providing a better understanding of context in the design of mobile and ubiquitousconcern. From the Anan and Malee example, the obvious difference in the rules between situations in the office and at home is that, in the office, the rules of the company hold, such as no smoking in the office. At home, they are bound by marriage law and family rules such as Sunday is a household shopping day. To illustrate how the concepts of roles and rules have impact on human behaviour, the shopping example is shown in Table 1. The roles and rules have impact on what items Anan will buy as a secretary or as a husband even though he is doing his shopping at the same supermarket.Roles Shopping for an office party Shopping for a household Secretary Rules • Budget is 50,000THB • For 100 people • Budget is 1,500THB • For 4 peoplecomputing systems. 2. Impact on Human Everyday Life in a Mobile and Ubiquitous World From the example of Malee’s office situation, we can see that mobile and ubiquitous computing has an impact on our everyday lives. Mobile and ubiquitous users are no longer sitting at their desks using the same desktop PC in the same environment every day. This has implications for the ways in which users behave in their everyday lives. 2.1. Activities in Societies: Roles and Rules In the mobile and ubiquitous computing world, people use computing devices or services while they are on the move. Therefore their environments are changing all the time. In turn, their roles are constantly changing according to their currentHusbandTable 1 - Shopping example for Anan in different contexts2.2. Multiple Tools In addition to constantly changing roles and rules, mobile and ubiquitous users may use various tools. User may have more than one personal device such as a PDA, laptop or mobile phone. A particular device will be chosen by the user to suit his/her current activity. For example, when Malee is alone in her office and has to set a reminder, she chooses to make a note in her PDA as it is easy to do and, unlike her laptop, the PDA is small enough to be taken everywhere with her. While she has a meeting with hercommunity and environment. For example, Malee works as a manager at a company where Anan is her secretary. Here Anan has to prepare documents and arrange meetings for Malee using his PDA. However, at home, they are husband and wife. Anan uses the PDA to plan family expenses or the household shopping list. From this example, we see that their roles change according to the context in which they find themselves. The concept of roles is not the only concern when users are performing their activities while they are in differentsecretary in her office, she decides to make notes on a desktop PC with a large display socommunities. The concept of rules is another 2that her secretary can simultaneously see the notes. In addition to multiple personal devices, users may be able to use publicly available devices and services. Examples include asuggest that a relatively simple model of the influences on users’ activities will be adequate for representing context in the design of a mobile and ubiquitous system. Moreover, a simple model has the additional advantage that it is easy to use by the designers of the system. We have chosen to use Activity Theory as a framework to understand users’shared printer and database that are used by Anan, Malee or anyone in the office with a valid permission. 3. Activity Theory Background With the new experiences that users are facing in the mobile and ubiquitouscontextualised activities.The reason forusing Activity Theory is that it uses a simple standard form to represent concepts such as roles, rules and tools, which we noted in section 2 have important impacts on users’ activities. Moreover, Activity Theory alsocomputing world, HCI researchers have to face a new challenge in improving the usability of mobile and ubiquitous systems. In order to derive principled design methods for developing mobile and ubiquitousmaps the relationships amongst the elements that it identifies as having an influence on human activity. Activity Theory was developed bycomputing systems, we need to understand the context in which such systems will be used. This means that we need to understand what elements have impact on users in performing their activities in the mobile and ubiquitous world. understand the Humans cannot fully full moment-to-momentRussian psychologists Vygotsky, Rubinshtein, Leont'ev and others beginning in the 1920s [Kaptelinin and Nardi, 1997]. ActivityTheory is a philosophical framework used to conceptualize human activities. [Engeström et al., 1999] proposed a triangular model of human activity as shown in Figure 1. This full triangular structure is an expansion of therichness of other humans’ activities, states, goals and intentions. Yet they managesuccessfully and fluently to interact in many highly contextualised ways. Therefore weFigure 1 - Triangular structure of human activity introduced by Engeström et al. [1999]3individual activity model introduced by Vygotsky. The individual activity modelRules: Explicit or implicit regulations, norms and conventions that constrain action or interaction. Object: Target of the activity within the system: subject’s intention or objective (outward goal, concrete purpose, orrepresents the most basic concepts and relationships: accomplishing a subject oriented using To to a thissomeobject tool.historically-constructedindividual activity model, community was added, resulting in more relationships: the subject related to his/her community via rules and the community related to the object via the division of labour. The main concepts of the full triangular structure model are: Subject: Information about the individual or subgroup chosen as the point of view in the analysis. Tools: Information about tools, which means either psychological or physical tools. Community: Information about individuals or subgroups who share the same object. Division of labour: The division of tasks between members of the community.objectified motive). Outcome: The result of the subject’sactivities, which may or may not achieve the object. 4. Applying Activity Theory in Designing Mobile and Ubiquitous Computing In this section, the Malee’s office example is used to show how Activity Theory can be used as a design tool by designers to understand the important elements in users’ activities. Figure 2 shows the scenario when Malee has to access the database and print the customer data using the closest printer on her way out to meet the customer. ActivityTheory is used as a framework to develop a unified model of the elements that influenceFigure 2 - Malee is trying to print customer data on her way out of the office4Malee’s activities in this situation.ForIn developing a model of the user’s context, we first collect information on each element in the Activity Theory model. This information may be collected from sensors or databases. At this stage, the Activity Theory model (Figure 1) is used as a guide for the designers to what types of information to take into account. Secondly, this information is used to model the context of the user’s current activity (S0). This model does not include the user’s intention or goal (S1), as we cannot sense such information. Thirdly, the context model references the history, which records the user’s context in achieving his/her goals in the past, in order better to infer the user’s current goal. This results in a refined context model that includes an understanding of the user’s goal or Object (in Activity Theory terms); see Figure 4. In the Malee’s office example, she has a meeting with the same client at the same time every week. The designers use the extendedexample, through the Tools element in Activity Theory, we can focus on information about the printers that are closest to the exit and information about availability of the network. Figure 1 shoes that Activity Theory allows us to capture information about the current situation, (S0) and the outcome (Se) once the activity is performed. However, it does not provide an adequate account of a user’s current object or intention (S1). People often refer to experiences in the past while performing their current activity. Therefore, we have extended Activity Theory by adding the concept of History, illustrated in Figure 3. History is modelled as a set of states in the past. Each past state is represented as anActivity Theory model, which captures the context of past activities. This information includes the initial state (S0), intention (S1) and outcome (Se) of the activity.Figure 3 - Extending Activity Theory to represent history5Figure 4 – Refining context modelsframework to develop a better understanding about her current activity by first collecting information on each element in the Activity Theory model. Secondly, the information is organised as shown in Figure 2. At this point we do not know Malee’s current goal (S1) or the outcome (Se). Thirdly, the context model references the history, which records Malee’s context in achieving her goals in the past. This allows the system to infer her current goal. As a result, the system is able toEngeström, Y., Miettinen, R. and Punamäki, R.-L., Eds. (1999). Perspectives on Activity Theory. Activity Theory and Individual and Social Transformation, Cambridge University Press. Eskola, M. (2004) TheFeature: It's all about the mobile internet: Not without my handy, /user/malathy/jour nalentry?id=533 Last Access: 19 November 2004. Hopper, A., Jones, A. and Ward, A. (1997). "A New Location Technique for the Active Office." IEEE Personnel Communications 4(5), 42-47. Kaenampornpan, M. and O'Neill, E. (2004). Modelling context: an Activity Theory approach. Ambient Intelligence: Second European Symposium, EUSAI 2004, Eindhoven, The Netherlands, Springer, 367374. Kaptelinin, V. and Nardi, B. (1997). Activity Theory: Basic Concepts and Application. CHI 1997 Tutorials, Los Angeles. Selker, T. and Yan, H. (2000). Context-Aware Office Assistant. Proc. of Int. Conf. on Intelligent User Interfaces (IUI 2000), New Orleans, LA, ACM Press, 276-279.provide the service to Malee without her undertaking all the input explicitly on her PDA. This reduction in the need for explicit input can contribute to the design of more usable, context aware applications for mobile and ubiquitous computing users. References Chen, G. and Kotz, D. (2000) A Survey of Context-Aware Mobile Computing Research Dartmouth College, Department of Computer Science, Technical report TR2000-381. Dey, A. K. (2001) Understanding and Using Context, Personal and Ubiquitous Computing 5(1), 4-7.6。

相关文档
最新文档