在RascalMPL中实现M3。

huangapple go评论108阅读模式
英文:

Implementing M3 in RascalMPL

问题

我如何实现一个M3模型(关系和AST)用于任何编程语言,我已经看过《M3:Rascal中源代码分析的通用模型》的文章,我大致了解了其中的内容,但我如何实际实现一个(比如说SQL)。还有任何资源将不胜感激,谢谢。

英文:

How can I implement an M3 model (relation & AST) for any language, I have looked at the "M3: A General Model for Source Code Analytics in Rascal" and I get the gist of it but how can I actually implement one (for let's say SQL). Also any resource would be greatly appreciated, thanks.

答案1

得分: 0

以下是翻译好的部分:

总的来说,M3论文 是该设计的高层描述。

如何实现一个新的模型取决于您的源数据和您想要建模的语言类型。有时我们使用Rascal来恢复所有数据,有时我们使用现有的库/解析器来恢复数据。

一个例子是ClaiR - Rascal中的C语言分析 M3库。它主要使用eclipse cdt来获取大部分数据。

英文:

In general, that M3 paper is the high level description of the design.

How to implement a new one, depends on both your source data and what kind of language you want to model. Sometimes we recover all data using Rascal, sometimes we use an existing library/parser to recover the data.

An example is the ClaiR - C Language Analysis in Rascal m3 library. Which uses the eclipse cdt for most of the data.

huangapple
  • 本文由 发表于 2023年5月20日 23:54:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/76296085.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定