From Images to Shape Models for Object Detection We present an object class detection approach which fully integrates the complementary strengths offered by shape matchers. Like an object detector, it can learn class models directly from images, and can localize novel instances in the presence of intra-class variations, clutter, and scale changes. Like a shape matcher, it finds the boundaries of objects, rather than just their bounding-boxes. This is achieved by a novel technique for learning a shape model of an object class given images of example instances. Furthermore, we also integrate Hough-style voting with a non-rigid point matching algorithm to localize the model in cluttered images. As demonstrated by an extensive evaluation, our method can localize object boundaries accurately and does not need segmented examples for training (only boundingboxes). In the last few years, the problem of learning object class models and localizing previously unseen instances in novel images has received a lot of attention. While many methods use local image patches as basic features (Fergus et al. 2003 ; Leibe and Schiele 2004; Torralba et al. 2004; Winn and Shotton 2006) , recently several approaches based on contour features have been proposed (Berg et al. 2005; Ferrari et al. 2006 Ferrari et al. , 2008 Jurie and Schmid 2004; Leordeanu et al. 2007; Opelt et al. 2006; Shotton et al. 2005) . These are better suited to represent objects defined by their shape, such as mugs and horses. Most of the methods that train without annotated object segmentations can localize objects in test images only up to a bounding-box, rather than delineating their outlines. We believe the main reason lies in the nature of the proposed models, and in the difficulty of learning them from real images, as opposed to hand-segmented shapes (Cootes et al. 1995; Elidan et al. 2006; Hill and Taylor 1996; Sebastian et al. 2004 ). The models are typically composed of rather sparse collections of contour fragments with a loose layer of spatial organization on top (Ferrari et al. 2008; Jurie and Schmid 2004; Opelt et al. 2006; Shotton et al. 2005) . A few authors even go to the extreme end of using individual edgels as modeling units (Berg et al. 2005; Leordeanu et al. 2007) . In contrast, an explicit shape model formed by continuous connected curves completely covering the object outlines is more desirable, as it would naturally support boundary-level localization in test images.. In order to achieve this goal, we propose an approach which bridges the gap between shape matching and object detection. Classic non-rigid shape matchers (Belongie and Malik 2002; Chui and Rangarajan 2003; Cootes et al. 1995; Sebastian et al. 2004 ) produce point-to-point correspondences, but need clean pre-segmented shapes as models. In Fig. 1 Example object detections returned by our approach (see also Fig. 13) contrast, we propose a method that can learn complete shape models directly from images. Moreover, it can automatically match the learned model to cluttered test images, thereby localizing novel class instances up to their boundaries (as opposed to a bounding-box).. The main contribution of this paper is a technique for learning the prototypical shape of an object class as well as a statistical model of intra-class deformations, given image windows containing training instances (Fig. 3a ; no presegmented shapes are needed). The challenge is to determine which contour points belong to the class boundaries, while discarding background and details specific to individual instances (e.g. mug labels). Note how these typically form the majority of points, yielding a poor signal-to-noise ratio. The task is further complicated by intra-class variability: the shape of the object boundary varies across instances.. As additional contributions, we extend the non-rigid shape matcher of Chui and Rangarajan (2003) in two ways. First, we extend it to operate in cluttered test images, by deriving an automatic initialization for the location and scale of the object from a Hough-style voting scheme (Leibe and Schiele 2004; Opelt et al. 2006; Shotton et al. 2005 ) (instead of the manual initialization that would otherwise be necessary). This enables to match the learned shape model even to severely cluttered images, where the object boundaries cover only a small fraction of the contour points (Figs. 1 and 13). As a second extension, we constrain the shape matcher (Chui and Rangarajan 2003) to only search over transformations compatible with the learned, class-specific deformation model. This ensures output shapes similar to class members, improves accuracy, and helps avoiding local minima.. These contributions result in a powerful system, capable of detecting novel class instances and localizing their boundaries in cluttered images, while training from objects annotated only with bounding-boxes.. After reviewing related work (Sect. 2) and the local contour features used in our approach (Sect. 3), we present our shape learning method in Sect. 4, and the scheme for localizing objects in test images in Sect. 5. Section 6 reports extensive experiments. We evaluate the quality of the learned models and quantify localization performance at test time in terms of accuracy of the detected object boundaries. We also compare to previous works for object localization with training on real images (Ferrari et al. 2008 ) and hand-drawings (Ferrari et al. 2006) . A preliminary version of this work was published at CVPR 2007 ). We have proposed an approach for learning class-specific explicit shape models from images annotated by boundingboxes, and localizing the boundaries of novel class instances in the presence of extensive clutter, scale changes, and intraclass variability. In addition, the approach operates effectively also when given hand-drawings as models. The ability to input both images and hand-drawings as training data is a consequence of the basic design of our approach, which attempts to bridge the gap between shape matching and object class detection.. The presented approach can be extended in several ways. First, the training stage models only positive examples. This could be extended by learning a classifier to distinguish between positive and negative examples, which might reduce false positives. One possibility could be to train both our shape models and the discriminative models of Ferrari et al. (2008) . At detection time, we could then use the boundingbox delivered by Ferrari et al. (2008) to initialize shape matching based on our models. Moreover, the discriminative power of the representation could be improved by using appearance features in addition to image contours. Finally, in this paper we have assumed that all observed differences in the shape of the training examples originate from intraclass variation, and not from viewpoint changes. It would be interesting to add a stage to automatically group objects by viewpoint, and learn separate shape models. The success of this procedure is due in part to adopting PAS as basic shape elements. A simpler alternative would be to use individual edgels. In that case, there would be just one voting space, with two location dimensions and one orientation dimension. In contrast, PAS bring two additional degrees of separation: the shape of the PAS, expressed as the assignments to codebook types, and its size (relative to the window). Individual edgels have no size, and the shape of a PAS is more distinctive than the orientation of an edgel. As a consequence, it is very unlikely that a significant number of clutter PAS will accidentally have similar locations, sizes and shapes at the same time. Hence, recurring PAS stemming from the desired class boundaries tend to form peaks in the voting spaces, whereas clutter PAS don't.. Intra-class shape variability is addressed partly by the soft-assign of PAS to types, and partly by applying a substantial spatial smoothing to the voting spaces before detecting local maxima. This creates wide basins of attraction for PAS from different training examples to accumulate evidence for the same part. We can afford this flexibility while keeping a low risk of accumulating clutter because of the high separability discussed above, especially due to separate voting spaces for different codebook types. This yields the discriminativity necessary to overcome the poor signalto-noise ratio, while allowing the flexibility necessary to accommodate for intra-class shape variations.. The voting procedure is similar in spirit to recent works on finding frequently recurring spatial configurations of local appearance features in unannotated images (Fritz and Schiele 2006; Quack et al. 2007 ), but it is specialized for the case when bounding-box annotation is available.. The proposed algorithm sees all training data at once, and therefore reliably selects parts and robustly estimates their locations/size/shapes. In our experiments this was more stable and more robust to clutter than matching pairs of training instances and combining their output a posteriori. As another advantage, the algorithm has complexity linear in the total number of PAS in the training windows, so it can learn from large training sets efficiently.. Step 3 is possible because the backmatched shapes B are in point-to-point correspondence, as they are different TPS transformations of the same S (Fig. 6c-left) . This enables to defineB as the coordinates of corresponding points averaged over all B i ∈ B. It also enables to analyze the variations in the point locations. The differences remaining after alignment are due to non-rigid shape variations, which we will learn in the next subsection.. The alternation of backmatching and averaging results in a succession of better models and better matches to the data, as the point correspondence cover more and more of the class boundaries of the training objects (Fig. 6d) . Segments of the model shape are moved, bent, and stretched so as to form smooth, connected lines, thus recovering the shape of the class well on a global scale (e.g. topmost and leftmost segments in Fig. 6c-right) . This because backmatching deforms the initial shape onto the class boundaries of the training images, delivering natural, well formed shapes. The averaging step then integrates them into a generic-looking shape, and smoothes out occasional inaccuracies of the individual backmatches.. The proposed technique can be seen as searching for the model shape that best explains the training data, under the general assumption that TPS deformations account for the difference between the model shape and the class boundaries of the training objects.. As shown in Fig. 6d -right, the running example improves further during the second (and final) iteration (e.g. the handle arcs become more continuous). The final shape is smooth and well connected, includes no background clutter and little interior clutter, and, as desired, represents an average class member (a prototype shape). Both large scale (the external frame) and fine scale structures (the double handle arc) are correctly recovered. The backmatched shapes also improve in the second iteration, because matching is easier given a better model. In turn, the better backmatches yield a better average shape. The mutual help between backmatching and updating the model is key for the success of the procedure. Figure 7 shows examples of other models evolving over the three stages (Sects. 4.1 to 4.3). Notice the large positive impact of model shape refinement. Furthermore, to demonstrate that the proposed techniques consistently produce good quality models, we show many of them in the result section (Fig. 10) .. Our idea for shape refinement is related to a general design principle visible in different areas of vision. It involves going back to the image after building some intermediate representation from initial low-level features, to refine and extend it. This differs from the conventional way of building layers of increasing abstraction, involving representations of higher and higher level, progressively departing from the original image data. The traditional strategy suffers from two problems: errors accumulate from a layer to the next, and relevant information missed by the low-level features is never recovered. Going back to the image enables to correct both problems, and it has good chances to succeed since a rough model has already been built. Different algorithms are instances of this strategy and have led to excellent results in various areas: human pose estimation (Ramanan 2006) , top-down segmentation (Leibe and Schiele 2004; Borenstein and Ullman 2002) , and recognition of specific objects (Ferrari et al. 2004 ). As there exists a large body of work on shape representations for recognition (Basri et al. 1998; Belongie and Malik 2002; Cootes et al. 1995; Felzenswalb 2005; Ferrari et al. 2008; Gdalyahu and Weinshall 1999; Gold and Rangarajan 1996; Leordeanu et al. 2007; Sebastian et al. 2004 ), we briefly review in the following only the most important works relevant to this paper, i.e. on shape description and matching for modeling, recognition, and localization of object classes.. Several earlier works for shape description are based on silhouettes (Mokhtarian and Mackworth 1986; Sharvit et al. 1998 ). Yet, silhouettes are limited because they ignore internal contours and are difficult to extract from cluttered images as noted by Belongie and Malik (2002) . Therefore, more recent works represent shapes as loose collections of 2D points (Cootes et al. 1995; Gavrila 1998) or other 2D features (Elidan et al. 2006; Ferrari et al. 2008) . Other works propose more informative structures than individual points as features, in order to simplify matching. Belongie and Malik (2002) propose the Shape Context, which captures for each point the spatial distribution of all other points relative to it on the shape. This semi-local representation allows to establish point-to-point correspondences between shapes even under non-rigid deformations. Leordeanu et al. (2007) propose another way to go beyond individual edgels, by encoding relations between all pairs of edgels. Similarly, Elidan et al. (2006) use pairwise spatial relations between landmark points. Ferrari et al. (2008) present a family of scaleinvariant local shape features formed by short chains of connected contour segments, capable of cleanly encoding pure fragments of an object boundary. They offer an attractive compromise between information content and repeatability, and encompass a wide variety of local shape structures.. While generic features can be directly used to model any object, an alternative is to learn features adapted to a particular object class. Shotton et al. (2005) and Opelt et al. (2006) learn class-specific boundary fragments (local groups of edgels), and their spatial arrangement as a star configuration. In addition to their own local shape, such fragments store a pointer to the object center, enabling object localization in novel images using voting. Other methods (Dalal and Triggs 2005; Ferrari et al. 2008) achieve this functionality by encoding spatial organization by tiling object windows, and learning which features/tile combinations discriminate objects from background.. The overall shape model of the above approaches is either (a) a global geometric organization of edge fragments (Belongie and Malik 2002; Ferrari et al. 2008; Opelt et al. 2006; Shotton et al. 2005) ; or (b) an ensemble of pairwise constraints between point features (Elidan et al. 2006; Leordeanu et al. 2007 ). Global geometric shape models are appealing because of their ability to handle deformations, which can be represented in several ways. Belongie and Malik (2002) use regularized Thin Plate Splines which is a generic deformation model that can quantify dissimilarity between any two shapes, but cannot model shape variations within a specific class. In contrast, Pentland and Sclaroff (1991) learn the intra-class deformation modes of an elastic material from clean training shapes. The most famous work in this spirit is Active Shape Models (Cootes et al. 1995) , where the shape model in novel images is constrained to vary only in ways seen during training. A few principal deformation modes, accounting for most of the total variability over the training set, are learnt using PCA. More generally, non-linear statistics can be used to gain robustness to noise and outliers (Cremers et al. 2002) .. A shortcoming of the above methods is the need for clean training shapes, which requires a substantial manual segmentation effort. Recently, a few authors have tried to develop semi-supervised algorithms not requiring segmented training examples. The key idea is to find combinations of features repeatedly recurring over many training images. Berg et al. (2005) suggest to build the model from pairs of training images, and retaining parts matching across several image pairs. A related strategy is used by Leordeanu et al. (2007) , which initializes the model using all line segments from a single image and then use many other images to iteratively remove spurious features and add new good features. Finally, the LOCUS (Winn and Jojic 2005) model can also be learned in a semi-supervised way, but needs the training objects to be roughly aligned and to occupy most of the image surface.. A limitation common to these approaches is the lack of modeling of intra-class shape deformations, assuming a single shape is explaining all training images. Moreover, as pointed out by Chum and Zisserman (2007) and Winn and Shotton (2006) , LOCUS is not suited for localizing objects in extensively cluttered test images. Finally, the models learned by Leordeanu et al. (2007) are sparse collections of features, rather than explicit shapes formed by continuous connected curves. As a consequence, Leordeanu et al. (2007) cannot localize objects up to their (complete) boundaries in test images.. Object recognition using shape can be casted as finding correspondences between model and image features. The resulting combinatorics can be made tractable by accepting sub-optimal matching solutions. When the shape is not deformable or we are not interested in recovering the deformation but only in localizing the object up to translation and scale, simple strategies can be applied, such as Geometric Hashing (Lamdan et al. 1990 ), Hough Transform (Opelt et al. 2006) , or exhaustive search (typically combined with Chamfer Matching (Gavrila 1998) or classifiers (Ferrari et al. 2008; Shotton et al. 2005) ). In case of nonrigid deformations, the parameter space becomes too large for these strategies. Gold and Rangarajan (1996) propose an iterative method to simultaneously find correspondences and the model deformation. The sum of distances between model points and image points is minimized by alternating a step where the correspondences are estimated while keeping the transformation fixed, and a step where the transformation is computed while fixing the correspondences. Chui and Rangarajan (2003) put this idea in a deterministic annealing framework and adopts Thin Plate Splines as deformation model (TPS). The deterministic annealing formulation elegantly supports a coarse-to-fine search in the TPS transformation space, while maintaining a continuous softcorrespondence matrix. The disadvantage is the need for initialization near the object, as it cannot operate automatically in a very cluttered image. A related framework is adopted by Belongie and Malik (2002) , where matching is supported by shape contexts. Depending on the model structure, optimization scheme can be based on Integer Quadratic Programming (Berg et al. 2005) , spectral matching (Leordeanu et al. 2007) or graph cuts (Winn and Jojic 2005) .. Our approach in context. In this paper, we present an approach for learning and matching shapes which has several attractive properties. First of all, we build explicit shape models formed by continuous connected curves, which represent the prototype shapes of object classes. The training objects need only be annotated by a bounding-box, i.e. no segmentation is necessary. Our learning method avoids the pairwise image matching used in previous approaches, and is therefore computationally cheaper and more robust to clutter edgels due to the 'global view' gained by considering all training images at once. Moreover, we model intra-class deformations and enforce them at test time, when matching the model to novel images. Finally, we extend the algorithm (Chui and Rangarajan 2003) to a two-stage technique enabling the deformable matching of the learned shape models to extensively cluttered test images. This enables to accurately localize the complete boundaries of previously unseen object instances. The algorithm consists of three steps:. 1. Align windows. Let a be the geometric mean of the aspect-ratios of the training windows W (width over height). Each window is transformed to a canonical zero-centered rectangle of height 1 and width a. This removes translation and scale differences, and cancels out shape variations due to different aspect-ratios (e.g. tall Starbucks mugs versus coffee cups). This facilitates the learning task, because PAS on the class boundaries are now better aligned.. The algorithm consists of three steps: (Fig. 5a ). The following function measures the confidence that P is an occurrence of M (denoted M → P ):. It takes into account P 's edge strength (first factor) and how close it is to M in terms of shape, scale, and location (second to last factors). The confidence ranges in [0, 1], and P is deemed an occurrence of M if conf(M → P ) > δ, with δ a threshold. By analogy M i → P i denotes the occurrence of model segment M i on image segment P i (with i ∈ {1, 2}).. The algorithm follows three steps: 1. Sampling. Sample 100 equally spaced points from the initial model shape, giving the point set S (Fig. 6a). 2. Backmatching. Match S back to each training window w ∈ W by doing: 2.1 Alignment. Translate, scale, and stretch S so that its bounding-box aligns with w ( Fig. 6b-left) . This provides the initialization for the shape matcher. 2.2 Shape matching. Let E be the point set consisting of the edgels inside w. Put S and E in point-to-point correspondence using the non-rigid robust point matcher TPS-RPM (Chui and Rangarajan 2003) (Thin-Plate Spline Robust Point Matcher) . This estimates a TPS transformation from S to E, while at the same time rejecting edgels not corresponding to any point of S. This is important, as only some edgels lie on the object boundaries. Section 5.2 presents TPS-RPM in detail, where it is used again for localizing object boundaries in test images. We present an extensive evaluation involving six diverse object classes from two existing datasets (Ferrari et al. 2006; Jurie and Schmid 2004) . After introducing the datasets in the next subsection, we evaluate our approach for learning shape models in Sect. 6.2. The ability to localize objects in novel images, both in terms of bounding-boxes and boundaries, is measured in Sect. 6.3. All experiments are run with the same parameters (no class-specific nor dataset-specific tuning is applied). (Ferrari et al. 2006 ). This dataset features five diverse classes (bottles, swans, mugs, giraffes, apple-logos) and contains a total of 255 images collected from the web. It is highly challenging, as the objects appear in a wide range of scales, there is considerable intraclass shape variation, and many images are severely cluttered, with objects comprising only a fraction of the total image area (Figs. 13 and 18) .

