Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/3408877.3432464acmconferencesArticle/Chapter ViewAbstractPublication PagessigcseConference Proceedingsconference-collections
research-article
Open access

Pyformlang: An Educational Library for Formal Language Manipulation

Published: 05 March 2021 Publication History

Abstract

Formal languages are widely studied, taught and used in computer science. However, only a small part of this domain is brought to a broader audience, and students often have no practical experience in their curriculum. In this tool paper, we introduce Pyformlang, a practical and pedagogical Python library for formal languages. Our library implements the most common algorithms of the domain, accessible by an easy-to-use interface. The code is written exclusively in Python3, with a clear structure, so as to allow students to play and learn with it.

References

[1]
Alfred V Aho. 1968. Indexed grammars?an extension of context-free grammars. Journal of the ACM (JACM), Vol. 15, 4 (1968), 647--671.
[2]
Alfred V Aho, Ravi Sethi, and Jeffrey D Ullman. 1986. Compilers, principles, techniques. Addison Wesley, Vol. 7, 8 (1986), 9.
[3]
Cyril Allauzen, Michael Riley, Johan Schalkwyk, Wojciech Skut, and Mehryar Mohri. 2007. OpenFst: A general and efficient weighted finite-state transducer library. In International Conference on Implementation and Application of Automata. Springer, 11--23.
[4]
Y. Ba-Hillel, M. Prles, and E. Shamir. 1965. On formal properties of simple phrase structure grammars. Z. Phonetik, Sprachwissen. Komm. 15 (I961), 143--172. Y. Bar-Hillel, Language and Information, Addison-Wesley, Reading, Mass (1965), 116--150.
[5]
Richard Beigel and William Gasarch. .. A Proof that the intersection of a context-free language and a regular language is Context-Free Which Does Not use push-down automata. http://www.cs.umd.edu/ gasarch/BLOGPAPERS/cfg.pdf ( .).
[6]
Akim Demaille, Alexandre Duret-Lutz, Sylvain Lombardy, and Jacques Sakarovitch. 2013. Implementation Concepts in Vaucanson 2. In Proceedings of Implementation and Application of Automata, 18th International Conference (CIAA'13) (Lecture Notes in Computer Science, Vol. 7982), Stavros Konstantinidis (Ed.). Springer, Halifax, NS, Canada, 122--133. https://doi.org/10.1007/978--3--642--39274-0_12
[7]
Graeme Gange, Jorge A Navas, Peter Schachte, Harald Søndergaard, and Peter J Stuckey. 2015. A tool for intersecting context-free grammars and its applications. In NASA Formal Methods Symposium. Springer, 422--428.
[8]
Gerald Gazdar. 1988. Applicability of indexed grammars to natural languages. In Natural language parsing and linguistic theories. Springer, 69--94.
[9]
Aric Hagberg, Dan Schult, Pieter Swart, D Conway, L Séguin-Charbonneau, C Ellison, B Edwards, and J Torrents. 2013. Networkx. URL http://networkx. github. io/index. html (2013).
[10]
John Hopcroft. 1971. An n log n algorithm for minimizing states in a finite automaton. In Theory of machines and computations. Elsevier, 189--196.
[11]
John E Hopcroft, Rajeev Motwani, and Jeffrey D Ullman. 2001. Introduction to automata theory, languages, and computation. Acm Sigact News, Vol. 32, 1 (2001), 60--65.
[12]
Dan Jurafsky. 2000. Speech & language processing .Pearson Education India.
[13]
Edward Loper and Steven Bird. 2002. NLTK: the natural language toolkit. arXiv preprint cs/0205028 (2002).
[14]
Mostafa Mohammed, Clifford A. Shaffer, and Susan H. Rodger. 2019. Using Interactive Visualization and Programmed Instruction to Teach Formal Languages. In Proceedings of the 50th ACM Technical Symposium on Computer Science Education (Minneapolis, MN, USA) (SIGCSE '19). Association for Computing Machinery, New York, NY, USA, 1263. https://doi.org/10.1145/3287324.3293795
[15]
Mostafa Kamel Osman Mohammed. 2020. Teaching Formal Languages through Visualizations, Simulators, Auto-Graded Exercises, and Programmed Instruction. In Proceedings of the 51st ACM Technical Symposium on Computer Science Education (Portland, OR, USA) (SIGCSE '20). Association for Computing Machinery, New York, NY, USA, 1429. https://doi.org/10.1145/3328778.3372711
[16]
Steven Rabin. 2015. Game AI pro 2: collected wisdom of game AI professionals .AK Peters/CRC Press.
[17]
Rogério Reis and Nelma Moreira. 2002. FAdo: tools for finite automata and regular expressions manipulation. https://www.dcc.fc.up.pt/nam/publica/dcc-2002--2.pdf (2002).
[18]
Susan H Rodger and Thomas W Finley. 2006. JFLAP: an interactive formal languages and automata package .Jones & Bartlett Learning.
[19]
Juan Carlos Rodriguez-del Pino, Enrique Rubio Royo, and Zenón Hernández Figueroa. 2012. A Virtual Programming Lab for Moodle with automatic assessment and anti-plagiarism features. (2012).
[20]
Julien Romero, Nicoleta Preda, Antoine Amarilli, and Fabian Suchanek. 2020. Equivalent Rewritings on Path Views with Binding Patterns. arxiv: 2003.07316 [cs.DB] Extended version with proofs. https://arxiv.org/abs/2003.07316.
[21]
Julien Romero, Simon Razniewski, Koninika Pal, Jeff Z. Pan, Archit Sakhadeo, and Gerhard Weikum. 2019. Commonsense Properties from Query Logs and Question Answering Forums. Proceedings of the 28th ACM International Conference on Information and Knowledge Management - CIKM '19 (2019). https://doi.org/10.1145/3357384.3357955
[22]
Alley Stoughton. 2008. Experimenting with formal languages using Forlan. In Proceedings of the 2008 international workshop on Functional and declarative programming in education. 41--50.
[23]
Alley Stoughton. 2016. Formal Language Theory: Integrating Experimentation and Proof.
[24]
Fabian M Suchanek, Gjergji Kasneci, and Gerhard Weikum. 2007. Yago: a core of semantic knowledge. In Proceedings of the 16th international conference on World Wide Web. 697--706.
[25]
Hang Zhou. 2009. Implementation of the Hopcroft's Algorithm. https://www.irif.fr/ carton//Enseignement/Complexite/ENS/Redaction/2009--2010/hang.zhou.pdf (2009).

Cited By

View all
  • (2024)System Description: A Theorem-Prover for Subregular Systems: The Language Toolkit and Its Interpreter, PlebbyFunctional and Logic Programming10.1007/978-981-97-2300-3_16(311-328)Online publication date: 15-May-2024
  • (2022)GidayuProceedings of the 27th ACM Conference on on Innovation and Technology in Computer Science Education Vol. 110.1145/3502718.3524742(110-116)Online publication date: 7-Jul-2022
  • (2022)Recognising the English Language using Context Free Grammar with PyFormlang2022 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT)10.1109/CONECCT55679.2022.9865855(1-6)Online publication date: 8-Jul-2022
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
SIGCSE '21: Proceedings of the 52nd ACM Technical Symposium on Computer Science Education
March 2021
1454 pages
ISBN:9781450380621
DOI:10.1145/3408877
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 05 March 2021

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. education
  2. formal languages
  3. library
  4. python

Qualifiers

  • Research-article

Conference

SIGCSE '21
Sponsor:

Acceptance Rates

Overall Acceptance Rate 1,595 of 4,542 submissions, 35%

Upcoming Conference

SIGCSE Virtual 2024
1st ACM Virtual Global Computing Education Conference
December 5 - 8, 2024
Virtual Event , NC , USA

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)89
  • Downloads (Last 6 weeks)12
Reflects downloads up to 13 Sep 2024

Other Metrics

Citations

Cited By

View all
  • (2024)System Description: A Theorem-Prover for Subregular Systems: The Language Toolkit and Its Interpreter, PlebbyFunctional and Logic Programming10.1007/978-981-97-2300-3_16(311-328)Online publication date: 15-May-2024
  • (2022)GidayuProceedings of the 27th ACM Conference on on Innovation and Technology in Computer Science Education Vol. 110.1145/3502718.3524742(110-116)Online publication date: 7-Jul-2022
  • (2022)Recognising the English Language using Context Free Grammar with PyFormlang2022 IEEE International Conference on Electronics, Computing and Communication Technologies (CONECCT)10.1109/CONECCT55679.2022.9865855(1-6)Online publication date: 8-Jul-2022
  • (2022)Design of Super Mario Game Using Finite State MachinesComputer Networks and Inventive Communication Technologies10.1007/978-981-19-3035-5_55(739-752)Online publication date: 14-Oct-2022
  • (2022)A Refinement Based Algorithm for Learning Program Input GrammarsFrom Data to Models and Back10.1007/978-3-031-16011-0_10(138-156)Online publication date: 15-Oct-2022
  • (2020)Query Rewriting on Path Views Without Integrity ConstraintsFrom Data to Models and Back10.1007/978-3-030-70650-0_10(155-173)Online publication date: 20-Oct-2020

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Get Access

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media