Project

General

Profile

Revision 12

Added by about 8 years ago

latest version of the ooas compiler, with grammar version 1.10

View differences:

trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/expressions/TypeExpression.java
28 28
package org.momut.ooas.ast.expressions;
29 29

  
30 30
import org.momut.ooas.ast.IAstVisitor;
31
import org.momut.ooas.ast.types.MetaType;
31 32
import org.momut.ooas.ast.types.Type;
32 33

  
33 34
///////////////////////////////////////////////
......
35 36
///
36 37
public class TypeExpression extends LeafExpression
37 38
{
39
	protected Type m_referredType;
40

  
41
	public Type referredType() {return m_referredType;}
42
//	public void setReferredType(Type aType) {m_referredType = aType;}
43

  
38 44
	public TypeExpression(Type atype, int line, int pos)
39 45
	{
40 46
		super (LeafTypeEnum.type, ExpressionKind.Type, line, pos);
41
		m_type = atype;
47
		m_type = new MetaType(atype);
48
		m_referredType = atype;
42 49
	}
43 50

  
44 51
	public TypeExpression(TypeExpression toCopy)
45 52
	{
46 53
		super (toCopy);
54
		m_referredType = toCopy.m_referredType;
47 55
	}
48 56

  
49 57
	@Override
50
	public /*override*/ Expression Clone()
58
	public Expression Clone()
51 59
	{
52 60
		return new TypeExpression(this);
53 61
	}
54 62

  
55
	public /*override*/ void Accept(IAstVisitor visitor)
63
	@Override
64
	public void Accept(IAstVisitor visitor)
56 65
	{
57 66
		visitor.visit(this);
58 67
	}
trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/MetaType.java
1
/**
2
  *
3
  *                      OOAS Compiler
4
  *
5
  * Copyright 2015, AIT Austrian Institute of Technology. All rights reserved.
6
  *
7
  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
8
  *
9
  * If you modify the file please update the list of contributors below to in-
10
  * clude your name. Please also stick to the coding convention of using TABs
11
  * to do the basic (block-level) indentation and spaces for anything after
12
  * that. (Enable the display of special chars and it should be pretty obvious
13
  * what this means.) Also, remove all trailing whitespace.
14
  *
15
  * Contributors:
16
  *               Willibald Krenn (AIT)
17
  */
18

  
19

  
20
package org.momut.ooas.ast.types;
21

  
22
import org.momut.ooas.ast.IAstVisitor;
23

  
24
///////////////////////////////////////////////
25
///  Special type: MetaType (type of <Type> construct)
26
///
27
public final class MetaType extends Type
28
{
29
	private final Type m_type;
30

  
31
	public Type Type() { return m_type; }
32

  
33
	public MetaType(Type aType)
34
	{
35
		super(TypeKind.MetaType, null);
36
		m_type = aType;
37
	}
38

  
39
	@Override
40
	public void Accept(IAstVisitor visitor)
41
	{
42
		visitor.visit(this);
43
	}
44

  
45
	@Override
46
	public String AnonymousName()
47
	{
48
		return "meta_" + m_type.AnonymousName();
49
	}
50

  
51
}
trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/OoActionSystemType.java
161 161
	public int valueCount() {
162 162
		return m_objects.size() + m_derivedObjects.size() + 1;
163 163
	}
164
	
164

  
165 165
}
trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/Type.java
284 284
						 * A cover type of a list must not change the size of the inner type. Mostly what is
285 285
						 * allowed to change is the list length.
286 286
						 */
287
						Type subtype = listt1.innerType();
288
						final boolean castAllowed = TypeEqual(listt1.innerType(), listt2.innerType())
289
						          || (    (listt1.innerType().kind() == TypeKind.OoActionSystemType)
290
						               && (subtype = Type.CoverType(listt1.innerType(), listt2.innerType())) != null);
287
						final Type innerType1 = listt1.innerType();
288
						final Type innerType2 = listt2.innerType();
289
						Type resultInner = innerType1;
290
						final boolean castAllowed = TypeEqual(innerType1, innerType2)
291
						          ||     (resultInner = Type.CoverType(innerType1, innerType2)) != null;
291 292
						if (castAllowed){
292 293
							final int maxelems = listt1.maxNumberOfElements() > listt2.maxNumberOfElements()
293 294
							                ? listt1.maxNumberOfElements()
294 295
							                : listt2.maxNumberOfElements();
295
							return new ListType(subtype, maxelems, null);
296
							return new ListType(resultInner, maxelems, null);
296 297
						} else
297 298
							return null;
298 299

  
......
438 439
				return false;
439 440
			case OoActionSystemType:
440 441
				return false;
442
			case MetaType:
443
				return Type.FirstTypeLessRange( ((MetaType)type1).Type() , ((MetaType)type2).Type());
441 444
			case OpaqueType:
442 445
				assert(false);
443 446
				return false;
......
494 497
				return true;
495 498
			case OoActionSystemType:
496 499
				return type1 == type2; // ref equ.
500
			case MetaType:
501
				return Type.TypeEqualByKind( ((MetaType)type1).Type() , ((MetaType)type2).Type());
497 502
			case OpaqueType:
498 503
				assert(false);
499 504
				return false;
......
569 574
				return true;
570 575
			case OoActionSystemType:
571 576
				return type1 == type2; // ref equ. // || Covariance((OoActionSystemType)type1, (OoActionSystemType)type2);
577
			case MetaType:
578
				return Type.TypeEqual( ((MetaType)type1).Type() , ((MetaType)type2).Type());
572 579
			case OpaqueType:
573 580
				assert(false);
574 581
				return false;
trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/types/TypeKind.java
35 35
	EnumeratedType(3),
36 36
	ListType(4),
37 37
	MapType(5),
38
//	QrType(6),               // no longer supported
38
	MetaType(6),
39 39
	TupleType(7),
40 40
	FunctionType(8),
41 41
	OoActionSystemType(9),
trunk/compiler/ooasCompiler/src/org/momut/ooas/ast/IAstVisitor.java
79 79
import org.momut.ooas.ast.types.IntType;
80 80
import org.momut.ooas.ast.types.ListType;
81 81
import org.momut.ooas.ast.types.MapType;
82
import org.momut.ooas.ast.types.MetaType;
82 83
import org.momut.ooas.ast.types.NullType;
83 84
import org.momut.ooas.ast.types.OoActionSystemType;
84 85
import org.momut.ooas.ast.types.OpaqueType;
......
154 155
	void visit(OpaqueType opaqueType);
155 156
	void visit(AnyType anyType);
156 157
	void visit(NullType nullType);
158
	void visit(MetaType metaType);
157 159

  
158 160
	void visit(BreakStatement breakStatement);
159 161
}
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/FunctionNames.java
1
/**
2
  *
3
  *                      OOAS Compiler
4
  *
5
  *       Copyright 2015, AIT Austrian Institute of Technology.
6
  * This code is based on the C# Version of the OOAS Compiler, which is
7
  * copyright 2015 by the Institute of Software Technology, Graz University
8
  * of Technology with portions copyright by the AIT Austrian Institute of
9
  * Technology. All rights reserved.
10
  *
11
  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
12
  *
13
  * If you modify the file please update the list of contributors below to in-
14
  * clude your name. Please also stick to the coding convention of using TABs
15
  * to do the basic (block-level) indentation and spaces for anything after
16
  * that. (Enable the display of special chars and it should be pretty obvious
17
  * what this means.) Also, remove all trailing whitespace.
18
  *
19
  * Contributors:
20
  *               Willibald Krenn (AIT)
21
  *               Stephan Zimmerer (AIT)
22
  *               Markus Demetz (AIT)
23
  *               Christoph Czurda (AIT)
24
  *
25
  */
26

  
27

  
28 1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
29 2
// source: FunctionNames.proto
30 3

  
......
560 533
     * <code>TIRESIAS_INIT_NULLTYPE = 0;</code>
561 534
     */
562 535
    TIRESIAS_INIT_NULLTYPE(9, 0),
536
    /**
537
     * <code>TIRESIAS_INIT_METATYPE = 10;</code>
538
     */
539
    TIRESIAS_INIT_METATYPE(10, 10),
