An Empirical Study of Method Chaining in Java

Total Page:16

File Type:pdf, Size:1020Kb

An Empirical Study of Method Chaining in Java An Empirical Study of Method Chaining in Java Tomoki Nakamaru Tomomasa Matsunaga Tetsuro Yamazaki [email protected] [email protected] [email protected] The University of Tokyo The University of Tokyo The University of Tokyo Soramichi Akiyama Shigeru Chiba [email protected] [email protected] The University of Tokyo The University of Tokyo ABSTRACT Method chaining is promoted as a good practice that improves While some promote method chaining as a good practice for im- the readability of source code. By method chaining, redundant proving code readability, others refer to it as a bad practice that temporary variables and code repetitions are eliminated [8]; related worsens code quality. In this paper, we first investigate whether method invocations are grouped into a single expression [34, 42]; method chaining is a programming style accepted by real-world an expression becomes easy to read from left to right as natural- programmers. To answer this question, we collected 2,814 Java language texts [13, 14, 18, 42]. repositories on GitHub and analyzed historical trends in the fre- However, at the same time, method chaining is often referred to quency of method chaining. The results of our analysis revealed as a bad practice. In the thread on StackOverflow [8], many posts the increasing use of method chaining; 23.1% of method invoca- claim that method chaining worsens the readability. For instance, a tions were part of method chains in 2018, whereas only 16.0% were post says: such invocations in 2010. We then explore language features that If you do everything in a single statement then that is are helpful to the method-chaining style but have not been sup- compact, but it is less readable (harder to follow) most ported yet in Java. For this aim, we conducted manual inspections of the times than doing it in multiple statements. of method chains that are randomly sampled from the collected Another post mentions that method chaining makes code confusing repositories. We also estimated how effective they are to encourage since it hides the type of an object that a programmer operates upon. the method-chaining style if they are adopted in Java. Negative opinions are not only about code readability. One post in the thread [8] states that method chaining is not reconcilable with CCS CONCEPTS most debuggers that offer line-level breakpoints: • ! Software and its engineering Software libraries and repos- You can’t put the breakpoint in a concise point so you ; Software design engineering. itories can pause the program exactly where you want it. If one of these methods throws an exception, and you KEYWORDS get a line number, you have no idea which method in Method chaining, Repository mining, Quantitative analysis the “chain” caused the problem. ACM Reference Format: Further, several posts in the thread [8] claim that method chaining Tomoki Nakamaru, Tomomasa Matsunaga, Tetsuro Yamazaki, Soramichi violates the law of Demeter [27], a guideline for developing loosely Akiyama, and Shigeru Chiba. 2020. An Empirical Study of Method Chaining coupled software. in Java. In 17th International Conference on Mining Software Repositories The controversy above leads us to our first question: Is method (MSR ’20), October 5–6, 2020, Seoul, Republic of Korea. ACM, New York, NY, USA, 10 pages. https://doi.org/10.1145/3379597.3387441 chaining accepted widely by real-world programmers? To answer this question, we collected Java repositories on GitHub and an- 1 INTRODUCTION alyzed historical trends in the frequency of method chaining. If method chaining is commonly considered as a bad practice, pro- Method chaining is a programming style in which multiple method grammers would avoid chaining method invocations. As a result, invocations are chained in a single expression as follows: the frequency would be the same or decrease over time. Conversely, new AlertDialog() if the frequency increases, that result will be supportive evidence . setTitle ("Warning") for the wide acceptance of method chaining in the real world. .setMessage("Are you sure?").show(); The answer to our first question is yes; the frequency of method chaining has increased considerably. Our analysis revealed that Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed 23.1% of method invocations were part of method chains in 2018, for profit or commercial advantage and that copies bear this notice and the full citation whereas only 16.0% were such invocations in 2010. To help us better on the first page. Copyrights for components of this work owned by others than ACM understand the trends, this paper also presents our investigation must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a on the bias in the frequency and the categories of method chains. fee. Request permissions from [email protected]. Our second question then arises in response to the first answer: MSR ’20, October 5–6, 2020, Seoul, Republic of Korea How can we extend the Java language to support this increasing © 2020 Association for Computing Machinery. ACM ISBN 978-1-4503-7517-7/20/05...$15.00 trend (or what API design should library developers adopt)? To https://doi.org/10.1145/3379597.3387441 answer this question, we manually analyzed method chains that MSR ’20, October 5–6, 2020, Seoul, Republic of Korea T. Nakamaru, T. Matsunaga, T. Yamazaki, S. Akiyama, and S. Chiba Dataset construction 1e3 1e5 Algorithm 1 2.0 Input: Set of repositories '4?>B8C>A84B 6 Output: Dataset 퐷0C0B4C 1.5 1: for each A4?>B8C>A ~ 2 '4?>B8C>A84B do 2: #0<4 Name of A4?>B8C>A ~ 4 3: '4E8B8>=B Year-end revisions of A4?>B8C>A ~ 1.0 4: for each A4E8B8>= 2 '4E8B8>=B do 0.5 2 5: ~40A Year of A4E8B8>= Number of files 6: for each .java file 5 8;4 in A4E8B8>= do Number of repos 7: 2>34 Content of 5 8;4 0.0 0 8: Add ¹2>34,=0<4, ~40Aº to 퐷0C0B4C 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 Year Year are randomly sampled from the collected repositories. We present (a) Number of repositories (b) Number of files language features (or API design) that we discovered are helpful for encouraging the method-chaining style in Java. Those features are 1e8 supported in other languages but have not been supported yet in 1.25 Java. We also estimated how effective they are if they are adopted 1.00 in Java. 0.75 The contribution of this paper is summarized as follows: 0.50 • We present, to the best of our knowledge, the first quantitative Number of lines 0.25 study on the use of method chaining that is based on a large set 0.00 of source code in the real world. • We empirically show the increasing use of method chaining 1998 2000 2002 2004 2006 2008 2010 2012 2014 2016 2018 Year in Java, which has been claimed without empirical evidence in preceding studies [20, 21, 26, 33, 34, 42, 43]. (c) Number of lines • We present language features (or API design) that support method chaining but are not supported yet in Java. We statistically esti- Figure 1: Number of repositories, files, and lines mated how effective each feature/design would be. The remainder of this paper is organized as follows: Section 2 de- 1 List<String> list = new ArrayList(); scribes the dataset and method that we use to answer our questions. 2 list .add( 3 createRandomString()// Length=1 Section 3 and 4 show the results of our analyses. Section 5 discusses 4 );// Length=1 the threats to validity of our results. Section 6 relates our work to 5 list.stream().map(s -> { preceding studies, and Section 7 concludes our paper. 6 return s.replace("foo","bar") 7 . replace ("baz","qux");// Length=2 8 }).forEach(s -> 2 MATERIALS AND METHODS 9 String output = String.format( 2.1 Dataset 10 "%d lines", 11 s. split ("\n").length// Length=1 To build our dataset, we collected 2,814 Java repositories on GitHub. 12 );// Length=1 Those repositories are the ones that were listed at least once in 13 System.out.println(output);// Length=1 the most-starred 1000 Java repositories on GitHub between Nov. 14 );// Length=3 10th, 2019 and Dec. 21st, 2019. We collected them by monitoring the response of the GitHub API1 every day during that period. Figure 2: Method chains and their lengths We built our dataset by extracting syntactically valid .java files from the year-end revisions of each repository in themost- starred repository set. The year-end revision of a year is the lat- which the file belongs, and ~40A is the year of the revision to which est revision made in that year. We marked a .java file as syn- the file belongs. Algorithm 1 shows pseudocode for constructing tactically valid when JavaParser2, a parser often used both in in- our dataset from a given set of repositories. A set of the most-starred dustry and academia, successfully parses the content of that file. repositories were used as the input to that algorithm. To find year-end revisions, we use the command git rev-list Our dataset contains over three million Java files (approximately <branch>, which lists all the revisions reachable from <branch>. seven hundred million lines) in total.
Recommended publications
  • Building Great Interfaces with OOABL
    Building great Interfaces with OOABL Mike Fechner Director Übersicht © 2018 Consultingwerk Ltd. All rights reserved. 2 Übersicht © 2018 Consultingwerk Ltd. All rights reserved. 3 Übersicht Consultingwerk Software Services Ltd. ▪ Independent IT consulting organization ▪ Focusing on OpenEdge and related technology ▪ Located in Cologne, Germany, subsidiaries in UK and Romania ▪ Customers in Europe, North America, Australia and South Africa ▪ Vendor of developer tools and consulting services ▪ Specialized in GUI for .NET, Angular, OO, Software Architecture, Application Integration ▪ Experts in OpenEdge Application Modernization © 2018 Consultingwerk Ltd. All rights reserved. 4 Übersicht Mike Fechner ▪ Director, Lead Modernization Architect and Product Manager of the SmartComponent Library and WinKit ▪ Specialized on object oriented design, software architecture, desktop user interfaces and web technologies ▪ 28 years of Progress experience (V5 … OE11) ▪ Active member of the OpenEdge community ▪ Frequent speaker at OpenEdge related conferences around the world © 2018 Consultingwerk Ltd. All rights reserved. 5 Übersicht Agenda ▪ Introduction ▪ Interface vs. Implementation ▪ Enums ▪ Value or Parameter Objects ▪ Fluent Interfaces ▪ Builders ▪ Strong Typed Dynamic Query Interfaces ▪ Factories ▪ Facades and Decorators © 2018 Consultingwerk Ltd. All rights reserved. 6 Übersicht Introduction ▪ Object oriented (ABL) programming is more than just a bunch of new syntax elements ▪ It’s easy to continue producing procedural spaghetti code in classes ▪
    [Show full text]
  • Poly Videoos Offer of Source for Open Source Software 3.6.0
    OFFER OF SOURCE FOR 3.6.0 | 2021 | 3725-85857-010A OPEN SOURCE SOFTWARE August Poly VideoOS Software Contents Offer of Source for Open Source Software .............................................................................. 1 Open Source Software ............................................................................................................. 2 Qualcomm Platform Licenses ............................................................................................................. 2 List of Open Source Software .................................................................................................. 2 Poly G7500, Poly Studio X50, and Poly Studio X30 .......................................................................... 2 Poly Microphone IP Adapter ............................................................................................................. 13 Poly IP Table Microphone and Poly IP Ceiling Microphone ............................................................. 18 Poly TC8 and Poly Control Application ............................................................................................. 21 Get Help ..................................................................................................................................... 22 Related Poly and Partner Resources ..................................................................................... 22 Privacy Policy ...........................................................................................................................
    [Show full text]
  • A Comprehensive Study of Bloated Dependencies in the Maven Ecosystem
    Noname manuscript No. (will be inserted by the editor) A Comprehensive Study of Bloated Dependencies in the Maven Ecosystem César Soto-Valero · Nicolas Harrand · Martin Monperrus · Benoit Baudry Received: date / Accepted: date Abstract Build automation tools and package managers have a profound influence on software development. They facilitate the reuse of third-party libraries, support a clear separation between the application’s code and its ex- ternal dependencies, and automate several software development tasks. How- ever, the wide adoption of these tools introduces new challenges related to dependency management. In this paper, we propose an original study of one such challenge: the emergence of bloated dependencies. Bloated dependencies are libraries that the build tool packages with the application’s compiled code but that are actually not necessary to build and run the application. This phenomenon artificially grows the size of the built binary and increases maintenance effort. We propose a tool, called DepClean, to analyze the presence of bloated dependencies in Maven artifacts. We ana- lyze 9; 639 Java artifacts hosted on Maven Central, which include a total of 723; 444 dependency relationships. Our key result is that 75:1% of the analyzed dependency relationships are bloated. In other words, it is feasible to reduce the number of dependencies of Maven artifacts up to 1=4 of its current count. We also perform a qualitative study with 30 notable open-source projects. Our results indicate that developers pay attention to their dependencies and are willing to remove bloated dependencies: 18/21 answered pull requests were accepted and merged by developers, removing 131 dependencies in total.
    [Show full text]
  • Functional Javascript
    www.it-ebooks.info www.it-ebooks.info Functional JavaScript Michael Fogus www.it-ebooks.info Functional JavaScript by Michael Fogus Copyright © 2013 Michael Fogus. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/ institutional sales department: 800-998-9938 or [email protected]. Editor: Mary Treseler Indexer: Judith McConville Production Editor: Melanie Yarbrough Cover Designer: Karen Montgomery Copyeditor: Jasmine Kwityn Interior Designer: David Futato Proofreader: Jilly Gagnon Illustrator: Robert Romano May 2013: First Edition Revision History for the First Edition: 2013-05-24: First release See http://oreilly.com/catalog/errata.csp?isbn=9781449360726 for release details. Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Functional JavaScript, the image of an eider duck, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trade‐ mark claim, the designations have been printed in caps or initial caps. While every precaution has been taken in the preparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
    [Show full text]
  • Gateway Licensing Information User Manual Version 19
    Gateway Licensing Information User Manual Version 19 December 2019 Contents Introduction ...................................................................................................................................... 5 Licensed Products, Restricted Use Licenses, and Prerequisite Products ........................................ 5 Primavera Gateway ................................................................................................................................ 5 Third Party Notices and/or Licenses ................................................................................................ 6 Bootstrap ................................................................................................................................................ 6 Commons Codec .................................................................................................................................... 6 Commons Compress .............................................................................................................................. 6 Commons IO ........................................................................................................................................... 7 Commons Net ......................................................................................................................................... 7 commons-vfs .......................................................................................................................................... 7 HttpComponents HttpClient ..................................................................................................................
    [Show full text]
  • Automating Testing with Autofixture, Xunit.Net & Specflow
    Design Patterns Michael Heitland Oct 2015 Creational Patterns • Abstract Factory • Builder • Factory Method • Object Pool* • Prototype • Simple Factory* • Singleton (* this pattern got added later by others) Structural Patterns ● Adapter ● Bridge ● Composite ● Decorator ● Facade ● Flyweight ● Proxy Behavioural Patterns 1 ● Chain of Responsibility ● Command ● Interpreter ● Iterator ● Mediator ● Memento Behavioural Patterns 2 ● Null Object * ● Observer ● State ● Strategy ● Template Method ● Visitor Initial Acronym Concept Single responsibility principle: A class should have only a single responsibility (i.e. only one potential change in the S SRP software's specification should be able to affect the specification of the class) Open/closed principle: “Software entities … should be open O OCP for extension, but closed for modification.” Liskov substitution principle: “Objects in a program should be L LSP replaceable with instances of their subtypes without altering the correctness of that program.” See also design by contract. Interface segregation principle: “Many client-specific I ISP interfaces are better than one general-purpose interface.”[8] Dependency inversion principle: One should “Depend upon D DIP Abstractions. Do not depend upon concretions.”[8] Creational Patterns Simple Factory* Encapsulating object creation. Clients will use object interfaces. Abstract Factory Provide an interface for creating families of related or dependent objects without specifying their concrete classes. Inject the factory into the object. Dependency Inversion Principle Depend upon abstractions. Do not depend upon concrete classes. Our high-level components should not depend on our low-level components; rather, they should both depend on abstractions. Builder Separate the construction of a complex object from its implementation so that the two can vary independently. The same construction process can create different representations.
    [Show full text]
  • Evil Pickles: Dos Attacks Based on Object-Graph Engineering∗
    Evil Pickles: DoS Attacks Based on Object-Graph Engineering∗ Jens Dietrich1, Kamil Jezek2, Shawn Rasheed3, Amjed Tahir4, and Alex Potanin5 1 School of Engineering and Advanced Technology, Massey University Palmerston North, New Zealand [email protected] 2 NTIS – New Technologies for the Information Society Faculty of Applied Sciences, University of West Bohemia Pilsen, Czech Republic [email protected] 3 School of Engineering and Advanced Technology, Massey University Palmerston North, New Zealand [email protected] 4 School of Engineering and Advanced Technology, Massey University Palmerston North, New Zealand [email protected] 5 School of Engineering and Computer Science Victoria University of Wellington, Wellington, New Zealand [email protected] Abstract In recent years, multiple vulnerabilities exploiting the serialisation APIs of various programming languages, including Java, have been discovered. These vulnerabilities can be used to devise in- jection attacks, exploiting the presence of dynamic programming language features like reflection or dynamic proxies. In this paper, we investigate a new type of serialisation-related vulnerabilit- ies for Java that exploit the topology of object graphs constructed from classes of the standard library in a way that deserialisation leads to resource exhaustion, facilitating denial of service attacks. We analyse three such vulnerabilities that can be exploited to exhaust stack memory, heap memory and CPU time. We discuss the language and library design features that enable these vulnerabilities, and investigate whether these vulnerabilities can be ported to C#, Java- Script and Ruby. We present two case studies that demonstrate how the vulnerabilities can be used in attacks on two widely used servers, Jenkins deployed on Tomcat and JBoss.
    [Show full text]
  • Executable Trigger-Action Comments
    Executable Trigger-Action Comments Pengyu Nie, Rishabh Rai, Junyi Jessy Li, Sarfraz Khurshid, Raymond J. Mooney, and Milos Gligoric The University of Texas at Austin {pynie@,rrai.squared@,jessy@austin.,khurshid@ece.,mooney@cs.,gligoric@}utexas.edu ABSTRACT Wave project: “Remove this when HtmlViewImpl implements getAt- Natural language elements, e.g., todo comments, are frequently tributes”, etc.). We consider those comments where the trigger is used to communicate among the developers and to describe tasks expressed based on the state of the code repositories and actions that need to be performed (actions) when specific conditions hold require modifications of source or binary code. We call these com- in the code repository (triggers). As projects evolve, development ments trigger-action comments. processes change, and development teams reorganize, these com- Although trigger-action comments are ubiquitous, they are, like ments, because of their informal nature, frequently become irrele- other types of comments, written in natural language. Thus, as vant or forgotten. projects evolve, development processes change, and development We present the first technique, dubbed TrigIt, to specify trigger- teams reorganize, these comments frequently become irrelevant or action todo comments as executable statements. Thus, actions are forgotten. As an example, consider the following comment from executed automatically when triggers evaluate to true. TrigIt spec- the Apache Gobblin project [13]: “Remove once we commit any ifications are written in the host language (e.g., Java) and are evalu- other classes”. This comment, followed by an empty class, was in- ated as part of the build process. The triggers are specified as query cluded in revision 38ce024 (Dec 10, 2015) in package-info.java file statements over abstract syntax trees and abstract representation to force the javadoc tool to generate documentation for an empty of build configuration scripts, and the actions are specified as code package.
    [Show full text]
  • Trifacta Data Preparation for Amazon Redshift and S3 Must Be Deployed Into an Existing Virtual Private Cloud (VPC)
    Install Guide for Data Preparation for Amazon Redshift and S3 Version: 7.1 Doc Build Date: 05/26/2020 Copyright © Trifacta Inc. 2020 - All Rights Reserved. CONFIDENTIAL These materials (the “Documentation”) are the confidential and proprietary information of Trifacta Inc. and may not be reproduced, modified, or distributed without the prior written permission of Trifacta Inc. EXCEPT AS OTHERWISE PROVIDED IN AN EXPRESS WRITTEN AGREEMENT, TRIFACTA INC. PROVIDES THIS DOCUMENTATION AS-IS AND WITHOUT WARRANTY AND TRIFACTA INC. DISCLAIMS ALL EXPRESS AND IMPLIED WARRANTIES TO THE EXTENT PERMITTED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF MERCHANTABILITY, NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE AND UNDER NO CIRCUMSTANCES WILL TRIFACTA INC. BE LIABLE FOR ANY AMOUNT GREATER THAN ONE HUNDRED DOLLARS ($100) BASED ON ANY USE OF THE DOCUMENTATION. For third-party license information, please select About Trifacta from the Help menu. 1. Quick Start . 4 1.1 Install from AWS Marketplace . 4 1.2 Upgrade for AWS Marketplace . 7 2. Configure . 8 2.1 Configure for AWS . 8 2.1.1 Configure for EC2 Role-Based Authentication . 14 2.1.2 Enable S3 Access . 16 2.1.2.1 Create Redshift Connections 28 3. Contact Support . 30 4. Legal 31 4.1 Third-Party License Information . 31 Page #3 Quick Start Install from AWS Marketplace Contents: Product Limitations Internet access Install Desktop Requirements Pre-requisites Install Steps - CloudFormation template SSH Access Troubleshooting SELinux Upgrade Documentation Related Topics This guide steps through the requirements and process for installing Trifacta® Data Preparation for Amazon Redshift and S3 through the AWS Marketplace.
    [Show full text]
  • Designpatternsphp Documentation Release 1.0
    DesignPatternsPHP Documentation Release 1.0 Dominik Liebler and contributors Jul 18, 2021 Contents 1 Patterns 3 1.1 Creational................................................3 1.1.1 Abstract Factory........................................3 1.1.2 Builder.............................................8 1.1.3 Factory Method......................................... 13 1.1.4 Pool............................................... 18 1.1.5 Prototype............................................ 21 1.1.6 Simple Factory......................................... 24 1.1.7 Singleton............................................ 26 1.1.8 Static Factory.......................................... 28 1.2 Structural................................................. 30 1.2.1 Adapter / Wrapper....................................... 31 1.2.2 Bridge.............................................. 35 1.2.3 Composite............................................ 39 1.2.4 Data Mapper.......................................... 42 1.2.5 Decorator............................................ 46 1.2.6 Dependency Injection...................................... 50 1.2.7 Facade.............................................. 53 1.2.8 Fluent Interface......................................... 56 1.2.9 Flyweight............................................ 59 1.2.10 Proxy.............................................. 62 1.2.11 Registry............................................. 66 1.3 Behavioral................................................ 69 1.3.1 Chain Of Responsibilities...................................
    [Show full text]
  • Design Patterns for QA Automation Anton Semenchenko
    Design Patterns for QA Automation Anton Semenchenko CONFIDENTIAL 1 Agenda, part 1 (general) 1. Main challenges 2. Solution 3. Design Patterns – the simplest definition 4. Design Patterns language – the simplest definition 5. Encapsulation – the most important OOP principle CONFIDENTIAL 2 Agenda, part 2 (main patterns) 1. Page Element 2. Page Object 3. Action CONFIDENTIAL 3 Agenda, part 3 (less popular patterns) 1. Flow (Fluent Interface) – Ubiquitous language – Key word driven – Behavior Driven Development (BDD) 2. Domain Specific Language (DSL) – Flow 3. Navigator (for Web) CONFIDENTIAL 4 Agenda, part 4 (take away points) 1. “Rules” and principles 2. A huge set of useful links 3. A huge set of examples CONFIDENTIAL 5 2 main challenges in our every day work (interview experience) 1. Pure design 2. Over design CONFIDENTIAL 6 Solution 1. Find a balance CONFIDENTIAL 7 Design Patterns – the simplest definition 1. Elements (blocks) of reusable object-oriented software; 2. The re-usable form of a solution to a design problem; CONFIDENTIAL 8 Design Patterns – as a language 1. Design patterns that relate to a particular field (for example QA Automation) is called a pattern language 2. Design Patterns language gives a common terminology for discussing the situations specialists are faced with: – “The elements of this language are entities called patterns”; – “Each pattern describes a problem that occurs over and over again in our (QA Automation) environment”; – “Each pattern describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice!” CONFIDENTIAL 9 Design Patterns for QA Automation 1.
    [Show full text]
  • Drools Expert User Guide
    Drools Expert User Guide Version 6.0.0.CR2 by The JBoss Drools team [http://www.jboss.org/drools/team.html] ....................................................................................................................................... vii 1. Introduction ................................................................................................................. 1 1.1. Artificial Intelligence ............................................................................................ 1 1.1.1. A Little History ......................................................................................... 1 1.1.2. Knowledge Representation and Reasoning ................................................ 2 1.1.3. Rule Engines and Production Rule Systems (PRS) .................................... 3 1.1.4. Hybrid Reasoning Systems (HRS) ............................................................ 5 1.1.5. Expert Systems ........................................................................................ 8 1.1.6. Recommended Reading ........................................................................... 9 1.2. Why use a Rule Engine? .................................................................................. 12 1.2.1. Advantages of a Rule Engine ................................................................. 13 1.2.2. When should you use a Rule Engine? ..................................................... 14 1.2.3. When not to use a Rule Engine .............................................................. 15 1.2.4. Scripting
    [Show full text]