O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Facilitating reuse in hardware models with enhanced type inference High-level hardware modeling is an essential, yet time-consuming, part of system design. However, effective component-based reuse in hardware modeling languages can reduce model construction time and enable the exploration of more design alternatives, leading to better designs. While component overloading and parametric polymorphism are critical for effective component-base reuse, no existing modeling language supports both. The lack of these features creates overhead for designers that discourages reuse, negating any benefits of reuse.This paper presents a type system which supports both component overloading and parametric polymorphism. It proves that performing type inference for any such system is NP-complete and presents a heuristic that works efficiently in practice. The result is a type system and type inference algorithm that can encourage reuse, reduce design specification time, and lead to better designs. Exploring the design space when designing a hardware system is vital to realizing a well-performing design. Hardware complexity has made building high-level system models to explore the design space an essential, yet burdensome and time-consuming, part of system design. Since overall design quality improves as more designs are explored, reducing the time to develop system models can dramatically improve design quality. To reduce development times, others have proposed high-level component-based modeling systems supporting reusable components [3, 9, 11] . Reuse, however, is effective only if components are flexible enough to be used 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 for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, to republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. in a wide range of designs and if using flexible components does not have an overhead so high it precludes their use in practice [11] .. A common mechanism to increase the flexibility of components is to use programming language techniques such as polymorphism. Consider, for example, a component library that contains various ALU models to handle different data types, such as integers and several formats of floating point numbers. While it is possible for the user to specifically select which ALU is appropriate for a processor model being built, forcing the user to make this selection can be cumbersome. Instead these components could be combined into a single overloaded component. This component overloading (also known as ad-hoc polymorphism) allows the system to automatically select an appropriate component implementation by analyzing the relationship of the overloaded component's supported data types to the data types of components connected to it. This frees designers from dealing with less important details regarding typing and allows them to focus on high-level system design issues. Some existing hardware modeling systems, such as Balboa [4] , support this type of polymorphism.. Component overloading reduces the overhead of using a component, but it still requires the implementation of several ALU behaviors, one for each supported data type. A separate class of components, such as queues, memories, and crossbar switches, have highlevel functionality that is independent of the data types they manipulate. Parametric polymorphism frees designers from unnecessary reimplementation of these components by providing a mechanism to build a single implementation for use with many data types. A familiar example of this type of polymorphism is a SystemC [9] component built using a C++ template. In general, a parametrically polymorphic component uses type variables (in C++, template parameters) in place of concrete types in its definition. When such a component is instantiated, the user provides a concrete type for each type variable thus resolving the polymorphism. The compiler uses this information to automatically specialize the component behavior to handle the specified concrete types. For example, a queue model using parametric polymorphism could be instantiated in one part of a system to queue instructions and the same model could be instantiated elsewhere to queue Ethernet packets. The compiler would specialize the queue's behavior to handle the different data types without any user intervention.. Unfortunately, the excessive type instantiations needed when using many parametrically polymorphic components often discourages their use in practice, thus nullifying the model development time benefits they provide. Just as in the case of component overloading, it is possible to build a system that automatically identifies type variable values [15] the output of an instruction fetch unit is connected to a queue, the queue will be storing instruction data and not Ethernet packets.. Unfortunately, building a modeling system which automatically infers type instantiations for parametrically polymorphic components while also selecting implementations of overloaded components is non-trivial. In this paper, we propose a type system for high-level hardware modeling systems that supports both parametric polymorphism and component overloading. We show that the type inference problem for this type system is NP-complete. We then present a heuristic type inference algorithm that automatically infers the type instantiations for parametrically polymorphic components and automatically selects the appropriate implementation for overloaded components. We show that this algorithm has reasonable run-times for models seen in practice.. The remainder of this paper is organized as follows. Section 2 describes the type system, including examples of how the features may be used. Section 3 describes how this type system can be applied to existing systems. Section 4 presents the type inference problem for this type system and a proof of its NP-completeness. Section 5 presents our heuristic type inference algorithm and Section 6 presents an evaluation of the type system and inference algorithm. Section 7 summarizes the contributions and concludes. In this paper, we presented a new type inference algorithm, including heuristics to reduce run-time, for a new structural type sys- tem that supports parametric polymorphism and a disjunctive type that allows component overloading. We show that, despite the NPcompleteness of the inference problem, our algorithm for type inference has reasonable run-times (< 10 seconds) for systems seen in practice. These contributions permit low-overhead use of parametric polymorphism and component overloading, increasing component reuse in practice. This reduces model development times, increases the number of designs that can be explored, and results in better overall design quality.

