<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Wiki</title>
		<link>../../wiki/show/HomePage</link>
		<description>Pimki: a wiki based PIM</description>
		<language>en-us</language>
		<ttl>40</ttl>
  
		<item>
      <title>System Analyser</title>
    
      <description>&lt;h3&gt;Introduction&lt;/h3&gt;


	&lt;p&gt;Welcome to the System Analyser for Common Lisp home page. Here you can find different types of documentation and the source code of the applicaiton.&lt;/p&gt;


	&lt;p&gt;I wrote the System Analyser to provide an automated means of detecting whether a system had developed unwanted characteristics within itself and also with it&amp;#8217;s coupling to other systems. These characteristics tend to become more prominent as the scale of the system increases and it&amp;#8217;s better to detect and address them before they get out of hand. The kind of characteristics you want to look for include:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;unbalanced structure of the module relationships within a system&lt;/li&gt;
		&lt;li&gt;bloated dependencies between systems&lt;/li&gt;
		&lt;li&gt;circular dependencies (although modern system definition facilities should pick this up)&lt;/li&gt;
		&lt;li&gt;bloated modules/systems whose components have poor cohesion&lt;/li&gt;
		&lt;li&gt;insufficient decoupling of a module&amp;#8217;s interface and implementation&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;For a more detailed introduction to System Analyser I recommend following the links below and reading the documentation, starting with &amp;#8220;What Is It?&amp;#8221;.&lt;/p&gt;


	&lt;h3&gt;Documentation&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/System+Analyser+-+What+Is+It&quot;&gt;System Analyser - What Is It&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/System+Analyser+-+Getting+Started&quot;&gt;System Analyser - Getting Started&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/System+Analyser+-+Architectural+Overview&quot;&gt;System Analyser - Architectural Overview&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;h3&gt;Downloads&lt;/h3&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;strong&gt;Version&lt;/strong&gt; &lt;/td&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;strong&gt;Source Code&lt;/strong&gt; &lt;/td&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;strong&gt;Release Notes&lt;/strong&gt; &lt;/td&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;strong&gt;API Reference&lt;/strong&gt; &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td&gt; 0.2 &lt;/td&gt;
			&lt;td&gt; &lt;a href=&quot;../../distfiles/sys-analyser_0.2.tar.gz&quot;&gt;package&lt;/a&gt; &lt;a href=&quot;../../distfiles/sys-analyser_0.2.tar.gz.asc&quot;&gt;public key&lt;/a&gt; &lt;/td&gt;
			&lt;td&gt; n/a &lt;/td&gt;
			&lt;td&gt; &lt;a href=&quot;../../distfiles/sys-analyser-0.2-documentation.tar.gz&quot;&gt;package&lt;/a&gt; &lt;a href=&quot;../../distfiles/sys-analyser-0.2-documentation.tar.gz.asc&quot;&gt;public key&lt;/a&gt; &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;h3&gt;License&lt;/h3&gt;


	&lt;p&gt;System Analyser is released under a BSD style license. See the LICENSE file in package for more details.&lt;/p&gt;


	&lt;h3&gt;Roadmap&lt;/h3&gt;


	&lt;p&gt;At the moment I don&amp;#8217;t have an issue/defect tracking system setup. I still haven&amp;#8217;t decided on a suitable implementation. If anyone has some recommendations please let me know.&lt;/p&gt;


	&lt;p&gt;Here is the current list of enhancements under consideration for upcoming releases:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; an abstraction for grouping analysis checks into a suite, similar to how unit tests are grouped into test suites&lt;/todo-tag&gt;&lt;/li&gt;
		&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; a service for drawing the system definition into a visual graph using Graphviz&lt;/todo-tag&gt;&lt;/li&gt;
		&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; write a developer's guide and/or tutorial&lt;/todo-tag&gt;&lt;/li&gt;
		&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; support mk-defsystem system definitions&lt;/todo-tag&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;Other more mundane house-cleaning tasks that need to be done for future releases:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; create a chained-condition under core/condition&lt;/todo-tag&gt;&lt;/li&gt;
		&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; move item-not-found-error and already-exists-error to core/condition&lt;/todo-tag&gt;&lt;/li&gt;
		&lt;li&gt;&lt;todo-tag class=&quot;todo-normal&quot; context=&quot;&quot; due_date=&quot;&quot; importance=&quot;3&quot; status=&quot;not-started&quot;&gt;&lt;strong&gt;TODO:&lt;/strong&gt; move the ASDF utililty functions in service/sys-graph to util/sysdef&lt;/todo-tag&gt;&lt;/li&gt;
	&lt;/ul&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 08:33:33 Z</pubDate>
      <guid>../../wiki/show/System+Analyser</guid>
      <link>../../wiki/show/System+Analyser</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>Biography</title>
    
      <description>&lt;h3&gt;Bio&lt;/h3&gt;


	&lt;p&gt;My name is Kean Lau. I&amp;#8217;m a 25 year old software and release engineer living in Sydney, Australia. I&amp;#8217;ve been working in the industry for 6 years and I imagine I&amp;#8217;ll be in it for a long while yet. Back in 1st year of uni I used to chuckle at the old lecturers who were really eccentric and cynical. It&amp;#8217;s not so funny now that I realise I&amp;#8217;m following their same paths!&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m a geek at heart, so my hobbies include gadgets, sci-fi shows &amp;#38; books and anime. Like most guys I&amp;#8217;m always on the look out for a tasty meal, though I&amp;#8217;m conscious of staying healthy and fit. My other interests include prog music, snooker &amp;#38; poker. The sports I play and watch the most are tennis, cricket and football (an I&amp;#8217;m not refering to rugby league, ruby union or aussie rules).&lt;/p&gt;


	&lt;p&gt;If anyone is interested, you can find my CV &lt;a href=&quot;../../distfiles/Kean_Lau-CV.pdf&quot;&gt;here&lt;/a&gt;&lt;/p&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 07:34:14 Z</pubDate>
      <guid>../../wiki/show/Biography</guid>
      <link>../../wiki/show/Biography</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>System Analyser - Getting Started</title>
    
      <description>&lt;h3&gt;Requirements&lt;/h3&gt;


	&lt;p&gt;System Analyser does not use any implemention dependent features. If your Common Lisp implementation is compliant with the ANSI Common Lisp standard it should work with System Analyser. Having said that so far I&amp;#8217;ve only tried it on Steel Bank Common Lisp (SBCL). If it doesn&amp;#8217;t work with your implementation let me know.&lt;/p&gt;


	&lt;p&gt;The software pre-requesites for System Analyser that need to be installed manually are the following:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;ASDF-install &amp;#8211; see the &lt;a href=&quot;http://www.cliki.net/asdf-install&quot;&gt;Cliki&lt;/a&gt; page for installation instructions&lt;/li&gt;
		&lt;li&gt;ASDF &amp;#8211; see the &lt;a href=&quot;http://www.cliki.net/asdf&quot;&gt;Cliki&lt;/a&gt; page for installation instructions&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;System Analyser depends on 2 other systems, FiveAM for unit testing and Albert for documentation generation. If for some reason the current versions of these systems available through ASDF-install won&amp;#8217;t compile in your environment, you can try install it through your OS&amp;#8217; distributed package management facility. There are Debian packages available for FiveAM (cl-fiveam) and Albert (albert), which can be installed through &lt;code&gt;apt-get&lt;/code&gt; or &lt;code&gt;aptitude&lt;/code&gt;. I haven&amp;#8217;t checked whether they are available on other distros or BSD variants.&lt;/p&gt;


	&lt;p&gt;To generate HTML documentation from the code you will need to install either jade or openjade on your system.&lt;/p&gt;


	&lt;h3&gt;Installation&lt;/h3&gt;


	&lt;p&gt;To get System Analyser up and running, enter these instructions in the REPL of your CL implementation:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
