230 likes | 464 Views
Pavel Boychev Sofia University. Mgozi:. Elica Logo and Objects. The presentation. What is Elica? Two events Zombies *41 & 14* Elica Object Features Elica Future. What is Elica. E ducational L ogo I nterface for C reative A ctivities Programming language Educational tool
E N D
Pavel Boychev Sofia University Mgozi: Elica Logo and Objects
The presentation • What is Elica? • Two events • Zombies • *41 & 14* • Elica Object Features • Elica Future
What is Elica • Educational Logo Interface for Creative Activities • Programming language • Educational tool • Research environment
Mission • To enrich LOGO with objects • To allow easy understanding and use of objects and object oriented programming • To provide flexible environment for study, research and modeling • To support both beginners and advanced users
Two years ago • RLS (old version of Elica) was presented at PEG’97 • A question was asked:“ARE OBJECTS EASY TO USE?”
RLS object “TRIANGLE” to object triangle :a :b :c local “ab “bc “ca make “ab segment :a :b make “bc segment :b :c make “ca segment :c :a rule “a [make “ab.initial :a make “ca.final :a] rule “b [make “bc.initial :b make “ab.final :b] rule “c [make “ca.initial :c make “bc.final :c] rule “bc [make “b :bc.initial make “c :bc.final] rule “ca [make “c :ca.initial make “a :ca.final] rule “ab [make “a :ab.initial make “b :ab.final]end
Elica object “TRIANGLE” to triangle :a :b :c local “ab “bc “ca (make “ab segment :a :b ) (make “bc segment :b :c ) (make “ca segment :c :a)end
Two weeks ago • Elica was presented at a Bulgarian-USA Forum for Math Education • In the morning of the Eclipse day: Is it possible to simulate space mechanics with Elica objects? • The default answer is “YES” • 1 hour after the Eclipse - it was done.
Phase 3 make"sun planet 30 position 00 velocity 0-20 make"earth planet 10 position 16030 velocity -1050 make"moon planet 3 position -17520 velocity 2020
Procedure Lifetime 1 Arg1 Arg2 Procedure Code • A call to a procedure • Supply arguments • Execute procedure code • Code can use local variables and procedures Var1 Var2 SubProc1 SubProc2
Procedure Lifetime 2 Arg1 Arg2 Procedure Code • An exit from a procedure • Arguments and local variables are removed • Local procedures are not accessible Var1 Var2 SubProc1 SubProc2
Procedure Object Arg1 Arg2 Arg1 Arg2 Procedure Code ConstructorCode Var1 Var2 Field1 Field2 SubProc1 Method1 SubProc2 Method2
What is “zombie”? Random House Webster’s College Dictionary: zombie (zom'bee) n. 1. (in voodoo). The body of a dead person supernaturally imbued with the semblance of life and set to perform tasks as a mute, will-less slave.
Object = Procedure Zombie A call of procedure Memory for variables, procedures, functions and objects Asks for definition Allocates resources Execute procedure code Restore allocated resources New Instance Stores resources
Simple object to point :x :ydefinition end make “q point 5 6construction print :q.x :q.yretrieving data make “q.x 10modifying data Example
All for one, one for all Variables Functions Procedures Objects Some LOGO and non-LOGO languages Elica
Definition to point :x :y end Who is who? make “q point 0 0 as object point 0 0 as procedure print :point as variable
Features • Classes and instances • Inherited objects • Polymorphism • Multiple parents • Real-time instance modification • Real-time class modification
Elica Future • Modules for geometry, algebra, calculus, logic, physics, astronomy, mechanics, music, and many more • Platform independence • Used in education in many countries