O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O B O O O O B I O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B O O O O O O B I O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O B O B I O B I O O O O O O O O O O O O O O O O O O O O O O O


Executable specifications for hypothesis-based reasoning with Prolog and Constraint Handling Rules Constraint Handling Rules (CHR) is an extension to Prolog which opens up a spectrum of hypothesis-based reasoning in logic programs without additional interpretation overhead. Abduction with integrity constraints is one example of hypothesisbased reasoning which can be implemented directly in Prolog and CHR with a straightforward use of available and efficiently implemented facilities.The present paper clarifies the semantic foundations for this way of doing abduction in CHR and Prolog as well as other examples of hypothesis-based reasoning that is possible, including assumptive logic programming, hypotheses with priority and scope, and nonmonotonic reasoning.Examples are presented as executable code so the paper may also serve the additional purpose of a practical guide for developing such programs, and it is demonstrated that the approach provides a seamless integration with existing constraint solvers. Abduction in logic programming has proved to be a powerful technique for solving a range of complex problems, and a large number of approaches have been reported, see [1] [2] [3] [4] for overview. Most known systems are based on metalevel architectures which means that abductive logic programs are interpreted by other logic programs rather than being compiled in an efficient way.. We see abduction as one example within a class of more general hypothesisbased reasoning paradigms. The advantages of abduction are its straightforward declarative specification and the fact that a large class of relevant problems fits naturally into the framework: given an observation O, the task is to find an abductive explanation A which is a set of hypotheses which, when added to the current knowledge base, can explain O and does not introduce inconsistencies. The observation O may be observed symptoms of a malfunctioning system, and A a diagnosis for what may have caused O; or O can represent a desired goal to be achieved and A a set of requirements that must be present in order to reach that goal, e.g., a plan of primitive actions to be performed. While abduction concerns the creation of single sets of hypotheses that can explain the top query, there are other and more dynamic ways to apply hypotheses during a computation, as will be shown below.. In the present paper, we consider general hypothesis-based reasoning realized using available and efficiently implemented logic programming technology in a direct way, which eliminates any interpretative overhead. More specifically, we suggest prolog as an overall driver engine (and, as knowledge specification language) with Constraint Handling Rules, chr, complementing the ability to manage hypotheses by declarative specifications and efficient implementation. While chr was originally conceived as a declarative programming language for writing constraint solvers, it has proved to be suited for what we have called hypothesis-based reasoning. We have taken a top-down approach, defining high-level patterns such as abduction and shown how their semantics can be realized by straightforward mappings into prolog with chr.. This provides generally a high efficiency when compared to implementations based on meta-interpretation, especially when the problem at hand is dominated by deductive steps (such as the db update problem, example 7.1 above) in which case the major part of the work is executed directly by the prolog engine, employing its optimizing compiler.. The main advantages of using prolog and chr in this way may be the very flexible architecture which makes it possible to 1) implement high-level patterns such as abduction in straightforward ways, and 2) "massage" such a pattern to work with different sorts of knowledge bases (such as assumptions) and integrate with existing constraint-solvers in a seamless way. On the negative side, we notice a limited support for negation when we insist on a direct execution, and our tests indicate that some of our chr programs could run considerably faster with better indexing techniques in the underlying engine. However, any future improvement of chr concerning its efficiency and facilities will be of benefit for hypothesis-based reasoning, whether programmed directly in prolog and chr or compiled from high-level specifications into such a platform.

