26,960 research outputs found
On the Use of Underspecified Data-Type Semantics for Type Safety in Low-Level Code
In recent projects on operating-system verification, C and C++ data types are
often formalized using a semantics that does not fully specify the precise byte
encoding of objects. It is well-known that such an underspecified data-type
semantics can be used to detect certain kinds of type errors. In general,
however, underspecified data-type semantics are unsound: they assign
well-defined meaning to programs that have undefined behavior according to the
C and C++ language standards.
A precise characterization of the type-correctness properties that can be
enforced with underspecified data-type semantics is still missing. In this
paper, we identify strengths and weaknesses of underspecified data-type
semantics for ensuring type safety of low-level systems code. We prove
sufficient conditions to detect certain classes of type errors and, finally,
identify a trade-off between the complexity of underspecified data-type
semantics and their type-checking capabilities.Comment: In Proceedings SSV 2012, arXiv:1211.587
Towards the Formal Specification and Verification of Maple Programs
In this paper, we present our ongoing work and initial results on the formal
specification and verification of MiniMaple (a substantial subset of Maple with
slight extensions) programs. The main goal of our work is to find behavioral
errors in such programs w.r.t. their specifications by static analysis. This
task is more complex for widely used computer algebra languages like Maple as
these are fundamentally different from classical languages: they support
non-standard types of objects such as symbols, unevaluated expressions and
polynomials and require abstract computer algebraic concepts and objects such
as rings and orderings etc. As a starting point we have defined and formalized
a syntax, semantics, type system and specification language for MiniMaple
Really Natural Linear Indexed Type Checking
Recent works have shown the power of linear indexed type systems for
enforcing complex program properties. These systems combine linear types with a
language of type-level indices, allowing more fine-grained analyses. Such
systems have been fruitfully applied in diverse domains, including implicit
complexity and differential privacy. A natural way to enhance the
expressiveness of this approach is by allowing the indices to depend on runtime
information, in the spirit of dependent types. This approach is used in DFuzz,
a language for differential privacy. The DFuzz type system relies on an index
language supporting real and natural number arithmetic over constants and
variables. Moreover, DFuzz uses a subtyping mechanism to make types more
flexible. By themselves, linearity, dependency, and subtyping each require
delicate handling when performing type checking or type inference; their
combination increases this challenge substantially, as the features can
interact in non-trivial ways. In this paper, we study the type-checking problem
for DFuzz. We show how we can reduce type checking for (a simple extension of)
DFuzz to constraint solving over a first-order theory of naturals and real
numbers which, although undecidable, can often be handled in practice by
standard numeric solvers
ADsafety: Type-Based Verification of JavaScript Sandboxing
Web sites routinely incorporate JavaScript programs from several sources into
a single page. These sources must be protected from one another, which requires
robust sandboxing. The many entry-points of sandboxes and the subtleties of
JavaScript demand robust verification of the actual sandbox source. We use a
novel type system for JavaScript to encode and verify sandboxing properties.
The resulting verifier is lightweight and efficient, and operates on actual
source. We demonstrate the effectiveness of our technique by applying it to
ADsafe, which revealed several bugs and other weaknesses.Comment: in Proceedings of the USENIX Security Symposium (2011
Applied Type System: An Approach to Practical Programming with Theorem-Proving
The framework Pure Type System (PTS) offers a simple and general approach to
designing and formalizing type systems. However, in the presence of dependent
types, there often exist certain acute problems that make it difficult for PTS
to directly accommodate many common realistic programming features such as
general recursion, recursive types, effects (e.g., exceptions, references,
input/output), etc. In this paper, Applied Type System (ATS) is presented as a
framework for designing and formalizing type systems in support of practical
programming with advanced types (including dependent types). In particular, it
is demonstrated that ATS can readily accommodate a paradigm referred to as
programming with theorem-proving (PwTP) in which programs and proofs are
constructed in a syntactically intertwined manner, yielding a practical
approach to internalizing constraint-solving needed during type-checking. The
key salient feature of ATS lies in a complete separation between statics, where
types are formed and reasoned about, and dynamics, where programs are
constructed and evaluated. With this separation, it is no longer possible for a
program to occur in a type as is otherwise allowed in PTS. The paper contains
not only a formal development of ATS but also some examples taken from
ats-lang.org, a programming language with a type system rooted in ATS, in
support of employing ATS as a framework to formulate advanced type systems for
practical programming
- …