The design of modern proof assistants is faced with several sometimes conflicting goals, including scalability, extensibility, and soundness of proof checking. In this paper, we propose a new design for proof assistants, in an attempt to address some of these difficulties. The new design is characterized by a pervasive use of macros in representing and checking proofs, and a foundational format for theory files based on JSON. We realize these ideas in a prototype proof assistant called holpy, implemented in Python. We also demonstrate how proof automation can be extended using Python under this framework. Finally, we present a case study about a simple imperative language.
Lean @cite_10 already proposed the use of macros to shorten proof terms. However, this functionality does not appear to be widely used in user-defined theories. The virtual machine for Lean evaluates operations on natural numbers, integers, and arrays directly using C++ functions, rather than within the logic, resulting in a large speedup in many applications @cite_3 . The main difference in our work is that definition of macros is easily accessible and widely applied at the user level. We also demonstrate the use of macros in logical foundations without explicit Curry-Howard correspondence.
@cite_10 @cite_3
1464569014 2753707546
We report on the design and preliminary evaluation of a short introductory course on interactive theorem proving and program verification using the Coq proof assistant, targeted at students with background in functional programming and software engineering. The course builds on concepts familiar from functional programming to develop understanding of logic and mechanized proving by means of the Curry-Howard isomorphism. A particular emphasis is made of the computational nature of decidable properties of various data structures. This approach is of practical importance, as Coq’s normalization can automatically simplify or discharge such properties, thus reducing the burden of constructing the proofs by hand. As a basis for teaching this style of mechanization, we use ’s Ssreflect extension of Coq and its associated libraries. In the course, we minimize the exposure to ad-hoc proof automation via tactics, and request that students develop proofs using only a small set of proof-building primitives that they should clearly understand. In addition to introducing logic as an application of functional programming, the topics covered by the course include: implementation of custom rewriting principles as instances of indexed type families, boolean reflection, implementation of algebraic structures and inheritance between them, and verification of imperative programs in separation logic and Hoare Type Theory. In heterogeneous networks, a macro cell can cause excessive interference to users in co-channel pico cells. In Release 10 of 3GPP's LTE system, enhanced Inter-Cell Interference Coordination (eICIC) has been introduced to reduce the interference experienced by pico users by having the macro mute some of its subframes. This is a tradeoff, because the benefit to pico users comes at the cost of the macro sacrificing a portion of its resources. This tradeoff is also influenced by the determination of which users are offloaded from the macro to the pico. We formulate the joint optimization of the proportion of muted sub-frames and the assignment of users to macro and pico cells as a network-wide utility maximization problem, and obtain an analytical characterization of the optimal solution. We propose an iterative algorithm that successively improves the assignment of users to cells and the muting proportion, and prove its convergence to the optimal solution. We propose natural proofs for reasoning with programs that manipulate data-structures against specifications that describe the structure of the heap, the data stored within it, and separation and framing of sub-structures. Natural proofs are a subclass of proofs that are amenable to completely automated reasoning, that provide sound but incomplete procedures, and that capture common reasoning tactics in program verification. We develop a dialect of separation logic over heaps, called Dryad, with recursive definitions that avoids explicit quantification. We develop ways to reason with heaplets using classical logic over the theory of sets, and develop natural proofs for reasoning using proof tactics involving disciplined unfoldings and formula abstractions. Natural proofs are encoded into decidable theories of first-order logic so as to be discharged using SMT solvers. We also implement the technique and show that a large class of more than 100 correct programs that manipulate data-structures are amenable to full functional correctness using the proposed natural proof method. These programs are drawn from a variety of sources including standard data-structures, the Schorr-Waite algorithm for garbage collection, a large number of low-level C routines from the Glib library and OpenBSD library, the Linux kernel, and routines from a secure verified OS-browser project. Our work is the first that we know of that can handle such a wide range of full functional verification properties of heaps automatically, given pre post and loop invariant annotations. We believe that this work paves the way for deductive verification technology to be used by programmers who do not (and need not) understand the internals of the underlying logic solvers, significantly increasing their applicability in building reliable systems. The Internet gives individuals more choice in political news and information sources and more tools to filter out disagreeable information. Citing the preference described by selective exposure theory — people prefer information that supports their beliefs and avoid counter-attitudinal information — observers warn that people may use these tools to access only agreeable information and thus live in ideological echo chambers. We report on a field deployment of a browser extension that showed users feedback about the political lean of their weekly and all time reading behaviors. Compared to a control group, showing feedback led to a modest move toward balanced exposure, corresponding to 1-2 visits per week to ideologically opposing sites or 5-10 additional visits per week to centrist sites. Analysis of social networks is suggested as a tool for linking micro and macro levels of sociological theory. The procedure is illustrated by elaboration of the macro implications of one aspect of small-scale interaction: the strength of dyadic ties. It is argued that the degree of overlap of two individuals' friendship networks varies directly with the strength of their tie to one another. The impact of this principle on diffusion of influence and information, mobility opportunity, and community organization is explored. Stress is laid on the cohesive power of weak ties. Most network models deal, implicitly, with strong ties, thus confining their applicability to small, well-defined groups. Emphasis on weak ties lends itself to discussion of relations between groups and to analysis of segments of social structure not easily defined in terms of primary groups. We present a framework for generating content-adaptive macros that can transfer complex photo manipulations to new target images. We demonstrate applications of our framework to face, landscape, and global manipulations. To create a content-adaptive macro, we make use of multiple training demonstrations. Specifically, we use automated image labeling and machine learning techniques to learn the dependencies between image features and the parameters of each selection, brush stroke, and image processing operation in the macro. Although our approach is limited to learning manipulations where there is a direct dependency between image features and operation parameters, we show that our framework is able to learn a large class of the most commonly used manipulations using as few as 20 training demonstrations. Our framework also provides interactive controls to help macro authors and users generate training demonstrations and correct errors due to incorrect labeling or poor parameter estimation. We ask viewers to compare images generated using our content-adaptive macros with and without corrections to manually generated ground-truth images and find that they consistently rate both our automatic and corrected results as close in appearance to the ground truth. We also evaluate the utility of our proposed macro generation workflow via a small informal lab study with professional photographers. The study suggests that our workflow is effective and practical in the context of real-world photo editing. Mobile operators are facing increasing energy prices to operate their networks. At the same time, the demand for broadband wireless access is steadily increasing, driven by the success of smart phones and new services like machine-to-machine communication. In this paper we propose and evaluate a novel asymmetric user assignment scheme, which enables operators to save energy, while satisfying the capacity demands. The main innovation is to separate the association of users to base stations in uplink and downlink, such that in macro micro overlay scenarios parts of the radio access network can be switched off. Based on system-level simulations we show that our scheme enables energy savings of up to 15 and 60 over typical macro and micro cell deployments, respectively. We further discuss its technical feasibility and implications on the system design. All numerical results are obtained in accordance with the guidelines and requirements of IMT-Advanced systems. Existing research suggests that a considerable fraction (5-10 ) of the source code of large scale computer programs is duplicate code ("clones"). Detection and removal of such clones promises decreased software maintenance costs of possibly the same magnitude. Previous work was limited to detection of either near misses differing only in single lexems, or near misses only between complete functions. The paper presents simple and practical methods for detecting exact and near miss clones over arbitrary program fragments in program source code by using abstract syntax trees. Previous work also did not suggest practical means for removing detected clones. Since our methods operate in terms of the program structure, clones could be removed by mechanical methods producing in-lined procedures or standard preprocessor macros. A tool using these techniques is applied to a C production software system of some 400 K source lines, and the results confirm detected levels of duplication found by previous work. The tool produces macro bodies needed for clone removal, and macro invocations to replace the clones. The tool uses a variation of the well known compiler method for detecting common sub expressions. This method determines exact tree matches; a number of adjustments are needed to detect equivalent statement sequences, commutative operands, and nearly exact matches. We additionally suggest that clone detection could also be useful in producing more structured code, and in reverse engineering to discover domain concepts and their implementations. Media outlets and pundits have been quick to embrace online social networks to disseminate their own opinions. But pundits’ opinions and news coverage are often marked by a clear political bias, as widely evidenced during the fiercely contested 2012 U.S. presidential elections. Given the wide availability of such data from sites like Twitter, a natural question is whether we can quantify the political leanings of media outlets using OSN data. In this work, by drawing a correspondence between tweeting and retweeting behavior, we formulate political leaning estimation as an ill-posed linear inverse problem. The result is a simple and scalable approach that does not require explicit knowledge of the network topology. We evaluate our method with a dataset of 119 million election-related tweets collected from April to November, and use it to study the political leaning of prominent tweeters and media sources. The Signal to Interference Plus Noise Ratio (SINR) on a wireless link is an important basis for consideration of outage, capacity, and throughput in a cellular network. It is therefore important to understand the SINR distribution within such networks, and in particular heterogeneous cellular networks, since these are expected to dominate future network deployments . Until recently the distribution of SINR in heterogeneous networks was studied almost exclusively via simulation, for selected scenarios representing pre-defined arrangements of users and the elements of the heterogeneous network such as macro-cells, femto-cells, etc. However, the dynamic nature of heterogeneous networks makes it difficult to design a few representative simulation scenarios from which general inferences can be drawn that apply to all deployments. In this paper, we examine the downlink of a heterogeneous cellular network made up of multiple tiers of transmitters (e.g., macro-, micro-, pico-, and femto-cells) and provide a general theoretical analysis of the distribution of the SINR at an arbitrarily-located user. Using physically realistic stochastic models for the locations of the base stations (BSs) in the tiers, we can compute the general SINR distribution in closed form. We illustrate a use of this approach for a three-tier network by calculating the probability of the user being able to camp on a macro-cell or an open-access (OA) femto-cell in the presence of Closed Subscriber Group (CSG) femto-cells. We show that this probability depends only on the relative densities and transmit powers of the macro- and femto-cells, the fraction of femto-cells operating in OA vs. Closed Subscriber Group (CSG) mode, and on the parameters of the wireless channel model. For an operator considering a femto overlay on a macro network, the parameters of the femto deployment can be selected from a set of universal curves. Macro-operator ("macro", for short) generation is a well-known technique that is used to speed-up the planning process. Most published work on using macros in automated planning relies on an offline learning phase where training plans, that is, solutions of simple problems, are used to generate the macros. However, there might not always be a place to accommodate training. In this paper we propose OMA, an efficient method for generating useful macros without an offline learning phase, by utilising lessons learnt from existing macro learning techniques. Empirical evaluation with IPC benchmarks demonstrates performance improvement in a range of state-of-the-art planning engines, and provides insights into what macros can be generated without training. This paper proposes a decentralized interference control scheme for an OFDMA (Orthogonal Frequency Division Multiple Access) cellular scenario where multiple macrocells and femtocells are deployed. In particular, we model the distributed resource allocation problem by means of a potential game, which is demonstrated to converge to a unique and pure Nash equilibrum. In this game, the femto base stations are the players, their actions are the resource blocks and the corresponding power levels to be allocated for downlink transmission, and the utility is designed to guarantee coexistence with the macro system, guaranteeing a fair tradeoff between femto and macro systems' performances. To do that, the utility function does not only consider the capacity of the femtocells, but also the different sources of inter-system interference: macrocell to femtocell, femtocell to femtocell, and femtocell to macrocell. The game is solved by applying a better response dynamic, which first selects the best resource blocks allocation policy for the femtousers, and then selects the most appropriate power levels for each resource block, through the solution of the corresponding convex optimization problem. Simulation results show that the introduction of femtocells in the scenario increases the total system capacity, and that the considered utility function provides an improvement in macro system performance of up to 40 , while reducing the femto capacity only up to 7 , with respect to the well known iterative waterfilling game. Purpose – The purpose of this paper is to suggest an alternative to the widely used Times Cited criterion for analysing citation networks. The approach involves taking account of the natures of the papers that cite a given paper, so as to differentiate between papers that attract the same number of citations.Design methodology approach – ArticleRank is an algorithm that has been derived from Google's PageRank algorithm to measure the influence of journal articles. ArticleRank is applied to two datasets – a citation network based on an early paper on webometrics, and a self‐citation network based on the 19 most cited papers in the Journal of Documentation – using citation data taken from the Web of Knowledge database.Findings – ArticleRank values provide a different ranking of a set of papers from that provided by the corresponding Times Cited values, and overcomes the inability of the latter to differentiate between papers with the same numbers of citations. The difference in rankings between Times Cited ... Dynamic downlink and uplink resource adaptation in TDD (Time Domain Duplex) systems by flexibly changing the ratio of time slots for downlink and uplink transmissions is studied under Heterogonous Network (HetNet) scenarios. The time-scale of the resource adaptation and the interference management between downlink and uplink transmissions from different cells are important factors in determining the achievable level of resource efficiency, user experience and energy saving in TDD systems. In this paper, we apply the dynamic downlink and uplink resource adaptation in multi-cell macro-pico scenarios with co-channel interference. The performance is evaluated in system level for LTE-Advanced TDD configurations. Reconfiguration rates of 10 msec and 640 msec are considered as the time-scale of the dynamic resource adaptation. In addition, the time domain inter-cell interference coordination between the macro cells and the pico cells is applied for handling the high level of interference from macro cells to pico cells in the downlink multi-cell dynamic simulations. Aggregates are functions that take sets as arguments. Examples are the function that maps a set to the number of its elements or the function which maps a set to its minimal element. Aggregates are frequently used in relational databases and have many applications in combinatorial search problems and knowledge representation. Aggregates are of particular importance for several extensions of logic programming which are used for declarative programming like Answer Set Programming, Abductive Logic Programming, and the logic of inductive definitions (ID-Logic). Aggregate atoms not only allow a broader class of problems to be represented in a natural way but also allow a more compact representation of problems which often leads to faster solving times. Extensions of specific semantics of logic programs with, in many cases, specific aggregate relations have been proposed before. The main contributions of this thesis are: (i) we extend all major semantics of logic programs: the least model semantics of definite logic programs, the standard model semantics of stratified programs, the Clark completion semantics, the well-founded semantics, the stable models semantics, and the three-valued stable semantics; (ii) our framework admits arbitrary aggregate relations in the bodies of rules. We follow a denotational approach in which a semantics is defined as a (set of) fixpoint(s) of an operator associated with a program. The main tool of this work is Approximation Theory. This is an algebraic theory which defines different types of fixpoints of an approximating operator associated with a logic program. All major semantics of a logic program correspond to specific types of fixpoints of an approximating operator introduced by Fitting. We study different approximating operators for aggregate programs and investigate the precision and complexity of the semantics generated by them. We study in detail one specific operator which extends the Fitting operator and whose semantics extends the three-valued stable semantics of logic programs without aggregates. We look at algorithms, complexity, transformations of aggregate atoms and programs, and an implementation in XSB Prolog. We propose a new distributed power control scheme for closed access femtocell networks. Since femto APs can be deployed unpredictably in a macro cell area, interference to macro users and interference between femto APs in down-link (DL) cause a severe problem. In this paper, we describe the system model using a noncooperative game model. We formulate a payoff function to provide fairness and to minimize interference. At the same time, we prove that this function can be appeared as a supermodular type. Our power control algorithm based on the game model can be applied to the decentralized environment. This novel power control algorithm leads transmission power to reach a steady state condition, i.e. Nash Equilibrium (NE). Through mathematical analysis and numerical results, we show that our proposed power control algorithm has several good characteristics. Recent trends witness the shift of the 3GPP Long Term Evolution - Advanced (LTE-A) radio access network (RAN) architecture from a traditional macro-cellular layout towards smaller base stations moving closer to end users. The evolved LTE-A RAN offers rich environment for multi-point and multi-hop cooperation and coordination resulting in increased capacity and more predictable channel conditions between heterogeneous base stations and end users. While these opportunities are recently well investigated at the physical layer through various cooperative multi-point (CoMP) schemes, upper layer protocols preserve the design proposed for macro-cellular single-hop data delivery. In this paper, we address this issue by proposing and investigating in detail a cooperative RAN-wide MAC layer protocol based on random network coding (RNC) that is designed specifically for reliable and flexible data delivery over the evolved LTE-A RAN. The proposed RNC-based MAC protocol (MAC-RNC) is evaluated and compared with the existing HARQ-based (MAC-HARQ) protocol in various LTE-A RAN layouts using a customized packet-based link-level simulator based on Finite-State Markov Chain (FSMC) channel models. Our results show that the MAC-RNC protocol introduces simplicity and flexibility required for future LTE-A RANs, while preserving or improving the performance of the MAC-HARQ protocol in traditional single-point single-hop macro-cellular scenarios. A characterization is given of the class of tree translations definable in monadic second-order logic (MSO), in terms of macro tree transducers. The first main result is that the MSO definable tree translations are exactly those tree translations realized by macro tree transducers (MTTs) with regular look-ahead that are single use restricted. For this the single use restriction known from attribute grammars is generalized to MTTs. Since MTTs are closed under regular look-ahead, this implies that every MSO definable tree translation can be realized by an MTT. The second main result is that the class of MSO definable tree translations can also be obtained by restricting MTTs with regular look-ahead to be finite copying, i.e., to require that each input subtree is processed only a bounded number of times. The single use restriction is a rather strong, static restriction on the rules of an MTT, whereas the finite copying restriction is a more liberal, dynamic restriction on the derivations of an MTT. Although virtualization holds numerous merits, it meanwhile incurs some performance loss. As the pivotal component of a virtualization system, the efficiency of virtual machine monitor(VMM) will largely impact the performance of the whole system. Therefore, it's indispensable to evaluate the performance of virtual machine monitors with different virtualization technologies. In this paper, we measure and analyze the performance of three open source virtual machine monitors-OpenVZ, Xen and KVM, which adopt the container-based virtualization, para-virtualization and full-virtualization respectively. We first measure them as a black box about their macro-performance on the virtualization of processor, memory, disk, network, server applications(including web, database and Java) and their micro-performance on the virtualization of system operation and context switch with several canonical benchmarks, and then analyze these testing results by examining their design and implementation as a white box. The experimental data not only show some valuable information for designers, but also provide a comprehensive performance understanding for users. Lean is a new open source theorem prover being developed at Microsoft Research and Carnegie Mellon University, with a small trusted kernel based on dependent type theory. It aims to bridge the gap between interactive and automated theorem proving, by situating automated tools and methods in a framework that supports user interaction and the construction of fully specified axiomatic proofs. Lean is an ongoing and long-term effort, but it already provides many useful components, integrated development environments, and a rich API which can be used to embed it into other systems. It is currently being used to formalize category theory, homotopy type theory, and abstract algebra. We describe the project goals, system architecture, and main features, and we discuss applications and continuing work.