O O O B I O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O B I O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O


A simple model for chunk-scheduling strategies in P2P streaming Peer-to-peer (P2P) streaming tries to achieve scalability (like P2P file distribution) and at the same time meet real-time playback requirements. It is a challenging problem still not well understood. In this paper, we describe a simple stochastic model that can be used to compare different downloading strategies to random peer selection. Based on this model, we study the tradeoffs between supported peer population, buffer size, and playback continuity. We first study two simple strategies: Rarest First (RF) and Greedy. The former is a well-known strategy for P2P file sharing that gives good scalability by trying to propagate the chunks of a file to as many peers as quickly as possible. The latter is an intuitively reasonable strategy to get urgent chunks first to maximize playback continuity from a peer's local perspective. Yet in reality, both scalability and urgency should be taken care of. With this insight, we propose a Mixed strategy that achieves the best of both worlds. Furthermore, the Mixed strategy comes with an adaptive algorithm that can adapt its buffer setting to dynamic peer population. We validate our analytical model with simulation. Finally, we also discuss the modeling assumptions and the model's sensitivity to different parameters and show that our model is robust.Index Terms-Marginal probability model, peer-to-peer (P2P), performance analysis, streaming, video. V IDEO streaming over the Internet is already a widely deployed service. The engineering of video streaming from a server to a single client is well studied and understood. This, however, is not scalable to serve a large number of clients simultaneously. In recent years, a clever solution has emerged, peer-to-peer (P2P) video streaming, which works surprisingly well. A number of commercial systems are in service today, such as [1] and [2] .. The idea is very simple: Let the peers, other users interested in the same content, help the source of the content in its distribution. The more peers are interested in the content, the more helpers in distributing the content, so it becomes scalable. The Manuscript received August 10, 2009 ; accepted June 06, 2010; approved by IEEE/ACM TRANSACTIONS ON original mechanism is P2P file sharing. Each peer obtains an entire file before this possession is known by others. Other peers may then request for the file. This mechanism is quite adequate for small files, such as a picture or an audio file. For a large file, be it video, software, or other content, this mechanism can incur a large delay. It is like a store-and-forward system without pipelining.. A new kind of P2P algorithm soon got developed, known as P2P file downloading. The most well-known example is BitTorrent [3] . In this case, the file is divided into a number of chunks. In trying to download a file, a peer simultaneously engages in downloading (or, more precisely, sharing) all the chunks of that file. If there are chunks in the file, one can visualize the situation as file-sharing sessions carrying on at the same time. The result is that all peers can become fully engaged in file sharing all the time, and the delay in propagating the whole file to all peers can be minimized. The key is that there needs to be a good schedule of which peer is to get which chunk from which other peer at each moment.. There are two main approaches to this scheduling problem: structured and unstructured. In the first case, the basic idea is to form distribution trees, each a spanning tree from the source to all the peers. The chunks of the file are distributed via different trees in a round-robin fashion. The amount of service each peer provides is related to the total out-degree it has in these spanning trees, and the timing of the service depends on the peer's position in different trees. The challenge of the structured approach is to come up with the distribution trees that fully utilize all the peers, which intuitively will also minimize delay. The difficulty with this approach is how to deal with peer churn and how to get the peers to provide their information reliably for such centralized planning. In the second case, there is no structure; peers just download from each other based on local information of what is available and what is needed. Besides selecting which chunks to download (share), each peer must select which neighbor peer to exchange with (known as peer selection) and how fast to request and serve others (we call that load balancing). All these mechanisms can be implemented as distributed algorithms, as exemplified by BitTorrent [3] and several other systems [1] , [2] . Perhaps due to its simplicity (being distributed) and robustness (to peer churn), the unstructured approach is very popular in practice. It is quite surprising that the seemingly rather chaotic unstructured approach works at all. Thus, the unstructured approach is also receiving a lot of attention from the academic community [4] - [17] .. P2P streaming can be thought of as a special case of P2P file downloading. The focus of P2P streaming is no longer only delay and throughput, but also the more stringent playback performance. For this reason, some algorithms that are considered optimal for file downloading may not be optimal for streaming. 1 In the study of P2P content distribution algorithms, whether it is for file downloading or video streaming, practice is leading theory. In practice, chunk-selection, peer-selection, and load-balancing algorithms must all be considered and designed to work together to achieve the best results. The methodology for evaluation is often based on controlled network experiments, such as PlanetLab, Emulab, or experimental deployment in campus networks. Practical systems are usually designed to be upgradable so that new versions can be tested in real-life environments. In spite of the success of practice, there is still great interest in theoretical models of these P2P distributed algorithms that are able to provide the insights of why these algorithms work, explain the design tradeoffs, and provide a way to understand the robustness, i.e., the sensitivity of these algorithms to various system parameters.. In the theoretical models of P2P algorithms, it is usually not possible to model all the aspects (chunk selection, peer selection, and load balancing) at the same time. To focus on one aspect (or two) only, it is possible to assume an abstract setting in which only one problem is relevant. For example, in studying chunk-selection algorithms, we can assume peer selection is random, and all peers have the same capacity so that there is no need for load balancing. This is the approach taken by [5] and [6] . In [10] , in order to focus on the load-balancing problem, it is assumed that all peers already have all the content so that chunk selection is not needed.. The main results of the current paper are already published in [9] . The Zhou-Chiu-Lui model in [9] models the buffer state of peers; by assuming homogeneous peers, 2 and by making an approximation via an independence assumption, 3 it is possible to write down the probability of buffer occupancy in terms of a set of differential equations. Hence, the continuity, or the playback performance, can be explicitly computed and studied relative to various chunk-selection algorithms and system parameters. This analysis allows us to understand the basic tradeoffs in chunk selection and propose a near-optimal yet practical algorithm. In this paper: 1) to improve the presentation, we reorganize and restate the lemmas and propositions; 2) we discuss the optimality of the proposed algorithms, based on an upper bound; 3) we add a detailed discussion of the contribution of these results by comparing it to some recent and significant related works.. The organization of the paper is as follows. Section II discusses the basic probabilistic model. Section III goes into the details of how to model different chunk-selection strategies. Section IV provides various numerical examples, solved by both the discrete and the continuous version of our model, as well as validated by simulation. Section V discusses the reasonableness of the assumptions in our model, while Section VI describes application of our protocol to real protocol design. The conclusion is given in Section VII. 1 This is the reason that some results in our paper are somewhat different from the conclusions in other recent papers [5] , [7] , [15] . We will discuss this point in more detail in the Section VI.. 2 All the peers are probabilistically the same. 3 All the buffer positions can be considered independently. The art of modeling is on the one hand to capture the essential aspects of the original system, and on the other hand to be simple 12 To be fair, from a practical perspective, two other works on P2P streaming that preceeded [9] are very influential. One is Coolstreaming [4] , which first demonstrated convincingly by experiments that P2P streaming based on unstructured algorithms can work. The other is BiTos [15] , which showed a mixed strategy works well, although their mixed strategy is somewhat different than that in [9] and there was no analysis in [15] to back the idea up. enough to yield some insights about the original system. We feel that is what our model accomplished for the P2P streaming problem. In addition, the insights from our model also lead to some practical algorithm that can be incorporated into well-established systems as improvements.. There are a number of interesting directions for further studies. We believe the simple probability model can be extended to analyze other chunk-selection and peer-selection algorithms. The buffer requirements for P2P streaming are not the focus of this study and can certainly be more thoroughly analyzed. Finally, whether there exists an optimal strategy is still an open problem. This time, the right-hand side of these equations are again the same except for the sign (and index off by 1). This gives us When there are peers in the network, , which is the probability the server selects it for sending the newest chunk. From (11), we have . Therefore, we have . Proof of Lemma 3: Assume and , which covers all the chunk-selection strategies we are interested in. We get the following solution for the differential equation:

