关闭

关闭

关闭

封号提示

内容

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

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

Jess in Action-Rule-Based Syste…

上传者: hrictx 2010-12-18 评分 0 0 0 0 0 0 暂无简介 简介 举报

简介:本文档为《Jess in Action-Rule-Based Systems in Javapdf》,可适用于IT/计算机领域,主题内容包含INACTIONRuleBasedSystemsinJavaMANNINGFriedmanHillJESSINACTIONMANNINGMANNIN符等。

INACTIONRuleBasedSystemsinJavaMANNINGFriedmanHillJESSINACTIONMANNINGMANNING$US$CanadawwwmanningcomfriedmanhillAuthorrespondstoreaderquestionsEbookeditionavailableAUTHORONLINE,!IBDbbaijc!:pOTtpISBNErnestFriedmanHillImagineadifferentwaytoprograminwhichyouspecifyrulesandfactsinsteadoftheusuallinearsetofinstructionsThat’stheideabehindrulebasedprogrammingAruleengineautomaticallydecideshowtoapplytherulestoyourfactsandhandsyoutheresultThisapproachisidealforexpressingbusinessrulesandisincreasinglyusedinenterprisecomputingJessisapopularruleenginewritteninJavaIt’ssupportedbySandiaLabsandhasanactiveonlinecommunityIfyouhaveaproblemthatcanbesolvedwithrules,JessinActionwillshowyouhow(Ifyouarenotsure,readchapter)WrittenbythecreatorofJess,thisbookisanaccessibleandpracticalguidetorulebasedsystemdevelopmentinJavaJessinActionfirstintroducesruleprogrammingconceptsandteachesyoutheJesslanguageArmedwiththisknowledge,youthenprogressthroughaseriesoffullydevelopedapplicationschosentoexposeyoutopracticalrulebaseddevelopmentThebookshowsyouhowyoucanaddpowerandintelligencetoyourJavasoftwareWhat’sInsideIntroductiontorulebasedthinkingJesslanguagetutorialCompleteexamplesofTaxformsadvisorDiagnosticassistantFuzzylogiccontrollerWebagentJEEappsDrFriedmanHillisthedeveloperofJessAPrincipalMemberoftheTechnicalStaffatSandiaNationalLaboratories,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:ordersmanningcombyManningPublicationsCoAllrightsreservedNopartofthispublicationmaybereproduced,storedinaretrievalsystem,ortransmitted,inanyformorbymeanselectronic,mechanical,photocopying,orotherwise,withoutpriorwrittenpermissionofthepublisherManyofthedesignationsusedbymanufacturersandsellerstodistinguishtheirproductsareclaimedastrademarksWherethosedesignationsappearinthebook,andManningPublicationswasawareofatrademarkclaim,thedesignationshavebeenprintedininitialcapsorallcapsRecognizingtheimportanceofpreservingwhathasbeenwritten,itisManning’spolicytohavethebookstheypublishprintedonacidfreepaper,andweexertourbesteffortstothatendManningPublicationsCoCopyeditor:TiffanyTaylorBruceParkAvenueTypesetter:SydBrownGreenwich,CTCoverdesigner:LeslieHaimesISBNPrintedintheUnitedStatesofAmerica–VHG–TomyfamilyPARTINTRODUCINGRULEBASEDSYSTEMSRulestotherescueWhatarerulebasedsystemsbriefcontentsviiPARTJESS:ARULEBASEDPROGRAMMINGENVIRONMENTIntroducingJessGettingstartedwiththeJesslanguageScriptingJavawithJessRepresentingfactsinJessWritingrulesinJessUnderthehood:howJessworksviiiBRIEFCONTENTSPARTCREATINGYOURFIRSTRULEBASEDAPPLICATION:THETAXFORMSADVISORCollectingtheknowledgeDesigningtheapplicationWritingtheapplicationPARTWRITINGADIAGNOSTICAPPLICATION:THEPCREPAIRASSISTANTWritingthePCRepairAssistantAddingagraphicalinterfacePARTREASONINGABOUTREALITY:THEHVACCONTROLLERTherealityconnectionExtendingtheJesslanguageWritingtherulesPARTTEKMARTCOM:RULEBASEDAPPLICATIONSFORTHEWEBJessontheWebEmbeddingJessinJavaapplicationsDeployingwebbasedapplicationsPARTENTERPRISESYSTEMSJess,XML,andtheenterpriseJessintheJEEenvironmentAJessfunctionsBAbridgedJavaAPIforJessCAnautomatedtestingframeworkprefacexxiacknowledgmentsxxiiiaboutthisbookxxviauthoronlinexxixaboutthetitlexxxaboutthecoverillustrationxxxiPARTINTRODUCINGRULEBASEDSYSTEMScontentsixRulestotherescueMathclassmeleeBeyondlogicpuzzlesSomerealworldexamplesMailfilteringProductconfigurationImplementingbusinessrulesSummaryWhatarerulebasedsystemsThecookingdrivingrobotDeclarativeprogramming:adifferentapproachRulesandruleenginesExpertsystemsxCONTENTSArchitectureofarulebasedsystemTheinferenceengineTherulebaseTheworkingmemoryThepatternmatcherTheagendaTheexecutionengineDevelopingrulebasedsystemsKnowledgeengineeringStructuringdataTestingInterfacebuildingWritingtherulesIterativedevelopmentRuleenginestandardsSummaryPARTJESS:ARULEBASEDPROGRAMMINGENVIRONMENTIntroducingJessTheJessruleengineObtainingJessInstallingJessRunningJess“Hello,World”JessapplicationsCommandline,GUI,orembeddedJessperformanceSummaryGettingstartedwiththeJesslanguageThebasicsWhitespaceSymbolsThejessValueclassNumbersStringsCommentsAddingsomestructureListsCallingfunctionsVariablesMoreaboutlistsControlflowforeachwhileifthenelseprognapplyevalandbuildDefiningfunctionswithdeffunctionLatebindingCONTENTSxiFinetuningafunction’sbehaviorTakemyadvice,pleaseSummaryScriptingJavawithJessCreatingJavaobjectsCallingJavamethodsNestingfunctioncalls,andashortcutCallingstaticmethodsCallingsetandgetmethodsWorkingwitharraysHowJesschoosesamongoverloadedmethodsAccessingJavamemberdataWorkingwithexceptionsSummaryRepresentingfactsinJessJess’sworkingmemoryManipulatingtheworkingmemoryJustthefacts,ma’amUnorderedfactsThedeftemplateconstructDefaultslotvaluesMultislotsChangingslotvalueswithmodifyCopyingfactswithduplicateOrderedfactsShadowfactsJessandJavaBeansJavaBeanshave“slots”AnexampleJavaBeanCreatingadeftemplateforDimmerSwitchPuttingaDimmerSwitchintoworkingmemoryStaticvsdynamicshadowfactsAddingPropertyChangeListenersupporttoDimmerSwitchShadowfactsandworkingmemoryfunctionsSummaryxiiCONTENTSWritingrulesinJessForwardchainingrulesPatternsandshadowfactsConstrainingslotdataLiteralconstraintsVariablesasconstraintsConnectiveconstraintsConstrainingmatcheswithpredicatefunctionsReturnvalueconstraintsPatternbindingsQualifyingpatternswithconditionalelementsTheandconditionalelementTheorconditionalelementThenotconditionalelementThetestconditionalelementThelogicalconditionalelementBackwardchainingrulesManagingtheagendaConflictresolutionChangingruleprioritywithsaliencePartitioningtherulebasewithdefmoduleDefiningconstructsinmodulesModules,scope,andnameresolutionModulefocusandexecutioncontrolSearchingworkingmemorywithdefqueryThevariabledeclarationQuerytriggerfactsThecountqueryresultsfunctionBackwardchainingandqueriesSummaryUnderthehood:howJessworksReviewoftheproblemAninefficientsolutionTheRetealgorithmHowReteworksHandlingretractEasyoptimizationsforRetePerformanceoftheRetealgorithmNodeindexhashvalueCONTENTSxiiiMorecomplexityandinitialfactImplementingthenotconditionalelementImplementingthetestconditionalelementImplementingbackwardchainingExploringtheRetenetworkinJessThe(watchcompilations)commandTheviewfunctionThematchesfunctionSummaryPARTCREATINGYOURFIRSTRULEBASEDAPPLICATION:THETAXFORMSADVISORCollectingtheknowledgeTheTaxFormsAdvisorIntroductiontoknowledgeengineeringWheredoyoustartInterviewsDeskresearchCollectingknowledgeabouttaxformsAninterviewReviewingtheformsNextstepsSummaryDesigningtheapplicationOrganizingthedataFillingindetailsDefaultslotvaluesMoretemplatesTemplatesyoudon’tneedOrganizingtherulesBuildingtheinfrastructureSimpletextbasedIOFetchingthequestiontextSummaryxivCONTENTSWritingtheapplicationWelcomingtheuserTestingthestartupmoduleAskingtheuserquestionsIncomeanddependentsDealingwithspecialcircumstancesTestingtheinterviewmoduleRecommendingformsExplainingtheresultsTestingthereportmoduleFinishingtouchesTestingthefullapplicationSummaryPARTWRITINGADIAGNOSTICAPPLICATION:THEPCREPAIRASSISTANTWritingthePCRepairAssistantUsingflowchartsinknowledgeengineeringFromflowchartstorulesTheproblemdomainWritingthefirstrulesAskingquestionswithbackwardchainingCheckingtheanswersModifyingtheaskmoduleTherestoftherulesRulesaboutsoundDegradinggracefullyToboot,ornottobootRAMproblemsQuestioningauthorityTestingSummaryCONTENTSxvAddingagraphicalinterfaceGettingstartedDisplayingawindowDisplayingquestionsGettinganswersThemainthreadvstheeventthreadBetterinputcomponentsFinishingtouchesTestingtheinterfaceSummaryPARTREASONINGABOUTREALITY:THEHVACCONTROLLERTherealityconnectionThesystemDefiningthehardwareinterfaceNativemethodsWritingasimulatorSimulatinggetTemperatureAddingagraphicalinterfaceWritingtheJavaBeansRulesaboutThermometersWritingtheotherBeansJavaBeansandserializationSummaryExtendingtheJesslanguageTheUserfunctioninterfaceThegetNamemethodThecallmethodLoadingaUserfunctionintoJessHandlingargumentsHowmanyargumentsUsingargumentsResolvingvariableargumentsResolvingfunctioncallargumentsxviCONTENTSReturningavalueConstructingValueobjectsBeyondsimpleexamplesHoldingstateMultiplepersonalitiesUserfunctionsandserializationGroupingfunctionswithUserpackageTheHVACfunctionsCreatingasimulatorCountingdevicesMatchingheatpumpsandfloorsOperatingthehardwareImplementingaUserpackageTestingSummaryWritingtherulesThecontrolalgorithmKnowledgeengineeringwithtruthtablesHowheatpumpsworkUsingguardlinesSavingenergySettingupControllingtheheatpumpsEnoughisenoughThemomentoftruthControllingtheventsTheventrulesTestingthewholesystemControllingwithfuzzyrulesFuzzylogic,brieflyTheFuzzyHVACControllerExploringthefuzzycontrollerWhat’snextSummaryCONTENTSxviiPARTTEKMARTCOM:RULEBASEDAPPLICATIONSFORTHEWEBJessontheWebJavaarchitecturesfortheWebFatclientapplicationsThinclientapplicationsAJessapplicationfortheWebKnowledgeengineeringDesigningdatastructuresWritingtherulesAbouttestingTherecommendrequirementsruleRecommendingvideosandDVDsConspicuousconsumptionMoremediarulesRefiningtherecommendationsSomeusefulqueriesMaintainingtheordernumberCleaningupSummaryEmbeddingJessinJavaapplicationsGettingstartedwiththeJesslibraryTheexecuteCommandmethodExchangingJavaobjectsBeyondexecuteCommandWorkingwithFactobjectsinJavaMultislotsOrderedfactsRemovingfactsWorkingwithJavaBeansCallingJessfunctionsfromJavaWorkingwithJessExceptionNestedexceptionsRollingyourownInputandoutputUsingcustomroutersSummaryxviiiCONTENTSDeployingwebbasedapplicationsTheJavaServletAPIJEEandtheTomcatengineDeployingtheHelloservletYourfirstJessservletDeployingtheJessservletCleaninguptheURLApplicationarchitecture:takeoneStartingtheCatalogservletJavaServerPagesForwardingtoaJSPApplicationarchitecture,taketwoTheloginscreenTheCatalogservletInitializingJessGettingtheloginnameStartingausersessionQueryingtheproductlistInvokingtheJSPThecatalogJSPTestingTheRecommendservletGettingstartedCreatingtheorderGettingtherecommendationsForwardingtoJSPsTherecommendJSPThePurchaseservletPersistenceDeployingtheapplicationWhat’snextSummaryPARTENTERPRISESYSTEMSJess,XML,andtheenterpriseEnterpriseapplicationsWhatistheJEEWhatdoesthatstandforCONTENTSxixRulesandXMLInteroperabilityEditingandotherprocessingStorageandretrievalXMLbasedrulerepresentationsRuleMLDAMLHomegrownrepresentationsStrategiesforrepresentingrulesinXMLRepresentingJessrulesinXMLAnexampleruleTransformingtheXMLrulesintoJessrulesRuleeditorsSummaryJessintheJEEenvironmentAquicktourofEJBconceptsKindsofEJBsnEJBrestrictionsDoyouneedtouseEJBsAccessingexternalresourcesfromEJBsAnRMIbasedruleserverTheremoteinterfacesImplementingtheinterfacesImplementingamainmethodGeneratingthestubsAsampleclientFinalpolishingJSR: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)

0/200

精彩专题

上传我的资料

每篇奖励 +2积分

资料评价:

/49
仅支持在线阅读

意见
反馈

立即扫码关注

爱问共享资料微信公众号

返回
顶部