Are there different programming languages that are compiled to the same intermediate language?

Roger L Costello <costello@mitre.org>
Sun, 29 Jan 2023 15:49:14 +0000

          From comp.compilers

Related articles
Are there different programming languages that are compiled to the same intermediate language? costello@mitre.org (Roger L Costello) (2023-01-29)
Re: Are there different programming languages that are compiled to the same intermediate language? tkoenig@netcologne.de (Thomas Koenig) (2023-01-29)
Re: Are there different programming languages that are compiled to the same intermediate language? arnold@freefriends.org (2023-01-30)
Re: Are there different programming languages that are compiled to the same intermediate language? billfahle@gmail.com (William Fahle) (2023-01-30)
Re: Are there different programming languages that are compiled to the same intermediate language? costello@mitre.org (Roger L Costello) (2023-01-30)
Re: Are there different programming languages that are compiled to the same intermediate language? 864-117-4973@kylheku.com (Kaz Kylheku) (2023-01-30)
Re: Are there different programming languages that are compiled to the same intermediate language? mwardgkc@gmail.com (Martin Ward) (2023-01-31)
[11 later articles]
| List of all articles for this month |
From: Roger L Costello <costello@mitre.org>
Newsgroups: comp.compilers
Date: Sun, 29 Jan 2023 15:49:14 +0000
Organization: Compilers Central
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="12704"; mail-complaints-to="abuse@iecc.com"
Keywords: translator, practice, comment
Posted-Date: 29 Jan 2023 11:58:54 EST
Thread-Topic: Are there different programming languages that are compiled to the same intermediate language?
Thread-Index: Adkz+TvWa4zLl8W9Qd6ovtClKZpZrA==
Accept-Language: en-US
Content-Language: en-US
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=mitre.org;

Hi Folks,


Programming_Language_1 has a compiler which generates Intermediate_Code_1.
Many backends are created for Intermediate_Code_1.


Time passes ....


Sally Smith creates Programming_Language_2. Sally wants to leverage the
compiler work done on Programming_Language_1. She considers two approaches:


1. Create a compiler front-end for Programming_Language_2 which compiles
instances to Intermediate_Code_1.
2. Create a translator which converts instances of Programming_Language_2 into
Programming_Language_1 instances.


Sally is concerned. She asks herself:


- With either approach, how do I prove that my mapping is correct?
- For approach 1, how do I prove that the Intermediate_Code_1 that I generate
is correct for my programming language?
- For approach 2, how do I prove that the instance of Programming_Language_1
that I generate is semantically equivalent to my Programming_Language_2
instance?"


What is the answer to Sally's questions?


/Roger
[I think the answer either way is that you don't, and you try to have a test
suite that is as comprehensive as possible. -John]


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.