cui-unige / modelisation-verification-2017

Cours de Master: Modélisation et Vérification
0 stars 1 forks source link

Homework #5 #14

Open saucisson opened 6 years ago

saucisson commented 6 years ago

Homework #5 has been released. Deadline is 13 december 2017 at 23:59. Look at the course homepage for more information.

sergentd commented 6 years ago

I can't find the homework 5 directory. What is its name and where is it located ? Thank you

saucisson commented 6 years ago

Sorry, i have forgotten to push. Fixed.

partizanos commented 6 years ago

Hello,

I have an issue with my linux environment setup and I had to format everything. After installing OS etc.. and the lesson related packages lua the busted atom etc with the bash script I have an issue with the tests in beginning busted could not locate fun

./src/adt/init.lua:1: module 'fun' not found:No LuaRocks module found for fun
    no field package.preload['fun']
    no file './src/fun.lua'

so i installed it luarocks install fun and after that the test files not only from the ctl folder all have the same mistake: test file attempt to call a nil value (field 'frommap') I post the whole log in the end because its a bit long which is a Fun module function

Any ideas? possibly helpful info: installed fun version : fun-scm-1.rockspec lua version:
Lua 5.3.4 Copyright (C) 1994-2017 Lua.org, PUC-Rio

I will need to use my 1 extra day if needed since time is tight. Thank you in advance

PS the log

Error → src/adt/init_spec.lua @ 57
#adt can create an operation from a sort
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:59: in function <src/adt/init_spec.lua:57>

Error → src/adt/init_spec.lua @ 63
#adt can print an operation
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:66: in function <src/adt/init_spec.lua:63>

Error → src/adt/init_spec.lua @ 70
#adt can check if two operations are equal
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:74: in function <src/adt/init_spec.lua:70>

Error → src/adt/init_spec.lua @ 80
#adt can create a term from an operation
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:82: in function <src/adt/init_spec.lua:80>

Error → src/adt/init_spec.lua @ 88
#adt can print a term
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:90: in function <src/adt/init_spec.lua:88>

Error → src/adt/init_spec.lua @ 96
#adt can check if two terms are equal
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:98: in function <src/adt/init_spec.lua:96>

Error → src/adt/init_spec.lua @ 109
#adt can check if two terms equivalent
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:111: in function <src/adt/init_spec.lua:109>

Error → src/adt/init_spec.lua @ 145
#adt can get the equivalence mapping between two terms
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:147: in function <src/adt/init_spec.lua:145>

Error → src/adt/init_spec.lua @ 215
#adt can replace variables in terms
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
    ./src/adt/init.lua:76: in metamethod '__newindex'
    src/adt/init_spec.lua:217: in function <src/adt/init_spec.lua:215>

Error → src/adt/init_spec.lua @ 224
#adt can create an rule from two terms
./src/adt/init.lua:76: attempt to call a nil value (field 'frommap')

stack traceback:
saucisson commented 6 years ago

You must not install fun using the command you typed, but instead using the following command, as stated in the README:

luarocks install rockspec/fun-scm-1.rockspec
partizanos commented 6 years ago

works, thanks for the quick feedback! what is the difference between the two (just curiosity)

saucisson commented 6 years ago

I have changed a bit the fun module in order to know if {} represents an empty list or an empty map. Tried to put an issue in the original module, but with no answer :'(