EHS
EHS

Generating Random Infix Expressions for GNU coreutils expr


Langdon, William B;

(2022)

Generating Random Infix Expressions for GNU coreutils expr.

UCL Computer Science: London, UK.


Text

UCL Discovery template 4.doc
– Accepted Version

Access restricted to UCL open access staff

Download (77kB)

    Abstract

    We use the recent random_tree() addition to GPquick [arXiv:2001.04505] to uniformly sample in linear time the space of binary trees.
    A unix gawk script transforms these to uniform random infix expressions, as used by Free Software Foundation GNU core utility expr.
    It converts from Lisp s-expression like prefix representation used by GPquick to bracketed infix expressions, e.g. “(” 3050 “=” 5514 “)” “-” 3073.
    gawk randomly labels internal tree nodes with the
    14 functions known to expr
    and replaces leafs with randomly chosen positive integers up to 32768.
    About 80 percent of random expressions are rejected, since they cause expr to fail, typically due to division by zero.

    Type: Report

    Title: Generating Random Infix Expressions for GNU coreutils expr
    DOI: 10.14324/000.rp.10157010
    Publisher version: https://www.ucl.ac.uk/computer-science/
    Language: English
    UCL classification: UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science
    UCL > Provost and Vice Provost Offices > UCL BEAMS > Faculty of Engineering Science > Dept of Computer Science
    UCL > Provost and Vice Provost Offices > UCL BEAMS
    UCL
    URI: https://discovery.ucl.ac.uk/id/eprint/10157010

    Downloads since deposit

    0Downloads
    Download activity – last month


    Export as

    Download activity – last 12 months


    Export as

    Downloads by country – last 12 months


    Export as

    Archive Staff Only

    View Item View Item



    Source link

    EHS
    Back to top button