This paper presents SKRIBE, a functional programming language for authoring documents, especially technical documents such as web pages, technical reports, and API documentation. Executing Skribe programs can produce ...
详细信息
This paper presents SKRIBE, a functional programming language for authoring documents, especially technical documents such as web pages, technical reports, and API documentation. Executing Skribe programs can produce documents in various formats, such as PostScript, PDF, HTML, Texinfo, or Unix man pages. That is, the very same Skribe program can be used to produce documents in different formats. Skribe is a full featured programminglanguage whose syntax makes it look like a markup language a la HTML.
This paper advocates the use functional programming languages for the formal specification of (abstract) machines. The presented description method describes machines by a two-Level model. At the bottom layer machine ...
详细信息
This paper advocates the use functional programming languages for the formal specification of (abstract) machines. The presented description method describes machines by a two-Level model. At the bottom layer machine components and the micro instructions to handle them are described by using an abstract data type. The top layer describes the machine instructions in terms of these micro instructions. Using a functionallanguage as specification language has several advantages. The abstraction mechanisms offered by a functional programming language are that good that one can abstract from irrelevant details as is required for a specification language. functionallanguages have a well-defined semantics such that the meaning of the specification is clear as well. Moreover, they offer the advantages of a programminglanguage: the compiler can check the specification for partial correctness, eliminating for example type errors and unbound identifiers (errors which occur in many published descriptions). Furthermore, the specification can be executed such that one obtains a prototype implementation almost for free. Such an executable formal specification can, for instance, be used to investigate the dynamic behaviour of the described machine. For a simple machine, the proposed description method is compared with several other description methods: a traditional style, a denotational semantics and a formal specification in the language Z. To show that the proposed method is indeed useful to describe large and complicated machines, the method is applied for the specification of an abstract imperative graph rewrite machine (the ABC-machine) which has been used in the construction of the compiler for the functionallanguage Concurrent Clean.
A comprehensive semantics for functional programs is presented, which generalizes the well-known call-by-value and call-by-name semantics. By permitting a separate choice between call-by value and call-by-name for eve...
详细信息
A comprehensive semantics for functional programs is presented, which generalizes the well-known call-by-value and call-by-name semantics. By permitting a separate choice between call-by value and call-by-name for every argument position of every function and parameterizing the semantics by this choice we abstract from the parameter-passing mechanism. Thus common and distinguishing features of all instances of the ζ-semantics, especially call-by-value and call-by-name semantics, are highlighted. Furthermore, a property can be validated for all instances of the ζ-semantics by a single proof. This is employed for proving the equivalence of the given denotational (fixed-point based) and two operational (reduction based) definitions of the ζ-semantics. We present and apply means for very simple proofs of equivalence with the denotational ζ-semantics for a large class of reduction-based ζ-semantics. Our basis are simple first-order constructor-based functional programs with patterns.
In this paper, we present a program development system based on rewriting method with the goal of providing an powerful tool for automatic software development and rapid prototyping. New mechanisms for defining constr...
详细信息
In this paper, we present a program development system based on rewriting method with the goal of providing an powerful tool for automatic software development and rapid prototyping. New mechanisms for defining constrained types and optimal rules are introduced to functional programming languages to achieve strong expressiveness. The enhanced functional programming language is combined with an algebraic specification language. Thus, the design from specification to program can be supported, and the efficiency and flexibility of programming can also be improved. In this system, both static and dynamic techniques are used to deal with constrained type check. All function definitions, computation constraints and optimal rules are regarded as rewriting rules. In order to provide a strong support for a large group of TRSs which may be neither terminating nor orthogonal, we propose a method using structure measure to decide TRSs' confluences. Based on this method, we present a partial completion algorithm to generate a rewriting model from a specification. Depending on term rewriting system, the mixed language system computes with parallel outermost and needed reduction. We explain the principles and implementation techniques in detail, some examples are provided.
In logic programming or functional programming languages, data objects, such as terms and lists, are immutable. In a basic implementation of such language, updating one element of an aggegate (contiguous data structur...
详细信息
In logic programming or functional programming languages, data objects, such as terms and lists, are immutable. In a basic implementation of such language, updating one element of an aggegate (contiguous data structure, such as an array) involves making a new copy of the whole aggregate. However such copying can be expensive, and can be avoided by using a destructive update. We introduce the concept of a wrapper which enables destructive operation on an immutable object. Based on this concept, we designed the reversible functor as a solution to the aggregate update problem. We implemented the reversible functor in the existing SB-Prolog system and carried out several benchmarks. These benchmark results show its effectiveness. When using a large functor and updating it many times, the performance is improved dramatically by implementing the reversible functor. It incurs some overhead at runtime, but the amount is small and acceptable.
This paper presents a hybrid reduction scheme that incorporates parallel processing techniques into the demand-driven model of functional programs. With this scheme, functionallanguage programs can be executed in par...
详细信息
ISBN:
(纸本)780003285X
This paper presents a hybrid reduction scheme that incorporates parallel processing techniques into the demand-driven model of functional programs. With this scheme, functionallanguage programs can be executed in parallel at three different levels, which are the parallel execution of vectors inside a redex, the parallel reduction of multiple redexes, and the high level pipeline processing. The high level pipeline consists of three stages that are redex detection, redex allocation and reduction execution. Moreover, memory latency and switch network latency that cannot be ignored in usual multiprocessor systems can effectively be eliminated by embedding the memory access and the switch network transmission into the high level pipeline. Experimental results of the software simulator reveal the potential performance of the hybrid reduction scheme. functionallanguage FL is chosen as the target language in our research work.
We describe the implementation of the functional database language FDL. FDL improves upon previous languages with a functional data model hy allowing any computable function to he defined and stored and hy supporting ...
详细信息
We describe the implementation of the functional database language FDL. FDL improves upon previous languages with a functional data model hy allowing any computable function to he defined and stored and hy supporting arbitrarily nested data types which are all persistent. All functions are updated incrementally by the insertion and deletion of equations, and an integrity sub-system verifies updates against the declared semantic integrity constraints. We show how a binary relational storage structure is used to support all of FDL's persistent data. We also show how the technique of graph reduction from functional programming languages is modified for the evaluation of FDL queries. Finally, we compare our implementation with that of related languages.
This paper discusses the technique of structural induction for proving theorems about programs. This technique is closely related to recursion induction but makes use of the inductive definition of the data structures...
详细信息
This paper discusses the technique of structural induction for proving theorems about programs. This technique is closely related to recursion induction but makes use of the inductive definition of the data structures handled by the programs. It treats programs with recursion but without assignments or jumps. Some syntactic extensions to Landin's functional programming language ISWIM are suggested which make it easier to program the manipulation of data structures and to develop proofs about such programs. Two sample proofs are given to demonstrate the technique, one for a tree sorting algorithm and one for a simple compiler for expressions.
暂无评论