Add multilingual Agila learning examples and Git practice guide

This commit is contained in:
Agila University committed 2026-11-01 14:08:37 +08:00
commit 85f487afb0
79 files changed
+813

No files matched your search

+40
View File
@@ -0,0 +1,40 @@
# Agila learning examples
English (`en/`), Tagalog (`tl/`), and Bisaya/Cebuano (`ceb/`) examples for [Agila University](https://178.128.52.236/).
Read the lesson, predict the output, run the example in the browser code lab, and change one thing. Pass the automated lesson check to earn its certificate. No human mentor is required.
Flying V is Agila's application language. These programs use the public SDK host sandbox, which logs application events and UI descriptions. It does not render the Agila desktop. The University runner currently uses V 0.5.2 with an isolated compatibility adapter for the public SDK. Ada examples use GNAT; Rust and Pascal introductory programs are also included.
**Intentional bug:** `ai-explain-before-run/main.adb` uses `Score > 70`, returning FALSE at 70. Explain and repair the boundary to satisfy an at-least-70 requirement. Starters are exercises, not necessarily completed solutions.
## Git: clone, change, explain
Copy this reference repository:
```sh
git clone https://167.71.210.40/matt/agila-learning-examples.git
cd agila-learning-examples
git switch -c my-first-experiment
git status
git diff
```
To publish your work, use your administrator-created Forge account to create your own repository. Clone its HTTPS URL, copy the examples you are practicing into it, and create a branch:
```sh
git switch -c my-first-experiment
git status
git add README.md main.adb
git diff --staged
git commit -m "Explain and test my first experiment"
git push -u origin my-first-experiment
```
Replace `main.adb` with your actual source filename. Use your Forge username and a scoped access token for authenticated HTTPS Git. Keep credentials out of source files. Pushing to this reference repository requires the appropriate permission.
**Tagalog:** Basahin ang code, hulaan ang resulta, patakbuhin, at ipaliwanag ang pagbabago. Suriin ang `git diff` bago mag-commit.
**Bisaya:** Basaha ang code, tag-ana ang resulta, padagana, ug ipasabot ang kausaban. Susihon ang `git diff` sa dili pa mag-commit.
The source SDK is in [matt/open_agila_sdk](https://167.71.210.40/matt/open_agila_sdk). Continue with boundary tests, failure cases, and the automated knowledge checks.
+9
View File
@@ -0,0 +1,9 @@
# Bahin sa pag-uswag nga imong mapamatud-an
Palapda ang bahin sa level pinaagi sa imong kaugalingong operasyon nga adunay klarong specification. Isumite ang ebidensiya sa malampuson ug gipaabot nga mapakyas nga mga kaso uban sa mapasabot nga pagrepaso.
- Itala ang gitugot nga input ug gisaad nga resulta.
- Ipadayon nga aktibo ang assertion checking ug itala ang compiler settings.
- Sulayi ang ubos ug taas nga balidong input ug lahi nga paglapas sa precondition.
- Ipakita nga masakpan ang tinuyong sayop nga body, unya ibalik ang husto.
- Ipasabot ang nahibiling limitasyon ug ilha ang sunod nga lakang sa pagtuon.
+18
View File
@@ -0,0 +1,18 @@
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
subtype Level is Integer range 0 .. 10;
function Next_Level (Current : Level) return Level
with Pre => Current < Level'Last,
Post => Next_Level'Result = Current + 1;
function Next_Level (Current : Level) return Level is
begin
return Current + 1;
end Next_Level;
begin
pragma Assert (Next_Level (0) = 1);
pragma Assert (Next_Level (9) = 10);
Ada.Text_IO.Put_Line ("Nakapasar ang duha ka pagsusi sa utlanan");
end Main;
+8
View File
@@ -0,0 +1,8 @@
# Ang akong mapasabot nga pahibalo sa pagtuon
Pagsulat og mubo nga programa sa Ada nga mopahibalo sa tumong sa pagtuon ug mopakita og mensahe sa pag-uswag kon matuman ang kondisyon.Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
- Ipasabot sa imong kaugalingong mga pulong ang with, deklarasyon, begin/end, :=, ug =.
- Ipakita ang usa ka sinugdanang bili nga mopagawas sa mensahe nga may kondisyon ug usa nga dili.
- Itala ang usa ka tinuyong sayop sa syntax ug kon giunsa pagtabang sa compiler sa pagpangita niini.
- Ilha ang bisan unsang tabang sa AI ug ipasabot ang matag linyang imong gipabilin.
+11
View File
@@ -0,0 +1,11 @@
with Ada.Text_IO;
procedure Main is
Lessons_Done : Natural := 0;
begin
Ada.Text_IO.Put_Line ("Ang una nakong sesyon sa pagtuon sa Agila");
Lessons_Done := Lessons_Done + 1;
if Lessons_Done = 1 then
Ada.Text_IO.Put_Line ("Nahuman ang usa ka leksiyon");
end if;
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pagkuwenta sa plano sa pagtuon nga magamit pag-usab
Paghimo ug pagsulay og gamay nga bahin alang sa ihap sa leksiyon. Sugdi sa nested function; mahimo nimo kining ibalhin ngadto sa Ada package sa lokal nga proyekto nga adunay daghang file.
- Isulti ang patakaran sa Total/Done nga dili motudlo sa source code.
- Susihi ang (0,0), (4,0), (4,3), (4,4), ug (4,5).
- Ipasabot nganong maabot lamang ang subtraction kon ang Done ubos sa Total.
- Ilahi ang pagkuwenta gikan sa output.
- Iapil ang tala sa pagrepaso nga nagpasabot sa usa ka desisyon sa disenyo ug usa ka limitasyon.
+13
View File
@@ -0,0 +1,13 @@
with Ada.Text_IO;
procedure Main is
function Remaining (Total, Done : Natural) return Natural is
begin
if Done >= Total then
return 0;
end if;
return Total - Done;
end Remaining;
begin
Ada.Text_IO.Put_Line (Natural'Image (Remaining (4, 1)));
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Tigsusi sa marka nga adunay talahanayan sa mga test
Usba ang sinugdanang code aron mahimong mapasabot nga tigsusi sa marka nga adunay dokumentadong utlanan sa pagrepaso. Gamita una ang gitakdang raw values aron mausab ang praktis sa dili pa modugang og interaktibong input.
- Idokumento ang gidawat nga mga bili ug ang tubag sa dili balidong bili.
- Sulayi ang -1, 0, 1, 99, 100, ug 101.
- Sulayi ang duha ka kilid ug ang eksaktong utlanan sa pagrepaso.
- Ipasabot ang membership test, conversion, ug bisan unsang paghan-ay sa mensahe.
- Bahin sa pag-uswag nga imong mapamatud-an
+12
View File
@@ -0,0 +1,12 @@
with Ada.Text_IO;
procedure Main is
subtype Score is Integer range 0 .. 100;
Raw : Integer := 101;
begin
if Raw in Score then
Ada.Text_IO.Put_Line ("Gidawat" & Score'Image (Score (Raw)));
else
Ada.Text_IO.Put_Line ("Kinahanglang tali sa 0 ug 100 ang marka");
end if;
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pagrepaso sa draft sa utlanan nga murag gihimo sa AI
Susihi ug ayuha ang tinuyong sayop nga function sa utlanan.Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
- Isulti pag-usab sa imong mga pulong ang requirement nga dili moubos sa 70.
- Isubay ang 69, 70, ug 71 sa dili pa padaganon.
- Ipakita ang sayop ug gitul-id nga pagtandi uban sa aktuwal nga mga resulta.
- Ipasabot ang type sa input, Boolean nga resulta, ug tawag alang sa output.
- Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
+10
View File
@@ -0,0 +1,10 @@
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score > 70; -- Tinuyong pananglitan nga susihon
end Passed;
begin
Ada.Text_IO.Put_Line (Boolean'Image (Passed (70)));
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pakete alang sa pagrepaso sa Agila Forge
Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
- Iapil ang README nga adunay problema, mga kinahanglan sa dili pa magsugod, eksaktong command, ug limitasyon.
- Isumite ang source ug lahi nga ebidensiya sa normal nga kaso, utlanan, ug kapakyasan.
- Repasoha ang diff ug ipasabot ang matag gipabiling pag-usab.
- Idokumento ang tabang sa AI ug ang pagpamatuod nga imong mismo gihimo.
- Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
+20
View File
@@ -0,0 +1,20 @@
# Pakete alang sa pagrepaso
Problema ug gituyong lihok:
Mga tool / compiler / SDK revision:
Mga command sa pag-build ug pagpadagan:
Test case | Gipaabot | Aktuwal | Nganong importante kini nga kaso
Desisyon sa disenyo ug patakaran sa kapakyasan:
Tabang sa AI ug akong pagpamatuod:
Nailhang mga limitasyon:
Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
Sunod nga tumong sa pagtuon:
+9
View File
@@ -0,0 +1,9 @@
# Mubo nga ulat sa bug nga adunay mabalik nga ebidensiya
Himoang klarong ulat sa bug ug pag-ayo ang depekto sa utlanan. Iapil ang lahi nga gipaabot nga mga resulta, regression test, ug tin-aw nga limitasyon.
- Isulti ang requirement ug kuwentaha ang gipaabot sa dili pa mopadagan.
- Ipakita ang pinakagamay nga input nga mopadayag sa orihinal nga kalainan.
- Ipakita nga mapakyas ang test sa depekto ug mopasar human sa pag-ayo.
- Itala ang assertion policy ug compiler command.
- Ipasabot ang usa ka wala masulaying requirement ug isugyot ang sunod nga may kalabotang kaso.
+14
View File
@@ -0,0 +1,14 @@
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score >= 70;
end Passed;
begin
pragma Assert (not Passed (69));
pragma Assert (Passed (70));
pragma Assert (Passed (71));
Ada.Text_IO.Put_Line ("Nakapasar ang mga pagsusi sa utlanan");
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pagrepaso sa SDK nga adunay ebidensiya
Susihi ang mubo nga draft sa Flying V batok sa gipagawas nga SDK. Paghimo og suportadong prototype ug lista sa mga pahayag nga nagkinahanglan pa og dokumentasyon.
- Susihi ang UI field, han-ay sa lifecycle, ug pahayag bahin sa graphics output.
- Itala ang eksaktong source path ug SDK revision nga gigamit.
- Ilha ang mga pahayag kon suportado, gisupak, o wala mapamatud-i.
- Padagana ang suportadong prototype ug itandi ang gipaabot sa aktuwal nga output.
- Ipasabot ang utlanan sa sandbox ug ipadayon nga gimarkahan isip sugyot ang umaabot nga mga interaksiyon.
+5
View File
@@ -0,0 +1,5 @@
import agila
fn main() {
agila.preview(agila.Button{label: 'Sugdi ang praktis'})
}
+9
View File
@@ -0,0 +1,9 @@
# Tala sa pagtuon sa tulo ka lakang
Pagsulat og Flying V nga programa nga mo-log sa sinugdanan, tumong, ug kataposan sa sesyon sa pagtuon gamit ang dokumentadong function sa SDK.
- Gamita ang agila.log ug ilha ang depinisyon niini sa publikong SDK.
- Tagnaa ang eksaktong output, apil ang prefix sa SDK, sa dili pa padaganon.
- Ipasabot ang import, main, string argument, ug han-ay sa mga sugo.
- Itala ang usa ka diagnostic tungod sa sayop nga spelling sa function ug ang pag-ayo niini.
- Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
+5
View File
@@ -0,0 +1,5 @@
import agila
fn main() {
agila.log('Makahimo ko pagpasabot niini nga programa')
}
+9
View File
@@ -0,0 +1,9 @@
# Laboratoryo sa lifecycle nga adunay gipaabot nga kapakyasan
Paghimo og gamay nga application ug managlahi nga eksperimento sa lifecycle. Ipasabot unsang error ang makita sa SDK ug unsay sunod nga buhaton sa application.
- Ipakita ang normal nga han-ay nga create/start/request/stop.
- Lahi nga sulayi ang walay sulod nga id ug walay sulod nga ngalan.
- Lahi nga sulayi ang request sa wala pa start ug ang duha ka start.
- Ipasabot ang kalainan sa error handler nga mo-return ug sa mopadayon.
- Itala ang source, output, ug mga limitasyon sa pagsusi sa capability sa sandbox alang sa reviewer.
+15
View File
@@ -0,0 +1,15 @@
import agila
fn main() {
mut app := agila.new_app('dev.student.study', 'Kauban sa Pagtuon') or {
eprintln(err.msg())
return
}
app.start() or {
eprintln(err.msg())
return
}
app.request(.ui) or { eprintln(err.msg()) }
agila.log('Andam na sa pagtuon')
app.stop()
}
+9
View File
@@ -0,0 +1,9 @@
# Paghulagway sa study card alang sa bag-ohan
Gamita ang gihatag nga mga klase sa widget sa paghulagway sa study card. Ilahi ang nasusi nga sandbox output gikan sa imong drowing sa umaabot nga interaktibong lihok.
- Paghimo og Column gamit ang mga child nga Text ug Button.
- Tagnaa ug susiha ang ihap sa child alang sa usa, duha, ug tulo.
- I-preview ang lahi nga Text ug Button ug ipasabot ang mga paghulagway niini.
- Pagpili og masabtan nga teksto ug itala ang komentaryo sa usa ka magbabasa.
- Ilain ang lista sa gituyong mga interaksiyon ug ipasabot nganong walay callback ang kasamtangang Button.
+11
View File
@@ -0,0 +1,11 @@
import agila
fn main() {
view := agila.Column{
children: [
agila.Text{value: 'Karong adlawa: sabta ang usa ka function'},
agila.Button{label: 'Sugdi ang praktis'},
]
}
agila.preview(view)
}
@@ -0,0 +1,9 @@
# Mapasabot nga prototype sa Agila study app
Pag-andam og prototype sa Flying V nga mahimong repasohon gamit ang dokumentadong lifecycle ug UI contracts. Idugang ang lahi nga eksperimento sa descriptor validation; idokumento unsa ang napamatud-an sa sandbox ug unsa ang nagkinahanglan sa production runtime.
- Ipasabot ang tanang gigamit nga API uban sa tinubdan sa publikong SDK.
- Iapil ang usa ka malampusong lifecycle ug usa ka kasong adunay gidumalang error.
- Iapil ang UI description ug tukmang gipaabot nga sandbox output.
- Lahi nga sulayi ang balido, zero, ug negatibong mesh counts.
- Repasoha ang imong source, tagna, ug aktuwal nga resulta. Gamita ang puna sa awtomatikong pagsusi aron balikan ang sayop ug pilion ang sunod nga test.
@@ -0,0 +1,12 @@
import agila
fn main() {
mesh := agila.MeshDescriptor{
vertex_count: 3
index_count: 3
}
agila.submit_mesh(mesh) or {
eprintln(err.msg())
return
}
}
+4
View File
@@ -0,0 +1,4 @@
program HelloAgila;
begin
writeln('Kumusta, Agila!');
end.
+1
View File
@@ -0,0 +1 @@
fn main() { println!("Kumusta, Agila!"); }
+9
View File
@@ -0,0 +1,9 @@
# A reviewed progress component
Extend the level component with a clearly specified operation of your own. Submit both successful and expected-failure evidence plus a reviewable explanation.
- Record the allowed inputs and promised result.
- Keep assertion checking enabled and record compiler settings.
- Test low and high valid inputs and one precondition violation separately.
- Demonstrate that a deliberately wrong body is caught, then restore it.
- Explain a remaining limitation and identify one next learning step.
+18
View File
@@ -0,0 +1,18 @@
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
subtype Level is Integer range 0 .. 10;
function Next_Level (Current : Level) return Level
with Pre => Current < Level'Last,
Post => Next_Level'Result = Current + 1;
function Next_Level (Current : Level) return Level is
begin
return Current + 1;
end Next_Level;
begin
pragma Assert (Next_Level (0) = 1);
pragma Assert (Next_Level (9) = 10);
Ada.Text_IO.Put_Line ("Two boundary checks passed");
end Main;
+8
View File
@@ -0,0 +1,8 @@
# My explainable study announcement
Write a short Ada program that announces a study goal and conditionally prints a progress message. Submit the source, your predictions, and actual results for your self-review.
- Explain with, the declaration, begin/end, :=, and = in your own words.
- Show one starting value that prints the conditional message and one that does not.
- Record one deliberate syntax mistake and how the compiler helped locate it.
- Credit any AI assistance and explain every retained line.
+11
View File
@@ -0,0 +1,11 @@
with Ada.Text_IO;
procedure Main is
Lessons_Done : Natural := 0;
begin
Ada.Text_IO.Put_Line ("My first Agila study session");
Lessons_Done := Lessons_Done + 1;
if Lessons_Done = 1 then
Ada.Text_IO.Put_Line ("One lesson completed");
end if;
end Main;
+9
View File
@@ -0,0 +1,9 @@
# A reusable study-plan calculation
Build and test a small lesson-count component. Start with the nested function; optionally extract it into an Ada package in a local multi-file project.
- State the Total/Done policy without referring to source code.
- Check (0,0), (4,0), (4,3), (4,4), and (4,5).
- Explain why the subtraction is reached only when Done is below Total.
- Keep calculation separate from output.
- Include a review note explaining one design choice and one limitation.
+13
View File
@@ -0,0 +1,13 @@
with Ada.Text_IO;
procedure Main is
function Remaining (Total, Done : Natural) return Natural is
begin
if Done >= Total then
return 0;
end if;
return Total - Done;
end Remaining;
begin
Ada.Text_IO.Put_Line (Natural'Image (Remaining (4, 1)));
end Main;
+9
View File
@@ -0,0 +1,9 @@
# A score validator with a test table
Adapt the starter into an explainable score validator with a documented review threshold. Use fixed raw values for repeatable practice before adding interactive input.
- Document accepted values and the response to invalid values.
- Test -1, 0, 1, 99, 100, and 101.
- Test the review threshold on both sides and exactly at it.
- Explain the membership test, conversion, and any message formatting.
- Include actual output and a short self-review note.
+12
View File
@@ -0,0 +1,12 @@
with Ada.Text_IO;
procedure Main is
subtype Score is Integer range 0 .. 100;
Raw : Integer := 101;
begin
if Raw in Score then
Ada.Text_IO.Put_Line ("Accepted" & Score'Image (Score (Raw)));
else
Ada.Text_IO.Put_Line ("Score must be between 0 and 100");
end if;
end Main;
+9
View File
@@ -0,0 +1,9 @@
# A review of an AI-style threshold draft
Review and repair the deliberately flawed threshold function. Present your reasoning so you can verify it without the conversation that produced the draft.
- Restate the at-least-70 requirement in your own words.
- Trace 69, 70, and 71 before execution.
- Show the incorrect and corrected comparisons with actual results.
- Explain input type, Boolean result, and the output call.
- Record AI assistance and answer one new boundary example you predict and test.
+10
View File
@@ -0,0 +1,10 @@
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score > 70; -- Deliberate candidate to review
end Passed;
begin
Ada.Text_IO.Put_Line (Boolean'Image (Passed (70)));
end Main;
+9
View File
@@ -0,0 +1,9 @@
# An Agila Forge review packet
Take one Ada or Flying V project from these tracks and prepare a focused repository contribution that you can reproduce and test independently.
- Include a README with problem, prerequisites, exact commands, and limitations.
- Submit source and independent normal/boundary/failure evidence.
- Review the diff and explain every retained change.
- Document AI assistance and verification you performed yourself.
- Record automated feedback, revisions, final check results, and a next learning objective.
+19
View File
@@ -0,0 +1,19 @@
# Review packet
Problem and intended behavior:
Tools / compiler / SDK revision:
Build and run commands:
Test case | Expected | Actual | Why this case matters
Design choice and failure policy:
AI assistance and my verification:
Known limitations:
Automated feedback and revisions:
Next learning objective:
+9
View File
@@ -0,0 +1,9 @@
# A small bug report with reproducible evidence
Turn the threshold defect into a concise bug report and repair. Include independent expected results, a regression test, and a clearly stated limit.
- State a requirement and derive expectations before running.
- Show the smallest input that reveals the original mismatch.
- Demonstrate that the test fails for the defect and passes after the repair.
- Record the assertion policy and compiler command.
- Explain one untested requirement and propose the next relevant case.
+14
View File
@@ -0,0 +1,14 @@
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score >= 70;
end Passed;
begin
pragma Assert (not Passed (69));
pragma Assert (Passed (70));
pragma Assert (Passed (71));
Ada.Text_IO.Put_Line ("Threshold checks passed");
end Main;
+9
View File
@@ -0,0 +1,9 @@
# An evidence-backed SDK review
Review a short Flying V draft against the released SDK. Produce a supported prototype and a list of claims that need further documentation.
- Check a UI field, lifecycle sequence, and graphics-output claim.
- Record the exact source paths and SDK revision used.
- Classify claims as supported, contradicted, or not established.
- Run the supported prototype and compare expected with actual output.
- Explain the sandbox boundary and keep future interactions labeled as proposals.
+5
View File
@@ -0,0 +1,5 @@
import agila
fn main() {
agila.preview(agila.Button{label: 'Begin practice'})
}
+9
View File
@@ -0,0 +1,9 @@
# A three-step study log
Write a Flying V program that logs the beginning, goal, and end of a study session using the documented SDK function.
- Use agila.log and identify its definition in the public SDK.
- Predict exact output, including the SDK prefix, before execution.
- Explain import, main, the string argument, and statement order.
- Record one misspelled-function diagnostic and the repair.
- Submit source and output for your self-review with the toolchain version.
+5
View File
@@ -0,0 +1,5 @@
import agila
fn main() {
agila.log('I can explain this program')
}
+9
View File
@@ -0,0 +1,9 @@
# A lifecycle lab with expected failures
Build a small application and a set of isolated lifecycle experiments. Explain which errors the SDK detects and what your application does next.
- Show a normal create/start/request/stop sequence.
- Test empty id and empty name independently.
- Test request-before-start and double-start independently.
- Explain the difference between an error handler that returns and one that continues.
- Record source, output, and the limitations of sandbox capability checks for review.
+15
View File
@@ -0,0 +1,15 @@
import agila
fn main() {
mut app := agila.new_app('dev.student.study', 'Study Buddy') or {
eprintln(err.msg())
return
}
app.start() or {
eprintln(err.msg())
return
}
app.request(.ui) or { eprintln(err.msg()) }
agila.log('Ready to study')
app.stop()
}
+9
View File
@@ -0,0 +1,9 @@
# A beginner study-card description
Use the supplied widget types to describe a study card. Separate the verified sandbox output from your sketch of future interactive behavior.
- Compose a Column using Text and Button children.
- Predict and check child counts for one, two, and three children.
- Preview an individual Text and Button and explain their descriptions.
- Choose understandable text and record feedback from a reader.
- List intended interactions separately and explain why the current Button does not implement a callback.
+11
View File
@@ -0,0 +1,11 @@
import agila
fn main() {
view := agila.Column{
children: [
agila.Text{value: 'Today: understand one function'},
agila.Button{label: 'Begin practice'},
]
}
agila.preview(view)
}
@@ -0,0 +1,9 @@
# An explainable Agila study-app prototype
Prepare a reviewable Flying V prototype using documented lifecycle and UI contracts. Add a separate descriptor-validation experiment; document what the sandbox establishes and what needs a production runtime.
- Explain all retained APIs with references to the public SDK.
- Include one successful lifecycle and one handled failure case.
- Include a UI description and accurate expected sandbox output.
- Test valid, zero, and negative mesh counts independently.
- Publish source, commands, actual results, limitations, and AI-use notes for your self-review; never include credentials.
@@ -0,0 +1,12 @@
import agila
fn main() {
mesh := agila.MeshDescriptor{
vertex_count: 3
index_count: 3
}
agila.submit_mesh(mesh) or {
eprintln(err.msg())
return
}
}
+4
View File
@@ -0,0 +1,4 @@
program HelloAgila;
begin
writeln('Hello, Agila!');
end.
+1
View File
@@ -0,0 +1 @@
fn main() { println!("Hello, Agila!"); }
+9
View File
@@ -0,0 +1,9 @@
# Bahagi para sa pag-usad na dumaan sa pagsusuri
Palawakin ang bahaging para sa level gamit ang sarili mong operasyong may malinaw na specification. Isumite ang ebidensiya ng matagumpay at inaasahang kabiguang mga kaso kasama ang paliwanag na maaaring suriin.
- Itala ang pinapayagang input at ipinangakong resulta.
- Panatilihing nakabukas ang assertion checking at itala ang compiler settings.
- Subukan ang mababa at mataas na wastong input at hiwalay na paglabag sa precondition.
- Ipakitang nahuhuli ang sadyang maling body, at pagkatapos ay ibalik ito.
- Ipaliwanag ang natitirang limitasyon at tukuyin ang susunod na hakbang sa pag-aaral.
+18
View File
@@ -0,0 +1,18 @@
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
subtype Level is Integer range 0 .. 10;
function Next_Level (Current : Level) return Level
with Pre => Current < Level'Last,
Post => Next_Level'Result = Current + 1;
function Next_Level (Current : Level) return Level is
begin
return Current + 1;
end Next_Level;
begin
pragma Assert (Next_Level (0) = 1);
pragma Assert (Next_Level (9) = 10);
Ada.Text_IO.Put_Line ("Pumasa ang dalawang pagsusuri sa hangganan");
end Main;
+8
View File
@@ -0,0 +1,8 @@
# Ang maipapaliwanag kong anunsiyo sa pag-aaral
Sumulat ng maikling programang Ada na nagpapahayag ng layunin sa pag-aaral at naglalabas ng mensahe ng pag-usad kapag natugunan ang kondisyon.Suriin ang iyong source, hula, at aktuwal na resulta. Gamitin ang puna ng awtomatikong pagsusuri upang balikan ang mali at piliin ang susunod na test.
- Ipaliwanag sa sarili mong salita ang with, deklarasyon, begin/end, :=, at =.
- Ipakita ang isang panimulang halagang naglalabas ng mensaheng may kondisyon at isa na hindi.
- Itala ang isang sadyang mali sa syntax at kung paano nakatulong ang compiler upang mahanap ito.
- Kilalanin ang anumang tulong ng AI at ipaliwanag ang bawat linyang pinanatili mo.
+11
View File
@@ -0,0 +1,11 @@
with Ada.Text_IO;
procedure Main is
Lessons_Done : Natural := 0;
begin
Ada.Text_IO.Put_Line ("Ang una kong sesyon ng pag-aaral sa Agila");
Lessons_Done := Lessons_Done + 1;
if Lessons_Done = 1 then
Ada.Text_IO.Put_Line ("Natapos ang isang aralin");
end if;
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pagkuwenta ng plano sa pag-aaral na muling magagamit
Bumuo at subukan ang maliit na bahaging nagkukuwenta ng bilang ng aralin. Magsimula sa nested function; maaari mo itong ilipat sa isang Ada package sa lokal na proyektong maraming file.
- Sabihin ang tuntunin para sa Total/Done nang hindi tumutukoy sa source code.
- Suriin ang (0,0), (4,0), (4,3), (4,4), at (4,5).
- Ipaliwanag kung bakit naaabot lamang ang subtraction kapag mas mababa ang Done sa Total.
- Ihiwalay ang pagkukuwenta sa output.
- Magsama ng tala para sa pagsusuri na nagpapaliwanag ng isang pasya sa disenyo at isang limitasyon.
+13
View File
@@ -0,0 +1,13 @@
with Ada.Text_IO;
procedure Main is
function Remaining (Total, Done : Natural) return Natural is
begin
if Done >= Total then
return 0;
end if;
return Total - Done;
end Remaining;
begin
Ada.Text_IO.Put_Line (Natural'Image (Remaining (4, 1)));
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Tagasuri ng marka na may talahanayan ng mga test
Baguhin ang panimulang code upang maging maipapaliwanag na tagasuri ng marka na may dokumentadong hangganan para sa pagsusuri. Gumamit muna ng nakatakdang raw values para madaling maulit ang pagsasanay bago magdagdag ng interaktibong input.
- Idokumento ang pinapayagang halaga at tugon sa hindi wastong halaga.
- Subukan ang -1, 0, 1, 99, 100, at 101.
- Subukan ang magkabilang panig at ang eksaktong hangganan para sa pagsusuri.
- Ipaliwanag ang membership test, conversion, at anumang pag-aayos ng mensahe.
- Bahagi ng pag-usad na maaari mong mapatunayan
+12
View File
@@ -0,0 +1,12 @@
with Ada.Text_IO;
procedure Main is
subtype Score is Integer range 0 .. 100;
Raw : Integer := 101;
begin
if Raw in Score then
Ada.Text_IO.Put_Line ("Tinanggap" & Score'Image (Score (Raw)));
else
Ada.Text_IO.Put_Line ("Dapat nasa pagitan ng 0 at 100 ang marka");
end if;
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pagsusuri ng draft na may hangganan na parang ginawa ng AI
Suriin at ayusin ang function na sadyang mali sa hangganan.Suriin ang iyong source, hula, at aktuwal na resulta. Gamitin ang puna ng awtomatikong pagsusuri upang balikan ang mali at piliin ang susunod na test.
- Muling sabihin sa sarili mong salita ang requirement na hindi bababa sa 70.
- Sundan ang 69, 70, at 71 bago patakbuhin.
- Ipakita ang mali at itinamang paghahambing kasama ang aktuwal na resulta.
- Ipaliwanag ang type ng input, resultang Boolean, at tawag para sa output.
- Bahagi ng pag-usad na maaari mong mapatunayan
+10
View File
@@ -0,0 +1,10 @@
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score > 70; -- Sadyang halimbawang susuriin
end Passed;
begin
Ada.Text_IO.Put_Line (Boolean'Image (Passed (70)));
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pakete para sa pagsusuri sa Agila Forge
Suriin ang iyong source, hula, at aktuwal na resulta. Gamitin ang puna ng awtomatikong pagsusuri upang balikan ang mali at piliin ang susunod na test.
- Isama ang README na may problema, kailangan bago magsimula, eksaktong command, at limitasyon.
- Isumite ang source at hiwalay na ebidensiya para sa normal na kaso, hangganan, at kabiguan.
- Suriin ang diff at ipaliwanag ang bawat pinanatiling pagbabago.
- Idokumento ang tulong ng AI at ang pagpapatunay na ginawa mo mismo.
- Suriin ang iyong source, hula, at aktuwal na resulta. Gamitin ang puna ng awtomatikong pagsusuri upang balikan ang mali at piliin ang susunod na test.
+20
View File
@@ -0,0 +1,20 @@
# Pakete para sa pagsusuri
Problema at nilalayong kilos:
Mga tool / compiler / revision ng SDK:
Mga command sa pagbuo at pagpapatakbo:
Test case | Inaasahan | Aktuwal | Bakit mahalaga ang kasong ito
Pasya sa disenyo at patakaran sa kabiguan:
Tulong ng AI at pagpapatunay ko:
Kilalang mga limitasyon:
Puna ng awtomatikong pagsusuri at mga rebisyon:
Susunod na layunin sa pag-aaral:
+9
View File
@@ -0,0 +1,9 @@
# Maikling ulat ng bug na may nauulit na ebidensiya
Gawing malinaw na ulat ng bug at pag-aayos ang depekto sa hangganan. Isama ang hiwalay na inaasahang mga resulta, regression test, at malinaw na limitasyon.
- Sabihin ang requirement at tukuyin ang inaasahan bago patakbuhin.
- Ipakita ang pinakamaliit na input na naglalantad ng orihinal na pagkakasalungat.
- Ipakitang nabibigo ang test para sa depekto at pumapasa matapos ayusin.
- Itala ang assertion policy at compiler command.
- Ipaliwanag ang isang hindi nasubukang requirement at magmungkahi ng susunod na kaugnay na kaso.
+14
View File
@@ -0,0 +1,14 @@
pragma Assertion_Policy (Check);
with Ada.Text_IO;
procedure Main is
function Passed (Score : Integer) return Boolean is
begin
return Score >= 70;
end Passed;
begin
pragma Assert (not Passed (69));
pragma Assert (Passed (70));
pragma Assert (Passed (71));
Ada.Text_IO.Put_Line ("Pumasa ang mga pagsusuri sa hangganan");
end Main;
+9
View File
@@ -0,0 +1,9 @@
# Pagsusuri ng SDK na may ebidensiya
Suriin ang maikling draft sa Flying V batay sa inilabas na SDK. Gumawa ng suportadong prototype at listahan ng mga pahayag na nangangailangan pa ng dokumentasyon.
- Suriin ang UI field, pagkakasunod-sunod ng lifecycle, at pahayag tungkol sa graphics output.
- Itala ang eksaktong source path at revision ng SDK na ginamit.
- Uriin ang mga pahayag bilang suportado, sinasalungat, o hindi napatunayan.
- Patakbuhin ang suportadong prototype at ihambing ang inaasahan sa aktuwal na output.
- Ipaliwanag ang hangganan ng sandbox at panatilihing nakatatak na mungkahi ang interaksiyon sa hinaharap.
+5
View File
@@ -0,0 +1,5 @@
import agila
fn main() {
agila.preview(agila.Button{label: 'Simulan ang pagsasanay'})
}
+9
View File
@@ -0,0 +1,9 @@
# Tala ng pag-aaral sa tatlong hakbang
Sumulat ng programang Flying V na nagla-log ng simula, layunin, at katapusan ng sesyon ng pag-aaral gamit ang dokumentadong function ng SDK.
- Gamitin ang agila.log at tukuyin ang depinisyon nito sa pampublikong SDK.
- Hulaan ang eksaktong output, kasama ang prefix ng SDK, bago patakbuhin.
- Ipaliwanag ang import, main, string argument, at pagkakasunod-sunod ng mga utos.
- Itala ang isang diagnostic dahil sa maling baybay ng function at ang pag-aayos nito.
- Suriin ang iyong source, hula, at aktuwal na resulta. Gamitin ang puna ng awtomatikong pagsusuri upang balikan ang mali at piliin ang susunod na test.
+5
View File
@@ -0,0 +1,5 @@
import agila
fn main() {
agila.log('Kaya kong ipaliwanag ang programang ito')
}
+9
View File
@@ -0,0 +1,9 @@
# Laboratoryo ng lifecycle na may inaasahang kabiguan
Bumuo ng maliit na application at mga hiwalay na eksperimento sa lifecycle. Ipaliwanag kung aling error ang nakikita ng SDK at kung ano ang susunod na ginagawa ng application.
- Ipakita ang normal na pagkakasunod-sunod na create/start/request/stop.
- Hiwalay na subukan ang walang lamang id at walang lamang pangalan.
- Hiwalay na subukan ang request bago start at dalawang start.
- Ipaliwanag ang pagkakaiba ng error handler na nagre-return at ng nagpapatuloy.
- Itala ang source, output, at limitasyon ng pagsusuri ng capability sa sandbox para sa reviewer.
+15
View File
@@ -0,0 +1,15 @@
import agila
fn main() {
mut app := agila.new_app('dev.student.study', 'Kaagapay sa Pag-aaral') or {
eprintln(err.msg())
return
}
app.start() or {
eprintln(err.msg())
return
}
app.request(.ui) or { eprintln(err.msg()) }
agila.log('Handa nang mag-aral')
app.stop()
}
+9
View File
@@ -0,0 +1,9 @@
# Paglalarawan ng study card para sa baguhan
Gamitin ang ibinigay na mga uri ng widget upang ilarawan ang study card. Ihiwalay ang napatunayang sandbox output sa guhit ng nilalayong interaktibong kilos sa hinaharap.
- Bumuo ng Column gamit ang mga child na Text at Button.
- Hulaan at suriin ang bilang ng child para sa isa, dalawa, at tatlo.
- I-preview ang hiwalay na Text at Button at ipaliwanag ang kanilang paglalarawan.
- Pumili ng madaling maunawaang teksto at itala ang puna ng isang mambabasa.
- Ilista nang hiwalay ang nilalayong interaksiyon at ipaliwanag kung bakit walang callback ang kasalukuyang Button.
+11
View File
@@ -0,0 +1,11 @@
import agila
fn main() {
view := agila.Column{
children: [
agila.Text{value: 'Ngayon: unawain ang isang function'},
agila.Button{label: 'Simulan ang pagsasanay'},
]
}
agila.preview(view)
}
@@ -0,0 +1,9 @@
# Maipapaliwanag na prototype ng Agila study app
Maghanda ng prototype sa Flying V na maaaring suriin, gamit ang dokumentadong lifecycle at UI contracts. Magdagdag ng hiwalay na eksperimento sa descriptor validation; idokumento kung ano ang naipapakita ng sandbox at kung ano ang nangangailangan ng production runtime.
- Ipaliwanag ang lahat ng API na ginamit at ituro ang sanggunian sa pampublikong SDK.
- Isama ang matagumpay na lifecycle at isang kasong may hinawakang error.
- Isama ang UI description at tumpak na inaasahang sandbox output.
- Hiwalay na subukan ang wasto, zero, at negatibong mesh counts.
- Suriin ang iyong source, hula, at aktuwal na resulta. Gamitin ang puna ng awtomatikong pagsusuri upang balikan ang mali at piliin ang susunod na test.
@@ -0,0 +1,12 @@
import agila
fn main() {
mesh := agila.MeshDescriptor{
vertex_count: 3
index_count: 3
}
agila.submit_mesh(mesh) or {
eprintln(err.msg())
return
}
}
+4
View File
@@ -0,0 +1,4 @@
program HelloAgila;
begin
writeln('Kumusta, Agila!');
end.
+1
View File
@@ -0,0 +1 @@
fn main() { println!("Kumusta, Agila!"); }