Improve how MFP handles dual powersets in the monotone framework

オープン
#289 コメント 2 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@rybern がすでに取り組んでいます。

2019年9月3日 から。

評価

この issue はまだ評価されていません。

説明

optimization

This is a small issue regarding the monotone framework internals. I'm happy to implement a fix below, but I wanted to get the okay from @VMatthijs in case I'm not understanding something.

I've been adding a simple monotone analysis that uses an intersection as its meet. I found that it fit a dual powerset as included with the monotone framework. I noticed that, because of the way our MFP implementation works, I needed to provide the total set of properties as the lattice bottom in order for intersection to work properly. In my case, this means traversing the whole MIR to find all RHS variables. In the case of lazy expressions, it means traversing to find all expressions. This adds a bit of complexity and computational cost. I see two solutions:

  1. Instead of using sets as properties directly, use a sum type with sets plus a 'Total' constructor, whose purpose is to be an identity for intersections. As far as I understand it, total sets are currently only required to act as an identity for intersections.
  2. Change the MFP to take the LUB over all predecessors at a time, rather than the LUB between the current properties of a node and the transfer of each predecessor individually. This is how I've seen the monotone framework and MFP formulated, and how I expected the LUB to be used, but I see that it would require changing the current (efficient looking) implementation.

Number 1 would be easy to do and I'd be happy to implement it. Number 2 would make the framework more intuitive to me, but would probably require re-implementing MFP, which is probably not a good idea.

主要言語
OCaml
スター
162
フォーク
60
平均マージ
2日 22時間
マージ済み PR(30日)
14

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

stan-dev/stanc3 のほかの issue

stan-dev/stanc3 の issue をすべて見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。