Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 354307
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T11:54:42+00:00 2026-05-12T11:54:42+00:00

background: – there are formal languages for expressing programming language valid lexicon and syntax

  • 0

background:
– there are formal languages for expressing programming language valid lexicon and syntax
– such representations (e.g. regular expression and context-free grammars) can be automatically compiled into lexicon/syntax analyzers for some programming language using some tools (e.g. LEX and YACC)

questions:
– are there such formal languages for defining programming language semantics ?
– are there compilers to automate generating the code of the semantic analyzer based on these formal languages ?
– any resources to read regarding source code semantic analysis ?

notes:
– you might find my question unrealistic, it’s ok… I’m a newbie to compilers ?
– by semantic analysis i really mean collecting necessary information out of source code for the next steps of code optimization and generation… this should include type/boundary checking… etc

i hope that i made myself clear
many thanks in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T11:54:42+00:00Added an answer on May 12, 2026 at 11:54 am

    There are many schemes for defining the semantics of programming languages:
    denotational semantics (which maps syntax into functions that compute program state);
    operational semantics (which amounts to building interpreters for your language),
    transformational semantics (which amounts to translating your languauge to another
    language for which some other semantics already exists), etc.

    Very few of them presently lead to systems usable for real programming languages. One of the other answers here suggests Centaur as a system that tries to do this.
    Action semantics by Peter Mosses is one of the more serious recent attempts.

    For real systems, rather more ad hoc methods are presently the most effective.
    These inlude systems in which the lexical and grammatical syntax can be effectively
    defined (as variants of LEX and YACC), and automatically build trees.
    Attribute grammars allow the specification of computations over trees,
    which allow one to define some kinds of analyses, such as symbol table
    construction or metrics (technically you could
    do denotational semantics this way). Most conventional languages (C, Java, C#,
    COBOL, …) all have relatively similar structures regarding control flow and
    data flow, and as a consequence one can build generic flow analysis routines
    to allow one to reason about such standard languages.

    Finally, you need a purpose for your semantic analysis: what facts
    exactly do you want to extract? The available static analysis
    systems have hybrid pattern-driven/procedural code methods for
    collecting the syntax, symbol-table, and flow facts of interest
    to compute specific answers to specific questions.

    Some systems enable one to use this semantic information to carry
    source code modification.

    One system that follows the more ad hoc approach above is our
    DMS Software Reengineering Toolkit, which also has the generic semantic defintions
    (syntax, symbol tables, data flow anlaysis) completed for real
    languages such as Java, C, C++ and COBOL. DMS can apply
    source-to-source transformations to the ASTs conditioned
    by various fact-collecting procedures, and this enables mass
    transformation of code in a reliable way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 195k
  • Answers 195k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Here's what I ended up going with: <TextBlock Name="ReadUnreadIndicator" Grid.Column="0"… May 12, 2026 at 6:59 pm
  • Editorial Team
    Editorial Team added an answer I would probably make one of the overloads into a… May 12, 2026 at 6:59 pm
  • Editorial Team
    Editorial Team added an answer Apparently, this is known as an "unowned" relationship, and is… May 12, 2026 at 6:59 pm

Related Questions

Background: I have a little video playing app with a UI inspired by the
Background: At my company we are developing a bunch applications that are using the
Background: Some time ago, I built a system for recording and categorizing application crashes
Background: I need to reserve an amount of memory below 0xA0000 prior to my
Background I am writing and using a very simple CGI-based (Perl) content management tool

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.