21
CS269: HW/SW Engineering of Embedded Systems, Winter02
How to write a back-end?
public interface Backend {
    void invoke(List args, List sources);
}
•STEPS
•1. Write a class implements Backend
•2. Write method invoke() in that class
–define the arguments
–design necessary visitors
•3. Write visitors to traverse the ASTs
•4. Add flags to the compiler command-line
•
public class SimulatorBackend implements Backend {
    public abstract void invoke(List args, List sources) {
     
     
     
                                                                                                  
        
    }
}