Skip to content

Commit

Permalink
Merge branch 'release'
Browse files Browse the repository at this point in the history
  • Loading branch information
ldcouto committed Mar 30, 2015
2 parents ea20802 + 43bef23 commit 5674f11
Show file tree
Hide file tree
Showing 2,056 changed files with 14,476 additions and 3,786 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ Before you download and try to use the code provided in this open-source reposit

This directory contains several subdirectories:

* The core Overture libraries are found in `code`, and are pure Java with no Eclipse dependencies
* The Overture IDE, based on Eclipse, are found in `ide`
* Documentation for VDM and Overture is in `documentation`
* Auxiliary code that supports the build process are found in `tools`
* The core Overture libraries are found in `core`, and are pure Java with no Eclipse dependencies
* The Overture IDE, based on Eclipse, is found in `ide`
* Technical Documentation for Overture is in `documentation`
* Auxiliary code that supports the build process is found in `tools`



Expand Down
2 changes: 1 addition & 1 deletion 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.2.2</version>
<version>2.2.4</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,115 +52,7 @@ public LexNameList getAllVariableNames(PPattern pattern)
return null;
}
}

// FIXME Delete commented code
// public static LexNameList getAllVariableNames(AConcatenationPattern pattern)
// throws InvocationAssistantException
// {
// LexNameList list = new LexNameList();
//
// list.addAll(PPatternAssistant.getAllVariableNames(pattern.getLeft()));
// list.addAll(PPatternAssistant.getAllVariableNames(pattern.getRight()));
//
// return list;
// }
//
// public static LexNameList getAllVariableNames(AIdentifierPattern pattern)
// {
// LexNameList list = new LexNameList();
// list.add(pattern.getName());
// return list;
// }
//
// public static LexNameList getAllVariableNames(ARecordPattern pattern)
// throws InvocationAssistantException
// {
// LexNameList list = new LexNameList();
//
// for (PPattern p : pattern.getPlist())
// {
// list.addAll(PPatternAssistant.getAllVariableNames(p));
// }
//
// return list;
//
// }
//
// public static LexNameList getAllVariableNames(ASeqPattern pattern)
// throws InvocationAssistantException
// {
// LexNameList list = new LexNameList();
//
// for (PPattern p : pattern.getPlist())
// {
// list.addAll(PPatternAssistant.getAllVariableNames(p));
// }
//
// return list;
// }
//
// public static LexNameList getAllVariableNames(ASetPattern pattern)
// throws InvocationAssistantException
// {
// LexNameList list = new LexNameList();
//
// for (PPattern p : pattern.getPlist())
// {
// list.addAll(PPatternAssistant.getAllVariableNames(p));
// }
//
// return list;
// }
//
// public static LexNameList getAllVariableNames(ATuplePattern pattern)
// throws InvocationAssistantException
// {
// LexNameList list = new LexNameList();
//
// for (PPattern p : pattern.getPlist())
// {
// list.addAll(PPatternAssistant.getAllVariableNames(p));
// }
//
// return list;
// }
//
// public static LexNameList getAllVariableNames(AUnionPattern pattern)
// throws InvocationAssistantException
// {
// LexNameList list = new LexNameList();
//
// list.addAll(PPatternAssistant.getAllVariableNames(pattern.getLeft()));
// list.addAll(PPatternAssistant.getAllVariableNames(pattern.getRight()));
//
// return list;
// }
//
// /**
// * This method should only be called by subclasses of PPattern. For other classes call
// * {@link PPatternAssistant#getVariableNames(PPattern)}.
// *
// * @param pattern
// * @return
// * @throws InvocationAssistantException
// */
// public static LexNameList getAllVariableNames(PPattern pattern)
// throws InvocationAssistantException
// {
// try
// {
// return (LexNameList) invokePreciseMethod(af.createPPatternAssistant(), "getAllVariableNames", pattern);
// } catch (InvocationAssistantNotFoundException ianfe)
// {
// /*
// * Default case is to return a new LexNameList, which corresponds to a InvocationAssistantException with no
// * embedded cause. However, if there is an embedded cause in the exception, then it's something more complex
// * than not being able to find a specific method, so we just re-throw that.
// */
// return new LexNameList();
// }
// }


