Oz
The Mozart Programming System is the primary implementation of Oz. It is released with an open source license by the Mozart Consortium. Mozart has been ported to different flavors of Unix, FreeBSD, Linux, Microsoft Windows, and Mac OS X.[2]
How to execute the examples on Rosetta Code
All examples that start with declare can be used directly in the Emacs-based IDE, without a separate compilation step. Just copy the source code to the Oz buffer and select the menu item "Oz→Feed Buffer".
Some examples are functor definitions and must be compiled. The compiler is invoked with a command such as: ozc -c filename.oz, and then executed with the command, ozengine filename.ozf. This Stack Overflow answer shows an example of the boilerplate to transform code written for the Emacs IDE to code that can run directly on the Mozart VM.
Citation
Tasks
- 100 doors
- A+B
- Abstract type
- Accumulator factory
- Ackermann function
- Active object
- Add a variable to a class instance at runtime
- Align columns
- Anagrams
- Animate a pendulum
- Animation
- Apply a callback to an array
- Arbitrary-precision integers (included)
- Arithmetic evaluation
- Arithmetic/Integer
- Array concatenation
- Arrays
- Assertions
- Associative array/Creation
- Associative array/Iteration
- Atomic updates
- Averages/Arithmetic mean
- Averages/Median
- Averages/Mode
- Averages/Pythagorean means
- Averages/Root mean square
- Averages/Simple moving average
- Binary search
- Bitmap
- Bitmap/Read a PPM file
- Bitmap/Write a PPM file
- Boolean values
- Bulls and cows
- Call a foreign-language function
- Character codes
- Check that file exists
- Classes
- Closest-pair problem
- Collections
- Combinations
- Command-line arguments
- Comments
- Compile-time calculation
- Compound data type
- Concurrent computing
- Conditional structures
- Create a file
- Create a two-dimensional array at runtime
- Create an HTML table
- Date format
- Define a primitive data type
- Delegates
- Delete a file
- Detect division by zero
- Determine if a string is numeric
- Determine if only one instance is running
- Dining philosophers
- Distributed programming
- Dot product
- Doubly-linked list/Element definition
- Doubly-linked list/Element insertion
- Doubly-linked list/Traversal
- Echo server
- Empty program
- Enumerations
- Environment variables
- Ethiopian multiplication
- Evaluate binomial coefficients
- Events
- Evolutionary algorithm
- Exceptions
- Exceptions/Catch an exception thrown in a nested call
- Execute a system command
- Extreme floating point values
- Factorial
- Factors of an integer
- Fibonacci sequence
- Filter
- Find common directory path
- Find limit of recursion
- Find the missing permutation
- First-class functions
- First-class functions/Use numbers analogously
- FizzBuzz
- Flatten a list
- Flow-control structures
- Fork
- Formatted numeric output
- Function composition
- Function definition
- GUI component interaction
- Generic swap
- Grayscale image
- Greatest common divisor
- Greatest element of a list
- Greatest subsequential sum
- HTTP
- Hamming numbers
- Happy numbers
- Hash from two arrays
- Hello world!
- Hello world/Graphical
- Hello world/Standard error
- Hello world/Text
- Higher-order functions
- Hofstadter-Conway $10,000 sequence
- Horner's rule for polynomial evaluation
- Hostname
- Increment a numerical string
- Infinity
- Inheritance/Multiple
- Inheritance/Single
- Input loop
- Integer comparison
- Interactive programming
- Introspection
- JSON
- Jensen's Device
- Keyboard macros
- Knapsack problem/0-1
- Knapsack problem/Unbounded
- Knuth shuffle
- Leap year
- List comprehensions
- Literals/Integer
- Literals/String
- Logical operations
- Longest common subsequence
- Look-and-say sequence
- Loop over multiple arrays simultaneously
- Loops/Break
- Loops/Continue
- Loops/Do-while
- Loops/Downward for
- Loops/For
- Loops/For with a specified step
- Loops/Foreach
- Loops/Infinite
- Loops/N plus one half
- Loops/Nested
- Loops/While
- Lucas-Lehmer test
- Luhn test of credit card numbers
- Man or boy test
- Menu
- Metered concurrency
- Miller–Rabin primality test
- Multiple distinct objects
- Mutual recursion
- N-queens problem
- Named parameters
- Non-continuous subsequences
- Non-decimal radices/Input
- Nth root
- Null object
- Number reversal game
- Object serialization
- One-dimensional cellular automata
- Optional parameters
- Palindrome detection
- Pangram checker
- Pascal's triangle
- Pascal's triangle/Puzzle
- Pattern matching
- Perfect numbers
- Polymorphic copy
- Polymorphism
- Power set
- Price fraction
- Primality by trial division
- Program termination
- Queue/Definition
- Queue/Usage
- Quine
- RCRPG
- Random number generator (included)
- Range expansion
- Range extraction
- Read entire file
- Real constants and functions
- Regular expressions
- Remove duplicate elements
- Rendezvous
- Repeat a string
- Respond to an unknown method call
- Reverse a string
- Roman numerals/Encode
- Rosetta Code/Count examples
- Rosetta Code/Find unimplemented tasks
- Rot-13
- Run-length encoding
- Runtime evaluation
- Runtime evaluation/In an environment
- Search a list
- Shell one-liner
- Short-circuit evaluation
- Sierpinski carpet
- Sierpinski triangle
- Sieve of Eratosthenes
- Simple windowed application
- Simulate input/Keyboard
- Simulate input/Mouse
- Singleton
- Sleep
- Sockets
- Sort an array of composite structures
- Sort an integer array
- Sort stability
- Sort using a custom comparator
- Sorting algorithms/Bogosort
- Sorting algorithms/Bubble sort
- Sorting algorithms/Cocktail sort
- Sorting algorithms/Comb sort
- Sorting algorithms/Counting sort
- Sorting algorithms/Gnome sort
- Sorting algorithms/Heapsort
- Sorting algorithms/Insertion sort
- Sorting algorithms/Merge sort
- Sorting algorithms/Quicksort
- Sorting algorithms/Selection sort
- Sorting algorithms/Stooge sort
- Spiral matrix
- Stack
- Stack traces
- Stair-climbing puzzle
- String case
- String concatenation
- String interpolation (included)
- String length
- Substring
- Sudoku
- Sum and product of an array
- Sum of a series
- Sum of squares
- Symmetric difference
- Synchronous concurrency
- System time
- Table creation
- Table creation/Postal addresses
- Take notes on the command line
- Text processing/Max licenses in use
- Time a function
- Tokenize a string
- Top rank per group
- Topological sort
- Tree traversal
- Trigonometric functions
- Undefined values
- Variables
- Variadic function
- Walk a directory/Non-recursively
- Walk a directory/Recursively
- Web scraping
- Window creation
- Window management
- Wireworld
- XML/DOM serialization
- XML/Input
- XML/Output
- XML/XPath
- Y combinator
- Yahoo! search interface
- Zig-zag matrix