563 540
    ;
564 541

  
565 542
    /**
......
602 579
     * <code>TIRESIAS_INIT_NULLTYPE = 0;</code>
603 580
     */
604 581
    public static final int TIRESIAS_INIT_NULLTYPE_VALUE = 0;
582
    /**
583
     * <code>TIRESIAS_INIT_METATYPE = 10;</code>
584
     */
585
    public static final int TIRESIAS_INIT_METATYPE_VALUE = 10;
605 586

  
606 587

  
607 588
    public final int getNumber() { return value; }
......
618 599
        case 8: return TIRESIAS_INIT_ACTIONSYSTEMINSTANCE;
619 600
        case 9: return TIRESIAS_INIT_ACTIONSYSTEMTYPE;
620 601
        case 0: return TIRESIAS_INIT_NULLTYPE;
602
        case 10: return TIRESIAS_INIT_METATYPE;
621 603
        default: return null;
622 604
      }
623 605
    }
......
1060 1042
      "\020\007\022 \n\034TIRESIAS_INIT_SELFIDENTIFIER\020\010\022\"\n\036" +
1061 1043
      "TIRESIAS_INIT_METHODIDENTIFIER\020\t\022\030\n\024TIRE" +
1062 1044
      "SIAS_INIT_MODULE\020\n\022\034\n\030TIRESIAS_INIT_MAIN" +
1063
      "MODULE\020\000*\277\002\n\007PBTypes\022\031\n\025TIRESIAS_INIT_IN",
1045
      "MODULE\020\000*\333\002\n\007PBTypes\022\031\n\025TIRESIAS_INIT_IN",
1064 1046
      "TTYPE\020\001\022\032\n\026TIRESIAS_INIT_BOOLTYPE\020\002\022 \n\034T" +
1065 1047
      "IRESIAS_INIT_VALUEDENUMTYPE\020\003\022\032\n\026TIRESIA" +
1066 1048
      "S_INIT_ENUMTYPE\020\004\022\032\n\026TIRESIAS_INIT_LISTT" +
......
1068 1050
      "RESIAS_INIT_FUNCTIONTYPE\020\007\022&\n\"TIRESIAS_I" +
1069 1051
      "NIT_ACTIONSYSTEMINSTANCE\020\010\022\"\n\036TIRESIAS_I" +
1070 1052
      "NIT_ACTIONSYSTEMTYPE\020\t\022\032\n\026TIRESIAS_INIT_" +
1071
      "NULLTYPE\020\000*\210\002\n\014PBStatements\022\026\n\022TIRESIAS_" +
1072
      "INIT_SKIP\020\003\022\027\n\023TIRESIAS_INIT_BREAK\020\004\022\027\n\023" +
1073
      "TIRESIAS_INIT_ABORT\020\005\022\035\n\031TIRESIAS_INIT_N",
1074
      "ONDETBLOCK\020\006\022\032\n\026TIRESIAS_INIT_SEQBLOCK\020\007" +
1075
      "\022\033\n\027TIRESIAS_INIT_PRIOBLOCK\020\010\022 \n\034TIRESIA" +
1076
      "S_INIT_GUARDEDCOMMAND\020\002\022\034\n\030TIRESIAS_INIT" +
1077
      "_ASSIGNMENT\020\001\022\026\n\022TIRESIAS_INIT_CALL\020\000*\340\004" +
1078
      "\n\rPBExpressions\022 \n\034TIRESIAS_INIT_TYPEEXP" +
1079
      "RESSION\020\004\022&\n\"TIRESIAS_INIT_IDENTIFIEREXP" +
1080
      "RESSION\020\005\022!\n\035TIRESIAS_INIT_UNARYEXPRESSI" +
1081
      "ON\020\006\022\"\n\036TIRESIAS_INIT_BINARYEXPRESSION\020\007" +
1082
      "\022#\n\037TIRESIAS_INIT_TERNARYEXPRESSION\020\010\022$\n" +
1083
      " TIRESIAS_INIT_INTVALUEEXPRESSION\020\t\022%\n!T",
1084
      "IRESIAS_INIT_BOOLVALUEEXPRESSION\020\n\022$\n TI" +
1085
      "RESIAS_INIT_REFVALUEEXPRESSION\020\013\022!\n\035TIRE" +
1086
      "SIAS_INIT_LISTCONSTRUCTOR\020\014\022 \n\034TIRESIAS_" +
1087
      "INIT_SETCONSTRUCTOR\020\r\022\"\n\036TIRESIAS_INIT_T" +
1088
      "UPLECONSTRUCTOR\020\016\022\"\n\036TIRESIAS_INIT_ACCES" +
1089
      "SEXPRESSION\020\017\022*\n&TIRESIAS_INIT_TUPLEMAPA" +
1090
      "CCESSEXPRESSION\020\003\022 \n\034TIRESIAS_INIT_CALLE" +
1091
      "XPRESSION\020\002\022&\n\"TIRESIAS_INIT_QUANTIFIERE" +
1092
      "XPRESSION\020\001\022#\n\037TIRESIAS_INIT_OBJECTCONST" +
1093
      "RUCTOR\020\000BA\n0org.momut.ooas.argos.c",
1094
      "odegen.serialize.genB\rFunctionNames"
1053
      "NULLTYPE\020\000\022\032\n\026TIRESIAS_INIT_METATYPE\020\n*\210" +
1054
      "\002\n\014PBStatements\022\026\n\022TIRESIAS_INIT_SKIP\020\003\022" +
1055
      "\027\n\023TIRESIAS_INIT_BREAK\020\004\022\027\n\023TIRESIAS_INI",
1056
      "T_ABORT\020\005\022\035\n\031TIRESIAS_INIT_NONDETBLOCK\020\006" +
1057
      "\022\032\n\026TIRESIAS_INIT_SEQBLOCK\020\007\022\033\n\027TIRESIAS" +
1058
      "_INIT_PRIOBLOCK\020\010\022 \n\034TIRESIAS_INIT_GUARD" +
1059
      "EDCOMMAND\020\002\022\034\n\030TIRESIAS_INIT_ASSIGNMENT\020" +
1060
      "\001\022\026\n\022TIRESIAS_INIT_CALL\020\000*\340\004\n\rPBExpressi" +
1061
      "ons\022 \n\034TIRESIAS_INIT_TYPEEXPRESSION\020\004\022&\n" +
1062
      "\"TIRESIAS_INIT_IDENTIFIEREXPRESSION\020\005\022!\n" +
1063
      "\035TIRESIAS_INIT_UNARYEXPRESSION\020\006\022\"\n\036TIRE" +
1064
      "SIAS_INIT_BINARYEXPRESSION\020\007\022#\n\037TIRESIAS" +
1065
      "_INIT_TERNARYEXPRESSION\020\010\022$\n TIRESIAS_IN",
1066
      "IT_INTVALUEEXPRESSION\020\t\022%\n!TIRESIAS_INIT" +
1067
      "_BOOLVALUEEXPRESSION\020\n\022$\n TIRESIAS_INIT_" +
1068
      "REFVALUEEXPRESSION\020\013\022!\n\035TIRESIAS_INIT_LI" +
1069
      "STCONSTRUCTOR\020\014\022 \n\034TIRESIAS_INIT_SETCONS" +
1070
      "TRUCTOR\020\r\022\"\n\036TIRESIAS_INIT_TUPLECONSTRUC" +
1071
      "TOR\020\016\022\"\n\036TIRESIAS_INIT_ACCESSEXPRESSION\020" +
1072
      "\017\022*\n&TIRESIAS_INIT_TUPLEMAPACCESSEXPRESS" +
1073
      "ION\020\003\022 \n\034TIRESIAS_INIT_CALLEXPRESSION\020\002\022" +
1074
      "&\n\"TIRESIAS_INIT_QUANTIFIEREXPRESSION\020\001\022" +
1075
      "#\n\037TIRESIAS_INIT_OBJECTCONSTRUCTOR\020\000B8\n\'",
1076
      "org.momut.ooas.codegen.ast.protobuf.genB" +
1077
      "\rFunctionNames"
1095 1078
    };
1096 1079
    com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
