We present zero-cost, high-level F* functors and their compilation to low-level, efficient C code. Thanks to a combination of partial evaluation, fine-grained control of reduction, and tactic-driven C++ template-like metaprogramming, we provide the programmer with a toolkit that dramatically reduces the proof-to-code ratio, brings out the essence of algorithmic and implementation agility, and allows substantial code reuse while remaining at a very high-level of abstraction. None of our techniques require modifying the F* compiler. We describe a systematic process to develop functors, and illustrate it with the streaming functor, which wraps an error-prone, cryptographic block API by hiding internal buffering and state machine management to prevent C programmer mistakes. We apply this functor to 10 implementations from the HACLxN cryptographic library. We then write a tactic to automate the functor encoding, allowing the programmer to author multi-argument functors with a deeply nested call graph without any syntactic overhead. We apply this general tactic on 5 algorithms from HACL*, yielding over 30 specialized functor applications. We use as an example Curve25519, a complex algorithm whose final, specialized version we express as nested functor applications.


翻译:我们提出零成本、高水平F* 真菌及其编译为低水平、高效的C代码。我们通过部分评价、精细控制减排和策略驱动的C++模板式配方程式组合,向程序员提供了一套工具,大大降低了校对比对码率,提出了算法和执行的灵巧性,允许大量代码再利用,同时保持高度的抽象性。我们的技术都不要求修改F* 编译者。我们描述了开发真菌的系统过程,并用流式真菌来说明它,它包绕了一个易出错的、加密块的CPI, 隐藏了内部缓冲和州机管理来防止C程序错误。我们把这个真菌应用到HACLLN加密图书馆的10项执行中。然后我们写出一种策略,将真菌编码自动化,使程序员能够用深嵌的调制调真菌图来开发F* 。我们用这种普通的真菌配方程式来包植,我们把这种普通的真菌策略用于5种配方程式, 也就是HCLL* 的精制成30版的精制成一个专门的变方程式。我们用了它的精化模型,我们用了一个特殊的精化的精化的精制式的精制式变精制变精制式的精制式变方程式。

0
下载
关闭预览

相关内容

【干货书】利用 Python 进行数据分析,470页pdf
专知会员服务
119+阅读 · 2021年3月13日
专知会员服务
54+阅读 · 2020年11月3日
专知会员服务
53+阅读 · 2020年9月7日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
80+阅读 · 2020年7月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
160+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
181+阅读 · 2019年10月11日
【新书】Python编程基础,669页pdf
专知会员服务
196+阅读 · 2019年10月10日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
spinningup.openai 强化学习资源完整
CreateAMind
6+阅读 · 2018年12月17日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
【论文】图上的表示学习综述
机器学习研究会
15+阅读 · 2017年9月24日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
Arxiv
0+阅读 · 2021年3月26日
Arxiv
0+阅读 · 2021年3月25日
A Modern Introduction to Online Learning
Arxiv
21+阅读 · 2019年12月31日
Arxiv
3+阅读 · 2018年12月18日
VIP会员
相关VIP内容
【干货书】利用 Python 进行数据分析,470页pdf
专知会员服务
119+阅读 · 2021年3月13日
专知会员服务
54+阅读 · 2020年11月3日
专知会员服务
53+阅读 · 2020年9月7日
Linux导论,Introduction to Linux,96页ppt
专知会员服务
80+阅读 · 2020年7月26日
Keras François Chollet 《Deep Learning with Python 》, 386页pdf
专知会员服务
160+阅读 · 2019年10月12日
强化学习最新教程,17页pdf
专知会员服务
181+阅读 · 2019年10月11日
【新书】Python编程基础,669页pdf
专知会员服务
196+阅读 · 2019年10月10日
[综述]深度学习下的场景文本检测与识别
专知会员服务
78+阅读 · 2019年10月10日
相关资讯
Hierarchically Structured Meta-learning
CreateAMind
27+阅读 · 2019年5月22日
Call for Participation: Shared Tasks in NLPCC 2019
中国计算机学会
5+阅读 · 2019年3月22日
无监督元学习表示学习
CreateAMind
27+阅读 · 2019年1月4日
Unsupervised Learning via Meta-Learning
CreateAMind
43+阅读 · 2019年1月3日
A Technical Overview of AI & ML in 2018 & Trends for 2019
待字闺中
18+阅读 · 2018年12月24日
spinningup.openai 强化学习资源完整
CreateAMind
6+阅读 · 2018年12月17日
利用动态深度学习预测金融时间序列基于Python
量化投资与机器学习
18+阅读 · 2018年10月30日
【论文】图上的表示学习综述
机器学习研究会
15+阅读 · 2017年9月24日
【推荐】RNN/LSTM时序预测
机器学习研究会
25+阅读 · 2017年9月8日
【推荐】Python机器学习生态圈(Scikit-Learn相关项目)
机器学习研究会
6+阅读 · 2017年8月23日
Top
微信扫码咨询专知VIP会员