关闭

关闭

关闭

封号提示

内容

首页 Jess in Action-Rule-Based Systems in Java

Jess in Action-Rule-Based Systems in Java.pdf

Jess in Action-Rule-Based Syste…

hrictx
2010-12-18 0人阅读 0 0 0 暂无简介 举报

简介:本文档为《Jess in Action-Rule-Based Systems in Javapdf》,可适用于IT/计算机领域

INACTIONRuleBasedSystemsinJavaMANNINGFriedmanHillJESSINACTIONMANNINGMANNING$US$CanadawwwmanningcomfriedmanhillAuthorrespondstoreaderquestionsEbookeditionavailableAUTHOR✔ONLINE✔,!IBDbbaijc!:pOTtpISBNErnestFriedmanHillImagineadifferentwaytoprograminwhichyouspecifyrulesandfactsinsteadoftheusuallinearsetofinstructionsThat’stheideabehindrulebasedprogrammingAruleengineautomaticallydecideshowtoapplytherulestoyourfactsandhandsyoutheresultThisapproachisidealforexpressingbusinessrulesandisincreasinglyusedinenterprisecomputingJessisapopularruleenginewritteninJavaIt’ssupportedbySandiaLabsandhasanactiveonlinecommunityIfyouhaveaproblemthatcanbesolvedwithrules,JessinActionwillshowyouhow(Ifyouarenotsure,readchapter)WrittenbythecreatorofJess,thisbookisanaccessibleandpracticalguidetorulebasedsystemdevelopmentinJavaJessinActionfirstintroducesruleprogrammingconceptsandteachesyoutheJesslanguageArmedwiththisknowledge,youthenprogressthroughaseriesoffullydevelopedapplicationschosentoexposeyoutopracticalrulebaseddevelopmentThebookshowsyouhowyoucanaddpowerandintelligencetoyourJavasoftwareWhat’sInside■Introductiontorulebasedthinking■Jesslanguagetutorial■Completeexamplesof◆Taxformsadvisor◆Diagnosticassistant◆Fuzzylogiccontroller◆Webagent◆JEEappsDrFriedmanHillisthedeveloperofJessAPrincipalMemberoftheTechnicalStaffatSandiaNationalLaboratories,helivesinGaithersburg,MD“clear,crisp,wellfocusedtheorganizationissmooth,wellthoughtout,thisbookrocks”TedNeward,AuthorServerBasedJavaProgramming“theJessbookAnicebalancebetweenanintroductionandareference”JohnDMitchell,CoauthorMakingSenseofJava“FriedmanHillwritesclearlyThetopiciscomplicated,andhedoesanexcellentjobexplainingitIrecommendthisbook”RoedyGreen,AuthorTheJavaGlossary“intuitiveandcleverexamplesthatshowthereaderhowtobuildintelligentJavaapplicationswithJess”RobertBTrelease,PhDUCLABrainResearchInstituteFREEBIES•BinaryversionofJess*•CompleteexamplesonthewebEXPERTSYSTEMSJAVAJESSINACTIONRuleBasedSystemsinJavaErnestFriedmanHill*FornoncommercialuseJessinActionJessinActionRuleBasedSystemsinJavaERNESTFRIEDMANHILLMANNINGGreenwich(°wlong)ForonlineinformationandorderingofthisandotherManningbooks,gotowwwmanningcomThepublisheroffersdiscountsonthisbookwhenorderedinquantityFormoreinformation,pleasecontact:SpecialSalesDepartmentManningPublicationsCoBruceParkAvenueFax:()Greenwich,CTemail:ordersmanningcom©byManningPublicationsCoAllrightsreservedNopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmitted,inanyformorbymeanselectronic,mechanical,photocopying,orotherwise,withoutpriorwrittenpermissionofthepublisherManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthebook,andManningPublicationswasawareofatrademarkclaim,thedesignationshavebeenprintedininitialcapsorallcapsRecognizingtheimportanceofpreservingwhathasbeenwritten,itisManning’spolicytohavethebookstheypublishprintedonacidfreepaper,andweexertourbesteffortstothatendManningPublicationsCoCopyeditor:TiffanyTaylorBruceParkAvenueTypesetter:SydBrownGreenwich,CTCoverdesigner:LeslieHaimesISBNPrintedintheUnitedStatesofAmerica–VHG–TomyfamilyPARTINTRODUCINGRULEBASEDSYSTEMS■Rulestotherescue■WhatarerulebasedsystemsbriefcontentsviiPARTJESS:ARULEBASEDPROGRAMMINGENVIRONMENT■IntroducingJess■GettingstartedwiththeJesslanguage■ScriptingJavawithJess■RepresentingfactsinJess■WritingrulesinJess■Underthehood:howJessworksviiiBRIEFCONTENTSPARTCREATINGYOURFIRSTRULEBASEDAPPLICATION:THETAXFORMSADVISOR■Collectingtheknowledge■Designingtheapplication■WritingtheapplicationPARTWRITINGADIAGNOSTICAPPLICATION:THEPCREPAIRASSISTANT■WritingthePCRepairAssistant■AddingagraphicalinterfacePARTREASONINGABOUTREALITY:THEHVACCONTROLLER■Therealityconnection■ExtendingtheJesslanguage■WritingtherulesPARTTEKMARTCOM:RULEBASEDAPPLICATIONSFORTHEWEB■JessontheWeb■EmbeddingJessinJavaapplications■DeployingwebbasedapplicationsPARTENTERPRISESYSTEMS■Jess,XML,andtheenterprise■JessintheJEEenvironmentA■JessfunctionsB■AbridgedJavaAPIforJessC■AnautomatedtestingframeworkprefacexxiacknowledgmentsxxiiiaboutthisbookxxviauthoronlinexxixaboutthetitlexxxaboutthecoverillustrationxxxiPARTINTRODUCINGRULEBASEDSYSTEMScontentsixRulestotherescueMathclassmeleeBeyondlogicpuzzlesSomerealworldexamplesMailfiltering■ProductconfigurationImplementingbusinessrulesSummaryWhatarerulebasedsystemsThecookingdrivingrobotDeclarativeprogramming:adifferentapproachRulesandruleenginesExpertsystemsxCONTENTSArchitectureofarulebasedsystemTheinferenceengine■TherulebaseTheworkingmemory■ThepatternmatcherTheagenda■TheexecutionengineDevelopingrulebasedsystemsKnowledgeengineering■StructuringdataTesting■InterfacebuildingWritingtherules■IterativedevelopmentRuleenginestandardsSummaryPARTJESS:ARULEBASEDPROGRAMMINGENVIRONMENTIntroducingJessTheJessruleengineObtainingJess■InstallingJessRunningJess■“Hello,World”JessapplicationsCommandline,GUI,orembeddedJessperformanceSummaryGettingstartedwiththeJesslanguageThebasicsWhitespace■SymbolsThejessValueclass■NumbersStrings■CommentsAddingsomestructureLists■CallingfunctionsVariables■MoreaboutlistsControlflowforeach■while■ifthenelseprogn■apply■evalandbuildDefiningfunctionswithdeffunctionLatebindingCONTENTSxiFinetuningafunction’sbehaviorTakemyadvice,pleaseSummaryScriptingJavawithJessCreatingJavaobjectsCallingJavamethodsNestingfunctioncalls,andashortcutCallingstaticmethodsCallingsetandgetmethodsWorkingwitharraysHowJesschoosesamongoverloadedmethodsAccessingJavamemberdataWorkingwithexceptionsSummaryRepresentingfactsinJessJess’sworkingmemoryManipulatingtheworkingmemoryJustthefacts,ma’amUnorderedfactsThedeftemplateconstruct■DefaultslotvaluesMultislots■ChangingslotvalueswithmodifyCopyingfactswithduplicateOrderedfactsShadowfactsJessandJavaBeans■JavaBeanshave“slots”AnexampleJavaBean■CreatingadeftemplateforDimmerSwitch■PuttingaDimmerSwitchintoworkingmemory■StaticvsdynamicshadowfactsAddingPropertyChangeListenersupporttoDimmerSwitchShadowfactsandworkingmemoryfunctionsSummaryxiiCONTENTSWritingrulesinJessForwardchainingrulesPatternsandshadowfactsConstrainingslotdataLiteralconstraints■VariablesasconstraintsConnectiveconstraints■Constrainingmatcheswithpredicatefunctions■ReturnvalueconstraintsPatternbindingsQualifyingpatternswithconditionalelementsTheandconditionalelement■Theorconditionalelement■ThenotconditionalelementThetestconditionalelementThelogicalconditionalelementBackwardchainingrulesManagingtheagendaConflictresolutionChangingruleprioritywithsaliencePartitioningtherulebasewithdefmoduleDefiningconstructsinmodulesModules,scope,andnameresolutionModulefocusandexecutioncontrolSearchingworkingmemorywithdefqueryThevariabledeclaration■QuerytriggerfactsThecountqueryresultsfunctionBackwardchainingandqueriesSummaryUnderthehood:howJessworksReviewoftheproblemAninefficientsolutionTheRetealgorithmHowReteworks■HandlingretractEasyoptimizationsforRetePerformanceoftheRetealgorithmNodeindexhashvalueCONTENTSxiiiMorecomplexityandinitialfactImplementingthenotconditionalelementImplementingthetestconditionalelementImplementingbackwardchainingExploringtheRetenetworkinJessThe(watchcompilations)commandTheviewfunction■ThematchesfunctionSummaryPARTCREATINGYOURFIRSTRULEBASEDAPPLICATION:THETAXFORMSADVISORCollectingtheknowledgeTheTaxFormsAdvisorIntroductiontoknowledgeengineeringWheredoyoustart■InterviewsDeskresearchCollectingknowledgeabouttaxformsAninterview■ReviewingtheformsNextstepsSummaryDesigningtheapplicationOrganizingthedataFillingindetailsDefaultslotvaluesMoretemplatesTemplatesyoudon’tneedOrganizingtherulesBuildingtheinfrastructureSimpletextbasedIOFetchingthequestiontextSummaryxivCONTENTSWritingtheapplicationWelcomingtheuserTestingthestartupmoduleAskingtheuserquestionsIncomeanddependentsDealingwithspecialcircumstancesTestingtheinterviewmoduleRecommendingformsExplainingtheresultsTestingthereportmoduleFinishingtouchesTestingthefullapplicationSummaryPARTWRITINGADIAGNOSTICAPPLICATION:THEPCREPAIRASSISTANTWritingthePCRepairAssistantUsingflowchartsinknowledgeengineeringFromflowchartstorulesTheproblemdomainWritingthefirstrulesAskingquestionswithbackwardchainingCheckingtheanswersModifyingtheaskmoduleTherestoftherulesRulesaboutsound■DegradinggracefullyToboot,ornottoboot■RAMproblemsQuestioningauthorityTestingSummaryCONTENTSxvAddingagraphicalinterfaceGettingstartedDisplayingawindowDisplayingquestionsGettinganswersThemainthreadvstheeventthreadBetterinputcomponentsFinishingtouchesTestingtheinterfaceSummaryPARTREASONINGABOUTREALITY:THEHVACCONTROLLERTherealityconnectionThesystemDefiningthehardwareinterfaceNativemethods■WritingasimulatorSimulatinggetTemperatureAddingagraphicalinterfaceWritingtheJavaBeansRulesaboutThermometersWritingtheotherBeansJavaBeansandserializationSummaryExtendingtheJesslanguageTheUserfunctioninterfaceThegetNamemethod■ThecallmethodLoadingaUserfunctionintoJessHandlingargumentsHowmanyarguments■UsingargumentsResolvingvariableargumentsResolvingfunctioncallargumentsxviCONTENTSReturningavalueConstructingValueobjectsBeyondsimpleexamplesHoldingstate■MultiplepersonalitiesUserfunctionsandserializationGroupingfunctionswithUserpackageTheHVACfunctionsCreatingasimulator■CountingdevicesMatchingheatpumpsandfloorsOperatingthehardwareImplementingaUserpackageTestingSummaryWritingtherulesThecontrolalgorithmKnowledgeengineeringwithtruthtablesHowheatpumpswork■UsingguardlinesSavingenergySettingupControllingtheheatpumpsEnoughisenough■ThemomentoftruthControllingtheventsTheventrulesTestingthewholesystemControllingwithfuzzyrulesFuzzylogic,briefly■TheFuzzyHVACControllerExploringthefuzzycontrollerWhat’snextSummaryCONTENTSxviiPARTTEKMARTCOM:RULEBASEDAPPLICATIONSFORTHEWEBJessontheWebJavaarchitecturesfortheWebFatclientapplications■ThinclientapplicationsAJessapplicationfortheWebKnowledgeengineeringDesigningdatastructuresWritingtherulesAbouttesting■TherecommendrequirementsruleRecommendingvideosandDVDs■Conspicuousconsumption■MoremediarulesRefiningtherecommendationsSomeusefulqueriesMaintainingtheordernumberCleaningupSummaryEmbeddingJessinJavaapplicationsGettingstartedwiththeJesslibraryTheexecuteCommandmethodExchangingJavaobjectsBeyondexecuteCommandWorkingwithFactobjectsinJavaMultislots■OrderedfactsRemovingfactsWorkingwithJavaBeansCallingJessfunctionsfromJavaWorkingwithJessExceptionNestedexceptions■RollingyourownInputandoutputUsingcustomroutersSummaryxviiiCONTENTSDeployingwebbasedapplicationsTheJavaServletAPIJEEandtheTomcatengineDeployingtheHelloservletYourfirstJessservletDeployingtheJessservlet■CleaninguptheURLApplicationarchitecture:takeoneStartingtheCatalogservletJavaServerPages■ForwardingtoaJSPApplicationarchitecture,taketwoTheloginscreenTheCatalogservletInitializingJess■GettingtheloginnameStartingausersession■QueryingtheproductlistInvokingtheJSP■ThecatalogJSPTestingTheRecommendservletGettingstarted■CreatingtheorderGettingtherecommendationsForwardingtoJSPsTherecommendJSPThePurchaseservletPersistenceDeployingtheapplicationWhat’snextSummaryPARTENTERPRISESYSTEMSJess,XML,andtheenterpriseEnterpriseapplicationsWhatistheJEE■WhatdoesthatstandforCONTENTSxixRulesandXMLInteroperability■EditingandotherprocessingStorageandretrievalXMLbasedrulerepresentationsRuleML■DAMLHomegrownrepresentationsStrategiesforrepresentingrulesinXMLRepresentingJessrulesinXMLAnexamplerule■TransformingtheXMLrulesintoJessrulesRuleeditorsSummaryJessintheJEEenvironmentAquicktourofEJBconceptsKindsofEJBsnEJBrestrictionsDoyouneedtouseEJBsAccessingexternalresourcesfromEJBsAnRMIbasedruleserverTheremoteinterfaces■Implementingtheinterfaces■ImplementingamainmethodGeneratingthestubs■AsampleclientFinalpolishingJSR:thejavaxrulesAPIWorkingwithjavaxrulesThereferenceimplementationSummaryAJessfunctionsBAbridgedJavaAPIforJessCAnautomatedtestingframeworkindexprefaceIn,IwasworkingintheScientificComputingdepartmentatSandiaNationalLaboratoriesinLivermore,CaliforniaWehadanimpressive(forthetime)arrayofheterogeneouscomputingequipment:workstationsfromSiliconGraphicsandSunMicrosystems,IntelPCsrunningLinux,MacintoshesgaloreIwaswritingsoftwareagentsthatmanageddynamicallydistributedcomputationsacrossthisnetworkAgentswererunningoneachmachine,andtheyusedasortof“postandbid”methodtodecidewhichmachineswouldrunwhichpieceofacomputation,basedonmachinecapabilitiesandloadbalancingTheagentswerefairlyintelligentintheirdecisionmakingcapabilities,andtheplanstheydevelopedweresometimessurprisingTheir“brains”wereruleenginessoftwaresystemsthatusedrulestoderiveconclusionsfrompremisesxxiThatprojectledtoothers,andsoonIdevelopedaninterestinmobileagentssoftwareentitiesthatcantravelfromnodetonodeinacomputernetwork,maintainingtheirstateastheygoThuswasborntheideaforaruleenginewhosestatecouldbepackagedup,sentacrossawire,andreconstitutedThenewlyreleasedJavalanguageseemedtobeaperfectvehicleforthisruleengineandsuchwastheoriginofJess™,theruleenginefortheJavaPlatformJessisageneralpurposeruleengine,developedatSandiaNationalLaboratoriesWrittenintheJavaprogramminglanguage,JessofferseasyintegrationwithJessisaregisteredtrademarkoftheSandiaCorporationxxiiPREFACEotherJavabasedsoftwareJessisfreeforacademicandgovernmentuse,anditcanbelicensedforcommercialuseYoucandownloadafullyfunctionalHomeEditionofJessfreeofchargeifyouownacopyofthisbook(seechapterfordownloadinstructions)YoucanusetheJessHomeEditionfornoncommercialpurposesJesshasevolvedquiteabitsinceitsoriginalintroductionin,largelyinresponsetofeedbackfromaglobalusercommunityI’veenjoyedworkingonJessthewholetime,andlookforwardtoitscontinuingevolutioninthefutureacknowledgmentsWritingabookisahugeprojectThisismysecondbook,andsomehowIthoughtitwouldbeeasierthistimearoundItwasn’tTheoriginalfourmonthestimatetowritethemanuscripthasstretchedoutintomuchmorethanayearI’mveryhappywiththeresults,thoughWritingabookaboutasubjectsonearanddearasJessistomeisadodgybusiness:IthinkI’vesteeredclearoftheminefieldsofselfindulgenceandcreatedsomethingthatwillbeusefultoeveryoneinterestedinrulebasedsoftwareWritingabookissuchahugeproject,inanyevent,thatnoonedoesitaloneleastofallmeI’vehadhelpfrommanykind,generous,andtalentedpeopleduringthewholetimethisbookwasbeingdevelopedOnestandouthasbeenBobOrchardofCanada’sNationalResearchCouncilxxiiiBobistheauthoroftheFuzzyJtoolkitandtheFuzzyJessexten

用户评价(0)

关闭

新课改视野下建构高中语文教学实验成果报告(32KB)

抱歉,积分不足下载失败,请稍后再试!

提示

试读已结束,如需要继续阅读或者下载,敬请购买!

评分:

/49

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部

举报
资料