To install click the Add extension button. That's it.

The source code for the WIKI 2 extension is being checked by specialists of the Mozilla Foundation, Google, and Apple. You could also do it yourself at any point in time.

4,5
Kelly Slayton
Congratulations on this excellent venture… what a great idea!
Alexander Grigorievskiy
I use WIKI 2 every day and almost forgot how the original Wikipedia looks like.
Live Statistics
English Articles
Improved in 24 Hours
Added in 24 Hours
What we do. Every page goes through several hundred of perfecting techniques; in live mode. Quite the same Wikipedia. Just better.
.
Leo
Newton
Brights
Milds

Alice (programming language)

From Wikipedia, the free encyclopedia

Alice ML is a general-purpose, high-level, multi-paradigm, functional programming language designed by the Programming Systems Laboratory at Saarland University, Saarbrücken, Germany.[2] It is a dialect of Standard ML, augmented with support for lazy evaluation, concurrency (multithreading and distributed computing via remote procedure calls) and constraint programming.

YouTube Encyclopedic

  • 1/3
    Views:
    144 675
    375
    5 012
  • Alice: Programming for a New Generation
  • ALICE 3D Programming
  • Alice: Class Level Methods

Transcription

Overview

Alice extends Standard ML in a number of ways that distinguish it from its predecessor. Alice provides concurrency features as part of the base language through the use of a future type that represents a value being provided by an independent thread of execution. A thread that uses a future value will block on an attempt to access the value until the thread performing it has completed the computation. A related concept is also provided termed a promise, allowing a thread to provide a future value that it will compute to another thread. Future and promise typed variables are used to implement data-flow synchronizing.

Like the Haskell functional language, Alice provides facilities to allow a lazy evaluation strategy in programs, unlike the traditional eager evaluation strategy of Standard ML. While Haskell uses the lazy model by default, Alice uses an eager evaluation model by default, needing an explicit programming statement for a computation to evaluate lazily.

The Alice implementation from Saarland University uses the Simple Extensible Abstract Machine (SEAM) virtual machine. It is free software, and features just-in-time compilation to bytecode and native code for the x86 architecture.

Early versions of Alice ran on the Mozart Programming System (Oz) virtual machine (VM), allowing interfacing between Alice and Oz code.

Alice's remote procedure calling depends on the virtual machine, because it may send code to be computed from one computer to another.

Example

Alice extends Standard ML with several primitives for lazy evaluation and concurrency. For example, threads may be created using the spawn keyword. Consider the naive algorithm for computing the Fibonacci numbers:

 fun fib 0 = 0
   | fib 1 = 1
   | fib n = fib(n-1) + fib(n-2);

For large values of n, fib n will take a long time to compute. This computation can be performed in a separate thread by

 val x = spawn fib n;

The variable x is now bound to a so-called future. When an operation requires the value of x, it blocks until the thread is done with the computation. To exploit parallelism one could even define fib as follows:

 fun fib 0 = 0
   | fib 1 = 1
   | fib n = spawn fib(n-1) + fib(n-2);

See also

References

  1. ^ "Alice". DE: Saarland University.
  2. ^ "Programming Systems Lab". Archived from the original on 5 October 2006. Retrieved 8 August 2006.

External links

This page was last edited on 15 May 2024, at 10:02
Basis of this page is in Wikipedia. Text is available under the CC BY-SA 3.0 Unported License. Non-text media are available under their specified licenses. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc. WIKI 2 is an independent company and has no affiliation with Wikimedia Foundation.