4 research outputs found

    Syntactic generation of practice novice programs in Python

    Get PDF
    Abstract: In the present day, computer programs are written in high level languages and parsed syntactically as part of a compilation process. These parsers are defined with context-free grammars (CFGs), a language recogniser for the respective programming language. Formal grammars in general are used for language recognition or generation. In this paper, we present the automatic generation of procedural programs in Python using a CFG. We have defined CFG rules to model program templates and implemented these rules to produce infinitely many distinct practice programs in Python. Each generated program is designed to test a novice programmer’s knowledge of functions, expressions, loops, and/or conditional statements. The CFG rules are highly generic and can be extended to generate programs in other procedural languages. The resulting programs can be used as practice, test or examination problems in introductory programming courses. 500,000 iterations of generated programs can be found at: https://tinyurl.com/ pythonprogramgenerator. A survey of 103 students’ perception showed that 93.1% strongly agreed that these programs can help them in practice and improve their programming skills

    Synthesis of regular expression problems and solutions

    Get PDF
    Abstract: Please refer to full text to view abstract

    Syntactic Generation of Research Thesis Sketches Across Disciplines Using Formal Grammars

    Get PDF
    A part of the prerequisites for granting a degree in higher education institutions, students at postgraduate levels normally carry out research, which they do report in the form of theses or dissertations. Study has shown that students tend to go through difficulties in writing research thesis across all disciplines because they do not fully comprehend what constitutes a research thesis. This project proposes the syntactic generation of research thesis sketches across disciplines using formal grammars. Sketching is a synthesis technique which enables users to deliver high-level intuitions into a synthesis snag while leaving low-level details to synthesis tools. This work extends sketching to document generation for research thesis documents. Context-free grammar rules were designed and implemented for this task. A link to 10,000 generated thesis sketches was presented

    Abstracting and Narrating Novice Programs Using Regular Expressions

    No full text
    corecore