NPL

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:

  1. 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.
  2. 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.
  3. Though inefficient, NPL's interpreter has a unique design as it executes COP directly.
  4. 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.

History

NPL is a programming language written by me during a hiatus from my career (during a period of 7 months).

Oral Presentations

I have given oral presentations about NPL in the following places:

  1. Presented NPL at Microsoft Research, Bangalore. (Dr. Sriram Rajamani's group)
  2. Presented NPL at Yahoo! R&D center, Bangalore. (Thursday Tech Talk series)
  3. Presented NPL to Prof. Y Srikant, Professor and Ex- Chair, Department of CS, IISc, Bangalore.
  4. Presented NPL to Prof. Govindarajulu, Department of CS, IIIT, Hyderabad.
  5. Presented NPL to IT Department faculty of Vasavi College of Engineering.
  6. Presented NPL at Barcamp Bangalore and Barcamp Chennai.

Downloads

Source

The Source Code for NPL can be downloaded from here.

Paper

This is a paper written on NPL.[pdf] (Submitted for review at OOPSLA 2006, Onward Track)

Video

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.


Note1: For best results, please read the paper before viewing the videos.
Note2: The documentation is a bit dated. The new documentation will be here soon.

NPL Blog

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

Hello World

(
	(print 'Hello World')
)
Video

Computing Fibonacci numbers

(
	(def fact n
		(
			(if (<= n 0)
				(return 1)
				(return (* n (fact (- n 1))))
			)
		)
	)
	(print (fact 3))
)
Video

Reflection in NPL

(
	(= a 5)
	(__arg__ "a" 6)
	(print (__arg__ "a"))
)
Video

Contact Information

Please mail your feed back on the project to suman dot karumuri at gmail dot com.