146 research outputs found
Secrecy and Group Creation
AbstractWe add an operation of group creation to the typed pi-calculus, where a group is a type for channels. Creation of fresh groups has the effect of statically preventing certain communications, and can block the accidental or malicious leakage of secrets. We adapt a notion of secrecy introduced by Abadi, and prove a preservation of secrecy property. When applied to the ambient calculus, the same notion of group creation can be used to create and preserve shared secrets among mobile agents
Efficient asymmetric inclusion of regular expressions with interleaving and counting for XML type-checking
The inclusion of Regular Expressions (REs) is the kernel of any type-checking algorithm for XML manipulation languages. XML applications would benefit from the extension of REs with interleaving and counting, but this is not feasible in general, since inclusion is EXPSPACE-complete for such extended REs. In Colazzo et al. (2009) [1] we introduced a notion of ?conflict-free REs?, which are extended REs with excellent complexity behaviour, including a polynomial inclusion algorithm [1] and linear membership (Ghelli et al., 2008 [2]). Conflict-free REs have interleaving and counting, but the complexity is tamed by the ?conflict-free? limitations, which have been found to be satisfied by the vast majority of the content models published on the Web.However, a type-checking algorithm needs to compare machine-generated subtypes against human-defined supertypes. The conflict-free restriction, while quite harmless for the human-defined supertype, is far too restrictive for the subtype. We show here that the PTIME inclusion algorithm can be actually extended to deal with totally unrestricted REs with counting and interleaving in the subtype position, provided that the supertype is conflict-free.This is exactly the expressive power that we need in order to use subtyping inside type-checking algorithms, and the cost of this generalized algorithm is only quadratic, which is as good as the best algorithm we have for the symmetric case (see [1]). The result is extremely surprising, since we had previously found that symmetric inclusion becomes NP-hard as soon as the candidate subtype is enriched with binary intersection, a generalization that looked much more innocent than what we achieve here
XQuery!: An XML Query Language with Side Effects
Abstract. As XML applications become more complex, there is a growing interest in extending XQuery with side-effect operations, notably XML updates. However, the presence of side-effects is at odds with XQuery’s declarative semantics which leaves evaluation order unspecified. In this paper, we define “XQuery!”, an extension of XQuery 1.0 that supports first-class XML updates and user-level control over update application, preserving the benefits of XQuery’s declarative semantics when possible. Our extensions can be easily implemented within an existing XQuery processor and we show how to recover basic database optimizations for such a language.
A Type System for Interactive JSON Schema Inference (Extended Abstract)
In this paper we present the first JSON type system that provides the possibility of inferring a schema by adopting different levels of precision/succinctness for different parts of the dataset, under user control. This feature gives the data analyst the possibility to have detailed schemas for parts of the data of greater interest, while more succinct schema is provided for other parts, and the decision can be changed as many times as needed, in order to explore the schema in a gradual fashion, moving the focus to different parts of the collection, without the need of reprocessing data and by only performing type rewriting operations on the most precise schema
Schema Inference for Massive JSON Datasets
In the recent years JSON affirmed as a very popular data format for representing massive data collections. JSON data collections are usually schemaless. While this ensures sev- eral advantages, the absence of schema information has im- portant negative consequences: the correctness of complex queries and programs cannot be statically checked, users cannot rely on schema information to quickly figure out the structural properties that could speed up the formulation of correct queries, and many schema-based optimizations are not possible.
In this paper we deal with the problem of inferring a schema from massive JSON datasets. We first identify a JSON type language which is simple and, at the same time, expressive enough to capture irregularities and to give com- plete structural information about input data. We then present our main contribution, which is the design of a schema inference algorithm, its theoretical study, and its implemen- tation based on Spark, enabling reasonable schema infer- ence time for massive collections. Finally, we report about an experimental analysis showing the effectiveness of our ap- proach in terms of execution time, precision, and conciseness of inferred schemas, and scalability
Validation of Modern JSON Schema: Formalization and Complexity
JSON Schema is the de-facto standard schema language for JSON data. The
language went through many minor revisions, but the most recent versions of the
language added two novel features, dynamic references and annotation-dependent
validation, that change the evaluation model. Modern JSON Schema is the name
used to indicate all versions from Draft 2019-09, which are characterized by
these new features, while Classical JSON Schema is used to indicate the
previous versions.
These new "modern" features make the schema language quite difficult to
understand, and have generated many discussions about the correct
interpretation of their official specifications; for this reason we undertook
the task of their formalization. During this process, we also analyzed the
complexity of data validation in Modern JSON Schema, with the idea of
confirming the PTIME complexity of Classical JSON Schema validation, and we
were surprised to discover a completely different truth: data validation, that
is expected to be an extremely efficient process, acquires, with Modern JSON
Schema features, a PSPACE complexity.
In this paper, we give the first formal description of Modern JSON Schema,
which we consider a central contribution of the work that we present here. We
then prove that its data validation problem is PSPACE-complete. We prove that
the origin of the problem lies in dynamic references, and not in
annotation-dependent validation. We study the schema and data complexities,
showing that the problem is PSPACE-complete with respect to the schema size
even with a fixed instance, but is in PTIME when the schema is fixed and only
the instance size is allowed to vary. Finally, we run experiments that show
that there are families of schemas where the difference in asymptotic
complexity between dynamic and static references is extremely visible, even
with small schemas
Typing Copyless Message Passing
We present a calculus that models a form of process interaction based on
copyless message passing, in the style of Singularity OS. The calculus is
equipped with a type system ensuring that well-typed processes are free from
memory faults, memory leaks, and communication errors. The type system is
essentially linear, but we show that linearity alone is inadequate, because it
leaves room for scenarios where well-typed processes leak significant amounts
of memory. We address these problems basing the type system upon an original
variant of session types.Comment: 50 page
Efficient inclusion for a class of XML types with interleaving and counting
SUMMARY: Inclusion between XML types is important but expensive, and is much more expensive when unordered types are considered. We prove here that inclusion for XML types with interleaving and counting can be decided in polynomial time in the presence of two important restrictions: no element appears twice in the same content model, and Kleene star is only applied to disjunctions of single elements. Our approach is based on the transformation of each such content model into a set of constraints that completely characterizes the generated language. We then reduce inclusion checking to constraint implication. We exhibit a quadratic algorithm to perform inclusion checking on a RAM machine
Foundations for Extensible Objects with Roles
Object-oriented database systems are an emerging, promising technology, underpinned by the integration of ideas from object-oriented languages along with the specific needs of database applications. The fundamental reason for using such systems is that any real-world entity can be modeled by one object which matches its structure and behavior. To this end, the standard notion of object has to be augmented so that it can model the fact that an entity may acquire new pieces of structure and behavior during its existence, without changing its identity. To allow this extensibility in a statically typed system, a notion of context-dependent behavior (“role playing”) has to be added to the basic features of object-oriented languages. This feature is also a useful modeling device. Languages with role mechanisms have already been proposed. However, their design is full of choices which cannot be easily justified. A strong foundation for the object-with-roles notion would be extremely helpful to justify these choices and to understand, and prove, the properties of such a mechanism. In this paper we describe such a foundation, building on the object model proposed by Abadi and Cardelli. Key Words: Object-oriented languages, role
- …