397 research outputs found
Typing Composable Coroutines
Coroutine, as a powerful programming construct, is widely used in
asynchronous applications to replace thread-based programming or the callback
hell. Using coroutines makes code more readable and maintainable, for its
ability to transfer control while keeping the literal scope. However, reasoning
about coroutine behavior can be challenging without proper typing. We propose a
type notation and calculus for composing asymmetric, first-class, stackless
coroutines. Given the types of a list of coroutines, we can compute a composed
type matching the collective behavior of the coroutines, so that the input and
output can be type-checked by a type system. Our coroutine types can model the
data received by or yielded from a coroutine, which be of coroutine types as
well. On top of our type calculus, we discuss its soundness and evaluation
issues, then provide four application scenarios of our coroutine types. Not
only can our types be used in modern programming languages, such as Python, but
also model program behaviors in OCaml and even Prolog
On an Intuitionistic Logic for Pragmatics
We reconsider the pragmatic interpretation of intuitionistic logic [21]
regarded as a logic of assertions and their justications and its relations with classical
logic. We recall an extension of this approach to a logic dealing with assertions
and obligations, related by a notion of causal implication [14, 45]. We focus on
the extension to co-intuitionistic logic, seen as a logic of hypotheses [8, 9, 13] and on
polarized bi-intuitionistic logic as a logic of assertions and conjectures: looking at the
S4 modal translation, we give a denition of a system AHL of bi-intuitionistic logic
that correctly represents the duality between intuitionistic and co-intuitionistic logic,
correcting a mistake in previous work [7, 10]. A computational interpretation of cointuitionism
as a distributed calculus of coroutines is then used to give an operational
interpretation of subtraction.Work on linear co-intuitionism is then recalled, a linear
calculus of co-intuitionistic coroutines is dened and a probabilistic interpretation
of linear co-intuitionism is given as in [9]. Also we remark that by extending the
language of intuitionistic logic we can express the notion of expectation, an assertion
that in all situations the truth of p is possible and that in a logic of expectations
the law of double negation holds. Similarly, extending co-intuitionistic logic, we can
express the notion of conjecture that p, dened as a hypothesis that in some situation
the truth of p is epistemically necessary
Lazy Evaluation and Delimited Control
The call-by-need lambda calculus provides an equational framework for
reasoning syntactically about lazy evaluation. This paper examines its
operational characteristics. By a series of reasoning steps, we systematically
unpack the standard-order reduction relation of the calculus and discover a
novel abstract machine definition which, like the calculus, goes "under
lambdas." We prove that machine evaluation is equivalent to standard-order
evaluation. Unlike traditional abstract machines, delimited control plays a
significant role in the machine's behavior. In particular, the machine replaces
the manipulation of a heap using store-based effects with disciplined
management of the evaluation stack using control-based effects. In short, state
is replaced with control. To further articulate this observation, we present a
simulation of call-by-need in a call-by-value language using delimited control
operations
An exercise in transformational programming: Backtracking and Branch-and-Bound
We present a formal derivation of program schemes that are usually called Backtracking programs and Branch-and-Bound programs. The derivation consists of a series of transformation steps, specifically algebraic manipulations, on the initial specification until the desired programs are obtained. The well-known notions of linear recursion and tail recursion are extended, for structures, to elementwise linear recursion and elementwise tail recursion; and a transformation between them is derived too
Programmiersprachen und Rechenkonzepte
Seit 1984 veranstaltet die GI-Fachgruppe "Programmiersprachen und Rechenkonzepte" regelmäßig im Frühjahr einen Workshop im Physikzentrum Bad Honnef. Das Treffen dient in erster Linie dem gegenseitigen Kennenlernen, dem Erfahrungsaustausch, der Diskussion und der Vertiefung gegenseitiger Kontakte. In diesem Forum werden Vorträge und Demonstrationen sowohl bereits abgeschlossener als auch noch laufender Arbeiten vorgestellt, unter anderem (aber nicht ausschließlich) zu Themen wie - Sprachen, Sprachparadigmen, - Korrektheit von Entwurf und Implementierung, -Werkzeuge, -Software-/Hardware-Architekturen, -Spezifikation, Entwurf, - Validierung, Verifikation, - Implementierung, Integration, - Sicherheit (Safety und Security), - eingebettete Systeme, - hardware-nahe Programmierung. In diesem Technischen Bericht sind einige der präsentierten Arbeiten zusammen gestellt
Multiparty Session Actors
Actor coordination armoured with a suitable protocol description language has
been a pressing problem in the actors community. We study the applicability of
multiparty session type (MPST) protocols for verification of actor programs. We
incorporate sessions to actors by introducing minimum additions to the model
such as the notion of actor roles and protocol mailbox. The framework uses
Scribble, which is a protocol description language based on multiparty session
types. Our programming model supports actor-like syntax and runtime
verification mechanism guaranteeing type-safety and progress of the
communicating entities. An actor can implement multiple roles in a similar way
as an object can implement multiple interfaces. Multiple roles allow for
inter-concurrency in a single actor still preserving its progress property. We
demonstrate our framework by designing and implementing a session actor library
in Python and its runtime verification mechanism.Comment: In Proceedings PLACES 2014, arXiv:1406.331
Linear and Affine Typing of Continuation-Passing Style
Submitted for the degree of Doctor of Philosophy, Queen Mary, University of Londo
- …