1097
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
1098
        public com.google.protobuf.ExtensionRegistry assignDescriptors(
1099
            com.google.protobuf.Descriptors.FileDescriptor root) {
1100
          descriptor = root;
1101
          return null;
1102
        }
1103
      };
1080
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
1081
          public com.google.protobuf.ExtensionRegistry assignDescriptors(
1082
              com.google.protobuf.Descriptors.FileDescriptor root) {
1083
            descriptor = root;
1084
            return null;
1085
          }
1086
        };
1104 1087
    com.google.protobuf.Descriptors.FileDescriptor
1105 1088
      .internalBuildGeneratedFileFrom(descriptorData,
1106 1089
        new com.google.protobuf.Descriptors.FileDescriptor[] {
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/gen/RecordedAstTraversal.java
1
/**
2
  *
3
  *                      OOAS Compiler
4
  *
5
  *       Copyright 2015, AIT Austrian Institute of Technology.
6
  * This code is based on the C# Version of the OOAS Compiler, which is
7
  * copyright 2015 by the Institute of Software Technology, Graz University
8
  * of Technology with portions copyright by the AIT Austrian Institute of
9
  * Technology. All rights reserved.
10
  *
11
  * SEE THE "LICENSE" FILE FOR THE TERMS UNDER WHICH THIS FILE IS PROVIDED.
12
  *
13
  * If you modify the file please update the list of contributors below to in-
14
  * clude your name. Please also stick to the coding convention of using TABs
15
  * to do the basic (block-level) indentation and spaces for anything after
16
  * that. (Enable the display of special chars and it should be pretty obvious
17
  * what this means.) Also, remove all trailing whitespace.
18
  *
19
  * Contributors:
20
  *               Willibald Krenn (AIT)
21
  *               Stephan Zimmerer (AIT)
22
  *               Markus Demetz (AIT)
23
  *               Christoph Czurda (AIT)
24
  *
25
  */
26

  
27

  
28 1
// Generated by the protocol buffer compiler.  DO NOT EDIT!
29 2
// source: Record.proto
30 3

  
......
121 94
    // @@protoc_insertion_point(enum_scope:serialize.PBReturnType)
122 95
  }
123 96

  
124
  public interface PBParameterOrBuilder
125
      extends com.google.protobuf.MessageOrBuilder {
97
  public interface PBParameterOrBuilder extends
98
      // @@protoc_insertion_point(interface_extends:serialize.PBParameter)
99
      com.google.protobuf.MessageOrBuilder {
126 100

  
127
    // optional uint64 uint64_value = 1;
128 101
    /**
129 102
     * <code>optional uint64 uint64_value = 1;</code>
130 103
     *
......
142 115
     */
143 116
    long getUint64Value();
144 117

  
145
    // optional string literal_value = 2;
146 118
    /**
147 119
     * <code>optional string literal_value = 2;</code>
148 120
     */
......
157 129
    com.google.protobuf.ByteString
158 130
        getLiteralValueBytes();
159 131

  
160
    // optional bool bool_value = 3;
161 132
    /**
162 133
     * <code>optional bool bool_value = 3;</code>
163 134
     */
......
167 138
     */
168 139
    boolean getBoolValue();
169 140

  
170
    // optional int32 int32_value = 4;
171 141
    /**
172 142
     * <code>optional int32 int32_value = 4;</code>
173 143
     */
......
177 147
     */
178 148
    int getInt32Value();
179 149

  
180
    // optional uint32 uint32_value = 5;
181 150
    /**
182 151
     * <code>optional uint32 uint32_value = 5;</code>
183 152
     */
......
191 160
   * Protobuf type {@code serialize.PBParameter}
192 161
   */
193 162
  public static final class PBParameter extends
194
      com.google.protobuf.GeneratedMessage
195
      implements PBParameterOrBuilder {
163
      com.google.protobuf.GeneratedMessage implements
164
      // @@protoc_insertion_point(message_implements:serialize.PBParameter)
165
      PBParameterOrBuilder {
196 166
    // Use PBParameter.newBuilder() to construct.
197 167
    private PBParameter(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
198 168
      super(builder);
......
221 191
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
222 192
        throws com.google.protobuf.InvalidProtocolBufferException {
223 193
      initFields();
224
      @SuppressWarnings("unused")
225
	final
226
	int mutable_bitField0_ = 0;
194
//      int mutable_bitField0_ = 0;
227 195
      final com.google.protobuf.UnknownFieldSet.Builder unknownFields =
228 196
          com.google.protobuf.UnknownFieldSet.newBuilder();
229 197
      try {
......
247 215
              break;
248 216
            }
249 217
            case 18: {
218
              final com.google.protobuf.ByteString bs = input.readBytes();
250 219
              bitField0_ |= 0x00000002;
251
              literalValue_ = input.readBytes();
220
              literalValue_ = bs;
252 221
              break;
253 222
            }
254 223
            case 24: {
......
308 277
    }
309 278

  
310 279
    private int bitField0_;
311
    // optional uint64 uint64_value = 1;
312 280
    public static final int UINT64_VALUE_FIELD_NUMBER = 1;
313 281
    private long uint64Value_;
314 282
    /**
......
334 302
      return uint64Value_;
335 303
    }
336 304

  
337
    // optional string literal_value = 2;
338 305
    public static final int LITERAL_VALUE_FIELD_NUMBER = 2;
339 306
    private java.lang.Object literalValue_;
340 307
    /**
......
380 347
      }
381 348
    }
382 349

  
383
    // optional bool bool_value = 3;
384 350
    public static final int BOOL_VALUE_FIELD_NUMBER = 3;
385 351
    private boolean boolValue_;
386 352
    /**
......
398 364
      return boolValue_;
399 365
    }
400 366

  
401
    // optional int32 int32_value = 4;
402 367
    public static final int INT32_VALUE_FIELD_NUMBER = 4;
403 368
    private int int32Value_;
404 369
    /**
......
416 381
      return int32Value_;
417 382
    }
418 383

  
419
    // optional uint32 uint32_value = 5;
420 384
    public static final int UINT32_VALUE_FIELD_NUMBER = 5;
421 385
    private int uint32Value_;
422 386
    /**
......
445 409
    @Override
446 410
	public final boolean isInitialized() {
447 411
      final byte isInitialized = memoizedIsInitialized;
448
      if (isInitialized != -1) return isInitialized == 1;
412
      if (isInitialized == 1) return true;
413
      if (isInitialized == 0) return false;
449 414

  
450 415
      memoizedIsInitialized = 1;
451 416
      return true;
......
584 549
     * Protobuf type {@code serialize.PBParameter}
585 550
     */
586 551
    public static final class Builder extends
587
        com.google.protobuf.GeneratedMessage.Builder<Builder>
588
       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder {
552
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
553
        // @@protoc_insertion_point(builder_implements:serialize.PBParameter)
554
        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder {
589 555
      public static final com.google.protobuf.Descriptors.Descriptor
590 556
          getDescriptor() {
591 557
        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBParameter_descriptor;
......
599 565
                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.Builder.class);
600 566
      }
601 567

  
602
      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBParameter.newBuilder()
568
      // Construct using org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter.newBuilder()
603 569
      private Builder() {
604 570
        maybeForceBuilderInitialization();
605 571
      }
......
746 712
      }
747 713
      private int bitField0_;
748 714

  
749
      // optional uint64 uint64_value = 1;
750 715
      private long uint64Value_ ;
751 716
      /**
752 717
       * <code>optional uint64 uint64_value = 1;</code>
......
797 762
        return this;
798 763
      }
799 764

  
800
      // optional string literal_value = 2;
801 765
      private java.lang.Object literalValue_ = "";
802 766
      /**
803 767
       * <code>optional string literal_value = 2;</code>
......
813 777
	public java.lang.String getLiteralValue() {
814 778
        final java.lang.Object ref = literalValue_;
815 779
        if (!(ref instanceof java.lang.String)) {
816
          final java.lang.String s = ((com.google.protobuf.ByteString) ref)
817
              .toStringUtf8();
818
          literalValue_ = s;
780
          final com.google.protobuf.ByteString bs =
781
              (com.google.protobuf.ByteString) ref;
782
          final java.lang.String s = bs.toStringUtf8();
783
          if (bs.isValidUtf8()) {
784
            literalValue_ = s;
785
          }
819 786
          return s;
820 787
        } else {
821 788
          return (java.lang.String) ref;
......
874 841
        return this;
875 842
      }
876 843

  
877
      // optional bool bool_value = 3;
878 844
      private boolean boolValue_ ;
879 845
      /**
880 846
       * <code>optional bool bool_value = 3;</code>
......
909 875
        return this;
910 876
      }
911 877

  
912
      // optional int32 int32_value = 4;
913 878
      private int int32Value_ ;
914 879
      /**
915 880
       * <code>optional int32 int32_value = 4;</code>
......
944 909
        return this;
945 910
      }
946 911

  
947
      // optional uint32 uint32_value = 5;
948 912
      private int uint32Value_ ;
949 913
      /**
950 914
       * <code>optional uint32 uint32_value = 5;</code>
......
990 954
    // @@protoc_insertion_point(class_scope:serialize.PBParameter)
991 955
  }
992 956

  
993
  public interface PBReturnValueOrBuilder
994
      extends com.google.protobuf.MessageOrBuilder {
957
  public interface PBReturnValueOrBuilder extends
958
      // @@protoc_insertion_point(interface_extends:serialize.PBReturnValue)
959
      com.google.protobuf.MessageOrBuilder {
995 960

  
996
    // required .serialize.PBReturnType return_type = 1;
997 961
    /**
998 962
     * <code>required .serialize.PBReturnType return_type = 1;</code>
999 963
     */
......
1003 967
     */
1004 968
    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType getReturnType();
1005 969

  
1006
    // optional uint64 return_id = 2;
1007 970
    /**
1008 971
     * <code>optional uint64 return_id = 2;</code>
1009 972
     */
......
1017 980
   * Protobuf type {@code serialize.PBReturnValue}
1018 981
   */
1019 982
  public static final class PBReturnValue extends
1020
      com.google.protobuf.GeneratedMessage
1021
      implements PBReturnValueOrBuilder {
983
      com.google.protobuf.GeneratedMessage implements
984
      // @@protoc_insertion_point(message_implements:serialize.PBReturnValue)
985
      PBReturnValueOrBuilder {
1022 986
    // Use PBReturnValue.newBuilder() to construct.
1023 987
    private PBReturnValue(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1024 988
      super(builder);
......
1047 1011
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1048 1012
        throws com.google.protobuf.InvalidProtocolBufferException {
1049 1013
      initFields();
1050
      @SuppressWarnings("unused")
1051
	final
1052
	int mutable_bitField0_ = 0;
1014
//      int mutable_bitField0_ = 0;
1053 1015
      final com.google.protobuf.UnknownFieldSet.Builder unknownFields =
1054 1016
          com.google.protobuf.UnknownFieldSet.newBuilder();
1055 1017
      try {
......
1125 1087
    }
1126 1088

  
1127 1089
    private int bitField0_;
1128
    // required .serialize.PBReturnType return_type = 1;
1129 1090
    public static final int RETURN_TYPE_FIELD_NUMBER = 1;
1130 1091
    private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType returnType_;
1131 1092
    /**
......
1143 1104
      return returnType_;
1144 1105
    }
1145 1106

  
1146
    // optional uint64 return_id = 2;
1147 1107
    public static final int RETURN_ID_FIELD_NUMBER = 2;
1148 1108
    private long returnId_;
1149 1109
    /**
......
1169 1129
    @Override
1170 1130
	public final boolean isInitialized() {
1171 1131
      final byte isInitialized = memoizedIsInitialized;
1172
      if (isInitialized != -1) return isInitialized == 1;
1132
      if (isInitialized == 1) return true;
1133
      if (isInitialized == 0) return false;
1173 1134

  
1174 1135
      if (!hasReturnType()) {
1175 1136
        memoizedIsInitialized = 0;
......
1291 1252
     * Protobuf type {@code serialize.PBReturnValue}
1292 1253
     */
1293 1254
    public static final class Builder extends
1294
        com.google.protobuf.GeneratedMessage.Builder<Builder>
1295
       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder {
1255
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
1256
        // @@protoc_insertion_point(builder_implements:serialize.PBReturnValue)
1257
        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder {
1296 1258
      public static final com.google.protobuf.Descriptors.Descriptor
1297 1259
          getDescriptor() {
1298 1260
        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBReturnValue_descriptor;
......
1306 1268
                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder.class);
1307 1269
      }
1308 1270

  
1309
      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBReturnValue.newBuilder()
1271
      // Construct using org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.newBuilder()
1310 1272
      private Builder() {
1311 1273
        maybeForceBuilderInitialization();
1312 1274
      }
......
1428 1390
      }
1429 1391
      private int bitField0_;
1430 1392

  
1431
      // required .serialize.PBReturnType return_type = 1;
1432 1393
      private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType returnType_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnType.type_voidPointer;
1433 1394
      /**
1434 1395
       * <code>required .serialize.PBReturnType return_type = 1;</code>
......
1466 1427
        return this;
1467 1428
      }
1468 1429

  
1469
      // optional uint64 return_id = 2;
1470 1430
      private long returnId_ ;
1471 1431
      /**
1472 1432
       * <code>optional uint64 return_id = 2;</code>
......
1512 1472
    // @@protoc_insertion_point(class_scope:serialize.PBReturnValue)
1513 1473
  }
1514 1474

  
1515
  public interface PBFunctionCallOrBuilder
1516
      extends com.google.protobuf.MessageOrBuilder {
1475
  public interface PBFunctionCallOrBuilder extends
1476
      // @@protoc_insertion_point(interface_extends:serialize.PBFunctionCall)
1477
      com.google.protobuf.MessageOrBuilder {
1517 1478

  
1518
    // optional .serialize.PBAdd add = 1;
1519 1479
    /**
1520 1480
     * <code>optional .serialize.PBAdd add = 1;</code>
1521 1481
     */
......
1525 1485
     */
1526 1486
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd getAdd();
1527 1487

  
1528
    // optional .serialize.PBAllocation allocate = 2;
1529 1488
    /**
1530 1489
     * <code>optional .serialize.PBAllocation allocate = 2;</code>
1531 1490
     */
......
1535 1494
     */
1536 1495
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation getAllocate();
1537 1496

  
1538
    // optional .serialize.PBIdentifiers identifier = 3;
1539 1497
    /**
1540 1498
     * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
1541 1499
     */
......
1545 1503
     */
1546 1504
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers getIdentifier();
1547 1505

  
1548
    // optional .serialize.PBTypes type = 4;
1549 1506
    /**
1550 1507
     * <code>optional .serialize.PBTypes type = 4;</code>
1551 1508
     */
......
1555 1512
     */
1556 1513
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes getType();
1557 1514

  
1558
    // optional .serialize.PBStatements statement = 5;
1559 1515
    /**
1560 1516
     * <code>optional .serialize.PBStatements statement = 5;</code>
1561 1517
     */
......
1565 1521
     */
1566 1522
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements getStatement();
1567 1523

  
1568
    // optional .serialize.PBExpressions expression = 6;
1569 1524
    /**
1570 1525
     * <code>optional .serialize.PBExpressions expression = 6;</code>
1571 1526
     */
......
1575 1530
     */
1576 1531
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions getExpression();
1577 1532

  
1578
    // repeated .serialize.PBParameter parameters = 7;
1579 1533
    /**
1580 1534
     * <code>repeated .serialize.PBParameter parameters = 7;</code>
1581 1535
     */
......
1600 1554
    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameterOrBuilder getParametersOrBuilder(
1601 1555
        int index);
1602 1556

  
1603
    // required .serialize.PBReturnValue return_value = 8;
1604 1557
    /**
1605 1558
     * <code>required .serialize.PBReturnValue return_value = 8;</code>
1606 1559
     */
......
1618 1571
   * Protobuf type {@code serialize.PBFunctionCall}
1619 1572
   */
1620 1573
  public static final class PBFunctionCall extends
1621
      com.google.protobuf.GeneratedMessage
1622
      implements PBFunctionCallOrBuilder {
1574
      com.google.protobuf.GeneratedMessage implements
1575
      // @@protoc_insertion_point(message_implements:serialize.PBFunctionCall)
1576
      PBFunctionCallOrBuilder {
1623 1577
    // Use PBFunctionCall.newBuilder() to construct.
1624 1578
    private PBFunctionCall(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
1625 1579
      super(builder);
......
1798 1752
    }
1799 1753

  
1800 1754
    private int bitField0_;
1801
    // optional .serialize.PBAdd add = 1;
1802 1755
    public static final int ADD_FIELD_NUMBER = 1;
1803 1756
    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd add_;
1804 1757
    /**
......
1816 1769
      return add_;
1817 1770
    }
1818 1771

  
1819
    // optional .serialize.PBAllocation allocate = 2;
1820 1772
    public static final int ALLOCATE_FIELD_NUMBER = 2;
1821 1773
    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation allocate_;
1822 1774
    /**
......
1834 1786
      return allocate_;
1835 1787
    }
1836 1788

  
1837
    // optional .serialize.PBIdentifiers identifier = 3;
1838 1789
    public static final int IDENTIFIER_FIELD_NUMBER = 3;
1839 1790
    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers identifier_;
1840 1791
    /**
......
1852 1803
      return identifier_;
1853 1804
    }
1854 1805

  
1855
    // optional .serialize.PBTypes type = 4;
1856 1806
    public static final int TYPE_FIELD_NUMBER = 4;
1857 1807
    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes type_;
1858 1808
    /**
......
1870 1820
      return type_;
1871 1821
    }
1872 1822

  
1873
    // optional .serialize.PBStatements statement = 5;
1874 1823
    public static final int STATEMENT_FIELD_NUMBER = 5;
1875 1824
    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements statement_;
1876 1825
    /**
......
1888 1837
      return statement_;
1889 1838
    }
1890 1839

  
1891
    // optional .serialize.PBExpressions expression = 6;
1892 1840
    public static final int EXPRESSION_FIELD_NUMBER = 6;
1893 1841
    private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions expression_;
1894 1842
    /**
......
1906 1854
      return expression_;
1907 1855
    }
1908 1856

  
1909
    // repeated .serialize.PBParameter parameters = 7;
1910 1857
    public static final int PARAMETERS_FIELD_NUMBER = 7;
1911 1858
    private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> parameters_;
1912 1859
    /**
......
1947 1894
      return parameters_.get(index);
1948 1895
    }
1949 1896

  
1950
    // required .serialize.PBReturnValue return_value = 8;
1951 1897
    public static final int RETURN_VALUE_FIELD_NUMBER = 8;
1952 1898
    private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue returnValue_;
1953 1899
    /**
......
1986 1932
    @Override
1987 1933
	public final boolean isInitialized() {
1988 1934
      final byte isInitialized = memoizedIsInitialized;
1989
      if (isInitialized != -1) return isInitialized == 1;
1935
      if (isInitialized == 1) return true;
1936
      if (isInitialized == 0) return false;
1990 1937

  
1991 1938
      if (!hasReturnValue()) {
1992 1939
        memoizedIsInitialized = 0;
......
2154 2101
     * Protobuf type {@code serialize.PBFunctionCall}
2155 2102
     */
2156 2103
    public static final class Builder extends
2157
        com.google.protobuf.GeneratedMessage.Builder<Builder>
2158
       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder {
2104
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
2105
        // @@protoc_insertion_point(builder_implements:serialize.PBFunctionCall)
2106
        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder {
2159 2107
      public static final com.google.protobuf.Descriptors.Descriptor
2160 2108
          getDescriptor() {
2161 2109
        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBFunctionCall_descriptor;
......
2169 2117
                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.Builder.class);
2170 2118
      }
2171 2119

  
2172
      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBFunctionCall.newBuilder()
2120
      // Construct using org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall.newBuilder()
2173 2121
      private Builder() {
2174 2122
        maybeForceBuilderInitialization();
2175 2123
      }
......
2391 2339
      }
2392 2340
      private int bitField0_;
2393 2341

  
2394
      // optional .serialize.PBAdd add = 1;
2395 2342
      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd add_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAdd.TIRESIAS_ADD_IDENTIFIERTOLIST;
2396 2343
      /**
2397 2344
       * <code>optional .serialize.PBAdd add = 1;</code>
......
2429 2376
        return this;
2430 2377
      }
2431 2378

  
2432
      // optional .serialize.PBAllocation allocate = 2;
2433 2379
      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation allocate_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBAllocation.TIRESIAS_CREATE_IDENTIFIER;
2434 2380
      /**
2435 2381
       * <code>optional .serialize.PBAllocation allocate = 2;</code>
......
2467 2413
        return this;
2468 2414
      }
2469 2415

  
2470
      // optional .serialize.PBIdentifiers identifier = 3;
2471 2416
      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers identifier_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBIdentifiers.TIRESIAS_INIT_ENUMIDENTIFIER;
2472 2417
      /**
2473 2418
       * <code>optional .serialize.PBIdentifiers identifier = 3;</code>
......
2505 2450
        return this;
2506 2451
      }
2507 2452

  
2508
      // optional .serialize.PBTypes type = 4;
2509 2453
      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes type_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBTypes.TIRESIAS_INIT_INTTYPE;
2510 2454
      /**
2511 2455
       * <code>optional .serialize.PBTypes type = 4;</code>
......
2543 2487
        return this;
2544 2488
      }
2545 2489

  
2546
      // optional .serialize.PBStatements statement = 5;
2547 2490
      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements statement_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBStatements.TIRESIAS_INIT_SKIP;
2548 2491
      /**
2549 2492
       * <code>optional .serialize.PBStatements statement = 5;</code>
......
2581 2524
        return this;
2582 2525
      }
2583 2526

  
2584
      // optional .serialize.PBExpressions expression = 6;
2585 2527
      private org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions expression_ = org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION;
2586 2528
      /**
2587 2529
       * <code>optional .serialize.PBExpressions expression = 6;</code>
......
2619 2561
        return this;
2620 2562
      }
2621 2563

  
2622
      // repeated .serialize.PBParameter parameters = 7;
2623 2564
      private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> parameters_ =
2624 2565
        java.util.Collections.emptyList();
2625 2566
      private void ensureParametersIsMutable() {
......
2764 2705
          java.lang.Iterable<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBParameter> values) {
2765 2706
        if (parametersBuilder_ == null) {
2766 2707
          ensureParametersIsMutable();
2767
          super.addAll(values, parameters_);
2708
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
2709
              values, parameters_);
2768 2710
          onChanged();
2769 2711
        } else {
2770 2712
          parametersBuilder_.addAllMessages(values);
......
2864 2806
        return parametersBuilder_;
2865 2807
      }
2866 2808

  
2867
      // required .serialize.PBReturnValue return_value = 8;
2868 2809
      private org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue returnValue_ = org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.getDefaultInstance();
2869 2810
      private com.google.protobuf.SingleFieldBuilder<
2870 2811
          org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder> returnValueBuilder_;
......
2976 2917
        if (returnValueBuilder_ == null) {
2977 2918
          returnValueBuilder_ = new com.google.protobuf.SingleFieldBuilder<
2978 2919
              org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValue.Builder, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBReturnValueOrBuilder>(
2979
                  returnValue_,
2920
                  getReturnValue(),
2980 2921
                  getParentForChildren(),
2981 2922
                  isClean());
2982 2923
          returnValue_ = null;
......
2995 2936
    // @@protoc_insertion_point(class_scope:serialize.PBFunctionCall)
2996 2937
  }
2997 2938

  
2998
  public interface PBAstTraversalOrBuilder
2999
      extends com.google.protobuf.MessageOrBuilder {
2939
  public interface PBAstTraversalOrBuilder extends
2940
      // @@protoc_insertion_point(interface_extends:serialize.PBAstTraversal)
2941
      com.google.protobuf.MessageOrBuilder {
3000 2942

  
3001
    // repeated .serialize.PBFunctionCall calls = 1;
3002 2943
    /**
3003 2944
     * <code>repeated .serialize.PBFunctionCall calls = 1;</code>
3004 2945
     */
......
3023 2964
    org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCallOrBuilder getCallsOrBuilder(
3024 2965
        int index);
3025 2966

  
3026
    // required uint64 main_module = 2;
3027 2967
    /**
3028 2968
     * <code>required uint64 main_module = 2;</code>
3029 2969
     */
......
3037 2977
   * Protobuf type {@code serialize.PBAstTraversal}
3038 2978
   */
3039 2979
  public static final class PBAstTraversal extends
3040
      com.google.protobuf.GeneratedMessage
3041
      implements PBAstTraversalOrBuilder {
2980
      com.google.protobuf.GeneratedMessage implements
2981
      // @@protoc_insertion_point(message_implements:serialize.PBAstTraversal)
2982
      PBAstTraversalOrBuilder {
3042 2983
    // Use PBAstTraversal.newBuilder() to construct.
3043 2984
    private PBAstTraversal(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
3044 2985
      super(builder);
......
3143 3084
    }
3144 3085

  
3145 3086
    private int bitField0_;
3146
    // repeated .serialize.PBFunctionCall calls = 1;
3147 3087
    public static final int CALLS_FIELD_NUMBER = 1;
3148 3088
    private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> calls_;
3149 3089
    /**
......
3184 3124
      return calls_.get(index);
3185 3125
    }
3186 3126

  
3187
    // required uint64 main_module = 2;
3188 3127
    public static final int MAIN_MODULE_FIELD_NUMBER = 2;
3189 3128
    private long mainModule_;
3190 3129
    /**
......
3210 3149
    @Override
3211 3150
	public final boolean isInitialized() {
3212 3151
      final byte isInitialized = memoizedIsInitialized;
3213
      if (isInitialized != -1) return isInitialized == 1;
3152
      if (isInitialized == 1) return true;
3153
      if (isInitialized == 0) return false;
3214 3154

  
3215 3155
      if (!hasMainModule()) {
3216 3156
        memoizedIsInitialized = 0;
......
3338 3278
     * Protobuf type {@code serialize.PBAstTraversal}
3339 3279
     */
3340 3280
    public static final class Builder extends
3341
        com.google.protobuf.GeneratedMessage.Builder<Builder>
3342
       implements org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversalOrBuilder {
3281
        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
3282
        // @@protoc_insertion_point(builder_implements:serialize.PBAstTraversal)
3283
        org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversalOrBuilder {
3343 3284
      public static final com.google.protobuf.Descriptors.Descriptor
3344 3285
          getDescriptor() {
3345 3286
        return org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.internal_static_serialize_PBAstTraversal_descriptor;
......
3353 3294
                org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.class, org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.Builder.class);
3354 3295
      }
3355 3296

  
3356
      // Construct using org.momut.ooas.argos.codegen.serialize.gen.RecordedAstTraversal.PBAstTraversal.newBuilder()
3297
      // Construct using org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBAstTraversal.newBuilder()
3357 3298
      private Builder() {
3358 3299
        maybeForceBuilderInitialization();
3359 3300
      }
......
3514 3455
      }
3515 3456
      private int bitField0_;
3516 3457

  
3517
      // repeated .serialize.PBFunctionCall calls = 1;
3518 3458
      private java.util.List<org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> calls_ =
3519 3459
        java.util.Collections.emptyList();
3520 3460
      private void ensureCallsIsMutable() {
......
3659 3599
          java.lang.Iterable<? extends org.momut.ooas.codegen.ast.protobuf.gen.RecordedAstTraversal.PBFunctionCall> values) {
3660 3600
        if (callsBuilder_ == null) {
3661 3601
          ensureCallsIsMutable();
3662
          super.addAll(values, calls_);
3602
          com.google.protobuf.AbstractMessageLite.Builder.addAll(
3603
              values, calls_);
3663 3604
          onChanged();
3664 3605
        } else {
3665 3606
          callsBuilder_.addAllMessages(values);
......
3759 3700
        return callsBuilder_;
3760 3701
      }
3761 3702

  
3762
      // required uint64 main_module = 2;
3763 3703
      private long mainModule_ ;
3764 3704
      /**
3765 3705
       * <code>required uint64 main_module = 2;</code>
......
3805 3745
    // @@protoc_insertion_point(class_scope:serialize.PBAstTraversal)
3806 3746
  }
3807 3747

  
3808
  private static com.google.protobuf.Descriptors.Descriptor
3748
  private static final com.google.protobuf.Descriptors.Descriptor
3809 3749
    internal_static_serialize_PBParameter_descriptor;
3810 3750
  private static
3811 3751
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
3812 3752
      internal_static_serialize_PBParameter_fieldAccessorTable;
3813
  private static com.google.protobuf.Descriptors.Descriptor
3753
  private static final com.google.protobuf.Descriptors.Descriptor
3814 3754
    internal_static_serialize_PBReturnValue_descriptor;
3815 3755
  private static
3816 3756
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
3817 3757
      internal_static_serialize_PBReturnValue_fieldAccessorTable;
3818
  private static com.google.protobuf.Descriptors.Descriptor
3758
  private static final com.google.protobuf.Descriptors.Descriptor
3819 3759
    internal_static_serialize_PBFunctionCall_descriptor;
3820 3760
  private static
3821 3761
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
3822 3762
      internal_static_serialize_PBFunctionCall_fieldAccessorTable;
3823
  private static com.google.protobuf.Descriptors.Descriptor
3763
  private static final com.google.protobuf.Descriptors.Descriptor
3824 3764
    internal_static_serialize_PBAstTraversal_descriptor;
3825 3765
  private static
3826 3766
    com.google.protobuf.GeneratedMessage.FieldAccessorTable
......
3852 3792
      "nValue\"O\n\016PBAstTraversal\022(\n\005calls\030\001 \003(\0132" +
3853 3793
      "\031.serialize.PBFunctionCall\022\023\n\013main_modul" +
3854 3794
      "e\030\002 \002(\004*6\n\014PBReturnType\022\024\n\020type_voidPoin" +
3855
      "ter\020\001\022\020\n\014type_boolean\020\002BH\n0at.ac.ait.mom" +
3856
      "ut.ooas.argos.codegen.serialize.genB\024Rec",
3857
      "ordedAstTraversal"
3795
      "ter\020\001\022\020\n\014type_boolean\020\002B?\n\'org.momut.ooa" +
3796
      "s.codegen.ast.protobuf.genB\024RecordedAstT",
3797
      "raversal"
3858 3798
    };
3859 3799
    final com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
3860
      new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
3861
        @Override
3800
        new com.google.protobuf.Descriptors.FileDescriptor.    InternalDescriptorAssigner() {
3801
          @Override
3862 3802
		public com.google.protobuf.ExtensionRegistry assignDescriptors(
3863
            com.google.protobuf.Descriptors.FileDescriptor root) {
3864
          descriptor = root;
3865
          internal_static_serialize_PBParameter_descriptor =
3866
            getDescriptor().getMessageTypes().get(0);
3867
          internal_static_serialize_PBParameter_fieldAccessorTable = new
3868
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3869
              internal_static_serialize_PBParameter_descriptor,
3870
              new java.lang.String[] { "Uint64Value", "LiteralValue", "BoolValue", "Int32Value", "Uint32Value", });
3871
          internal_static_serialize_PBReturnValue_descriptor =
3872
            getDescriptor().getMessageTypes().get(1);
3873
          internal_static_serialize_PBReturnValue_fieldAccessorTable = new
3874
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3875
              internal_static_serialize_PBReturnValue_descriptor,
3876
              new java.lang.String[] { "ReturnType", "ReturnId", });
3877
          internal_static_serialize_PBFunctionCall_descriptor =
3878
            getDescriptor().getMessageTypes().get(2);
3879
          internal_static_serialize_PBFunctionCall_fieldAccessorTable = new
3880
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3881
              internal_static_serialize_PBFunctionCall_descriptor,
3882
              new java.lang.String[] { "Add", "Allocate", "Identifier", "Type", "Statement", "Expression", "Parameters", "ReturnValue", });
3883
          internal_static_serialize_PBAstTraversal_descriptor =
3884
            getDescriptor().getMessageTypes().get(3);
3885
          internal_static_serialize_PBAstTraversal_fieldAccessorTable = new
3886
            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3887
              internal_static_serialize_PBAstTraversal_descriptor,
3888
              new java.lang.String[] { "Calls", "MainModule", });
3889
          return null;
3890
        }
3891
      };
3803
              com.google.protobuf.Descriptors.FileDescriptor root) {
3804
            descriptor = root;
3805
            return null;
3806
          }
3807
        };
3892 3808
    com.google.protobuf.Descriptors.FileDescriptor
3893 3809
      .internalBuildGeneratedFileFrom(descriptorData,
3894 3810
        new com.google.protobuf.Descriptors.FileDescriptor[] {
3895 3811
          org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor(),
3896 3812
        }, assigner);
3813
    internal_static_serialize_PBParameter_descriptor =
3814
      getDescriptor().getMessageTypes().get(0);
3815
    internal_static_serialize_PBParameter_fieldAccessorTable = new
3816
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3817
        internal_static_serialize_PBParameter_descriptor,
3818
        new java.lang.String[] { "Uint64Value", "LiteralValue", "BoolValue", "Int32Value", "Uint32Value", });
3819
    internal_static_serialize_PBReturnValue_descriptor =
3820
      getDescriptor().getMessageTypes().get(1);
3821
    internal_static_serialize_PBReturnValue_fieldAccessorTable = new
3822
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3823
        internal_static_serialize_PBReturnValue_descriptor,
3824
        new java.lang.String[] { "ReturnType", "ReturnId", });
3825
    internal_static_serialize_PBFunctionCall_descriptor =
3826
      getDescriptor().getMessageTypes().get(2);
3827
    internal_static_serialize_PBFunctionCall_fieldAccessorTable = new
3828
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3829
        internal_static_serialize_PBFunctionCall_descriptor,
3830
        new java.lang.String[] { "Add", "Allocate", "Identifier", "Type", "Statement", "Expression", "Parameters", "ReturnValue", });
3831
    internal_static_serialize_PBAstTraversal_descriptor =
3832
      getDescriptor().getMessageTypes().get(3);
3833
    internal_static_serialize_PBAstTraversal_fieldAccessorTable = new
3834
      com.google.protobuf.GeneratedMessage.FieldAccessorTable(
3835
        internal_static_serialize_PBAstTraversal_descriptor,
3836
        new java.lang.String[] { "Calls", "MainModule", });
3837
    org.momut.ooas.codegen.ast.protobuf.gen.FunctionNames.getDescriptor();
3897 3838
  }
3898 3839

  
3899 3840
  // @@protoc_insertion_point(outer_class_scope)
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/protobuf/AstProtoBufRecorder.java
83 83
	}
84 84

  
85 85
	private PBParameter.Builder stringParameter(String text){
86
		return PBParameter.newBuilder().setLiteralValue(text);
86
		return PBParameter.newBuilder().setLiteralValue(text == null ? "" : text);
87 87
	}
88 88

  
89 89
	private PBParameter.Builder boolParameter(boolean value){
......
594 594
	}
595 595

  
596 596
	@Override
597
	public boolean initMetaType(Long typeId, Long identifierRef,
598
			boolean anonymousType, Long innerTypeRef) {
599

  
600
//		DLL bool TIRESIAS_INIT_METATYPE(void* context, void* typeId,
601
//		void* identifierRef, bool anonymousType,
602
//		void* innerTypeRef);
603
		boolCall(PBTypes.TIRESIAS_INIT_METATYPE
604
				, referenceParameter(typeId)
605
				, referenceParameter(identifierRef)
606
				, boolParameter(anonymousType)
607
				, referenceParameter(innerTypeRef));
608

  
609
		return true;
610
	}
611

  
612
	@Override
597 613
	public boolean initTupleType(Long typeId, Long identifierRef,
598 614
			boolean anonymousType, Long typeListRef) {
599 615

  
......
840 856

  
841 857
	@Override
842 858
	public boolean initTypeExpression(Long expr, int line, int pos,
843
			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef) {
859
			Long typeRef, Long callTargetsIdentifierListRef, Long symbTabRef, Long referredTypeRef) {
844 860

  
845 861
//		DLL bool TIRESIAS_INIT_TYPEEXPRESSION(void* context,
846 862
//				void* expr, std::int32_t line, std::int32_t pos, void* typeRef,
847
//				void* callTargetsIdentifierListRef, void* symbTabRef);
863
//				void* callTargetsIdentifierListRef, void* symbTabRef, void* referredTypeRef);
848 864

  
849 865
		boolCall(PBExpressions.TIRESIAS_INIT_TYPEEXPRESSION
850 866
				, referenceParameter(expr)
......
852 868
				, int32Parameter(pos)
853 869
				, referenceParameter(typeRef)
854 870
				, referenceParameter(callTargetsIdentifierListRef)
855
				, referenceParameter(symbTabRef));
871
				, referenceParameter(symbTabRef)
872
				, referenceParameter(referredTypeRef));
856 873
		return true;
857 874
	}
858 875

  
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/IAstDuplicator.java
242 242
			T innerTypeRef,
243 243
			int maxNumberOfElements);
244 244

  
245
	/** Initialize a meta type */
246
	boolean initMetaType(
247
			T typeId,
248
			T identifierRef,
249
			boolean anonymousType,
250
			T innerTypeRef);
251

  
245 252
	/** Initialize a tuple type */
246 253
	boolean initTupleType(
247 254
			T typeId,
......
367 374
			int pos,
368 375
			T typeRef,
369 376
			T callTargetsIdentifierListRef,
370
			T symbTabRef);
377
			T symbTabRef,
378
			T referredTypeRef);
371 379

  
372 380
	/** Initialize an identifier expression */
373 381
	boolean initIdentifierExpression(
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/ast/OoaAstEmitter.java
93 93
import org.momut.ooas.ast.types.IntType;
94 94
import org.momut.ooas.ast.types.ListType;
95 95
import org.momut.ooas.ast.types.MapType;
96
import org.momut.ooas.ast.types.MetaType;
96 97
import org.momut.ooas.ast.types.NullType;
97 98
import org.momut.ooas.ast.types.OoActionSystemInstance;
98 99
import org.momut.ooas.ast.types.OoActionSystemType;
......
645 646
				listType.maxNumberOfElements());
646 647
	}
647 648

  
649
	@Override
650
	public void visit(MetaType metaType)
651
	{
652
		final T type = createType(metaType);
648 653

  
654
		final Identifier id = metaType.identifier();
655
		VisitSub(id, metaType);
656
		VisitSub(metaType.Type(), metaType);
657

  
658
		m_copier.initMetaType(
659
				type,
660
				m_convertedIdentifiers.get(id),
661
				metaType.isAnonymousType(),
662
				m_convertedTypes.get(metaType.Type()));
663
	}
664

  
665

  
649 666
	@Override
650 667
	public void visit(TupleType tupleType)
651 668
	{
......
1007 1024
	{
1008 1025
		final T expr = createExpression(typeExpression);
1009 1026
		final ExprData d = visitBasicExpression(typeExpression);
1027
		VisitSub(typeExpression.referredType(), typeExpression);
1028

  
1010 1029
		m_copier.initTypeExpression(
1011 1030
				expr,
1012 1031
				d.line,
1013 1032
				d.pos,
1014 1033
				d.typeRef,
1015 1034
				d.callTargetsIdentifierListRef,
1016
				d.symbTabRef);
1035
				d.symbTabRef,
1036
				m_convertedTypes.get(typeExpression.referredType()));
1017 1037
	}
1018 1038

  
1019 1039
	@Override
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/cadp/CadpExpression.java
213 213
	@Override
214 214
	public  void visit(TypeExpression typeExpression)
215 215
	{
216
		m_emitter.Append(typeExpression.type().identifier().tokenText());
216
		m_emitter.Append(typeExpression.referredType().identifier().tokenText());
217 217
	}
218 218

  
219 219
	@Override
......
438 438
	{
439 439
		// if this instanceof some "<enumType>.<enumValue>" access, then just print the numeric value of <enumValue>
440 440
		if (accessExpression.left().kind() == ExpressionKind.Type &&
441
		    ((TypeExpression)accessExpression.left()).type().kind() == TypeKind.EnumeratedType )
441
		    ((TypeExpression)accessExpression.left()).referredType().kind() == TypeKind.EnumeratedType )
442 442
		{
443 443
			accessExpression.right().Accept(this);
444 444
			return;
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/java/JavaExpression.java
184 184
	@Override
185 185
	public void visit(TypeExpression typeExpression)
186 186
	{
187
		if (typeExpression.type().kind() != TypeKind.EnumeratedType)
188
			m_emitter.Append(GetIdentifierString(typeExpression.type().identifier().tokenText()));
187
		if (typeExpression.referredType().kind() != TypeKind.EnumeratedType)
188
			m_emitter.Append(GetIdentifierString(typeExpression.referredType().identifier().tokenText()));
189 189
	}
190 190

  
191 191

  
......
315 315
	@Override
316 316
	public void visit(AccessExpression accessExpression)
317 317
	{
318
		if (accessExpression.left().type().kind() != TypeKind.EnumeratedType)
318
		if (accessExpression.left().type().kind() != TypeKind.MetaType)
319
//		if (accessExpression.left().type().kind() != TypeKind.EnumeratedType)
319 320
		{
320 321
			// enums and qr types are directly (statically) converted to nums...
321 322
			VisitSub(accessExpression.left(), accessExpression);
trunk/compiler/ooasCompiler/src/org/momut/ooas/codegen/prolog/OoaPrologExpression.java
53 53
import org.momut.ooas.ast.identifiers.IdentifierKind;
54 54
import org.momut.ooas.ast.types.EnumType;
55 55
import org.momut.ooas.ast.types.FunctionType;
56
import org.momut.ooas.ast.types.MetaType;
56 57
import org.momut.ooas.ast.types.TypeKind;
57 58
import org.momut.ooas.ast.types.Type;
58 59
import org.momut.ooas.ast.types.ValuedEnumType;
......
282 283
	@Override
283 284
	public void visit(TypeExpression typeExpression)
284 285
	{
285
		if (typeExpression.type().kind() != TypeKind.EnumeratedType)
286
		if (typeExpression.referredType().kind() != TypeKind.EnumeratedType)
286 287
		{
287
			m_emitter.Append(GetIdentifierString(typeExpression.type().identifier()));
288
			m_emitter.Append(GetIdentifierString(typeExpression.referredType().identifier()));
288 289
		}
289 290
	}
290 291

  
......
411 412
	@Override
412 413
	public void visit(AccessExpression accessExpression)
413 414
	{
414
		if (accessExpression.left().type().kind() != TypeKind.EnumeratedType &&
415
		if (!(accessExpression.left().type().kind() == TypeKind.MetaType && ((MetaType)accessExpression.left().type()).Type().kind() == TypeKind.EnumeratedType ) &&
415 416
		    !(accessExpression.right().kind() == ExpressionKind.Identifier &&
416 417
		    ((IdentifierExpression)accessExpression.right()).identifier().kind() == IdentifierKind.AttributeIdentifier))
417 418
		{
trunk/compiler/ooasCompiler/src/org/momut/ooas/math/Operations.java
57 57
	@Override
58 58
	public AbstractRange GenericArithmeticCover(AbstractRange type1, AbstractRange type2, ExpressionKind op)
59 59
	{
60
		Range<T> a = (Range<T>) type1;
61
		Range<T> b = (Range<T>) type2;
60
		final Range<T> a = (Range<T>) type1;
61
		final Range<T> b = (Range<T>) type2;
62 62

  
63 63
//		Range<T> a = type1 as Range<T>;
64 64
//		Range<T> b = type2 as Range<T>;
......
71 71

  
72 72
	public Range<T> GenericArithmeticCover(Range<T> type1, Range<T> type2, ExpressionKind op)
73 73
	{
74
		T defaultValue = m_basicOperations.getDefaultValue();
75
		Range<T> result = type1.Create(defaultValue, defaultValue);
74
		final T defaultValue = m_basicOperations.getDefaultValue();
75
		final Range<T> result = type1.Create(defaultValue, defaultValue);
76 76

  
77 77
		switch (op)
78 78
		{
......
87 87
				assert(type2 != null);
88 88
				// we do some sort of resulttype = type1 - type2
89 89
				// hence, do the unminus stuff with type 2
90
				T spare = type2.max;
90
				final T spare = type2.max;
91 91
				type2.max = m_basicOperations.unMinus(type2.min);
92 92
				type2.min = m_basicOperations.unMinus(spare);
93 93
				// now it's the same as with sum.. but c# does not let us fall through..
......
101 101
				break;
102 102
			case idiv:
103 103
			case div:
104
				// get the closest values to 0 for the divisor.
104 105
				assert(type2 != null);
105
				type2.min = m_basicOperations.equal(type2.min, defaultValue) ?
106
						m_basicOperations.unMinus(type2.precision) : type2.min;
107
				type2.max = m_basicOperations.equal(type2.max, defaultValue) ?
108
						type2.precision : type2.max;
109
				// hmm, brute force.. is there some formula?
110
				result.max = m_basicOperations.div(type1.min, type2.min);
106
				final Range<T> closestToZero = type2.Create(defaultValue, defaultValue);
107
				if (m_basicOperations.greater(type2.max, defaultValue) && (m_basicOperations.greater(type2.min, defaultValue) || m_basicOperations.equal(type2.min, defaultValue))) {
108
					// divisor range [X...0+]
109
					closestToZero.max = m_basicOperations.equal(type2.min, defaultValue) ? type2.precision : type2.min; // type2.min or type2.precision if that was 0
110
					closestToZero.min = closestToZero.max;
111
				} else if (m_basicOperations.smaller(type2.max, defaultValue) && (m_basicOperations.smaller(type2.min, defaultValue) || m_basicOperations.equal(type2.min, defaultValue))) {
112
					// divisor range [0-...-X]
113
					closestToZero.max = m_basicOperations.equal(type2.min, defaultValue) ? m_basicOperations.unMinus(type2.precision) : type2.min; // type2.min or -type2.precision if that was 0
114
					closestToZero.min = closestToZero.max;
115
				} else {
116
					// divisor range [Y ... -X]
117
					closestToZero.max = type2.precision;
118
					closestToZero.min = m_basicOperations.unMinus(type2.precision);
119
				}
120

  
121
				result.max = m_basicOperations.div(type1.min, closestToZero.min);
111 122
				result.min = result.max;
112 123

  
113
				T tmp = m_basicOperations.div(type1.max, type2.min);
124
				T tmp = m_basicOperations.div(type1.max, closestToZero.min);
114 125
				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
115 126
				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
116 127

  
117
				tmp = m_basicOperations.div(type1.min, type2.max);
128
				tmp = m_basicOperations.div(type1.min, closestToZero.max);
118 129
				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
119 130
				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
120 131

  
121
				tmp = m_basicOperations.div(type1.max, type2.max);
132
				tmp = m_basicOperations.div(type1.max, closestToZero.max);
122 133
				result.max = m_basicOperations.smaller(result.max, tmp) ? tmp : result.max;
123 134
				result.min = m_basicOperations.greater(result.min, tmp) ? tmp : result.min;
124 135
				break;
trunk/compiler/ooasCompiler/src/org/momut/ooas/parser/ooa.g
20 20
			 
21 21
  History
22 22
  ~~~~~~~
23
Changes 1.09 to 1.10
24
   - allow actions to be declared with empty parameter lists and "()" 
25
   
26
 Changes 1.08 to 1.09
27
   ~ fix actionBody rule to allow multiple prioritized compositions (replace "?" by "*")
28

  
23 29
  Changes 1.07 to 1.08
24 30
    ~ remove support for Qualitative Action Systems
25 31

  
......
140 146
    Ulysses OO-Action System Parser
141 147

  
142 148
    Copyright Graz University of Technology 2009
143
    Copyright AIT Austrian Institute of Technology 2013
149
    Copyright AIT Austrian Institute of Technology 2013, 2016
... This diff was truncated because it exceeds the maximum size that can be displayed.

Also available in: Unified diff