mikera
mikera

Reputation: 106351

Languages that optimise using logic programming

Are there any languages that perform compile-time optimisation using arbitrary logic programming?

I'm looking for an example of a language that will enable you to do something like:

Upvotes: 5

Views: 160

Answers (1)

Ira Baxter
Ira Baxter

Reputation: 95354

I think what you want is a program transformation system.

These can let you define rules to apply to source code, e.g., algrebraic laws to optimize code.

What you will discover is that there is a variety of problems. The first is handling scoping rules and side effects in langauges. The second is sequencing of the transformations; the order in which they are applied often produces radically different results.

Upvotes: 2

Related Questions