I will be presenting the paper "Sample Spaces and Feature Models: There and Back Again" by K. Czarnecki, S. She, and A. Wąsowski at this year's Software Product Line Conference. If you're going to be there, let me know!  

MMath Thesis Presentation: Feature Model Mining

I will be holding a seminar describing my Master's thesis work. It is open to all, so please attend if you're interested. Feature Model Mining. Wednesday, August 6 at 1:30pm in EIT 3145. Update: Here are the slides that I've used for my presentation. More »

It seems that Adobe doesn't want to be left out of the Web 2.0 office application fad with it's Acrobat.com. It provides document writing, desktop sharing, PDF creation, and a neat online PDF reader. All of this was made possible by employing the formerly Macromedia's Flash technology. I was initially excited about the online Acrobat reader since the Linux reader is quite slow, and the other online solutions, such as Scribd are less than impressive. However, the Flash plug-in for Linux isn't very impressive either. Well, in any case, Adobe seems to have gotten the right idea, by starting work on an open-source Flash and certifying PDF as an ISO standard.

Phishing Terms of Agreement?

I’ve been recieving spam via Live Messenger and have mostly ignored them to-date. Feeling adventurous today, I decided to click and view one of these sites and noticed that they had a Terms of Use agreement. It’s actually quite a humourous read if you’re interested, so take a look below.

Read the rest of this entry »

The United States' Department of Homeland Security now has the power to detain a traveler's laptop indefinitely at the border, without any cause for suspicion. This is frightening, especially since all of my work and personal life is stored inside this machine. Not to mention that I use Linux, which might set off a cyber-terrorist alert, since it is the OS of hackers... apparently.

I was looking for traffic conditions prior to my drive to Toronto and found that the Ministry of Transportation uses Google Maps to display the location and images from the highway traffic cameras around Toronto. Very neat!

In anticipation for the Dark Knight, here is a clip of the dynamic duo from the original Batman starring Adam West and Burt Ward. A batcopter, a batladder, four cans of ocean repellent batspray... "Holy Sardines!" Source

Distributed Source Control using Mercurial

I’ve recently started to experiment with distributed source control systems for my personal repository. I had been using Subversion previously, but it had several issues with directories that bothered me. In addition, since my primary computer was a laptop, I also wanted to have full commit and change tracking when I was offline.

So distributed source control systems seemed to fit the bill. I looked at two systems in particular, Mercurial and git. Mercurial caught my eye because of its simplicity, and similarity with the traditional, centralized SCMs such as CVS and Subversion. However, I actually started using git first. The reason was that many open source projects had switched to git and I needed to compile several bleeding edge packages. So, I had no choice but to learn to use git. However, I couldn’t really wrap my head around it. While git is no doubt, a very powerful SCM, it was also a very complicated SCM. I took me a good hour or so before I understood how to track branches.

So, I settled for Mercurial. While I was worried that Mercurial was too immature, the fact that the Mozilla projects are also using Mercurial was very comforting.

Read the rest of this entry »

So the iPhone aka "something big" according to Roger's has been released, and one of its greatest strengths is it's extensible application platform. The iPhone SDK is available for free... but in order to have your application run on an actual iPhone, it will cost a developer $99 and an Intel powered Mac. Hmm.. great idea there, Apple. Charge the very people who might write applications promote the sales of the iPhone.

A visual comparison between using the PHP rand() pseudo-random generator and the numbers generated by random.org, a truly random generator.

We may have a celebrity moving into Waterloo... Stephen Hawking!

Beamer, PDFTeX and XeTeX

I’ve recently started using the beamer class to create slides for my presentation. Up till now, I’ve been using powerdot, and found it more than sufficient. I initially thought beamer to be far more complex than necessary. However, one feature convinced me to switch: PDFTeX and XeTeX support.

Both PDFTeX and XeTeX create a PDF directly from the LaTeX source. XeTeX is built on PDFTeX, and is of particular interest since it has added support for TrueType and OpenType fonts. For beamer presentations, this was great, since it opens up a huge selection of fonts for use in presentations. To change the default font in the document with XeTeX, use the fontspec package. The xunicode package provides additional mapping between LaTeX accents and the selected font. A third package, xltxtra provides some fixes relating to fonts.

