Sunday, July 31, 2011

The proof assistant and the model finder

Are they the dual relation?

The proof assistant is the top down.
The model finder is the bottom up.

I think it is interesting that we iteratively use them.

Sunday, July 24, 2011

Advantage of the object oriented programming

I think the advantages of the object oriented programming are following.


  1. We can easily modularize programs with the class. 
  2. We can easily commonalize the code by the inheritance.
  3. We can easily commonalize with the inversion of control by the polymorphism.
  4. We can easily read the code for the order of words with S + V + O.
  5. The type system built by the class is usable.
These are achieved effectively by thinking that the all are the objects.

Monday, July 18, 2011

Memo of my tool for aiding design of web applications (2)

It is important that we consider the constraints of the resource items.
Those must be the definition of validation for user input and other request parameters.
I want my tool aiding the viewpoint.

Sunday, July 10, 2011

Memo of my tool for aiding design of web applications

I am making the tool for aiding design  of web applications.
I think it is good that Web applications have REST architecture.
So I want my tool make easy to design in REST architecture.

Sunday, July 3, 2011

I tried re-mix.

I tried re-mix. It's interesting!
I show the example using re-mix.
using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Remotion.Mixins;

namespace ReMixSample
{
  [TestClass]
  public class ReMixSampleTest1
  {
    [TestMethod]
    public void TestMethod1()
    {
      ReMixSample s = ObjectFactory.Create<ReMixSample>();
      Assert.AreEqual("A", s.A());
      Assert.AreEqual(3, s.B());
    }
  }
  public class MixinSample1<T> : Mixin<T>
    where T : class
  {
    [OverrideTarget]
    public string A()
    {
      return "A";
    }
  }
  public class MixinSample2<T> : Mixin<T>
    where T : class
  {
    [OverrideTarget]
    public int B()
    {
      return 3;
    }
  }
  [Uses(typeof(MixinSample1<ReMixSample>))]
  [Uses(typeof(MixinSample2<ReMixSample>))]
  public class ReMixSample
  {
    public virtual string A() { return default(string); }
    public virtual int B() { return default(int); }
  }
}

But sadly(perhaps for the limitation of the .NET framework), the methods A and B of ReMixSample class cannot be abstract methods.
Therefore the methods need the body and it will not be significant.
So I think it's easy to understand that the methods are mixed-in if we write the body is the following unified form:
virtual {Return type} {Method name}(...) { return default({Return type}); }