Asmodeus Isaac Sheff The Dwarf @ . isheff@cs.cornell.edu - - PowerPoint PPT Presentation

asmodeus isaac sheff the dwarf
SMART_READER_LITE
LIVE PREVIEW

Asmodeus Isaac Sheff The Dwarf @ . isheff@cs.cornell.edu - - PowerPoint PPT Presentation

I SAAC S HEFF BEYOND OPTIMAL: COMPILER BLACK MAGIC BASED ON EQUIVALENT EXCHANGE BEYOND OPTIMAL Asmodeus Isaac Sheff The Dwarf @ . isheff@cs.cornell.edu the flask BACKGROUND COMPILERS SOURCE


slide-1
SLIDE 1

BEYOND OPTIMAL: 


COMPILER BLACK MAGIC BASED ON EQUIVALENT EXCHANGE

ISAAC SHEFF

slide-2
SLIDE 2

BEYOND OPTIMAL

Isaac Sheff Asmodeus “The Dwarf”

isheff@cs.cornell.edu ♑❦⏣@♈♒♈♊.☿♆ “the flask”

slide-3
SLIDE 3

BACKGROUND

COMPILERS

LEX PARSE SEMANTIC ANALYSIS SOURCE

Tokens AST

TRANSLATE OPTIMIZE

  • attr. AST

IL

CODE GEN LINK EXEC

ASM

slide-4
SLIDE 4

BACKGROUND

OPTIMIZE

▸ Unroll Loops ▸ Remove dead code ▸ End-tail recursion

slide-5
SLIDE 5

BACKGROUND

OPTIMIZE

▸ Unroll Loops ▸ Remove dead code ▸ End-tail recursion ▸ “Super” optimize

slide-6
SLIDE 6

BACKGROUND

CONSTRAINTS

▸ Semantics ▸ Runtime ▸ limited super optimization ▸ Composability ▸ limits whole-program analysis ▸ Target Hardware ▸ limited operations

slide-7
SLIDE 7

BACKGROUND

CONSTRAINTS

▸ Math

slide-8
SLIDE 8

BACKGROUND

PROVIDENCE, 2012

▸ Student Disappearances ▸ Abandoned Tunnel ▸ Basement of University Hall

slide-9
SLIDE 9

BACKGROUND

PROVIDENCE, 2012

▸ Bricked up within building’s

walls

▸ Bound in human skin ▸ Aura of corruption ▸ Obscure and forbidding 


runes

slide-10
SLIDE 10

BACKGROUND

PROVIDENCE, 2012

▸ sacrifice the blood of the

innocent for both efficiency and security

▸ 3 human hearts ▸ 2 pounds flesh ▸ Extract of Nightshade ▸ Aura of Pestilence ▸ Stone carved with Elder Sign ▸ Defiled altar of the Elder Gods ▸ 1 goat

slide-11
SLIDE 11

BACKGROUND

PROVIDENCE, 2012

▸ Edward Tremel, The Council of

Shadows et al. — SigSEGV, 2014

Chaos of the Abyss

Impossibly

  • ptimized assembly

arithmetic

Group/Field

  • perations

Elliptic Curve

  • perations

Source

  • f True

Random

RSA encrypt & decrypt

slide-12
SLIDE 12

BACKGROUND

PROVIDENCE, 2012

▸ Edward Tremel, The Council of

Shadows et al. — SigSEGV, 2014

2 4 6 8 10 12 RSA Sign RSA Verify Group multiply Group pairing Total time (ms)

Cryptography operations

Best current implementation Prototype CBC implementation
slide-13
SLIDE 13

BACKGROUND

PROVIDENCE, 2012

▸ Edward Tremel, The Council of

Shadows et al. — SigSEGV, 2014

▸ “Tentacle Monster” ▸ Channel to Abyss may not be as

stable as originally thought

▸ Chaos leaking into mortal plane ▸ Increased incidence of unholy

monstrosities in Providence area

slide-14
SLIDE 14

BACKGROUND

PROVIDENCE, 2012

slide-15
SLIDE 15

OBJECTIVE

SAFE CROSS-PLANE OPTIMIZATION

▸ Infinite potential planes of existence ▸ the quantums

slide-16
SLIDE 16

OBJECTIVE

SAFE CROSS-PLANE OPTIMIZATION

▸ Infinite potential planes of existence ▸ the quantums ▸ Ancient Theology

slide-17
SLIDE 17

OBJECTIVE

SAFE CROSS-PLANE OPTIMIZATION

▸ Infinite potential planes of existence ▸ the quantums ▸ Ancient Theology ▸ Modern Mapping Techniques

slide-18
SLIDE 18

CONTRIBUTIONS

EQUIVALENT EXCHANGE

▸ To obtain, something of equal value

must be lost

slide-19
SLIDE 19

CONTRIBUTIONS

EQUIVALENT EXCHANGE

▸ To obtain, something of equal value

must be lost

▸ Equality determined by “God”

slide-20
SLIDE 20

CONTRIBUTIONS

EQUIVALENT EXCHANGE

▸ To obtain, something of equal value

must be lost

▸ Equality determined by “God” ▸ Constrains damage

slide-21
SLIDE 21

CONTRIBUTIONS

TARGET LANGUAGE

▸ Alchemical symbols

slide-22
SLIDE 22

CONTRIBUTIONS

TARGET LANGUAGE

▸ Alchemical symbols ▸ Some degree of specialized

hardware required

slide-23
SLIDE 23

CONTRIBUTIONS

RUNTIME SACRIFICE

▸ Sacrifices range from 10 kJoules


to 18,922 human souls

▸ Sacrifice value bounded 


AT COMPILE TIME

slide-24
SLIDE 24

CONTRIBUTIONS

BLOODSTONE

▸ Type-safe compiler with compile-

time bounded runtime sacrifice

▸ True whole-program super-

  • ptimization possible with compile-

time sacrifice

slide-25
SLIDE 25

RESULTS

BLOODSTONE

Performance 
 vs
 Optimal souls

slide-26
SLIDE 26

CONTRIBUTIONS

FUTURE WORK

▸ High-value sacrifice ▸ other than souls ▸ Decrease compile-time sacrifice