Skip to content
Free planNo credit card requiredStart writing

Search 250 million research papers

Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.

About 894 papers for “Visitor pattern”

Visitor Pattern

Vaskaran Sarcar · Apress eBooks · 2018

This chapter covers the visitor pattern.

Cited by 0

Visitor Pattern

Vaskaran Sarcar · Apress eBooks · 2018

This chapter covers the Visitor pattern.

Cited by 0

Reflective Visitor Pattern.

Yun Mai, Michel de Champlain · 2001

The Visitor pattern wraps associated operations that are performed on the elements of an object structure into a separate object. It allows the software designer to define new kinds of operations over the object structure without changing the classes of this structure. But a well-known drawback of this standard Visitor structure is that extending the object structure is hard. This paper presents the design and implementation of a flexible Visitor pattern based on the reflection technique, we call it the Reflective Visitor pattern. The reflection technique enables the Visitor to perform the run-time dispatch action on itself. The separation of the run-time dispatch action from the object structure makes any extension to the object structure become easy. It also removes the cyclic dependencies between the Visitor and the object structure, so the reusability and extensibility of the system are improved. Intent Define a new operation over the object structure without changing the classes of the elements on which it operates, while in the meantime, allow the element classes in the object structure to be extended constantly without changing the existing system.

Cited by 6

Visitor Design Pattern Using Reflection Mechanism

Bilal Hussein, Aref Mehanna, Yahia Rabih · International Journal of Software Innovation · 2019

Design patterns of today play a fundamental role in software development and implementation and provide a wide range of design solutions for recurring problems. Most research in this area focus on the creation and update of design patterns in order to fill all the gaps produced by their original structures. The purpose of this article is to present the visitor design pattern, to show its advantages in the software development process, and to provide it in a new version that allows the software to be easily upgraded without making complex modifications. This contribution consists in updating the structure and implementation of the Visitor design pattern using the reflection mechanism.

Cited by 3

The essence of the Visitor pattern

Jens Palsberg, C. Barry Jay · 2002

For object-oriented programming, the Visitor pattern enables the definition of a new operation on an object structure without changing the classes of the objects. The price has been that the set of classes must be fixed in advance, and they must each have a so-called accept method. In this paper we demonstrate how to program visitors without relying on accept methods and without knowing all classes of the objects in advance. The idea, derived from related work on shape polymorphism in functional programming, is to separate (1) accessing subobjects, and (2) acting on them. In the object-oriented setting, reflection techniques support access to sub-objects, as demonstrated in our Java class, Walkabout. It supports all visitors as subclasses, and they can be programmed without any further use of reflection. Thus a program using the Visitor pattern can now be understood as a specialized version of a program using the Walkabout class.

Cited by 152

Visitor flow pattern of Expo 2010

Chao Fan, Jin-Li Guo · Chinese Physics B · 2012

Expo 2010 Shanghai China was a successful, splendid, and unforgettable event, leaving us with valuable experiences. The visitor flow pattern of the Expo is investigated in this paper. The Hurst exponent, the mean value, and the standard deviation of visitor volume indicate that the visitor flow is fractal with long-term stability and correlation as well as obvious fluctuation in a short period. Then the time series of visitor volume is converted into a complex network by using the visibility algorithm. It can be inferred from the topological properties of the visibility graph that the network is scale-free, small-world, and hierarchically constructed, confirming that the time series are fractal and a close relationship exists among the visitor volumes on different days. Furthermore, it is inevitable that will be some extreme visitor volumes in the original visitor flow, and these extreme points may appear in a group to a great extent. All these properties are closely related to the feature of the complex network. Finally, the revised linear regression is performed to forecast the next-day visitor volume based on the previous 10-day data.

Cited by 8

The Energy Cost of the Visitor Pattern

Déaglán Connolly Bree, Mel Ó Cinnéide · Figshare · 2022

Replication Package for ICSME 2022 Paper: The Energy Cost of the Visitor Pattern<br>

Cited by 0Open access

Attribute based compiler implemented using visitor pattern

Norman Neff · Proceedings of the 35th SIGCSE technical symposium on Computer science education · 2004

In our compiler course for undergraduate students, we use a class of attribute grammars to specify type information, target code, and other properties calculated for the source program. In the design of the compiler, a modification of the visitor design pattern allows us to transparently compute the attributes. Within our framework, implementation is straightforward; the emphasis of the course shifts to theory and specification. In several offerings of the course, students have implemented parts of a highly modular compiler for a small, statically typed object oriented language.

Cited by 3

The Energy Cost of the Visitor Pattern

