fix old tests again

This commit is contained in:
Torsten Ruger 2015-05-24 16:55:03 +03:00
parent 29a34b4d24
commit 95ac024421
7 changed files with 23 additions and 11 deletions

View File

@ -68,7 +68,7 @@ module Parfait
end
def instance_variable_defined name
layout().index_of(name)
get_layout().index_of(name)
end
# Object

View File

@ -109,7 +109,7 @@ module Parfait
# as we answered is_value? with true, sof will create a basic node with this string
def to_sof
"\"#{to_s}\""
"'" + to_s + "'"
end
#below here is OLD, DUBIOUS and needs to be checked TODO

View File

@ -1,4 +1,5 @@
require_relative "object"
require_relative "positioned"
module Virtual
@ -9,7 +10,8 @@ module Virtual
# It is actually the point of the virtual machine layer to express oo functionality in the set of
# instructions, thus defining a minimal set of instructions needed to implement oo.
class Instruction < Virtual::Object
class Instruction
include Positioned
# simple thought: don't recurse for Blocks, just check their names
def == other

View File

@ -33,7 +33,7 @@ class TestBasic < MiniTest::Test
def test_self
@string_input = 'self '
@output = "-Virtual::Self(:index => 3, :type => Virtual::Mystery)"
@output = "-Virtual::Self(:index => 3, :type => Virtual::Reference())"
check
end
@ -51,7 +51,7 @@ class TestBasic < MiniTest::Test
def test_string
@string_input = "\"hello\""
@output = "-Virtual::Return(:index => 5, :type => Virtual::Reference, :value => Parfait::Word('hello'))"
@output = "-Virtual::Return(:index => 5, :type => Virtual::Reference, :value => 'hello')"
check
end

View File

