scholarly journals A compiler architecture for domain-specific type error diagnosis

2019 ◽  
Vol 9 (1) ◽  
pp. 33-51
Author(s):  
Alejandro Serrano ◽  
Jurriaan Hage

Abstract Domain-specific languages (DSLs) permeate current programming practices. An important kind of DSLs includes those developed and integrated within a host language, which we call embedded or internal DSLs. Unfortunately, embedded DSLs usually fall short on domain-specific error diagnosis, that is, they do not give control to DSL authors over how errors are reported to the programmer. As a consequence, implementation details of the DSL leak through in error messages, and programmers need to understand the internals of the DSL implementation to fix their code in a productive way. This paper addresses the challenge of building a compiler with integrated support for domain-specific error diagnosis. We assume that the type system is described using a constraint-based approach, and constraint solving is specified using rewrite rules. Domain information can then be injected at constraint gathering time via type rules, during constraint solving via specialized rules and axioms, and finally at blaming and reparation time via transformations. Furthermore, we define error contexts as a way to control the order in which solving and blaming proceeds. We engineer domain-specific error diagnosis in such a way that the compiler can also reuse the techniques for improving general error diagnosis.

10.29007/5zjp ◽  
2018 ◽  
Author(s):  
Sylvia Grewe ◽  
Sebastian Erdweg ◽  
Mira Mezini

\noindent Developing provably sound type systems is a non-trivial task which, as of today, typically requires expert skills in formal methods and a considerable amount of time. Our Veritas~\cite{GreweErdwegWittmannMezini15} project aims at providing support for the development of soundness proofs of type systems and efficient type checker implementations from specifications of type systems. To this end, we investigate how to best automate typical steps within type soundness proofs.\noindent In this paper, we focus on progress proofs for type systems of domain-specific languages. As a running example for such a type system, we model a subset SQL and augment it with a type system. We compare two different approaches for automating proof steps of the progress proofs for this type system against each other: firstly, our own tool Veritas, which translates proof goals and specifications automatically to TPTP~\cite{Sutcliffe98} and calls Vampire~\cite{KovacsV13} on them, and secondly, the programming language Dafny~\cite{Leino2010}, which translates proof goals and specifications to the intermediate verification language Boogie 2~\cite{Leino2008} and calls the SMT solver Z3~\cite{DeMoura2008} on them. We find that Vampire and Dafny are equally well-suited for automatically proving simple steps within progress proofs.


2012 ◽  
Vol 2 (3) ◽  
Author(s):  
Michaela Bačíková ◽  
Jaroslav Porubän

AbstractA graphical user interface (GUI, UI) is an important part of an application, with which users interact directly. It should be implemented in the best way with respect to understandability. If a user does not understand the terms in the UI, he or she cannot work with it; then the whole system is worthless. In order to serve well the UI should contain domain-specific terms and describe domain-specific processes. It is the primary source for domain analysis right after domain users and experts. Our general goal is to propose a method for an automatic domain analysis of user interfaces. First, however, the basic principles and stereotypes must be defined that are used when creating user interfaces and rules must be derived for creating an information extracting algorithm. In this paper these stereotypes are listed and analyzed and a set of rules for extracting domain information is created. A taxonomy of UIs and a taxonomy of components based on their domain-specific information is also proposed. Our DEAL method for extracting this information is outlined and a prototype of DEAL is presented. Also our goals for the future are listed: expanding the prototype for different components and different types of UIs.


10.29007/pmmz ◽  
2018 ◽  
Author(s):  
Sylvia Grewe ◽  
André Pacak ◽  
Mira Mezini

In our ongoing project VeriTaS, we aim at automating soundness proofs for type sys- tems of domain-specific languages. In the past, we successfully used previous Vampire versions for automatically discharging many intermediate proof obligations arising within standard soundness proofs for small type systems. With older Vampire versions, encoding the individual proof problems required manual encoding of algebraic datatypes via the theory of finite term algebras. One of the new Vampire versions now supports the direct specification of algebraic datatypes and integrates reasoning about term algebras into the internally used superposition calculus.In this work, we investigate how many proof problems that typically arise within type soundness proofs different Vampire 4.1 versions can prove. Our test set consists of proof problems from a progress proof of a type system for a subset of SQL. We compare running Vampire 4.1 with our own encodings of algebraic datatypes (in untyped as well as in typed first-order logic) to running Vampire 4.1 with support for algebraic datatypes, which uses SMTLIB as input format. We observe that with our own encodings, Vampire 4.1 still proves more of our input problems. We discuss the differences between our own encoding of algebraic datatypes and the ones used within Vampire 4.1 with support for algebraic datatypes.


Author(s):  
Agnieszka Łętowska

