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
1 parent
70d8b10
commit 6775b9e
Showing
20 changed files
with
247 additions
and
37 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
include "java.lang" | ||
|
||
keyword = "subtype|base|characteristic|common", | ||
"ensureType|ensureCompatibility|char|as|typeof|def|override|dispatch" | ||
"ensureType|ensureCompatibility|char|as|typeof|def|override|dispatch", | ||
"typesystem|ecore|file|language|package|section|javacode|clone|feature|ancestor" |
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 @@ | ||
typeof AttributeRef -> feature attr |
5 changes: 5 additions & 0 deletions
5
EclipseDayFlorence-presentation/listings/xts-attributeref.ts.tex
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,5 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textbf{\textcolor{Plum}{typeof}}\ AttributeRef\ -$>$\ \textbf{\textcolor{Plum}{feature}}\ attr | ||
\end{tabular} |
6 changes: 6 additions & 0 deletions
6
EclipseDayFlorence-presentation/listings/xts-characteristics.ts
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,6 @@ | ||
characteristic COMPARABLE { | ||
IntType, FloatType, BooleanType, StringType | ||
} | ||
characteristic NUMERIC { | ||
IntType, FloatType | ||
} |
10 changes: 10 additions & 0 deletions
10
EclipseDayFlorence-presentation/listings/xts-characteristics.ts.tex
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,10 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textbf{\textcolor{Plum}{characteristic}}\ COMPARABLE\ \{ \\ | ||
\mbox{}\ \ \ \ IntType,\ FloatType,\ BooleanType,\ StringType \\ | ||
\mbox{}\}\ \ \\ | ||
\mbox{}\textbf{\textcolor{Plum}{characteristic}}\ NUMERIC\ \{ \\ | ||
\mbox{}\ \ \ \ IntType,\ FloatType \\ | ||
\mbox{}\}\ | ||
\end{tabular} |
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,4 @@ | ||
section "Literals" | ||
typeof StringLiteral -> StringType | ||
typeof BooleanLiteral -> BooleanType | ||
typeof NumberLiteral -> javacode |
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,8 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textbf{\textcolor{Plum}{section}}\ \textcolor{RoyalBlue}{"{}Literals"{}} \\ | ||
\mbox{}\ \ \ \ \ \ \textbf{\textcolor{Plum}{typeof}}\ StringLiteral\ -$>$\ StringType \\ | ||
\mbox{}\ \ \ \ \ \ \textbf{\textcolor{Plum}{typeof}}\ BooleanLiteral\ -$>$\ BooleanType \\ | ||
\mbox{}\ \ \ \ \ \ \textbf{\textcolor{Plum}{typeof}}\ NumberLiteral\ -$>$\ \textbf{\textcolor{Plum}{javacode}} | ||
\end{tabular} |
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,3 @@ | ||
typesystem org.typesys.xts.guidsl.typesys.GuiDlsTypesystem | ||
ecore file "platform:/.../GuiDsl.ecore" | ||
language package org.typesys.xts.guidsl.guiDsl.GuiDslPackage |
8 changes: 8 additions & 0 deletions
8
EclipseDayFlorence-presentation/listings/xts-settingup.ts.tex
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,8 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textbf{\textcolor{Plum}{typesystem}}\ org.typesys.xts.guidsl.typesys.GuiDlsTypesystem\ \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ecore}}\ \textbf{\textcolor{Plum}{file}}\ \textcolor{RoyalBlue}{"{}platform:/.../GuiDsl.ecore"{}} \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{language}}\ \textbf{\textcolor{Plum}{package}}\ org.typesys.xts.guidsl.guiDsl.GuiDslPackage\ \\ | ||
\mbox{} | ||
\end{tabular} |
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,3 @@ | ||
section "Types" | ||
typeof Type+ -> clone | ||
subtype IntType base FloatType |
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,7 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textbf{\textcolor{Plum}{section}}\ \textcolor{RoyalBlue}{"{}Types"{}} \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{typeof}}\ Type+\ -$>$\ \textbf{\textcolor{Plum}{clone}} \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{subtype}}\ IntType\ \textbf{\textcolor{Plum}{base}}\ FloatType | ||
\end{tabular} |
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,10 @@ | ||
typeof Comparison -> BooleanType { | ||
ensureType left :<=: char(COMPARABLE) | ||
ensureType right :<=: char(COMPARABLE) | ||
ensureCompatibility left :<=>: right | ||
} | ||
typeof Minus -> common left right { | ||
ensureType left :<=: char(NUMERIC) | ||
ensureType right :<=: char(NUMERIC) | ||
ensureCompatibility left :<=>: right | ||
} |
14 changes: 14 additions & 0 deletions
14
EclipseDayFlorence-presentation/listings/xts-types2.ts.tex
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,14 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textbf{\textcolor{Plum}{typeof}}\ Comparison\ -$>$\ BooleanType\ \{ \\ | ||
\mbox{}\ \ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ left\ :$<$=:\ \textbf{\textcolor{Plum}{char}}(COMPARABLE) \\ | ||
\mbox{}\ \ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ right\ :$<$=:\ \textbf{\textcolor{Plum}{char}}(COMPARABLE) \\ | ||
\mbox{}\ \ \ \ \ \textbf{\textcolor{Plum}{ensureCompatibility}}\ left\ :$<$=$>$:\ right \\ | ||
\mbox{}\} \\ | ||
\mbox{}\textbf{\textcolor{Plum}{typeof}}\ Minus\ -$>$\ \textbf{\textcolor{Plum}{common}}\ left\ right\ \{ \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ left\ :$<$=:\ \textbf{\textcolor{Plum}{char}}(NUMERIC) \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ right\ :$<$=:\ \textbf{\textcolor{Plum}{char}}(NUMERIC) \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureCompatibility}}\ left\ :$<$=$>$:\ right \\ | ||
\mbox{}\} | ||
\end{tabular} |
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,12 @@ | ||
// text widgets may only refer to non-boolean attributes | ||
typeof TextWidget -> feature attr { | ||
ensureType length :<=: IntType | ||
ensureType attr :<=: StringType, IntType, FloatType | ||
ensureType validate :<=: BooleanType | ||
} | ||
|
||
// checkbox widgets may only refer to boolean attributes | ||
typeof CheckBoxWidget -> feature attr { | ||
ensureType attr :<=: BooleanType | ||
ensureType validate :<=: BooleanType | ||
} |
16 changes: 16 additions & 0 deletions
16
EclipseDayFlorence-presentation/listings/xts-types3.ts.tex
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,16 @@ | ||
% Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite | ||
\begin{tabular}[t]{l} | ||
\noindent | ||
\mbox{}\textcolor{Green}{//\ text\ widgets\ may\ only\ refer\ to\ non-boolean\ attributes\ } \\ | ||
\mbox{}\textbf{\textcolor{Plum}{typeof}}\ TextWidget\ -$>$\ \textbf{\textcolor{Plum}{feature}}\ attr\ \{ \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ length\ :$<$=:\ IntType \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ attr\ :$<$=:\ StringType,\ IntType,\ FloatType \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ validate\ :$<$=:\ BooleanType \\ | ||
\mbox{}\}\ \ \\ | ||
\mbox{} \\ | ||
\mbox{}\textcolor{Green}{//\ checkbox\ widgets\ may\ only\ refer\ to\ boolean\ attributes} \\ | ||
\mbox{}\textbf{\textcolor{Plum}{typeof}}\ CheckBoxWidget\ -$>$\ \textbf{\textcolor{Plum}{feature}}\ attr\ \{ \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ attr\ :$<$=:\ BooleanType \\ | ||
\mbox{}\ \ \ \ \textbf{\textcolor{Plum}{ensureType}}\ validate\ :$<$=:\ BooleanType \\ | ||
\mbox{}\} | ||
\end{tabular} |
23 changes: 23 additions & 0 deletions
23
...orence-presentation/src-gen/org/typesys/xts/guidsl/typesys/GuiDlsTypesystemGenerated.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,23 @@ | ||
package org.typesys.xts.guidsl.typesys; | ||
|
||
import org.eclipse.emf.ecore.EObject; | ||
import de.itemis.xtext.typesystem.exceptions.TypesystemConfigurationException; | ||
import de.itemis.xtext.typesystem.trace.TypeCalculationTrace; | ||
import de.itemis.xtext.typesystem.characteristics.TypeCharacteristic; | ||
|
||
public class GuiDlsTypesystemGenerated extends de.itemis.xtext.typesystem.DefaultTypesystem { | ||
|
||
protected org.typesys.xts.guidsl.guiDsl.GuiDslPackage p = org.typesys.xts.guidsl.guiDsl.GuiDslPackage.eINSTANCE; | ||
|
||
|
||
protected void initialize() { | ||
|
||
try { | ||
|
||
} catch ( TypesystemConfigurationException ex ) { | ||
ex.printStackTrace(); | ||
} | ||
} | ||
|
||
|
||
} |
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