@ -9,7 +9,7 @@ def foo(x)
5
end
HERE
@output = "-&2 Parfait::Method(:name => Parfait::Word('foo'))*^* :arg_names [:x]*^* :locals []*^* :tmps []*^* :for_class &1 Parfait::Class(:name => Parfait::Word('Object'))*^* :instance_methods -Parfait::Method(:name => Parfait::Word('main'), :for_class => *1)*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo(:return_type => *6)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* -*2*^* :super_class &3 Parfait::Class(:name => Parfait::Word('Value'))*^* :instance_methods []*^* :meta_class Virtual::MetaClass(:me_self => *3)*^* :functions []*^* :object_layout []*^* :meta_class Virtual::MetaClass(:me_self => *1)*^* :functions []*^* :object_layout []*^* :info Virtual::CompiledMethodInfo()*^* :return_type &4 Virtual::Return(:index => 5, :type => Virtual::Integer)*^* :value &5 Virtual::IntegerConstant(:integer => 5)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Set(:to => *4, :from => *5)*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* :receiver Virtual::Self(:index => 3, :type => &6 Virtual::Mystery)"
@output = "-&7 Parfait::Method(:name => 'foo', :code => '')*^* :memory -0*^* -&1 ['name', 'code', 'arg_names', 'locals', 'tmps']*^* :arg_names [:x]*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo()*^* :return_type &15 Virtual::Return(:index => 5, :type => &9 Virtual::Integer)*^* :value &16 Virtual::IntegerConstant(:integer => 5)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter()*^* -Virtual::Set(:to => *15, :from => *16)*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes [Virtual::MethodReturn()]*^* :receiver Virtual::Self(:index => 3, :type => &6 Virtual::Mystery)"
check
end
@ -20,7 +20,7 @@ def foo()
end
foo()
HERE
@output = "-&4 Parfait::Method(:name => Parfait::Word('foo'))*^* :arg_names []*^* :locals []*^* :tmps []*^* :for_class &1 Parfait::Class(:name => Parfait::Word('Object'))*^* :instance_methods -Parfait::Method(:name => Parfait::Word('main'), :for_class => *1)*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo(:return_type => *2)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::NewMessage(:length => -1)*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3, :type => *2)*^* :from &3 Virtual::Self(:index => 3, :type => *2)*^* -Virtual::Set(:from => Parfait::Word('foo'))*^* :to Virtual::NewName(:index => 4, :type => *2)*^* -Virtual::MessageSend(:name => :foo)*^* :me &3 Virtual::Self(:index => 3, :type => *2)*^* :args []*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* -*4*^* :super_class &5 Parfait::Class(:name => Parfait::Word('Value'))*^* :instance_methods []*^* :meta_class Virtual::MetaClass(:me_self => *5)*^* :functions []*^* :object_layout []*^* :meta_class Virtual::MetaClass(:me_self => *1)*^* :functions []*^* :object_layout []*^* :info Virtual::CompiledMethodInfo()*^* :return_type Virtual::Return(:index => 5, :type => *2)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::NewMessage(:length => -1)*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3, :type => *2)*^* :from &8 Virtual::Self(:index => 3, :type => *2)*^* -Virtual::Set(:from => Parfait::Word('puts'))*^* :to Virtual::NewName(:index => 4, :type => *2)*^* -Virtual::Set(:from => Parfait::Word('Hello'))*^* :to &7 Virtual::Return(:index => 5, :type => &6 Virtual::Reference, :value => Parfait::Word('Hello'))*^* -Virtual::Set()*^* :to &9 Virtual::NewMessageSlot(:index => 0, :type => &6 Virtual::Reference, :value => *7)*^* :from &7 Virtual::Return(:index => 5, :type => &6 Virtual::Reference, :value => Parfait::Word('Hello'))*^* -Virtual::MessageSend(:name => :puts)*^* :me &8 Virtual::Self(:index => 3, :type => *2)*^* :args [*9]*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* :receiver Virtual::Self(:index => 3, :type => *2)*^*-Virtual::Return(:index => 5, :type => &2 Virtual::Mystery)"
@output = "-&7 Parfait::Method(:name => 'foo', :code => '')*^* :memory -0*^* -&1 ['name', 'code', 'arg_names', 'locals', 'tmps']*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo()*^* :return_type Virtual::Return(:index => 5, :type => *6)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter()*^* -Virtual::NewMessage()*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3)*^* :type &15 Virtual::Reference(:of_class => *2)*^* :from &17 Virtual::Self(:index => 3)*^* :type &15 Virtual::Reference(:of_class => *2)*^* -Virtual::Set(:from => 'puts')*^* :to Virtual::NewName(:index => 4, :type => *6)*^* -Virtual::Set(:from => 'Hello')*^* :to &16 Virtual::Return(:index => 5, :type => &5 Virtual::Reference, :value => 'Hello')*^* -Virtual::Set()*^* :to &18 Virtual::NewMessageSlot(:index => 0, :type => &5 Virtual::Reference, :value => *16)*^* :from &16 Virtual::Return(:index => 5, :type => &5 Virtual::Reference, :value => 'Hello')*^* -Virtual::MessageSend(:name => :puts)*^* :me &17 Virtual::Self(:index => 3)*^* :type &15 Virtual::Reference(:of_class => *2)*^* :args [*18]*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes [Virtual::MethodReturn()]*^* :receiver Virtual::Self(:index => 3, :type => *6)*^*-Virtual::Return(:index => 5, :type => &6 Virtual::Mystery)"
check
end
@ -41,7 +41,7 @@ def foo(x)
2 + 5
end
HERE
@output = "-&2 Parfait::Method(:name => Parfait::Word('foo'))*^* :arg_names [:x]*^* :locals [Parfait::Word('abba')]*^* :tmps []*^* :for_class &1 Parfait::Class(:name => Parfait::Word('Object'))*^* :instance_methods -Parfait::Method(:name => Parfait::Word('main'), :for_class => *1)*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo(:return_type => *4)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* -*2*^* :super_class &3 Parfait::Class(:name => Parfait::Word('Value'))*^* :instance_methods []*^* :meta_class Virtual::MetaClass(:me_self => *3)*^* :functions []*^* :object_layout []*^* :meta_class Virtual::MetaClass(:me_self => *1)*^* :functions []*^* :object_layout []*^* :info Virtual::CompiledMethodInfo()*^* :return_type Virtual::Return(:index => 5, :type => &4 Virtual::Mystery)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Set()*^* :to &7 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *5)*^* :from &5 Virtual::IntegerConstant(:integer => 5)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *4)*^* :from Virtual::FrameSlot(:index => 1, :type => &6 Virtual::Integer, :value => *7)*^* -Virtual::Set()*^* :to &9 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *8)*^* :from &8 Virtual::IntegerConstant(:integer => 2)*^* -Virtual::NewMessage(:length => -1)*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3, :type => &6 Virtual::Integer)*^* :from &9 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *8)*^* -Virtual::Set(:from => Parfait::Word('+'))*^* :to Virtual::NewName(:index => 4, :type => *4)*^* -Virtual::Set()*^* :to &11 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *10)*^* :from &10 Virtual::IntegerConstant(:integer => 5)*^* -Virtual::Set()*^* :to &12 Virtual::NewMessageSlot(:index => 0, :type => &6 Virtual::Integer, :value => *11)*^* :from &11 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *10)*^* -Virtual::MessageSend(:name => :+)*^* :me &9 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *8)*^* :args [*12]*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* :receiver Virtual::Self(:index => 3, :type => &4 Virtual::Mystery)"
@output = "-&7 Parfait::Method(:name => 'foo', :code => '')*^* :memory -0*^* -&1 ['name', 'code', 'arg_names', 'locals', 'tmps']*^* :arg_names [:x]*^* :locals ['abba']*^* :tmps []*^* :info Virtual::CompiledMethodInfo()*^* :return_type Virtual::Return(:index => 5, :type => &6 Virtual::Mystery)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter()*^* -Virtual::Set()*^* :to &16 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *15)*^* :from &15 Virtual::IntegerConstant(:integer => 5)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *6)*^* :from Virtual::FrameSlot(:index => 1, :type => &9 Virtual::Integer, :value => *16)*^* -Virtual::Set()*^* :to &18 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *17)*^* :from &17 Virtual::IntegerConstant(:integer => 2)*^* -Virtual::NewMessage()*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3, :type => &9 Virtual::Integer)*^* :from &18 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *17)*^* -Virtual::Set(:from => '+')*^* :to Virtual::NewName(:index => 4, :type => *6)*^* -Virtual::Set()*^* :to &20 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *19)*^* :from &19 Virtual::IntegerConstant(:integer => 5)*^* -Virtual::Set()*^* :to &21 Virtual::NewMessageSlot(:index => 0, :type => &9 Virtual::Integer, :value => *20)*^* :from &20 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *19)*^* -Virtual::MessageSend(:name => :+)*^* :me &18 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *17)*^* :args [*21]*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes [Virtual::MethodReturn()]*^* :receiver Virtual::Self(:index => 3, :type => &6 Virtual::Mystery)"
check
end
@ -51,7 +51,7 @@ def foo()
2 + 5
end
HERE
@output = "-&2 Parfait::Method(:name => Parfait::Word('foo'))*^* :arg_names []*^* :locals []*^* :tmps []*^* :for_class &1 Parfait::Class(:name => Parfait::Word('Object'))*^* :instance_methods -Parfait::Method(:name => Parfait::Word('main'), :for_class => *1)*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo(:return_type => *4)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* -*2*^* :super_class &3 Parfait::Class(:name => Parfait::Word('Value'))*^* :instance_methods []*^* :meta_class Virtual::MetaClass(:me_self => *3)*^* :functions []*^* :object_layout []*^* :meta_class Virtual::MetaClass(:me_self => *1)*^* :functions []*^* :object_layout []*^* :info Virtual::CompiledMethodInfo()*^* :return_type Virtual::Return(:index => 5, :type => &4 Virtual::Mystery)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Set()*^* :to &7 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *5)*^* :from &5 Virtual::IntegerConstant(:integer => 2)*^* -Virtual::NewMessage(:length => -1)*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3, :type => &6 Virtual::Integer)*^* :from &7 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *5)*^* -Virtual::Set(:from => Parfait::Word('+'))*^* :to Virtual::NewName(:index => 4, :type => *4)*^* -Virtual::Set()*^* :to &9 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *8)*^* :from &8 Virtual::IntegerConstant(:integer => 5)*^* -Virtual::Set()*^* :to &10 Virtual::NewMessageSlot(:index => 0, :type => &6 Virtual::Integer, :value => *9)*^* :from &9 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *8)*^* -Virtual::MessageSend(:name => :+)*^* :me &7 Virtual::Return(:index => 5, :type => &6 Virtual::Integer, :value => *5)*^* :args [*10]*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* :receiver Virtual::Self(:index => 3, :type => &4 Virtual::Mystery)"
@output = "-&7 Parfait::Method(:name => 'foo', :code => '')*^* :memory -0*^* -&1 ['name', 'code', 'arg_names', 'locals', 'tmps']*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo()*^* :return_type Virtual::Return(:index => 5, :type => &6 Virtual::Mystery)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter()*^* -Virtual::Set()*^* :to &16 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *15)*^* :from &15 Virtual::IntegerConstant(:integer => 2)*^* -Virtual::NewMessage()*^* -Virtual::Set()*^* :to Virtual::NewSelf(:index => 3, :type => &9 Virtual::Integer)*^* :from &16 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *15)*^* -Virtual::Set(:from => '+')*^* :to Virtual::NewName(:index => 4, :type => *6)*^* -Virtual::Set()*^* :to &18 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *17)*^* :from &17 Virtual::IntegerConstant(:integer => 5)*^* -Virtual::Set()*^* :to &19 Virtual::NewMessageSlot(:index => 0, :type => &9 Virtual::Integer, :value => *18)*^* :from &18 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *17)*^* -Virtual::MessageSend(:name => :+)*^* :me &16 Virtual::Return(:index => 5, :type => &9 Virtual::Integer, :value => *15)*^* :args [*19]*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes [Virtual::MethodReturn()]*^* :receiver Virtual::Self(:index => 3, :type => &6 Virtual::Mystery)"
check
end
@ -65,7 +65,7 @@ def ofthen(n)
end
end
HERE
@output = "-&2 Parfait::Method(:name => Parfait::Word('ofthen'))*^* :arg_names [:n]*^* :locals [Parfait::Word('isit'), Parfait::Word('maybenot')]*^* :tmps []*^* :for_class &1 Parfait::Class(:name => Parfait::Word('Object'))*^* :instance_methods -Parfait::Method(:name => Parfait::Word('main'), :for_class => *1)*^* :arg_names []*^* :locals []*^* :tmps []*^* :info Virtual::CompiledMethodInfo(:return_type => *7)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* -*2*^* :super_class &3 Parfait::Class(:name => Parfait::Word('Value'))*^* :instance_methods []*^* :meta_class Virtual::MetaClass(:me_self => *3)*^* :functions []*^* :object_layout []*^* :meta_class Virtual::MetaClass(:me_self => *1)*^* :functions []*^* :object_layout []*^* :info Virtual::CompiledMethodInfo()*^* :return_type &9 Virtual::Return(:index => 5, :type => &4 Virtual::Integer)*^* :value &10 Virtual::IntegerConstant(:integer => 667)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter(:length => -1)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *4, :value => *5)*^* :from &5 Virtual::IntegerConstant(:integer => 0)*^* -Virtual::IsTrueBranch(:to => *11)*^* -Virtual::Block(:length => -1, :name => :if_false)*^* :codes -Virtual::Set(:to => *9, :from => *10)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *7)*^* :from Virtual::FrameSlot(:index => 2, :type => *4, :value => *9)*^* -Virtual::UnconditionalBranch(:to => *12)*^* -&11 Virtual::Block(:length => -1, :name => :if_true)*^* :codes -Virtual::Set()*^* :to &8 Virtual::Return(:index => 5, :type => *4)*^* :value &6 Virtual::IntegerConstant(:integer => 42)*^* :from &6 Virtual::IntegerConstant(:integer => 42)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *7)*^* :from Virtual::FrameSlot(:index => 1, :type => *4)*^* :value &8 Virtual::Return(:index => 5, :type => *4)*^* :value &6 Virtual::IntegerConstant(:integer => 42)*^* -&12 Virtual::Block(:length => -1, :name => :if_merge)*^* :codes []*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes -Virtual::MethodReturn(:length => -1)*^* :receiver Virtual::Self(:index => 3, :type => &7 Virtual::Mystery)"
@output = "-&7 Parfait::Method(:name => 'ofthen', :code => '')*^* :memory -0*^* -&1 ['name', 'code', 'arg_names', 'locals', 'tmps']*^* :arg_names [:n]*^* :locals ['isit', 'maybenot']*^* :tmps []*^* :info Virtual::CompiledMethodInfo()*^* :return_type &18 Virtual::Return(:index => 5, :type => &9 Virtual::Integer)*^* :value &19 Virtual::IntegerConstant(:integer => 667)*^* :blocks -Virtual::Block(:length => -1, :name => :enter)*^* :codes -Virtual::MethodEnter()*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *9, :value => *15)*^* :from &15 Virtual::IntegerConstant(:integer => 0)*^* -Virtual::IsTrueBranch(:to => *20)*^* -Virtual::Block(:length => -1, :name => :if_false)*^* :codes -Virtual::Set(:to => *18, :from => *19)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *6)*^* :from Virtual::FrameSlot(:index => 2, :type => *9, :value => *18)*^* -Virtual::UnconditionalBranch(:to => *21)*^* -&20 Virtual::Block(:length => -1, :name => :if_true)*^* :codes -Virtual::Set()*^* :to &17 Virtual::Return(:index => 5, :type => *9)*^* :value &16 Virtual::IntegerConstant(:integer => 42)*^* :from &16 Virtual::IntegerConstant(:integer => 42)*^* -Virtual::Set()*^* :to Virtual::Return(:index => 5, :type => *6)*^* :from Virtual::FrameSlot(:index => 1, :type => *9)*^* :value &17 Virtual::Return(:index => 5, :type => *9)*^* :value &16 Virtual::IntegerConstant(:integer => 42)*^* -&21 Virtual::Block(:length => -1, :name => :if_merge)*^* :codes []*^* -Virtual::Block(:length => -1, :name => :return)*^* :codes [Virtual::MethodReturn()]*^* :receiver Virtual::Self(:index => 3, :type => &6 Virtual::Mystery)"
check
end

View File

@ -11,6 +11,16 @@ module VirtualHelper
def check
machine = Virtual::Machine.reboot
expressions = machine.compile_main @string_input
if( expressions.first.is_a? Parfait::Method )
# stops the whole objectspace beeing tested
# with the class comes superclass and all methods
expressions.first.instance_variable_set :@for_class , nil
end
if( expressions.first.is_a? Virtual::Self )
# stops the whole objectspace beeing tested
# with the class comes superclass and all methods
expressions.first.type.instance_variable_set :@of_class , nil
end
is = Sof::Writer.write(expressions)
#puts is
is.gsub!("\n" , "*^*")