NPL is the first programming language designed to aid program visualisation. The current implementation is a proof of concept prototype implemented in Python.
Gist of NPL
NPL, a recursive acronym, stands for NPL Programming Language. It is based on a new computational model called Connect Oriented Paradigm (COP) designed by me. When NPL programs are executed, they generate a planar and hierarchical graph of the program that embeds all the syntactic, semantic and run-time aspects of the program. This graph is significant because it allows one to visualise code at various levels of granularity and in various views. The current implementation has only provides a low-level visualisation of code and I am currently working on high level visualisation.
Other benefits of NPL include:
- NPL's visualisation is also a better model to teach programming to newbies than existing systems, because all the abstract concepts they understand can be seen as concrete figures.
- Debugger hooks for Interpreters of existing languages can be used to generate data similar to a COP based interpreter. This implies that code in any language can be visualised.
- Though inefficient, NPL's interpreter has a unique design as it executes COP directly.
- The user can interact with the program while it's running and can change its code, control and data flow dynamically. This feature aids a lot in testing programs.
COP, though independently invented is a refinement of Actor model/message passing concurrency(Continuation passing style). The major difference between the two models is that in actor model does not represent expressions and symbol tables as actors while COP looks at both of them as Connects (actor). This makes COP both low level and allows all the data required for the program to be contained in the graph generated at runtime.
NPL is a programming language written by me during a hiatus from my career (during a period of 7 months).
I have given oral presentations about NPL in the following places:
- Presented NPL at Microsoft Research, Bangalore. (Dr. Sriram Rajamani's group)
- Presented NPL at Yahoo! R&D center, Bangalore. (Thursday Tech Talk series)
- Presented NPL to Prof. Y Srikant, Professor and Ex- Chair, Department of CS, IISc, Bangalore.
- Presented NPL to Prof. Govindarajulu, Department of CS, IIIT, Hyderabad.
- Presented NPL to IT Department faculty of Vasavi College of Engineering.
- Presented NPL at Barcamp Bangalore and Barcamp Chennai.
The Source Code for NPL can be downloaded from here.
This is a paper written on NPL.[pdf] (Submitted for review at OOPSLA 2006, Onward Track)
Please download part1 and part2 of the screencast introducing NPL (in avi format) .In mpg format part1 and part2.
If you are facing issues playing the videos, use mplayer or vlcplayer.
For best results, please read the paper before viewing the videos.
The documentation is a bit dated. The new documentation will be here soon.
This is the official blog of the NPL programming language. I intend to post my ideas and thoughts about NPL on the blog.
Sample NPL Programs
(print 'Hello World')
Computing Fibonacci numbers
(def fact n
(if (<= n 0)
(return (* n (fact (- n 1))))
(print (fact 3))
Reflection in NPL
(= a 5)
(__arg__ "a" 6)
(print (__arg__ "a"))
Please mail your feed back on the project to suman dot karumuri at gmail dot com.