01 / 165Structuring instruction-sets with higher-order functions
1 / 17
Download Presentation
Structuring instruction-sets with higher-order functions
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
FV for microprocessor correctness • Approach to improving microprocessor quality: • Model the systems in logic • Prove that the microarchitecture implements the ISA. • Rich mixtures of automatic and manual proof strategies are common.
FV for microprocessor correctness • Research community has found many techniques to solve this problem. • Several papers prove correctness of “superscalar, out-of-order, and speculative” implementations of RISC ISAs.
The twist: ISAs are evolving • Domain-specific extensions. • example: MMX • Predication. • example: ARM • Concurrency instructions: • Example: IA-64 • Speculative instructions: • Example: IA-64
The twist: ISAs are evolving • Opportunity for new axis of proof decomposition: • MMX: Can we first prove that the MMX execution unit correctly implements MMX • Predication: Can we prove just the MA predication machinery correct? • Concurrency instructions: Can we abstract over the underlying pipelines? • Speculative instructions: …………
Question that the dissertation answers Can higher-order functions help? • Facilitate architectural extension design? • Microarchitectural modeling of extensions? • Facilitate the correctness proof?
Overview • Background • Extensions and higher-order functions • Conclusion
Overview • Background • Extensions and higher-order functions • Conclusion
Overview • Background • Models and specifications • Correctness • Formal verification techniques • Extensions and higher-order functions • Conclusion
Models and specifications • In the literature: transition systems are used. • A transition system is a structure with: • A set of initial states. • A next state relation. • An “observation” function.
Models and specifications t = (init,next,obs) init represents the initial states: init :: {s} next represents the next state relation: next :: i -> s -> {s} obs is the observation function: obs :: s -> o
Models and specifications type TS i s o = ( {s} , i->s->{s} , s->o ) t :: TS i s o t = (init,next,obs)
Models and specifications • {s} can sometimes mean a finite set of elements of s. • Sometimes infinite sets are used. • Sometimes, sets are not used at all.
Models and specifications • Finite sets • t :: TS FSet i s o. • t :: ( FSet s , i->s->FSet s , s->o ) • Infinite sets: • t :: TS Set i s o. • t :: ( Set s , i->s->Set s , s->o ) • No sets: • t :: TS Id i s o. • t :: ( s , i->s->s , s->o )
Models and specifications data OPCODE = ADD Reg Reg Reg | SUB Reg Reg Reg . . Example: ADD r1 r2 r5 :: OPCODE
Example: An ISA specification risc :: TS FSet OPCODE RegFile (Obs RegFile) risc = (risc_init,risc_next,risc_obs) where risc_init = unit i_rf risc_next instr state = ……… risc_obs s = ………
What is correctness? • Often a preorder relationship: • Bisimulation (BISIM). • Simulation (SIM). • Flush-point correctness (FP).
What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that
What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that init m
What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that init m init n
What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that init m R init n
What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that next m i init m R R init n
What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that next m i init m R R init n next n i
next m i R R next n i What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that init m R init n
next m i R R next n i What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that init m R R init n
next m i R R next n i What is simulation? “m” is the implementation, “n” is the specification. There exists an R such that obs m init m R R init n obs n
What is simulation? • (m,n)SIM iff R. • ainit m, binit n. (a,b)R • (a,b)R, i, a’next m i a. b’next n i b and (a’,b’)R • (a,b)R. obs m a = obs n b
What is bisimulation? “m” is the implementation, “n” is the specification. There exists an R such that, the same as before AND:
What is bisimulation? “m” is the implementation, “n” is the specification. There exists an R such that, the same as before AND: init n
What is bisimulation? “m” is the implementation, “n” is the specification. There exists an R such that, the same as before AND: init m init n
What is bisimulation? “m” is the implementation, “n” is the specification. There exists an R such that, the same as before AND: init m R init n
What is bisimulation? “m” is the implementation, “n” is the specification. There exists an R such that, the same as before AND: init m R R init n next n i
What is bisimulation? “m” is the implementation, “n” is the specification. There exists an R such that, the same as before AND: next m i init m R R init n next n i