Project Fortress
https://blogs.oracle.com/projectfortress/
Simple parallelism, beautiful codeen-usCopyright 2013Thu, 28 Nov 2013 09:54:25 +0000Apache Roller BLOGS401ORA6 (20130904125427)https://blogs.oracle.com/projectfortress/entry/fortress_wrapping_upFortress Wrapping Upgls
https://blogs.oracle.com/projectfortress/entry/fortress_wrapping_up
Fri, 20 Jul 2012 19:25:45 +0000Oracle<p>
After working nearly a decade on the design, development, and
implementation of the Fortress programming language, the Oracle Labs
Programming Language Research Group is now winding down the Fortress
project. Ten years is a remarkably long run for an industrial research
project (one to three years is much more typical), but we feel that our
extended effort has been worthwhile. Many aspects of the Fortress
design were novel, and we learned a great deal from building an
interpreter and an initial set of libraries. Nevertheless, over the
last few years, as we have focused on implementing a compiler targeted
to the Java Virtual Machine, we encountered some severe technical
challenges having to do with the mismatch between the (rather
ambitious) Fortress type system and a virtual machine not designed to
support it (that would be every currently available VM, not just JVM).
In addressing these challenges, we learned a lot about the implications
of the Fortress type system for the implementation of symmetric
multimethod dispatch, and have concluded that we are now unlikely to
learn more (in a research sense) from completing the implementation of
Fortress for JVM. We also note that, over the last ten years, other
languages (Chapel, X10, Clojure, and Scala, among others) have explored
some of the same issues that Fortress has addressed, and we have very
much enjoyed conversations, collaboration, and friendly competition
with those who have explored these ideas in alternative contexts.
</p>
<p>
The Fortress source code remains open-source, and the code repository
will remain available for the foreseeable future to those who wish to
work on it. The Programming Language Research Group will continue to
respond to inquiries about Fortress (and requests for minor bug fixes
as we can). We not do not plan to cease work on Fortress suddenly,
but will spend the next few months getting the code and language
specification into the best shape that we can. We also plan to write
several academic papers about various aspects of the Fortress design
and implementation technology. Going forward, we will look for
opportunities to apply lessons learned and to transfer
Fortress-related technology to other projects.
</p>
<p>
We thank everyone who has expressed an interest in or support for
Fortress, especially DARPA (which funded in part some of the early
work as part of its High Productivity Computing Program) and its HPCS
review committees; former Programming Language Research Group team
members and the many interns who contributed to the design and
implementation effort; the management of Sun Microsystems Laboratories
and Oracle Labs; and those who became part of the open-source effort,
downloading the implementation, trying it out, and asking questions
that kept us on our toes.
</p>
<p>
Here are some of the aspects of Fortress with which we are quite
pleased, with commentary:
</p>
<dl> <dt> <b>Generators and reducers</b> </dt><dd>
This has turned out to be a powerful way to organize collections
classes and their use. It is related to the idea of "map-reduce"
but is a bit more general. Moreover, comprehension and "big
operator" syntax allows programmers to write code that sometimes
focuses on a single instance rather than having to adopt the
always-global point of view required by the use of higher-order
operators such as map and reduce; this is often a useful stylistic
alternative.
<p> </p></dd><dt> <b>Implicit parallelism supported by work-stealing</b> </dt><dd>
We have found work-stealing to be an effective implementation
mechanism for parallelism on shared-memory processor clusters, and
especially for a style of programming in which the compiler can
implicitly extract parallelism because function arguments and tuple
elements are by definition assumed to be computationally
independent.
<p> </p></dd><dt> <b>Nested atomic blocks supported by transactional memory</b> </dt><dd>
We believe that this is a powerful and expressive alternative
to locks for expressing synchronization among threads in a
shared-memory environment.
<p> </p></dd><dt> <b>Parametrically polymorphic types that are not erased</b> </dt><dd>
There are advantages (we're talking performance here, not just
aesthetics) to being able to inquire, dynamically and cheaply,
what is the element type of a collection in order to select an
appropriate implementation.
<p> </p></dd><dt> <b>Symmetric multimethod dispatch and parametrically polymorphic methods</b> </dt><dd>
Avoiding the need for the "visitor pattern" makes code more flexible
and easier to extend; moreover, delegating dynamic dispatch on
arguments other than the receiver object to the runtime allows
greater opportunity for dynamic code optimization (an area that
deserves further exploration). We made excellent headway on
elucidating the interactions of this feature with polymorphic types
and polymorphic methods.
<p> </p></dd><dt> <b>Multiple inheritance, inheritance symmetry, and type exclusion</b> </dt><dd>
Like most modern object-oriented programming languages, Fortress
supports multiple inheritance among object types. Unlike most other
object-oriented programming languages, in Fortress inheritance is
completely symmetric. This led to a need for the programmer
sometimes to indicate explicitly when two types are intended to be
disjoint (that is, no object can belong to both), and constitutes an
interesting and unusual aspect of the Fortress type system.
<p> </p></dd><dt> <b>Mathematical syntax</b> </dt><dd>
The idea of "typesetting" the code using LaTeX has received mixed
reviews, and many potential users find the issue of keyboarding the
extended Unicode character set daunting. Nevertheless, even in its
more verbose ASCII form, the syntax of Fortress, especially the
notion of treating juxtaposition as a user-definable operation, has
proved to be very convenient.
<p> </p></dd><dt> <b>Components and APIs</b> </dt><dd>
The Fortress component/API system allows control over namespaces in
an unusually fine-grained manner; in particular, we figured out how
to allow exporting only part of a set of overloaded functions or
methods while correctly maintaining their execution semantics and
supporting separate compilation.
<p> </p></dd></dl>
Here are some aspects we wish we had been able to explore further
(and may yet, in some future project):
<dl> <dt> <b>Dimensions and units</b> </dt><dd>
We designed a way to write such expressions as "2 meters per second"
and "15.7 kg" and have them fit smoothly into the rest of the type
system and mathematical syntax—still a good idea that has yet to
reach fruition.
<p> </p></dd><dt> <b>Explicit descriptions of data distribution and processor assignment</b> </dt><dd>
Parallel programming languages still lack a good way to represent
complex hierarchical hardware resources so as to allow programs to
depend parametrically on these resources in even a moderately
portable fashion. We had a paper design for this but did no
implementation work.
<p> </p></dd><dt> <b>Conditional inheritance and conditional method definition</b> </dt><dd>
We wanted to express such ideas as "a list of elements of type T
implements a (lexicographic) total order provided that T implements
a total order" and "the binary OPLUS operator applies element-wise to
vectors provided that OPLUS is a binary operator on the vector
elements, and moreover vector OPLUS is associative (or commutative)
provided the OPLUS on the elements is associative (or commutative)".
We designed "conditional 'where' clauses" as a notation for
expressing such ideas, but never got to implementing them.
<p> </p></dd></dl>
There is much work yet to be done in designing and implementing
programming languages, and we believe that many of the ideas mentioned
above will be important, in some form, in future language designs.
<p>
We thank you for YOUR interest in Fortress, and hope that you will be
similarly interested in our future efforts in other areas.
</p>
<p>
—Guy Steele, for the Oracle Labs Programming Language Research Group
</p>https://blogs.oracle.com/projectfortress/entry/more_arithmetic_operations_now_implementedMore arithmetic operations now implemented in compilergls
https://blogs.oracle.com/projectfortress/entry/more_arithmetic_operations_now_implemented
Fri, 22 Jul 2011 12:35:37 +0000Oracle<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js" type="text/javascript"></script>
<p> The Fortress compiler now implements some additional arithmetic operations. </p>
<p> For typ<span style="white-space: nowrap">e\(\mskip3mu\)</span> \(\newcommand\EXP[1]{#1}
\newcommand\KWD[1]{\mathrel{\mathtt{#1}}}
\newcommand\KWDVAR[1]{\mathord{\mathtt{#1}}}
\newcommand\OPR[1]{\mathbin{\mathtt{#1}}}
\newcommand\BIGOPR[1]{\mathop{\lower0.4ex\hbox{\vrule height 1.2em depth 0.1em width 0pt\Large$\mathtt{#1}$}}}
\newcommand\BIGOP[1]{\mathop{\lower0.2ex\hbox{\Large$#1$}}}
\newcommand\TYP[1]{\mathord{\mathrm{#1}}}
\newcommand\VAR[1]{\mathord{\mathit{#1}}}
\newcommand\STR[1]{\hbox{\tt\usefont{T1}{pcr}{m}{n}\selectfont#1}}
\newcommand\CONDEQ{\mathrel{\mathtt{:}}=\mathrel{\mathtt{:}}}
\newcommand\ASSIGN{\mathrel{\mathtt{:}}=}
\newcommand\COLON{\mathpunct{\mathtt{:}}}
\newcommand\COLONOP{\mathinner{\mathtt{:}}}
\newcommand\SHORTCUT[1]{\mathrel{\mathord{#1}\mathord{:}}}
\newcommand\twointersectand{\mathbin{\wedge\mskip-10mu\wedge}}
\newcommand\twointersector{\mathbin{\vee\mskip-10mu\vee}}
\newcommand\twointersectxor{\mathbin{\underline{\vee\mskip-10mu\vee}}}
\newcommand\twointersectnot{\mathbin{\neg\mskip-8mu\neg}}
\newcommand\verythin{{\mskip 1.5mu}}
\newcommand\ultrathin{{\mskip 0.75mu}}
\def\Vvert{\mathrel{\vert\mskip-1.5mu\vert\mskip-1.5mu\vert}}
\def\VVert{\mathrel{\vert\mskip-1.5mu\vert\mskip-1.5mu\vert\mskip-1.5mu\vert}}
\def\sequiv{\mathrel{\hbox{\raise0.215ex\hbox to 0pt{$\equiv$\hss}\lower0.215ex\hbox{$\equiv$}}}}
\newcommand\bigllbracket{\bigl[\mkern-5mu\bigl[}
\newcommand\bigrrbracket{\bigr]\mkern-5mu\bigr]}
\newcommand\Bigllbracket{\Bigl[\mkern-5.5mu\Bigl[}
\newcommand\Bigrrbracket{\Bigr]\mkern-5.5mu\Bigr]}
\newcommand\biggllbracket{\biggl[\mkern-6mu\biggl[}
\newcommand\biggrrbracket{\biggr]\mkern-6mu\biggr]}
\newcommand\Biggllbracket{\Biggl[\mkern-6.5mu\Biggl[}
\newcommand\Biggrrbracket{\Biggr]\mkern-6.5mu\Biggr]}
\newcommand\leftllbracket{\left[\mkern-5.5mu\left[}
\newcommand\rightrrbracket{\right]\mkern-5.5mu\right]}\EXP{\mathbb{Z}32}\mskip3mu\): </p>
<table>
<tr><td> </td>
<td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersectnot}(\KWDVAR{self})\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersectand}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}32)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersector}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}32)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersectxor}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}32)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MIN}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}32)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MAX}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}32)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MINMAX}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}32)\COLON (\mathbb{Z}32, \mathbb{Z}32)}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{even}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{odd}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
</table>
<p> The first four are bitwise NOT, AND, OR, and XOR operations.
\(\OPR{MINMAX}\mskip3mu\) returns a 2-tuple of its two arguments, sorted so that the
first element of the tuple is not larger than the second value. </p>
<p> For typ<span style="white-space: nowrap">e\(\mskip3mu\)</span> \(\EXP{\mathbb{Z}64}\mskip3mu\): </p>
<table>
<tr><td> </td>
<td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersectnot}(\KWDVAR{self})\COLON \mathbb{Z}64}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersectand}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}64)\COLON \mathbb{Z}64}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersector}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}64)\COLON \mathbb{Z}64}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\twointersectxor}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}64)\COLON \mathbb{Z}64}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MIN}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}64)\COLON \mathbb{Z}64}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MAX}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}64)\COLON \mathbb{Z}64}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MINMAX}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{Z}64)\COLON (\mathbb{Z}64, \mathbb{Z}64)}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{even}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{odd}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
</table>
<p> For typ<span style="white-space: nowrap">e\(\mskip3mu\)</span> \(\EXP{\mathbb{R}64}\mskip3mu\): </p>
<table>
<tr><td> </td>
<td>\(\mskip3mu\)\(\EXP{\KWD{getter} \VAR{isNaN}(\ultrathin)\COLON \TYP{Boolean} }\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MIN}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{R}64)\COLON \mathbb{R}64 }\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MAX}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{R}64)\COLON \mathbb{R}64 }\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MINNUM}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{R}64)\COLON \mathbb{R}64 }\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MAXNUM}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{R}64)\COLON \mathbb{R}64 }\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MINNUMMAX}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{R}64)\COLON (\mathbb{R}64, \mathbb{R}64) }\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{MINMAXNUM}}(\KWDVAR{self}, \VAR{other}\COLON\mathbb{R}64)\COLON (\mathbb{R}64, \mathbb{R}64) }\mskip3mu\)</td></tr>
</table>
<p> \(\OPR{MIN}\mskip3mu\) an<span style="white-space: nowrap">d\(\mskip3mu\)</span> \(\OPR{MAX}\mskip3mu\) return NaN is either argument is NaN;\(\mskip3mu\) \(\OPR{MINNUM}\mskip3mu\) an<span style="white-space: nowrap">d\(\mskip3mu\)</span> \(\OPR{MAXNUM}\mskip3mu\),
if either argument is NaN, return the other argument (and so the result is NaN
only if both arguments are NaN).\(\mskip3mu\) \(\OPR{MINNUMMAX}\mskip3mu\) an<span style="white-space: nowrap">d\(\mskip3mu\)</span> \(\OPR{MINMAXNUM}\mskip3mu\) both
return a 2-tuple of the two arguments, sorted so that the
first element of the tuple is not larger than the second value; but if one argument
is NaN and the other is some non-NaN valu<span style="white-space: nowrap">e\(\mskip1.5mu\)</span> \(\VAR{v}\mskip1.5mu\), the<span style="white-space: nowrap">n\(\mskip3mu\)</span> \(\OPR{MINNUMMAX}\mskip3mu\) return<span style="white-space: nowrap">s\(\mskip3mu\)</span> \(\EXP{(v,\TYP{NaN})}\mskip3mu\)
bu<span style="white-space: nowrap">t\(\mskip3mu\)</span> \(\OPR{MINMAXNUM}\mskip3mu\) return<span style="white-space: nowrap">s\(\mskip3mu\)</span> \(\EXP{(\TYP{NaN},v)}\mskip3mu\).
<p> For typ<span style="white-space: nowrap">e\(\mskip1.5mu\)</span> \(\TYP{String}\mskip1.5mu\): </p>
<table>
<tr><td> </td>
<td>\(\mskip3mu\)\(\EXP{\KWD{opr} \unicode{x5E}(\KWDVAR{self}, n\COLON \mathbb{Z}32)\COLON \TYP{String}}\mskip3mu\)</td></tr>
</table>
<p> (This last operation returns the concatenation o<span style="white-space: nowrap">f\(\mskip1.5mu\)</span> \(\VAR{n}\mskip1.5mu\) copies of the string.) </p>
<p> One can also make a character, given its codepoint, by usin<span style="white-space: nowrap">g\(\mskip1.5mu\)</span> \(\VAR{makeCharacter}\mskip1.5mu\): </p>
<table>
<tr><td> </td>
<td>\(\mskip3mu\)\(\EXP{\VAR{makeCharacter}(n\COLON \mathbb{Z}32)\COLON \TYP{Character}}\mskip3mu\)</td></tr>
</table>https://blogs.oracle.com/projectfortress/entry/character_data_type_now_implementedCharacter data type now implemented in compilergls
https://blogs.oracle.com/projectfortress/entry/character_data_type_now_implemented
Tue, 5 Jul 2011 14:11:15 +0000Oracle<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js" type="text/javascript"></script>
<p>
The Fortress compiler now correctly implements the character data type.
In the interpreter the name of this type wa<span style="white-space: nowrap">s\(\mskip1.5mu\)</span> \(\newcommand\EXP[1]{#1}
\newcommand\KWD[1]{\mathrel{\mathtt{#1}}}
\newcommand\KWDVAR[1]{\mathord{\mathtt{#1}}}
\newcommand\OPR[1]{\mathbin{\mathtt{#1}}}
\newcommand\BIGOPR[1]{\mathop{\lower0.4ex\hbox{\vrule height 1.2em depth 0.1em width 0pt\Large$\mathtt{#1}$}}}
\newcommand\BIGOP[1]{\mathop{\lower0.2ex\hbox{\Large$#1$}}}
\newcommand\TYP[1]{\mathord{\mathrm{#1}}}
\newcommand\VAR[1]{\mathord{\mathit{#1}}}
\newcommand\STR[1]{#1}
\newcommand\CONDEQ{\mathrel{\mathtt{:}}=\mathrel{\mathtt{:}}}
\newcommand\ASSIGN{\mathrel{\mathtt{:}}=}
\newcommand\COLON{\mathpunct{\mathtt{:}}}
\newcommand\COLONOP{\mathinner{\mathtt{:}}}
\newcommand\SHORTCUT[1]{\mathrel{\mathord{#1}\mathord{:}}}
\newcommand\verythin{{{\mskip 1.5mu}}}
\newcommand\ultrathin{{{\mskip 0.75mu}}}
\def\Vvert{\mathrel{\vert\mskip-1.5mu\vert\mskip-1.5mu\vert}}
\def\VVert{\mathrel{\vert\mskip-1.5mu\vert\mskip-1.5mu\vert\mskip-1.5mu\vert}}
\def\sequiv{\mathrel{\hbox{\raise0.215ex\hbox to 0pt{$\equiv$\hss}\lower0.215ex\hbox{$\equiv$}}}}
\newcommand\bigllbracket{\bigl[\mkern-5mu\bigl[}
\newcommand\bigrrbracket{\bigr]\mkern-5mu\bigr]}
\newcommand\Bigllbracket{\Bigl[\mkern-5.5mu\Bigl[}
\newcommand\Bigrrbracket{\Bigr]\mkern-5.5mu\Bigr]}
\newcommand\biggllbracket{\biggl[\mkern-6mu\biggl[}
\newcommand\biggrrbracket{\biggr]\mkern-6mu\biggr]}
\newcommand\Biggllbracket{\Biggl[\mkern-6.5mu\Biggl[}
\newcommand\Biggrrbracket{\Biggr]\mkern-6.5mu\Biggr]}
\newcommand\leftllbracket{\left[\mkern-5.5mu\left[}
\newcommand\rightrrbracket{\right]\mkern-5.5mu\right]}\TYP{Char}\mskip1.5mu\), but for the compiler,
in accordance with the original Fortress 1.0beta specification,
the name i<span style="white-space: nowrap">s\(\mskip1.5mu\)</span> \(\TYP{Character}\mskip1.5mu\). Instances of th<span style="white-space: nowrap">e\(\mskip1.5mu\)</span> \(\TYP{Character}\mskip1.5mu\) data type
are all Unicode codepoints from U+0000 to U+10FFFF, regardless of
whether they currently are (or will ever be) assigned to specific
characters. Internally they are represented using the Java <code>int</code> type.
</p>
<p>
Character literals are supported in three forms: single-character, named, and
hexadecimal. The single character form has either the actual Unicode character
or an escape sequence between the single quotes:\(\mskip3mu\) \(\EXP{\textrm{'}\mathtt{a}\textrm{'}}\mskip3mu\) o<span style="white-space: nowrap">r\(\mskip3mu\)</span> \(\EXP{\textrm{'}\mathtt{+}\textrm{'}}\mskip3mu\) o<span style="white-space: nowrap">r\(\mskip3mu\)</span> \(\EXP{\textrm{'}\oplus\textrm{'}}\mskip3mu\).
The named form has a name for the character between the single quotes:\(\mskip3mu\)
\(\EXP{\textrm{'}\mathtt{alpha}\textrm{'}}\mskip3mu\) o<span style="white-space: nowrap">r\(\mskip3mu\)</span> \(\EXP{\textrm{'}\mathtt{SIGMA}\textrm{'}}\mskip3mu\) o<span style="white-space: nowrap">r\(\mskip3mu\)</span> \(\EXP{\textrm{'}\mathtt{OPLUS}\textrm{'}}\mskip3mu\). Not all names are currently supported.
The hexadecimal form has four to six hexadecimal digits between the single quotes;
as an experiment that goes beyond the current specification, the digits may
optionally be preceded by "U+":\(\mskip3mu\) \(\EXP{\textrm{'}\mathtt{007C}\textrm{'}}\mskip3mu\) o<span style="white-space: nowrap">r\(\mskip3mu\)</span> \(\EXP{\textrm{'}\mathtt{1D164}\textrm{'}}\mskip3mu\) o<span style="white-space: nowrap">r\(\mskip3mu\)</span> \(\EXP{\textrm{'}\mathtt{U+1D164}\textrm{'}}\mskip3mu\).
</p>
<p>
The following methods of typ<span style="white-space: nowrap">e\(\mskip1.5mu\)</span> \(\TYP{Character}\mskip1.5mu\) are now implemented for compiled code:
</p>
<table>
<tr><td> </td><td>\(\mskip3mu\)\(\EXP{\KWD{getter} \VAR{asString}(\ultrathin)\COLON \TYP{String}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{getter} \VAR{asExprString}(\ultrathin)\COLON \TYP{String}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{getter} \VAR{codePoint}(\ultrathin)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{<}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\leq}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{>}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\geq}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{=}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\neq}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{LNSIM}}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{LESSSIM}}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{GNSIM}}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\OPR{GTRSIM}}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\simeq}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\KWD{opr}\, \mathord{\not\simeq}(\KWDVAR{self}, \VAR{other}\COLON\TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{getDirectionality}(\KWDVAR{self})\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{getNumericValue}(\KWDVAR{self})\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{getType}(\KWDVAR{self})\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isDefined}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isDigit}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isFortressIdentifierPart}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isFortressIdentifierStart}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isHighSurrogate}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isIdentifierIgnorable}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isISOControl}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isJavaIdentifierPart}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isJavaIdentifierStart}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isLetter}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isLetterOrDigit}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isLowerCase}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isLowSurrogate}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isMirrored}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isSpaceChar}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isSupplementaryCodePoint}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isSurrogatePair}(\KWDVAR{self}, \VAR{low}\COLON \TYP{Character})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isTitleCase}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isUnicodeIdentifierPart}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isUnicodeIdentifierStart}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isUpperCase}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isValidCodePoint}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{isWhitespace}(\KWDVAR{self})\COLON \TYP{Boolean}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{javaDigit}(\KWDVAR{self}, \VAR{radix}\COLON \mathbb{Z}32)\COLON \mathbb{Z}32}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{toLowerCase}(\KWDVAR{self})\COLON \TYP{Character}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{toTitleCase}(\KWDVAR{self})\COLON \TYP{Character}}\mskip3mu\)</td></tr>
<tr><td></td><td>\(\mskip3mu\)\(\EXP{\VAR{toUpperCase}(\KWDVAR{self})\COLON \TYP{Character}}\mskip3mu\)</td></tr>
</table>
<p>
The first six comparison operators perform exact comparison on codepoint values;
the second six ignore case by first converting to lowercase and then comparing
the resulting codepoints.
</p>https://blogs.oracle.com/projectfortress/entry/using_mathjax_to_render_fortressUsing MathJax to render Fortress code on web pagesgls
https://blogs.oracle.com/projectfortress/entry/using_mathjax_to_render_fortress
Fri, 10 Jun 2011 14:38:57 +0000Oracle<script src="http://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML.js" type="text/javascript"></script>
<p>We have been experimenting with using <a href="http://www.mathjax.org" title="MathJax: Beautiful math in all browsers">MathJax</a> to render Fortress code in this blog and also on the <a href="http://java.net/projects/projectfortress/pages/Home" title="Fortress wiki at java.net">Fortress wiki</a>. This is a third-party open-source project that uses Javascript code to render LaTeX expressions within browsers. Here is a sample expression: \(x = { -b+\sqrt{b^2 - 4\,a\,c} \over 2\,a }\). The Fortify tool has been revamped to produce HTML code for single-line expressions, and work is in progress to make it produce HTML for multiline code chunks.</p>https://blogs.oracle.com/projectfortress/entry/welcome_to_the_new_fortressWelcome to the new Fortress bloggls
https://blogs.oracle.com/projectfortress/entry/welcome_to_the_new_fortress
Fri, 10 Jun 2011 14:08:43 +0000Oracle<p>With the move from <font face="'courier new', courier, monospace">projectfortress.sun.com</font> to <font face="'courier new', courier, monospace">projectfortress.java.net</font>, we have also moved the Fortress blog to <font face="'courier new', courier, monospace">blogs.oracle.com/projectfortress</font>. It's going to take some time to move the old content over, but we will once again be trying to make new blog posts about once a week, with items of technical interest concerning the Fortress programming language and related tools. </p>