Project Code

A NOTE REGARDING THE CODE: All code is released under the GNU General Public License (v2). If you find any of the code useful, please email me and let me know (matt at matthewjmiller dot net). All the code is experimental and should be used at your own risk; I assume no responsibility for any damage that it may cause.

My open source code from grad school and beyond. I've put several projects in my Github repositories. You're free to use, but I don't really have time to provide much in the way of support (plus I likely don't remember much about what I wrote years ago). If you're interested in extending or fixing any of the Github repositories, please do fork.

Multi-Key AVL Trees

  • Download: mkavl.tar.gz (Github)

  • Date: 2011

  • Language: C

  • Documentation: Link (also included in the tar file).

  • Description: This is a useful data structure that allows the same data item to be stored in multiple AVL trees keyed differently to allow multiple, different O(lg N) lookups on the data. The back-end AVL implementation is Ben Plaff's library.

    The documentation describes how this can be useful. Two example implementations using the library are included in the project files (one for an employee database and one for a memory manager). Also included is a unit test suite for the library.

C Interface Generator Script

  • Download: c_intf_gen.tar.gz (Github)

  • Date: 2011

  • Language: Python and C

  • Documentation: Link (also included in the tar file).

  • Description: A lot of OO design patterns just need interfaces (vs. type inheritance). Go for example was designed without type inheritance. With enough work, you can add decent interface support for C, but there's a lot of "boring", error-prone coding involved. So, this is a Python script design to input a description language of the interface structure and generate most of that "boring" C code so you can focus on the unique functionality of your classes.

    In addtion to the script, this includes a full example of the abstract factory design pattern including documentation.

C Object-Oriented Examples

  • Download: c_oo.tar.gz (Github)

  • Date: 2011

  • Language: C

  • Documentation: Link (also included in the tar file).

  • Description: I wanted to explore ways of acheiving some of the class OO design techniques like inheritance and interfaces to C. So, this provides a template for one way to do it. I don't think it's that practical because there is a lot of manual overhead to add new functions and such, but it gives a template for the C code that could be produced automatically by a code generator given an inheritance/interface description. I think of it more as a playground to try stuff out that could then be incorporated into a code generator.

RFIDSIM

  • Download: rfidsim.tar.gz (Github)

  • Date: December 2006

  • Language: C++

  • Documentation: Link (also included in the tar file).

  • Description: This is the core of a RFID simulator that I was working on before graduating. It is here for other developers that may be interested in extending for their own experiments (I've added this to Github in case anyone wants to fork it). It is very much in the alpha stages and not intended for general users. Check out the documentation for more detail about the simulator and what improvements it needs.

TinyOS Implementation of Probability-Based Broadcast Forwarding

  • Download: tinyos-1.1.15-pbbf.tar.gz

  • Date: June 2006

  • Language: nesC (variant of C)

  • References: Practical Exploitation of the Energy-Latency Tradeoff for Sensor Network Broadcast (PerSeNS and tech report versions from my publications)

  • Description: This implements the Probability-Based Broadcast Forwarding protocol (PBBF), described in our ICDCS paper, in TinyOS 1.1.15. It is implemented on top of B-MAC by Polastre et al.

    Unfortunately, I do not have time to make a README or documentation for these changes, but I commented all my modifications with "MATT", so you can grep for that string to find the changes.

TOSSIM CC1000 Code

  • Download: tinyos-1.1.15-sim_cc1000.tar.gz

  • Date: May 2006

  • Language: nesC (variant of C)

  • Description: One of the problems I ran in to in TinyOS 1.1.15 is that the CC1000 radio model for TOSSIM no longer corresponds to the $TOSROOT/tos/platform/mica2/ radio components. In particular, I wanted to test the power save protocol from the Mica2 platform (i.e., B-MAC) in TOSSIM.

    So, I made some modifications and symlinks in the $TOSROOT/tos/platform/pc/CC1000Radio/ directory to be able to use most of the Mica2 CC1000 components in TOSSIM (notably, SysTime and SysTimeStamping components do not work correctly in TOSSIM). The symlinks are such that the major CC1000 components used in TOSSIM are symlinked to the corresponding Mica2 file. So, if you're editing, say, $TOSROOT/tos/platform/mica2/CC1000RadioIntM.nc then you do not have to make corresponding changes in $TOSROOT/tos/platform/pc/CC1000Radio/CC1000RadioIntM.nc since this latter file is a symlink to the former file.

    Unfortunately, I do not have time to make a README or documentation for these changes, but I commented all my modifications with "MATT", so you can grep for that string to find the changes.

ns-2 Code

  • Download:
    • cs497ig_paper_code.tar.gz: This includes the simulation code and scripts for (1) Probability-Based Broadcast Forwarding (PBBF) (ICDCS 2005) and (2) key distribution for sensor networks (Infocom 2006).
    • one_radio_code.tar.gz: This includes the simulation code and scripts for (1) dynamic ATIM windows (CS-ATIM and DCS-ATIM) (MASS 2005) and (2) multilevel power save routing.
    • two_radio_code.tar.gz: This is the simulation code and scripts to create devices with two radios that can be configured with different energy consumption characteristics.
    • wakeup_code.tar.gz: This is the simulation code and scripts for (1) testing the various versions of STEM protocols (PhD thesis) and (2) the triggered wake-up protocol (TMC 2005 and MS thesis).
    • wcnc04_code.tar.gz: This is the simulation code and scripts for the work described in my WCNC 2004 paper.
     
  • Date: 2002-2006

  • Language: C++/OTcl and Perl (for scripting)

  • Description: This is the simulation code that I wrote for my projects. I think this was all done in version 2.26 (a couple may have been in 2.1b9a). It is not very well organized, but each download has a brief description of what the code contains. Also, note that the tar files only include the files that I modified, not the entire ns-2 distribution.

    Unfortunately, I do not have time to make a README or documentation for these changes, but I commented all my modifications with "MATT", so you can grep for that string to find the changes.