scholarly journals Syntactic Theories in Practice

2002 ◽  
Vol 9 (4) ◽  
Author(s):  
Olivier Danvy ◽  
Lasse R. Nielsen

The evaluation function of a syntactic theory is canonically defined as the transitive closure of (1) decomposing a program into an evaluation context and a redex, (2) contracting this redex, and (3) plugging the contractum in the context. Directly implementing this evaluation function therefore yields an interpreter with a worst-case overhead, for each step, that is linear in the size of the input program. We present sufficient conditions over a syntactic theory to circumvent this overhead, by replacing the composition of (3) plugging and (1) decomposing by a single ``refocusing'' function mapping a contractum and a context into a new context and a new redex, if there are any. We also show how to construct such a refocusing function, we prove its correctness, and we analyze its complexity.<br /> <br />We illustrate refocusing with two examples: a programming-language interpreter and a transformation into continuation-passing style. As a byproduct, the time complexity of this program transformation is mechanically changed from quadratic in the worst case to linear.

2001 ◽  
Vol 8 (31) ◽  
Author(s):  
Olivier Danvy ◽  
Lasse R. Nielsen

The evaluation function of a syntactic theory is canonically defined as the transitive closure of (1) decomposing a program into an evaluation context and a redex, (2) contracting this redex, and (3) plugging the result in the context. Directly implementing this evaluation function therefore yields an interpreter with a quadratic time factor over its input. We present sufficient conditions over a syntactic theory to circumvent this quadratic factor, and illustrate the method with two programming-language interpreters and a transformation into continuation-passing style (CPS). In particular, we mechanically change the time complexity of this CPS transformation from quadratic to linear.


2004 ◽  
Vol 11 (26) ◽  
Author(s):  
Olivier Danvy ◽  
Lasse R. Nielsen

The evaluation function of a reduction semantics (i.e., a small-step operational semantics with an explicit representation of the reduction context) is canonically defined as the transitive closure of (1) decomposing a term into a reduction context and a redex, (2) contracting this redex, and (3) plugging the contractum in the context. Directly implementing this evaluation function therefore yields an interpreter with a worst-case overhead, for each step, that is linear in the size of the input term. <br /> <br />We present sufficient conditions over the constituents of a reduction semantics to circumvent this overhead, by replacing the composition of (3) plugging and (1) decomposing by a single ``refocus'' function mapping a contractum and a context into a new context and a new redex, if any. We also show how to construct such a refocus function, we prove the correctness of this construction, and we analyze the complexity of the resulting refocus function. <br /> <br />The refocused evaluation function of a reduction semantics implements the transitive closure of the refocus function, i.e., a ``pre-abstract machine.'' Fusing the refocus function with the trampoline function computing the transitive closure gives a state-transition function, i.e., an abstract machine. This abstract machine clearly separates between the transitions implementing the congruence rules of the reduction semantics and the transitions implementing its reduction rules. The construction of a refocus function therefore shows how to mechanically obtain an abstract machine out of a reduction semantics, which was done previously on a case-by-case basis. <br /> <br />We illustrate refocusing by mechanically constructing Felleisen et al.'s CK machine from a call-by-value reduction semantics of the lambda-calculus, and by constructing a substitution-based version of Krivine's machine from a call-by-name reduction semantics of the lambda-calculus. We also mechanically construct three one-pass CPS transformers from three quadratic context-based CPS transformers for the lambda-calculus.


1996 ◽  
Vol 6 (3) ◽  
pp. 527-534 ◽  
Author(s):  
Andrew J. Kennedy

AbstractThis article describes the application of functional programming techniques to a problem previously studied by imperative programmers, that of drawing general trees automatically. We first consider the nature of the problem and the ideas behind its solution (due to Radack), independent of programming language implementation. We then describe a Standard ML program which reflects the structure of the abstract solution much better than an imperative language implementation. We conclude with an informal discussion on the correctness of the implementation and some changes which improve the algorithm's worst-case time complexity.


Author(s):  
Kho Hie Kwee ◽  
Hardiansyah .

This paper addresses the design problem of robust H2 output feedback controller design for damping power system oscillations. Sufficient conditions for the existence of output feedback controllers with norm-bounded parameter uncertainties are given in terms of linear matrix inequalities (LMIs). Furthermore, a convex optimization problem with LMI constraints is formulated to design the output feedback controller which minimizes an upper bound on the worst-case H2 norm for a range of admissible plant perturbations. The technique is illustrated with applications to the design of stabilizer for a single-machine infinite-bus (SMIB) power system. The LMI based control ensures adequate damping for widely varying system operating.