O O O O O O O O B B I B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B I B B O O B O O O O O O O O O O O O B B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I B B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O B B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Domain-dependent Information Gathering Agent A universal agent should be capable of gathering information from arbitrary heterogeneous sites and offer intelligent information services on its own based on information so gathered. We present a domain-dependent agent for information gathering. It can visit an arbitrary domain-related site by observing a user perform the first query. By understanding key concepts of the first query, the agent performs subsequent queries autonomously. When a user asks the agent about a particular item, the agent gathers relevant information from various sites. The major advantage of the agent is a semiautomatic creation of a wrapper around a particular site with few human interventions. We have implemented two versions of such information-gathering agents: ShinA (SHoppINg Assistant) for e-trading tasks, and EMA (EMployment Agent), which performs employment and job related functions over the Internet. Internet services offer several advantages over the classical ones, and are already changing the way companies, customers, and users perform their activities. But the rapid growth of the Internet has resulted in an explosion of available information and online services. To make things worse, the Internet is poorly structured, and disorganized (Lewis, 1999) . There are millions of heterogeneous Internet sites offering various services, which makes the Internet unintelligible for any single user conducting a nontrivial task. Therefore, serviceability of the Internet depends to a large degree on the amount of automated uniform user-friendly services, systems, and tools (Levy, 2000; Pazienza, 1997) .. The negative side of the Internet success is evident when one wants to gather relevant information. One of the first solutions to cope with information overload were search engines. Typically, a user provides a couple of keywords, and a search engine finds links to relevant sites.. This simple approach has several drawbacks. A search engine proposes only simple links to hopefully relevant sites. A user must still follow the links manually, and further browse for the desired information (Balabanovic & Shoham, 1995) . Some of the links point to vast databases with specialized interfaces. This forces the user to get acquainted with new interfaces, and slows down the user even more. In addition, this approach favors largest information providers due to name-branding and time optimization. As a result, this largely reduces the basic advantage of the Internet. To further complicate matters, a user is unaware of changes in already visited sites unless he or she revisits the sites frequently.. A rather simple solution is to provide alert services when a relevant site changes. E.g., several ecommerce sites already allow shoppers to order price alerts that notify a shopper when the price of a product changes, or falls below a specified amount. But some of the services require lengthy surveys to be filled out before they can be used, while at the same time they may provide little or no personalization. It is also undesirable that such services weaken user privacy (Jakobsson, 1998) .. Another approach involves voluntary ratings and reviews of sites by users, resulting in personalization and recommendations. Again, this takes a lot of user time and introduces problems with privacy. In addition, recommendation systems effectively reduce the size of the marketplace and introduce bias, as it is difficult to obtain a sufficient number of ratings for every existing vendor, and to control the reliability of the sources (Pivk, 2001; Basu, Hirsh & Cohen, 1998; Schafer, Konstan & Riedl, 1999) .. In this paper we present solutions of the problem of information gathering. We propose a domaindependent information-gathering agent that extends the existing approaches by providing automatic uniformity, user autonomy, and privacy. We implemented two systems: a semi-uniform intelligent agent for employment tasks (Gams, 2001) and for ecommerce (Pivk & Gams, 2000) . Our principal goal was to improve accessibility and expand the benefits of existing information-gathering approaches.. The paper is organized as follows: In Section 2 we describe agents, in Section 3 wrappers, in Section 4 the algorithm, in Section 5 the implementation for employment tasks, and in Section 6 for e-trading.. Related work is described in Section 7. We summarize our ideas in Conclusion. We have proposed a general domain-dependent information-gathering agent. The system has been implemented in several versions of the two basic applications: EMA for employment, and ShinA for ecommerce. The agent successfully constructs correct wrappers for "reasonable" domain-dependent databases without assuming many structural constraints.. The agent contains a quick, simple and robust inductive learning algorithm that automatically generates wrappers. The extension of the learning method is memory-based learning of success rates of particular queries. This makes it possible to adapt to user habits and to changes at visited sites.. There are some limitations in our current system. Firstly, we have assumed that users give a proper URL and path for the test query. Secondly, each major concept must contain a uniform structure. We think that this is not a severe restriction since most domain-related databases stores that produce semistructured entity information, contain the same attributes. Thirdly, we only extract the major information from an entity description that may also contain several other attributes. Lastly, the system relies heavily on HTML. If an Internet site provides information exclusively by embedding it in graphics or using Java, the system will be unable to handle the site.. Overall, the idea of semi-automatic informationgathering from heterogeneous Internet-based databases is becoming technologically mature. The problems we have been facing during implementations were not of principal matter. Technically, similar systems seem to be close to fullscale implementation. One can imagine a uniform eshopping agent visiting and gathering information from all e-shopping databases on the Internet.. We believe that this technique can also be applied to other information integration systems for heterogeneous information sources. BargainFinder (Krulwich, 1995) and Jango (Jango) are first-stage comparison shoppers. They specify functions that agents must have in order to be applied to Electronic Commerce. Both systems employ the manual rule extraction method.. ShopBot (Doorenbos, Etzioni & Weld, 1997) , like our system, suggests an automatic rule extraction technique by analyzing and learning the shopping sites. In order to integrate specific product information, Shopbot first removes irrelevant information such as advertisements by using an inductive learning mechanism and then extracts necessary product information. Shopbot, however, uses several strong biases about the structure of HTML and the display format of product search results to learn. Therefore, Shopbot is unable to learn a shopping site that does not conform to these strong biases. By contrast, the only bias in our method is that the result of a product search should be displayed in a semi-structured way, that is, each product description unit has the same output format, which conforms to almost all shopping sites. We expect our method to function more robustly than Shopbot. The thesis can be verified by empirically testing the success rate of correct wrapper constructions. We plan to measure the performance of our agents in the near future.. PersonaLogic is a comparison-shopping system that compares specific products themselves rather than shopping sites.. Kasbah, AuctionBot, and Tete-a-Tete (see References) are negotiation mediators with which users can buy and sell products based on negotiation strategies between agents in the virtual marketplace. They do not enter e-commerce sites in an automatic or semi-automatic way like our agents do.. To our knowledge, today's commercial comparison shoppers, including MySimon, PriceWatch, and BottomDollar all employ manual rule extraction methods, and consequently suffer from reduced scalability, and the ability to incorporate new e-stores and adapt to changes in incorporated stores. The algorithm consists of two major phases: ShinA's Web interface is shown in Fig. 1 . Unlike EMA, ShinA is a dedicated system without modules for translation, speech, and large amount of locally stored data. However, the core task of parsing and understanding heterogeneous sites is more difficult in e-commerce than in employment because of higher diversity of e-stores.. The ShinA system has been implemented on a Windows 2000 operating system, running Apache HTTP Server, version 1.3. As developing tools, JDK 1.3.1 and Jakarta Tomcat 3.2 were used. The system is written in Java and is based on servlet/JSP. It consists of approximately 10 thousand lines of code. Tomcat is a servlet container that is used in the official Reference Implementation for the Java Server and JavaServer Pages technologies. Both Apache Server and Tomcat are developed in an open and participatory environment and therefore freely available.

