首页 > 其他分享 >COMP30023 C语言题析

COMP30023 C语言题析

时间:2023-04-14 11:55:24浏览次数:35  
标签:will CI submission make C语言 COMP30023 test 题析 your


COMP30023: Introduction to projects

March 24, 2023
1 Introduction
In this document, we will introduce how COMP30023 projects are structured, and outline how
you can make the most from the infrastructure which we provide.
Firstly, some attributes and expectations:
As per the handbook, there will be 2 projects weighted 15% each
Projects are to be completed individually
Submissions must be in written in C
Submissions must compile and run on COMP30023-provided VMs, and should produce
deterministic output
Submissions will be checked for plagiarism
2 Submission
The submission process may be slightly different to what you were used to. We expect:
Code to be submitted to your assigned Gitlab repository named comp30023-2023-project-
x in the subgroup with your username of the group comp30023-2023-projects on git-
lab.eng.unimelb.edu.au.
AND The full-40 digit SHA1 hash of your chosen commit to the relevant Project Assign-
ment on the LMS.
Failure to complete both successfully will result in mark deductions.
Upon submitting the hash, you should receive an automated comment indicating whether
your submission is valid/reachable on Gitlab. An example success message is: Taking commit
2e24d35658d1b552952d226f5362fa5863d09a3c from 2021-05-19T10:21:49Z, day 0.
Note that it acknowledges the hash which you submitted and the time of submission (given to
us by Canvas). From this, we calculate the day number: day 0 means that the submission is
on-time, day 1 means that it’s 1 day after the deadline, and so on.
We do not perform calculations on fractional days, and thus, it is up to you to consider whether
it’s worthwhile to make further submissions (if submitting late).
If you have an extension, please note that we will subtract your extension from this day number
when calculating your project mark.
1
3 Compilation
Unlike COMP20003 and COMP20007, we do not impose the usage of skeleton files or a particular
project structure (in terms of files/directories). You’re welcome to use either gcc or clang, and
anything in the C standard library (libc), and POSIX, provided it works on the VM, but
excluding calls to other libraries/services.
To ensure that your projects can be successfully tested, please make sure that there is a Makefile
at the root of your repository, which compiles the executable(s) defined in the specification to
the root of the repository also.
You’re welcome to write test cases and scripts (possibly in other languages) and use other build
systems during implementation. Feel free to keep these files for the final submission.
You can, but do not have to include copies of input files in your repository, as they will be
provided by the CI/marking environment.
Do not hard code file paths for test cases or files, or make assumptions about where your
executable will be launched from.
4 Testing
A breakdown of visible and hidden marks will be provided in project specifications.
We will endeavour to set up Gitlab Pipelines before the release of each project. The CI (Contin-
uous Integration) will allow you to test your code against visible cases and receive some limited
feedback before the submission deadline.
You can access the results of automated tests by following these steps:
1. Ensure that .gitlab-ci.yml is at the root of your repository.
After placing .gitlab-ci.yml at the root of your repository, every pushed commit should
trigger automated tests against your code.
2. After pushing a commit, you should see either a green tick mark, a blue pending progress
2
indicator, or a red cross to the right of the commit information.
Click this icon.
3. On the next screen, click the icon again, and access the test pipeline stage.
4. This will bring you to the very bottom of the test transcript for the latest commit.
Note that the marks shown in the results table of the transcript is indicative of marks you
will receive for visible test cases (and tasks). Please compare it with the number of possible
marks indicated in the specification.
The CI will fail (with a red cross) when any visible test case fails, and you may receive an email
about a failing pipeline from Gitlab.
We do not care about whether you use the CI when implementing your projects. However,
3
CI usage may be taken into account when considering extensions, plagiarism, and submission-
related issues.
Unless an error or alternative solution has been identified, in which case marks will be retroac-
tively awarded by re-testing all submissions, marks for automated components are final. There
will be no partial marks given for uncompilable or incorrect programs, nor ‘implementation
effort’.
Please note that when your submission fails in CI, it will likely fail the same way in the marking
environment. Debug your program on your VM in this case. Make sure that you’re happy
with what the CI reports.
5 Reading the Transcript
Here is an example transcript.
As it’s pretty straightforward, you may want to skip this section.
5.1 Header
The header should show that the test was executed on a COMP30023 runner, and the version
of the test script.
Running with gitlab-runner 15.9.1 (d540b510)
on admin-registry 2K4zH4xy, system ID: s_18ccc91b5924
...
$ /test.sh
COMP30023 2023 Project 1 Before Deadline Tests
v1, last modified 23/03/23
5.2 Commit Log
Next is the commit log. The top commit is the one that’s being tested.
Commit log:
8ec56c2f8ced6bbcabb6a946a24ef50d3f9d9278: Remove strip.
9544fc6320a3c26672147d31f8112c8e1315b90c: feat: -e optional parameter
5.3 Compilation
The compilation process will then be shown. If you’re missing marks for build quality, please
look to this section.
Common issues:
make clean is not implemented, or fails with non-zero status code
There are dirty files committed to the repository, or make clean is non-functional
Running make does not produce the required executable
Code files were marked with executable bit, use chmod -x to remove
4
make -B && make clean (output suppressed)
make clean
rm -f allocate process
make
gcc -c allocate.c -Wall -O2
gcc -c util.c -Wall -O2
gcc -o allocate allocate.o util.o -O2
OK -- ./allocate found. Copying to clean working directory.
5.4 Test case execution
Task 1 simple (0.5): Passed
Task 2 two processes (0.5): Passed
Each test will:
Come under a task in the marking criteria
Have a unique name (this will be reflect the names of sample test cases, if given)
Have a weight
Pass or fail
(Possibly) have diffs or error messages
5.5 Results table
Finally, there is the results table.
=============== START RESULTS TABLE ====================
Task 1: Shortest Job First 1.0
Task 2: Round Robin 1.5
Task 3: Best Fit Memory Allocation 1.5
Task 4: Controlling Real processes 1.5
Task 5: Performance statistics computation 1.0
Task 6: Build quality 1
Task 7: Quality of software practices #CODE_QUALITY#
Project 1 (Total): #TOTAL_MARKS#
================ END RESULTS TABLE =====================
Rows with ## are manually marked or excluded from CI.
This may include reports, challenge tasks, code quality etc.
Additionally, note that hidden cases are not included in the CI. Marks indicated are for visible
cases only.
6 Conclusion
This concludes our brief introductory guide to COMP30023 projects.
Please let us know if you find any issues with our infrastructure and feel free to ask for clarifi-
cation on any confusing aspects.