1996 ◽  
Vol 3 (9) ◽  
Author(s):  
Thore Husfeldt ◽  
Theis Rauhe ◽  
Søren Skyum

We give a number of new lower bounds in the cell probe model<br />with logarithmic cell size, which entails the same bounds on the random access computer with logarithmic word size and unit cost operations. We study the signed prefix sum problem: given a string of length n of zeroes and signed ones, compute the sum of its ith prefix during updates. We show a<br />lower bound of  Omega(log n/log log n) time per operations, even if the prefix sums are bounded by log n/log log n during all updates. We also show that if the update time is bounded by the product of the worst-case update time and the<br />answer to the query, then the update time must be Omega(sqrt(log n/ log log n)).<br /> These results allow us to prove lower bounds for a variety of seemingly unrelated<br />dynamic problems. We give a lower bound for the dynamic planar point location in monotone subdivisions of <br />Omega(log n/ log log n) per operation. We give<br />a lower bound for the dynamic transitive closure problem on upward planar graphs with one source and one sink of <br />Omega(log n/(log logn)^2) per operation. We give a lower bound of  Omega(sqrt(log n/log log n)) for the dynamic membership problem of any Dyck language with two or more letters. This implies the same<br />lower bound for the dynamic word problem for the free group with k generators. We also give lower bounds for the dynamic prefix majority and prefix equality problems.


Author(s):  
William C. Regli ◽  
Satyandra K. Gupta ◽  
Dana S. Nau

Abstract While automated recognition of features has been attempted for a wide range of applications, no single existing approach possesses the functionality required to perform manufacturability analysis. In this paper, we present a methodology for taking a CAD model of a part and extracting a set of machinable features that contains the complete set of alternative interpretations of the part as collections of MRSEVs (Material Removal Shape Element Volumes, a STEP-based library of machining features). The approach handles a variety of features including those describing holes, pockets, slots, and chamfering and filleting operations. In addition, the approach considers accessibility constraints for these features, has an worst-case algorithmic time complexity quadratic in the number of solid modeling operations, and modifies features recognized to account for available tooling and produce more realistic volumes for manufacturability analysis.


Author(s):  
Nafiseh Masoudi ◽  
Georges M. Fadel ◽  
Margaret M. Wiecek

Abstract Routing or path-planning is the problem of finding a collision-free and preferably shortest path in an environment usually scattered with polygonal or polyhedral obstacles. The geometric algorithms oftentimes tackle the problem by modeling the environment as a collision-free graph. Search algorithms such as Dijkstra’s can then be applied to find an optimal path on the created graph. Previously developed methods to construct the collision-free graph, without loss of generality, explore the entire workspace of the problem. For the single-source single-destination planning problems, this results in generating some unnecessary information that has little value and could increase the time complexity of the algorithm. In this paper, first a comprehensive review of the previous studies on the path-planning subject is presented. Next, an approach to address the planar problem based on the notion of convex hulls is introduced and its efficiency is tested on sample planar problems. The proposed algorithm focuses only on a portion of the workspace interacting with the straight line connecting the start and goal points. Hence, we are able to reduce the size of the roadmap while generating the exact globally optimal solution. Considering the worst case that all the obstacles in a planar workspace are intersecting, the algorithm yields a time complexity of O(n log(n/f)), with n being the total number of vertices and f being the number of obstacles. The computational complexity of the algorithm outperforms the previous attempts in reducing the size of the graph yet generates the exact solution.


2011 ◽  
Vol 03 (04) ◽  
pp. 457-471 ◽  
Author(s):  
B. BALAMOHAN ◽  
P. FLOCCHINI ◽  
A. MIRI ◽  
N. SANTORO

In a network environment supporting mobile entities (called robots or agents), a black hole is a harmful site that destroys any incoming entity without leaving any visible trace. The black-hole search problit is the task of a team of k > 1 mobile entities, starting from the same safe location and executing the same algorithm, to determine within finite time the location of the black hole. In this paper, we consider the black hole search problit in asynchronous ring networks of n nodes, and focus on time complexity. It is known that any algorithm for black-hole search in a ring requires at least 2(n - 2) time in the worst case. The best known algorithm achieves this bound with a team of n - 1 agents with an average time cost of 2(n - 2), equal to the worst case. In this paper, we first show how the same number of agents using 2 extra time units in the worst case, can solve the problit in only [Formula: see text] time on the average. We then prove that the optimal average case complexity of [Formula: see text] can be achieved without increasing the worst case using 2(n - 1) agents. Finally, we design an algorithm that achieves asymptotically optimal both worst and average case time complexities itploying an optimal team of k = 2 agents, thus improving on the earlier results that required O(n) agents.


Sign in / Sign up

Export Citation Format

Share Document