Send the link below via email or IMCopy
Present to your audienceStart remote presentation
- Invited audience members will follow you as you navigate and present
- People invited to a presentation do not need a Prezi account
- This link expires 10 minutes after you close the presentation
- A maximum of 30 users can follow your presentation
- Learn more about this feature in our knowledge base article
Do you really want to delete this prezi?
Neither you, nor the coeditors you shared it with will be able to recover it again.
Make your likes visible on Facebook?
Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.
Erlang Embedded Simulation Final Chalmers Presentation
Transcript of Erlang Embedded Simulation Final Chalmers Presentation
NOT an AVR with 2kb of ram and 8mhz
Erlang needs an OS Introduction
What is Erlang?
Questions What is erlang? Messages The world is concurrent
Things in the world don't share data
Things communicate with messages
-Joe Armstrong Processes communicate by value, sending messages
Processes has ids
Each process has a mailbox
This is like email Processes Erlang Virtual Machine does scheduling and memory management are handled by the VM
Can easily spawn 100.000 processes
Erlang is a functional language Does
exist? YES Does
exist? NO Choose peripheral to simulate Set OS environmental variable "EMBEDDED_ENV" to "sim". Peripheral
data? Create API which can be used later for driver YES NO NO Integrate simulator with driver API
(only one line of code) YES Hardware Choose
environment Simulator No change needed Write reply messages to API Manually write log messages
Record message from hardware Choose Supervisors:
Hans Svensson (Chalmers)
Robert Virding (Inventor of Erlang) Overview Thesis Testing code on hardware is inconvient
Need access to the hardware
No workflow for simulators available Library for creating and verifying simulators
Simulators for simple devices like serial ports, push buttons, LEDs, GPS navigation devices
Perform analysis to verify improvement and correctnes of using simulators Acknowledgements You can shorten development time and improve quality by using simulators. The Problem Result Erlang Solutions for letting us to work on our thesis in their office in Stockholm.
Our supervisors Hans Svensson & Robert Virding and others at Erlang Solutions Approach It is possible to create simulators for Erlang Embedded
Correctness of simulators can be verifed and the simulators we created are correct
Time can be saved & quality improved Complex simulators Handle pids Stdio Create the most generic fsm of logs
Can be used for verification of system
Or statisticial analysis of FSM, which states and transisiton are used Replace call to open_port
to *_stub during runtime Create FSM of logs Create a stdio interface for interoperability with other languages, like C or Java Runtime Replacement Create simulators which base replies on log messages for e.g. synchronous communication. Replies based on probability. Make recorder handle unregistered pids in messages Yes, According to our experience
Logic reasoning Improvement? Correctness Result Correctness can be verified by using the recorder tool
Our simulators were verified and deemed correct Correctness of simulators can be verified and the simulators we created are correct
Time can be saved & quality improved Write code for the target platform Deploy the code and observe the results Repeat the above steps until the desired results are achived.