TD2 : Syntaxe vs. Sémantique

Le langage "nat" des suites binaires

  • sémantique : entiers naturels
  • syntaxe : représentation unaire
Grammaire arithmétique
C → 0 | 1 | … | 9
N → C+
E → N | E+E | E-E | E*E
V → a | b | … | z

Donner sa sémantique dénotationnelle

  • \left[\!| 0 |\!\right]_{bin} = 0_{\mathbb{N}} et \left[\!| 1 |\!\right]_{bin} = 1_{\mathbb{N}}
  • \left[\!| 0 |\!\right]_{nat} = \left[\!| 0 |\!\right]_{bin} = 0_{\mathbb{N}}
  • \left[\!| 1 |\!\right]_{nat} = \left[\!| 1 |\!\right]_{bin} = 1_{\mathbb{N}}
  • \left[\!| n 0 |\!\right]_{nat} = 2 \times \left[\!| n |\!\right]_{nat}+\left[\!| 0 |\!\right]_{bin} = 2 \times \left[\!| n |\!\right]_{nat}
  • \left[\!| n 1 |\!\right]_{nat} = 2 \times \left[\!| n |\!\right]_{nat}+\left[\!| 1 |\!\right]_{bin} = 2 \times \left[\!| n |\!\right]_{nat} + 1

avec '+' et 'x' les opérations habituelles de \mathbb{N}

Montrons que FIXME à completer

 
m1ilc/semantics_td_2.txt · Dernière modification: 2010/04/15 13:25 par suitable
 
Sauf mention contraire, le contenu de ce wiki est placé sous la licence suivante :CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki