root/trunk/ProjectFortress/not_passing_yet/conditionalExtension.fss

Revision 3550, 1.7 KB (checked in by sukyoungryu, 9 months ago)

[copyright] Fixed the copyright notices.

Line 
1(*******************************************************************************
2    Copyright 2009 Sun Microsystems, Inc.,
3    4150 Network Circle, Santa Clara, California 95054, U.S.A.
4    All rights reserved.
5
6    U.S. Government Rights - Commercial software.
7    Government users are subject to the Sun Microsystems, Inc. standard
8    license agreement and applicable provisions of the FAR and its supplements.
9
10    Use is subject to license terms.
11
12    This distribution may include materials developed by third parties.
13
14    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 ******************************************************************************)
17
18component conditionalExtension
19
20export Executable
21
22trait PartialOrderAndBoundedLattice[\T, opr LEOPR, opr MINOPR, opr MAXOPR\] end
23trait Identity[\opr PLUS\] end
24
25trait RationalQuantity[\unit U absorbs unit, bool ninf, bool lt, bool eq,
26                        bool gt, bool pinf, bool nan\]
27    extends {
28      RationalQuantity[\U, ninf', lt', eq', gt', pinf', nan'\]
29              where [\bool ninf', bool lt', bool eq', bool gt', bool pinf',
30                      bool nan' \]
31                    { ninf IMPLIES ninf', lt IMPLIES lt',
32                      eq IMPLIES eq', gt IMPLIES gt', pinf IMPLIES pinf',
33                      nan IMPLIES nan'
34                    },
35              PartialOrderAndBoundedLattice[\RationalQuantity[\U, ninf, lt, eq, gt, pinf, nan\], <=, MIN, MAX\]
36              where { ninf AND pinf AND NOT nan }
37            }
38    where { ninf OR lt OR eq OR gt OR pinf OR nan }
39  coerce(x: Identity[\+\]) = 0
40end
41
42run() = println "Conditional extension with where clauses can be parsed."
43
44end
Note: See TracBrowser for help on using the browser.