TY - GEN
T1 - Syntactic generation of practice novice programs in python
AU - Ade-Ibijola, Abejide
N1 - Publisher Copyright:
© 2019, Springer Nature Switzerland AG.
PY - 2019
Y1 - 2019
N2 - 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.
AB - 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.
KW - Context-free grammar applications
KW - Novice programmers
KW - Practice Python programs
KW - Program synthesis
KW - Synthesis of things
UR - http://www.scopus.com/inward/record.url?scp=85059808307&partnerID=8YFLogxK
U2 - 10.1007/978-3-030-05813-5_11
DO - 10.1007/978-3-030-05813-5_11
M3 - Conference contribution
AN - SCOPUS:85059808307
SN - 9783030058128
T3 - Communications in Computer and Information Science
SP - 158
EP - 172
BT - ICT Education - 47th Annual Conference of the Southern African Computer Lecturers’ Association, SACLA 2018, Revised Selected Papers
A2 - Suleman, Hussein
A2 - Gruner, Stefan
A2 - Kabanda, Salah
PB - Springer Verlag
T2 - 47th Annual Conference of the Southern African Computing Lecturers Association, SACLA 2018
Y2 - 18 June 2018 through 20 June 2018
ER -