\documentclass[xetex,mathserif,serif]{beamer}
 
\usepackage{fontspec}
\usepackage{xunicode} %Unicode extras!
\usepackage{xltxtra}  %Fixes
\setmainfont{Calibri}
\setmonofont[Scale=0.86]{Andale Mono}

Of course, you should replace Calibri and Andale Mono with a font of your choice.

Another nice package to use with PDFTeX, is the microtype package, which provides better font output. Enable the package with this line:

\usepackage[final,expansion=true,protrusion=true,spacing=true,kerning=true]{microtype}

XeTeX and PGF / TiKZ

PGF / TiKZ is a TeX library for drawing graphics using the PDFTeX and XeTeX drivers. However, you may encounter the following error message when attempting to compile a presentation with PGF / TiKZ pictures in your Beamer slides:

Package pgf Warning: Your graphic driver pgfsys-dvipdfm.def does not supported marking the current position.

Unfortunately, the included TiKZ library in the TeXLive 2007 distribution does not support XeTeX. This causes cross-picture coordinates to break, which can be used to draw arrows between various TiKZ pictures in a Beamer frame.

While we wait for TeXLive 2008, you can install the new version of PGF from the CTAN which adds support for the XeTeX driver. Simply download the package, and copy the files to your local ~/texmf/tex/ directory and execute texhash to update the TeX listings.

XeTeX and Wide Pages

Although I haven’t had much time to investigate the issue, but it seems that the pgfpages package that is used with beamer, is not entirely compatible with XeTeX. In particular, the commands:

\setbeameroption{show notes on second screen}        %beamer
\pgfpagesuselayout{two screens with optional second} %pgfpages

does not have any effect on the page dimensions when compiling with xelatex. Compiling with pdflatex does generate a double wide page that is suitable for displaying on two screens.

If you're looking for some Waterloo school spirit, check out the UW rap anthem.

Switched providers and updated design. I found the old design far too distracting, so I hope this one is an improvement!

fmp 0.7.0 Development Release

fmp 0.7.0 Screenshot

I’ve been doing some development on the feature modeling plug-in during the past week and have implemented several new features and bug fixes (shown below).

I’m releasing the plug-in as a development release, for now. I have started rewriting the configuration backend, but my thesis deadline is fast approaching and I will not have enough time to complete the changes in fmp. In any case, please let me know of any bugs you find, or if you have a feature request. The source code is also included in the plug-in, so feel free to hack away at it yourself if you are inclined. When the plug-in is sufficiently tested, I will merge this branch into the trunk of the CVS repository on SourceForge. Give it a try!

New Features

  • New, more robust and featureful constraint view.
  • Constraints are shown for the feature hierarchy in addition to additional constraints.
  • When a configuration is selected in the feature model editor, the constraints are evaluated and the status of each constraint is shown (ie. satisfied or not satisfied).
  • Support for arbitrary propositional formulas when writing additional constraints. NOTE: constraints are written using node Id instead of an XPath expression. However, feature models created using fmp 0.6.6 are compatible, but will require re-writing the constraints using the new grammar. See below for examples.
  • Ability to view Node Ids next to feature names in the feature model.
  • Constraint input validation.
  • Constraint resolution. An unsatisfied constraint can be resolved in a configuration by right-clicking and selecting ‘Resolve Constraint’.

Installation

Project Homepage: http://gsd.uwaterloo.ca/projects/fmp-plugin/fmp-070/

Loading an Ecore model without initializing all necessary packages or schemas

Here’s a small snippet of code to load an Ecore resource without having to initialize all the necessary packages needed to read all elements. This is useful if we’re interested in only a subset of the schema elements that are present in the Ecore model.

