Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
概要
https://hackmd.io/FF_R6nm6TFqeaO318vyfYw
dl2u の機能を拡張し、LVGN-DatalogでないDatalogを適切に変換できるようにする。
修正内容
source に現れず、 view でもない述語を許容した。
これらの述語は全て source あるいは view を呼び出していることを前提とし、その呼び出しからカラム名を導き出して中間テーブルを生成するようにした。
生成規則は既存のデルタ述語のものを流用している。
また、中間テーブルに対するデルタ述語は UPDATE/DELETE 文を生成しないようになっている。
確認方法
examples/
にファイルが入っているので指定して実行できる。datalog ファイル:
結果:
確認事項(確認していただきたいこと)
実装方法として、上記の通り、
CREATE TEMPORARY TABLE
を生成するようにした+v
-v
)は、既存のデルタ述語と同じような形のCREATE TEMPORARY TABLE
を生成しつつ、 INSERT/DELETE 文を生成しないようにしたとなっておりますが、この修正方針で間違いないでしょうか。