# Function that maps strings from one formal language into string of another formal language?

Is there branch of mathematics and mathematical theories, that considers mappings from strings of one language into strings of another formal language?

Example. Let's consider two languages that can be used for syntax of two different logics and that can implement the formal semantics of natural language. One language uses the predicate approach to the modalities https://www.springer.com/us/book/9783319225562 and defer the inference about modalities till the reasoning time. The example of legal sentence in this language is:

believes(John, in_conservatives)


Other language uses the modalities in the form of modal operators as the first class citizens of the logic and now all the non-logical information about the notion "believe" is encoded in the axioms for the modal operator Belief_Diamond_(agent)(predicate) and hence, the sentence becomes in this language:

Belief_Diamond_(John)(in_conservatives)


So - I just had hopes that there is some theory, methods, best practices about translation from the first language into the second language (e.g. in the case when one decides to fix the notion of "belief" and one wishes to investigate it using the methods of logic).

Of course, as a programmer, I have no problem to make program, that parses the first sentence into the abstract syntax tree, then do some manipulation in this syntax tree (AST) or maybe event do mapping into the syntax tree of another language and then output the other language sentence. So - essentially - this is the question about mapping from the AST of one language to the AST of another language. But if I had intention to make my efforts methodological and scientific, what theories, good practices, approaches should I use? I am afraid to follow the hammering approach of just pure programming in industrial languages.

I have found good article about translating and combining logics (and hopefully - it operates at the level of institutions) https://academic.oup.com/logcom/article-abstract/27/6/1753/2687725 - maybe this is one direction.

• Exactly what do you mean? Can you give a specific example? May 13 '19 at 15:12
• Since "formal language" is just any set of strings and strings can have pretty arbitrary interpretations, you seem to be asking for theories about mappings from some strings to other strings. That is not really specific enough that there's much to say about them that is not also about mappings in general, but if you can suggest some particular properties that your languages and mappings satisfy, it may be possible to find something. May 16 '19 at 11:37