Skip to content

Commit 313b68c

Browse files
committed
Merge commit '0b6e00c52ae54a2c33f02a42318ab691bdc3f92f'
2 parents 1870fe9 + 0b6e00c commit 313b68c

File tree

183 files changed

+261709
-233425
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

183 files changed

+261709
-233425
lines changed

.project

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>Alf-Reference-Implementation</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
</buildSpec>
9+
<natures>
10+
</natures>
11+
</projectDescription>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<classpath>
3-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
43
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
54
<classpathentry kind="src" path="src"/>
5+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
66
<classpathentry kind="output" path="bin"/>
77
</classpath>

org.modeldriven.alf.eclipse.papyrus/.settings/org.eclipse.core.resources.prefs

Lines changed: 0 additions & 2 deletions
This file was deleted.

org.modeldriven.alf.eclipse.papyrus/Libraries/alf/Alf/Library/PrimitiveBehaviors.alf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package PrimitiveBehaviors {
66

77
public package BooleanFunctions;
88
public package IntegerFunctions;
9+
public package RealFunctions;
910
public package StringFunctions;
1011
public package UnlimitedNaturalFunctions;
1112

org.modeldriven.alf.eclipse.papyrus/Libraries/alf/Alf/Library/PrimitiveBehaviors/IntegerFunctions.alf

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,15 @@ public import FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::To
1616
public import FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::ToUnlimitedNatural;
1717
public import FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::ToInteger;
1818

19+
private import FoundationalModelLibrary::PrimitiveBehaviors::IntegerFunctions::'/' as Divide;
20+
1921
package IntegerFunctions {
2022

21-
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.integerfunctions.IntegerToNaturalFunctionBehaviorExecution")
23+
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.integerfunctions.ToNatural")
2224
public activity ToNatural(in x: String): Integer[0..1] {}
2325

26+
public activity ToReal(in x: Integer): Real {
27+
return Divide(x, 1);
28+
}
29+
2430
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
namespace Alf::Library::PrimitiveBehaviors;
2+
public import FoundationalModelLibrary::PrimitiveBehaviors::RealFunctions::*;
3+
4+
package RealFunctions {
5+
}

org.modeldriven.alf.eclipse.papyrus/Libraries/alf/FoundationalModelLibrary/PrimitiveBehaviors.alf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package PrimitiveBehaviors {
66

77
public package BooleanFunctions;
88
public package IntegerFunctions;
9+
public package RealFunctions;
910
public package StringFunctions;
1011
public package UnlimitedNaturalFunctions;
1112
public package ListFunctions;

org.modeldriven.alf.eclipse.papyrus/Libraries/alf/FoundationalModelLibrary/PrimitiveBehaviors/IntegerFunctions.alf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ package IntegerFunctions {
2020
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Div")
2121
public activity Div(in x: Integer, in y: Integer): Integer[0..1] { }
2222

23+
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.integerfunctions.Divide")
24+
public activity '/'(in x: Integer, in y: Integer): Real[0..1] { }
25+
2326
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.integer.Mod")
2427
public activity Mod(in x: Integer, in y: Integer): Integer { }
2528

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
namespace FoundationalModelLibrary::PrimitiveBehaviors;
2+
3+
package RealFunctions {
4+
5+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Neg")
6+
public activity Neg(in x: Real): Real { }
7+
8+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Abs")
9+
public activity Abs(in x: Real): Real { }
10+
11+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Inv")
12+
public activity Inv(in x: Real): Real { }
13+
14+
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.realfunctions.Floor")
15+
public activity Floor(in x: Real): Integer { }
16+
17+
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.realfunctions.Round")
18+
public activity Round(in x: Real): Integer { }
19+
20+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Add")
21+
public activity '+'(in x: Real, in y: Real): Real { }
22+
23+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Minus")
24+
public activity '-'(in x: Real, in y: Real): Real { }
25+
26+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Times")
27+
public activity '*'(in x: Real, in y: Real): Real { }
28+
29+
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.realfunctions.Divide")
30+
public activity '/'(in x: Real, in y: Real): Real[0..1] { }
31+
32+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Max")
33+
public activity Max(in x: Real, in y: Real): Real { }
34+
35+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Min")
36+
public activity Min(in x: Real, in y: Real): Real { }
37+
38+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Lower")
39+
public activity '<'(in x: Real, in y: Real): Boolean { }
40+
41+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.Greater")
42+
public activity '>'(in x: Real, in y: Real): Boolean { }
43+
44+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.LowerOrEqual")
45+
public activity '<='(in x: Real, in y: Real): Boolean { }
46+
47+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.GreaterOrEqual")
48+
public activity '>='(in x: Real, in y: Real): Boolean { }
49+
50+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.ToString")
51+
public activity ToString(in x: Real): String {}
52+
53+
@primitive(implementation=>"org.modeldriven.alf.eclipse.papyrus.library.realfunctions.ToInteger")
54+
public activity ToInteger(in x: Real): Integer {}
55+
56+
@primitive(implementation=>"org.eclipse.papyrus.moka.fuml.standardlibrary.library.real.ToReal")
57+
public activity ToReal(in x: String): Real[0..1] {}
58+
59+
}

org.modeldriven.alf.eclipse.papyrus/Libraries/alf/PrimitiveTypes.alf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package PrimitiveTypes {
33

44
@primitive public datatype Boolean {}
55
@primitive public datatype Integer {}
6+
@primitive public datatype Real {}
67
@primitive public datatype String {}
78
@primitive public datatype UnlimitedNatural {}
89

0 commit comments

Comments
 (0)