public static EList open(File file) throws IOException {
	ResourceSet resourceSet = new ResourceSetImpl();
 
	//Initialize the FSML Package information (ie. URI)
	MyPackageImpl.init();
 
	//Set OPTION_RECORD_UNKNOWN_FEATURE prior to calling getResource
	Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().put(
		"*", new EcoreResourceFactoryImpl() {
			@Override
			public Resource createResource(URI uri) {
			XMIResourceImpl resource = (XMIResourceImpl) super.createResource(uri);
			resource.getDefaultLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, Boolean.TRUE);
			return resource;
		}
	});
 
	XMIResource resource = (XMIResource) resourceSet.getResource(
	URI.createFileURI(file.toString()),
	true);
 
	//Unknown elements will appear in this map
	System.out.println(resource.getEObjectToExtensionMap());
 
	resource.load(Collections.EMPTY_MAP);
	return resource.getContents();
}

Be aware that any unrecognized elements will be null in the retrieved Ecore model.

Script to Connect to UW-Wireless Automatically Using Lynx

The uw-wireless authentication web page that shows up when connected to a UW network started to get on my nerves, so I wrote a little script using the lynx text browser to automatically authenticate when connecting to the network. It also performs a simple check to see if the first two numbers of your IP belong to UW.

#!/bin/sh
IP=$(ifconfig eth0 | grep 'inet addr' | awk '{print $2;}' | cut -d: -f 2)
TOP2=$(echo $IP | cut -d. -f 1-2)
if [[ $TOP2 = '129.97' ]]; then
    echo 'Connected to UW Network...'
    lynx -dump -accept_all_cookies -post_data https://uw-wireless.uwaterloo.ca/login/index.php < ~/.uwwireless | grep 'Successfully Connected' | awk '{print $5;}'
else
    echo 'Not connected to UW Network...'
fi

Create the file ~/.uwwireless and place the following in the file, replacing the YOUR_USERID and YOUR_PASSWORD with your own:

userid=YOUR_USERID&password=YOUR_PASSWORD&mode=Connect

Depending on your version of Lynx, the script may fail if the SSL certificate from uw-wireless.uwaterloo.ca is not recognized. I don’t know of a better solution than simply removing the check. Make the following change in /etc/lynx.cfg (or wherever your lynx.cfg may reside) to remove the SSL certificate prompt:

FORCE_SSL_PROMPT:=yes

TPTP Agent Controller on Arch Linux

Installing Eclipse TPTP using the Update Manager creates several problems under Linux. First, the permissions are missing for the native Integrated Agent Controller code. Symbolic links were also not created for the Integrated Agent Controller libraries, resulting in a “File too short” error message when running the executable. Second, since the Integrated Agent Controller is native code, it requires shared libraries which may or may not be installed on your system. Third, several configuration files need to be writable by the user which executes Eclipse. I installed Eclipse using my own user (not root), so I did not run into this problem, however, there are several posts on the mailing list addressing this problem.

As a result, executing the Profiler within Eclipse would result in a cryptic “Unable to connect to localhost (port 10002)” message.