O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Resource space view tour mechanism The Resource Space Model is a new semantic data model for managing various resources.Based on the model, this paper proposes a view mechanism for finding and reusing legacy Resource Spaces according to users' idiosyncratic interests. It establishes flexible reorganizing mechanism of legacy Resource Spaces to reduce redundant work. As a viewpoint organization strategy, the resource subject tree is proposed as an effective way to discover desirable Resource Space views. A case study is presented to demonstrate the proposed approach. Zhuge's Resource Space Model RSM is a novel semantic data model based on orthogonal classification semantics, a set of normal forms and operations together with the normalization and integrity theories to efficiently locate and operate versatile web resources with a universal resource view [11, 12, 13, 14, 15, 16] . Recently, it develops towards a decentralized RSM by incorporating Peer-to-Peer network and probability [17] .. Legacy Resource Spaces contain rich domain knowledge and well-organized resources. To reuse legacy Resource Spaces with respect to specific interests, this paper focuses on the following two issues:. (1) Establishing a flexible reorganizing mechanism of legacy Resource Spaces in the interconnection environment.. (2) Providing an effective way to discover desirable reorganized Resource Spaces. This paper proposes the Resource Space view to solve the first issue. The view mechanism includes the view construction and the resource fragmentation. The resource fragmentation is a distributed application pattern set that guides the process of the view construction. A view can be regarded as the result of iteratively applying the fragmentation patterns. A Resource Space view as a representational scheme provides a viewpoint on a resource collection together with a resource accessing mechanism. For a Resource Spaces centric application, a view is the major medium that reifies a viewpoint. A resource subject tree as a viewpoint organization strategy is proposed to establish an explicit association between Resource Space views and resource subjects. With the knowledge synergy of the electronic index, the semantic network and ontology, the subject tree owns the traits of explicit semantics and intuitive navigation concerning human cognition, which makes the rapid resource viewpoint tour possible [5, 6, 10] . This paper proposes to use the Resource Space view and the resource subject tree to construct a viewpoint tour mechanism for RSM. It can reduce redundant work and make Resource Spaces applicable to a wider range. The approach facilitates manifold applications with minimal customization and broadens the coverage of the Resource Space centric resource sharing.. Further, the resource viewpoint organization relieves the discrepancy between human cognitive world and the resource world. So it makes users easier to locate resources than the unstructured resource browsing, as illustrated in the study case. Moreover, the investigation on the resource fragmentation, involving the basis of the distributed Resource Space application, has been preliminarily illustrated in the e-Science platform.

