Giter VIP home page Giter VIP logo

logica-computacao's People

Watchers

 avatar  avatar

logica-computacao's Issues

Problemas na v2.3.0

gicabral/Logica-Computacao
teste26: falha
input do teste:



{
    if (! (1==0)) {
        println(1);
    }
    else{
        println(0);
    }
}

output esperado:
1

output recebido:

0

teste27: falha
input do teste:



{
    if (! (((1>0) || (1==0)) && (0==9))){
        println(1);
    }
}

não recebi nada de output!(stderr e stdout estão vazios e não deveriam)

teste35: falha
input do teste:


{
    int x;
    x = readln();
    println(x);
}

stdin do teste:
42
output esperado:
42

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 559, in evaluate
if tipo == tupla[1]:
TypeError: "int" object is not subscriptable

teste36: falha
input do teste:


{
    int x;
    x = readln();
    x = readln();
    println(x);
}

stdin do teste:
2
8
output esperado:
8

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 559, in evaluate
if tipo == tupla[1]:
TypeError: "int" object is not subscriptable

teste37: falha
input do teste:


{
    int x;
    int y;
    x = readln();
    y = x*2;
    println(y);
}

stdin do teste:
42
output esperado:
84

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 559, in evaluate
if tipo == tupla[1]:
TypeError: "int" object is not subscriptable

teste38: falha
input do teste:


{
    int x;
    int y;
    x = readln();
    y = readln();
    println(x+y);
}

stdin do teste:
5
4
output esperado:
9

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 559, in evaluate
if tipo == tupla[1]:
TypeError: "int" object is not subscriptable

teste44: falha
input do teste:


{
  int x;
  x = true;
  if (x){
    println(42);
  }
}

output esperado:
42

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 564, in evaluate
raise ValueError ("Vari\xe1vel n\xe3o compat\xedvel com o tipo declarado.")
ValueError: Vari\xe1vel n\xe3o compat\xedvel com o tipo declarado.

teste49: falha
input do teste:


{
    bool x;
    int y;
    x = false+1;
    y = x;
    println(y);
}

output esperado:
1

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 564, in evaluate
raise ValueError ("Vari\xe1vel n\xe3o compat\xedvel com o tipo declarado.")
ValueError: Vari\xe1vel n\xe3o compat\xedvel com o tipo declarado.

teste51: falha
input do teste:


{
  if(2){
    println(42);
  }
}

não recebi nada de output!(stderr e stdout estão vazios e não deveriam)

teste60: falha
input do teste:


{
    if("a"){
        println(1);
    }
}

não recebi nada de output!(stderr e stdout estão vazios e não deveriam)

teste67: falha
input do teste:


{
    if (!(false)){
        println(1);
    }
}


não recebi nada de output!(stderr e stdout estão vazios e não deveriam)

teste68: falha
input do teste:


{
    if (true && (!(1==1))){
        println(1);
    }
    else{
        println(2);
    }
}

output esperado:
2

output recebido:

1

teste70: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a;
    
    println(c);
}

output esperado:
1

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 564, in evaluate
raise ValueError ("Vari\xe1vel n\xe3o compat\xedvel com o tipo declarado.")
ValueError: Vari\xe1vel n\xe3o compat\xedvel com o tipo declarado.

teste71: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a + 1;
    
    println(c);
}

output esperado:
2

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 579, in evaluate
node.evaluate(ST)
File "main.py", line 558, in evaluate
tupla = self.filho[1].evaluate(ST) #vari\xe1vel (valor, tipo)
File "main.py", line 441, in evaluate
return (f0[0] + f1[0], INT)
TypeError: unsupported operand type(s) for +: "NoneType" and "int"

teste72: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 32;
    c = 32;
    a = true;

    if ((b && c) == a) {
    	println(1);
    }else{
    	println(2);
    }
}

output esperado:
1

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 629, in
if name =="main":main()
File "main.py", line 626, in main
Parser.run(codigo)
File "main.py", line 383, in run
res = Parser.block()
File "main.py", line 148, in block
nodes.append(Parser.command())
File "main.py", line 213, in command
node_l = Parser.command()
File "main.py", line 187, in command
node = Parser.block()
File "main.py", line 146, in block
Parser.tokens.selectNext()
File "main.py", line 139, in selectNext
raise ValueError("Simbolo desconhecido", self.origin[self.position])
ValueError: ("Simbolo desconhecido", "\t")

Problemas na v2.2.0

gicabral/Logica-Computacao
teste33: falha
input do teste:



{   
    if (((1==1) || (1==1) || (1==1)) || ((1==0) && (1==0) && (1==0))){
        println(1);
    }
}