In order to get the Integrated Agent Controller running, we’ll need to fix the mentioned problems, here’s how to do it on Arch Linux:

  1. Change your working directory to where the TPTP agent controller is installed:
    cd eclipse/plugins/org.eclipse.tptp.platform.ac.linux_ia32_4.4.1.v200709261752/agent_controller
  2. Fix the permissions of the executables:
    cd <tptp_agent_controller_dir>/bin
    chmod +x ACServer ACStart.sh ACStop.sh ACVersion.sh ChkPass RAServer RAStart.sh RAStop.sh SampleClient SetConfig.sh TimeCollector readme.txt tptpFileTransferAgent tptpProcessController</tptp_agent_controller_dir>
  3. Fix the symbolic links for the linked libraries. The following list of files should point to their .so.4.4.0 counterparts. The easiest way to do this is just to download a copy of the standalone Agent Controller and to copy the lib directory to the lib directory of the Integrated Agent Controller:

    ./libtptpClient.so ./libjavaBaseAgent.so.4 ./libtptpUtils.so.4 ./libtptpAgentBase.so.4 ./libtptpUtils.so ./libtransportSupport.so.4 ./libbaseTransport.so.4 ./libhcclsm.so ./libhccldt.so.4 ./libhccls.so.4 ./libnamedPipeTL.so ./libhcclsm.so.4 ./libhcclco.so.4 ./libhccls.so ./libtptpACTL.so ./libtptpClient.so.4 ./libtransportSupport.so ./libtptpCmdExtr.so ./libhcjbnd.so ./libhcbnd.so ./libtptpCmdExtr.so.4 ./libtptpConfig.so ./libnamedPipeTL.so.4 ./libhcclco.so ./libpiAgent.so.4 ./libtptpCCTL.so ./libsocketTL.so ./libtptpCCTL.so.4 ./libjavaBaseAgent.so ./libprocessControlUtil.so.4 ./libtptpConfig.so.4 ./libcompSupp.so ./libtptpLogUtils.so ./libsharedMemTL.so.4 ./libtptpACTL.so.4 ./libprocessControlUtil.so ./libbaseTransport.so ./libpiAgent.so ./libhclaunch.so ./libsocketTL.so.4 ./libhcthread.so ./libcompSupp.so.4 ./libtptpLogUtils.so.4 ./libtptpAgentBase.so ./libhcthread.so.4 ./libsharedMemTL.so ./libhcbnd.so.4 ./libhcjbnd.so.4 ./libhclaunch.so.4 ./libhccldt.so
  4. Install the compatibility libraries using the PKGBUILD located in this wiki article.
  5. Ensure your configuration files are writable by the Eclipse user.
  6. Occasionally, the Agent Controller leaves behind profiling data in the /tmp/IBMRAC directory which causes problems with subsequent executions of the Agent Controller. Delete /tmp/IBMRAC in order to remove the temporary files.
  7. Note: Occasionally, a Java process may prevent the Agent Controller from exiting properly. Killing the appropriate process will allow the controller to be restarted. A ‘killall java’ generally does the trick :)

Firefox 3.0, ScribeFire, RadeonHD and other Miscellaneous Goodies

  • I’m making this post from ScribeFire, a Firefox extension for writing blog entries. Give it a try!
  • Firefox 3.0 is in beta now. Tons of change, but the most important ones to me are: Full page zoom, better GTK integration, and the promised Firefox 2.0 bookmarks revamp. I suggest trying out the nightly builds to see the latest and greatest.
  • The open source RadeonHD driver has reached version 1.0!  I have to switch to a VT in order to control the panel brightness, and it consumes more power than the fglrx driver since there is no dynamic clock management, but most important to me is that… suspend and hibernate just work!
  • The KDE 4.0 release has been pushed to January. I can’t blame them, having tried bits and pieces of it so far, it definitely needs the extra time. I much rather wait and have a stable desktop environment.
  • I switched to Arch Linux a couple months ago. I highly recommend it for experienced Linux users who would like a binary distribution, with a simple system management framework, and a great package management system.
  • Kile 2.0 has been released. There are some nice GUI changes, but most noticeable to me is several fixes to the static line wrapping feature.

CodeLink: A Semantic Wiki for Code Documentation

Documentation maintainence is a difficult and costly process. Existing forms of software documentation exist independent from the code it describes. As a result, problems arise when source code evolves since there is no traceability between the documentation and code domains.

CodeLink, a semantic wiki designed for code documentation attempts to address this problem. CodeLink provides a platform for establishing traceability links between developer documentation and code concepts. Traceability links between documentation and code can be explicitly created by the user through annotations, or inferred through the use of natural language analysis. CodeLink employs an ontology as its knowledge model and a semantic wiki as its user interface. Annotations on traceability relations in the ontology serve to connect natural language phrases with formal ontology concepts. In this paper, the motivation, design and implementation of CodeLink are described. Particular focus is placed on the natural language processing (NLP) component of CodeLink. The process in which the NLP component infers traceability links from the natural language text in the semantic wiki is described in depth. Several methods of querying and retrieving information from the knowledge model are discussed, followed by a summary of related and future work.

Download CS886 CodeLink A Semantic Wiki for Documentation (218), course project for CS886: Natural Language Computing.

Older Page 1 of 2