Connolly Bree, Déaglán, Ó Cinnéide, Mel · Figshare · 2022

Replication Package for ICSME 2022 Paper: The Energy Cost of the Visitor Pattern<br>

Cited by 0Open access

The Energy Cost of the Visitor Pattern

Déaglán Connolly Bree, Mel Ó Cinnéide · 2022

Design patterns are applied frequently during software evolution in order to make the software more flexible and amenable to extension. One little-studied aspect of design patterns is their propensity to increase run time energy consumption due to the indirection and additional structure they introduce. In this paper we study the impact of the Visitor pattern on energy efficiency. The Visitor pattern separates an algorithm from the objects it acts upon and improves maintainability by placing each algorithm within a single visitor class, at the cost of increased indirection due to the double dispatch required when the algorithm is invoked. We experimentally investigate the energy impact of varying the implementation of this pattern, and of removing the pattern entirely from the software. In our results we observe energy consumption reductions of greater than 7% in the textbook example when the pattern is implemented using reflective casting, and reductions of over 10% when experimenting with an open source project, JavaParser. The complete removal of the pattern yields more complex results, with little impact in the textbook example but reductions of over 7% in the JavaParser study. Our results highlight the energy savings that may be achieved when the Visitor pattern is removed, and show that energy savings may also be achieved by varying the implementation of the pattern.

Cited by 6

A Type-theoretic Reconstruction of the Visitor Pattern

Peter Buchlovsky, Hayo Thielecke · 2005

In object-oriented languages, the Visitor pattern can be used to traverse tree-like data structures: a visitor object contains some operations, and the data structure objects allow themselves to be traversed by accepting visitors. In the polymorphic lambda calculus (System F), tree-like data structures can be encoded as polymorphic higher-order functions. In this paper, we reconstruct the Visitor pattern from the polymorphic encoding by way of generics in Java. We sketch how the quantified types in the polymorphic encoding can guide reasoning about visitors in general.

Cited by 0

A Type-theoretic Reconstruction of the Visitor Pattern

Peter Buchlovsky, Hayo Thielecke · Electronic Notes in Theoretical Computer Science · 2006

In object-oriented languages, the Visitor pattern can be used to traverse tree-like data structures: a visitor object contains some operations, and the data structure objects allow themselves to be traversed by accepting visitors. In the polymorphic lambda calculus (System F), tree-like data structures can be encoded as polymorphic higher-order functions. In this paper, we reconstruct the Visitor pattern from the polymorphic encoding by way of generics in Java. We sketch how the quantified types in the polymorphic encoding can guide reasoning about visitors in general.

Cited by 27Open access

A JML Specification of the Design Pattern “Visitor ” ∗

Wolfgang Schreiner · 2010

We describe a generic Java framework that implements the software design pattern “visitor” and that is formally specified in the Java Modeling Language (JML). In addition to the information provided by a typical UML specification of the pattern, the JML specification describes the the sequence of visited objects in the order in which they are visited. A visitor may then specify its concrete behavior with respect to this sequence.

Cited by 0

Applying the Visitor Pattern to the DOM API

Daniel Williams · ScholarWorks - GVSU (Grand Valley State University) · 2004

Applying the Visitor Pattern to the DOM API. Abstract: It is well known that traversing the XML DOM is a sometimes difficult and often tedious task, executing code based on data retrieved from the DOM is even more complex. In this project I will attempt to abstract much of the logic for this repetitive task. The implementation of patterns is a technique that is often used to help simplify and intellectually manage projects; the Visitor pattern seemed the most appropriate and useful to help solve this problem. Reflection also plays a key roll, and is used to determine the executed code based on the DOM node values at runtime.

Cited by 0

Visitor Navigation Pattern Prediction Using Transition Matrix Compression

Ei Theint Theint Thu, Aye Aye Nyein, Hlaing Htake Khaung Tin · RePEc: Research Papers in Economics

As an increasing number of cities consists of an increasing number of visiting places, it is more difficult for the visitors to consider. Meanwhile, the system tries to introduce recommendation features to their visitors. The main aim of this paper is to only implement visitor navigation pattern prediction system in Myanmar. The paper uses traveling paths that assist visitors to navigate the visiting places based on the past visitor’s behavior. To cluster the paths with similar transition behavior and compress the transition matrix to an best size for efficient probability calculation in paths, transition probability matrix compression has been used. In this paper, Visitor Navigation Pattern Prediction Using Transition Matrix Compression is developed. It uses data mining techniques for recommending a visitor which (next)paths is closely the most popular paths in Myanmar. By looking at the traveling paths in the organization, the system can know the popular paths(places).

Cited by 0