Taxonomies are attempts of ordering world in semantic field. They are also a useful tool of knowledge organization, facilitating domain information retrieval. Taxonomy or thesauri creation requires extensive and thorough analytical process, engaging information and knowledge from variety of sources. Typically it is a longterm activity. Such traditional approach failed for knowledge organization gathered on Leopoldina.pl platform. The aim of the service is to present heterogenic and differentiated digital resources of University of Wrocław (UWr). Due to lack of success of creation an universal taxonomy in given period of time, an bottom-up approach was proposed. The entire range of vocabulary indexed in Leopoldina.pl platform was divided into discipline categories which were used as the base for taxonomies and thesauri creation. In current paper we describe the bottom-up process of taxonomy creation. Programming tools (in Python) used for domain dictionaries creation are presented. We provided also evaluation of external organized knowledge sources (like Wikipedia, GBIF ̶ the Global Biodiversity Information Facility and other domain-specific thematic portals) for automatic knowledge handling and taxonomies creation.


10.29007/22x6 ◽  
2018 ◽  
Author(s):  
Sylvia Grewe ◽  
Sebastian Erdweg ◽  
Mira Mezini

Type systems for programming languages shall detect type errors in programs before runtime. To ensure that a type system meets this requirement, its soundness must be formally verified. We aim at automating soundness proofs of type systems to facilitate the development of sound type systems for domain-specific languages.Soundness proofs for type systems typically require induction. However, many of the proofs of individual induction cases only require first-order reasoning. For the development of our workbench Veritas, we build on this observation by combining automated first-order theorem provers such as Vampire with automated proof strategies specific to type systems. In this paper, we describe how we encode type soundness proofs in first-order logic using TPTP. We show how we use Vampire to prove the soundness of type systems for the simply-typed lambda calculus and for parts of a typed SQL. We report on which parts of the proofs are handled well by Vampire, and what parts work less well with our current approach.


2018 ◽  
Vol 7 (4.33) ◽  
pp. 1
Author(s):  
Azilawati Azizan ◽  
Zainab Abu Bakar ◽  
Nurazzah Abd Rahman ◽  
Suraya Masrom ◽  
Nurkhairizan Khairuddin

Recently search engines have provided a truly amazing search service, especially in finding general information on the Web. However, the question arises, does search engine perform the same when seeking domain specific information such as medical, geographical or agriculture information? Along with that issue, an experiment has been conducted to test the effectiveness of today’s search engines from the aspect of information searching in a specific domain. There were four search engines have been selected namely Google, Bing, Yahoo and DuckDuckGo for the experiment. While for the domain specific, we chose to test information about the popular fruit in Southeast Asia that is durian. Precision metric has been used to evaluate the retrieval effectiveness. The findings show that Google has outperformed the other three search engines. Nevertheless, the mean average precision value 0.51 given by Google is still low to be satisfied neither by the researcher nor the information seekers.  


Author(s):  
Sunbeom So ◽  
Hakjoo Oh

We describe a programming-by-example system that automatically generates pattern programs from examples. Writing pattern programs, which produce various patterns of characters, is one of the most popular programming exercises for entry-level students. However, students often find it difficult to write correct solutions by themselves. In this paper, we present a method for synthesizing pattern programs from examples, allowing students to improve their programming skills efficiently. To that end, we first design a domain-specific language that supports a large class of pattern programs that students struggle with. Next, we develop a synthesis algorithm that efficiently finds a desired program by combining enumerative search, constraint solving, and program analysis. We implemented the algorithm in a tool and evaluated it on 40 exercises gathered from online forums. The experimental results and user study show that our tool can synthesize instructive solutions from 1–3 example patterns in 1.2 seconds on average.


2021 ◽  
Vol 14 (2) ◽  
pp. 179-208
Author(s):  
Antonio P. Gutierrez de Blume ◽  
Gregory Schraw ◽  
Fred Kuch ◽  
Aaron S Richmond

Gutierrez et al. (2016) conducted an experiment that provided evidence for the existence of two distinct factors in metacognitive monitoring: general accuracy and general error. They found level-1 domain-specific accuracy and error factors which loaded on second-order domain-general accuracy and error factors, which then loaded on a third-order general monitoring factor. In the present study, that experiment was repeated with 170 different participants from the same population. The present study confirmed the original findings. Both studies suggest that metacognitive monitoring consists of two different types of cognitive processes: one that is associated with accurate monitoring judgments and one that is associated with error in monitoring judgments. In addition, both studies suggest domain-specific accuracy and error factors which load onto second-order domain-general accuracy and error factors. Furthermore, in this study we devised an experiment in which general accuracy and general error are treated as separate latent dimensions and found that subjects employ the same resources they use to develop accurate judgments as a “baseline” for calibrating resources necessary in erroneous judgments, but not vice-versa. This finding supports and extends previous findings which suggests that the processes involved in managing metacognitive accuracy are different from those involved in contending with metacognitive error. Future instructional interventions in metacognitive monitoring will be better focused by concentrating on improving accuracy or reducing error, but not both concurrently.


Sign in / Sign up

Export Citation Format

Share Document