14 research outputs found
Ur/Web: A Simple Model for Programming the Web
The World Wide Web has evolved gradually from a document delivery platform to an architecture for distributed programming. This largely unplanned evolution is apparent in the set of interconnected languages and protocols that any Web application must manage. This paper presents Ur/Web, a domain-specific, statically typed functional programming language with a much simpler model for programming modern Web applications. Ur/Web's model is unified, where programs in a single programming language are compiled to other "Web standards" languages as needed; modular, supporting novel kinds of encapsulation of Web-specific state; and exposes simple concurrency, where programmers can reason about distributed, multithreaded applications via a mix of transactions and cooperative preemption. We give a tutorial introduction to the main features of Ur/Web, formalize the basic programming model with operational semantics, and discuss the language implementation and the production Web applications that use it.National Science Foundation (U.S.) (Grant CCF-1217501
Языковая мультивселенная
This paper argues that logic can benefit from a recent trend in linguistics, namely the study of multilingualism. Giving up monolingualism in logic does not necessarily lead to logical pluralism. Often enough pluralism is just a fight for the recognition of one’s own language rather than a plea for a different logic. Once we let go of the monolithic view of language and embrace multilingualism, interesting new avenues appear for logic that are worth exploring. Moreover, not only is it possible to use logic to analyse the multilingual universe, it is also quite revealing to use the linguistic methodology to reflect on the metatheory of logic itself.В статье обсуждается вопрос о том, что полезного логика может для себя найти в современной тенденции в лингвистике изучать явление многоязычия. Отказ от моноязычия в логике не ведёт с необходимостью к логическому плюрализму. Достаточно часто плюрализм — это просто борьба за признание своего собственного языка, нежели довод в пользу иной логики. При отказе от монолитного взгляда на язык и выборе многоязычия для логики открываются новые интересные перспективы, достойные исследования. Кроме того, не только можно использовать логику для анализа многоязычного универсума, но лингвистическая методология может быть применена для описания самой логической метатеории
Regular Expression Subtyping for XML Query and Update Languages
XML database query languages such as XQuery employ regular expression types
with structural subtyping. Subtyping systems typically have two presentations,
which should be equivalent: a declarative version in which the subsumption rule
may be used anywhere, and an algorithmic version in which the use of
subsumption is limited in order to make typechecking syntax-directed and
decidable. However, the XQuery standard type system circumvents this issue by
using imprecise typing rules for iteration constructs and defining only
algorithmic typechecking, and another extant proposal provides more precise
types for iteration constructs but ignores subtyping. In this paper, we
consider a core XQuery-like language with a subsumption rule and prove the
completeness of algorithmic typechecking; this is straightforward for XQuery
proper but requires some care in the presence of more precise iteration typing
disciplines. We extend this result to an XML update language we have introduced
in earlier work.Comment: ESOP 2008. Companion technical report with proof
JSONYA/FN: Functional Computation in JSON
Functional programming has a lot to offer to the developers of
global Internet-centric applications, but is often applicable only to a small
part of the system or requires major architectural changes. The data model
used for functional computation is often simply considered a consequence of
the chosen programming style, although inappropriate choice of such model
can make integration with imperative parts much harder. In this paper we do
the opposite: we start from a data model based on JSON and then derive the
functional approach from it. We outline the identified principles and present
Jsonya/fn — a low-level functional language that is defined in and operates
with the selected data model. We use several Jsonya/fn implementations
and the architecture of a recently developed application to show that our
approach can improve interoperability and can achieve additional reuse of
representations and operations at relatively low cost. ACM Computing Classification System (1998): D.3.2, D.3.4
Rethinking Traditional Web Interaction: Theory and Implementation
Abstract—In recent years, Web sites evolved into ever more complex distributed applications. But current Web programming tools are not fully adapted to this evolution, and force programmers to worry about too many inessential details. We want to define an alternative programming style better fitted to that kind of applications. To do that, we propose an analysis of Web interaction in order to break it down into very elementary notions, based on semantic criteria instead of technological ones. This allows defining a common vernacular language to describe the concepts of current Web programming tools, but also some other new concepts. We propose to use these new concepts to create new frameworks for programming Web applications. This results in a significant gain of expressiveness. The understanding and separation of these notions also makes it possible to get strong static guarantees, that can help a lot during the development of complex applications, for example by making impossible the creation of broken links. We show how most of the ideas we propose have been implemented in the Ocsigen Web programming framework. Ocsigen makes possible to write a client-server Web applications as a single program and the interaction model we propose is fully compatible with this kind of applications. Keywords–Typing; Web interaction; Functional Web programming; Continuation
Static and dynamic semantics of NoSQL languages
We present a calculus for processing semistructured data that spans
differences of application area among several novel query languages, broadly
categorized as "NoSQL". This calculus lets users define their own operators,
capturing a wider range of data processing capabilities, whilst providing a
typing precision so far typical only of primitive hard-coded operators. The
type inference algorithm is based on semantic type checking, resulting in type
information that is both precise, and flexible enough to handle structured and
semistructured data. We illustrate the use of this calculus by encoding a large
fragment of Jaql, including operations and iterators over JSON, embedded SQL
expressions, and co-grouping, and show how the encoding directly yields a
typing discipline for Jaql as it is, namely without the addition of any type
definition or type annotation in the code
Effective Strategic Programming for Java Developers
International audienceIn object programming languages, the Visitor design pattern allows separation of algorithms and data-structures. When applying this pattern to tree-like structures, programmers are always confronted with the difficulty of making their code evolve. One reason is that the code implementing the algorithm is interwound with the code implementing the traversal inside the Visitor. When implementing algorithms such as data analyses or transformations, encoding the traversal directly into the algorithm turns out to be cumbersome as this type of algorithm only focuses on a small part of the data-structure model (e.g., program optimization). Unfortunately, typed programming languages like Java do not offer simple solutions for expressing generic traversals. Rewrite-based languages like ELAN or Stratego have introduced the notion of strategies to express both generic traversal and rule application control in a declarative way. Starting from this approach, our goal was to make the notion of strategic programming available in a widely used language such as Java and thus to offer generic traversals in typed Java structures. In this paper, we present the strategy language SL that provides programming support for strategies in Java
Using camlp4 for presenting dynamic mathematics on the web: DynaMoW, an OCaml language extension for the run-time generation of mathematical contents and their presentation on the web
International audienceWe report on the design and implementation of a programming tool, DynaMoW, to control interactive and incremental mathematical calculations to be presented on the web. This tool is implemented as a language extension of OCaml using Camlp4. Fragments of mathematical code written for a computer-algebra system as well as fragments of mathematical web documents are embedded directly and naturally inside OCaml code. A DynaMoW-based application is made of independent web services, whose parameter types are checked by the OCaml extension. The approach is illustrated by two implementations of online mathematical encyclopedias on top of DynaMoW