1. CL-USER&amp;gt; (asdf-install:install 'sys-analyser) - download System Analyser and it's dependent systems
2. CL-USER&amp;gt; (asdf:oos 'asdf:compile-op 'sys-analyser) - compile System Analyser
3. CL-USER&amp;gt; (asdf:oos 'asdf:test-op 'sys-analyser) - run the unit tests
4. CL-USER&amp;gt; (asdf:oos 'asdf:doc-op 'sys-analyser) - generate Docbook documentation
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;The installation location of System Analyser will depend on your CL implementation. &lt;br /&gt;For example under SBCL the location will be &lt;code&gt;$HOME/.sbcl/site/sys-analyser-&amp;lt;ver_num&amp;gt;&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;To generate HTML API documentation you need to jump out to a shell session:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;
1. some-shell) cd &amp;lt;sys-analyser_install_dir&amp;gt;/doc/api
2. some-shell) openjade -E 99999 -d ./albert.dsl -t sgml &amp;lt;albert_install_dir&amp;gt;/xml.dcl ./book.xml
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;To view the documentation point your web browser to &lt;code&gt;&amp;lt;sys-analyser_install_dir&amp;gt;/doc/api/index.html&lt;/code&gt;.&lt;/p&gt;


	&lt;p&gt;Jade will generate the HTML files inside &lt;code&gt;&amp;lt;sys-analyser_install_dir&amp;gt;/doc/api&lt;/code&gt;. Unfortunately Albert doesn&amp;#8217;t generate API HTML documents that match the quality of Javadoc or Doxygen. It looks like no formatting or markup is available for the documentation strings in the code.&lt;/p&gt;


	&lt;h3&gt;Trying it out&lt;/h3&gt;


	&lt;p&gt;To get an idea of what System Analyser can do have a look at the examples under &lt;code&gt;&amp;lt;sys-analyser_install_dir&amp;gt;/eg/business&lt;/code&gt;. You can run the examples through the REPL:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;CL-USER&amp;gt; (sys-analyser.business:suite-example1)&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;which will create a file called &lt;code&gt;example-deprecated-report.txt&lt;/code&gt; in your current directory.&lt;/p&gt;


	&lt;h3&gt;Uninstallation&lt;/h3&gt;


	&lt;p&gt;Uninstallation is done through ASDF-install&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;CL-USER&amp;gt; (asdf-install:unnstall 'sys-analyser)&lt;/code&gt;&lt;/pre&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 03:45:01 Z</pubDate>
      <guid>../../wiki/show/System+Analyser+-+Getting+Started</guid>
      <link>../../wiki/show/System+Analyser+-+Getting+Started</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>System Analyser - Architectural Overview</title>
    
      <description>&lt;h3&gt;Application Architecture&lt;/h3&gt;


	&lt;p&gt;System Analyser&amp;#8217;s application is divided into 6 main modules:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Business Layer &amp;#8211; This layer contains all of the business logic to analyse system definitions for unwanted characteristics. Please note that System Analyser doesn&amp;#8217;t provide a Business Layer built in; it provides a framework to write your own Business Layer to suit your requirements.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;System Analysis Language (SAL) &amp;#8211; This module contains the definition of the domain specific language SAL.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Service Layer &amp;#8211; This module encapsulates all of the operations performed in the conceptual domain model. Domain Service is intended to be common layer used in multiple applications involved in the same domain.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Domain Datatype &amp;#8211; This module contains datatype representations of the entities in the domain model. For the System Analyser, only 2 entities exist, the system graph and the analysis report.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Core &amp;#8211; A collection of fundamental libraries that are considered so essential that every software system is going to need them&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Util &amp;#8211; A range of fundamental libraries that are more specialised, where each library is likely to be used in a minority of software systems.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;&lt;img src='/wiki/get_image/53797374656d20416e616c79736572203a3a204172636869746563747572616c204f76657276696577n0.png' /&gt;&lt;/p&gt;


	&lt;p&gt;The modules interact with each other in the following fashion:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;The business logic in Business Layer is expressed in the various components of the System Analysis Language module&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Operations requested in Business Layer is carried out by Services Layer&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Most of the data manipulation in Business Layer is done on the datatypes from Domain Datatypes&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Service Layer is implemented using Core and Utility&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;System Analysis Language is implemtned using Core&lt;/li&gt;
	&lt;/ul&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 02:36:35 Z</pubDate>
      <guid>../../wiki/show/System+Analyser+-+Architectural+Overview</guid>
      <link>../../wiki/show/System+Analyser+-+Architectural+Overview</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>Hobbies</title>
    
      <description>&lt;p&gt;Currently in transition. Need to move the Hobby pages from my old Wiki to this one.&lt;/p&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 01:46:57 Z</pubDate>
      <guid>../../wiki/show/Hobbies</guid>
      <link>../../wiki/show/Hobbies</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>Blog</title>
    
      <description>&lt;p&gt;Follow the Bliki link in the navigation bar at the top of the page.&lt;/p&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 01:45:30 Z</pubDate>
      <guid>../../wiki/show/Blog</guid>
      <link>../../wiki/show/Blog</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>Menu</title>
    
      <description>&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/HomePage&quot;&gt;HomePage&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/Menu&quot;&gt;Menu&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/Blog&quot;&gt;Blog&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/Hobbies&quot;&gt;Hobbies&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/Projects&quot;&gt;Projects&lt;/a&gt;
	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/System+Analyser&quot;&gt;System Analyser&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/KhlScheme&quot;&gt;KhlScheme&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/Biography&quot;&gt;Biography&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 01:40:27 Z</pubDate>
      <guid>../../wiki/show/Menu</guid>
      <link>../../wiki/show/Menu</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>HomePage</title>
    
      <description>&lt;h2&gt;Welcome&lt;/h2&gt;


	&lt;p&gt;Hi, welcome to my home page. It&amp;#8217;s basically a dumping ground for my hobbies and thoughts. The website you&amp;#8217;re looking at now is actually a snapshot from my Wiki. It&amp;#8217;s currently in a transition stage as I move content from my old Wiki to this one. I can&amp;#8217;t run the Wiki on my website as my ISP won&amp;#8217;t support the required infrastructure on their webserver.&lt;/p&gt;


Some of the things you&amp;#8217;ll find here include:
	&lt;ul&gt;
	&lt;li&gt;source code and information on the open source projects I&amp;#8217;ve worked on&lt;/li&gt;
		&lt;li&gt;a blog for my ramblings and rants&lt;/li&gt;
		&lt;li&gt;tips and nuggets of information on various topics that be useful for other people&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;To navigate around the website, I recommend using the &lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/Menu&quot;&gt;Menu&lt;/a&gt; on the left frame.&lt;/p&gt;</description>
    
      <pubDate>Thu, 18 Oct 2007 01:36:51 Z</pubDate>
      <guid>../../wiki/show/HomePage</guid>
      <link>../../wiki/show/HomePage</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>System Analyser - What Is It</title>
    
      <description>&lt;h3&gt;Overview&lt;/h3&gt;


	&lt;p&gt;System Analyser is a simple application framework for analysing the properties of a system definition. The main feature of the framework is a declarative domain specific language called System Analysis Language (I can&amp;#8217;t be bothered thinking of a more catchy name), which is supported by some services for analysis reports and system definition graphs.&lt;/p&gt;


	&lt;p&gt;Currently System Analyser will work with ASDF system definitions, but Mk-Defsystem support is planned for future releases.&lt;/p&gt;


	&lt;p&gt;To start this introduction will go through the basics of the System Analysis Language (SAL) and then move on to some of the domain specific services provided.&lt;/p&gt;


	&lt;h3&gt;System Analysis Language&lt;/h3&gt;


	&lt;p&gt;At the heart of SAL is a group of primitives that provide functionality very similar to set/list comprehension. If you are not familiar with set/list comprehension have a look &lt;a href=&quot;http://en.wikipedia.org/wiki/Set_comprehension&quot;&gt;here&lt;/a&gt; and &lt;a href=&quot;http://en.wikipedia.org/wiki/List_comprehension&quot;&gt;here&lt;/a&gt; .&lt;/p&gt;


	&lt;p&gt;Set/List comprehension is an expression that returns a set of values that meet certain criteria. For the analysis of system definitions, set/list comprehension can be used to pick out modules from the system definition that have unwanted characteristics. More importantly set/list comprehension is declarative, ie it expresses what should be in the set, not how the set should be generated, and this makes it a powerful domain specific abstraction for system definition analysis.&lt;/p&gt;


	&lt;p&gt;Like set/list comprehension SAL provides the 3 primitives for building sets. These are:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;quantifiers&lt;/li&gt;
		&lt;li&gt;generators&lt;/li&gt;
		&lt;li&gt;filters&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;The differences between the set/list comprehension provided in SAL and the more traditional versions are:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;The set built is a set of system module IDs&lt;/li&gt;
		&lt;li&gt;The set generators draw the system modules IDs from a system definition graph, rather than some pre-defined range&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;The best way of describing the capabilities of SAL is to give a few examples.&lt;/p&gt;


	&lt;h4&gt;Example 1&lt;/h4&gt;


	&lt;p&gt;Let&amp;#8217;s start with the simplest example, where we want to use System Analyser to find all modules that depend on another module that we have declared to be deprecated.&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
1    (for-some ((module (&amp;lt;-target-of sys-graph sys-name)))
2              (and (member module *deprecated-list* :test #'equalp)
3                   (not (eq '() (get-all-required-by-links-from-module sys-graph module)))))
&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;

	&lt;p&gt;On the left hand side of the example, I have provided line numbers to help explain the code. I&amp;#8217;ll describe what&amp;#8217;s happening line by line and provide an explanation of how all the parts work together at the end.&lt;/p&gt;


	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 1 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(for-some ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; The outer most expression is a quantifier; in this case &lt;code&gt;for-some&lt;/code&gt; is an existential quantifier. Each quantifier takes 2 arguments, a list of set generators and a filter &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(module ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is a declared variable that will be bound to an element from the generated set. The variable can be referenced inside the filter &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(&amp;lt;-target-of ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; &lt;code&gt;&amp;lt;-target-of&lt;/code&gt; is a set generator returns the IDs of all the system modules that are a required to be built before the some specified module can be built. A set generator can take as many arguments as it requires. In this case it only requires 2 &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;sys-graph&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This set generator argument is the system definition contained in a graph data structure &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;sys-name&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This set generator argument is the ID of the module whose build targets are being returned in the set. In this case we are passing in the ID of a top-level module, ie a system &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 2 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(and ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is the set comprehension filter, which is a predicate asserting what properties a system module must have to qualify for inclusion in the generated set. In this case the filter is a compound predicate combined through the &lt;code&gt;and&lt;/code&gt; function &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(member module *deprecated-list* :test #'equalp)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This 1st predicate asserts that the module ID must match one of the IDs in some list (&lt;code&gt;*deprecated-list*&lt;/code&gt;) representing the deprecated modules &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 3 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(not (eq '() (get-all-required-by-links-from-module sys-graph module)))&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This 2nd predicate asserts that we&amp;#8217;re only interested in deprecated modules that are required by some other module &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;p&gt;So what is this set comprehension expression trying to do? It is building a set of module IDs that are build targets of &lt;code&gt;sys-name&lt;/code&gt; and have the properties of being deprecated and being required by other modules.&lt;/p&gt;


	&lt;p&gt;Now that we have the list of modules, what can with do with it? SAL provides other primitives to help report the analysis findings. Let&amp;#8217;s explore this by continuing with the example used above:&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
1    (when-matches
2       (set (for-some ((module (&amp;lt;-target-of sys-graph sys-name)))
3                      (and (member module *deprecated-list* :test #'equalp)
4                           (not (eq '() (get-all-required-by-links-from-module sys-graph module))))))
5       (add-deprecated-chapters! sys-graph report set)))
&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;

	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 1 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(when-matches ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is a conditional expression that takes 2 arguments &amp;#8211; an expression that returns a list and an expression that is evaluated if the first argument returns a non-empty list &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 2 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(set ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is a declared variable that will be bound to the list returned by the set comprehension &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;The rest of line 2 and lines 3 &amp;#38; 4 were explained above&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 5 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(add-deprecated-chapters! sys-graph report set)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is a call to a function that takes the list of culprits (bound to the variable &lt;code&gt;set&lt;/code&gt; that was declared in line 2), generates a deprecated report chapter for each of them and adds the chapters to the analysis report &lt;code&gt;report&lt;/code&gt;. It will only be evaluated if the set generator returned a non-empty set &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;br /&gt;We now have a means to tie the module IDs generated by the set comprehension with a mechanism that can describe why they require attention in an analysis report. This example shows the core of SAL.&lt;/p&gt;


	&lt;h4&gt;Example 2&lt;/h4&gt;


	&lt;p&gt;The first example is rather simplistic and doesn&amp;#8217;t highlight the true benefits of expressing system analysis in SAL. A more complex example will highlight this. In this example we want to find all modules that has one or more critical path dependencies whose weight is greater than some threshold.&lt;/p&gt;


&lt;pre&gt;
&lt;code&gt;
1   (when-matches
2       (set (for-some* ((node (&amp;lt;-target-of sys-graph sys-name))
3                        (leaf (&amp;lt;-dependent-leaf-of sys-graph node)))
4                       (&amp;gt; (critical-path-weight node leaf) *weight-threshold*)))
5       (add-deep-dependency-chapters! sys-graph report set))
&lt;/code&gt;&lt;br /&gt;&lt;/pre&gt;

	&lt;p&gt;Again on the left hand side of the example, I have provided line numbers to help explain the code. I&amp;#8217;ll describe what&amp;#8217;s happening line by line and explain how all of the parts work together at the end.&lt;/p&gt;


	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 1 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(when-matches ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; The same &lt;code&gt;when-matches&lt;/code&gt; conditional from example1 &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 2 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(set ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; The declared variable to bound to the return value from the set comprehension &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(for-some* ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is an existential quantifier that nests each set generator passed as an argument. &lt;code&gt;for-some&lt;/code&gt; and &lt;code&gt;for-some*&lt;/code&gt; have the same relationship as &lt;code&gt;let&lt;/code&gt; has with &lt;code&gt;let*&lt;/code&gt;. &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(node (&amp;lt;-target-of ...))&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is the same set generator used in the 1st example &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 3 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(leaf ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is a declared variable that will be bound to each module produced by the set generator to its right &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(&amp;lt;-dependent-leaf-of ...)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This is a set generator produces modules that are dependencies of the argument module, but are also leaves, ie modules that don&amp;#8217;t have any dependencies themselves &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;sys-graph&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This set generator argument is the system definition contained in a graph data structure &lt;/td&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;node&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This set generator argument is the same variable that was declared in Line 2! This is possible because the quantifier is &lt;code&gt;for-some*&lt;/code&gt; which nests the set generators. &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 4 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(&amp;gt; (critical-path-weight node leaf) *weight-threshold*)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; This predicate asserts whether the critical path weight between a node and one of it&amp;#8217;s leaf depenedencies is greater than some threshold value. Notice that the arguments &lt;code&gt;node&lt;/code&gt; and &lt;code&gt;leaf&lt;/code&gt; are the variables declared in set generators of lines 2 &amp;#38; 3 &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&amp;nbsp;&lt;/p&gt;


	&lt;table&gt;
		&lt;tr&gt;
			&lt;th&gt;Line 5 &lt;/th&gt;
		&lt;/tr&gt;
		&lt;tr&gt;
			&lt;td style=&quot;background:#ddd;&quot;&gt;&lt;code&gt;(add-deep-dependency-chapters! sys-graph report set)&lt;/code&gt; &lt;/td&gt;
			&lt;td&gt; A call to another function that takes &lt;code&gt;set&lt;/code&gt; and records them in the analysis report, but it records a differnt type of chapter (a deep dependency chapter) to the &lt;code&gt;add-deprecated-chapters!&lt;/code&gt; function seen in the 1st example. &lt;/td&gt;
		&lt;/tr&gt;
	&lt;/table&gt;




	&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;br /&gt;The key to understanding the semantics of example 2 is the nested existential quantifier &lt;code&gt;for-some*&lt;/code&gt;. Due to the nesting &lt;code&gt;&amp;lt;-dependent-leaf-of&lt;/code&gt; produces a set of leaf dependency modules for each module produced by &lt;code&gt;&amp;lt;-target-of&lt;/code&gt;. As a result the predicate is checked against each combination the 2 set generators can produce.&lt;/p&gt;


	&lt;p&gt;For example if &lt;code&gt;&amp;lt;-target-of&lt;/code&gt; generates module A &amp;#38; B and according to &lt;code&gt;&amp;lt;-dependent-leaf-of&lt;/code&gt; module A&amp;#8217;s leaf dependencies are modules W &amp;#38; X and for module B it&amp;#8217;s leaf dependencies are modules Y &amp;#38; Z, the predicate will be checked against the following combination of modules:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;node = A, leaf = W&lt;/li&gt;
		&lt;li&gt;node = A, leaf = X&lt;/li&gt;
		&lt;li&gt;node = B, leaf = Y&lt;/li&gt;
		&lt;li&gt;node = B, leaf = Z&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;If each of these combinations yeilds a true value from the predicate, the set generated is a list of module tuples:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;((A W) (A X) (B Y) (B Z))&lt;/code&gt;&lt;/pre&gt;

	&lt;h4&gt;Other Features&lt;/h4&gt;


	&lt;p&gt;The examples shown so far use an existential quantifier. SAL also provides the universal quantifiers &lt;code&gt;for-all&lt;/code&gt; and &lt;code&gt;for-all*&lt;/code&gt;. In set comprehension a universal quantifier asserts that all elements in the set pass the filter. In SAL &lt;code&gt;for-all&lt;/code&gt; and &lt;code&gt;for-all*&lt;/code&gt; also assert that every module in the generated set also passes the filter. If 1 or more modules returned by the set generators do not meet the filter then the universal quantifier will return an empty set, otherwise it will return the whole set.&lt;/p&gt;


	&lt;h3&gt;Domain Services&lt;/h3&gt;


At the moment the only 2 domain services provided
	&lt;ul&gt;
	&lt;li&gt;&lt;code&gt;write-report!&lt;/code&gt; &amp;#8211; writes a formatted analysis report to a file&lt;/li&gt;
		&lt;li&gt;&lt;code&gt;read-asdf-sysdef&lt;/code&gt; &amp;#8211; reads an ASDF system definition and structures the information into a system graph&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;There are many other services that could be added in future, such as:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;drawing the system definition as a visual graph&lt;/li&gt;
		&lt;li&gt;highlighting modules in the visual graph that are culprits in the analysis report &lt;/li&gt;
		&lt;li&gt;persisting the system graph &amp;#38; analysis report to disk, which requires serialisation and deserialisation services&lt;/li&gt;
		&lt;li&gt;persisting the system graph &amp;#38; analysis report to a Berkeley database or a relational database&lt;/li&gt;
	&lt;/ul&gt;</description>
    
      <pubDate>Wed, 17 Oct 2007 11:22:44 Z</pubDate>
      <guid>../../wiki/show/System+Analyser+-+What+Is+It</guid>
      <link>../../wiki/show/System+Analyser+-+What+Is+It</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>KhlScheme</title>
    
      <description>&lt;h3&gt;Introduction&lt;/h3&gt;


	&lt;p&gt;After I had learnt MIPS assembly, I started to become interested in finding out how high level languages translated into assembly. This is of course meant understanding how compilers work.&lt;/p&gt;


	&lt;p&gt;I guess I should have started off writing a C compiler first, but for some reason wanted to jump straight to a compiler for a language in the Lisp family. Writing a Common Lisp compiler is out of the question. The ANSI CL specification is just too huge to attempt on my own. The Scheme RSR5 specification on the other hand is more managable, albeit still quite a challenge. So I settled on attempting to write a Scheme compiler.&lt;/p&gt;


	&lt;h3&gt;Goals&lt;/h3&gt;


	&lt;h4&gt;Output Language&lt;/h4&gt;


	&lt;p&gt;I wanted the compiler&amp;#8217;s output language to be an intermediate language rather than a quasi high level language like C because it would carry across too many high level semantics that would complicate the design and implementation of the compiler. I managed to hear about the Low Level Virtual Machine (LLVM) project, which is well documented and provides excellent compiler tools and so I chose the LLVM instruction set as the output language.&lt;/p&gt;


	&lt;h4&gt;Definition Language&lt;/h4&gt;


	&lt;p&gt;There are some open source Scheme compilers written in C, but they&amp;#8217;re too large and complex to learn from. All of the simpler Scheme compilers I&amp;#8217;ve found in compiler textbooks and on the internet are written in Scheme. I&amp;#8217;ve never been fond of source-to-source compilers. They seem impractical to me due to their catch 22 nature.&lt;/p&gt;


	&lt;p&gt;So I decided to go down the route of writing my compiler in some other language that is  portable and lower level. LLVM provides a C+&lt;ins&gt;+&lt;/ins&gt; API so to leverage this as much as possible the definition language is C+&lt;ins&gt;+&lt;/ins&gt;.&lt;/p&gt;


	&lt;h4&gt;Features&lt;/h4&gt;


	&lt;p&gt;The first goal is to implement the primtive operator&amp;#8217;s described in John McCarthy&amp;#8217;s original Lisp paper. From there I&amp;#8217;ll develop piece by piece the rest of the RSR5 specification.&lt;/p&gt;


	&lt;h3&gt;News&lt;/h3&gt;


	&lt;p&gt;I managed to develop the scanner (using the re2c library), tokeniser and the abstract syntax tree parser (using the lemon parser library), but decided to halt because C++ and/or any available libraries could not provide the necessary abstractions to cleanly write the subsequent compiling stages (construct parser, operational semantics analysis &amp;#38; denotational semantic analysis).&lt;/p&gt;


	&lt;p&gt;To solve this I have decided to first write a bootstrap compiler that reads a low level meta language. The abstractions that I&amp;#8217;m currently lacking can be written in the meta language and compiled by the bootstrap compiler to create the real Scheme compiler.&lt;/p&gt;</description>
    
      <pubDate>Mon, 15 Oct 2007 12:16:44 Z</pubDate>
      <guid>../../wiki/show/KhlScheme</guid>
      <link>../../wiki/show/KhlScheme</link>
      <dc:creator>kean</dc:creator>
    </item>
  
		<item>
      <title>Projects</title>
    
      <description>&lt;h3&gt;Introduction&lt;/h3&gt;


	&lt;p&gt;Here are the open source projects that I have started or planning to start sometime in the future. I only work on them during my spare time, so progress is slow. Some of them are ambitious enough that I expect to be working on it for at least 5 years.&lt;/p&gt;


	&lt;p&gt;Why have I started these projects? A combination of curiosity, the desire to tackle a challenge and genuine interest in the subject. I guess I&amp;#8217;ll always keep looking for something new to learn. I never considered my graduation from uni as a signal to stop learning. At first I studied from various textbooks and did the exercises in them, but I reached a point where I wanted to take on something more ambitious and bring my study up to the next level. So these projects are as much as about studying as they are about developing and maintaining a product or service.&lt;/p&gt;


	&lt;h3&gt;Project Directory&lt;/h3&gt;


	&lt;ul&gt;
	&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/System+Analyser&quot;&gt;System Analyser&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a class=&quot;existingWikiWord&quot; href=&quot;/wiki/show/KhlScheme&quot;&gt;KhlScheme&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;</description>
    
      <pubDate>Mon, 15 Oct 2007 06:43:06 Z</pubDate>
      <guid>../../wiki/show/Projects</guid>
      <link>../../wiki/show/Projects</link>
      <dc:creator>kean</dc:creator>
    </item>
  
  </channel>
</rss>