WX:codehelp mailto: [email protected]

标签:will,CI,submission,make,C语言,COMP30023,test,题析,your
From: https://www.cnblogs.com/julytwo/p/17317878.html

相关文章

  • Python与c语言的区别与联系
    Python与c语言都是一种机器学习语言,进过长时间的学习和总结,我将Python与c语言的一些特点总结成以下几点,不全面还望多多指正。1、因为C语言是编译型语言,python是解释型语言,所以python的执行速度没有C语言那么快。2、基本元素的区别,python中的基本元素相比于C语言大大减少,比较特殊......
  • 逍遥自在学C语言 | 位运算符~的高级用法
    前言在上一篇文章中,我们介绍了^运算符的高级用法,本篇文章,我们将介绍~运算符的一些高级用法。一、人物简介第一位闪亮登场,有请今后会一直教我们C语言的老师——自在。第二位上场的是和我们一起学习的小白程序猿——逍遥。二、相反数我们可以利用负数的补码性......
  • [每天例题]蓝桥杯 C语言 货物摆放
    货物摆放题目题目要求1.n=L×W×H2.本题的结果为一个整数。3.当n=4n=4时,有以下66种方案:1×1×4、1×2×2、1×4×1、2×1×2、2×2×1、4×1×1。由此,我们可以知道L、W、H为n的因子思路分析1.由于n过大,所以使用longlongint进行声明。2.先求出n的所有因数,......
  • c语言基础
    目录1、初识C语言1.1、第一个C语言程序1.2、变量与常量1.3、数据类型1.4、关键字2、分支与循环2.1、分支结构2.2、循环结构3、数组3.1、定义3.2、使用4、指针4.1、定义4.2、大小4.3、使用5、函数5.1、定义5.2、函数的分类5.3、形参与实参5.4、......
  • c语言贪吃蛇(2)关于蛇的函数封装
    hassnakenode():检测循环体内部是否含有蛇身结点,若有,则返回1(对应main输出蛇结点),否则判断点后移吗,再判断,之后返回0(不输出蛇结点)  addnode():创造新蛇结点,用malloc申请空间,并插入到尾结点之后。(尾插法)initsnake():创建初始头尾结点,malloc申请空间,方便后续蛇结点的添加,初始赋......
  • c语言贪吃蛇(1)地图实现
    采用循环输出来实现按照行和列的顺序两次for循环输出。代码:结果: ......
  • 编程打卡:C语言趣味编程习题做
    编程打卡:C语言趣味编程习题做百钱百鸡问题问题描述一只Cock卖5钱,Hen卖3钱,chicken卖0.33333333钱,真正工作的时候不要用浮点数存钱啊笨蛋!然后100钱买了100只鸡,问各买了多少只。设计思路解不定方程,穷举。两层循环遍历各种鸡的个数,第三种鸡可以直接相减得出结果,然后判......
  • C语言或C++语言的多个文件共同处理资料之方法
    C语言和C++语言在多个文件互相包含时会产生顺序方面的冲突,为了实现多个文件处理共同的资料,我说一个实现它的方法。把对象资料放在资料文件,在设置资料的方法文件中导入资料文件,然后在主文件中导入资料文件和方法文件,用方法文件的方法设置资料。它们的特点是依照先后顺序导入,不互相......
  • 关于百鸡百钱问题的C语言解决
    百鸡百钱问题 1.问题描述公鸡5钱一只,母鸡3钱一只,小鸡1钱三只,用一百个钱买一百只鸡,公鸡,母鸡,小鸡各多少只2.设计思路不妨先设公鸡数量为x母鸡数量为y小鸡数量为z则可列出方程:x+y+z=1005x+3y+1/3z=100又因为只有100钱所以x<20y<333.程序流程 4.代码#include<stdio.h>......
  • C语言二维数组
    #include<stdio.h>intmain(){/**inta[3][5];通常理解a为一个三行五列的矩阵*///二维数组的遍历inta[3][5];inti,j;for(i=0;i<3;i++){for(j=0;j<5;j++){a[i][j]=i*j;}}//二......