NetworkVerification / nv

A Framework for Modeling and Analyzing Network Configurations
MIT License
31 stars 2 forks source link

Add overloading for integers #24

Open nickgian opened 5 years ago

nickgian commented 5 years ago

Currently one has to use a "uK" where K is the number of bits to specify the width of integers and their operations. It would be nice to have some kind of overloading mechanism that automatically figures out the right size for integers and their operations. For instance in the program we can deduce that 0 and 1 is of size 4, while 10 is of size 32 (the default node size). type attr = int4 let init u = if u < 10 then 0 else 1