public LexNameList getVariableNames(PPattern pattern)
{
return af.createPPatternAssistant().getVariableNamesBaseCase(pattern);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@

public enum Pass implements Serializable
{
TYPES, VALUES, DEFS
TYPES, VALUES, DEFS, FINAL
}
31 changes: 0 additions & 31 deletions core/codegen-runtime/pom.xml

This file was deleted.

This file was deleted.

8 changes: 0 additions & 8 deletions core/codegen/.gitignore

This file was deleted.

15 changes: 15 additions & 0 deletions core/codegen/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Code Generation
- **Primary Contacts:**
Peter Würtz Vinther Tran-Jørgensen
- **Status:**
Production

## Description:


## Known Issues:


## Contributors:


132 changes: 132 additions & 0 deletions core/codegen/cgisa/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.overturetool.core</groupId>
<artifactId>codegen</artifactId>
<version>2.2.3-SNAPSHOT<!--Replaceable: Main Version--></version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>org.overturetool.core.codegen</groupId>
<artifactId>cgisa</artifactId>
<name>The VDM to Isabelle Translator</name>

<dependencies>
<dependency>
<groupId>org.overturetool.core</groupId>
<artifactId>ast</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.overturetool.core.codegen</groupId>
<artifactId>javagen</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.overturetool.core.testing</groupId>
<artifactId>framework</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- the tests use std out a lot so we dont want that in the console -->
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<includes>
<include>**/*Test.java</include>
<include>**/*Test?.java</include>
<include>**/*TestSuite.java</include>
</includes>
</configuration>
</plugin>

<plugin>
<groupId>org.overturetool.astcreator</groupId>
<artifactId>astcreator-plugin</artifactId>
<version>${astcreator.version}</version>
<executions>
<execution>
<id>generate-ast</id>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<ast>cg.astv2</ast>
<extendedAst>isacg.ast</extendedAst>
<extendedName>Isa</extendedName>
<extendedTreeOnly>true</extendedTreeOnly>
<useSrcOutput>false</useSrcOutput>

<extendedAstGroupId>org.overturetool.core</extendedAstGroupId>
<extendedAstArtifactId>codegen</extendedAstArtifactId>
</configuration>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/generated-sources/astCreator/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>

<pluginManagement>
<plugins>
<!--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>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>

</build>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
package org.overturetool.cgisa;

import java.util.HashSet;

import org.overture.codegen.ir.IRClassDeclStatus;
import org.overture.codegen.ir.IRGenerator;
import org.overture.codegen.ir.IrNodeInfo;
import org.overture.codegen.logging.ILogger;
import org.overturetool.cgisa.ir.ExtIrClassDeclStatus;

public class ExtIrGenerator extends IRGenerator
{

public ExtIrGenerator(ILogger log, String objectInitCallPrefix)
{
super(log, objectInitCallPrefix);
}

@Override
public void applyTransformation(IRClassDeclStatus status,
org.overture.codegen.cgast.analysis.intf.IAnalysis transformation)
throws org.overture.codegen.cgast.analysis.AnalysisException
{
codeGenInfo.clearTransformationWarnings();

if (status instanceof ExtIrClassDeclStatus)
{
((ExtIrClassDeclStatus) status).getEClassCg().apply(transformation);
} else
{
status.getClassCg().apply(transformation);
}
HashSet<IrNodeInfo> transformationWarnings = new HashSet<IrNodeInfo>(codeGenInfo.getTransformationWarnings());

status.addTransformationWarnings(transformationWarnings);
}
}
Loading

0 comments on commit 5674f11

Please sign in to comment.