About

Tarso is a software, and a framework to help code-design and more important; an aid to automate checking (also known as automated testing) of code. Making sure that the code does what the programmer intend it to do.

The framework is an open source initiative from AiO Secure Teletronics, released under LGPL v3.

Portability has always been a central part of the development of Tarsio. The framework started out as Cutest (The C Unit-Test framework) - But over the years it evolved, and iterated to the current state. During a major re-write it was decided that it should be renamed to Tarsio instead. The name plays with the word Tarsier, since they are also cute, and a bit creepy, much like the minimalism of the Tarsio framework and toolchain.

There is a well known practice called "unit-testing", which is what the Tarsio framework is trying to help you, as a programmer with. But we call it "unit-checking" instead. Tarsio is also a very nice set of tools to practice "test-driven development" - Or as we like to call it: "check-driven design". You can read more about these semantics later in this text.

Using Tarsio in your C development projects will automate many boring things regarding checking the state of your code functionality. And you can do it long before you even have a real live program up and running.

The killer feature of Tarsio is the automated creation of mock-up-functions. These mock-up functions are replacing all other functions called by your design.

Features

Concept

Imagine you want to write a new function (in C) - Many creative coders want to start coding the implementation straight away. This is not the way to go about maintaining a sustainable pace while iterating your product.

Here is the work-flow using "test-driven development" which also applies to "check-driven design":

  1. (Re-)Write a check-case
    Check if the check fails:
    • Fail: Fix the code to satisfy the check; go to 2
    • Success: Write another check-case; go to 1
  2. Implement the production code
    Run all tests:
    • Fail: Fix the code to satisfy the check; go to 2
    • Success: Clean up code; go to 3
  3. Refactor/clean-up code and go back to 1
This allows you to add a tiny bit of checked code and then add another tiny bit of checked code, and it also enables you to refactor and split your code in small well-checked chunks.

Checking v.s. Testing

There are a few new words for you to learn... Not because we want to make your life harder. But rather that more correct definitions has come up in the last years.

Let's start with the word "checking". Usually these kind of framework are called unit-testing frameworks. In essence this is not wrong. But the values behind "testing" are a bit different than "checking". For example a check is much less than a test. And a test implies that there is some intelligence behind the activity. These definitions originate from Michael Bolton who have come up with a quite convincing argument about why we should try to reform the use of the words "testing" and "checking"... At least this is the current best-thinking.

Checking Is Confirmation, and the thinking is that Testing Is Exploration and Learning. But the depth of it is even more concrete. Checks Are Machine-Decidable and Tests Require Sapience. Take a look his blog out for more in-depth reading about this concept: Blog: Testing vs. Checking

Another concept of Tarsio is "Check-driven design" rather than the more common "Test-driven development". The difference between testing and checking is already declared above. But why also change "development" to "design"?

We think it is a very big deference in just developing code and designing code. And if you practice check-driven design you will soon see that the design of the code actually changes - mainly to accommodate the checks in a useful way - since a check is supposed to be written with some piece of code in complete isolation. This is obvious for a human that have mastered the art of check-driven design - But if you're a beginner to this concept, and are willing to try it out there are many historically anchored concepts that has to be re-visited and re-evaluated.

Download

The current version (x.x.x) is in a beta-state, so there may still be quite a lot of problems with the framework. Check it out on Github: https://github.com/aiobofh/tarsio


Manual

The current version (x.x.x) is in a beta-state, so there may still be quite a lot of problems with the framework. Check it out on Github: https://github.com/aiobofh/tarsio