B I I O O O B I I O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O B I I O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Supermartingales in Prediction with Expert Advice We apply the method of defensive forecasting, based on the use of game-theoretic supermartingales, to prediction with expert advice. In the traditional setting of a countable number of experts and a finite number of outcomes, the Defensive Forecasting Algorithm is very close to the wellknown Aggregating Algorithm. Not only the performance guarantees but also the predictions are the same for these two methods of fundamentally different nature. We discuss also a new setting where the experts can give advice conditional on the learner's future decision. Both the algorithms can be adapted to the new setting and give the same performance guarantees as in the traditional setting. Finally, we outline an application of defensive forecasting to a setting with several loss functions. The framework of prediction with expert advice was introduced in the late 1980s. In contrast to statistical learning theory, the methods of prediction with expert advice do not require statistical assumptions about the source of data. The role of the assumptions is played by a "pool of experts": the forecaster, called Learner, bases his predictions upon the predictions and performance of the experts. For details and references, see the monograph [6] .. Many methods for prediction with expert advice are known. This paper deals with two of them: the Aggregating Algorithm [24] and defensive forecasting [26] . The Aggregating Algorithm (the AA for short) is a member of the family of exponential-weights algorithms and implements a Bayesian-type aggregation; various optimality properties of the AA have been established [25] . Defensive forecasting is a recently developed technique that combines the ideas of gametheoretic probability [21] with Levin and Gács's ideas of neutral measure [10, 16] and Foster and Vohra's ideas of universal calibration [8] .. The idea of defensive forecasting comes from an interpretation of probability with the help of perfect information games. The Learner develops his strategy modeling a game where a probability forecaster plays on the actual data against an imaginary opponent, Sceptic, that represents a law of probability. The capital of Sceptic tends to infinity (or becomes large) if the players' moves lead to violation of this law. The capital of a strategy for Sceptic as a function of other players' moves is called a (game-theoretic) supermartingale. It is known (see Lemma 4 in this paper) that for any supermartingale there is a forecasting strategy that prevents this supermartingale from growing ("defending" against this strategy of Sceptic), thereby forcing the corresponding law of probability. The older versions of defensive forecasting (see, e.g., [26] ) minimize Learner's actual loss with the help of the following trick: a forecasting strategy is constructed so that the actual losses (Learner's and experts') are close to the (one-step-ahead conditional) expected losses; at each step Learner minimizes the expected loss (that is, the law of probability used in this case is the conjunction of several laws of large numbers). This paper gives a self-contained description of a different version of the defensive forecasting method. We use certain supermartingales and do not need to talk about the underlying laws of probability.. Defensive forecasting, as well as the AA, can be used for competitive online prediction against "pools of experts" consisting of all functions from a large function class (see [27, 28] ). However, the loss bounds proved so far are generally incomparable: for large classes (such as many Sobolev spaces), defensive forecasting is better, whereas for smaller classes (such as classes of analytical functions), the AA works better. Note that the optimality results for the AA are obtained for experts that are free agents, not functions from a given class; thus we need to evaluate the algorithms anew. This general task requires a deeper understanding of the properties of defensive forecasting.. In this paper, the AA and defensive forecasting are discussed in the simple case of a finite number of outcomes. Learner competes with a countable pool of Experts Θ. Experts and Learner give predictions and suffer some loss at each step. A game is a specification what predictions are admissible and what losses a prediction incur for each outcome. For every game, we are interested in performance guarantees of the form. where L N is the cumulative loss of Learner and L θ N is the cumulative loss of Expert θ over the first N steps, c is some constant and a θ depends on θ only. Section 2 recalls the AA and its loss bound (Theorem 1) and introduces notation used in the paper.. Section 3 presents the main results of the paper. Subsection 3.1 describes the Defensive Forecasting Algorithm (DFA), which is based on the use of gametheoretic supermartingales, and its loss bound (Theorem 5). It turns out that if the AA and the DFA are both applicable to a game, they guarantee the same loss bound. Subsections 3.3-3.6 discuss when the DFA and the AA are applicable. Loosely speaking, if the DFA is applicable then the AA is applicable as well (Theorem 9); and for games satisfying some additional assumptions, if the AA is applicable then the DFA is applicable (Theorems 13 and Theorem 20). Subsection 3.7 gives a criterion of the AA realizability in terms of supermartingales (Theorem 22) using a rather awkward variant of the DFA. The construction of the supermartingales used in this paper involves a parameterization of the game with the help of a proper loss function. Proper loss functions play an important role in Bayesian statistics, and their meaning in our context is discussed in Subsections 3.4 and 3.6.. The rest of the paper is devoted to modifications of the standard setting. Subsection 3.8 applies the DFA in an extended setting where the outcomes form a finite-dimensional simplex. Section 4 introduces a new setting for prediction with expert advice, where the experts are allowed to "second-guess", that is, to give "conditional" predictions that are functions of the future Learner's decision (cf. the notion of internal regret [9] ). If the dependence is regular enough (namely, continuous), the DFA works in the new setting virtually without changes (Theorem 26). The AA with some modification based on the fixed point theorem can be applied in the new setting too (Theorem 29). Section 5 briefly outlines one more application of the DFA: a setting with several loss functions.. Some results of the paper appeared in [29] and in ALT'08 proceedings [4] .

