Evaluating bids

College Program in Python and Lisp

Published on the April 04, 2022 in IT & Programming

About this project

Open

Programming in Python and Lisp.

Introduction

This project will serve two purposes. It will:

provide (just enough) practice with Lisp to get a taste of Functional Programming
motivate the idea of the creation of a program that generates other programs.
We will do this by leveraging work performed on Project 3. Specifically, we have a Python program that has the capability to load a file that represents an FSA. We will extend the functionality of that program to generate a Lisp program that can process the FSA represented in the file. Note: we could generate the code dynamically within Lisp, but I deem it beyond the scope of what we are able to accomplish in such a short time.

Project specifications:

Your objective is to develop a Lisp program (Part 1) and a Python program (Part 2 of this project) as follows:

Part 1: Design, program and test a Lisp program that can evaluate the FSA pictured below. Name the file part1.lsp. From this program, you will be able to recognize the format of a Lisp program that solves FSA problems. Knowing this overall format will guide part 2.
Part 2: Use the program in Python from project 3 that can load and represent an FSA as the starting point. Extend that program to generate a Lisp program in the format of the Lisp program you created in Part 1. The generated Lisp program should be named part2.lsp. Again, your solution should be general - not hard-coded for the particular FSA presented here.
Running the programs:

Part 1. Provide p1.bat It only needs one line:

xlwin32 part1.lsp

Part 2.
Include a batch file named p2.bat with the following
python lisp-fsa-gen.py fsa.txt  // generates the Lisp program part2.lsp
timeout /t 2                    // wait for first program to finish
xlwin32 part2.lsp                // invoke xlwin32.exe with generated fsa processor

As you can see, the Python program takes a command line argument for the FSA specification file (fsa.txt). It should automatically generate the Lisp program.
Both the Part 1 hand-coded Lisp program and the Part 2 Lisp program that the Python program generates should include a separate function named demo which will automatically read a file named "theString.txt," that contains a list with the string to be tested, use set or setq to set a variable named theString to the values in the list, and then invoke your fsa program with that string. So, after the batch file has run xlwin32.exe and loaded your Lisp file, the user should simply invoke (demo) and everything else should happen automatically. All output goes to the xLisp console. Include xlwin32.exe with your submission so everything should run VERY smoothly!

The FSA for which you must write a Lisp program in Part 1:

Project overview

Programming in Python and Lisp. Introduction This project will serve two purposes. It will: provide (just enough) practice with Lisp to get a taste of Functional Programming motivate the idea of the creation of a program that generates other programs. We will do this by leveraging work performed on Project 3. Specifically, we have a Python program that has the capability to load a file that represents an FSA. We will extend the functionality of that program to generate a Lisp program that can process the FSA represented in the file. Note: we could generate the code dynamically within Lisp, but I deem it beyond the scope of what we are able to accomplish in such a short time. Project specifications: Your objective is to develop a Lisp program (Part 1) and a Python program (Part 2 of this project) as follows: Part 1: Design, program and test a Lisp program that can evaluate the FSA pictured below. Name the file part1.lsp. From this program, you will be able to recognize the format of a Lisp program that solves FSA problems. Knowing this overall format will guide part 2. Part 2: Use the program in Python from project 3 that can load and represent an FSA as the starting point. Extend that program to generate a Lisp program in the format of the Lisp program you created in Part 1. The generated Lisp program should be named part2.lsp. Again, your solution should be general - not hard-coded for the particular FSA presented here. Running the programs: Part 1. Provide p1.bat It only needs one line: xlwin32 part1.lsp Part 2. Include a batch file named p2.bat with the following python lisp-fsa-gen.py fsa.txt // generates the Lisp program part2.lsp timeout /t 2 // wait for first program to finish xlwin32 part2.lsp // invoke xlwin32.exe with generated fsa processor As you can see, the Python program takes a command line argument for the FSA specification file (fsa.txt). It should automatically generate the Lisp program. Both the Part 1 hand-coded Lisp program and the Part 2 Lisp program that the Python program generates should include a separate function named demo which will automatically read a file named "theString.txt," that contains a list with the string to be tested, use set or setq to set a variable named theString to the values in the list, and then invoke your fsa program with that string. So, after the batch file has run xlwin32.exe and loaded your Lisp file, the user should simply invoke (demo) and everything else should happen automatically. All output goes to the xLisp console. Include xlwin32.exe with your submission so everything should run VERY smoothly! The FSA for which you must write a Lisp program in Part 1:

Category IT & Programming
Subcategory Other
Project size Small
Is this a project or a position? Project
I currently have I have specifications
Required availability As needed

Delivery term: Not specified

Skills needed

Other projects posted by L.