1 / 21

Lingu

Lingu. A light weight language for critical data processing. Agenda. Brief Description Current Goal System Design Progress Conclusion. Background. Many organizations run mission critical data processing application. Validation & testing is very critical in such application.

nellis
Download Presentation

Lingu

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. Lingu A light weight language for critical data processing

  2. Agenda • Brief Description • Current Goal • System Design • Progress • Conclusion

  3. Background • Many organizations run mission critical data processing application. • Validation & testing is very critical in such application. • In practice, testing is considered an extra burden to the programmer. • Most languages don’t treat validation & testing as an integral part of programming.

  4. The Idea • The idea is to enforce validation and testing to programmer. • This is done by embedding validation script on the programming language. • Lingu is created based on the idea above.

  5. Lingu • A Lightweight language to program data transformation on database. • High level Language. • Small → Simplifies Lingu's internal logic and the verification of Lingu's programs. • Sufficient construct to program a large class of useful data transformations. • Built-in feature to generate random inputs and to report the test results (validation).

  6. Case Study • The prototype development is based on “Agenda & Appointment” sample from Lingu script on RUTI Midterm Report July 2004.

  7. Lingu Class type Agenda = Dbase {| Old :: Table Appointment ; Main :: Table Appointment |} type Appointment = Record {| Date :: Date ; Priority :: Integer ; Note :: String |} class AgendaUtility (a :: Agenda) method cleanup (d::Date) :: () do { insertAll x<-a.Main where x.Date<=d to a.Old ; delete m<-a.Main where x.Date<=d } method emptyOld () :: () do a.Old := <| |>

  8. Lingu Validation Script validation test1 (i::Integer; d::Date) :: Bool local x :: Appointment ; b1,b2 :: Bool do { x := a.Main!!i ; call cleanup(d) ; b1 := find x' <- a.Main where x' = x found T otherwise F ; b2 := find x' <- a.Old where x' = x found T otherwise F } return (b1 \/ b2) pre 0 <= i /\ i < #a.Main post return=T scenario test1(0,currentDate()) ; test1(#a.Main-1,currentDate()) ; test1(#a.Main,currentDate())

  9. Current Goal • Develop a working prototype based on Java programming language • Functionality : • Interpreter and Syntax Checker for Lingu • Connection Database, Lingu-SQL translator • Database test generator • Compiler is not included

  10. System Design

  11. Syntax Checker • Inspecting the syntax of Lingu script based on the grammar. • The EBNF grammar is created from the case study script. • Status : In progress, basic functionality.

  12. type Agenda = Dbase {| Old :: Table Appointment ; Main :: Table Appointment |} public class Agenda { private Appointment[] Old; private Appointment[] Main; public void setOld(Appointment[] Old) { this.Old = Old; } public void setMain(Appointment[]Main) { this.Main = Main; } public Appointment[] getOld() { return this.Old; } public Appointment[] getMain() { return this.Main; } } Lingu Class Translator • Translating Lingu Classes to Java Classes

  13. Lingu Class Translator • Status : In progress, limited to the sample script

  14. Lingu-Java Interpreter • Parsing and executing the Lingu script in a database environment. • Extract the script into a parse tree using JJTree.

  15. Parse Tree validation test1 (i::Integer; d::Date) :: Bool local x :: Appointment ; b1,b2 :: Bool do { x := a.Main!!i ; call cleanup(d) ; . . . }

  16. Validation Test1 Param Body Return bool i d integer date Declaration Assignment x B1 B2 appointment bool bool Parse Tree

  17. Lingu-Java Interpreter • Some of the functionality is hard-coded for prototyping purpose. • Status : In progress, 60 %

  18. Database Connection • Handling the communication from interpreter to the database. • Database connection using JDBC and MySQL as the database server. • Database conenction functionality is limited to CRUD (Create,Update,Delete) operation. • Status : In progress

  19. Test Generator • Automatically populate the database with random inputs for validation purpose. • Random inputs structure is according to the Lingu class. • Test Generator development is currently being started.

  20. Afterwords • Lingu is a work in progress. • The real Lingu is implemented with attribute grammar. • The work is not final, it is open to criticsm and suggestion.

  21. End of Presentation

More Related