O O B I I I O O O O O O O O O O O O O O O B I I I O O O O O O O O O O O O O O O O O B I I O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I I O O O O O O O O O O O O O O O B I I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I I O O O O O O O O O O B I O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O


Extending Sledgehammer with SMT Solvers Abstract Sledgehammer is a component of Isabelle/HOL that employs resolutionbased first-order automatic theorem provers (ATPs) to discharge goals arising in interactive proofs. It heuristically selects relevant facts and, if an ATP is successful, produces a snippet that replays the proof in Isabelle. We extended Sledgehammer to invoke satisfiability modulo theories (SMT) solvers as well, exploiting its relevance filter and parallel architecture. The ATPs and SMT solvers nicely complement each other, and Isabelle users are now pleasantly surprised by SMT proofs for problems beyond the ATPs' reach. Sledgehammer has enjoyed considerable success since its inception in 2007 and has become indispensable to most Isabelle users. It is possibly the only interface between interactive and automatic theorem provers to achieve such popularity. It owes much of its success to its ease of use: Sledgehammer is integral to Isabelle and works out of the box, using a combination of locally installed provers and remote servers. It can even be configured to run automatically on all newly entered conjectures, in parallel with other proof tools and counterexample generators.. To Isabelle users, the addition of SMT solvers as backends means that they now get more proofs without effort. The SMT solvers, led by Z3, compete advantageously with the resolution-based ATPs and metis even on nonarithmetic problems. In our evaluation, they solved 38 % of the nontrivial goals, increasing Sledgehammer's success rate from 39 % to 45 % on these. Running the SMT solvers in parallel with the ATPs is consistent with our objective of full automation.. To users of SMT solvers, the Sledgehammer-SMT integration eases the transition from automatic proving in first-order logic to interactive proving in higher-order logic. Other tools, such as HOL-Boogie [16] , assist in specific applications. Isabelle/ HOL is powerful enough for the vast majority of hardware and software verification efforts, and its LCF-style inference kernel provides a trustworthy foundation. Even the developers of SMT solvers profit from the integration: It helps them reach a larger audience, and proof reconstruction brings to light bugs in their tools, including soundness bugs, which might otherwise go undetected. 6 The recent work by Guttmann et al. on a large Isabelle/HOL repository of algebras for modeling computing systems [29] constitutes an unanticipated validation of our work: They relied almost exclusively on Sledgehammer and the SMT integration to prove over 1,000 propositions, including intricate refinement and termination theorems. To their surprise, they found that Sledgehammer can often automate algebraic proofs at the textbook level.. While the evaluation and user feedback show that the integration is a resounding success, much can still be improved. More work is needed to reconstruct Z3 proofs involving bit vectors and algebraic datatypes [15] . The heuristics for trigger generation are simplistic and would probably benefit from more research.. With the notable exceptions of triggers and weights, we treated the SMT solvers as black boxes. A tighter integration might prove beneficial, as has been observed with other verification tool chains (e.g., VCC/Boogie/Z3 [22] and PVS/SAL/Yices [52] ), but it would also require much more work. Obtaining an unsatisfiable core from CVC3 and Yices would be a first small step in the right direction. When evaluating the provers for the CADE paper, we were surprised to find that Z3 outperformed the ATPs by a wide margin. We advanced several explanations, which can now be revisited in the light of new empirical results.. -Unsound ATP encoding of types: Until recently, Sledgehammer's encoding of types in unsorted first-order logic was unsound. 5 About 5 % of the proofs found We know of very little other work that is comparable to Sledgehammer with regard to key features such as full automation (no need for the user to prepare the problem in any way), proof reconstruction (no assumption that externally found proofs are correct), and source code delivery (no need to run the external reasoners again when replaying a proof). And no other work ever enjoyed the same widespread deployment. Therefore, we use the phrase "related work" in a loose sense.

O O O B I O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O B I O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O O