Date post: | 17-Jan-2016 |
Category: |
Documents |
Upload: | dwight-price |
View: | 214 times |
Download: | 0 times |
EExpressingxpressing
ZZombiesombies
asasPProgrammablerogrammable
IIndividualsndividuals Abhinav Sharma
Wayne ShuMiles Ulrich
What is EZ as PI?What is EZ as PI?An imperative, interpreted
language for zombie apocalypse simulation
Educational and fun language for novice programmers
Emphasis on simplicity and flexibility
MotivationMotivationZombies are cool!!
Simulate the spread of an epidemic
Let’s see how Humans can save themselves….Will they??
Sample OutputSample OutputSource Code:
Elements of LanguageElements of LanguageBasic Types
#number
@location
^direction
?boolean
!string
Dynamic Attributes (Methods)
##dynamicnum
^^dynamicdirection
…
Human/Zombie
#speed
#power
@start
^strategy
!name
Basic Program StructureBasic Program StructureDefinitions
- Set constants- Define dynamic attributes
Creation of Elements-Create a world-Populate world with humans & zombies
Simulation Phase- dynamic variations- per clock cycle
Post processing
Sample ProgramSample Program^^cautious
if imHumanreturn awayFrom nearestZombie
return toward nearestHumanend
##slowOverTimeif time < 100
return 100-timereturn 1
end
create world 20:10
create 20 zombies withspeed slowOverTimestrategy random
end
create 4 humans withstrategy cautious
end
run 100display graphical
end
print “There are {humanCount} humans still alive”
Translator ArchitectureTranslator ArchitectureLexer Parser
Syntax
tree
Walker
Interpreter
EZ as PI
Library
Other supporting functions
Output
JVM
.ez Source
File
Tools and EnvironmentTools and EnvironmentDevelopment Tools:
Eclipse 3.5Java 1.6 SDK , SwingANTLR 3.2
Management Tools:Google Code – Version controlMS office
Operating System:WindowsLinux
TestingTesting
Black Box
White Box
Unit testing
System testing
Lessons LearntLessons LearntHow to manage time and
resources (limited, less members)Incremental approach towards
problem as a wholeModular is betterChoose the right tools!
Thank YouThank You