6 research outputs found

    Cost analysis of nondeterministic probabilistic programs

    Get PDF
    We consider the problem of expected cost analysis over nondeterministic probabilistic programs, which aims at automated methods for analyzing the resource-usage of such programs. Previous approaches for this problem could only handle nonnegative bounded costs. However, in many scenarios, such as queuing networks or analysis of cryptocurrency protocols, both positive and negative costs are necessary and the costs are unbounded as well. In this work, we present a sound and efficient approach to obtain polynomial bounds on the expected accumulated cost of nondeterministic probabilistic programs. Our approach can handle (a) general positive and negative costs with bounded updates in variables; and (b) nonnegative costs with general updates to variables. We show that several natural examples which could not be handled by previous approaches are captured in our framework. Moreover, our approach leads to an efficient polynomial-time algorithm, while no previous approach for cost analysis of probabilistic programs could guarantee polynomial runtime. Finally, we show the effectiveness of our approach using experimental results on a variety of programs for which we efficiently synthesize tight resource-usage bounds

    Cost Analysis of Nondeterministic Probabilistic Programs

    Get PDF
    We consider the problem of expected cost analysis over nondeterministic probabilistic programs, which aims at automated methods for analyzing the resource-usage of such programs. Previous approaches for this problem could only handle nonnegative bounded costs. However, in many scenarios, such as queuing networks or analysis of cryptocurrency protocols, both positive and negative costs are necessary and the costs are unbounded as well. In this work, we present a sound and efficient approach to obtain polynomial bounds on the expected accumulated cost of nondeterministic probabilistic programs. Our approach can handle (a) general positive and negative costs with bounded updates in variables; and (b) nonnegative costs with general updates to variables. We show that several natural examples which could not be handled by previous approaches are captured in our framework. Moreover, our approach leads to an efficient polynomial-time algorithm, while no previous approach for cost analysis of probabilistic programs could guarantee polynomial runtime. Finally, we show the effectiveness of our approach by presenting experimental results on a variety of programs, motivated by real-world applications, for which we efficiently synthesize tight resource-usage bounds.Comment: A conference version will appear in the 40th ACM Conference on Programming Language Design and Implementation (PLDI 2019

    Constraints among Argument Sizes in Logic Programs (Extended Abstract)

    No full text
    In logic programs the argument sizes of derivable facts w.r.t. an n-ary predicate are viewed as a set of points in R n, which are approximated by their convex hull. Interargument constraint w.r.t. a predicate is essentially a set of constraints that every derivable fact of the predicate satisfies. We formalize such constraints by a fixpoint ofrecursive transformation similar to immediate consequence operator. However, the transformation does not necessarily converge finitely. Approximating polycones to their a fine hulls provides useful interargument constraints in many practical programs, guaranteeing finite convergence. For a class of linear recursive logic programs satisfying translativeness property, precise interargument constraints can be obtained by an analysis of structures of recursive transformations

    Assignment of Starting Offsets for Periodic Activities with Occupation Time Unit 1 and a Restricted Sufficient Condition for Some Practical Cases

    No full text
    We handle a problem to assign the starting offsets of a collision-free schedule in a certain form called a well-formed gcd notation. Each activity in an activity set recurs with its own period. If more than one activity occurs at the same time slot, it is a collision. If a schedule can be constructed as a well-formed gcd notation, the schedule is known to be collision-free. In this paper, we introduce a well-formed gcd notation and present an algorithm to assign the starting offsets of a collision-free schedule. We also propose a restricted form of a sufficient condition for detecting a collision-free periodic schedule, which can be decided in a tractable time constraint

    Termination Detection in . . . (Extended Abstract)

    No full text
    Progress on automated termination detection for logic programs is reported. The prospects for handling a large class of programs completely automatically appear promising, in contrast to the bleak picture for procedural languages. The methods reported are based on term size analysis of procedure arguments. Argument sizes of derivable facts involving an n-ary predicate are viewed as points in the positive orthant of R n. We describe a method of nding a nonnegative linear combination of bound argument sizes that (if it is found) is guaranteed to decrease during top-down execution of recursive rules. Duality theory of linear programming is used. This methodology can handle nonlinear recursion, mutual recursion, and cases in which no specific argument is certain to decrease; while it requires rules to have a certain form, this form is attainable by known syntactic transformations. Several programs that could not be shown to terminate by earlier published methods are handled successfully. However, it only analyzes a su cient condition; a procedure may terminate without our methodology detecting that fact
    corecore