1 / 20

Mr. Proper

Mr. Proper. Nabil Shahid William Blinn Jeff Lin Matthew Anderegg. Who is Mr. Proper…. … and why did we name our language after him? Step 1. Do hours of work on O.S. assignment. Step 2. Google for hints on how to compile. Step 3. Make mrproper Step 4. Cry. What is MrProper?.

Download Presentation

Mr. Proper

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Mr. Proper Nabil Shahid William Blinn Jeff Lin Matthew Anderegg

  2. Who is Mr. Proper… … and why did we name our language after him? Step 1. Do hours of work on O.S. assignment. Step 2. Google for hints on how to compile. Step 3. Make mrproper Step 4. Cry.

  3. What is MrProper? • Easy to use • Powerful • Multi chat client support • Log file manipulation A multi format log file manipulation language.

  4. Mrp: Easy to Use • Hides complexity. • Logs become primary data type. • Log manipulation akin to integer manipulation.

  5. Mrp: Powerful • Broad functionality. • Analysis of conversations. • Lexical and syntactic analysis. • Text transcription of log files.

  6. Mrp: Multi Chat Client Support • Scalable to support other log formats from various chat clients. • Current built in support for: • AIM • Trillian • Plain text

  7. Mrp: Log File Manipulation • Eliminates file read/write overhead from user programs. • Built in operations such as loading, parsing, saving, and converting log formats.

  8. Why Mr.Proper? • Find links that friends send you. • Search logs for expressions, words, phrases. • Easily convert old conversation logs when switching chat clients. • Parse and format conversation logs to make online publishing easier.

  9. Type System

  10. Control Structures • Expressions • log l = open(“logroot”, “screenName”, 0); • int x = a + b + 1; • Loops • int i;for (i = 1:10) { print (“hello”); } • Functions • func log addLogs (log oldLog) { // code }

  11. String Functions • print() – Prints a string to standard out. • void print (string boo); • strLength() – Returns the length of a string as an integer. • int strLength (string foo) • concat() – Joins two strings and returns the result. • string concat (string moo, string noo); • substr() – Returns part of the input string as a new string. • string substr (string poo, int offset, int length); • contains() – Searches one string for another (using regexps) and returns a boolean. • bool contains (string line, string regexp)

  12. Log File Manipulation Functions • createLog() – Creates an empty log. • open() – Loads a log file into the program. • save() – Writes log file back to disk. • convert() – Covert log from one format to another. • logLength() – Returns the number of messages in the log.

  13. Log Message Functions • getMessageName() – Returns the name of the person who wrote the message. • getText() – Returns the text of the message. • getTime() – Returns time of message as number of seconds elapsed since 01/01/1970. • createMessage() – Creates a new empty message. • setName() – Modifies the name in the message. • setText() – Modifies the text of the message. • setTime() – Modifies the time of the message.

  14. Sample Code func int foo(int x) { return x + 3; } main { int x = 0; for(i = 1:3) { x += foo(x); } print(x); } This program will output the value 15

  15. Log File Manipulation: Function func int wordCount(string word, string path) { log myLog = open(path, “mybuddy”, 1); int i; int length = logLength(myLog) -1 ; int count = 0; string text; for (i = 0:length) { text = getText(getMessage(myLog, i)); if (contains(text, word)) { count += 1; } } return count; }

  16. Log File Manipulation: Main main { int count = wordCount(“hello”, “/mylogs/trillian”); print(count); } Program trace?

  17. Execution of an Mrp Program • MrProper is an interpreted language. • The interpreter takes in a file containing Mrp code, and the instructions are executed as they are encountered.

  18. Testing Plan • Test each component as a module. • .mrp test scripts to go over every part of the language. • Manual and automated semantic error checking. • Test all data types. • Control flow. • Input/output files. • Test component interaction.

  19. Lessons Learned • Understand the basic tools before you try to use them and before assuming that something is wrong with the code. • Create a more detailed project plan. Don’t rely on given milestones. • Learn to balance working together and dividing up tasks.

  20. The Bright Future of Mr. Proper • Added support for other chat clients. • User defined log formats for reading and writing. • Graphical interface for browsing and searching through log files (tree?)

More Related