Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
afterkelsen committed Mar 1, 2016
2 parents 26a7005 + 487399a commit be29106
Show file tree
Hide file tree
Showing 3,052 changed files with 51,082 additions and 111,617 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ target/
.project
bin

# Intellij metadata #
#####################
*.iml
.idea

# Added by Jenkins for local mvn repos #
########################################
.repository/
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ This directory contains several subdirectories:




168 changes: 90 additions & 78 deletions core/ast/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>org.overturetool</groupId>
<artifactId>core</artifactId>
<version>2.3.0</version>
<version>2.3.2</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand All @@ -18,32 +18,44 @@

<build>
<plugins>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>

<excludePackageNames>org.overture.ast.*</excludePackageNames>

</configuration>
</plugin>


<plugin>
<groupId>org.overturetool.astcreator</groupId>
<artifactId>astcreator-plugin</artifactId>
<version>${astcreator.version}</version>
<executions>
<execution>
<id>java</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- <deletePackageOnGenerate> -->
<!-- <param>vdm.generated.node</param> -->
<!-- <param>org.overture.ast</param> -->
<!-- </deletePackageOnGenerate> -->
<ast>overtureII.astv2</ast>
</configuration>
<groupId>org.overturetool.astcreator</groupId>
<artifactId>astcreator-plugin</artifactId>
<version>${astcreator.version}</version>
<executions>
<execution>
<id>java</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<!-- <deletePackageOnGenerate> -->
<!-- <param>vdm.generated.node</param> -->
<!-- <param>org.overture.ast</param> -->
<!-- </deletePackageOnGenerate> -->
<ast>overtureII.astv2</ast>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
Expand All @@ -52,76 +64,76 @@
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/astCreator/</source>
<source>${project.build.directory}/generated-sources/astCreator/</source>
</sources>
</configuration>
</execution>
</executions>
</executions>
</plugin>
</plugins>

<pluginManagement>
<plugins>

<!-- Plugin for license headers-->
<plugin>
<!-- Plugin for license headers-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>1.7</version>
<configuration>
<excludes>
<exclude>**/VDMToken.java</exclude>
<exclude>**/Pass.java</exclude>
<exclude>**/Release.java</exclude>
<exclude>**/Base64.java</exclude>
<exclude>**/Dialect.java</exclude>
<exclude>**/LexBooleanToken.java</exclude>
<exclude>**/LexCharacterToken.java</exclude>
<exclude>**/LexIntegerToken.java</exclude>
<exclude>**/LexKeywordToken.java</exclude>
<exclude>**/LexLocation.java</exclude>
<exclude>**/LexNameList.java</exclude>
<exclude>**/LexQuoteToken.java</exclude>
<exclude>**/LexRealToken.java</exclude>
<exclude>**/LexStringToken.java</exclude>
<exclude>**/LexToken.java</exclude>
<exclude>**/InternalException.java</exclude>
<exclude>**/Utils.java</exclude>
<exclude>**/Settings.java</exclude>
<exclude>**/ConfigBase.java</exclude>
</excludes>
</configuration>
<configuration>
<excludes>
<exclude>**/VDMToken.java</exclude>
<exclude>**/Pass.java</exclude>
<exclude>**/Release.java</exclude>
<exclude>**/Base64.java</exclude>
<exclude>**/Dialect.java</exclude>
<exclude>**/LexBooleanToken.java</exclude>
<exclude>**/LexCharacterToken.java</exclude>
<exclude>**/LexIntegerToken.java</exclude>
<exclude>**/LexKeywordToken.java</exclude>
<exclude>**/LexLocation.java</exclude>
<exclude>**/LexNameList.java</exclude>
<exclude>**/LexQuoteToken.java</exclude>
<exclude>**/LexRealToken.java</exclude>
<exclude>**/LexStringToken.java</exclude>
<exclude>**/LexToken.java</exclude>
<exclude>**/InternalException.java</exclude>
<exclude>**/Utils.java</exclude>
<exclude>**/Settings.java</exclude>
<exclude>**/ConfigBase.java</exclude>
</excludes>
</configuration>
</plugin>


<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.overturetool.astcreator</groupId>
<artifactId>astcreator-plugin</artifactId>
<versionRange>${astcreator.version}</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.overturetool.astcreator</groupId>
<artifactId>astcreator-plugin</artifactId>
<versionRange>${astcreator.version}</versionRange>
<goals>
<goal>generate</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>false</runOnIncremental>
</execute>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,22 @@
import org.overture.ast.lex.LexToken;
import org.overture.ast.lex.VDMToken;
import org.overture.ast.types.ABooleanBasicType;
import org.overture.ast.types.ARecordInvariantType;
import org.overture.ast.types.PType;

