-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2,056 changed files
with
14,476 additions
and
3,786 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,5 +31,5 @@ | |
|
||
public enum Pass implements Serializable | ||
{ | ||
TYPES, VALUES, DEFS | ||
TYPES, VALUES, DEFS, FINAL | ||
} |
This file was deleted.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
core/codegen-runtime/src/main/java/org/overture/codegen/runtime/VDMUtil.java
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
37 changes: 37 additions & 0 deletions
37
core/codegen/cgisa/src/main/java/org/overturetool/cgisa/ExtIrGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} | ||
} |
Oops, something went wrong.