Find Jobs
Hire Freelancers

implementing a Type checker for AST -- 2

$240-2000 HKD

Fechado
Publicado há quase 3 anos

$240-2000 HKD

Pago na entrega
In Java, write a type-checker for the language specified by the CFG below, with initial variable E: E → INT  |  ID  |  (E BINOP E) | E COMP E  |  BLOCK  |  ID := E | if E then BLOCK else BLOCK | while E do BLOCK | repeat BLOCK until E BLOCK → { ENE } ENE → E  |  E; ENE COMP → ==  |  <  |  >  |  <=  |  >= BINOP → +  |  −  |  *  |  / ID → (an identifier) INT → (an integer) The type-checker is not responsible for constructing an AST for an expression as above, but may take it as input. It is also not responsible for checking that variables are well-defined where they occur: it is allowed to assume that any variable it encounters is well-defined, and has type Int. Your type-checker should assign types as follows: It should assign Int to any identifier, integer, or arithmetic expression on values of type Int; It should assign Bool to any comparison between values of type Int; It should assign Unit to any if statement or any loop, or to any assignment to an identifier; It should assign to any BLOCK, the type of the last expression within that BLOCK. The type-checker should produce a String as output, containing the value "Int", "Bool", or "Unit", as appropriate. The type-checker should throw a TCException if it encounters any of the following: an expression which either involves comparisons / operations / assignments in which one arguments does not have type Int; a conditional / loop with a condition which is not of type Bool; a conditional / loop with a BLOCK expression which is not of type Unit. In the tests that it will be checks against, it should always terminate correctly or throw a TCException; in particular, it should not simply abort if it encounters some other problem.
ID do Projeto: 30944701

Sobre o projeto

3 propostas
Projeto remoto
Ativo há 3 anos

Quer ganhar algum dinheiro?

Benefícios de ofertar no Freelancer

Defina seu orçamento e seu prazo
Seja pago pelo seu trabalho
Descreva sua proposta
É grátis para se inscrever e fazer ofertas em trabalhos
3 freelancers estão ofertando em média $1.217 HKD for esse trabalho
Avatar do Usuário
Hi, I start on this and finish ASAP. I am a Java with Spring /Spring Boot, C, C++,.Net,C#, Python, Trainer & Web Developer(HTML,CSS,BootStrap, JS,Angular,ASP.Net,Django) for more than 7 years and have completed lot of similar projects in the past. I have worked with all types of SQL/NoSQL databases too. My goal is to obtain challenging work with 100% client satisfaction and highly budgeted costs. Given an opportunity will provide a viable and timely solution. Kindly contact me to discuss further. Regards Vineet Mishra
$650 HKD em 1 dia
4,9 (10 avaliações)
4,6
4,6
Avatar do Usuário
Hi Nice to meet you. I have read your job carefully and I'm very confident about your job. As a talented application developer, I have much experience with JAVA for more than 10+ years. If you give me a chance to chat with you, I surely show you my skill related to your job. Hope your kind contact. ★★★★★★★★★★★★★★★★★★★★★★ Thanks.
$1.000 HKD em 3 dias
5,0 (3 avaliações)
2,4
2,4
Avatar do Usuário
Hello I am a java expert and confident in java language. I can solve your problem. Let's discuss more details. Hope to hear from you. thanks.
$2.000 HKD em 7 dias
0,0 (0 avaliações)
0,0
0,0

Sobre o cliente

Bandeira do(a) HONG KONG
Ma On Shan, Hong Kong
5,0
13
Método de pagamento verificado
Membro desde ago. 23, 2015

Verificação do Cliente

Obrigado! Te enviamos um link por e-mail para que você possa reivindicar seu crédito gratuito.
Algo deu errado ao enviar seu e-mail. Por favor, tente novamente.
Usuários Registrados Total de Trabalhos Publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Carregando pré-visualização
Permissão concedida para Geolocalização.
Sua sessão expirou e você foi desconectado. Por favor, faça login novamente.