public class AstExpressionFactory
{

public static AMkTypeExp newAMkTypeExp(ILexNameToken typeName, PType type, List<PExp> arglist)
public static AMkTypeExp newAMkTypeExp(ILexNameToken typeName, PType type,
List<PExp> arglist)
{
AMkTypeExp mktype = new AMkTypeExp();
mktype.setType(type);
if (type instanceof ARecordInvariantType)
{
mktype.setRecordType((ARecordInvariantType) type.clone());
}

mktype.setTypeName(typeName);
mktype.setArgs(arglist);
return mktype;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ public static AThreadDefinition newAThreadDefinition(PStm statement)
// used to be a static method on LexNameToken - removed when we went to
// interface
result.setOperationName(new LexNameToken(statement.getLocation().getModule(), "thread", statement.getLocation()));
result.getOperationName().setTypeQualifier(new Vector<PType>());
result.setAccess(af.createPAccessSpecifierAssistant().getProtected());

return result;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public interface ILexNameToken extends ILexIdentifierToken
ILexLocation getLocation();

ILexNameToken getModifiedName(String classname);

ILexNameToken getModifiedName(List<PType> qualifier);

String getModule();

Expand Down
23 changes: 19 additions & 4 deletions core/ast/src/main/java/org/overture/ast/lex/LexNameToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Vector;

import org.overture.ast.analysis.AnalysisException;
import org.overture.ast.analysis.intf.IAnalysis;
Expand Down Expand Up @@ -167,6 +168,13 @@ public LexNameToken getModifiedName(String classname)
return mod;
}

public LexNameToken getModifiedName(List<PType> qualifier)
{
LexNameToken mod = new LexNameToken(module, name, location, old, explicit);
mod.setTypeQualifier(qualifier);
return mod;
}

public LexNameToken getSelfName()
{
if (module.equals("CLASS"))
Expand All @@ -182,16 +190,23 @@ public LexNameToken getThreadName()
{
if (module.equals("CLASS"))
{
return new LexNameToken(name, "thread", location);
} else
LexNameToken thread = new LexNameToken(name, "thread", location);
thread.setTypeQualifier(new Vector<PType>());
return thread;
}
else
{
return new LexNameToken(module, "thread", location);
LexNameToken thread = new LexNameToken(module, "thread", location);
thread.setTypeQualifier(new Vector<PType>());
return thread;
}
}

public LexNameToken getThreadName(ILexLocation loc)
{
return new LexNameToken(loc.getModule(), "thread", loc);
LexNameToken thread = new LexNameToken(loc.getModule(), "thread", loc);
thread.setTypeQualifier(new Vector<PType>());
return thread;
}

public LexNameToken getPerName(ILexLocation loc)
Expand Down
4 changes: 4 additions & 0 deletions core/ast/src/main/java/org/overture/ast/lex/VDMToken.java
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,8 @@ public enum VDMToken implements Serializable
case VDM_RT:
rttokens.put(token.keyword, token);
break;
default:
break;
}
}
}
Expand Down Expand Up @@ -290,6 +292,8 @@ public static VDMToken lookup(String word, Dialect dialect)

case VDM_RT:
return rttokens.get(word);
default:
break;
}

return null;
Expand Down
23 changes: 23 additions & 0 deletions core/ast/src/main/java/org/overture/ast/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

import org.overture.ast.expressions.AElseIfExp;
import org.overture.ast.expressions.PExp;
import org.overture.ast.intf.lex.ILexNameToken;

public class Utils
{
Expand Down Expand Up @@ -133,4 +134,26 @@ public static String ifToString(PExp ifExp, PExp thenExp,

return sb.toString();
}

public static String recNameToString(ILexNameToken name)
{
String fullRecName;

// Flat specifications have blank module names
if(name.getModule().length() == 0)
{
fullRecName = "DEFAULT";
}
else
{
fullRecName = name.getModule();
}

fullRecName += "`";
fullRecName += name.getName();

return fullRecName;
}


}
2 changes: 1 addition & 1 deletion core/ast/src/main/resources/overtureII.astv2.tostring
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ import org.overture.ast.util.ToStringUtil;
%type->class =[classdef]$.getName().getName()$
%type->function = "(" + $($ [parameters]$.isEmpty() ? "()" : Utils.listToString($[parameters]$, " * ")) + ($[partial]$ ? " -> " : " +> ")$ + [result] + ")"
%type->#invariant->named = [name]
%type->#invariant->record = [name]
%type->#invariant->record = ""+$Utils.recNameToString($[name]$)$
//map
%type->#Map->inMap="inmap (" [from] ") to (" [to] ")"
%type->#Map->map="map (" [from] ") to (" [to] ")"
Expand Down
Loading

0 comments on commit be29106

Please sign in to comment.