-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathUsingNumericConstants.sadl
More file actions
37 lines (26 loc) · 1.13 KB
/
Copy pathUsingNumericConstants.sadl
File metadata and controls
37 lines (26 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
uri "http://sadl.org/UsingNumericConstants.sadl" alias UsingNumericConstants.
Foo is a class described by fprop with values of type decimal.
MyFoo is a Foo with fprop PI.
// MyFoo2 is a Foo with fprop PI * -1 . // this should not work--it involves a computation
MyFoo3 is a Foo with fprop -PI. // grammar error: this should work just like the negative number below
MyFoo4 is a Foo with fprop 3.14.
MyFoo5 is a Foo with fprop -3.14.
MyFoo5 is a Foo with fprop e.
MyFoo5 has fprop -e. // this should work
Test: fprop of MyFoo3 is PI.
Test: fprop of MyFoo3 is -PI.
Test: fprop of MyFoo3 is not PI.
Test: fprop of MyFoo3 is known.
Test: fprop of MyFoo3 is not known.
Test: fprop of MyFoo3 is e.
Test: fprop of MyFoo3 is -e.
Test: MyFoo3 has fprop PI.
Test: MyFoo3 has fprop -PI.
Test: MyFoo3 has fprop not PI. // grammar error
Test: MyFoo3 has fprop known.
Test: MyFoo3 has fprop not known. // grammar error
Test: MyFoo3 has fprop e.
Test: MyFoo3 has fprop -e.
Test: MyFoo3 has fprop not e. // grammar error
Test: MyFoo3 has fprop not (-e). // grammar error
// Expr: not -e.