3,117 research outputs found
Structure and Properties of Traces for Functional Programs
The tracer Hat records in a detailed trace the computation of a program written in the lazy functional language Haskell. The trace can then be viewed in various ways to support program comprehension and debugging. The trace was named the augmented redex trail. Its structure was inspired by standard graph rewriting implementations of functional languages. Here we describe a model of the trace that captures its essential properties and allows formal reasoning. The trace is a graph constructed by graph rewriting but goes beyond simple term graphs. Although the trace is a graph whose structure is independent of any rewriting strategy, we define the trace inductively, thus giving us a powerful method for proving its properties
An Integrated Development Environment for Declarative Multi-Paradigm Programming
In this paper we present CIDER (Curry Integrated Development EnviRonment), an
analysis and programming environment for the declarative multi-paradigm
language Curry. CIDER is a graphical environment to support the development of
Curry programs by providing integrated tools for the analysis and visualization
of programs. CIDER is completely implemented in Curry using libraries for GUI
programming (based on Tcl/Tk) and meta-programming. An important aspect of our
environment is the possible adaptation of the development environment to other
declarative source languages (e.g., Prolog or Haskell) and the extensibility
w.r.t. new analysis methods. To support the latter feature, the lazy evaluation
strategy of the underlying implementation language Curry becomes quite useful.Comment: In A. Kusalik (ed), proceedings of the Eleventh International
Workshop on Logic Programming Environments (WLPE'01), December 1, 2001,
Paphos, Cyprus. cs.PL/011104
Report on a User Test and Extension of a Type Debugger for Novice Programmers
A type debugger interactively detects the expressions that cause type errors.
It asks users whether they intend the types of identifiers to be those that the
compiler inferred. However, it seems that novice programmers often get in
trouble when they think about how to fix type errors by reading the messages
given by the type debugger. In this paper, we analyze the user tests of a type
debugger and report problems of the current type debugger. We then extend the
type debugger to address these problems. Specifically, we introduce
expression-specific error messages and language levels. Finally, we show type
errors that we think are difficult to explain to novice programmers. The
subjects of the user tests were 40 novice students belonging to the department
of information science at Ochanomizu University.Comment: In Proceedings TFPIE 2014, arXiv:1412.473
In the Age of Web: Typed Functional-First Programming Revisited
Most programming languages were designed before the age of web. This matters
because the web changes many assumptions that typed functional language
designers take for granted. For example, programs do not run in a closed world,
but must instead interact with (changing and likely unreliable) services and
data sources, communication is often asynchronous or event-driven, and programs
need to interoperate with untyped environments.
In this paper, we present how the F# language and libraries face the
challenges posed by the web. Technically, this comprises using type providers
for integration with external information sources and for integration with
untyped programming environments, using lightweight meta-programming for
targeting JavaScript and computation expressions for writing asynchronous code.
In this inquiry, the holistic perspective is more important than each of the
features in isolation. We use a practical case study as a starting point and
look at how F# language and libraries approach the challenges posed by the web.
The specific lessons learned are perhaps less interesting than our attempt to
uncover hidden assumptions that no longer hold in the age of web.Comment: In Proceedings ML/OCaml 2014, arXiv:1512.0143
Enumerating Counter-Factual Type Error Messages with an Existing Type Checker
The type error message of a standard type checker for a functional language gives only a single location as potential cause of the type error. If that location is not the cause, which often is the case, then the type error message hardly helps in locating the real cause. Here we present a method that uses a standard type checker to enumerate locations that potentially cause the type error, each with an actual and a counter-factual type for the given location. Adding our method to existing compilers requires only limited effort but improves type error debugging substantially
An Environment for Analyzing Space Optimizations in Call-by-Need Functional Languages
We present an implementation of an interpreter LRPi for the call-by-need
calculus LRP, based on a variant of Sestoft's abstract machine Mark 1, extended
with an eager garbage collector. It is used as a tool for exact space usage
analyses as a support for our investigations into space improvements of
call-by-need calculi.Comment: In Proceedings WPTE 2016, arXiv:1701.0023
S-Net for multi-memory multicores
Copyright ACM, 2010. This is the author's version of the work. It is posted here by permission of ACM for your personal use. Not for redistribution. The definitive version was published in Proceedings of the 5th ACM SIGPLAN Workshop on Declarative Aspects of Multicore Programming: http://doi.acm.org/10.1145/1708046.1708054S-Net is a declarative coordination language and component technology aimed at modern multi-core/many-core architectures and systems-on-chip. It builds on the concept of stream processing to structure dynamically evolving networks of communicating asynchronous components. Components themselves are implemented using a conventional language suitable for the application domain. This two-level software architecture maintains a familiar sequential development environment for large parts of an application and offers a high-level declarative approach to component coordination. In this paper we present a conservative language extension for the placement of components and component networks in a multi-memory environment, i.e. architectures that associate individual compute cores or groups thereof with private memories. We describe a novel distributed runtime system layer that complements our existing multithreaded runtime system for shared memory multicores. Particular emphasis is put on efficient management of data communication. Last not least, we present preliminary experimental data
- ā¦