News for hackers. Stuff that matters.
Re:Mangle, a programming language for deductive database pro... by theodpHN on Saturday November 26, 2022 @05:51PM (#33757702)
Some of the other stuff looks intriguing, but regarding the claim that "Unlike SQL, our Mangle rule projects_with_vulnerable_log4j has a name and can be referenced in other queries." goes, SQL in a VIEW or common table expression (CTE) can also be referenced in other queries.
Re:Mangle, a programming language for deductive database pro... by rad_gruchalski on Saturday November 26, 2022 @08:03PM (#33758883)
I don’t think a CTE or a VIEW is an intended reasoning behind this claim. It’s more like choosing a part of a WHERE statement based on previous criteria and prior results.
Re:Mangle, a programming language for deductive database pro... by zozbot234 on Sunday November 27, 2022 @07:41AM (#33762579)
CTE's and VIEW's can indeed express inference in relational databases. A "projects_with_vulnerable_log4j" view is a nice example, but possibly-recursive CTE's can achieve pretty much arbitrary inference, e.g. on graph-like data.
Re:Mangle, a programming language for deductive database pro... by burakemir on Sunday November 27, 2022 @06:04AM (#33762101)
Yes, there are CTE and recursive queries, and various DBMS also offer views. There are even table-valued functions.

These things are not widespread, and differ by implementation, and the way these are used by clients are copy-and-paste. Something as thoughtful as ZetaSQL https://github.com/google/zetasql does not have mechanisms for structuring (modules, packages, interfaces). SQL will not, cannot evolve into such a direction (or, anything that evolves, will not be recognizable as SQL).