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

Kaleidoscope (programming language)

From Wikipedia, the free encyclopedia

The Kaleidoscope programming language is a constraint programming language embedding constraints into an imperative object-oriented language. It adds keywords always, once, and assert..during (formerly while..assert) to make statements about relational invariants. Objects have constraint constructors, which are not methods, to enforce the meanings of user-defined datatypes.

There are three versions of Kaleidoscope which show an evolution from declarative to an increasingly imperative style. Differences between them are as follows.[1]

Kaleidoscope'90 Kaleidoscope'91 Kaleidoscope'93
Constraint Evaluation Lazy Eager Eager
Variables Hold streams Hold streams Imperative
Concurrent Constraints Strict Strict Non-strict
Syntax Smalltalk-like Algol-like Algol-like
Constraint Model Refinement Refinement Perturbation
Method Dispatching Single Multiple Multiple
Assignment As a constraint As a constraint Destructive

YouTube Encyclopedic

  • 1/3
    Views:
    37 489
    3 946
    8 639
  • Snap! Tutorial IIIA1: Make a block
  • Canadian Kaleidoscope: Brookfield High School
  • Lesson 13.2 : Basics of Algorithm Design Part 2 : Introducing the For Loop in C

Transcription

Example

Compare the two code segments, both of which allow a user to drag the level of mercury in a simple graphical thermometer with the mouse.

Without constraints:

while mouse.button = down do
 old <- mercury.top;
 mercury.top <- mouse.location.y;
 temperature <- mercury.height / scale;
 display_number( temperature );
 if old < mercury.top then
  delta_grey( old, mercury.top );
 elseif old > mercury.top then
  delta_white( mercury.top, old );
 end if;
end while;

With constraints:

always: temperature = mercury.height / scale;
always: white rectangle( thermometer );
always: grey rectangle( mercury );
always: display number( temperature );
while mouse.button = down do
 mercury.top = mouse.location.y;
end while;

References

  • Lopez, Gus; Bjorn Freeman-Benson; Alan Borning (1994). "Kaleidoscope: A Constraint Imperative Programming Language". Constraint Programming. Springer-Verlag. pp. 313–329.
  • Marriott, Kim; Peter J. Stuckey (1998). Programming with constraints: An introduction. MIT Press. ISBN 0-262-13341-5
  1. ^ Lopez, Gus; Freeman-Benson, Bjorn; Borning, Alan (1993). "Kaleidoscope: A Constraint Imperative Programming Language" (PDF). constraints.cs.washington.edu. Retrieved 2023-12-30.


This page was last edited on 30 December 2023, at 22:34
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.