output esperado:
1

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File 'main.py', line 499, in
if name =='main':main()
File 'main.py', line 496, in main
Parser.run(codigo)
File 'main.py', line 347, in run
res = Parser.block()
File 'main.py', line 133, in block
nodes.append(Parser.command())
File 'main.py', line 195, in command
node = Parser.parseOrExpression()
File 'main.py', line 337, in parseOrExpression
node = Parser.parseAndExpression()
File 'main.py', line 329, in parseAndExpression
node = Parser.parseEqualExpression()
File 'main.py', line 321, in parseEqualExpression
node = Parser.parseRealExpression()
File 'main.py', line 309, in parseRealExpression
node = Parser.parseExpression()
File 'main.py', line 294, in parseExpression
node = Parser.parseTerm()
File 'main.py', line 280, in parseTerm
node = Parser.parseFactor()
File 'main.py', line 262, in parseFactor
raise ValueError('N\xe3o fechou o parentesis', Parser.tokens.actual.value)
ValueError: ('N\xe3o fechou o parentesis', '||')

Problemas na v2.4.0

gicabral/Logica-Computacao
teste96: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:


int soma(int x, int y)
{
    int res;
    res = x + y;  
}

int main()
{
    int x;
    x = soma(3,5);/*Erro: funcao nao tem return*/
    println(x);
    
}

Problemas na v2.3.3

gicabral/Logica-Computacao
teste70: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a;
    
    println(c);
}

output esperado:
1

output recebido:

2

teste71: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a + 1;
    
    println(c);
}

output esperado:
2

output recebido:

3

Problemas na v2.3.2

gicabral/Logica-Computacao
teste44: falha
input do teste:


{
  int x;
  x = true;
  if (x){
    println(42);
  }
}

output esperado:
42

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 640, in
if name =="main":main()
File "main.py", line 637, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 586, in evaluate
node.evaluate(ST)
File "main.py", line 625, in evaluate
raise ValueError("Para essa opera\xe7\xe3o s\xf3 boolean \xe9 permito")
ValueError: Para essa opera\xe7\xe3o s\xf3 boolean \xe9 permito

teste50: falha
input do teste:


{
  if(1){
    println(42);
  }
}

output esperado:
42

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 640, in
if name =="main":main()
File "main.py", line 637, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 586, in evaluate
node.evaluate(ST)
File "main.py", line 625, in evaluate
raise ValueError("Para essa opera\xe7\xe3o s\xf3 boolean \xe9 permito")
ValueError: Para essa opera\xe7\xe3o s\xf3 boolean \xe9 permito

teste51: falha
input do teste:


{
  if(2){
    println(42);
  }
}

output esperado:
42

output recebido:

Mas algo saiu no stderror(que não deveria):
Traceback (most recent call last):
File "main.py", line 640, in
if name =="main":main()
File "main.py", line 637, in main
Parser.run(codigo)
File "main.py", line 387, in run
res.evaluate(ST)
File "main.py", line 586, in evaluate
node.evaluate(ST)
File "main.py", line 625, in evaluate
raise ValueError("Para essa opera\xe7\xe3o s\xf3 boolean \xe9 permito")
ValueError: Para essa opera\xe7\xe3o s\xf3 boolean \xe9 permito

teste70: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a;
    
    println(c);
}

output esperado:
1

output recebido:

2

teste71: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a + 1;
    
    println(c);
}

output esperado:
2

output recebido:

3

Problemas na 2.1

teste8: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:


x1 = 3;
x1 = x1 +1;
println(X1);

teste17: falha, não deu erro mais deveria (algo deveria ter saido no stderr)
input do teste:


println(1);
Println(2);
printLn(3);
PRINTLN(4);

Problemas na 3.0

5
Traceback (most recent call last):
File "main.py", line 814, in
if name =='main':main()
File "main.py", line 810, in main
Parser.run(codigo)
File "main.py", line 383, in run
res.evaluate(ST)
File "main.py", line 733, in evaluate
node.evaluate(ST)
File "main.py", line 791, in evaluate
self.filho[1].Evaluate(ST)
AttributeError: 'Block' object has no attribute 'Evaluate'

Problemas na v2.3.1

gicabral/Logica-Computacao
teste51: falha
input do teste:


{
  if(2){
    println(42);
  }
}

não recebi nada de output!(stderr e stdout estão vazios e não deveriam)

teste60: falha
input do teste:


{
    if("a"){
        println(1);
    }
}

não recebi nada de output!(stderr e stdout estão vazios e não deveriam)

teste70: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a;
    
    println(c);
}

output esperado:
1

output recebido:

2

teste71: falha
input do teste:


{
    bool a;
    int b;
    int c;
    
    b = 789;
    c = 689;

    a = (b && c) + 1;
    c = a + 1;
    
    println(c);
}

output esperado:
2

output recebido:

3

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.